From b46bc2dba51a3885a68e4c58316b41a31ea16bb2 Mon Sep 17 00:00:00 2001
From: loulijun2021 <1694218219@qq.com>
Date: 星期二, 14 二月 2023 13:35:03 +0800
Subject: [PATCH] 1.存货档案修改

---
 src/views/zlgl/gxjy.vue |   91 +++++++++++++++++++++++++++++++++++----------
 1 files changed, 71 insertions(+), 20 deletions(-)

diff --git a/src/views/zlgl/gxjy.vue b/src/views/zlgl/gxjy.vue
index effdc69..1d75f7f 100644
--- a/src/views/zlgl/gxjy.vue
+++ b/src/views/zlgl/gxjy.vue
@@ -3,7 +3,7 @@
     <div class="body" :style="{height:mainHeight+'px'}">
       <div style="padding-top: 10px;display: flex;flex-direction: column">
         <div style="margin-bottom: 15px;font-size: 14px">
-          <i class="el-icon-s-operation" style="color:#42b983; margin-right: 5px" />鎵爜淇℃伅
+          <i class="el-icon-s-operation" :style="{color:$store.state.settings.theme}" style="margin-right: 5px" />鎵爜淇℃伅
         </div>
         <div style="display: flex;align-items: center">
           <div style="width: 90px;display: flex">
@@ -16,37 +16,39 @@
             style="width: 300px"
             @keyup.enter.native="val=>enterNative(val,'GXproduceCode')"
           />
+          <!--          @keyup.native="e=>judgeIsScanning(e,'GXproduceCode')"-->
+
         </div>
         <!--        鍏」淇℃伅      -->
         <div v-if="!isIpad" style="background:#f8f8fa ;display:flex;margin-top: 10px;align-items: center; line-height: 50px">
           <div style="display: flex; margin-left: 10px">
             <div style="display: flex;margin-right: 50px">
               <div style="width: 90px">宸ュ崟缂栫爜锛�</div>
-              <div style="width: 200px">{{ form.wo_code }}</div>
+              <div style="width: 150px">{{ form.wo_code }}</div>
             </div>
             <div style="display: flex;">
               <div style="width: 90px">浜у搧缂栫爜锛�</div>
-              <div style="width: 100px">{{ form.partcode }}</div>
+              <div style="width: 150px">{{ form.partcode }}</div>
             </div>
           </div>
           <div style="display: flex;margin-left: 30px;">
             <div style="display: flex;margin-right: 50px">
               <div style="width: 90px">浜у搧鍚嶇О锛�</div>
-              <div style="width: 200px">{{ form.partname }}</div>
+              <div style="width: 150px">{{ form.partname }}</div>
             </div>
             <div style="display: flex;">
               <div style="width: 90px">浜у搧瑙勬牸锛�</div>
-              <div style="width: 100px">{{ form.partspec }}</div>
+              <div style="width: 150px">{{ form.partspec }}</div>
             </div>
           </div>
           <div style=" display: flex;margin-left: 30px;">
             <div style="display: flex;margin-right: 50px">
               <div style="width: 90px">宸ュ簭缂栫爜锛�</div>
-              <div style="width: 100px">{{ form.stepcode }}</div>
+              <div style="width: 150px">{{ form.stepcode }}</div>
             </div>
             <div style="display: flex;">
               <div style="width: 90px">宸ュ簭鍚嶇О锛�</div>
-              <div style="width: 100px">{{ form.stepname }}</div>
+              <div style="width: 150px">{{ form.stepname }}</div>
             </div>
           </div>
         </div>
@@ -86,7 +88,7 @@
         </div>
 
         <div style="margin: 15px 0;font-size: 14px">
-          <i class="el-icon-s-operation" style="color:#42b983; margin-right: 5px" />妫�楠屾爣鍑嗕俊鎭�
+          <i class="el-icon-s-operation" :style="{color:$store.state.settings.theme}" style="margin-right: 5px" />妫�楠屾爣鍑嗕俊鎭�
         </div>
         <div style="display: flex;align-items: center">
           <div style="width: 90px;display: flex">
