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/gxjyjl.vue |  142 ++++++++++++++++++++++++++++++++---------------
 1 files changed, 96 insertions(+), 46 deletions(-)

diff --git a/src/views/zlgl/gxjyjl.vue b/src/views/zlgl/gxjyjl.vue
index 647f9bc..920b5b3 100644
--- a/src/views/zlgl/gxjyjl.vue
+++ b/src/views/zlgl/gxjyjl.vue
@@ -2,18 +2,18 @@
   <div>
     <div class="body" :style="{height:mainHeight+'px'}">
       <div class="bodyTopButtonGroup">
-        <el-button type="primary" icon="el-icon-download" @click="download">瀵煎嚭</el-button>
-        <!--        <el-button type="primary" icon="el-icon-circle-plus-outline" @click="add('add')">鏂板</el-button>-->
-        <!--        <el-button icon="el-icon-download" @click="upload">瀵煎叆</el-button>-->
+        <el-button v-waves type="primary" icon="el-icon-download" @click="download">瀵煎嚭</el-button>
+        <!--        <el-button v-waves type="primary" icon="el-icon-circle-plus-outline" @click="add('add')">鏂板</el-button>-->
+        <!--        <el-button v-waves icon="el-icon-download" @click="upload">瀵煎叆</el-button>-->
       </div>
 
       <div class="bodyTopFormGroup">
         <el-form
           ref="form"
           :model="form"
-          label-width="80px"
+          label-width="100px"
           inline
-          style="display: flex;justify-content: space-between"
+          style="display: flex;"
         >
           <div class="elForm">
             <el-form-item label="宸ュ崟缂栧彿" style=" display: flex;">
@@ -28,13 +28,13 @@
             <el-form-item label="瑙勬牸鍨嬪彿" style=" display: flex;">
               <el-input v-model="form.partapec" placeholder="璇疯緭鍏�" style="width: 200px" />
             </el-form-item>
-            <el-form-item label="宸ュ簭鍚嶇О" style=" display: flex;">
+            <el-form-item v-show="isExpandForm" label="宸ュ簭鍚嶇О" style=" display: flex;">
               <el-input v-model="form.stepname" placeholder="璇疯緭鍏�" style="width: 200px" />
             </el-form-item>
-            <el-form-item label="鏍囧噯鍚嶇О" style=" display: flex;">
+            <el-form-item v-show="isExpandForm" label="鏍囧噯鍚嶇О" style=" display: flex;">
               <el-input v-model="form.standname" placeholder="璇疯緭鍏�" style="width: 200px" />
             </el-form-item>
-            <el-form-item label="妫�楠岀被鍨�" style=" display: flex;">
+            <el-form-item v-show="isExpandForm" label="妫�楠岀被鍨�" style=" display: flex;">
               <el-select v-model="form.checktype" style="width: 200px" placeholder="璇烽�夋嫨">
                 <el-option
                   v-for="item in checktypeArr"
@@ -44,7 +44,7 @@
                 />
               </el-select>
             </el-form-item>
-            <el-form-item label="妫�楠岀粨鏋�" style=" display: flex;">
+            <el-form-item v-show="isExpandForm" label="妫�楠岀粨鏋�" style=" display: flex;">
               <el-select v-model="form.checkresult	" style="width: 200px" placeholder="璇烽�夋嫨">
                 <el-option
                   v-for="item in checkresultArr"
@@ -54,22 +54,41 @@
                 />
               </el-select>
             </el-form-item>
-
           </div>
-          <div style="display: flex;align-items: start;margin-top: 5px;z-index: 2">
-            <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 class="bodySearchReset" :style="{marginLeft:$store.state.app.sidebar.opened? $store.state.settings.menuIsHorizontal?'15%':'3%':'10%'}">
+            <el-button v-waves type="primary" icon="el-icon-search" @click="search">鏌ヨ</el-button>
+            <el-button v-waves type="info" icon="el-icon-refresh" @click="reset">閲嶇疆</el-button>
           </div>
         </el-form>
+
+        <div
+          class="bodyTopFormExpand"
+        >
+          <svg-icon
+            v-show="mouseHoverType==='mouseout'"
+            style="cursor: pointer"
+            :icon-class="!isExpandForm?'doubleDown3':'doubleUp3'"
+            @mouseenter="mouseHoverType=$event.type"
+          />
+          <svg-icon
+            v-show="mouseHoverType==='mouseenter'"
+            style="cursor: pointer"
+            :icon-class="!isExpandForm?'doubleDown':'doubleUp'"
+            @click="isExpandForm=!isExpandForm"
+            @mouseout="mouseHoverType=$event.type"
+          />
+        </div>
       </div>
 
       <div class="elTableDiv">
         <el-table
+          ref="tableDataRef"
+          class="tableFixed"
           :data="tableData"
-          :height="tableHeight+'px'"
+          :height="isExpandForm?tableHeight:(tableHeight+40)+'px'"
           border
           :row-class-name="tableRowClassName"
