From a296223898d61a9838bbd35ed75c87575e308a36 Mon Sep 17 00:00:00 2001
From: huangxiaoqiang <huangxiaoqiang@hnkhzn.com>
Date: 星期五, 07 十一月 2025 17:19:38 +0800
Subject: [PATCH] 1

---
 项目代码/WMS/WIDESEA_WMSClient/src/components/basic/ViewGrid/ViewGrid.vue |  141 ++++++++++++++++++++---------------------------
 1 files changed, 60 insertions(+), 81 deletions(-)

diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSClient/src/components/basic/ViewGrid/ViewGrid.vue" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSClient/src/components/basic/ViewGrid/ViewGrid.vue"
index c66cf97..1665712 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSClient/src/components/basic/ViewGrid/ViewGrid.vue"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSClient/src/components/basic/ViewGrid/ViewGrid.vue"
@@ -16,9 +16,7 @@
         </div>
       </template>
     </vol-box>
-    <ViewGridAudit @auditClick="saveAudit" :option="table" ref="audit">
-
-    </ViewGridAudit>
+    <ViewGridAudit @auditClick="saveAudit" :option="table" ref="audit"> </ViewGridAudit>
 
     <!--瀵煎叆excel鍔熻兘-->
     <!--2020.10.31娣诲姞瀵煎叆鍓嶇殑鏂规硶-->
@@ -105,10 +103,8 @@
               </el-button>
               <template #dropdown>
                 <el-dropdown-menu>
-                  <el-dropdown-item @click="changeDropdown(item.name)" :name="item.name" v-show="!item.hidden" v-for="(item, dIndex) in buttons.slice(
-                    maxBtnLength,
-                    buttons.length
-                  )" :key="dIndex">
+                  <el-dropdown-item @click="changeDropdown(item.name)" :name="item.name" v-show="!item.hidden"
+                    v-for="(item, dIndex) in buttons.slice(maxBtnLength, buttons.length)" :key="dIndex">
                     <i :class="item.icon"></i> {{ item.name }}</el-dropdown-item>
                 </el-dropdown-menu>
               </template>
@@ -153,8 +149,8 @@
                     </div>
                   </div>
                   <vol-table ref="detail" @loadBefore="loadInternalDetailTableBefore" @loadAfter="loadDetailTableAfter"
-                    @rowChange="detailRowOnChange" @rowClick="detailRowOnClick" :url="detailOptions.url"
-                    :load-key="false" :index="true" :tableData="detailOptions.data" :columns="detailOptions.columns"
+                    @rowChange="detailRowOnChange" @rowClick="detailRowOnClick" :url="detailOptions.url" :load-key="false"
+                    :index="true" :tableData="detailOptions.data" :columns="detailOptions.columns"
                     :pagination="detailOptions.pagination" :height="detailOptions.height" :single="detailOptions.single"
                     :pagination-hide="detailOptions.paginationHide" :defaultLoadPage="detailOptions.load"
                     :beginEdit="detailOptions.beginEdit" :endEditBefore="detailOptions.endEditBefore"
@@ -171,12 +167,11 @@
             </div>
           </template>
           <template #footer>
-            <div style="text-align: center;" v-show="isBoxAudit">
+            <div style="text-align: center" v-show="isBoxAudit">
               <el-button size="small" type="primary" plain @click="onGridModelClose(false)">
                 <i class="el-icon-close">鍏抽棴</i>
               </el-button>
-              <el-button size="small" type="primary" v-show="auditParam.showViewButton"
-                @click="auditParam.model = true">
+              <el-button size="small" type="primary" v-show="auditParam.showViewButton" @click="auditParam.model = true">
                 <i class="el-icon-view">瀹℃壒</i>
               </el-button>
             </div>
@@ -205,11 +200,11 @@
           @loadBefore="loadTableBefore" @loadAfter="loadTableAfter" @rowChange="rowOnChange" @rowClick="rowOnClick"
           @rowDbClick="rowOnDbClick" @selectionChange="selectionOnChange" :tableData="[]" :linkView="linkData"
           :columns="columns" :pagination="pagination" :height="height" :max-height="tableMaxHeight"
