Authored by jiran.zhao

申请提现

... ... @@ -8,6 +8,7 @@ export default function() {
endStr: '',
beginTimeStr: '',
endTimeStr: '',
submitDisabled: false,
withdrawRules: {
withdrawAmount: [{ required: true, message: '提现金额不能为空', trigger: 'blur' }],
},
... ...
... ... @@ -19,7 +19,7 @@
<Date-picker v-model="endStr" type="date" placeholder="选择日期时间" @on-change="changeEndStr" />
</Form-item>
<Form-item label="提现金额" prop="withdrawAmount">
<input v-model="data.withdrawAmount" disabled placeholder="请选择日期时间获取提现金额" />
<input v-model="data.withdrawAmount" disabled placeholder="请选择日期获取提现金额" />
</Form-item>
<Form-item label="提现到帐号">
<span>{{ data.withdrawAccount }}</span>
... ... @@ -31,7 +31,7 @@
<span>{{ data.remark }}</span>
</Form-item>
<Form-item>
<Button id="btnSubmit" type="primary" size="large" @click="save">确认提现</Button>
<Button id="btnSubmit" type="primary" size="large" :disabled="submitDisabled" @click="save">确认提现</Button>
<Button id="cancel" type="primary" size="large" @click="backList">取消</Button>
</Form-item>
</Form>
... ... @@ -64,6 +64,7 @@ export default {
this.endStr = this.formatDate(result.data.billEndTime);
this.beginTimeStr = this.formatDate(result.data.billBeginTime);
this.endTimeStr = this.formatDate(result.data.billEndTime);
this.submitDisabled = false;
this.data.beginTime = result.data.billBeginTime;
this.data.endTime = result.data.billEndTime;
this.data.withdrawAmount = result.data.withdrawAmount ? result.data.withdrawAmount : 0;
... ... @@ -110,6 +111,7 @@ export default {
save() {
const applyParams = this.beforeSave();
this.$Loading.start();
this.submitDisabled = true;
return this.financeService.shopWithdrawApply(applyParams).then(result => {
if (result.code === 200) {
this.$Loading.finish();
... ... @@ -120,6 +122,7 @@ export default {
this.backList();
} else {
this.$Loading.error();
this.submitDisabled = false;
this.$Notice.error({
title: '提交错误',
desc: result.message,
... ... @@ -152,6 +155,13 @@ export default {
const params = {};
params.beginTime = this.beginStr;
params.endTime = this.endStr;
if (this.beginStr > this.endStr) {
this.$Notice.error({
title: '时间范围异常',
desc: '请正确选择开始结束时间',
});
return;
}
this.financeService.shopGetAvailableAmount(params).then(result => {
if (result.code === 200) {
this.data.withdrawAmount = result.data.availableAmount;
... ...
... ... @@ -67,7 +67,7 @@
<div class="select-container">
<Button type="primary" @click="search">查询</Button>
<Button type="primary" @click="reset">全部</Button>
<!-- <Button>导出</Button>-->
<!-- <Button type="primary" @click="exportData">导出</Button>-->
</div>
</filter-item>
</layout-filter>
... ... @@ -89,6 +89,7 @@ import _ from 'lodash';
import moment from 'moment';
import { WithdrawList } from './store';
import FinanceService from 'services/finance/finance-service';
import qs from 'querystringify';
export default {
data() {
... ... @@ -164,6 +165,12 @@ export default {
this.pageData.current = _.get(ret, 'data.pageNo', 1);
});
},
exportData() {
this.enableFilter = true;
const querystring = qs.stringify(this.filterValues(), true);
const href = `${FinanceService.shopWithdrawList}?${querystring}`;
window.open(href, '_blank');
},
getDetailById(id) {
this.$router.push({
name: 'finance.withdraw.detail',
... ...
... ... @@ -152,5 +152,8 @@ FinanceService.exportBalanceDetail = '/Api/erp/exportBalanceDetail'; // 导出
FinanceService.exportSettlementDetail = '/Api/erp/exportSettlementDetail'; // 导出结算单详情
FinanceService.exportInventory = '/Api/erp/exportInventoryLedgerList'; // 导出结算单库存
FinanceService.exportShopWithdrawList = '/Api/erp/exportShopWithdrawList'; // 导出结算单库存
FinanceService.exportShopWithdrawList = '/Api/erp/shopWithdrawList'; // 导出资金操作明细
FinanceService.exportShopWithdrawAccountList = '/Api/erp/shopWithdrawAccountList'; // 导出交易账务明细
FinanceService.exportShopWithdrawServiceList = '/Api/erp/shopWithdrawServiceList'; // 导出服务费账单
FinanceService.exportshopWithdrawFreightList = '/Api/erp/shopWithdrawFreightList'; // 导出运费账务明细
export default FinanceService;
... ...