-          :style="{width: 100+'%',height:tableHeight+'px',}"
+          :style="{width: 100+'%',height:isExpandForm?tableHeight:(tableHeight+40)+'px'}"
           highlight-current-row
           :header-cell-style="this.$headerCellStyle"
           :cell-style="this.$cellStyle"
@@ -89,11 +108,13 @@
           <el-table-column
             prop="wo_code"
             label="宸ュ崟缂栫爜"
+            show-tooltip-when-overflow
             width="160"
             sortable="custom"
           />
           <el-table-column
             prop="partcode"
+            show-tooltip-when-overflow
             width="160"
             label="浜у搧缂栫爜"
             sortable="custom"
@@ -102,11 +123,13 @@
             prop="partname"
             label="浜у搧鍚嶇О"
             width="160"
+            show-tooltip-when-overflow
             sortable="custom"
           />
           <el-table-column
             prop="partspec"
             label="浜у搧瑙勬牸"
+            show-tooltip-when-overflow
             width="160"
             sortable="custom"
           >
@@ -119,29 +142,34 @@
             prop="step_code"
             label="宸ュ簭缂栫爜"
             width="120"
+            show-tooltip-when-overflow
             sortable="custom"
           />
           <el-table-column
             prop="stepname"
             label="宸ュ簭鍚嶇О"
             width="120"
+            show-tooltip-when-overflow
             sortable="custom"
           />
           <el-table-column
             prop="checkstaned_code"
             label="鏍囧噯缂栫爜"
             width="120"
+            show-tooltip-when-overflow
             sortable="custom"
           />
           <el-table-column
             prop="checkstaned_name"
             label="鏍囧噯鍚嶇О"
             width="120"
+            show-tooltip-when-overflow
             sortable="custom"
           />
           <el-table-column
             prop="check_type"
             label="妫�楠岀被鍨�"
+            show-tooltip-when-overflow
             sortable="custom"
             width="120"
           >
@@ -155,11 +183,17 @@
             prop="check_result"
             label="妫�楠岀粨鏋�"
             sortable="custom"
+            show-tooltip-when-overflow
             width="120"
           >
             <template slot-scope="{row}">
-              <div v-if="row.check_result==='NG'"> <i class="el-icon-circle-close" style="color:red;" /> 涓嶈壇</div>
-              <div v-if="row.check_result==='OK'">  <i class="el-icon-circle-check" style="color: #42b983" /> 鍚堟牸</div>
+              <div v-if="row.check_result==='NG'">
+                <i class="el-icon-info" style="margin-right: 2px" />
+                涓嶈壇
+              </div>
+              <div v-if="row.check_result==='OK'">
+                <i class="el-icon-success" :style="{color:$store.state.settings.theme}" style="margin-right: 2px" />
+                鍚堟牸</div>
             </template>
           </el-table-column>
           <el-table-column
@@ -178,17 +212,20 @@
             prop="check_qty"
             label="妫�楠屾暟閲�"
             width="120"
+            show-tooltip-when-overflow
             sortable="custom"
           />
           <el-table-column
             prop="lm_user"
             label="妫�楠屼汉鍛�"
+            show-tooltip-when-overflow
             sortable="custom"
             width="120"
           />
           <el-table-column
             prop="lm_date"
             label="妫�楠屾椂闂�"
+            show-tooltip-when-overflow
             width="160"
             sortable="custom"
           />
@@ -199,13 +236,14 @@
           >
             <template slot-scope="{row}">
               <div class="operationClass">
-                <!--                <el-button type="text" @click="check(row)">鏌ョ湅</el-button>-->
-                <!--                <el-button type="text" @click="del(row)">鍒犻櫎</el-button>-->
+                <!--                <el-button v-waves type="text" @click="check(row)">鏌ョ湅</el-button>-->
+                <!--                <el-button v-waves type="text" @click="del(row)">鍒犻櫎</el-button>-->
 
                 <el-tooltip class="item" effect="dark" content="鏌ョ湅" placement="top">
                   <i
                     class="el-icon-view"
-                    style="color: #42b983;cursor: pointer;margin-right: 15px;"
+                    :style="{color:$store.state.settings.theme}"
+                    style="cursor: pointer;margin-right: 15px;"
                     @click="check(row)"
                   />
                 </el-tooltip>
@@ -227,6 +265,7 @@
     </div>
 
     <el-dialog
+      v-el-drag-dialog
       title="宸ュ簭妫�楠屾槑缁�"
       :visible.sync="dialogVisible"
       width="900px"
@@ -260,35 +299,47 @@
 
           <el-table-column
             prop="checkitem_code"
+            show-tooltip-when-overflow
             label="妫�楠岄」鐩紪鍙�"
             width="120"
           />
           <el-table-column
             prop="checkitem_name"
             label="妫�楠岄」鐩悕绉�"
+            show-tooltip-when-overflow
           />
           <el-table-column
             prop="checkitem_descr"
             label="妫�楠岄」鐩弿杩�"
+            show-tooltip-when-overflow
           />
           <el-table-column
             prop="check_result"
             label="妫�楠岀粨鏋�"
