From 955081f4111c7d276bb63d3ee8dacb3e07bc53be Mon Sep 17 00:00:00 2001
From: loulijun2021 <1694218219@qq.com>
Date: 星期四, 25 八月 2022 21:30:52 +0800
Subject: [PATCH] 点检标准新增功能实现

---
 src/views/scgl/scdd.vue  |   27 ++++++++++---
 src/views/scgl/sckbg.vue |   52 ++++++++++++++-----------
 src/views/sbgl/djbz.vue  |   22 +++++++----
 3 files changed, 64 insertions(+), 37 deletions(-)

diff --git a/src/views/sbgl/djbz.vue b/src/views/sbgl/djbz.vue
index c858a88..bb1d835 100644
--- a/src/views/sbgl/djbz.vue
+++ b/src/views/sbgl/djbz.vue
@@ -162,13 +162,14 @@
         </el-form>
       </div>
       <div>
-        <i class="el-icon-s-operation" style="color:#42b983;margin: -20px 10px 20px 0" />璁惧鐐规鐐规淇℃伅
+        <i class="el-icon-s-operation" style="color:#42b983;margin: -20px 10px 20px 0" />璁惧鍏宠仈鐐规椤逛俊鎭細
       </div>
       <div style="margin-bottom:10px">
         <el-button type="primary" icon="el-icon-circle-plus-outline" @click="addRow">鏂板</el-button>
       </div>
       <div class="elTableDiv">
         <el-table
+          ref="tableDataDialogRef"
           :data="tableDataDialog"
           :height="(tableHeight-300)+'px'"
           border
@@ -227,12 +228,12 @@
           </el-table-column>
 
           <el-table-column
-            prop="chkdesc"
+            prop="checkitem_descr"
             label="鐐规瑕佹眰"
           >
             <template slot-scope="{row}">
-              <div v-if="row.isVisible===0">{{ row.chkdesc }}</div>
-              <el-input v-else v-model="row.chkdesc" />
+              <div v-if="row.isVisible===0">{{ row.checkitem_descr }}</div>
+              <el-input v-else v-model="row.checkitem_descr" />
             </template>
           </el-table-column>
           <el-table-column
@@ -461,13 +462,18 @@
       this.operation = operation
       this.dialogVisible = true
       this.getDeviceCheckItemSelect()
