bug修改

This commit is contained in:
zhaoxiao
2021-09-27 16:36:00 +08:00
parent 267804b4c2
commit f6b0bb93bb
11 changed files with 167 additions and 50 deletions
@@ -85,10 +85,10 @@
</template>
<!-- 输入-->
<template slot="input-text" slot-scope="text, record">
<template slot="input-text" slot-scope="text, record, index">
<a-input placeholder="请输入备注"
v-model="record.remark"
:maxLength='50'
v-model="remarkList[index]"
@change="e => {e.target.value = (e.target.value + '').trim()}"></a-input>
</template>
@@ -146,6 +146,11 @@ export default {
if (value) {
this.open()
}
},
packContactId(value) {
if (value) {
this.postContactChange(value)
}
}
},
data() {
@@ -209,6 +214,7 @@ export default {
}
],
dataSource: [],
remarkList: [], // 备注列表
validatorRules: {
invoiceAmount: {
rules: [{ required: true, validator: this.checkMoney }],
@@ -236,7 +242,8 @@ export default {
}
},
inputInvoicingAmount: null, // 输入的开票金额
sumAmountOwed: 0 // 总未开票金额
sumAmountOwed: 0, // 总未开票金额,
packContact: {}, // 邮寄联系人信息
}
},
methods: {
@@ -290,7 +297,12 @@ export default {
postalCode: res.result.postalCode,
contactAddress: res.result.contactAddress
}
this.form.setFieldsValue(pick(obj, 'postalCode', 'contactAddress'))
if (this.packContactId) {
this.packContact = obj
this.packContact.contactId = value
} else {
this.form.setFieldsValue(pick(obj, 'postalCode', 'contactAddress'))
}
})
},
/**
@@ -333,16 +345,19 @@ export default {
if (!err) {
let bmpList = []
let data = this.dataSource.filter(tt => tt.thisInvoicingAmount !== 0 && tt.thisInvoicingAmount)
data.forEach(item => {
data.forEach((item, index) => {
let obj = {
invoiceAmount: item.thisInvoicingAmount,
projectId: item.id,
projectType: item.projectType,
remark: item.remark
remark: this.remarkList[index]
}
bmpList.push(obj)
})
let param = values
if (this.packContactId) {
param = Object.assign(param, this.packContact)
}
param.bmpList = bmpList
addPayBill(param).then(res => {
if (res.success) {
@@ -360,10 +375,9 @@ export default {
this.close()
},
open() {
console.log(this.selectedData)
this.dataSource = this.selectedData
this.dataSource.forEach(item => {
item.remark = null
this.dataSource.forEach(() => {
this.remarkList.push('')
})
this.loadData()
},