From bdee6fec40993873c7031e8c983cbc561d079157 Mon Sep 17 00:00:00 2001
From: Lius <Lius2225@163.com>
Date: 星期四, 17 七月 2025 16:19:06 +0800
Subject: [PATCH] 点检导出按钮

---
 src/views/eam/maintenance/EamInspectionOrderList.vue |  212 ++++++++++++++++++++++------------------------------
 1 files changed, 90 insertions(+), 122 deletions(-)

diff --git a/src/views/eam/maintenance/EamInspectionOrderList.vue b/src/views/eam/maintenance/EamInspectionOrderList.vue
index 6490a89..f0cebd0 100644
--- a/src/views/eam/maintenance/EamInspectionOrderList.vue
+++ b/src/views/eam/maintenance/EamInspectionOrderList.vue
@@ -1,26 +1,17 @@
 <template>
   <a-card :bordered="false">
     <!-- 鏌ヨ鍖哄煙 -->
-    <div
-      class="table-page-search-wrapper"
-      v-if="isDisplayOperation"
-    >
-      <a-form
-        layout="inline"
-        @keyup.enter.native="searchQuery"
-      >
+    <div class="table-page-search-wrapper" v-if="isDisplayOperation">
+      <a-form layout="inline" @keyup.enter.native="searchQuery">
         <a-row :gutter="24">
-          <a-col :xl="4" :lg="7" :md="8" :sm="24">
-            <a-form-item label="宸ュ崟鍙�">
-              <a-input
-                placeholder="璇疯緭鍏ュ伐鍗曞彿"
-                v-model="queryParam.orderNum"
-              ></a-input>
-            </a-form-item>
-          </a-col>
           <a-col :xl="5" :lg="7" :md="8" :sm="24">
             <a-form-item label="缁熶竴缂栫爜">
               <lx-search-equipment-select placeholder="璇疯緭鍏ョ粺涓�缂栫爜鎴栧悕绉版悳绱�" v-model="queryParam.equipmentId"/>
+            </a-form-item>
+          </a-col>
+          <a-col :xl="4" :lg="7" :md="8" :sm="24">
+            <a-form-item label="宸ュ崟鍙�">
+              <a-input placeholder="璇疯緭鍏ュ伐鍗曞彿" v-model="queryParam.orderNum"/>
             </a-form-item>
           </a-col>
           <a-col :xl="6" :lg="7" :md="8" :sm="24">
@@ -48,14 +39,15 @@
 
     <!-- 鎿嶄綔鎸夐挳鍖哄煙 -->
     <div class="table-operator" v-if="isDisplayOperation">
-      <a-button @click="handleAdd" type="primary" icon="plus">鏂板</a-button>
+      <a-button v-has="'eam:inspection:add'" @click="handleAdd" type="primary" icon="plus">鏂板</a-button>
+      <a-button v-if="selectedRowKeys.length == 1" @click="handlePrint" type="primary">鏌ョ湅</a-button>
       <a-dropdown v-if="selectedRowKeys.length > 0">
         <a-menu slot="overlay">
-          <a-menu-item key="1" @click="batchZf('ABOLISH')">
+          <a-menu-item key="1" @click="batchZf('ABOLISH')" v-has="'eam:inspection:abolish'">
             <a-icon type="snippets"/>
             浣滃簾
           </a-menu-item>
-          <a-menu-item key="2" @click="batchLq('UNDER_INSPECTION')">
+          <a-menu-item key="2" @click="batchLq('UNDER_INSPECTION')" v-has="'eam:inspection:collect'">
             <a-icon type="form"/>
             棰嗗彇
           </a-menu-item>
@@ -94,13 +86,12 @@
             <a class="ant-dropdown-link">鏇村 <a-icon type="down"/></a>
             <a-menu slot="overlay">
               <a-menu-item>
-                <a @click="handleDetail(record)">璇︽儏</a>
-              </a-menu-item>
-
-              <a-menu-item>
-                <a-popconfirm title="纭畾浣滃簾鍚�?" @confirm="() => handleOrReceive(record.id)">
+                <a-popconfirm title="纭畾浣滃簾鍚�?" @confirm="() => handleAbolish(record.id)">
                   <a>浣滃簾</a>
                 </a-popconfirm>
+              </a-menu-item>
+               <a-menu-item>
+                <a @click="handleDetail(record)">璇︽儏</a>
               </a-menu-item>
             </a-menu>
           </a-dropdown>
