From da3dbb56388ae49097e50ded584ed2abb7f5022d Mon Sep 17 00:00:00 2001
From: yangfeng <wanwan926_4@163.com>
Date: 星期二, 17 十月 2023 14:16:25 +0800
Subject: [PATCH] bug修复(5243)
---
src/views/client/client/DetailClientManage.vue | 245 +++++++++++++++++++++++++++++++++----------------
1 files changed, 165 insertions(+), 80 deletions(-)
diff --git a/src/views/client/client/DetailClientManage.vue b/src/views/client/client/DetailClientManage.vue
index 388075c..2b89beb 100644
--- a/src/views/client/client/DetailClientManage.vue
+++ b/src/views/client/client/DetailClientManage.vue
@@ -28,7 +28,7 @@
<el-tab-pane label="閿�鍞�诲崟" name="master"></el-tab-pane>
<el-tab-pane label="閿�鍞瓙鍗�" name="sub"></el-tab-pane>
<el-tab-pane label="閿�鍞槑缁嗗崟" name="detail"></el-tab-pane>
- <el-tab-pane label="鏀舵鍗�" name="plan"></el-tab-pane>
+ <el-tab-pane label="鏀舵鍗�" name="receipt"></el-tab-pane>
</el-tabs>
</div>
<div v-if="activeName === 'first'" class="detail">
@@ -44,11 +44,11 @@
<li v-for="(item, i) in basicInfoList" :key="i">
<div class="left">
<div class="content-title">{{ item.leftStr + "锛�" }}</div>
- <div class="content-data">{{ item.leftValue }}</div>
+ <div class="content-data">{{ item.leftValue ? item.leftValue : "--" }}</div>
</div>
- <div class="right">
- <div class="content-title">{{ item.rightStr }}</div>
- <div class="content-data">{{ item.rightValue }}</div>
+ <div v-if="item.rightStr" class="right">
+ <div class="content-title">{{ item.rightStr + "锛�" }}</div>
+ <div class="content-data">{{ item.rightValue ? item.rightValue : "--" }}</div>
</div>
</li>
</ul>
@@ -66,11 +66,11 @@
<li v-for="(item, i) in contactList" :key="i">
<div class="left">
<div class="content-title">{{ item.leftStr + "锛�" }}</div>
- <div class="content-data">{{ item.leftValue }}</div>
+ <div class="content-data">{{ item.leftValue ? item.leftValue : "--" }}</div>
</div>
- <div class="right">
- <div class="content-title">{{ item.rightStr }}</div>
- <div class="content-data">{{ item.rightValue }}</div>
+ <div v-if="item.rightStr" class="right">
+ <div class="content-title">{{ item.rightStr + "锛�" }}</div>
+ <div class="content-data">{{ item.rightValue ? item.rightValue : "--" }}</div>
</div>
</li>
</ul>
@@ -88,11 +88,11 @@
<li v-for="(item, i) in dynamicInfoList" :key="i">
<div class="left">
<div class="content-title">{{ item.leftStr + "锛�" }}</div>
- <div class="content-data">{{ item.leftValue }}</div>
+ <div class="content-data">{{ item.leftValue ? item.leftValue : "--" }}</div>
</div>
- <div class="right">
- <div class="content-title">{{ item.rightStr }}</div>
- <div class="content-data">{{ item.rightValue }}</div>
+ <div v-if="item.rightStr" class="right">
+ <div class="content-title">{{ item.rightStr + "锛�" }}</div>
+ <div class="content-data">{{ item.rightValue ? item.rightValue : "--" }}</div>
</div>
</li>
</ul>
@@ -110,14 +110,18 @@
<li v-for="(item, i) in businessInfoList" :key="i">
<div class="left">
<div class="content-title">{{ item.leftStr + "锛�" }}</div>
- <div class="content-data">{{ item.leftValue }}</div>
+ <div class="content-data">{{ item.leftValue ? item.leftValue : "--" }}</div>
</div>
- <div class="right">
- <div class="content-title">{{ item.rightStr }}</div>
- <div class="content-data">{{ item.rightValue }}</div>
+ <div v-if="item.rightStr" class="right">
+ <div class="content-title">{{ item.rightStr + "锛�" }}</div>
+ <div class="content-data">{{ item.rightValue ? item.rightValue : "--" }}</div>
</div>
</li>
</ul>
+ <div class="business_scope">
+ <div class="content-title">{{ "缁忚惀鑼冨洿锛�" }}</div>
+ <div class="content-data">{{ detailConfig.infomation.business_scope }}</div>
+ </div>
</div>
</div>
<!-- 鍦板潃淇℃伅 -->
@@ -132,14 +136,18 @@
<li v-for="(item, i) in addressInfoList" :key="i">
<div class="left">
<div class="content-title">{{ item.leftStr + "锛�" }}</div>
- <div class="content-data">{{ item.leftValue }}</div>
+ <div class="content-data">{{ item.leftValue ? item.leftValue : "--" }}</div>
</div>
- <div class="right">
- <div class="content-title">{{ item.rightStr }}</div>
- <div class="content-data">{{ item.rightValue }}</div>
+ <div v-if="item.rightStr" class="right">
+ <div class="content-title">{{ item.rightStr + "锛�" }}</div>
+ <div class="content-data">{{ item.rightValue ? item.rightValue : "--" }}</div>
</div>
</li>
</ul>
+ <div class="business_scope">
+ <div class="content-title">{{ "鍦板潃淇℃伅" }}</div>
+ <div class="content-data">{{ detailConfig.infomation.detail_address }}</div>
+ </div>
</div>
</div>
<!-- 澶囨敞淇℃伅 -->
@@ -154,14 +162,14 @@
<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>
</div>
</div>
<!-- 闄勪欢淇℃伅 -->
- <div class="basic-info">
+ <!-- <div class="basic-info">
<div class="basic-info-label" @click="expandClick('annex')">
<i v-if="isAnnexExpand" class="el-icon-arrow-down"></i>
<i v-else class="el-icon-arrow-up"></i>
@@ -177,28 +185,31 @@
</li>
</ul>
</div>
- </div>
+ </div> -->
</div>
<div v-if="activeName === 'contact'" class="second">
- <Contacts :isDetail="true" />
+ <Contacts :isDetail="true" :add-config="addConfig" />
</div>
<div v-if="activeName === 'second'" class="second">
- <FollowupRecords :isDetail="true" />
+ <FollowupRecords :isDetail="true" :add-config="addConfig" />
</div>
<div v-if="activeName === 'salesOpportunity'" class="second">
- <SalesOpportunity :isDetail="true" />
+ <SalesOpportunity :isDetail="true" :add-config="addConfig" />
</div>
<div v-if="activeName === 'quotation'" class="second">
- <Quotation :isDetail="true" />
+ <Quotation :isDetail="true" :add-config="addConfig" />
</div>
<div v-if="activeName === 'master'" class="second">
- <MasterOrder :isDetail="true" />
+ <MasterOrder :isDetail="true" :add-config="addConfig" />
</div>
<div v-if="activeName === 'sub'" class="second">
- <SubOrder :isDetail="true" />
+ <SubOrder :isDetail="true" :add-config="addConfig" />
</div>
<div v-if="activeName === 'detail'" class="second">
- <SalesDetails :isDetail="true" />
+ <SalesDetails :isDetail="true" :add-config="addConfig" />
+ </div>
+ <div v-if="activeName === 'receipt'" class="second">
+ <Receipt :isDetail="true" :add-config="addConfig" :source-type="1" />
</div>
</div>
</el-drawer>
@@ -213,6 +224,8 @@
import MasterOrder from "@/views/sales/masterOrder"
import SubOrder from "@/views/sales/subOrder"
import SalesDetails from "@/views/sales/salesDetails"
+import Receipt from "@/views/other/payment/receipt"
+import { getContactList } from "@/api/client/contacts"
export default {
name: "DetailClientManage",
props: {
@@ -226,7 +239,7 @@
}
}
},
- components: { FollowupRecords, Contacts, SalesOpportunity, Quotation, MasterOrder, SubOrder, SalesDetails },
+ components: { FollowupRecords, Contacts, SalesOpportunity, Quotation, MasterOrder, SubOrder, SalesDetails, Receipt },
computed: {},
data() {
return {
@@ -243,56 +256,70 @@
isAddressExpand: true, // 鍦板潃淇℃伅
addressInfoList: [],
isRemarkExpand: true, // 澶囨敞淇℃伅
- isAnnexExpand: true // 闄勪欢淇℃伅
+ isAnnexExpand: true, // 闄勪欢淇℃伅
+ addConfig: {},
+ contact_name: "",
+ contact_phone: "",
+ contact_position: "",
+ contact_wechat: "",
+ contact_email: ""
}
},
created() {
- this.setData()
+ this.getContactList()
+ this.setData(this.detailConfig.infomation)
+ this.addConfig = {
+ id_name: "client_id",
+ keywordType: "瀹㈡埛鍚嶇О",
+ keyword: this.detailConfig.infomation.name,
+ id: this.detailConfig.infomation.id,
+ common_name: this.detailConfig.infomation.name,
+ client_name: this.detailConfig.infomation.name,
+ contact_name: this.detailConfig.infomation.contact_name,
+ client_status_id: this.detailConfig.infomation.client_status_id,
+ client_id: this.detailConfig.infomation.id,
+ contact_id: this.detailConfig.infomation.contact_id,
+ sourceType:1,
+ }
},
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.username
},
{
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: "鎵�灞炲叕娴�",
leftValue: "",
- rightStr: "鏈嶅姟浠h〃",
- rightValue: ""
- },
- {
- leftStr: "绛惧埌",
- leftValue: "",
rightStr: "涓嬫鍥炶鏃ユ湡",
- rightValue: ""
+ rightValue: item.next_visit_time
},
{
- leftStr: "鍒涘缓鏃堕棿",
- leftValue: "",
- rightStr: "鏈�鏅氭湇鍔″埌鏈熸棩",
+ leftStr: "鏈�鏅氭湇鍔″埌鏈熸棩",
+ leftValue: item.latest_service_time,
+ rightStr: "鍒涘缓鏃堕棿",
rightValue: ""
},
{
@@ -305,19 +332,19 @@
this.contactList = [
{
leftStr: "鑱旂郴浜哄鍚�",
- leftValue: "",
+ leftValue: this.contact_name,
rightStr: "鑱旂郴浜烘墜鏈�",
- rightValue: ""
+ rightValue: this.contact_phone
},
{
leftStr: "鑱旂郴浜鸿亴鍔�",
- leftValue: "",
+ leftValue: this.contact_position,
rightStr: "鑱旂郴浜哄井淇�",
- rightValue: ""
+ rightValue: this.contact_wechat
},
{
leftStr: "鑱旂郴浜篍mail",
- leftValue: "",
+ leftValue: this.contact_email,
rightStr: "",
rightValue: ""
}
@@ -339,48 +366,42 @@
this.businessInfoList = [
{
leftStr: "鎵�灞炶涓�",
- leftValue: "",
+ leftValue: item.Industry.name,
rightStr: "娉曞畾浠h〃浜�",
- rightValue: ""
+ rightValue: item.representative
},
{
leftStr: "娉ㄥ唽鏃堕棿",
- leftValue: "",
+ leftValue: item.registration_time,
rightStr: "娉ㄥ唽璧勯噾",
- rightValue: ""
+ rightValue: item.RegisteredCapital.name
},
{
leftStr: "鍏徃鎬ц川",
- leftValue: "",
+ leftValue: item.EnterpriseNature.name,
rightStr: "瀹㈡埛瑙勬ā",
- rightValue: ""
- },
- {
- leftStr: "缁忚惀鑼冨洿",
- leftValue: "",
- rightStr: "",
- rightValue: ""
+ rightValue: item.EnterpriseScale.name
}
]
this.addressInfoList = [
{
leftStr: "鍥藉",
- leftValue: "",
+ leftValue: "涓浗",
rightStr: "鐪佷唤",
- rightValue: ""
+ rightValue: item.Province.name
},
{
leftStr: "鍩庡競",
- leftValue: "",
- rightStr: "鍖哄煙",
- rightValue: ""
- },
- {
- leftStr: "璇︾粏鍦板潃",
- leftValue: "",
+ leftValue: item.City.name,
rightStr: "",
rightValue: ""
}
+ // {
+ // leftStr: "璇︾粏鍦板潃",
+ // leftValue: item.detail_address,
+ // rightStr: "",
+ // rightValue: ""
+ // }
]
},
handleClose() {
@@ -408,6 +429,50 @@
} else if (value === "annex") {
this.isAnnexExpand = !this.isAnnexExpand
}
+ },
+ // 鏃堕棿鏄剧ず
+ 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
+ },
+ getContactList() {
+ getContactList({
+ search_map: {
+ client_id: this.clientManageDetail.infomation.id
+ },
+ page: 0,
+ pageSize: 0
+ }).then((res) => {
+ if (res.code === 200) {
+ console.log(res.data.list)
+ if (res.data.list && res.data.list.length > 0) {
+ let data = res.data.list[0]
+ console.log(data)
+ this.contact_name = data.name
+ this.contact_phone = data.phone
+ this.contact_position = data.position
+ this.contact_wechat = data.wechat
+ this.contact_email = data.email
+ }
+ }
+ this.setData(this.detailConfig.infomation)
+ })
}
}
}
@@ -506,14 +571,34 @@
color: #333;
}
}
- .remark {
+ .remark,
+ .all {
width: 100%;
+ }
+ }
+ .business_scope {
+ display: flex;
+ align-items: center;
+ font-size: 14px;
+ min-height: 40px;
+ .content-title {
+ width: 320px;
+ text-align: right;
+ color: #555;
+ }
+ .content-data {
+ flex: 1;
+ padding: 5px;
+ text-align: left;
+ margin-left: 25px;
+ color: #333;
}
}
}
}
}
.second {
+ height: calc(100vh - 111px);
background: #fff;
.followup-records {
.table-view {
--
Gitblit v1.8.0