@@ -161,10 +163,10 @@
         </div>
 
         <div style="margin: 15px 0;font-size: 14px">
-          <i class="el-icon-s-operation" style="color:#42b983; margin-right: 5px" />妫�楠岄」淇℃伅
+          <i class="el-icon-s-operation" :style="{color:$store.state.settings.theme}" style="margin-right: 5px" />妫�楠岄」淇℃伅
         </div>
         <div>
-          <el-button type="primary" @click="add">鏂板</el-button>
+          <el-button v-waves type="primary" @click="add">鏂板</el-button>
         </div>
         <div style="margin-top: 10px">
           <el-table
@@ -218,6 +220,7 @@
             <el-table-column
               prop="code"
               label="妫�楠屾爣鍑嗙紪鐮�"
+              show-tooltip-when-overflow
             >
               <template slot-scope="{row}">
                 <div v-if="row.isVisible===0">{{ row.code }}</div>
@@ -240,6 +243,7 @@
             <el-table-column
               prop="name"
               label="妫�楠屾爣鍑嗗悕绉�"
+              show-tooltip-when-overflow
             >
               <template slot-scope="{row}">
                 <div v-if="row.isVisible===0">{{ row.name }}</div>
@@ -263,6 +267,7 @@
             <el-table-column
               prop="stepcheckitem_desc"
               label="妫�楠屾爣鍑嗘弿杩�"
+              show-tooltip-when-overflow
             >
               <template slot-scope="scope">
                 <el-input
@@ -283,6 +288,7 @@
               prop="result"
               label="妫�楠岀粨鏋�"
               width="100"
+              show-tooltip-when-overflow
             >
               <template slot-scope="{row}">
                 <div v-if="row.result==='OK'">鍚堟牸</div>
@@ -323,9 +329,9 @@
             >
               <template slot-scope="{row}">
                 <div class="operationClass">
-                  <el-button v-if="row.isVisible===0" type="text" @click="del(row)">鍒犻櫎</el-button>
-                  <el-button v-if="row.isVisible===1" type="text" @click="confirm(row)">纭</el-button>
-                  <el-button v-if="row.isVisible===1" type="text" @click="cancel(row)">鍙栨秷</el-button>
+                  <el-button v-if="row.isVisible===0" v-waves type="text" @click="del(row)">鍒犻櫎</el-button>
+                  <el-button v-if="row.isVisible===1" v-waves type="text" @click="confirm(row)">纭</el-button>
+                  <el-button v-if="row.isVisible===1" v-waves type="text" @click="cancel(row)">鍙栨秷</el-button>
                 </div>
               </template>
             </el-table-column>
@@ -333,10 +339,10 @@
         </div>
 
         <div style="display: flex;margin: 30px 0;align-items: center">
-          <el-button type="primary" @click="submitButton('FirstCheck')">棣栨淇濆瓨</el-button>
-          <el-button type="primary" style="margin-left: 50px" @click="submitButton('PatroCheck')">宸℃淇濆瓨</el-button>
-          <el-button type="primary" style="margin-left: 50px" @click="submitButton('EndCheck')">瀹屽伐妫�淇濆瓨</el-button>
-          <el-button type="info" style="margin-left: 50px" @click="submitButton('Cancel')">鍙栨秷</el-button>
+          <el-button v-waves type="primary" @click="submitButton('FirstCheck')">棣栨淇濆瓨</el-button>
+          <el-button v-waves type="primary" style="margin-left: 50px" @click="submitButton('PatroCheck')">宸℃淇濆瓨</el-button>
+          <el-button v-waves type="primary" style="margin-left: 50px" @click="submitButton('EndCheck')">瀹屽伐妫�淇濆瓨</el-button>
+          <el-button v-waves type="info" style="margin-left: 50px" @click="submitButton('Cancel')">鍙栨秷</el-button>
         </div>
       </div>
     </div>
@@ -356,12 +362,15 @@
   StepCheckItemSelect
 } from '@/api/zlgl'
 import { MesOrderSelectUser } from '@/api/scgl'