+      this.$nextTick(() => {
+        this.$refs.tableDataDialogRef.doLayout()
+      })
     },
     // 淇敼鎸夐挳
     edit(operation, row) {
       this.operation = operation
       this.dialogVisible = true
       this.getDeviceCheckItemSelect()
-
+      this.$nextTick(() => {
+        this.$refs.tableDataDialogRef.doLayout()
+      })
       this.$nextTick(() => {
         this.dialogForm.OrgCode = row.org_code
         this.dialogForm.OrgName = row.org_name
@@ -539,7 +545,7 @@
     },
 
     selectChange(val, row) {
-      row.chkdesc = this.checkItemSelectArr.find(item => {
+      row.checkitem_descr = this.checkItemSelectArr.find(item => {
         return item.code === val || item.name === val
       }).description
 
@@ -565,7 +571,7 @@
       this.tableDataDialog.push({
         checkitem_code: '',
         checkitem_name: '',
-        chkdesc: '',
+        checkitem_descr: '',
         isscan: 'Y',
         cycle: 'D',
         isVisible: 1
@@ -583,7 +589,7 @@
           this.tableDataDialog.splice(index, 1, {
             checkitem_code: row.checkitem_code,
             checkitem_name: row.checkitem_name,
-            chkdesc: row.chkdesc,
+            checkitem_descr: row.checkitem_descr,
             isscan: row.isscan,
             cycle: row.cycle,
             isVisible: 1
diff --git a/src/views/scgl/scdd.vue b/src/views/scgl/scdd.vue
index 5cbf831..3d51997 100644
--- a/src/views/scgl/scdd.vue
+++ b/src/views/scgl/scdd.vue
@@ -236,14 +236,24 @@
             prop="planstartdate"
             label="棰勮寮�宸ユ椂闂�"
             sortable="custom"
-            width="160"
-          />
+            width="130"
+          >
+            <template slot-scope="{row}">
+              <div v-if="row.planstartdate">{{ row.planstartdate.substring(0,11) }}</div>
+              <div v-else>/</div>
+            </template>
+          </el-table-column>
           <el-table-column
             prop="planenddate"
             label="棰勮瀹屽伐鏃堕棿"
             sortable="custom"
-            width="160"
-          />
+            width="130"
+          >
+            <template slot-scope="{row}">
+              <div v-if="row.planenddate">{{ row.planenddate.substring(0,11) }}</div>
+              <div v-else>/</div>
+            </template>
+          </el-table-column>
           <el-table-column
             prop="createuser"
             label="鍒涘缓浜哄憳"
@@ -258,9 +268,14 @@
           <el-table-column
             prop="createdate"
             label="鍒涘缓鏃堕棿"
-            width="160"
+            width="130"
             sortable="custom"
-          />
+          >
+            <template slot-scope="{row}">
+              <div v-if="row.createdate">{{ row.createdate.substring(0,11) }}</div>
+              <div v-else>/</div>
+            </template>
+          </el-table-column>
           <el-table-column
             label="鎿嶄綔"
             fixed="right"
diff --git a/src/views/scgl/sckbg.vue b/src/views/scgl/sckbg.vue
index c12ae07..1da7ea2 100644
--- a/src/views/scgl/sckbg.vue
+++ b/src/views/scgl/sckbg.vue
@@ -145,18 +145,23 @@
               <el-table-column
                 prop="plan_startdate"
                 label="璁″垝寮�宸ユ棩鏈�"
-                width="185"
+                width="150"
                 sortable="custom"
-              />
+              >
+                <template slot-scope="{row}">
+                  <div v-if="row.plan_startdate">{{ row.plan_startdate.substring(0,11) }}</div>
+                  <div v-else>/</div>
+                </template>
+              </el-table-column>
               <el-table-column
                 prop="plan_enddate"
                 label="璁″垝瀹屽伐鏃ユ湡"
-                width="185"
+                width="150"
                 sortable="custom"
                 fixed="right"
               >
                 <template slot-scope="{row}">
-                  <div v-if="row.plan_startdate">{{ row.plan_startdate }}</div>
+                  <div v-if="row.plan_startdate">{{ row.plan_startdate.substring(0,11) }}</div>
                   <div v-else>/</div>
                 </template>
               </el-table-column>
@@ -339,18 +344,23 @@
               <el-table-column
                 prop="plan_startdate"
                 label="璁″垝寮�宸ユ棩鏈�"
-                width="185"
+                width="150"
                 sortable="custom"
-              />
+              >
+                <template slot-scope="{row}">
+                  <div v-if="row.plan_startdate">{{ row.plan_startdate.substring(0,11) }}</div>
+                  <div v-else>/</div>
+                </template>
+              </el-table-column>
               <el-table-column
                 prop="plan_enddate"
                 label="璁″垝瀹屽伐鏃ユ湡"
-                width="185"
+                width="150"
                 sortable="custom"
                 fixed="right"
               >
                 <template slot-scope="{row}">
-                  <div v-if="row.plan_startdate">{{ row.plan_startdate }}</div>
+                  <div v-if="row.plan_startdate">{{ row.plan_startdate.substring(0,11) }}</div>
                   <div v-else>/</div>
                 </template>
               </el-table-column>
@@ -415,26 +425,25 @@
               <el-table-column
                 prop="wo_code"
                 label="宸ュ崟鍙�"
-                width="160"
+                min-width="160"
                 sortable="custom"
               />
               <el-table-column
                 prop="partcode"
                 label="浜у搧缂栫爜"
-                width="110"
+                min-width="110"
                 sortable="custom"
               />
               <el-table-column
                 prop="partname"
-                width="160"
+                min-width="160"
                 label="浜у搧鍚嶇О"
-                show-tooltip-when-overflow
                 sortable="custom"
               />
               <el-table-column
                 prop="stepname"
                 label="宸ュ簭"
-                width="120"
+                min-width="120"
                 sortable="custom"
               />
               <el-table-column
@@ -620,6 +629,9 @@
             />
           </el-select>
         </el-form-item>
+        <!--        <el-form-item v-if="dialogTitle==='鑷埗鎶ュ伐'" label="鎶ュ伐浜哄憳锛�">-->
+        <!--          <el-input v-model="dialogForm.remarks" type="textarea" style="width: 200px;" />-->
+        <!--        </el-form-item>-->
         <el-form-item v-if="dialogTitle==='鑷埗鎶ュ伐'" label="澶囨敞锛�">
           <el-input v-model="dialogForm.remarks" type="textarea" style="width: 200px;" />
         </el-form-item>
@@ -960,7 +972,7 @@
             placeholder="璇烽�夋嫨"
           >
             <el-option
-              v-for="item in badOperationArr"
+              v-for="item in OperationArr"
               :key="item.usercode"
               :label="item.username"
               :value="item.usercode"
@@ -1284,7 +1296,7 @@
         operation: getCookie('navTabId')
       },
       badTableDataDialog: [], // 涓嶈壇瀵硅瘽妗唗able琛ㄦ牸
-      badOperationArr: [] // 缁翠慨浜哄憳鏁扮粍
+      OperationArr: [] // 浜哄憳鏁扮粍
     }
   },
   // computed: {
@@ -1952,17 +1964,11 @@
       const data = {
         Data: this.badTableDataDialog
       }
-      // console.log(JSON.stringify(data), 1)
-      // console.log(this.badDialogForm.operation, 1)
-      // this.badPrintOperator =
-      // this.badPrint(this.badOperationArr.find(item => item.usercode === this.badDialogForm.operation).username)
-      // this.dialogVisible2 = true
-
       EditOrderNgStepSeave(data, this.badDialogForm.operation).then(res => {
         if (res.code === '200' || res.code === '301') {
           this.getBadList()
           this.badDialogVisible = false
-          this.badPrint(this.badOperationArr.find(item => item.usercode === this.badDialogForm.operation).username)
+          this.badPrint(this.OperationArr.find(item => item.usercode === this.badDialogForm.operation).username)
           this.dialogVisible2 = true
           return this.$message.success('淇濆瓨鎴愬姛锛�')
         }
@@ -1991,7 +1997,7 @@
     // 鐐瑰嚮缁翠慨澶勭悊鎸夐挳  鎴�  鎵弿鏉$爜鐨勬壂鎻忓洖杞︿簨浠�
     async repairHandle(row) {
       const { data: res1 } = await MesOrderSelectUser({ usercode: '' })
-      this.badOperationArr = res1
+      this.OperationArr = res1
 
       console.log(row)
       let data

--
Gitblit v1.9.3