From cac716483630eb312b87afbecf6dbd9c5cb3e3d7 Mon Sep 17 00:00:00 2001
From: zhaowei <zhaowei>
Date: 星期五, 25 七月 2025 16:40:30 +0800
Subject: [PATCH] 设备事故登记表页面功能及流程开发

---
 src/views/eam/repair/EamReportAccidentsRegisterList.vue |  124 +++++++++++++++++++++++++---------------
 1 files changed, 77 insertions(+), 47 deletions(-)

diff --git a/src/views/eam/repair/EamReportAccidentsRegisterList.vue b/src/views/eam/repair/EamReportAccidentsRegisterList.vue
index 7758fa2..e2df2e8 100644
--- a/src/views/eam/repair/EamReportAccidentsRegisterList.vue
+++ b/src/views/eam/repair/EamReportAccidentsRegisterList.vue
@@ -56,7 +56,7 @@
       </template>
 
       <span slot="action" slot-scope="text, record">
-          <template v-if="record.registerStatus=='PENDING_SUBMIT'">
+          <template v-if="record.registerStatus==='PENDING_SUBMIT'">
              <a @click="handleEdit(record)">缂栬緫</a>
              <a-divider type="vertical"/>
              <a-popconfirm title="纭畾鎻愪氦鍚�?" @confirm="() => handleSubmit(record.id)">
@@ -72,35 +72,32 @@
 
     <!-- 琛ㄥ崟鍖哄煙 -->
     <eamReportAccidentsRegister-modal ref="modalForm" @ok="modalFormOk"/>
+
+    <!--瀹℃壒绐楀彛-->
+    <report-accidents-register-approval-modal ref="reportAccidentsRegisterApprovalModal"
+                                              :selectShenpiData="selectedRowData"/>
   </a-card>
 </template>
 
 <script>
-  import '@/assets/less/TableExpand.less'
   import EamReportAccidentsRegisterModal from './modules/EamReportAccidentsRegisterModal'
   import { JeecgListMixin } from '@/mixins/JeecgListMixin'
   import LxSearchEquipmentSelect from '../equipment/modules/LxSearchEquipmentSelect'
