Commit b6d2167a authored by 我在何方's avatar 我在何方

新增收款单bug

parent 9c7479ae
......@@ -14,7 +14,7 @@
<!-- <el-descriptions-item > -->
<el-form-item
:label="$t('客户')"
style="margin-bottom: 0"
style="margin-bottom: 0;margin-top: 20px;"
prop="customerId"
:span="4"
:rules="{ required: true, trigger: ['blur', 'change'], message: $t('客户不能为空') }"
......@@ -28,7 +28,7 @@
<el-descriptions-item > -->
<el-form-item
:label="$t('部门')"
style="margin-bottom: 0"
style="margin-bottom: 0;margin-top: 20px;"
prop="departmentId"
:span="4"
:rules="{ required: true, trigger: ['blur', 'change'], message: $t('部门不能为空') }"
......@@ -48,7 +48,7 @@
</el-form-item>
<el-form-item
:label="$t('业务员')"
style="margin-bottom: 0"
style="margin-bottom: 0;margin-top: 20px;"
prop="salesmanId"
:span="4"
:rules="{ required: true, trigger: ['blur', 'change'], message: $t('业务员不能为空') }"
......@@ -305,7 +305,6 @@
v-if="scope.row.type !== 'total'"
label=""
label-width="0"
required
style="margin-bottom: 0"
:prop="`receiptAccountList.${scope.$index}.platformAccountId`"
>
......@@ -719,7 +718,6 @@ export default {
discountForm: {},
selectListRow: {},
selectListIndex: 0,
flag: false,
};
},
......@@ -1135,20 +1133,32 @@ export default {
if (this.list && this.list.length > 0) {
params.receivableVOList = this.list
}else{
this.saveBtnLoading = false
this.$modal.msgError(this.$t('请添加未收客户款项'));
return
}
if(!params.platformAccountId){
this.$modal.msgError(this.$t('请选择期望收款账户'));
return
}
// params.receiptAccountList.length = params.receiptAccountList.length - 1
params.receiptAccountList.splice(params.receiptAccountList.length - 1,1)
var saveStatus = true
params.receiptAccountList.map(v => {
if(!v.platformAccountId){
saveStatus = false
}
var bankname = this.bankData.filter(item=>item.id == v.platformAccountId)
if(bankname.length>0){
v.platformAccountName = bankname[0].baAccountName
v.platformAccountNo = bankname[0].baAccountNum
v.platformAccountBlankName = bankname[0].baBankName
}
delete v.discountTotal
v.writeOffRate = Number(v.writeOffRate)
return v
})
if(!saveStatus){
this.$modal.msgError(this.$t('请添加收款账户'));
return
}
delete params.receivableDetail
......@@ -1168,8 +1178,6 @@ export default {
});
if (valid) {
this.saveBtnLoading = true
console.log(this.id)
return
if (this.id && this.id != 0) {
updateReceipt(params).then(res => {
this.$modal.msgSuccess(this.$t('修改成功'));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment