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/sbgl/sbqd.vue |   50 ++++++++++++++++++++++++++++++++------------------
 1 files changed, 32 insertions(+), 18 deletions(-)

diff --git a/src/views/sbgl/sbqd.vue b/src/views/sbgl/sbqd.vue
index 5ed3550..0f01076 100644
--- a/src/views/sbgl/sbqd.vue
+++ b/src/views/sbgl/sbqd.vue
@@ -120,25 +120,30 @@
             prop="RowNum"
             width="50"
             label="搴忓彿"
+            fixed
           />
           <el-table-column
             prop="code"
             label="璁惧缂栫爜"
+            min-width="110"
             sortable="custom"
           />
           <el-table-column
             prop="name"
             label="璁惧鍚嶇О"
+            min-width="110"
             sortable="custom"
           />
           <el-table-column
             prop="eqptype_name"
             label="璁惧绫诲瀷"
+            min-width="110"
             sortable="custom"
           />
           <el-table-column
             prop="eqpgroup_name"
             label="璁惧缁�"
+            min-width="110"
             sortable="custom"
           />
           <el-table-column
@@ -166,6 +171,7 @@
             prop="wksp_name"
             label="鐢熶骇杞﹂棿"
             sortable="custom"
+            min-width="120"
           />
           <!--          <el-table-column-->
           <!--            prop="Line_name"-->
@@ -190,11 +196,13 @@
           />
           <el-table-column
             prop="lm_date"
+            width="160"
             label="鍒涘缓鏃堕棿"
             sortable="custom"
           />
           <el-table-column
             label="鎿嶄綔"
+            fixed="right"
             width="100"
           >
             <template slot-scope="{row}">
@@ -331,7 +339,7 @@
           </el-select>
         </el-form-item>
         <el-form-item label="绋煎姩鐜�" prop="ratio">
-          <el-input v-model="dialogForm.ratio" style="width: 195px" />
+          <el-input v-model="dialogForm.ratio" style="width: 175px" />
           <span style="margin-left: 10px">%</span>
         </el-form-item>
 
@@ -547,7 +555,6 @@
 
 <script>
 import Pagination from '@/components/Pagination'
-import { getCookie } from '@/utils/auth'
 import {
   AddUpdateDeviceGroup, AddUpdateDeviceManger,
   AddUpdateDeviceType, DeleteDeviceManger, DeleteDeviceType,
@@ -609,10 +616,10 @@
         devicename: '',
         devicetypecode: '',
         devicegroupcode: '',
-        importdate: '',
+        importdate: handleDatetime(new Date()),
         workshopcode: '',
         linecode: '',
-        status: '',
+        status: 'Y',
         ratio: ''
       },
       DeviceGroupDialogArr: [], // 璁惧缁勬暟缁�
@@ -665,23 +672,30 @@
     }
   },
   created() {
-    // 鑾峰彇璁惧娓呭崟鍒楄〃
-    this.getDeviceMangerSearch()
-    // 鑾峰彇璁惧绫诲瀷涓嬫媺
-    this.getDeviceTypeSelect()
-    // 鑾峰彇鎵�灞炶溅闂翠笅鎷�
-    this.getWorkShopSelect()
+    this.handleRequest()
   },
   mounted() {
     window.addEventListener('resize', this.getHeight)
     this.getHeight()
   },
   methods: {
+    handleRequest() {
+      // 鑾峰彇璁惧娓呭崟鍒楄〃
+      this.getDeviceMangerSearch().then(res => {
+        if (res.code === '200') {
+          // 鑾峰彇璁惧绫诲瀷涓嬫媺
+          this.getDeviceTypeSelect()
+          // 鑾峰彇鎵�灞炶溅闂翠笅鎷�
+          this.getWorkShopSelect()
+        }
+      })
+    },
     // 鑾峰彇璁惧娓呭崟鍒楄〃
     async getDeviceMangerSearch() {
       const res = await DeviceMangerSearch(this.form)
       this.tableData = res.data
       this.total = res.count
+      return { code: res.code }
     },
     // 鑾峰彇鎵�灞炶溅闂翠笅鎷�
     async getWorkShopSelect() {
@@ -781,10 +795,10 @@
       this.dialogForm.devicename = ''
       this.dialogForm.devicetypecode = ''
       this.dialogForm.devicegroupcode = ''
-      this.dialogForm.importdate = ''
+      this.dialogForm.importdate = handleDatetime(new Date())
       this.dialogForm.workshopcode = ''
       // this.dialogForm.linecode = ''
-      this.dialogForm.status = ''
+      this.dialogForm.status = 'Y'
       this.dialogForm.ratio = ''
       this.$refs.dialogForm.clearValidate()
     },
@@ -912,9 +926,9 @@
       if (row.name.trim().length < 1) {
         return this.$message.info('绫诲瀷鍚嶇О涓嶈兘涓虹┖锛�')
       }
-      if (row.remark.trim().length < 1) {
-        return this.$message.info('绫诲瀷鎻忚堪涓嶈兘涓虹┖锛�')
-      }
+      // if (row.remark.trim().length < 1) {
+      //   return this.$message.info('绫诲瀷鎻忚堪涓嶈兘涓虹┖锛�')
+      // }
       const data = {
         'code': row.code,
         'name': row.name,
@@ -1026,9 +1040,9 @@
       if (row.eqptype_code.trim().length < 1) {
         return this.$message.info('鎵�灞炶澶囩被鍨嬩笉鑳戒负绌猴紒')
       }
-      if (row.remark.trim().length < 1) {
-        return this.$message.info('鍒嗙粍鎻忚堪涓嶈兘涓虹┖锛�')
-      }
+      // if (row.remark.trim().length < 1) {
+      //   return this.$message.info('鍒嗙粍鎻忚堪涓嶈兘涓虹┖锛�')
+      // }
       const data = {
         'code': row.code,
         'name': row.name,

--
Gitblit v1.9.3