-          :pagination-hide="paginationHide" :url="url" :load-key="false" :defaultLoadPage="load"
-          :double-edit="doubleEdit" :index="doubleEdit" :beginEdit="tableBeginEdit" :endEditBefore="tableEndEditBefore"
-          :column-index="columnIndex" :text-inline="textInline" :ck="ck" :select2Count="select2Count"
-          :selectable="selectable" :spanMethod="spanMethod" :lazy="lazy" :defaultExpandAll="defaultExpandAll"
-          :expandRowKeys="expandRowKeys" :rowParentField="rowParentField"></vol-table>
+          :pagination-hide="paginationHide" :url="url" :load-key="false" :defaultLoadPage="load" :double-edit="doubleEdit"
+          :index="doubleEdit" :beginEdit="tableBeginEdit" :endEditBefore="tableEndEditBefore" :column-index="columnIndex"
+          :text-inline="textInline" :ck="ck" :select2Count="select2Count" :selectable="selectable"
+          :spanMethod="spanMethod" :lazy="lazy" :defaultExpandAll="defaultExpandAll" :expandRowKeys="expandRowKeys"
+          :rowParentField="rowParentField"></vol-table>
       </div>
     </div>
 
@@ -231,34 +226,22 @@
   DOWNLOADTEMPLATE: 'DownLoadTemplate', //涓嬭浇瀵煎叆妯℃澘
   IMPORT: 'Import', //瀵煎叆(瀵煎叆琛ㄧ殑Excel鍔熻兘)
   UPLOAD: 'Upload' //涓婁紶鏂囦欢
-};
-import Empty from '@/components/basic/Empty.vue';
+}
+import Empty from '@/components/basic/Empty.vue'
 
-import VolTable from '@/components/basic/VolTable.vue';
-import VolForm from '@/components/basic/VolForm.vue';
-import {
-  defineAsyncComponent,
-  defineComponent,
-  ref,
-  shallowRef,
-  toRaw
-} from 'vue';
+import VolTable from '@/components/basic/VolTable.vue'
+import VolForm from '@/components/basic/VolForm.vue'
+import { defineAsyncComponent, defineComponent, ref, shallowRef, toRaw } from 'vue'
 var vueParam = {
   emits: ['parentCall'],
   components: {
     'vol-form': VolForm,
     'vol-table': VolTable,
     VolBox: defineAsyncComponent(() => import('@/components/basic/VolBox.vue')),
-    QuickSearch: defineAsyncComponent(() =>
-      import('@/components/basic/QuickSearch.vue')
-    ),
+    QuickSearch: defineAsyncComponent(() => import('@/components/basic/QuickSearch.vue')),
     Audit: defineAsyncComponent(() => import('@/components/basic/Audit.vue')),
-    UploadExcel: defineAsyncComponent(() =>
-      import('@/components/basic/UploadExcel.vue')
-    ),
-    'custom-column': defineAsyncComponent(() =>
-      import('./ViewGridCustomColumn.vue')
-    ),
+    UploadExcel: defineAsyncComponent(() => import('@/components/basic/UploadExcel.vue')),
+    'custom-column': defineAsyncComponent(() => import('./ViewGridCustomColumn.vue')),
     'vol-header': defineAsyncComponent(() => import('./../VolHeader.vue')),
     ViewGridAudit: defineAsyncComponent(() => import('./ViewGridAudit.vue'))
   },
@@ -273,17 +256,17 @@
       modelBody: Empty,
       modelRight: Empty,
       modelFooter: Empty
-    };
+    }
     //鍚堝苟鎵╁睍缁勪欢
     if (props.extend.components) {
       for (const key in props.extend.components) {
         if (props.extend.components[key]) {
-          dynamicCom[key] = toRaw(props.extend.components[key]);
+          dynamicCom[key] = toRaw(props.extend.components[key])
         }
       }
     }
