优化财务单据
This commit is contained in:
@@ -152,7 +152,12 @@
|
||||
return (record.discountMoney + record.discountLastMoney).toFixed(2);
|
||||
}
|
||||
},
|
||||
{ title: '优惠后金额', dataIndex: 'discountLastMoney',width:100},
|
||||
{ title: '待收金额', dataIndex: 'needBackMoney',width:80,
|
||||
customRender:function (text,record,index) {
|
||||
let needBackMoney = record.discountLastMoney + record.otherMoney
|
||||
return needBackMoney? needBackMoney.toFixed(2):''
|
||||
}
|
||||
},
|
||||
{ title: '收款', dataIndex: 'changeAmount',width:50},
|
||||
{
|
||||
title: '操作',
|
||||
|
||||
@@ -152,11 +152,16 @@
|
||||
return (record.discountMoney + record.discountLastMoney).toFixed(2);
|
||||
}
|
||||
},
|
||||
{ title: '优惠后金额', dataIndex: 'discountLastMoney',width:80},
|
||||
{ title: '待付金额', dataIndex: 'needInMoney',width:80,
|
||||
customRender:function (text,record,index) {
|
||||
let needInMoney = record.discountLastMoney + record.otherMoney
|
||||
return needInMoney? needInMoney.toFixed(2):''
|
||||
}
|
||||
},
|
||||
{ title: '付款', dataIndex: 'changeAmount',width:60},
|
||||
{ title: '欠款', dataIndex: 'debt',width:60,
|
||||
customRender:function (text,record,index) {
|
||||
let debt = record.discountLastMoney - record.changeAmount
|
||||
let debt = record.discountLastMoney + record.otherMoney - record.changeAmount
|
||||
return debt? debt.toFixed(2):''
|
||||
}
|
||||
},
|
||||
|
||||
@@ -152,7 +152,12 @@
|
||||
return (record.discountMoney + record.discountLastMoney).toFixed(2);
|
||||
}
|
||||
},
|
||||
{ title: '优惠后金额', dataIndex: 'discountLastMoney',width:100},
|
||||
{ title: '待付金额', dataIndex: 'needBackMoney',width:80,
|
||||
customRender:function (text,record,index) {
|
||||
let needBackMoney = record.discountLastMoney + record.otherMoney
|
||||
return needBackMoney? needBackMoney.toFixed(2):''
|
||||
}
|
||||
},
|
||||
{ title: '付款', dataIndex: 'changeAmount',width:50},
|
||||
{
|
||||
title: '操作',
|
||||
|
||||
@@ -152,11 +152,16 @@
|
||||
return (record.discountMoney + record.discountLastMoney).toFixed(2);
|
||||
}
|
||||
},
|
||||
{ title: '优惠后金额', dataIndex: 'discountLastMoney',width:80},
|
||||
{ title: '待收金额', dataIndex: 'needOutMoney',width:80,
|
||||
customRender:function (text,record,index) {
|
||||
let needOutMoney = record.discountLastMoney + record.otherMoney
|
||||
return needOutMoney? needOutMoney.toFixed(2):''
|
||||
}
|
||||
},
|
||||
{ title: '收款', dataIndex: 'changeAmount',width:60},
|
||||
{ title: '欠款', dataIndex: 'debt',width:60,
|
||||
customRender:function (text,record,index) {
|
||||
let debt = record.discountLastMoney - record.changeAmount
|
||||
let debt = record.discountLastMoney + record.otherMoney - record.changeAmount
|
||||
return debt? debt.toFixed(2):''
|
||||
}
|
||||
},
|
||||
|
||||
@@ -524,7 +524,7 @@
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="6">
|
||||
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="付款类型">
|
||||
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="收款类型">
|
||||
{{model.payType}}
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
@@ -544,12 +544,12 @@
|
||||
<a-col :span="6">
|
||||
<a-row class="form-row" :gutter="24">
|
||||
<a-col :lg="24" :md="6" :sm="6">
|
||||
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="实付金额">
|
||||
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="实收金额">
|
||||
{{model.changeAmount}}
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :lg="24" :md="6" :sm="6">
|
||||
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="付款金额">
|
||||
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="收款金额">
|
||||
{{model.changeAmount}}
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
@@ -559,7 +559,7 @@
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :lg="24" :md="6" :sm="6">
|
||||
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="付款账户">
|
||||
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="收款账户">
|
||||
{{model.accountName}}
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :lg="6" :md="12" :sm="24">
|
||||
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="付款类型">
|
||||
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="收款类型">
|
||||
<a-select placeholder="请选择付款类型" v-decorator="[ 'payType' ]">
|
||||
<a-select-option value="现付">现付</a-select-option>
|
||||
<a-select-option value="预付款">预付款</a-select-option>
|
||||
|
||||
@@ -117,13 +117,13 @@
|
||||
{ title: '操作员', dataIndex: 'userName',width:60},
|
||||
{ title: '欠款', dataIndex: 'needDebt',width:70,
|
||||
customRender:function (text,record,index) {
|
||||
return (record.discountLastMoney - record.changeAmount).toFixed(2);
|
||||
return (record.discountLastMoney + record.otherMoney - record.changeAmount).toFixed(2);
|
||||
}
|
||||
},
|
||||
{ title: '已收欠款', dataIndex: 'finishDebt',width:70 },
|
||||
{ title: '待收欠款', dataIndex: 'debt',width:70,
|
||||
customRender:function (text,record,index) {
|
||||
return (record.discountLastMoney - record.changeAmount - record.finishDebt).toFixed(2);
|
||||
return (record.discountLastMoney + record.otherMoney - record.changeAmount - record.finishDebt).toFixed(2);
|
||||
}
|
||||
}
|
||||
],
|
||||
|
||||
@@ -183,8 +183,8 @@ export const FinancialModalMixin = {
|
||||
for(let i=0; i<selectBillRows.length; i++){
|
||||
let info = selectBillRows[i]
|
||||
info.billNumber = info.number
|
||||
info.needDebt = (info.discountLastMoney - info.changeAmount).toFixed(2)
|
||||
info.eachAmount = (info.discountLastMoney - info.changeAmount - info.finishDebt).toFixed(2);
|
||||
info.needDebt = (info.discountLastMoney + info.otherMoney - info.changeAmount).toFixed(2)
|
||||
info.eachAmount = (info.discountLastMoney + info.otherMoney - info.changeAmount - info.finishDebt).toFixed(2);
|
||||
if(info.eachAmount != 0) {
|
||||
changeAmount += info.eachAmount-0
|
||||
listEx.push(info)
|
||||
|
||||
@@ -142,8 +142,8 @@
|
||||
<a-tab-pane key="4" tab="图片信息" forceRender>
|
||||
<a-row class="form-row" :gutter="24">
|
||||
<a-col :lg="12" :md="12" :sm="24">
|
||||
<a-form-item :labelCol="{xs: { span: 24 },sm: { span: 4 }}" :wrapperCol="{xs: { span: 24 },sm: { span: 20 }}" label="图片">
|
||||
<j-image-upload v-model="fileList" bizPath="material" isMultiple></j-image-upload>
|
||||
<a-form-item :labelCol="{xs: { span: 24 },sm: { span: 4 }}" :wrapperCol="{xs: { span: 24 },sm: { span: 20 }}" label="图片信息">
|
||||
<j-image-upload v-model="fileList" bizPath="material" text="上传" isMultiple></j-image-upload>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :lg="12" :md="12" :sm="24"></a-col>
|
||||
|
||||
@@ -98,22 +98,27 @@
|
||||
if (!err) {
|
||||
that.confirmLoading = true;
|
||||
let formData = Object.assign(this.model, values);
|
||||
let obj;
|
||||
if(!this.model.id){
|
||||
obj=addUnit(formData);
|
||||
}else{
|
||||
obj=editUnit(formData);
|
||||
}
|
||||
obj.then((res)=>{
|
||||
if(res.code === 200){
|
||||
that.$emit('ok');
|
||||
}else{
|
||||
that.$message.warning(res.data.message);
|
||||
}
|
||||
}).finally(() => {
|
||||
if(formData.basicUnit === formData.otherUnit) {
|
||||
that.$message.warning('抱歉,基本单位与副单位不能相同!');
|
||||
that.confirmLoading = false;
|
||||
that.close();
|
||||
})
|
||||
} else {
|
||||
let obj;
|
||||
if(!this.model.id){
|
||||
obj=addUnit(formData);
|
||||
}else{
|
||||
obj=editUnit(formData);
|
||||
}
|
||||
obj.then((res)=>{
|
||||
if(res.code === 200){
|
||||
that.$emit('ok');
|
||||
}else{
|
||||
that.$message.warning(res.data.message);
|
||||
}
|
||||
}).finally(() => {
|
||||
that.confirmLoading = false;
|
||||
that.close();
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
@@ -149,11 +149,6 @@
|
||||
if (!err) {
|
||||
that.confirmLoading = true;
|
||||
let formData = Object.assign(this.model, values);
|
||||
if(this.model.beginNeedGet && this.model.beginNeedPay) {
|
||||
that.$message.warn("期初应收和期初应付不能同时输入");
|
||||
that.confirmLoading = false;
|
||||
return;
|
||||
}
|
||||
formData.type = "供应商";
|
||||
let obj;
|
||||
if(!this.model.id){
|
||||
|
||||
Reference in New Issue
Block a user