From acdff03246ce648082192dfb069c3a006a7fbee6 Mon Sep 17 00:00:00 2001 From: yangfeng <wanwan926_4@163.com> Date: 星期三, 09 八月 2023 18:46:06 +0800 Subject: [PATCH] 客户管理模块 批量删除、推进、跟进接口联调 --- src/views/client/client/DetailClientManage.vue | 81 +++++++++++++++++++++++++++------------- 1 files changed, 54 insertions(+), 27 deletions(-) diff --git a/src/views/client/client/DetailClientManage.vue b/src/views/client/client/DetailClientManage.vue index 388075c..428d650 100644 --- a/src/views/client/client/DetailClientManage.vue +++ b/src/views/client/client/DetailClientManage.vue @@ -154,7 +154,7 @@ <li> <div class="left remark"> <div class="content-title">{{ "澶囨敞锛�" }}</div> - <div class="content-data">{{ "澶囨敞鍐呭" }}</div> + <div class="content-data">{{ detailConfig.infomation.remark }}</div> </div> </li> </ul> @@ -247,35 +247,35 @@ } }, created() { - this.setData() + this.setData(this.detailConfig.infomation) }, mounted() {}, methods: { - setData() { + setData(item) { this.basicInfoList = [ { leftStr: "瀹㈡埛鍚嶇О", - leftValue: this.detailConfig.infomation.client_name, + leftValue: item.client_name, rightStr: "瀹㈡埛缂栧彿", - rightValue: this.detailConfig.infomation.number + rightValue: item.number }, { leftStr: "瀹㈡埛鐘舵��", - leftValue: this.detailConfig.infomation.contact_name, + leftValue: item.client_status, rightStr: "閿�鍞礋璐d汉", - rightValue: this.detailConfig.infomation.contact_position + rightValue: item.member_id }, { leftStr: "瀹㈡埛绫诲瀷", - leftValue: this.detailConfig.infomation.contact_phone, + leftValue: item.client_type.name, rightStr: "瀹㈡埛鏉ユ簮", - rightValue: "鏂板缓" + rightValue: item.client_origin.name }, { leftStr: "閲嶈绾у埆", - leftValue: this.detailConfig.infomation.sales_sources_id, + leftValue: item.client_level, rightStr: "鍏捣鐘舵��", - rightValue: this.detailConfig.infomation.member_id + rightValue: "" }, { leftStr: "鎵�灞炲叕娴�", @@ -287,13 +287,13 @@ leftStr: "绛惧埌", leftValue: "", rightStr: "涓嬫鍥炶鏃ユ湡", - rightValue: "" + rightValue: this.processTime(item.next_visit_time) }, { leftStr: "鍒涘缓鏃堕棿", leftValue: "", rightStr: "鏈�鏅氭湇鍔″埌鏈熸棩", - rightValue: "" + rightValue: this.processTime(item.latest_service_time) }, { leftStr: "鍒涘缓浜�", @@ -305,9 +305,9 @@ this.contactList = [ { leftStr: "鑱旂郴浜哄鍚�", - leftValue: "", + leftValue: item.contact_name, rightStr: "鑱旂郴浜烘墜鏈�", - rightValue: "" + rightValue: item.contact_phone }, { leftStr: "鑱旂郴浜鸿亴鍔�", @@ -339,25 +339,25 @@ this.businessInfoList = [ { leftStr: "鎵�灞炶涓�", - leftValue: "", + leftValue: item.Industry.name, rightStr: "娉曞畾浠h〃浜�", - rightValue: "" + rightValue: item.representative }, { leftStr: "娉ㄥ唽鏃堕棿", - leftValue: "", + leftValue: this.processTime(item.registration_time), rightStr: "娉ㄥ唽璧勯噾", - rightValue: "" + rightValue: item.RegisteredCapital.name }, { leftStr: "鍏徃鎬ц川", - leftValue: "", + leftValue: item.EnterpriseNature.name, rightStr: "瀹㈡埛瑙勬ā", - rightValue: "" + rightValue: item.EnterpriseScale.name }, { leftStr: "缁忚惀鑼冨洿", - leftValue: "", + leftValue: item.business_scope, rightStr: "", rightValue: "" } @@ -365,19 +365,19 @@ this.addressInfoList = [ { leftStr: "鍥藉", - leftValue: "", + leftValue: item.Country.name, rightStr: "鐪佷唤", - rightValue: "" + rightValue: item.Province.name }, { leftStr: "鍩庡競", - leftValue: "", + leftValue: item.City.name, rightStr: "鍖哄煙", - rightValue: "" + rightValue: item.Region.name }, { leftStr: "璇︾粏鍦板潃", - leftValue: "", + leftValue: item.detail_address, rightStr: "", rightValue: "" } @@ -408,6 +408,33 @@ } else if (value === "annex") { this.isAnnexExpand = !this.isAnnexExpand } + }, + // 澶勭悊鏃堕棿 + processTime(dateTime) { + return this.dateFormat("YYYY-mm-dd HH:MM:SS", dateTime) === "1900-01-01 08:00:00" + ? "--" + : this.dateFormat("YYYY-mm-dd HH:MM:SS", dateTime) + }, + // 鏃堕棿鏄剧ず + dateFormat(fmt, date) { + let ret = "" + date = new Date(date) + const opt = { + "Y+": date.getFullYear().toString(), // 骞� + "m+": (date.getMonth() + 1).toString(), // 鏈� + "d+": date.getDate().toString(), // 鏃� + "H+": date.getHours().toString(), // 鏃� + "M+": date.getMinutes().toString(), // 鍒� + "S+": date.getSeconds().toString() // 绉� + // 鏈夊叾浠栨牸寮忓寲瀛楃闇�姹傚彲浠ョ户缁坊鍔狅紝蹇呴』杞寲鎴愬瓧绗︿覆 + } + for (let k in opt) { + ret = new RegExp("(" + k + ")").exec(fmt) + if (ret) { + fmt = fmt.replace(ret[1], ret[1].length == 1 ? opt[k] : opt[k].padStart(ret[1].length, "0")) + } + } + return fmt } } } -- Gitblit v1.8.0