From ff2689625e555bbb61a26e0b50bc653f9430e68b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E5=90=8C=E6=B5=B7?= <963808678@qq.com> Date: Fri, 11 Nov 2022 17:27:04 +0800 Subject: [PATCH 1/7] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=20=E5=B1=9E=E6=80=A7?= =?UTF-8?q?=E5=AD=97=E7=AC=A6=E4=B8=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/main/Customer/editForm.vue | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/src/views/main/Customer/editForm.vue b/src/views/main/Customer/editForm.vue index 9eb005a..e3ca80a 100644 --- a/src/views/main/Customer/editForm.vue +++ b/src/views/main/Customer/editForm.vue @@ -312,8 +312,20 @@ export default { mounted() { DjyCustomerDetail({ id: this.RowData.id }).then(res => { 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({ - ...res.data + ...res.data, + WpropString }) }) sysDictDataPage({ pageNo: 1, pageSize: 999, typeId: '346103538081861' }).then(res => { @@ -387,7 +399,14 @@ export default { 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 => { if (res.success) { this.$message.success('编辑成功') From 5e9ed1d01f970c570d1034e63a296baeea2cd0f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E5=90=8C=E6=B5=B7?= <963808678@qq.com> Date: Fri, 11 Nov 2022 17:55:51 +0800 Subject: [PATCH 2/7] =?UTF-8?q?=E5=B1=9E=E6=80=A7=E5=AD=97=E7=AC=A6?= =?UTF-8?q?=E4=B8=B2=E5=B1=95=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/main/Customer/index.vue | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/src/views/main/Customer/index.vue b/src/views/main/Customer/index.vue index 624934c..df7303b 100644 --- a/src/views/main/Customer/index.vue +++ b/src/views/main/Customer/index.vue @@ -88,7 +88,11 @@ :title="item.title" :align="item.align" v-if="item.checked" - > + > + +