From 7874262b15ca8d2495012ed5f934332dbeeadf29 Mon Sep 17 00:00:00 2001
From: songshankun <songshankun@foxmail.com>
Date: 星期四, 28 九月 2023 09:42:57 +0800
Subject: [PATCH] feat: 客户管理页列表配置列显隐控制

---
 src/views/sales/quotation/DetailQuotation.vue |  253 +++++++++++---------------------------------------
 1 files changed, 57 insertions(+), 196 deletions(-)

diff --git a/src/views/sales/quotation/DetailQuotation.vue b/src/views/sales/quotation/DetailQuotation.vue
index 1cd4f7c..3fbd54a 100644
--- a/src/views/sales/quotation/DetailQuotation.vue
+++ b/src/views/sales/quotation/DetailQuotation.vue
@@ -14,29 +14,29 @@
         </div>
       </template>
       <div class="content">
-        <div class="top">{{ "鍚堝悓鍙戣捣浜猴細" + "" }}</div>
+        <!-- <div class="top">{{ "鍚堝悓鍙戣捣浜猴細" + "" }}</div> -->
         <div class="tab-view">
           <el-tabs v-model="activeName" @tab-click="tabsClick">
             <el-tab-pane label="璇︽儏" name="first"></el-tab-pane>
-            <el-tab-pane label="鎶ヤ环鍙樻洿鍗�" name="changeOrder">
-              <!-- <template slot="label">
+            <!-- <el-tab-pane label="鎶ヤ环鍙樻洿鍗�" name="changeOrder"> -->
+            <!-- <template slot="label">
                 <div>璺熻繘璁板綍<el-badge type="primary" :value="2"> </el-badge></div>
               </template> -->
-            </el-tab-pane>
+            <!-- </el-tab-pane> -->
             <el-tab-pane label="閿�鍞槑缁嗗崟" name="detail"></el-tab-pane>
             <el-tab-pane label="鏈嶅姟鍚堝悓" name="serviceContract"></el-tab-pane>
           </el-tabs>
         </div>
         <div v-if="activeName === 'first'" class="detail">
           <!-- 鏍囩 -->
-          <div class="basic-info">
+          <!-- <div class="basic-info">
             <div class="basic-info-label" @click="expandClick('label')">
               <i v-if="isLabelExpand" class="el-icon-arrow-down"></i>
               <i v-else class="el-icon-arrow-up"></i>
               <span style="margin-left: 10px">鏍囩</span>
             </div>
             <div v-show="isLabelExpand" class="basic-info-content"></div>
-          </div>
+          </div> -->
           <!-- 鍩烘湰淇℃伅 -->
           <div class="basic-info">
             <div class="basic-info-label" @click="expandClick('basic')">
@@ -49,11 +49,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 class="content-title">{{ item.rightStr + "锛�" }}</div>
+                    <div class="content-data">{{ item.rightValue ? item.rightValue : "--" }}</div>
                   </div>
                 </li>
               </ul>
@@ -70,15 +70,16 @@
               <div class="termsConditions">
                 <div class="content-title">{{ "鏉′欢涓庢潯娆�" + "锛�" }}</div>
                 <div class="content-termsConditions">
-                  <ul>
+                  {{ "\n" + detailConfig.infomation.conditions }}
+                  <!-- <ul>
                     <li v-for="(item, index) in Status.termsConditions" :key="index">{{ item }}</li>
-                  </ul>
+                  </ul> -->
                 </div>
               </div>
             </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>
@@ -94,7 +95,7 @@
                 </li>
               </ul>
             </div>
-          </div>
+          </div> -->
           <!-- 浜у搧绠$悊 -->
           <div class="basic-info">
             <div class="basic-info-label" @click="expandClick('product')">
@@ -125,10 +126,10 @@
           <!-- <FollowupRecords :isDetail="true" /> -->
         </div>
         <div v-if="activeName === 'detail'" class="second">
-          <SalesDetails :isDetail="true" />
+          <SalesDetails :isDetail="true" :add-config="addConfig" />
         </div>
         <div v-if="activeName === 'serviceContract'" class="second">
-          <ServiceContract :isDetail="true" />
+          <ServiceContract :isDetail="true" :add-config="addConfig" />
         </div>
       </div>
     </el-drawer>
@@ -170,177 +171,55 @@
       showSummary: {
         show: true,
         total: true,
-        sumProp: ["other1", "other2", "other3", "other4"],
-        mergeNumber: 3
+        sumProp: ["amount", "price", "total"],
+        mergeNumber: 1
       },