+import { getCookie } from '@/utils/auth'
+import waves from '@/directive/waves'
 
 export default {
   name: 'QXDY',
   // components: {
   //   Pagination
   // },
+  directives: { waves },
   data() {
     return {
       isIpad: false,
@@ -379,7 +388,7 @@
       },
       checkStandard: '', // 妫�楠屾爣鍑�
       checkStandardSelect: [], // 妫�楠屾爣鍑嗕笅鎷夋暟缁�
-      checkUser: '', // 妫�楠屼汉鍛�
+      checkUser: getCookie('navTabId'), // 妫�楠屼汉鍛�
       checkqty: 0, // 妫�楠屾暟閲�
       checkUserSelect: [], // 妫�楠屼汉鍛樹笅鎷夋暟缁�
       checkResult: '', // 妫�楠岀粨鏋�
@@ -396,7 +405,8 @@
       multipleSelection: [], // 琛ㄦ牸澶氶�夋
       tabClickIndex: null, // 鐐瑰嚮鐨勫崟鍏冩牸
       tabClickLabel: '', // 褰撳墠鐐瑰嚮鐨勫垪鍚�
-      isCancel: false// 鏄惁鐐瑰嚮鍙栨秷鎸夐挳
+      isCancel: false, // 鏄惁鐐瑰嚮鍙栨秷鎸夐挳
+      judgeIsScanningArr: []// 鍒ゆ柇鏄惁鎵爜鏁扮粍
     }
   },
   created() {
@@ -499,6 +509,42 @@
       row.name = res.name
       row.stepcheckitem_desc = res.descr
     },
+    // 闃叉姈      //鎵爜鐢ㄧ殑鏄槻鎶�
+    fnThrottle(method, delay, duration, belong) {
+      var that = this
+      var timer = this.timer
+      var begin = new Date().getTime()
+      return function() {
+        var current = new Date().getTime()
+        clearTimeout(timer)
+        if (current - begin >= duration) {
+          // method()
+          // that.VALUE()
+          begin = current
+        } else {
+          that.timer = setTimeout(function() {
+            // method()
+            that.enterNative(that.form.orderstepqrcode, belong)
+          }, delay)
+        }
+      }
+    },
+    // 鍒ゆ柇鏄惁鏄壂鐮佹灙鎵爜
+    judgeIsScanning(e, belong) {
+      const timenow = e.timeStamp
+      let flag = true
+      this.judgeIsScanningArr.push(timenow)
+      let i
+      for (i in this.judgeIsScanningArr) {
+        flag = Math.ceil(this.judgeIsScanningArr[this.judgeIsScanningArr.length - 1]) - Math.ceil(this.judgeIsScanningArr[this.judgeIsScanningArr.length - 2]) < 0.1
+        if (i > 0 && this.judgeIsScanningArr.length === parseInt(i) + 1) {
+          if (flag) {
+            this.fnThrottle(this.enterNative, 500, 2000, belong)()
+            return
+          }
+        }
+      }
+    },
     // 鎵爜閿洏鍥炶溅浜嬩欢
     async enterNative(val, belong) {
       if (belong === 'GXproduceCode') {
@@ -599,6 +645,9 @@
         if (this.form.orderstepqrcode.length < 1) {
           return this.$message.info('鎵弿鏉$爜涓嶈兘涓虹┖锛�')
         }
+        if (this.form.wo_code.toString().length === 0) {
+          return this.$message.info('鏈幏寰楀伐鍗曠紪鐮侊紒')
+        }
         if (this.checkStandard.length < 1) {
           return this.$message.info('妫�楠屾爣鍑嗕笉鑳戒负绌猴紒')
         }
@@ -666,7 +715,7 @@
       this.JYTableData = []
       this.multipleSelection = []
       this.checkdescr = ''
-      this.checkUser = ''
+      this.checkUser = getCookie('navTabId')
       this.checkqty = 0
       this.checkResult = ''
       this.checkStandard = ''
@@ -678,6 +727,8 @@
       this.form.stepcode = ''
       this.form.stepname = ''
 
+      this.judgeIsScanningArr = []
+
       this.isCancel = true
     },
 

--
Gitblit v1.9.3