From 1635126d31ae7c82210d57c5b6445e1733477623 Mon Sep 17 00:00:00 2001
From: loulijun2021 <1694218219@qq.com>
Date: 星期六, 06 八月 2022 10:50:33 +0800
Subject: [PATCH] 1.添加图标

---
 src/views/zzmx/chda.vue |   51 +++++++++++++++++++++++++++++++--------------------
 1 files changed, 31 insertions(+), 20 deletions(-)

diff --git a/src/views/zzmx/chda.vue b/src/views/zzmx/chda.vue
index 92c73c2..ce61cde 100644
--- a/src/views/zzmx/chda.vue
+++ b/src/views/zzmx/chda.vue
@@ -122,14 +122,17 @@
             prop="RowNum"
             width="50"
             label="搴忓彿"
+            fixed
           />
           <el-table-column
             prop="partcode"
             label="鐗╂枡缂栫爜"
+            min-width="160"
             sortable="custom"
           />
           <el-table-column
             prop="partname"
+            min-width="160"
             label="鐗╂枡鍚嶇О"
             sortable="custom"
           />
@@ -149,6 +152,7 @@
             prop="stocktypename"
             label="瀛樿揣绫诲瀷"
             sortable="custom"
+            min-width="110"
           />
           <!--          <el-table-column-->
           <!--            prop="materialtypename"-->
@@ -159,6 +163,7 @@
             prop="stck_name"
             label="浠撳簱鍚嶇О"
             sortable="custom"
+            min-width="110"
           />
           <el-table-column
             prop="maxqty"
@@ -192,12 +197,14 @@
             <template slot-scope="{row}">
               <div class="operationClass">
                 <i v-if="row.proute_id==='Y'" class="el-icon-share" @click="routeClick(row)" />
-                <i v-if="row.proute_id==='N'" style="color: #E4E7ED" class="el-icon-share" @click="routeClick(row)" />
+                <i v-if="row.proute_id==='N'" style="color:rgb(180 ,181, 185)" class="el-icon-share" @click="routeClick(row)" />
               </div>
             </template>
           </el-table-column>
           <el-table-column
             label="鎿嶄綔"
+            fixed="right"
+            width="120"
           >
             <template slot-scope="{row}">
               <div class="operationClass">
@@ -457,7 +464,7 @@
       :visible.sync="dialogVisibleRoute"
       width="800px"
       top="15vh"
-      :fullscreen="isFullscreen"
+      :fullscreen="isIpad"
       class="dialogVisibleRoute"
       @closed="handleCloseRoute"
       @close="handleCloseRoute"
@@ -514,11 +521,11 @@
       <div style="margin-bottom: 10px">
         <i class="el-icon-s-operation" style="color:#42b983;" /> 宸ュ簭鍒楄〃
       </div>
-      <div style="height: 400px;overflow-y: scroll">
+      <div style="overflow-y: scroll">
         <el-table
           :data="projectTableData"
           border
-          height="300"
+          height="280"
           highlight-current-row
           :header-cell-style="this.$headerCellStyle"
           :cell-style="this.$cellStyle"
@@ -560,11 +567,6 @@
 
 <script>
 import Pagination from '@/components/Pagination'
-import {
-  AddUpdateOrganization,
-  DeleteOrganization
-} from '@/api/jcsz'
-import { getCookie } from '@/utils/auth'
 import { WareHouseSelect } from '@/api/wlgl'
 import {
   AddUpdateInventoryFile, DeleteInventoryFile, InventoryFileAssociationRoute,
@@ -576,7 +578,7 @@
   UomSearch, UomSelect
 } from '@/api/zzmx'
 import $ from 'jquery'
-import { SeaveSearchErpOrder, SeaveSearchInventory, SeaveSearchInventoryClass, SeaveSearchUnit } from '@/api/ErpSyncMes'
+import { SeaveSearchInventory, SeaveSearchInventoryClass, SeaveSearchUnit } from '@/api/ErpSyncMes'
 
 const SER_HZ = /^[\u4e00-\u9fa5]+$/
 export default {
@@ -597,7 +599,7 @@
       }
     }
     return {
-      isFullscreen: false,
+      isIpad: false,
       mainHeight: 0,
       tableHeight: 0,
       form: {
@@ -642,9 +644,9 @@
         materialname: [
           { required: true, message: '璇疯緭鍏ョ墿鏂欏悕绉�', trigger: ['blur', 'change'] }
         ],
-        materialspec: [
-          { required: true, message: '璇疯緭鍏ョ墿鏂欒鏍�', trigger: ['blur', 'change'] }
-        ],
+        // materialspec: [//鐗╂枡瑙勬牸鏆傛椂鏀逛负闈炲繀濉�
+        //   { required: true, message: '璇疯緭鍏ョ墿鏂欒鏍�', trigger: ['blur', 'change'] }
+        // ],
         uomcode: [
           { required: true, message: '璇烽�夋嫨浣跨敤鍗曚綅', trigger: ['blur', 'change'] }
         ],
@@ -692,15 +694,22 @@
     }
   },
   created() {
-    this.getInventoryFileSelect()
-    this.getStockTypeSelect()
-    this.getWareHouseSelect()
+    this.handleRequest()
   },
   mounted() {
     window.addEventListener('resize', this.getHeight)
     this.getHeight()
   },
   methods: {
+    handleRequest() {
+      this.getInventoryFileSelect().then(res => {
+        if (res.code === '200') {
+          this.getStockTypeSelect()
+          this.getWareHouseSelect()
+        }
+      })
+    },
+
     // 鍚屾璁¢噺鍗曚綅
     async syncSeaveSearchUnit() {
       const loading = this.$loading({
@@ -776,6 +785,7 @@
       const res = await InventoryFileSelect(this.form)
       this.tableData = res.data
       this.total = res.count
+      return { code: res.code }
     },
     async getStockTypeSelect() {
       const { data: res } = await StockTypeSelect()
@@ -856,6 +866,7 @@
         this.dialogForm.minstockqty = row.maxqty
         this.dialogForm.maxstockqty = row.minqty
       })
+      await this.getuomSelect()
     },
     // 鍒犻櫎鎸夐挳
     async del(row) {
@@ -928,11 +939,11 @@
     getHeight() {
       this.$nextTick(() => {
         this.mainHeight = window.innerHeight - 250
-        this.tableHeight = this.mainHeight - 100
-        // this.isFullscreen = window.innerHeight < 800
-        if (window.innerHeight < 800) {
+        this.tableHeight = this.mainHeight - 50
+        if (window.innerHeight < 769) {
           this.tableHeight = this.tableHeight - 50
         }
+        this.isIpad = window.innerHeight < 769 && window.innerWidth < 1367
       })
     },
     /* 鐐瑰嚮鍏宠仈宸ヨ壓璺嚎妯″潡*/

--
Gitblit v1.9.3