bug修改
This commit is contained in:
@@ -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()
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user