From 02b7655966b254a1c2b9f59006d52deb71aff3f4 Mon Sep 17 00:00:00 2001
From: yangfeng <wanwan926_4@163.com>
Date: 星期二, 14 十一月 2023 11:30:49 +0800
Subject: [PATCH] 选择供应商组件优化、列表公共组件优化、创建采购单

---
 src/views/purchaseManage/purchase/index.vue |   25 ++++++++++++++++++++++---
 1 files changed, 22 insertions(+), 3 deletions(-)

diff --git a/src/views/purchaseManage/purchase/index.vue b/src/views/purchaseManage/purchase/index.vue
index faee6f8..4a12b42 100644
--- a/src/views/purchaseManage/purchase/index.vue
+++ b/src/views/purchaseManage/purchase/index.vue
@@ -35,7 +35,7 @@
                   <el-button type="text" size="small" @click="editClick(scope.row)" style="margin-right: 5px"
                   >缂栬緫</el-button
                   >
-                  <el-button @click="submitClick(scope.row)" type="text" size="small">鎻愪氦</el-button>
+                  <el-button v-if="scope.row.status< 4" @click="submitClick(scope.row)" type="text" size="small">鎻愪氦</el-button>
                 </template>
               </el-table-column>
             </template>
@@ -63,6 +63,7 @@
 import DetailSupplier from "@/views/purchaseManage/purchase/DetailSupplier"
 import AddPurchase from "@/views/purchaseManage/purchase/components/AddPurchase"
 import { getDataByType } from "@/api/data"
+import { getSupplierList } from "@/api/supplierManage/supplier"
 export default {
   name: "SupplierManage",
   props: {},
@@ -83,7 +84,9 @@
       editConfig: {
         visible: false,
         title: "鍒涘缓",
-        infomation: {}
+        infomation: {
+          supplierList:[]
+        }
       },
       purchaseStatusList: getDataByType("purchaseStatus"),
       tableColumn: [
@@ -102,6 +105,7 @@
   created() {
     this.setTable()
     this.getData()
+    this.getSupplierData()
   },
   methods: {
     getpurchaseStatus(val) {
@@ -154,6 +158,20 @@
         .catch((err) => {
           console.log(err)
         })
+    },
+    // 鑾峰彇渚涘簲鍟嗘暟鎹�
+    async getSupplierData() {
+      await getSupplierList({
+        // [val]: content,
+        page:1,
+        pageSize: 10
+      })
+      .then((res) => {
+        if (res.data.code == 200) {
+          this.editConfig.infomation.supplierList=res.data.data.list
+          
+        }
+      })
     },
     // 鎼滅储
     onFilterSearch(searchText){
@@ -227,8 +245,9 @@
               this.$message.warning("鎻愪氦澶辫触")
             }
           })
+        },(e)=>{
+          console.error(e)
         })
-        .catch(() => {})
     },
 
     // 璇︽儏

--
Gitblit v1.8.0