From 77094dd01f0c6ff59b4fb4fa1105addf34b2398c Mon Sep 17 00:00:00 2001
From: doum <doum>
Date: 星期二, 16 六月 2026 18:49:03 +0800
Subject: [PATCH] 新增智能电表、空调管理
---
admin/src/views/client/components/OperaYwCustomerWindow.vue | 83 +++++++++++++++++++++++++++++------------
1 files changed, 59 insertions(+), 24 deletions(-)
diff --git a/admin/src/views/client/components/OperaYwCustomerWindow.vue b/admin/src/views/client/components/OperaYwCustomerWindow.vue
index c966c3f..bc8ada4 100644
--- a/admin/src/views/client/components/OperaYwCustomerWindow.vue
+++ b/admin/src/views/client/components/OperaYwCustomerWindow.vue
@@ -171,6 +171,47 @@
})
},
methods: {
+ defaultForm() {
+ return {
+ id: null,
+ validity: '',
+ creator: '',
+ createDate: '',
+ editor: '',
+ editDate: '',
+ isdeleted: '',
+ remark: '',
+ industryId: '',
+ type: 1,
+ name: '',
+ phone: '',
+ idcardNo: '',
+ idcardDecode: '',
+ code: '',
+ status: '',
+ memberName: '',
+ lastLoginDate: '',
+ loginNum: '',
+ userId: '',
+ memberId: '',
+ accountBank: '',
+ accountNo: '',
+ accountPhone: '',
+ creditCard: '',
+ fpType: '',
+ accountAddr: '',
+ email: '',
+ selLangTime: false,
+ member: {
+ name: '',
+ phone: '',
+ highCheckor: 0,
+ idcardType: 0,
+ idcardNo: '',
+ email: ''
+ }
+ }
+ },
openTrade() {
this.$refs.OperaCategoryWindowRef.open('鏂板琛屼笟')
},
@@ -189,37 +230,31 @@
this.cateList = res
})
},
+ applyDetail(res) {
+ const base = this.defaultForm()
+ this.form = Object.assign(base, res, {
+ member: Object.assign({}, base.member, res.member || {})
+ })
+ this.form.selLangTime = this.form.validity === '2099-12-31'
+ },
open(title, target) {
this.title = title
this.visible = true
this.initData()
- // 鏂板缓
+ this.form = this.defaultForm()
+ this.clientList = []
+ this.$nextTick(() => {
+ this.$refs.form && this.$refs.form.clearValidate()
+ })
if (target == null) {
- this.$nextTick(() => {
- this.$refs.form.resetFields()
- this.form.validity = ''
- this.form.id = ''
- this.form.member = {
- name: "",
- phone: "",
- highCheckor: 0,
- idcardType: 0,
- idcardNo: '',
- email: '',
- }
- })
- this.form.type = 1
return
}
- // 缂栬緫
- this.$nextTick(() => {
- if (title == '缂栬緫瀹㈡埛') {
- this.getClient(target.id)
- detailById(target.id).then(res => {
- this.form = res
- })
- }
- })
+ if (title === '缂栬緫瀹㈡埛') {
+ this.getClient(target.id)
+ detailById(target.id).then(res => {
+ this.applyDetail(res)
+ })
+ }
},
getClient(customerId) {
fetchList({
--
Gitblit v1.9.3