From 1e9fa82cb2fe2c15f46bd1dd73f5c878c74b83b8 Mon Sep 17 00:00:00 2001
From: loulijun2021 <1694218219@qq.com>
Date: 星期四, 04 八月 2022 15:35:50 +0800
Subject: [PATCH] 1.系统多账号登录问题2.采购订单页面样式修改及数据渲染

---
 src/views/wlgl/kwdy.vue |   38 +++++++++++++++++++++++---------------
 1 files changed, 23 insertions(+), 15 deletions(-)

diff --git a/src/views/wlgl/kwdy.vue b/src/views/wlgl/kwdy.vue
index a5b7c9b..243167b 100644
--- a/src/views/wlgl/kwdy.vue
+++ b/src/views/wlgl/kwdy.vue
@@ -28,8 +28,8 @@
                 :popper-append-to-body="false"
                 style="width: 200px"
                 placeholder="璇烽�夋嫨"
-                @focus="getWareHouseSelect"
               >
+                <!--                @focus="getWareHouseSelect"-->
                 <el-option
                   v-for="item in stockArr"
                   :key="item.code"
@@ -48,7 +48,7 @@
       <el-divider />
       <div style="margin-left: 10px;display: flex">
         <el-button type="primary" icon="el-icon-circle-plus-outline" @click="add('add')">鏂板</el-button>
-        <el-button type="primary" icon="el-icon-upload2" @click="upload">瀵煎叆</el-button>
+        <!--        <el-button type="primary" icon="el-icon-upload2" @click="upload">瀵煎叆</el-button>-->
       </div>
       <el-divider />
       <div class="elTableDiv">
@@ -101,6 +101,7 @@
             prop="lm_date"
             label="鍒涘缓鏃堕棿"
             sortable="custom"
+            width="160"
           />
           <el-table-column
             label="鎿嶄綔"
@@ -150,10 +151,10 @@
             :popper-append-to-body="false"
             style="width: 200px"
             placeholder="璇烽�夋嫨"
-            @focus="getWareHouseSelect2"
           >
+            <!--            @focus="getWareHouseSelect2"-->
             <el-option
-              v-for="item in stockArr2"
+              v-for="item in stockArr"
               :key="item.code"
               :label="item.name"
               :value="item.code"
@@ -171,12 +172,13 @@
         </div>
       </span>
     </el-dialog>
+
   </div>
 </template>
 
 <script>
 import Pagination from '@/components/Pagination'
-import { AddUpdateStorageDef, DeleteStorageDef, StorageDefSearch, WareHouseDefSearch, WareHouseSelect } from '@/api/wlgl'
+import { AddUpdateStorageDef, DeleteStorageDef, StorageDefSearch, WareHouseSelect } from '@/api/wlgl'
 
 const SER_HZ = /^[\u4e00-\u9fa5]+$/
 export default {
@@ -212,7 +214,7 @@
       },
       total: 10,
       stockArr: [], // 鎵�灞炰粨搴撴暟缁�
-      stockArr2: [], // 鎵�灞炰粨搴撴暟缁勫璇濇
+      // stockArr2: [], // 鎵�灞炰粨搴撴暟缁勫璇濇
       tableData: [],
       dialogVisible: false,
       dialogForm: {
@@ -239,28 +241,36 @@
     }
   },
   created() {
-    this.getStorageDefSearch()
-    // this.getWareHouseSelect()
+    this.handleRequest()
   },
   mounted() {
     window.addEventListener('resize', this.getHeight)
     this.getHeight()
   },
   methods: {
+    handleRequest() {
+      this.getStorageDefSearch().then(res => {
+        if (res.code === '200') {
+          this.getWareHouseSelect()
+        }
+      })
+    },
+
     async getStorageDefSearch() {
       const res = await StorageDefSearch(this.form)
       this.tableData = res.data
       this.total = res.count
+      return { code: res.code }
     },
     async getWareHouseSelect() {
       const { data: res } = await WareHouseSelect()
       this.stockArr = res
     },
     // 瀵硅瘽妗嗕腑鐨�
-    async getWareHouseSelect2() {
-      const { data: res } = await WareHouseSelect()
-      this.stockArr2 = res
-    },
+    // async getWareHouseSelect2() {
+    //   const { data: res } = await WareHouseSelect()
+    //   this.stockArr2 = res
+    // },
     // 鎺掑簭鏀瑰彉鏃�
     sortChange({ column, prop, order }) {
       if (order === 'descending') {
@@ -277,9 +287,6 @@
     // 鏌ヨ
     search() {
       this.getStorageDefSearch()
-    },
-    upload() {
-
     },
     // 閲嶇疆
     reset() {
@@ -371,6 +378,7 @@
         }
       })
     }
+
   }
 }
 </script>

--
Gitblit v1.9.3