-      productTableList: {}
+      productTableList: {},
+      addConfig: {}
     }
   },
   created() {
-    this.setData()
+    this.setData(this.detailConfig.infomation)
+    this.addConfig = {
+      id_name: "quotation_number",
+      keywordType: "鎶ヤ环鍗�",
+      keyword: this.detailConfig.infomation.number,
+      id: this.detailConfig.infomation.id,
+      common_name: this.detailConfig.infomation.name,
+      client_name: this.detailConfig.infomation.client.name,
+      contact_name: this.detailConfig.infomation.contact_name,
+      client_id: this.detailConfig.infomation.client_id,
+      contact_id: this.detailConfig.infomation.contact_id
+    }
     this.setTableForm()
   },
   mounted() {},
   methods: {
-    setData() {
+    setData(item) {
       this.basicInfoList = [
         {
           leftStr: "瀹㈡埛鍚嶇О",
-          leftValue: "",
-          rightStr: "閿�鍞満浼氱紪鍙�",
-          rightValue: ""
+          leftValue: item.client_name,
+          rightStr: "鎶ヤ环缂栧彿",
+          rightValue: item.number
         },
         {
-          leftStr: "鏈轰細鍚嶇О",
-          leftValue: "",
+          leftStr: "鎶ヤ环鍗曠姸鎬�",
+          leftValue: item.quotation_status.name,
           rightStr: "鑱旂郴浜哄鍚�",
-          rightValue: ""
+          rightValue: item.contact_name
         },
         {
-          leftStr: "鍟嗘満鏉ユ簮",
-          leftValue: "",
-          rightStr: "鍟嗘満绫诲瀷",
-          rightValue: ""
-        },
-        {
-          leftStr: "閿�鍞樁娈�",
-          leftValue: "",
+          leftStr: "鏈夋晥鏈熻嚦",
+          leftValue: item.validity_date,
           rightStr: "閿�鍞礋璐d汉",
-          rightValue: ""
+          rightValue: item.member.username
         },
         {
-          leftStr: "鑰佸鎴疯惀閿�",
-          leftValue: "",
-          rightStr: "绛惧埌",
-          rightValue: ""
-        },
-        {
-          leftStr: "瀹℃壒鐘舵��",
-          leftValue: "",
-          rightStr: "绔炰簤瀵规墜",
-          rightValue: ""
-        },
-        {
-          leftStr: "鍒涘缓浜�",
-          leftValue: "",
+          leftStr: "閿�鍞満浼�",
+          leftValue: item.sale_chance.name,
           rightStr: "鍒涘缓鏃堕棿",
           rightValue: ""
-        }
-      ]
-      this.forecastList = [
-        {
-          leftStr: "鍙兘鎬�(%)",
-          leftValue: "",
-          rightStr: "甯佺",
-          rightValue: ""
-        },
-        {
-          leftStr: "棰勭畻缁濆鍊�",
-          leftValue: "",
-          rightStr: "棰勮鎴愪氦鏃ユ湡",
-          rightValue: ""
-        },
-        {
-          leftStr: "棰勮鍚堝悓閲戦",
-          leftValue: "",
-          rightStr: "褰撳墠鐘舵��",
-          rightValue: ""
-        }
-      ]
-      this.dynamicInfoList = [
-        {
-          leftStr: "鏈仈绯诲ぉ鏁�",
-          leftValue: "",
-          rightStr: "鏈�鏂拌仈绯绘棩鏈�",
-          rightValue: ""
-        },
-        {
-          leftStr: "鏈帹鑽愬ぉ鏁�",
-          leftValue: "",
-          rightStr: "鏈�鏂版帹杩涙椂闂�",
-          rightValue: ""
-        },
-        {
-          leftStr: "鏈�鏂拌仈绯讳汉",
-          leftValue: "",
-          rightStr: "鏈�鏂版洿鏂版椂闂�",
-          rightValue: ""
-        }
-      ]
-      this.businessInfoList = [
-        {
-          leftStr: "瀹㈡埛闇�姹傛垨鐥涚偣锛坵hy锛�",
-          leftValue: ""
-        },
-        {
-          leftStr: "鏄惁宸茬粡绔嬮」锛坧lan锛�",
-          leftValue: ""
-        },
-        {
-          leftStr: "璧勯噾棰勭畻鏄灏戯紙plan锛�",
-          leftValue: ""
-        },
-        {
-          leftStr: "鍏抽敭鍐崇瓥浜烘槸璋侊紙who锛�",
-          leftValue: ""
-        },
-        {
-          leftStr: "鍏抽敭鍐崇瓥鍥犵礌鏈夊摢浜涳紙what锛�",
-          leftValue: ""
-        },
-        {
-          leftStr: "鍐崇瓥娴佺▼鏄�庢牱鐨勶紙what锛�",
-          leftValue: ""
-        },
-        {
-          leftStr: "绔炰簤瀵规墜鎻愪緵鐨勬柟妗堬紙what锛�",
-          leftValue: ""
-        }
-      ]
-      this.swotInfoList = [
-        {
-          leftStr: "浼樺娍(S)",
-          leftValue: "",
-          rightStr: "鍔e娍(W)",
-          rightValue: ""
-        },
-        {
-          leftStr: "鏈轰細(O)",
-          leftValue: "",
-          rightStr: "濞佽儊(T)",
-          rightValue: ""
-        }
-      ]
-      this.addressInfoList = [
-        {
-          leftStr: "鍥藉",
-          leftValue: "",
-          rightStr: "鐪佷唤",
-          rightValue: ""
-        },
-        {
-          leftStr: "鍩庡競",
-          leftValue: "",
-          rightStr: "鍖哄煙",
-          rightValue: ""
-        },
-        {
-          leftStr: "璇︾粏鍦板潃",
-          leftValue: "",
-          rightStr: "",
-          rightValue: ""
-        }
-      ]
-      this.historyList = [
-        {
-          date: "2023-08-04 13:22:36",
-          stage: "鎴愬姛缁撴",
-          modify: "绯荤粺绠$悊鍛�"
-        },
-        {
-          date: "2023-08-04 13:22:36",
-          stage: "鎴愬姛缁撴",
-          modify: "绯荤粺绠$悊鍛�"
         }
       ]
     },
@@ -370,33 +249,13 @@
     },
     setTableForm() {
       this.productTableList = {
-        tableData: [
-          {
-            id: "1",
-            productName: "涓婃捣鏈夐檺鍏徃",
-            other0: "ZDYBD03-1",
-            other1: "12",
-            other2: "5.00",
-            other4: "3.00",
-            other3: "2.00"
-          }
-        ],
+        tableData: this.detailConfig.infomation.products,
         tableColumn: [
-          { label: "#", prop: "id", width: 40 },
-          { label: "鍚◣鍗曚环", prop: "other9", input: true },
-          { label: "浜у搧鍚嶇О", prop: "productName", input: true, isRequird: true },
-          { label: "浜у搧缂栧彿", prop: "other0" },
-          { label: "鏁伴噺", prop: "other1", input: true, isRequird: true },
-          { label: "鎶樻墸鐜�(%)", prop: "other6", input: true },
-          { label: "涓嶅惈绋庡崟浠�", prop: "other7", input: true },
-          { label: "鎶樻墸棰�", prop: "other2" },
-          { label: "绋�(閿�鍞�)", prop: "other7", input: true },
-          { label: "瀹為檯鍚◣鍗曚环", prop: "other3" },
-          { label: "涓嶅惈绋庨噾棰�", prop: "other4" },
-          { label: "浠风◣鍚堣", prop: "other3", input: true },
-          { label: "鎻忚堪", prop: "other8" },
-          { label: "婧愬崟绫诲瀷", prop: "other5" },
-          { label: "婧愬崟", prop: "other6" }
+          { label: "浜у搧鍚嶇О", prop: "name", productName: true, isRequird: true },
+          { label: "浜у搧缂栧彿", prop: "number" },
+          { label: "鏁伴噺", prop: "amount", inputNumber: true, isRequird: true },
+          { label: "閿�鍞崟浠�", prop: "price", inputFloat: true },
+          { label: "浠风◣鍚堣", prop: "total", inputFloat: true }
         ]
       }
     }
@@ -559,6 +418,7 @@
               align-items: center;
               font-size: 14px;
               font-family: PingFangSC;
+              min-height: 40px;
               // padding: 5px 0;
               .content-title {
                 width: 320px;
@@ -566,13 +426,14 @@
                 color: #555;
               }
               .content-termsConditions {
-                margin-left: 25px;
+                margin: 0px 25px 15px;
                 font-size: 13px;
                 color: #333;
-                li {
-                  margin: 5px 0;
-                  border-bottom: 0px solid #f9f9fb;
-                }
+                white-space: pre-wrap;
+                // li {
+                //   margin: 5px 0;
+                //   border-bottom: 0px solid #f9f9fb;
+                // }
               }
             }
           }

--
Gitblit v1.8.0