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

新增收款单bug

parent 9c7479ae
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
<!-- <el-descriptions-item > --> <!-- <el-descriptions-item > -->
<el-form-item <el-form-item
:label="$t('客户')" :label="$t('客户')"
style="margin-bottom: 0" style="margin-bottom: 0;margin-top: 20px;"
prop="customerId" prop="customerId"
:span="4" :span="4"
:rules="{ required: true, trigger: ['blur', 'change'], message: $t('客户不能为空') }" :rules="{ required: true, trigger: ['blur', 'change'], message: $t('客户不能为空') }"
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
<el-descriptions-item > --> <el-descriptions-item > -->
<el-form-item <el-form-item
:label="$t('部门')" :label="$t('部门')"
style="margin-bottom: 0" style="margin-bottom: 0;margin-top: 20px;"
prop="departmentId" prop="departmentId"
:span="4" :span="4"
:rules="{ required: true, trigger: ['blur', 'change'], message: $t('部门不能为空') }" :rules="{ required: true, trigger: ['blur', 'change'], message: $t('部门不能为空') }"
...@@ -48,7 +48,7 @@ ...@@ -48,7 +48,7 @@
</el-form-item> </el-form-item>
<el-form-item <el-form-item
:label="$t('业务员')" :label="$t('业务员')"
style="margin-bottom: 0" style="margin-bottom: 0;margin-top: 20px;"
prop="salesmanId" prop="salesmanId"
:span="4" :span="4"
:rules="{ required: true, trigger: ['blur', 'change'], message: $t('业务员不能为空') }" :rules="{ required: true, trigger: ['blur', 'change'], message: $t('业务员不能为空') }"
...@@ -305,7 +305,6 @@ ...@@ -305,7 +305,6 @@
v-if="scope.row.type !== 'total'" v-if="scope.row.type !== 'total'"
label="" label=""
label-width="0" label-width="0"
required
style="margin-bottom: 0" style="margin-bottom: 0"
:prop="`receiptAccountList.${scope.$index}.platformAccountId`" :prop="`receiptAccountList.${scope.$index}.platformAccountId`"
> >
...@@ -719,7 +718,6 @@ export default { ...@@ -719,7 +718,6 @@ export default {
discountForm: {}, discountForm: {},
selectListRow: {}, selectListRow: {},
selectListIndex: 0, selectListIndex: 0,
flag: false, flag: false,
}; };
}, },
...@@ -1135,20 +1133,32 @@ export default { ...@@ -1135,20 +1133,32 @@ export default {
if (this.list && this.list.length > 0) { if (this.list && this.list.length > 0) {
params.receivableVOList = this.list params.receivableVOList = this.list
}else{ }else{
this.saveBtnLoading = false
this.$modal.msgError(this.$t('请添加未收客户款项')); this.$modal.msgError(this.$t('请添加未收客户款项'));
return return
} }
if(!params.platformAccountId){
this.$modal.msgError(this.$t('请选择期望收款账户'));
return
}
// params.receiptAccountList.length = params.receiptAccountList.length - 1 // params.receiptAccountList.length = params.receiptAccountList.length - 1
params.receiptAccountList.splice(params.receiptAccountList.length - 1,1) params.receiptAccountList.splice(params.receiptAccountList.length - 1,1)
var saveStatus = true
params.receiptAccountList.map(v => { 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 delete v.discountTotal
v.writeOffRate = Number(v.writeOffRate) v.writeOffRate = Number(v.writeOffRate)
return v return v
}) })
if(!saveStatus){
this.$modal.msgError(this.$t('请添加收款账户'));
return
}
delete params.receivableDetail delete params.receivableDetail
...@@ -1168,8 +1178,6 @@ export default { ...@@ -1168,8 +1178,6 @@ export default {
}); });
if (valid) { if (valid) {
this.saveBtnLoading = true this.saveBtnLoading = true
console.log(this.id)
return
if (this.id && this.id != 0) { if (this.id && this.id != 0) {
updateReceipt(params).then(res => { updateReceipt(params).then(res => {
this.$modal.msgSuccess(this.$t('修改成功')); 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