优化财务单据

This commit is contained in:
季圣华
2021-07-03 00:44:42 +08:00
parent cc10923600
commit 090ca66a72
11 changed files with 57 additions and 37 deletions

View File

@@ -152,7 +152,12 @@
return (record.discountMoney + record.discountLastMoney).toFixed(2); 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: '收款', dataIndex: 'changeAmount',width:50},
{ {
title: '操作', title: '操作',

View File

@@ -152,11 +152,16 @@
return (record.discountMoney + record.discountLastMoney).toFixed(2); 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: 'changeAmount',width:60},
{ title: '欠款', dataIndex: 'debt',width:60, { title: '欠款', dataIndex: 'debt',width:60,
customRender:function (text,record,index) { customRender:function (text,record,index) {
let debt = record.discountLastMoney - record.changeAmount let debt = record.discountLastMoney + record.otherMoney - record.changeAmount
return debt? debt.toFixed(2):'' return debt? debt.toFixed(2):''
} }
}, },

View File

@@ -152,7 +152,12 @@
return (record.discountMoney + record.discountLastMoney).toFixed(2); 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: '付款', dataIndex: 'changeAmount',width:50},
{ {
title: '操作', title: '操作',

View File

@@ -152,11 +152,16 @@
return (record.discountMoney + record.discountLastMoney).toFixed(2); 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: 'changeAmount',width:60},
{ title: '欠款', dataIndex: 'debt',width:60, { title: '欠款', dataIndex: 'debt',width:60,
customRender:function (text,record,index) { customRender:function (text,record,index) {
let debt = record.discountLastMoney - record.changeAmount let debt = record.discountLastMoney + record.otherMoney - record.changeAmount
return debt? debt.toFixed(2):'' return debt? debt.toFixed(2):''
} }
}, },

View File

@@ -524,7 +524,7 @@
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :span="6"> <a-col :span="6">
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="款类型"> <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="款类型">
{{model.payType}} {{model.payType}}
</a-form-item> </a-form-item>
</a-col> </a-col>
@@ -544,12 +544,12 @@
<a-col :span="6"> <a-col :span="6">
<a-row class="form-row" :gutter="24"> <a-row class="form-row" :gutter="24">
<a-col :lg="24" :md="6" :sm="6"> <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}} {{model.changeAmount}}
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :lg="24" :md="6" :sm="6"> <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}} {{model.changeAmount}}
</a-form-item> </a-form-item>
</a-col> </a-col>
@@ -559,7 +559,7 @@
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :lg="24" :md="6" :sm="6"> <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}} {{model.accountName}}
</a-form-item> </a-form-item>
</a-col> </a-col>

View File

@@ -35,7 +35,7 @@
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :lg="6" :md="12" :sm="24"> <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 placeholder="请选择付款类型" v-decorator="[ 'payType' ]">
<a-select-option value="现付">现付</a-select-option> <a-select-option value="现付">现付</a-select-option>
<a-select-option value="预付款">预付款</a-select-option> <a-select-option value="预付款">预付款</a-select-option>

View File

@@ -117,13 +117,13 @@
{ title: '操作员', dataIndex: 'userName',width:60}, { title: '操作员', dataIndex: 'userName',width:60},
{ title: '欠款', dataIndex: 'needDebt',width:70, { title: '欠款', dataIndex: 'needDebt',width:70,
customRender:function (text,record,index) { 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: 'finishDebt',width:70 },
{ title: '待收欠款', dataIndex: 'debt',width:70, { title: '待收欠款', dataIndex: 'debt',width:70,
customRender:function (text,record,index) { 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);
} }
} }
], ],

View File

@@ -183,8 +183,8 @@ export const FinancialModalMixin = {
for(let i=0; i<selectBillRows.length; i++){ for(let i=0; i<selectBillRows.length; i++){
let info = selectBillRows[i] let info = selectBillRows[i]
info.billNumber = info.number info.billNumber = info.number
info.needDebt = (info.discountLastMoney - info.changeAmount).toFixed(2) info.needDebt = (info.discountLastMoney + info.otherMoney - info.changeAmount).toFixed(2)
info.eachAmount = (info.discountLastMoney - info.changeAmount - info.finishDebt).toFixed(2); info.eachAmount = (info.discountLastMoney + info.otherMoney - info.changeAmount - info.finishDebt).toFixed(2);
if(info.eachAmount != 0) { if(info.eachAmount != 0) {
changeAmount += info.eachAmount-0 changeAmount += info.eachAmount-0
listEx.push(info) listEx.push(info)

View File

@@ -142,8 +142,8 @@
<a-tab-pane key="4" tab="图片信息" forceRender> <a-tab-pane key="4" tab="图片信息" forceRender>
<a-row class="form-row" :gutter="24"> <a-row class="form-row" :gutter="24">
<a-col :lg="12" :md="12" :sm="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="图片"> <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> <j-image-upload v-model="fileList" bizPath="material" text="上传" isMultiple></j-image-upload>
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :lg="12" :md="12" :sm="24"></a-col> <a-col :lg="12" :md="12" :sm="24"></a-col>

View File

@@ -98,22 +98,27 @@
if (!err) { if (!err) {
that.confirmLoading = true; that.confirmLoading = true;
let formData = Object.assign(this.model, values); let formData = Object.assign(this.model, values);
let obj; if(formData.basicUnit === formData.otherUnit) {
if(!this.model.id){ that.$message.warning('抱歉基本单位与副单位不能相同');
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.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();
})
}
} }
}) })
}, },

View File

@@ -149,11 +149,6 @@
if (!err) { if (!err) {
that.confirmLoading = true; that.confirmLoading = true;
let formData = Object.assign(this.model, values); let formData = Object.assign(this.model, values);
if(this.model.beginNeedGet && this.model.beginNeedPay) {
that.$message.warn("期初应收和期初应付不能同时输入");
that.confirmLoading = false;
return;
}
formData.type = "供应商"; formData.type = "供应商";
let obj; let obj;
if(!this.model.id){ if(!this.model.id){