From 6c98ce3e2b28c1dcc73e79308dd1106637faff93 Mon Sep 17 00:00:00 2001
From: zuozhengqing <a13193816592@163.com>
Date: 星期四, 12 十月 2023 20:50:14 +0800
Subject: [PATCH] 服务合同-接口参数调整

---
 src/views/sales/salesDetails/DetailSpecification.vue |  144 +++++++++++++++++++++++-------------------------
 1 files changed, 69 insertions(+), 75 deletions(-)

diff --git a/src/views/sales/salesDetails/DetailSpecification.vue b/src/views/sales/salesDetails/DetailSpecification.vue
index 1ed67b2..4deabf7 100644
--- a/src/views/sales/salesDetails/DetailSpecification.vue
+++ b/src/views/sales/salesDetails/DetailSpecification.vue
@@ -19,19 +19,19 @@
             <li v-for="(item, i) in topList" :key="i">
               <div class="left1">
                 <div class="content-title">{{ item.left1Str + "锛�" }}</div>
-                <div class="content-data">{{ item.left1Value }}</div>
+                <div class="content-data">{{ item.left1Value ? item.left1Value : "--" }}</div>
               </div>
               <div class="left2">
                 <div class="content-title">{{ item.left2Str + "锛�" }}</div>
-                <div class="content-data">{{ item.left2Value }}</div>
+                <div class="content-data">{{ item.left2Value ? item.left2Value : "--" }}</div>
               </div>
               <div class="right1">
                 <div class="content-title">{{ item.right1Str + "锛�" }}</div>
-                <div class="content-data">{{ item.right1Value }}</div>
+                <div class="content-data">{{ item.right1Value ? item.right1Value : "--" }}</div>
               </div>
               <div class="right2">
                 <div class="content-title">{{ item.right2Str + "锛�" }}</div>
-                <div class="content-data">{{ item.right2Value }}</div>
+                <div class="content-data">{{ item.right2Value ? item.right2Value : "--" }}</div>
               </div>
             </li>
           </ul>
@@ -64,11 +64,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>
@@ -86,11 +86,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>
@@ -108,11 +108,11 @@
                 <li v-for="(item, i) in deliveryInfoList" :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>
@@ -129,9 +129,10 @@
               <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>
@@ -190,22 +191,22 @@
           </div>
         </div>
         <div v-if="activeName === 'collection'" class="second">
-          <!-- <FollowupRecords :isDetail="true" /> -->
+          <CollectionPlan :isDetail="true" :add-config="addConfig" :source-type="1" />
         </div>
         <div v-if="activeName === 'receipt'" class="second">
-          <!-- <FollowupRecords :isDetail="true" /> -->
+          <Receipt :isDetail="true" :add-config="addConfig" :source-type="1" />
         </div>
         <div v-if="activeName === 'invoice'" class="second">
-          <!-- <FollowupRecords :isDetail="true" /> -->
+          <SaleInvoice :isDetail="true" :add-config="addConfig" :source-type="1" />
         </div>
         <div v-if="activeName === 'return'" class="second">
-          <SalesReturn :isDetail="true" />
+          <SalesReturn :isDetail="true" :add-config="addConfig" />
         </div>
         <div v-if="activeName === 'serviceContract'" class="second">
-          <ServiceContract :isDetail="true" />
+          <ServiceContract :isDetail="true" :add-config="addConfig" />
         </div>
         <div v-if="activeName === 'refundForm'" class="second">
-          <RefundForm :isDetail="true" />
+          <RefundForm :isDetail="true" :add-config="addConfig" />
         </div>
       </div>
     </el-drawer>
@@ -218,6 +219,9 @@
 import RefundForm from "@/views/sales/refundForm"
 import Status from "@/common/const/salesFixedStatus"
 import CommonFormTableView from "@/components/makepager/CommonFormTableView"
+import CollectionPlan from "@/views/other/payment/collectionPlan"
+import Receipt from "@/views/other/payment/receipt"
+import SaleInvoice from "@/views/other/payment/saleInvoice"
 export default {
   name: "DetailSpecification",
   props: {
@@ -231,7 +235,7 @@
       }
     }
   },
-  components: { SalesReturn, ServiceContract, RefundForm, CommonFormTableView },
+  components: { SalesReturn, ServiceContract, RefundForm, CommonFormTableView, CollectionPlan, Receipt, SaleInvoice },
   computed: {},
   data() {
     return {
@@ -253,25 +257,38 @@
       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: "sale_detail_name",
+      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,
+      amountTotal: this.detailConfig.infomation.amountTotal
+    }
     this.setTableForm()
   },
   mounted() {},
   methods: {
-    setData() {
+    setData(item) {
       this.topList = [
         {
           left1Str: "瀹㈡埛鍚嶇О",
-          left1Value: "",
+          left1Value: item.client.name,
           left2Str: "鍚堣",
-          left2Value: "",
+          left2Value: item.amountTotal,
           right1Str: "宸叉敹閲戦",
           right1Value: "0.00",
           right2Str: "宸插紑绁ㄩ噾棰�",
@@ -281,7 +298,7 @@
           left1Str: "绛剧害鏃ユ湡",
           left1Value: "",
           left2Str: "閿�鍞礋璐d汉",
-          left2Value: "",
+          left2Value: item.Member.username,
           right1Str: "搴旀敹閲戦",
           right1Value: "0.00",
           right2Str: "鏈紑绁ㄩ噾棰�",
@@ -291,25 +308,25 @@
       this.basicInfoList = [
         {
           leftStr: "瀹㈡埛鍚嶇О",
-          leftValue: "",
+          leftValue: item.client.name,
           rightStr: "璁㈠崟缂栧彿",
-          rightValue: ""
+          rightValue: item.number
         },
         {
           leftStr: "閿�鍞満浼�",
-          leftValue: "",
+          leftValue: item.saleChance.name,
           rightStr: "閫夋嫨婧愬崟",
           rightValue: ""
         },
         {
           leftStr: "绛剧害鏃ユ湡",
-          leftValue: "",
+          leftValue: item.signTime,
           rightStr: "閿�鍞礋璐d汉",
-          rightValue: ""
+          rightValue: item.Member.username
         },
         {
           leftStr: "浜や粯鏃ユ湡",
-          leftValue: "",
+          leftValue: item.deliveryDate,
           rightStr: "璁㈠崟鏉ユ簮",
           rightValue: ""
         },
@@ -323,19 +340,19 @@
           leftStr: "鍒涘缓浜�",
           leftValue: "",
           rightStr: "鍒涘缓鏃堕棿",
-          rightValue: ""
+          rightValue: item.createTime
         }
       ]
       this.deliveryInfoList = [
         {
           leftStr: "鏀惰揣浜�",
-          leftValue: "",
+          leftValue: item.addressee,
           rightStr: "鏀惰揣鑱旂郴鏂瑰紡",
-          rightValue: ""
+          rightValue: item.phone
         },
         {
           leftStr: "鏀惰揣鍦板潃",
-          leftValue: "",
+          leftValue: item.address,
           rightStr: "",
           rightValue: ""
         }
@@ -343,7 +360,7 @@
       this.dynamicInfoList = [
         {
           leftStr: "淇敼鏃堕棿",
-          leftValue: "",
+          leftValue: item.updateTime,
           rightStr: "鍑哄簱鐘舵��",
           rightValue: ""
         },
@@ -395,33 +412,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 }
         ]
       }
     }
@@ -611,13 +608,10 @@
                 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;
               }
             }
           }

--
Gitblit v1.8.0