优化收预付款的逻辑
This commit is contained in:
@@ -127,7 +127,6 @@
|
||||
{ title: '操作员', dataIndex: 'userName',width:80},
|
||||
{ title: '单据日期 ', dataIndex: 'billTimeStr',width:160},
|
||||
{ title: '合计金额', dataIndex: 'totalPrice',width:80},
|
||||
{ title: '优惠金额', dataIndex: 'discountMoney',width:80},
|
||||
{ title: '收款金额', dataIndex: 'changeAmount',width:80},
|
||||
{ title: '备注', dataIndex: 'remark',width:200},
|
||||
{
|
||||
|
||||
@@ -155,6 +155,9 @@ export const FinancialModalMixin = {
|
||||
autoChangeAmount(target) {
|
||||
let allEachAmount = target.statisticsColumns.eachAmount-0
|
||||
let discountMoney = this.form.getFieldValue('discountMoney')-0
|
||||
if(!discountMoney) {
|
||||
discountMoney = 0
|
||||
}
|
||||
let changeAmount = (allEachAmount-discountMoney).toFixed(2)
|
||||
this.$nextTick(() => {
|
||||
this.form.setFieldsValue({'totalPrice':allEachAmount, 'changeAmount':changeAmount})
|
||||
|
||||
@@ -67,11 +67,6 @@
|
||||
<a-input placeholder="请输入合计收款" v-decorator.trim="[ 'totalPrice' ]" :readOnly="true"/>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :lg="6" :md="12" :sm="24">
|
||||
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="优惠金额">
|
||||
<a-input placeholder="请输入优惠金额" v-decorator.trim="[ 'discountMoney' ]" @keyup="onKeyUpDiscountMoney" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :lg="6" :md="12" :sm="24">
|
||||
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="收款金额">
|
||||
<a-input placeholder="请输入收款金额" v-decorator.trim="[ 'changeAmount' ]" :readOnly="true"/>
|
||||
@@ -79,6 +74,8 @@
|
||||
</a-col>
|
||||
<a-col :lg="6" :md="12" :sm="24">
|
||||
</a-col>
|
||||
<a-col :lg="6" :md="12" :sm="24">
|
||||
</a-col>
|
||||
</a-row>
|
||||
<a-row class="form-row" :gutter="24">
|
||||
<a-col :lg="6" :md="12" :sm="24">
|
||||
@@ -176,7 +173,7 @@
|
||||
this.model.billTime = this.model.billTimeStr
|
||||
this.$nextTick(() => {
|
||||
this.form.setFieldsValue(pick(this.model,'organId', 'handsPersonId', 'billTime', 'billNo', 'remark',
|
||||
'totalPrice', 'discountMoney', 'changeAmount'))
|
||||
'totalPrice', 'changeAmount'))
|
||||
});
|
||||
this.fileList = this.model.fileName
|
||||
// 加载子表数据
|
||||
|
||||
Reference in New Issue
Block a user