From 8905bdd0a74c4bd6cabc206c36a299341488041e Mon Sep 17 00:00:00 2001
From: zhaowei <zhaowei>
Date: 星期四, 11 九月 2025 11:00:26 +0800
Subject: [PATCH] 合并设备借出与归还流程,增加借出归还列表详情功能

---
 src/views/eam/dispose/EamEquipmentLeanOutList.vue |  329 ++++++++++++++++++++++++++++--------------------------
 1 files changed, 169 insertions(+), 160 deletions(-)

diff --git a/src/views/eam/dispose/EamEquipmentLeanOutList.vue b/src/views/eam/dispose/EamEquipmentLeanOutList.vue
index fd28150..47e6bb6 100644
--- a/src/views/eam/dispose/EamEquipmentLeanOutList.vue
+++ b/src/views/eam/dispose/EamEquipmentLeanOutList.vue
@@ -26,7 +26,8 @@
           </a-col>
           <a-col :xl="4" :lg="7" :md="8" :sm="24">
             <a-form-item label="鍊熺敤鐘舵��">
-              <j-dict-select-tag placeholder="璇烽�夋嫨鍊熺敤鐘舵��" dictCode="equipment_lean_out_status" v-model="queryParam.leanStatus"
+              <j-dict-select-tag placeholder="璇烽�夋嫨鍊熺敤鐘舵��" dictCode="equipment_lean_out_status"
+                                 v-model="queryParam.leanStatus"
                                  allow-clear/>
             </a-form-item>
           </a-col>
@@ -58,19 +59,20 @@
         @click="handleAdd"
         type="primary"
         icon="plus"
-      >鏂板</a-button>
+      >鏂板
+      </a-button>
       <a-dropdown v-if="selectedRowKeys.length > 0">
         <a-menu slot="overlay">
           <a-menu-item
             key="1"
             @click="batchDel"
           >
-            <a-icon type="delete" />
+            <a-icon type="delete"/>
             鍒犻櫎
           </a-menu-item>
         </a-menu>
         <a-button style="margin-left: 8px"> 鎵归噺鎿嶄綔
-          <a-icon type="down" />
+          <a-icon type="down"/>
         </a-button>
       </a-dropdown>
     </div>
@@ -81,7 +83,8 @@
         class="ant-alert ant-alert-info"
         style="margin-bottom: 16px;"
       >
-        <i class="anticon anticon-info-circle ant-alert-icon"></i> 宸查�夋嫨 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>椤�
+        <i class="anticon anticon-info-circle ant-alert-icon"></i> 宸查�夋嫨 <a style="font-weight: 600">{{
+        selectedRowKeys.length }}</a>椤�
         <a
           style="margin-left: 24px"
           @click="onClearSelected"
@@ -108,16 +111,16 @@
         >
           <template v-if="record.leanStatus === 'WAIT_SUBMIT'">
             <a @click="handleEdit(record)">缂栬緫</a>
-            <a-divider type="vertical" />
+            <a-divider type="vertical"/>
             <a-popconfirm
               title="纭畾鎻愪氦鍚�?"
               @confirm="() => handleSubmit(record.id)"
             >
               <a>鎻愪氦</a>
             </a-popconfirm>
-            <a-divider type="vertical" />
+            <a-divider type="vertical"/>
             <a-dropdown>
-              <a class="ant-dropdown-link">鏇村 <a-icon type="down" /></a>
+              <a class="ant-dropdown-link">鏇村 <a-icon type="down"/></a>
               <a-menu slot="overlay">
                 <a-menu-item>
                   <a
@@ -136,14 +139,15 @@
               </a-menu>
             </a-dropdown>
           </template>
+
            <template v-if="record.leanStatus === 'WAIT_RETURN'">
              <a-popconfirm title='纭畾褰掕繕鍚�?' @confirm='() => equipmentReturn(record.id)'>
               <a>褰掕繕</a>
             </a-popconfirm>
-             <a-divider type='vertical' />
-              <a @click='handleDetail(record)'>璇︽儏</a>
+             <a-divider type='vertical'/>
           </template>
-          <template v-if="record.leanStatus !== 'WAIT_RETURN' && record.leanStatus !== 'WAIT_SUBMIT'">
+
+          <template v-if="record.leanStatus !== 'WAIT_SUBMIT'">
             <a
               href="javascript:;"
               @click="handleDetail(record)"
@@ -160,164 +164,169 @@
       ref="modalForm"
       @ok="modalFormOk"
     ></eamEquipmentLeanOut-modal>
+
+    <!--瀹℃壒寮圭獥-->
+    <equipment-lean-out-and-return-approval-modal ref="approvalModal"
+                                                  :selectShenpiData="selectRowData"/>
   </a-card>
 </template>
 
 <script>