+  import { getAction } from '@/api/manage'
+  import ReportAccidentsRegisterApprovalModal
+    from '../../flowable/workflow/repairOrder/ReportAccidentsRegisterApprovalModal'
 
   export default {
     name: 'EamReportAccidentsRegisterList',
     mixins: [JeecgListMixin],
     components: {
+      ReportAccidentsRegisterApprovalModal,
       LxSearchEquipmentSelect,
       EamReportAccidentsRegisterModal
-    },
-    props: {
-      isDisplayOperation: {
-        type: Boolean,
-        default: true
-      },
-      propsQueryParam: {
-        type: Object
-      }
     },
     data() {
       return {
         description: '璁惧浜嬫晠鐧昏琛ㄧ鐞嗛〉闈�',
-        disableMixinCreated: true,
         // 琛ㄥご
         columns: [
           {
@@ -138,6 +135,21 @@
             align: 'center',
             dataIndex: 'registerStatus_dictText',
             fixed: 'left'
+          },
+          {
+            title: '搴熷搧浠跺彿',
+            align: 'center',
+            dataIndex: 'scrapPartNumber'
+          },
+          {
+            title: '搴熷搧浠舵暟',
+            align: 'center',
+            dataIndex: 'scrapPartQuantity'
+          },
+          {
+            title: '搴熷搧浠峰��',
+            align: 'center',
+            dataIndex: 'scrapPartValue'
           },
           {
             title: '鏄惁鏈夎澶囨搷浣滆瘉',
@@ -191,7 +203,7 @@
           {
             title: '鎿嶄綔宸�',
             align: 'center',
-            dataIndex: 'confirmer'
+            dataIndex: 'confirmer_dictText'
           },
           {
             title: '鎿嶄綔宸ョ‘璁ゆ椂闂�',
@@ -201,7 +213,7 @@
           {
             title: '鍖洪暱',
             align: 'center',
-            dataIndex: 'district'
+            dataIndex: 'district_dictText'
           },
           {
             title: '鍖洪暱纭鏃堕棿',
@@ -211,7 +223,7 @@
           {
             title: '涓績涓讳换',
             align: 'center',
-            dataIndex: 'centerDirector'
+            dataIndex: 'centerDirector_dictText'
           },
           {
             title: '涓績涓讳换纭鏃堕棿',
@@ -226,7 +238,7 @@
           {
             title: '璁惧鐘舵��',
             align: 'center',
-            dataIndex: 'equipmentStatus'
+            dataIndex: 'equipmentStatus_dictText'
           },
           {
             title: '鍘熷洜鍒嗘瀽',
@@ -236,7 +248,7 @@
           {
             title: '妫�鏌ョ粨鏋�',
             align: 'center',
-            dataIndex: 'inspectionResults'
+            dataIndex: 'inspectionResults_dictText'
           },
           {
             title: '閲囧彇鎺柦',
@@ -256,7 +268,7 @@
           {
             title: '缁翠慨纭',
             align: 'center',
-            dataIndex: 'repairConfirm'
+            dataIndex: 'repairConfirm_dictText'
           },
           {
             title: '缁翠慨纭鏃堕棿',
@@ -266,7 +278,7 @@
           {
             title: '缁翠慨缁勯暱纭',
             align: 'center',
-            dataIndex: 'repairGroupLeader'
+            dataIndex: 'repairGroupLeader_dictText'
           },
           {
             title: '缁翠慨缁勯暱纭鏃堕棿',
@@ -276,7 +288,7 @@
           {
             title: '缁翠慨缁勯暱纭',
             align: 'center',
-            dataIndex: 'repairDistrict'
+            dataIndex: 'repairDistrict_dictText'
           },
           {
             title: '缁翠慨缁勯暱纭鏃堕棿',
@@ -284,7 +296,7 @@
             dataIndex: 'repairDistrictTime'
           },
           {
-            title: '鍘熷洜鍒嗘瀽鏍稿;鍚屾剰銆佷笉鍚屾剰',
+            title: '鍘熷洜鍒嗘瀽鏍稿',
             align: 'center',
             dataIndex: 'checkAgree',
             scopedSlots: { customRender: 'checkAgree' }
@@ -307,7 +319,7 @@
           {
             title: '鎶�鏈礋璐d汉',
             align: 'center',
-            dataIndex: 'technicalDirector'
+            dataIndex: 'technicalDirector_dictText'
           },
           {
             title: '鎶�鏈礋璐d汉纭鏃堕棿',
@@ -317,7 +329,7 @@
           {
             title: '鎶�鏈富绠″绾ч瀵�',
             align: 'center',
-            dataIndex: 'technicalDirectorLeader'
+            dataIndex: 'technicalDirectorLeader_dictText'
           },
           {
             title: '鎶�鏈富绠″绾ч瀵肩‘璁ゆ椂闂�',
@@ -327,47 +339,65 @@
           {
             title: '涓荤閮ㄧ骇棰嗗',
             align: 'center',
-            dataIndex: 'technicalDirectorPart'
+            dataIndex: 'technicalDirectorPart_dictText'
           },
           {
             title: '涓荤閮ㄧ骇棰嗗纭鏃堕棿',
             align: 'center',
             dataIndex: 'technicalDirectorPartTime'
+          },
+          {
+            title: '鎿嶄綔',
+            dataIndex: 'action',
+            align: 'center',
+            scopedSlots: { customRender: 'action' },
+            width: 200,
+            fixed: 'right'
           }
         ],
         selectedRowData: {},
         url: {
           list: '/eam/eamReportAccidentsRegister/list',
-          delete: '/eam/eamReportAccidentsRegister/delete',
-          deleteBatch: '/eam/eamReportAccidentsRegister/deleteBatch',
-          exportXlsUrl: 'eam/eamReportAccidentsRegister/exportXls',
-          importExcelUrl: 'eam/eamReportAccidentsRegister/importExcel'
+          submit: '/eam/eamReportAccidentsRegister/submit',
+          delete: '/eam/eamReportAccidentsRegister/delete'
         }
       }
-    },
-    created() {
-      if (!this.isDisplayOperation) this.queryParam = Object.assign({}, this.propsQueryParam)
-      else {
-        const operationColumn = {
-          title: '鎿嶄綔',
-          dataIndex: 'action',
-          align: 'center',
-          scopedSlots: { customRender: 'action' },
-          width: 200,
-          fixed: 'right'
-        }
-        this.columns = [...this.columns, operationColumn]
-      }
-      this.loadData(1)
     },
     methods: {
       /**
-       * 鐐瑰嚮濉姤鏃惰Е鍙�
+       * 鐐瑰嚮鎻愪氦鏃惰Е鍙�
+       * @param id
+       */
+      handleSubmit(id) {
+        this.loading = true
+        getAction(this.url.submit, { id })
+          .then(res => {
+            if (res.success) {
+              this.$notification.success({
+                message: '娑堟伅',
+                description: res.message
+              })
+              this.loadData()
+            } else {
+              this.$notification.warning({
+                message: '娑堟伅',
+                description: res.message
+              })
+              this.loading = false
+            }
+          })
+      },
+
+      /**
+       * 鐐瑰嚮璇︽儏鏃惰Е鍙戞椂瑙﹀彂
        * @param record
        */
-      handleFillIn(record) {
-        this.$refs.modalForm.title = '濉姤'
-        this.$refs.modalForm.handleFillIn(record)
+      handleDetail(record) {
+        this.selectedRowData = Object.assign({}, record)
+        this.$refs.reportAccidentsRegisterApprovalModal.title = '璇︽儏'
+        this.$refs.reportAccidentsRegisterApprovalModal.disableSubmit = true
+        this.$refs.reportAccidentsRegisterApprovalModal.visible = true
+        this.$refs.reportAccidentsRegisterApprovalModal.handleDetail(record)
       }
     }
   }

--
Gitblit v1.9.3