diff --git a/src/views/main/Customer/addForm.vue b/src/views/main/Customer/addForm.vue
index caf670c..5da8f80 100644
--- a/src/views/main/Customer/addForm.vue
+++ b/src/views/main/Customer/addForm.vue
@@ -146,12 +146,12 @@
>
-
+
- {{ formatRole(row.roleCode) }}
+ {{ formatRole(row.WroleCode) }}
-
+
@@ -323,11 +323,15 @@ export default {
},
formatRole(value) {
let RData = ''
- this.TypeData.forEach(item => {
- if (item.code == value) {
- RData = item.value
- }
- })
+ if (value) {
+ this.TypeData.forEach(item => {
+ value.forEach(item2 => {
+ if (item.code == item2) {
+ RData == '' ? (RData = item.value) : (RData = RData + ',' + item.value)
+ }
+ })
+ })
+ }
return RData
},
formatSex(value) {
@@ -382,6 +386,16 @@ export default {
values[key] = JSON.stringify(values[key])
}
}
+ this.ContactsData.forEach(item => {
+ if (item.WroleCode.length) {
+ let data = ''
+ item.WroleCode.forEach(item => {
+ data = `${data}[${item}]`
+ })
+ item.roleCode = data
+ }
+ })
+ console.log(this.ContactsData)
DjyCustomerAdd({ ...values, contacts: this.ContactsData })
.then(res => {
if (res.success) {
diff --git a/src/views/main/Customer/editForm.vue b/src/views/main/Customer/editForm.vue
index 1b4c9e5..8dbc9ba 100644
--- a/src/views/main/Customer/editForm.vue
+++ b/src/views/main/Customer/editForm.vue
@@ -146,12 +146,12 @@
>
-
+
- {{ formatRole(row.roleCode) }}
+ {{ formatRole(row.WroleCode) }}
-
+
@@ -300,14 +300,22 @@ export default {
this.form.setFieldsValue({
...res.data
})
+
res.data.contacts.forEach((item, index) => {
item.WebKey = index
+ let data = []
+ item.roleCode.split(']').forEach(item => {
+ if (item) {
+ data.push(item.split('[')[1])
+ }
+ })
+ item.WroleCode = data
+ console.log(item.WroleCode)
this.ContactsData.push(item)
})
})
sysDictDataPage({ pageNo: 1, pageSize: 999, typeId: '346103538081861' }).then(res => {
this.TypeData = res.data.rows
- console.log(this.TypeData)
})
},
methods: {
@@ -333,12 +341,15 @@ export default {
},
formatRole(value) {
let RData = ''
- this.TypeData.forEach(item => {
- console.log(item.code, value)
- if (item.code == value) {
- RData = item.value
- }
- })
+ if (value) {
+ this.TypeData.forEach(item => {
+ value.forEach(item2 => {
+ if (item.code == item2) {
+ RData == '' ? (RData = item.value) : (RData = RData + ',' + item.value)
+ }
+ })
+ })
+ }
return RData
},
formatSex(value) {
@@ -375,6 +386,15 @@ export default {
values[key] = JSON.stringify(values[key])
}
}
+ this.ContactsData.forEach(item => {
+ if (item.WroleCode.length) {
+ let data = ''
+ item.WroleCode.forEach(item => {
+ data = `${data}[${item}]`
+ })
+ item.roleCode = data
+ }
+ })
DjyCustomerEdit({ ...this.Data, ...values, contacts: this.ContactsData })
.then(res => {
if (res.success) {
diff --git a/src/views/main/Customer/index.vue b/src/views/main/Customer/index.vue
index d33e3ba..cb096c6 100644
--- a/src/views/main/Customer/index.vue
+++ b/src/views/main/Customer/index.vue
@@ -2,7 +2,7 @@
-
+
-
-
+
+
@@ -132,8 +132,10 @@ import {
DjyCustomerDelete,
DjyUserConfigAdd
} from '@/api/modular/main/CustomerInformationManagement'
-import addForm from './addForm.vue'
-import editForm from './editForm.vue'
+// import addForm from './addForm.vue'
+// import editForm from './editForm.vue'
+const addForm = () => import('./addForm.vue')
+const editForm = () => import('./editForm.vue')
import columnSetting from '@/components/tableColumnSetting'
const columns = [
{
@@ -214,6 +216,12 @@ const columns = [
width: '80',
dataIndex: 'addrEN'
},
+ {
+ title: '属性字符串',
+ align: 'center',
+ width: '80',
+ dataIndex: 'propString'
+ },
{
title: '发票抬头',
align: 'center',
diff --git a/src/views/main/DJYTenantParam/index.vue b/src/views/main/DJYTenantParam/index.vue
index 19bb67a..e2a86c3 100644
--- a/src/views/main/DJYTenantParam/index.vue
+++ b/src/views/main/DJYTenantParam/index.vue
@@ -53,9 +53,10 @@
{{ FnTurnD(row.typeCode) }}
-
+
编辑
+ 编辑选项