-import '@/assets/less/TableExpand.less'
-import EamEquipmentLeanOutModal from './modules/EamEquipmentLeanOutModal'
-import { JeecgListMixin } from '@/mixins/JeecgListMixin'
-import LxSearchEquipmentSelect from '@views/eam/equipment/modules/LxSearchEquipmentSelect.vue'
-import { getAction } from '@api/manage'
+  import '@/assets/less/TableExpand.less'
+  import EamEquipmentLeanOutModal from './modules/EamEquipmentLeanOutModal'
+  import { JeecgListMixin } from '@/mixins/JeecgListMixin'
+  import LxSearchEquipmentSelect from '@views/eam/equipment/modules/LxSearchEquipmentSelect.vue'
+  import { getAction } from '@api/manage'
+  import EquipmentLeanOutAndReturnApprovalModal
+    from '../../flowable/workflow/leanOut/EquipmentLeanOutAndReturnApprovalModal'
 
-export default {
-  name: 'EamEquipmentLeanOutList',
-  mixins: [JeecgListMixin],
-  components: {
-    LxSearchEquipmentSelect,
-    EamEquipmentLeanOutModal
-  },
-  data() {
-    return {
-      description: '璁惧鍊熷嚭褰掕繕绠$悊椤甸潰',
-      // 琛ㄥご
-      columns: [
-        {
-          title: '#',
-          dataIndex: '',
-          key: 'rowIndex',
-          width: 60,
-          fixed: 'left',
-          align: 'center',
-          customRender: function (t, r, index) {
-            return parseInt(index) + 1
-          }
-        },
-        {
-          title: '璁惧缂栧彿',
-          align: 'center',
-          dataIndex: 'equipmentCode',
-          fixed: 'left',
-        },
-        {
-          title: '璁惧鍚嶇О',
-          align: 'center',
-          dataIndex: 'equipmentName',
-          fixed: 'left',
-        },
-        {
-          title: '鍗曟嵁鍙�',
-          align: 'center',
-          dataIndex: 'code'
-        },
-        {
-          title: '鍊熷叆杞﹂棿',
-          align: 'center',
-          dataIndex: 'leanDepartId_dictText'
-        },
-        {
-          title: '鍊熷叆浜�',
-          align: 'center',
-          dataIndex: 'leanPerson_dictText'
-        },
-        {
-          title: '鍊熺敤鍘熷洜',
-          align: 'center',
-          dataIndex: 'leanReason'
-        },
-        {
-          title: '鍊熺敤鐘舵��',
-          align: 'center',
-          dataIndex: 'leanStatus_dictText'
-        },
-        {
-          title: '鍊熺敤寮�濮嬫椂闂�',
-          align: 'center',
-          dataIndex: 'leanStartTime'
-        },
-        {
-          title: '鍊熺敤褰掕繕鏃堕棿',
-          align: 'center',
-          dataIndex: 'leanEndTime'
-        },
-        {
-          title: '澶囨敞',
-          align: 'center',
-          dataIndex: 'remark'
-        },
-        {
-          title: '鎿嶄綔',
-          dataIndex: 'action',
-          align: 'center',
-          fixed: 'right',
-          width: 200,
-          scopedSlots: { customRender: 'action' }
-        }
-      ],
-      url: {
-        list: '/eam/eamEquipmentLeanOut/list',
-        delete: '/eam/eamEquipmentLeanOut/delete',
-        deleteBatch: '/eam/eamEquipmentLeanOut/deleteBatch',
-        submit: '/eam/eamEquipmentLeanOut/submit',
-        equipmentReturn: '/eam/eamEquipmentLeanOut/equipmentReturn',
-      }
-    }
-  },
-  computed: {},
-  methods: {
-    equipmentReturn(id) {
-      if (!this.url.equipmentReturn) {
-        this.$message.error('璇疯缃畊rl.submit灞炴��!')
-        return
-      }
-      let that = this
-      getAction(that.url.equipmentReturn, { id: id }).then((res) => {
-        if (res.success) {
-          //閲嶆柊璁$畻鍒嗛〉闂
-          that.reCalculatePage(1)
-          // that.$message.success(res.message);
-          that.$notification.success({
-            message: '娑堟伅',
-            description: res.message
-          })
-          that.loadData()
-        } else {
-          // that.$message.warning(res.message);
-          that.$notification.warning({
-            message: '娑堟伅',
-            description: res.message
-          })
-        }
-      })
+  export default {
+    name: 'EamEquipmentLeanOutList',
+    mixins: [JeecgListMixin],
+    components: {
+      EquipmentLeanOutAndReturnApprovalModal,
+      LxSearchEquipmentSelect,
+      EamEquipmentLeanOutModal
     },
-    handleSubmit(id) {
-      if (!this.url.submit) {
-        this.$message.error('璇疯缃畊rl.submit灞炴��!')
-        return
-      }
-      let that = this
-      getAction(that.url.submit, { id: id }).then((res) => {
-        if (res.success) {
-          //閲嶆柊璁$畻鍒嗛〉闂
-          that.reCalculatePage(1)
-          // that.$message.success(res.message);
-          that.$notification.success({
-            message: '娑堟伅',
-            description: res.message
-          })
-          that.loadData()
-        } else {
-          // that.$message.warning(res.message);
-          that.$notification.warning({
-            message: '娑堟伅',
-            description: res.message
-          })
+    data() {
+      return {
+        description: '璁惧鍊熷嚭褰掕繕绠$悊椤甸潰',
+        selectRowData: {},
+        // 琛ㄥご
+        columns: [
+          {
+            title: '#',
+            dataIndex: '',
+            key: 'rowIndex',
+            width: 60,
+            fixed: 'left',
+            align: 'center',
+            customRender: function(t, r, index) {
+              return parseInt(index) + 1
+            }
+          },
+          {
+            title: '璁惧缂栧彿',
+            align: 'center',
+            dataIndex: 'equipmentCode',
+            fixed: 'left'
+          },
+          {
+            title: '璁惧鍚嶇О',
+            align: 'center',
+            dataIndex: 'equipmentName',
+            fixed: 'left'
+          },
+          {
+            title: '鍗曟嵁鍙�',
+            align: 'center',
+            dataIndex: 'code'
+          },
+          {
+            title: '鍊熷叆杞﹂棿',
+            align: 'center',
+            dataIndex: 'leanDepartId_dictText'
+          },
+          {
+            title: '鍊熷叆浜�',
+            align: 'center',
+            dataIndex: 'leanPerson_dictText'
+          },
+          {
+            title: '鍊熺敤鍘熷洜',
+            align: 'center',
+            dataIndex: 'leanReason'
+          },
+          {
+            title: '鍊熺敤鐘舵��',
+            align: 'center',
+            dataIndex: 'leanStatus_dictText'
+          },
+          {
+            title: '鍊熺敤寮�濮嬫椂闂�',
+            align: 'center',
+            dataIndex: 'leanStartTime'
+          },
+          {
+            title: '鍊熺敤褰掕繕鏃堕棿',
+            align: 'center',
+            dataIndex: 'leanEndTime'
+          },
+          {
+            title: '澶囨敞',
+            align: 'center',
+            dataIndex: 'remark'
+          },
+          {
+            title: '鎿嶄綔',
+            dataIndex: 'action',
+            align: 'center',
+            fixed: 'right',
+            width: 200,
+            scopedSlots: { customRender: 'action' }
+          }
+        ],
+        url: {
+          list: '/eam/eamEquipmentLeanOut/list',
+          delete: '/eam/eamEquipmentLeanOut/delete',
+          deleteBatch: '/eam/eamEquipmentLeanOut/deleteBatch',
+          submit: '/eam/eamEquipmentLeanOut/submit',
+          equipmentReturn: '/eam/eamEquipmentLeanOut/equipmentReturn'
         }
-      })
+      }
+    },
+    computed: {},
+    methods: {
+      equipmentReturn(id) {
+        this.loading = true
+        let that = this
+        getAction(that.url.equipmentReturn, { id: id }).then((res) => {
+          if (res.success) {
+            //閲嶆柊璁$畻鍒嗛〉闂
+            that.reCalculatePage(1)
+            that.$notification.success({
+              message: '娑堟伅',
+              description: res.message
+            })
+            that.loadData()
+          } else {
+            that.$notification.warning({
+              message: '娑堟伅',
+              description: res.message
+            })
+          }
+        })
+      },
+      handleSubmit(id) {
+        this.loading = true
+        let that = this
+        getAction(that.url.submit, { id: id }).then((res) => {
+          if (res.success) {
+            //閲嶆柊璁$畻鍒嗛〉闂
+            that.reCalculatePage(1)
+            that.$notification.success({
+              message: '娑堟伅',
+              description: res.message
+            })
+            that.loadData()
+          } else {
+            that.$notification.warning({
+              message: '娑堟伅',
+              description: res.message
+            })
+          }
+        })
+      },
+
+      handleDetail(record) {
+        this.selectRowData = Object.assign({}, record)
+        this.$refs.approvalModal.recordDetail(record)
+        this.$refs.approvalModal.title = '璇︽儏'
+        this.$refs.approvalModal.disableSubmit = true
+      }
     }
   }
-}
 </script>
 <style scoped>
-@import '~@assets/less/common.less';
+  @import '~@assets/less/common.less';
 </style>
\ No newline at end of file

--
Gitblit v1.9.3