Authored by jiran.zhao

申请提现

@@ -8,6 +8,7 @@ export default function() { @@ -8,6 +8,7 @@ export default function() {
8 endStr: '', 8 endStr: '',
9 beginTimeStr: '', 9 beginTimeStr: '',
10 endTimeStr: '', 10 endTimeStr: '',
  11 + submitDisabled: false,
11 withdrawRules: { 12 withdrawRules: {
12 withdrawAmount: [{ required: true, message: '提现金额不能为空', trigger: 'blur' }], 13 withdrawAmount: [{ required: true, message: '提现金额不能为空', trigger: 'blur' }],
13 }, 14 },
@@ -19,7 +19,7 @@ @@ -19,7 +19,7 @@
19 <Date-picker v-model="endStr" type="date" placeholder="选择日期时间" @on-change="changeEndStr" /> 19 <Date-picker v-model="endStr" type="date" placeholder="选择日期时间" @on-change="changeEndStr" />
20 </Form-item> 20 </Form-item>
21 <Form-item label="提现金额" prop="withdrawAmount"> 21 <Form-item label="提现金额" prop="withdrawAmount">
22 - <input v-model="data.withdrawAmount" disabled placeholder="请选择日期时间获取提现金额" /> 22 + <input v-model="data.withdrawAmount" disabled placeholder="请选择日期获取提现金额" />
23 </Form-item> 23 </Form-item>
24 <Form-item label="提现到帐号"> 24 <Form-item label="提现到帐号">
25 <span>{{ data.withdrawAccount }}</span> 25 <span>{{ data.withdrawAccount }}</span>
@@ -31,7 +31,7 @@ @@ -31,7 +31,7 @@
31 <span>{{ data.remark }}</span> 31 <span>{{ data.remark }}</span>
32 </Form-item> 32 </Form-item>
33 <Form-item> 33 <Form-item>
34 - <Button id="btnSubmit" type="primary" size="large" @click="save">确认提现</Button> 34 + <Button id="btnSubmit" type="primary" size="large" :disabled="submitDisabled" @click="save">确认提现</Button>
35 <Button id="cancel" type="primary" size="large" @click="backList">取消</Button> 35 <Button id="cancel" type="primary" size="large" @click="backList">取消</Button>
36 </Form-item> 36 </Form-item>
37 </Form> 37 </Form>
@@ -64,6 +64,7 @@ export default { @@ -64,6 +64,7 @@ export default {
64 this.endStr = this.formatDate(result.data.billEndTime); 64 this.endStr = this.formatDate(result.data.billEndTime);
65 this.beginTimeStr = this.formatDate(result.data.billBeginTime); 65 this.beginTimeStr = this.formatDate(result.data.billBeginTime);
66 this.endTimeStr = this.formatDate(result.data.billEndTime); 66 this.endTimeStr = this.formatDate(result.data.billEndTime);
  67 + this.submitDisabled = false;
67 this.data.beginTime = result.data.billBeginTime; 68 this.data.beginTime = result.data.billBeginTime;
68 this.data.endTime = result.data.billEndTime; 69 this.data.endTime = result.data.billEndTime;
69 this.data.withdrawAmount = result.data.withdrawAmount ? result.data.withdrawAmount : 0; 70 this.data.withdrawAmount = result.data.withdrawAmount ? result.data.withdrawAmount : 0;
@@ -110,6 +111,7 @@ export default { @@ -110,6 +111,7 @@ export default {
110 save() { 111 save() {
111 const applyParams = this.beforeSave(); 112 const applyParams = this.beforeSave();
112 this.$Loading.start(); 113 this.$Loading.start();
  114 + this.submitDisabled = true;
113 return this.financeService.shopWithdrawApply(applyParams).then(result => { 115 return this.financeService.shopWithdrawApply(applyParams).then(result => {
114 if (result.code === 200) { 116 if (result.code === 200) {
115 this.$Loading.finish(); 117 this.$Loading.finish();
@@ -120,6 +122,7 @@ export default { @@ -120,6 +122,7 @@ export default {
120 this.backList(); 122 this.backList();
121 } else { 123 } else {
122 this.$Loading.error(); 124 this.$Loading.error();
  125 + this.submitDisabled = false;
123 this.$Notice.error({ 126 this.$Notice.error({
124 title: '提交错误', 127 title: '提交错误',
125 desc: result.message, 128 desc: result.message,
@@ -152,6 +155,13 @@ export default { @@ -152,6 +155,13 @@ export default {
152 const params = {}; 155 const params = {};
153 params.beginTime = this.beginStr; 156 params.beginTime = this.beginStr;
154 params.endTime = this.endStr; 157 params.endTime = this.endStr;
  158 + if (this.beginStr > this.endStr) {
  159 + this.$Notice.error({
  160 + title: '时间范围异常',
  161 + desc: '请正确选择开始结束时间',
  162 + });
  163 + return;
  164 + }
155 this.financeService.shopGetAvailableAmount(params).then(result => { 165 this.financeService.shopGetAvailableAmount(params).then(result => {
156 if (result.code === 200) { 166 if (result.code === 200) {
157 this.data.withdrawAmount = result.data.availableAmount; 167 this.data.withdrawAmount = result.data.availableAmount;
@@ -67,7 +67,7 @@ @@ -67,7 +67,7 @@
67 <div class="select-container"> 67 <div class="select-container">
68 <Button type="primary" @click="search">查询</Button> 68 <Button type="primary" @click="search">查询</Button>
69 <Button type="primary" @click="reset">全部</Button> 69 <Button type="primary" @click="reset">全部</Button>
70 - <!-- <Button>导出</Button>--> 70 + <!-- <Button type="primary" @click="exportData">导出</Button>-->
71 </div> 71 </div>
72 </filter-item> 72 </filter-item>
73 </layout-filter> 73 </layout-filter>
@@ -89,6 +89,7 @@ import _ from 'lodash'; @@ -89,6 +89,7 @@ import _ from 'lodash';
89 import moment from 'moment'; 89 import moment from 'moment';
90 import { WithdrawList } from './store'; 90 import { WithdrawList } from './store';
91 import FinanceService from 'services/finance/finance-service'; 91 import FinanceService from 'services/finance/finance-service';
  92 +import qs from 'querystringify';
92 93
93 export default { 94 export default {
94 data() { 95 data() {
@@ -164,6 +165,12 @@ export default { @@ -164,6 +165,12 @@ export default {
164 this.pageData.current = _.get(ret, 'data.pageNo', 1); 165 this.pageData.current = _.get(ret, 'data.pageNo', 1);
165 }); 166 });
166 }, 167 },
  168 + exportData() {
  169 + this.enableFilter = true;
  170 + const querystring = qs.stringify(this.filterValues(), true);
  171 + const href = `${FinanceService.shopWithdrawList}?${querystring}`;
  172 + window.open(href, '_blank');
  173 + },
167 getDetailById(id) { 174 getDetailById(id) {
168 this.$router.push({ 175 this.$router.push({
169 name: 'finance.withdraw.detail', 176 name: 'finance.withdraw.detail',
@@ -152,5 +152,8 @@ FinanceService.exportBalanceDetail = '/Api/erp/exportBalanceDetail'; // 导出 @@ -152,5 +152,8 @@ FinanceService.exportBalanceDetail = '/Api/erp/exportBalanceDetail'; // 导出
152 FinanceService.exportSettlementDetail = '/Api/erp/exportSettlementDetail'; // 导出结算单详情 152 FinanceService.exportSettlementDetail = '/Api/erp/exportSettlementDetail'; // 导出结算单详情
153 FinanceService.exportInventory = '/Api/erp/exportInventoryLedgerList'; // 导出结算单库存 153 FinanceService.exportInventory = '/Api/erp/exportInventoryLedgerList'; // 导出结算单库存
154 154
155 -FinanceService.exportShopWithdrawList = '/Api/erp/exportShopWithdrawList'; // 导出结算单库存 155 +FinanceService.exportShopWithdrawList = '/Api/erp/shopWithdrawList'; // 导出资金操作明细
  156 +FinanceService.exportShopWithdrawAccountList = '/Api/erp/shopWithdrawAccountList'; // 导出交易账务明细
  157 +FinanceService.exportShopWithdrawServiceList = '/Api/erp/shopWithdrawServiceList'; // 导出服务费账单
  158 +FinanceService.exportshopWithdrawFreightList = '/Api/erp/shopWithdrawFreightList'; // 导出运费账务明细
156 export default FinanceService; 159 export default FinanceService;