-    const dynamicComponent = shallowRef(dynamicCom);
-    return { dynamicComponent };
+    const dynamicComponent = shallowRef(dynamicCom)
+    return { dynamicComponent }
   },
   data() {
     return {
@@ -335,7 +318,7 @@
       continueAddName: '淇濆瓨鍚庣户缁坊鍔�', //2021.04.11鎸夐挳鍚嶇О
       // detailUrl: "",
       detailOptions: {
-        paginationHide: false,//鏄惁闅愯棌鏄庣粏琛ㄥ垎椤�2023.10.23
+        paginationHide: false, //鏄惁闅愯棌鏄庣粏琛ㄥ垎椤�2023.10.23
         //寮瑰嚭妗嗕粠琛�(鏄庣粏)瀵硅薄
         //浠庤〃閰嶇疆
         buttons: [], //寮瑰嚭妗嗕粠琛ㄨ〃鏍兼搷浣滄寜閽�,鐩墠鏈夊垹闄よ锛屾坊鍔犺锛屽埛鏂版搷浣滐紝濡傞渶瑕佸叾浠栨搷浣滄寜閽紝鍙湪琛ㄥ搴旂殑.js涓坊鍔�
@@ -356,15 +339,15 @@
         currentReadonly: false, //褰撳墠鐢ㄦ埛娌℃湁缂栬緫鎴栨柊寤烘潈闄愭椂锛岃〃鍗曞彧璇�(鍙敤浜庡垽鏂敤鎴锋槸鍚︽湁缂栬緫鎴栨柊寤烘潈闄�)
         //寮�鍚紪杈戞椂
         beginEdit: (row, column, index) => {
-          return true;
+          return true
         },
         //缁撴潫缂栬緫鍓�
         endEditBefore: (row, column, index) => {
-          return true;
+          return true
         },
         //缁撴潫缂栬緫鍚�
         endEditAfter: (row, column, index) => {
-          return true;
+          return true
         },
         columnIndex: false, //2020.11.01鏄庣粏鏄惁鏄剧ず琛屽彿
         ck: true //2020.11.01鏄庣粏鏄惁鏄剧ずcheckbox
@@ -421,68 +404,64 @@
       //2022.09.26澧炲姞鑷畾涔夊鍑烘枃浠跺悕
       downloadFileName: null,
       select2Count: 2000, //瓒呭嚭500鏁伴噺鏄剧ずselect2缁勪欢
-      paginationHide: false,//鏄殣钘忓垎椤�(2023.10.11)
-      queryFields: [],//蹇嵎鏌ヨ瀛楁2024.01.18澧炲姞澶氫釜蹇嵎鏌ヨ瀛楁
-      lazy: true,//鏍戝舰琛ㄦ牸鏄惁榛樿寤惰繜鍔犺浇
-      defaultExpandAll: false,//鏍戝舰琛ㄦ牸鏄惁灞曞紑鎵�鏈�
-      expandRowKeys: [],//榛樿灞曞紑琛岀殑涓婚敭鍊�2024.09.03
-      paginationHide: false,//鏄惁闅愯棌鍒嗛〉
-      rowParentField: "", //鏍戝舰琛ㄦ牸鐖剁骇id
-      text: ""//鐣岄潰涓婃爣棰樺悗鏄剧ず鐨勬枃鏈紝鍙互鏄痟tml鏍囩
-    };
+      paginationHide: false, //鏄殣钘忓垎椤�(2023.10.11)
+      queryFields: [], //蹇嵎鏌ヨ瀛楁2024.01.18澧炲姞澶氫釜蹇嵎鏌ヨ瀛楁
+      lazy: true, //鏍戝舰琛ㄦ牸鏄惁榛樿寤惰繜鍔犺浇
+      defaultExpandAll: false, //鏍戝舰琛ㄦ牸鏄惁灞曞紑鎵�鏈�
+      expandRowKeys: [], //榛樿灞曞紑琛岀殑涓婚敭鍊�2024.09.03
+      paginationHide: false, //鏄惁闅愯棌鍒嗛〉
+      rowParentField: '', //鏍戝舰琛ㄦ牸鐖剁骇id
+      text: '' //鐣岄潰涓婃爣棰樺悗鏄剧ず鐨勬枃鏈紝鍙互鏄痟tml鏍囩
+    }
   },
   methods: {},
   activated() {
-    this.initFlowQuery();
+    this.initFlowQuery()
     //2020.06.25澧炲姞activated鏂规硶
-    this.onActivated && this.onActivated();
+    this.onActivated && this.onActivated()
     if (!this._inited) {
-      this._inited = true;
-      return;
+      this._inited = true
+      return
     }
     if (this.activatedLoad) {
-      this.refresh();
+      this.refresh()
     }
   },
   mounted() {
-    this.mounted();
+    this.mounted()
     // this.$refs.searchForm.forEach()
   },
   unmounted() {
-    this.destroyed();
+    this.destroyed()
   },
   created: function () {
     //鍚堝苟鑷畾涔変笟鍔℃墿灞曟柟娉�
-    Object.assign(this, this.extend.methods);
+    Object.assign(this, this.extend.methods)
     //濡傛灉娌℃湁鎸囧畾鎺掑簭瀛楁锛屽垯鐢ㄤ富閿綔涓洪粯璁ゆ帓搴忓瓧娈�
-    this.pagination.sortName = this.table.sortName || this.table.key;
-    this.initBoxButtons(); //鍒濆鍖栧脊鍑烘涓庢槑缁嗚〃鏍兼寜閽�
-    this.initAuditColumn();
-    this.onInit(); //鍒濆鍖栧墠锛屽鏋滈渶瑕佸仛鍏朵粬澶勭悊鍦ㄦ墿灞曟柟娉曚腑瑕嗙洊姝ゆ柟娉�
-    this.getButtons();
+    this.pagination.sortName = this.table.sortName || this.table.key
+    this.initBoxButtons() //鍒濆鍖栧脊鍑烘涓庢槑缁嗚〃鏍兼寜閽�
+    this.initAuditColumn()
+    this.onInit() //鍒濆鍖栧墠锛屽鏋滈渶瑕佸仛鍏朵粬澶勭悊鍦ㄦ墿灞曟柟娉曚腑瑕嗙洊姝ゆ柟娉�
+    this.getButtons()
     //鍒濆鍖栬嚜瀹氫箟琛ㄦ牸鍒�
-    this.initViewColumns();
+    this.initViewColumns()
     //鍒濆缂栬緫妗嗙瓑鏁版嵁
-    this.initBoxHeightWidth();
-    this.initDicKeys(); //鍒濆涓嬫鏁版嵁婧�
-    this.onInited(); //鍒濆鍖栧悗锛屽鏋滈渶瑕佸仛鍏朵粬澶勭悊鍦ㄦ墿灞曟柟娉曚腑瑕嗙洊姝ゆ柟娉�
+    this.initBoxHeightWidth()
+    this.initDicKeys() //鍒濆涓嬫鏁版嵁婧�
+    this.onInited() //鍒濆鍖栧悗锛屽鏋滈渶瑕佸仛鍏朵粬澶勭悊鍦ㄦ墿灞曟柟娉曚腑瑕嗙洊姝ゆ柟娉�
   },
   beforeUpdate: function () { },
   updated: function () { }
-};
+}
 
-import props from './props.js';
-import methods from './methods.jsx';
+import props from './props.js'
+import methods from './methods.jsx'
 
 //鍚堝苟灞炴��
-vueParam.props = Object.assign(vueParam.props, props);
+vueParam.props = Object.assign(vueParam.props, props)
 //鍚堝苟鏂规硶
-vueParam.methods = Object.assign(
-  vueParam.methods,
-  methods,
-  props.extend.methods
-);
-export default defineComponent(vueParam);
+vueParam.methods = Object.assign(vueParam.methods, methods, props.extend.methods)
+export default defineComponent(vueParam)
 </script>
 <style lang="less" scoped>
 @import './ViewGrid.less';

--
Gitblit v1.9.3