Commit 36afcb29 authored by 邓春圆's avatar 邓春圆

Merge remote-tracking branch 'origin/dev1.6' into dev1.6

parents f35c3f06 ad0994cb
...@@ -321,6 +321,7 @@ ...@@ -321,6 +321,7 @@
<el-select <el-select
v-model="scope.row.platformAccountId" v-model="scope.row.platformAccountId"
:placeholder="$t('请选择收款账户')" :placeholder="$t('请选择收款账户')"
@change="(platformAccountId)=>changePlatformAccountId(platformAccountId,scope.$index)"
> >
<el-option <el-option
v-for="item in bankData" v-for="item in bankData"
...@@ -1246,6 +1247,9 @@ export default { ...@@ -1246,6 +1247,9 @@ export default {
hiddenDialog() { hiddenDialog() {
this.open = false; this.open = false;
}, },
changePlatformAccountId(platformAccountId,index){
this.form.receiptAccountList[index].platformAccountId = platformAccountId
},
submitForm(addType) { submitForm(addType) {
const params = {...this.form} const params = {...this.form}
params.addType = addType params.addType = addType
...@@ -1305,20 +1309,6 @@ export default { ...@@ -1305,20 +1309,6 @@ export default {
if (addType === 1) { if (addType === 1) {
let fieldsToValidate = ['customerId', 'departmentId', 'salesmanId']; // 部分字段校验 保存草稿用
Promise.all(
fieldsToValidate.map((field) => {
return new Promise((resolve, reject) => {
this.$refs['form'].validateField(field, (errorMessage) => {
resolve(errorMessage);
});
});
})
).then((errorMessages) => {
let valid = errorMessages.every((errorMessage) => {
return errorMessage == '';
});
if (valid) {
this.saveBtnLoading = true this.saveBtnLoading = true
params.receiptAccountList.splice(params.receiptAccountList.length - 1,1) params.receiptAccountList.splice(params.receiptAccountList.length - 1,1)
if (this.id && this.id != 0) { if (this.id && this.id != 0) {
...@@ -1338,12 +1328,8 @@ export default { ...@@ -1338,12 +1328,8 @@ export default {
this.saveBtnLoading = false this.saveBtnLoading = false
}) })
} }
}
});
return return
} }
this.$refs.form.validate ((valid)=>{
if (valid) {
this.saveBtnLoading = true this.saveBtnLoading = true
params.receiptAccountList.splice(params.receiptAccountList.length - 1,1) params.receiptAccountList.splice(params.receiptAccountList.length - 1,1)
if (this.id && this.id != 0) { if (this.id && this.id != 0) {
...@@ -1364,8 +1350,6 @@ export default { ...@@ -1364,8 +1350,6 @@ export default {
this.saveBtnLoading = false this.saveBtnLoading = false
}) })
} }
}
})
}, },
handleSelectionChange(val) { handleSelectionChange(val) {
this.multipleSelection = val; this.multipleSelection = val;
......
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