From 3bd59622961f569ac181a0f17aeffd44858efa4f Mon Sep 17 00:00:00 2001
From: haoxuan <haoxuan>
Date: 星期日, 28 四月 2024 17:19:13 +0800
Subject: [PATCH]  价税合计和数量,采购单价 3者之间计算管理的逻辑处理

---
 src/views/supplierManage/supplier/DetailSupplier.vue |   59 ++++++++++++++++++++++++++++++++++++++++-------------------
 1 files changed, 40 insertions(+), 19 deletions(-)

diff --git a/src/views/supplierManage/supplier/DetailSupplier.vue b/src/views/supplierManage/supplier/DetailSupplier.vue
index c2765a1..9029af4 100644
--- a/src/views/supplierManage/supplier/DetailSupplier.vue
+++ b/src/views/supplierManage/supplier/DetailSupplier.vue
@@ -65,9 +65,9 @@
               </ul>
               <div class="business_scope">
                 <div class="content-title">{{ "鍚堝悓闄勪欢" }}</div>
-                <div class="content-data">
-                  {{ detailConfig.infomation.contract.fileName ? detailConfig.infomation.contract.fileName : "--" }}
-                </div>
+                  <div class="content-data downFlie" @click="downLoadFiles">
+                    {{ detailConfig.infomation.contract.fileName ? detailConfig.infomation.contract.fileName : "--" }}
+                  </div>
               </div>
             </div>
           </div>
@@ -76,12 +76,8 @@
           <!-- 閲囪喘璁㈠崟-鍩烘湰淇℃伅 -->
           <!-- 浜у搧淇℃伅 -->
           <div class="basic-info">
-            <div class="basic-info-label" @click="expandClick('basic')">
-              <i v-if="isBasicExpand" 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="isBasicExpand" class="basic-info-content">
+            <div class="basic-info-content" >
+              <el-button type="primary" size="mini" @click="toPurchaseBtn"><i class="el-icon-plus"></i>   鏂板缓</el-button>
               <TableCommonView
                 style="margin-top: 2px"
                 class="content-table"
@@ -99,6 +95,7 @@
 </template>
 
 <script>
+import download from "downloadjs"
 export default {
   name: "DetailSupplier",
   props: {
@@ -128,21 +125,21 @@
       noContactDays: 0,
       newContactDays: "",
       tableList:{},
-      showCol: ['浜у搧鍚嶇О', '浜у搧缂栫爜', '璁¢噺鍗曚綅', '瑙勬牸鍨嬪彿', '鏁伴噺', '閿�鍞崟浠�','浠风◣鍚堣','鎻忚堪'],
+      showCol: ['閲囪喘鍗曞彿', '閲囪喘鍗曞悕绉�', '鍗曟嵁绫诲瀷', '渚涘簲鍟嗗悕绉�', '閲囪喘鏁伴噺', '鏀惰揣浠撳簱','缁忓姙浜�','鍒跺崟浜�'],
       tableColumn: [
-        { label: "浜у搧鍚嶇О", prop: "name", min: 160,  },
-        { label: "浜у搧缂栫爜", prop: "number", min: 130, },
-        { label: "璁¢噺鍗曚綅", prop: "unit", min: 130 },
-        { label: "瑙勬牸鍨嬪彿", prop: "specifications", min: 130 },
-        { label: "鏁伴噺", prop: "amount", min: 130 },
-        { label: "閿�鍞崟浠�", prop: "price", min: 130 },
-        { label: "浠风◣鍚堣", prop: "total", min: 130 },
-        { label: "鎻忚堪", prop: "remark", min: 130 },
+        { label: "鍗曟嵁绫诲瀷", prop: "orderType", min: 130 },
+        { label: "閲囪喘鍗曞彿", prop: "number", min: 150,default:true},
+        { label: "閲囪喘鍗曞悕绉�", prop: "name", min: 130 },
+        { label: "渚涘簲鍟嗗悕绉�", prop: "supplierName", min: 130 },
+        { label: "閲囪喘鏁伴噺", prop: "quantity", min: 130 },
+        { label: "鏀惰揣浠撳簱", prop: "warehouse", min: 130 },
+        { label: "缁忓姙浜�", prop: "handledBy", min: 130 },
+        { label: "鍒跺崟浜�", prop: "creator", min: 130 }
       ],
     }
   },
   created() {
-    console.log(this.detailConfig,"鎶藉眽缁勪欢")
+    console.log(this.commonDetail,"鎶藉眽缁勪欢props")
     this.setData(this.detailConfig.infomation)
     this.addConfig = {
       id_name: "sales_leads_id",
@@ -246,6 +243,9 @@
           rightValue: ""
         }
       ]
+      this.detailConfig.productListInfo.map((item)=>{
+        item.supplierName=item.supplier.name
+      })
       this.tableList = {
         tableInfomation: this.detailConfig.productListInfo?this.detailConfig.productListInfo:[],
         selectIndex: true,
@@ -295,6 +295,22 @@
       // console.log(totalDays)
 
       return totalDays // 鐩稿樊鐨勫ぉ鏁�
+    },
+    toPurchaseBtn(){
+      this.$router.push({  
+        name: 'purchase', 
+        params: {
+          supplierId:this.commonDetail.infomation.ID,
+          supplierName:this.commonDetail.infomation.name
+        }
+      });
+    },
+    // 涓嬭浇鍚堝悓闄勪欢
+    downLoadFiles(){
+      if(this.detailConfig.infomation.contract.fileName){
+        let url = "/api-srm/downloadContract?id=" + this.commonDetail.infomation.fileId
+        download(url, "", "")
+      }
     }
   }
 }
@@ -347,6 +363,7 @@
           font-size: 14px;
         }
         .basic-info-content {
+          margin-top: 10px;
           background: #fff;
           ul {
             padding-inline-start: 0;
@@ -429,4 +446,8 @@
     margin: 0;
   }
 }
+  .downFlie{
+    color: blue !important;
+    cursor: pointer;
+  }
 </style>

--
Gitblit v1.8.0