+            show-tooltip-when-overflow
             width="120"
           >
             <template slot-scope="{row}">
-              <div v-if="row.check_result==='NG'"> <i class="el-icon-circle-close" style="color:red;" /> 涓嶈壇</div>
-              <div v-if="row.check_result==='OK'">  <i class="el-icon-circle-check" style="color: #42b983" /> 鍚堟牸</div>
+              <div v-if="row.check_result==='NG'">
+                <i class="el-icon-info" style="margin-right: 2px" />
+                涓嶈壇
+              </div>
+              <div v-if="row.check_result==='OK'">
+                <i class="el-icon-success" :style="{color:$store.state.settings.theme}" style="margin-right: 2px" />
+                鍚堟牸
+              </div>
             </template>
           </el-table-column>
           <el-table-column
             prop="lm_user"
             label="妫�楠屼汉鍛�"
+            show-tooltip-when-overflow
             width="120"
           />
           <el-table-column
             prop="lm_date"
             label="妫�楠屾椂闂�"
+            show-tooltip-when-overflow
             width="160"
           />
           <!--          <el-table-column-->
@@ -298,8 +349,8 @@
           <!--          >-->
           <!--            <template slot-scope="{row}">-->
           <!--              <div class="operationClass">-->
-          <!--                <el-button type="text" @click="check(row)">鏌ョ湅</el-button>-->
-          <!--                &lt;!&ndash;                <el-button type="text" @click="del(row)">鍒犻櫎</el-button>&ndash;&gt;-->
+          <!--                <el-button v-waves type="text" @click="check(row)">鏌ョ湅</el-button>-->
+          <!--                &lt;!&ndash;                <el-button v-waves type="text" @click="del(row)">鍒犻櫎</el-button>&ndash;&gt;-->
           <!--              </div>-->
           <!--            </template>-->
           <!--          </el-table-column>-->
@@ -307,9 +358,9 @@
       </div>
       <span slot="footer" class="dialog-footer">
         <div class="footerButton">
-          <!--          <el-button @click="dialogVisibleCancel">鍙� 娑�</el-button>-->
-          <!--          <el-button type="primary" @click="dialogVisibleConfirm">纭� 瀹�</el-button>-->
-          <el-button @click="dialogVisibleBack">杩� 鍥�</el-button>
+          <!--          <el-button v-waves @click="dialogVisibleCancel">鍙� 娑�</el-button>-->
+          <!--          <el-button v-waves type="primary" @click="dialogVisibleConfirm">纭� 瀹�</el-button>-->
+          <el-button v-waves @click="dialogVisibleBack">杩� 鍥�</el-button>
         </div>
       </span>
     </el-dialog>
@@ -333,6 +384,8 @@
 import { getCookie } from '@/utils/auth'
 import ImportPicker from '@/components/ImportPicker'
 import { StepCheckTableOutExcel, StepCheckTableSearch, StepCheckTableSubSearch } from '@/api/zlgl'
+import elDragDialog from '@/directive/el-drag-dialog'
+import waves from '@/directive/waves'
 
 const SER_HZ = /^[\u4e00-\u9fa5]+$/
 export default {
@@ -340,26 +393,11 @@
   components: {
     Pagination, ImportPicker
   },
+  directives: { elDragDialog, waves },
   data() {
-    const validateName = (rule, value, callback) => {
-      if (!value) {
-        return callback(new Error('璇疯緭鍏ョ紪鐮�'))
-      } else {
-        if (SER_HZ.test(value)) {
-          return callback(new Error('缂栫爜涓嶈兘涓轰腑鏂�'))
-        } else {
-          callback()
-        }
-      }
-    }
-    const validateTypeCode = (rule, value, callback) => {
-      if (!value) {
-        return callback(new Error('璇烽�夋嫨涓婄骇'))
-      } else {
-        callback()
-      }
-    }
     return {
+      mouseHoverType: 'mouseout',
+      isExpandForm: false,
       mainHeight: 0,
       tableHeight: 0,
       form: {
@@ -488,6 +526,9 @@
         DeleteOrganization({ orgid: row.code }).then(res => {
           if (res.code === '200') {
             this.$message.success('鍒犻櫎鎴愬姛!')
+            if (this.form.page > 1 && this.tableData.length === 1) {
+              this.form.page--
+            }
             this.getStepCheckTableSearch()
           }
         })
@@ -533,7 +574,8 @@
     getHeight() {
       this.$nextTick(() => {
         this.mainHeight = window.innerHeight - 85
-        this.tableHeight = this.mainHeight - 240
+        this.tableHeight = this.mainHeight - 250
+        this.$refs.tableDataRef.doLayout()
       })
     },
     tableRowClassName({ row, rowIndex }) {
@@ -654,6 +696,14 @@
   align-items: center;
   justify-content: center;
 }
+.tableFixed{
+  ::v-deep .el-table__fixed-right{
+    height: 100% !important;
+  }
+  ::v-deep .el-table__fixed{
+    height: 100% !important;
+  }
+}
 </style>
 <style>
 

--
Gitblit v1.9.3