From a65112ecf7580c7d5a2ae60d05150cac34e59f5d Mon Sep 17 00:00:00 2001
From: loulijun2021 <1694218219@qq.com>
Date: 星期一, 26 九月 2022 16:30:33 +0800
Subject: [PATCH] 1.工艺路线工艺设置下拉选中之后自动回车2.工序定义检验人员选中默认当前登录人员

---
 src/views/jcsz/jsqd.vue |   37 +++++++++++++++++++------------------
 1 files changed, 19 insertions(+), 18 deletions(-)

diff --git a/src/views/jcsz/jsqd.vue b/src/views/jcsz/jsqd.vue
index a0aa5d2..bc703f2 100644
--- a/src/views/jcsz/jsqd.vue
+++ b/src/views/jcsz/jsqd.vue
@@ -47,7 +47,7 @@
               <el-input v-model="form.UserName" style="width: 200px" placeholder="璇疯緭鍏�" />
             </el-form-item>
           </div>
-          <div style="display: flex;align-items: start;margin-top: 5px;">
+          <div class="bodySearchReset">
             <el-button type="primary" icon="el-icon-search" @click="search">鏌ヨ</el-button>
             <el-button type="info" icon="el-icon-refresh" @click="reset">閲嶇疆</el-button>
           </div>
@@ -56,7 +56,9 @@
 
       <div class="elTableDiv">
         <el-table
+          ref="tableDataRef"
           :data="tableData"
+          class="tableFixed"
           border
           :row-class-name="tableRowClassName"
           :height="tableHeight+'px'"
@@ -277,7 +279,7 @@
           sortable="custom"
         >
           <template slot-scope="{row}">
-            <el-input v-if="row.isVisible===1" v-model="row.roletype_code" placeholder="璇疯緭鍏�" />
+            <el-input v-if="row.isVisible===1" v-model="row.roletype_code" oninput="value=value.replace(/[^0-9a-zA-Z]/g,'')" placeholder="璇疯緭鍏�" />
             <div v-else> {{ row.roletype_code }}</div>
           </template>
         </el-table-column>
@@ -581,26 +583,14 @@
 } from '@/api/jcsz'
 import { getCookie } from '@/utils/auth'
 import $ from 'jquery'
-import clearAllChildren from '@/utils/global'
+import clearAllChildren, { validateCode } from '@/utils/global'
 
-const SER_HZ = /^[\u4e00-\u9fa5]+$/
 export default {
   name: 'JSQD',
   components: {
     Pagination, ImportPicker
   },
   data() {
-    const validateName = (rule, value, callback) => {
-      if (!value) {
-        return callback(new Error('璇疯緭鍏ョ紪鐮�'))
-      } else {
-        if (SER_HZ.test(value)) {
-          return callback(new Error('缂栫爜涓嶈兘涓轰腑鏂�'))
-        } else {
-          callback()
-        }
-      }
-    }
     return {
       isIpad: false,
       mainHeight: 0,
@@ -637,7 +627,7 @@
       operation: '',
       dialogFormRules: {
         RoleCode: [
-          { required: true, validator: validateName, trigger: ['blur', 'change'] }
+          { required: true, validator: validateCode, trigger: ['blur', 'change'] }
         ],
         RoleName: [
           { required: true, message: '璇疯緭鍏ュ悕绉�', trigger: ['blur', 'change'] }
@@ -877,12 +867,14 @@
     // 鑾峰彇椤甸潰楂樺害
     getHeight() {
       this.$nextTick(() => {
+        this.$refs.tableDataRef.doLayout()
         this.mainHeight = window.innerHeight - 85
         this.tableHeight = this.mainHeight - 200
         if (window.innerHeight < 769) {
           this.tableHeight = this.tableHeight - 40
         }
         this.isIpad = window.innerHeight < 769 && window.innerWidth < 1367
+        this.$refs.tableDataRef.doLayout()
       })
     },
     tableRowClassName({ row, rowIndex }) {
@@ -1073,7 +1065,8 @@
       this.dialogFormRight.rightAPPArr = res[1][0].is_delete === '0' ? res[1] : []
 
       this.PCTrue = res[0][0].is_delete === '0'
-      this.APPTrue = res[1][0].is_delete === '0'
+      this.APPTrue = res[1][0].children.filter(item => item.is_delete === '0').length === 0 ? false : res[1][0].is_delete === '0'
+
       // '0'鏄剧ず  '1' 涓嶆樉绀�   杩囨护鍑虹浉瀵瑰簲鐨勮彍鍗�
       if (this.PCTrue) {
         this.dialogFormRight.rightPCArr[0].children = this.dialogFormRight.rightPCArr[0].children.filter(item => item.is_delete === '0')
@@ -1083,7 +1076,7 @@
       }
 
       if (this.APPTrue) {
-        this.dialogFormRight.rightAPPArr[0].children = this.dialogFormRight.rightAPPArr[0].children.filter(item => item.is_delete === '0' || it.is_delete === null)
+        this.dialogFormRight.rightAPPArr[0].children = this.dialogFormRight.rightAPPArr[0].children.filter(item => item.is_delete === '0' || item.is_delete === null)
         this.dialogFormRight.rightAPPArr[0].children.forEach(item => {
           item.children = item.children.filter(it => it.is_delete === '0' || it.is_delete === null)
           // item.children = item.children.filter(it => it.is_delete !== '1')
@@ -1704,6 +1697,14 @@
   margin-bottom: 0;
 }
 
+.tableFixed{
+  ::v-deep .el-table__fixed-right{
+    height: 100% !important;
+  }
+  ::v-deep .el-table__fixed{
+    height: 100% !important;
+  }
+}
 </style>
 <style>
 

--
Gitblit v1.9.3