|
|
@ -312,8 +312,20 @@ export default {
|
|
|
|
mounted() {
|
|
|
|
mounted() {
|
|
|
|
DjyCustomerDetail({ id: this.RowData.id }).then(res => {
|
|
|
|
DjyCustomerDetail({ id: this.RowData.id }).then(res => {
|
|
|
|
this.Data = res.data
|
|
|
|
this.Data = res.data
|
|
|
|
|
|
|
|
console.log(res.data)
|
|
|
|
|
|
|
|
let WpropString = []
|
|
|
|
|
|
|
|
res.data.propString.split(']').forEach(item => {
|
|
|
|
|
|
|
|
if (item.split('[')[1]) {
|
|
|
|
|
|
|
|
WpropString.push(item.split('[')[1])
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
res.data.contacts.forEach((item, index) => {
|
|
|
|
|
|
|
|
item.WebKey = index + 1
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
this.ContactsData = res.data.contacts
|
|
|
|
this.form.setFieldsValue({
|
|
|
|
this.form.setFieldsValue({
|
|
|
|
...res.data
|
|
|
|
...res.data,
|
|
|
|
|
|
|
|
WpropString
|
|
|
|
})
|
|
|
|
})
|
|
|
|
})
|
|
|
|
})
|
|
|
|
sysDictDataPage({ pageNo: 1, pageSize: 999, typeId: '346103538081861' }).then(res => {
|
|
|
|
sysDictDataPage({ pageNo: 1, pageSize: 999, typeId: '346103538081861' }).then(res => {
|
|
|
@ -387,7 +399,14 @@ export default {
|
|
|
|
values[key] = JSON.stringify(values[key])
|
|
|
|
values[key] = JSON.stringify(values[key])
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
DjyCustomerEdit({ ...this.Data, ...values, contacts: this.ContactsData })
|
|
|
|
let propString = ''
|
|
|
|
|
|
|
|
values.WpropString.split('["')[1]
|
|
|
|
|
|
|
|
.split('"]')[0]
|
|
|
|
|
|
|
|
.split('","')
|
|
|
|
|
|
|
|
.forEach(item2 => {
|
|
|
|
|
|
|
|
propString == '' ? (propString = `[${item2}]`) : (propString = `${propString}[${item2}]`)
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
DjyCustomerEdit({ ...this.Data, ...values, propString: propString, contacts: this.ContactsData })
|
|
|
|
.then(res => {
|
|
|
|
.then(res => {
|
|
|
|
if (res.success) {
|
|
|
|
if (res.success) {
|
|
|
|
this.$message.success('编辑成功')
|
|
|
|
this.$message.success('编辑成功')
|
|
|
|