@@ -118,22 +109,19 @@
 </template>
 
 <script>
-
-  import '@/assets/less/TableExpand.less'
-  import { mixinDevice } from '@/utils/mixin'
   import { JeecgListMixin } from '@/mixins/JeecgListMixin'
   import EamInspectionOrderModal from './modules/EamInspectionOrderModal'
   import { deleteAction, getAction } from '@api/manage'
   import InspectionOrderHandle from '../../flowable/workflow/InspectionOrder/InspectionOrderHandle'
-  import LxSearchEquipmentSelect from '@views/eam/equipment/modules/LxSearchEquipmentSelect.vue'
+  import LxSearchEquipmentSelect from '../equipment/modules/LxSearchEquipmentSelect'
 
   export default {
     name: 'EamInspectionOrderList',
-    mixins: [JeecgListMixin, mixinDevice],
+    mixins: [JeecgListMixin],
     components: {
+      LxSearchEquipmentSelect,
       InspectionOrderHandle,
-      EamInspectionOrderModal,
-      LxSearchEquipmentSelect
+      EamInspectionOrderModal
     },
     props: {
       isDisplayOperation: {
@@ -143,7 +131,7 @@
     },
     data() {
       return {
-        description: 'eam_inspection_order绠$悊椤甸潰',
+        description: '鐐规宸ュ崟椤甸潰',
         disableMixinCreated: true,
         // 琛ㄥご
         columns: [
@@ -219,7 +207,7 @@
             dataIndex: 'operateTime'
           },
           {
-            title: '绠$悊鍛樼‘璁�',
+            title: '缁翠慨宸�',
             align: 'center',
             dataIndex: 'confirmUser_dictText'
           },
@@ -229,9 +217,9 @@
             dataIndex: 'confirmTime'
           },
           {
-            title: '纭鎰忚',
+            title: 'HF缂栫爜',
             align: 'center',
-            dataIndex: 'confirmComment'
+            dataIndex: 'hfCode'
           }
         ],
         url: {
@@ -256,8 +244,6 @@
         title: '鎿嶄綔',
         dataIndex: 'action',
         align: 'center',
-        fixed: 'right',
-        width: 200,
         scopedSlots: { customRender: 'action' }
       }
       this.columns = [...this.columns, operationColumn]
@@ -269,8 +255,6 @@
       }
     },
     methods: {
-      initDictConfig() {
-      },
       //璇︽儏
       handleDetail: function(record) {
         this.selectInspectionOrderXqData = Object.assign({}, record)
@@ -280,29 +264,29 @@
         this.$refs.modalFormXq.getAllApproveData(record)
         this.$refs.modalFormXq.getBasicInformation({ ...record, dataId: record.id })
       },
+
       handleInspection(id) {
         var that = this
-        getAction(that.url.receiveInspectionOrder, { id }).then((res) => {
-          if (res.success) {
-            that.$notification.success({
-              message: '娑堟伅',
-              description: res.message
-            })
-            that.loadData()
-          } else {
-            // that.$message.warning(res.message);
-            that.$notification.warning({
-              message: '娑堟伅',
-              description: res.message
-            })
-          }
-        })
+        this.loading = true
+        getAction(that.url.receiveInspectionOrder, { id })
+          .then((res) => {
+            if (res.success) {
+              that.$notification.success({
+                message: '娑堟伅',
+                description: res.message
+              })
+              that.loadData()
+            } else {
+              that.$notification.warning({
+                message: '娑堟伅',
+                description: res.message
+              })
+              this.loading = false
+            }
+          })
       },
-      handleOrReceive(id) {
-        if (!this.url.cancelInspectionOrder) {
-          this.$message.error('璇疯缃畊rl.cancelInspectionOrder!')
-          return
-        }
+
+      handleAbolish(id) {
         var that = this
         getAction(that.url.cancelInspectionOrder, { id: id }).then((res) => {
           if (res.success) {
@@ -312,7 +296,6 @@
             })
             that.loadData()
           } else {
-            // that.$message.warning(res.message);
             that.$notification.warning({
               message: '娑堟伅',
               description: res.message
@@ -321,62 +304,50 @@
         })
       },
       batchZf(type) {
-        if (this.selectedRowKeys.length <= 0) {
-          this.$notification.warning({
-            message: '娑堟伅',
-            description: '璇烽�夋嫨涓�鏉¤褰�'
-          })
-        } else {
-          var ids = ''
-          for (var a = 0; a < this.selectedRowKeys.length; a++) {
-            ids += this.selectedRowKeys[a] + ','
-          }
-          var that = this
-          this.$confirm({
-            title: '纭浣滃簾',
-            content: '鏄惁浣滃簾閫変腑鏁版嵁锛屽彧鏈夊緟鐐规鐘舵�佺殑鏁版嵁鎵嶅彲浣滃簾鎴愬姛?',
-            onOk: function() {
-              that.loading = true
-              getAction(that.url.cancelOrReceive, { ids: ids, type: type }).then((res) => {
-                if (res.success) {
-                  that.$notification.success({
-                    message: '娑堟伅',
-                    description: res.message
-                  })
-                  that.loadData()
-                  that.onClearSelected()
-                } else {
-                  // that.$message.warning(res.message);
-                  that.$notification.warning({
-                    message: '娑堟伅',
-                    description: res.message
-                  })
-                }
-              }).finally(() => {
-                that.loading = false
-              })
-            }
-          })
+        var ids = ''
+        for (var a = 0; a < this.selectedRowKeys.length; a++) {
+          ids += this.selectedRowKeys[a] + ','
         }
+        var that = this
+        this.$confirm({
+          title: '纭浣滃簾',
+          content: '鏄惁浣滃簾閫変腑鏁版嵁锛屽彧鏈夊緟鐐规鐘舵�佺殑鏁版嵁鎵嶅彲浣滃簾鎴愬姛?',
+          onOk: function() {
+            that.loading = true
+            getAction(that.url.cancelOrReceive, { ids, type }).then((res) => {
+              if (res.success) {
+                that.$notification.success({
+                  message: '娑堟伅',
+                  description: res.message
+                })
+                that.loadData()
+                that.onClearSelected()
+              } else {
+                // that.$message.warning(res.message);
+                that.$notification.warning({
+                  message: '娑堟伅',
+                  description: res.message
+                })
+              }
+            }).finally(() => {
+              that.loading = false
+            })
+          }
+        })
       },
       batchLq(type) {
-        if (this.selectedRowKeys.length <= 0) {
-          this.$notification.warning({
-            message: '娑堟伅',
-            description: '璇烽�夋嫨涓�鏉¤褰�'
-          })
-        } else {
-          var ids = ''
-          for (var a = 0; a < this.selectedRowKeys.length; a++) {
-            ids += this.selectedRowKeys[a] + ','
-          }
-          var that = this
-          this.$confirm({
-            title: '纭棰嗗彇',
-            content: '鏄惁棰嗗彇閫変腑鏁版嵁锛屽彧鏈夊緟鐐规鐘舵�佺殑鏁版嵁鎵嶅彲棰嗗彇鎴愬姛?',
-            onOk: function() {
-              that.loading = true
-              getAction(that.url.cancelOrReceive, { ids: ids, type: type }).then((res) => {
+        var ids = ''
+        for (var a = 0; a < this.selectedRowKeys.length; a++) {
+          ids += this.selectedRowKeys[a] + ','
+        }
+        var that = this
+        this.$confirm({
+          title: '纭棰嗗彇',
+          content: '鏄惁棰嗗彇閫変腑鏁版嵁锛屽彧鏈夊緟鐐规鐘舵�佺殑鏁版嵁鎵嶅彲棰嗗彇鎴愬姛?',
+          onOk: function() {
+            that.loading = true
+            getAction(that.url.cancelOrReceive, { ids, type })
+              .then((res) => {
                 if (res.success) {
                   that.$notification.success({
                     message: '娑堟伅',
@@ -390,20 +361,17 @@
                     description: res.message
                   })
                 }
-              }).finally(() => {
+              })
+              .finally(() => {
                 that.loading = false
               })
-            }
-          })
-        }
+          }
+        })
       },
       onInspectionDateChange: function(value, dateString) {
         this.queryParam.inspectionDateBegin = dateString[0]
         this.queryParam.inspectionDateEnd = dateString[1]
-      },
+      }
     }
   }
-</script>
-<style scoped>
-  @import '~@assets/less/common.less';
-</style>
\ No newline at end of file
+</script>
\ No newline at end of file

--
Gitblit v1.9.3