From babb1d12e11e6eae7d61d37adc4c877006757e7a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E5=90=8C=E6=B5=B7?= <963808678@qq.com> Date: Wed, 29 Mar 2023 14:39:51 +0800 Subject: [PATCH] 3/29 --- src/views/main/Customer/editForm.vue | 8 +++- src/views/main/Customer/index.vue | 11 ++++- src/views/main/DJYTenantParam/addItemForm.vue | 46 ++++++++++--------- .../main/DJYTenantParam/editItemForm.vue | 45 +++++++++--------- src/views/main/DJYTenantParam/indexItem.vue | 3 +- 5 files changed, 67 insertions(+), 46 deletions(-) diff --git a/src/views/main/Customer/editForm.vue b/src/views/main/Customer/editForm.vue index 1b7a59b..dbc75d2 100644 --- a/src/views/main/Customer/editForm.vue +++ b/src/views/main/Customer/editForm.vue @@ -11,7 +11,7 @@ - + 保存 @@ -312,7 +312,8 @@ export default { TypeData: [], propStringData: [], saleUserList: [], - bookingServiceItem: [] + bookingServiceItem: [], + SaveLoading: false } }, watch: { @@ -462,6 +463,7 @@ export default { this.confirmLoading = true validateFields((errors, values) => { if (!errors) { + this.SaveLoading = true for (const key in values) { if (typeof values[key] === 'object' && !(values[key] === null)) { values[key] = JSON.stringify(values[key]) @@ -489,6 +491,7 @@ export default { let Arr = ['sale', 'op', 'doc', 'custservice'] GetSysUserPage() .then(res => { + this.SaveLoading = false if (res.success) { let saleUserList = res.data Arr.forEach(item => { @@ -522,6 +525,7 @@ export default { } }) .catch(err => { + this.SaveLoading = false console.log(err) }) } else { diff --git a/src/views/main/Customer/index.vue b/src/views/main/Customer/index.vue index 29f7cf3..c1b8944 100644 --- a/src/views/main/Customer/index.vue +++ b/src/views/main/Customer/index.vue @@ -18,7 +18,16 @@ - 查询 + 查询 重置 {{ advanced ? '收起' : '展开' }} diff --git a/src/views/main/DJYTenantParam/addItemForm.vue b/src/views/main/DJYTenantParam/addItemForm.vue index 236f5fb..6d3d157 100644 --- a/src/views/main/DJYTenantParam/addItemForm.vue +++ b/src/views/main/DJYTenantParam/addItemForm.vue @@ -133,33 +133,36 @@ export default { } }, mounted() { - DJYTenantParamGet({ pageNo: 1, pageSize: 999 }).then(res => { - this.TypeData = res.data - let data = [] - res.data.forEach(item => { - if (data.length) { - let type2 = false - data.forEach((item2, index2) => { - if (item.type == item2[0].type) { - item2.push(item) - type2 = true - } - }) - if (!type2) { - data[data.length] = [item] - } - } else { - data[0] = [item] - } - }) - this.WTypeData = data - }) + this.FnDJYTenantParamGet() this.YWData = this.$options.filters['dictData']('tenant_param_group') SysTenantPage({ pageNo: 1, pageSize: 9999, name: '' }).then(res => { this.TenantData = res.data.rows }) }, methods: { + FnDJYTenantParamGet() { + DJYTenantParamGet({ pageNo: 1, pageSize: 999 }).then(res => { + this.TypeData = res.data + let data = [] + res.data.forEach(item => { + if (data.length) { + let type2 = false + data.forEach((item2, index2) => { + if (item.type == item2[0].type) { + item2.push(item) + type2 = true + } + }) + if (!type2) { + data[data.length] = [item] + } + } else { + data[0] = [item] + } + }) + this.WTypeData = data + }) + }, FnTypeD(data) { let Rdata = '' this.YWData.forEach(item => { @@ -191,6 +194,7 @@ export default { // 初始化方法 add(record) { this.visible = true + this.FnDJYTenantParamGet() this.typeData = [ { code: 10, diff --git a/src/views/main/DJYTenantParam/editItemForm.vue b/src/views/main/DJYTenantParam/editItemForm.vue index 215a6ad..6c5b3b1 100644 --- a/src/views/main/DJYTenantParam/editItemForm.vue +++ b/src/views/main/DJYTenantParam/editItemForm.vue @@ -133,33 +133,35 @@ export default { } }, mounted() { - DJYTenantParamGet({ pageNo: 1, pageSize: 999 }).then(res => { - this.TypeData = res.data - let data = [] - res.data.forEach(item => { - if (data.length) { - let type2 = false - data.forEach((item2, index2) => { - if (item.type == item2[0].type) { - item2.push(item) - type2 = true - } - }) - if (!type2) { - data[data.length] = [item] - } - } else { - data[0] = [item] - } - }) - this.WTypeData = data - }) this.YWData = this.$options.filters['dictData']('tenant_param_group') SysTenantPage({ pageNo: 1, pageSize: 9999, name: '' }).then(res => { this.TenantData = res.data.rows }) }, methods: { + FnDJYTenantParamGet() { + DJYTenantParamGet({ pageNo: 1, pageSize: 999 }).then(res => { + this.TypeData = res.data + let data = [] + res.data.forEach(item => { + if (data.length) { + let type2 = false + data.forEach((item2, index2) => { + if (item.type == item2[0].type) { + item2.push(item) + type2 = true + } + }) + if (!type2) { + data[data.length] = [item] + } + } else { + data[0] = [item] + } + }) + this.WTypeData = data + }) + }, FnTypeD(data) { let Rdata = '' this.YWData.forEach(item => { @@ -189,6 +191,7 @@ export default { }, // 初始化方法 edit(record) { + this.FnDJYTenantParamGet() console.log(record) this.FnChangeTypeCode(record.paraCode) this.data = record diff --git a/src/views/main/DJYTenantParam/indexItem.vue b/src/views/main/DJYTenantParam/indexItem.vue index ba05bb2..9efe44f 100644 --- a/src/views/main/DJYTenantParam/indexItem.vue +++ b/src/views/main/DJYTenantParam/indexItem.vue @@ -122,7 +122,8 @@ } " > - 删除 + +