From 5546db8dd730b8b6be737021b607be417a3b63fb Mon Sep 17 00:00:00 2001
From: cuikaidong <ckd2942379034@163.com>
Date: 星期一, 26 五月 2025 17:43:47 +0800
Subject: [PATCH] 设备归属功能增加

---
 src/views/eam/dispose/modules/EamEquipmentTransferModal.vue             |   93 ++++--
 src/views/eam/dispose/EamEquipmentLeanOutList.vue                       |    2 
 src/views/flowable/workflow/transfer/EquipmentTransferApprovalModal.vue |  235 ++++++++++++++++++
 src/views/eam/dispose/EamEquipmentTransferList.vue                      |  387 ++++++++++++++++------------
 src/views/eam/dispose/modules/EamEquipmentSealUpModal.vue               |    7 
 src/views/flowable/workflow/sealUp/EquipmentSealUpApprovalModal.vue     |    2 
 src/views/eam/dispose/modules/EamEquipmentScrapModal.vue                |    7 
 src/views/eam/dispose/modules/EamEquipmentLeanOutModal.vue              |   11 
 src/views/flowable/workflow/FlowTodo.vue                                |   17 +
 9 files changed, 543 insertions(+), 218 deletions(-)

diff --git a/src/views/eam/dispose/EamEquipmentLeanOutList.vue b/src/views/eam/dispose/EamEquipmentLeanOutList.vue
index afab556..ec649a4 100644
--- a/src/views/eam/dispose/EamEquipmentLeanOutList.vue
+++ b/src/views/eam/dispose/EamEquipmentLeanOutList.vue
@@ -86,7 +86,7 @@
             </a-dropdown>
           </template>
            <template v-else>
-              <a @click="handleDetail(record)">璇︽儏</a>
+             <a href="javascript:;" @click="handleDetail(record)">璇︽儏</a>
           </template>
         </span>
 
diff --git a/src/views/eam/dispose/EamEquipmentTransferList.vue b/src/views/eam/dispose/EamEquipmentTransferList.vue
index 345a008..c49a02a 100644
--- a/src/views/eam/dispose/EamEquipmentTransferList.vue
+++ b/src/views/eam/dispose/EamEquipmentTransferList.vue
@@ -1,46 +1,43 @@
 <template>
-  <a-card :bordered="false">
+  <a-card :bordered='false'>
 
     <!-- 鏌ヨ鍖哄煙 -->
-    <div class="table-page-search-wrapper">
-      <a-form layout="inline" @keyup.enter.native="searchQuery">
-        <a-row :gutter="24">
+    <div class='table-page-search-wrapper'>
+      <a-form layout='inline' @keyup.enter.native='searchQuery'>
+        <a-row :gutter='24'>
 
-          <a-col :xl="6" :lg="7" :md="8" :sm="24">
-            <a-form-item label="鍒犻櫎鏍囪">
-              <a-input placeholder="璇疯緭鍏ュ垹闄ゆ爣璁�" v-model="queryParam.delFlag"></a-input>
+          <a-col :lg='7' :md='8' :sm='24' :xl='6'>
+            <a-form-item label='璁惧缂栧彿'>
+              <lx-search-equipment-select v-model='queryParam.equipmentId'
+                                          placeholder='璇疯緭鍏ヨ澶囩紪鍙锋垨鍚嶇О鎼滅储'></lx-search-equipment-select>
+            </a-form-item>
+
+          </a-col>
+          <a-col :lg='7' :md='8' :sm='24' :xl='6'>
+            <a-form-item label='鍗曟嵁鍙�'>
+              <a-input v-model='queryParam.code' placeholder='璇疯緭鍏ュ崟鎹彿'></a-input>
             </a-form-item>
           </a-col>
-          <a-col :xl="6" :lg="7" :md="8" :sm="24">
-            <a-form-item label="鍗曟嵁鍙�">
-              <a-input placeholder="璇疯緭鍏ュ崟鎹彿" v-model="queryParam.code"></a-input>
-            </a-form-item>
-          </a-col>
-        <template v-if="toggleSearchStatus">
-          <a-col :xl="6" :lg="7" :md="8" :sm="24">
-            <a-form-item label="璁惧ID">
-              <a-input placeholder="璇疯緭鍏ヨ澶嘔D" v-model="queryParam.equipmentId"></a-input>
-            </a-form-item>
-          </a-col>
-          <a-col :xl="6" :lg="7" :md="8" :sm="24">
-            <a-form-item label="璋冨嚭閮ㄩ棬">
-              <a-input placeholder="璇疯緭鍏ヨ皟鍑洪儴闂�" v-model="queryParam.oldDepartId"></a-input>
-            </a-form-item>
-          </a-col>
-          <a-col :xl="6" :lg="7" :md="8" :sm="24">
-            <a-form-item label="璋冨叆閮ㄩ棬">
-              <a-input placeholder="璇疯緭鍏ヨ皟鍏ラ儴闂�" v-model="queryParam.newDepartId"></a-input>
-            </a-form-item>
-          </a-col>
+          <template v-if='toggleSearchStatus'>
+            <a-col :lg='7' :md='8' :sm='24' :xl='6'>
+              <a-form-item label='璋冨嚭閮ㄩ棬'>
+                <a-input v-model='queryParam.oldDepartId' placeholder='璇疯緭鍏ヨ皟鍑洪儴闂�'></a-input>
+              </a-form-item>
+            </a-col>
+            <a-col :lg='7' :md='8' :sm='24' :xl='6'>
+              <a-form-item label='璋冨叆閮ㄩ棬'>
+                <a-input v-model='queryParam.newDepartId' placeholder='璇疯緭鍏ヨ皟鍏ラ儴闂�'></a-input>
+              </a-form-item>
+            </a-col>
           </template>
-          <a-col :xl="6" :lg="7" :md="8" :sm="24">
-            <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
-              <a-button type="primary" @click="searchQuery" icon="search">鏌ヨ</a-button>
-              <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">閲嶇疆</a-button>
-              <a @click="handleToggleSearch" style="margin-left: 8px">
-                {{ toggleSearchStatus ? '鏀惰捣' : '灞曞紑' }}
-                <a-icon :type="toggleSearchStatus ? 'up' : 'down'"/>
-              </a>
+          <a-col :lg='7' :md='8' :sm='24' :xl='6'>
+            <span class='table-page-search-submitButtons' style='float: left;overflow: hidden;'>
+              <a-button icon='search' type='primary' @click='searchQuery'>鏌ヨ</a-button>
+              <a-button icon='reload' style='margin-left: 8px' type='primary' @click='searchReset'>閲嶇疆</a-button>
+<!--              <a style='margin-left: 8px' @click='handleToggleSearch'>-->
+<!--                {{ toggleSearchStatus ? '鏀惰捣' : '灞曞紑' }}-->
+<!--                <a-icon :type="toggleSearchStatus ? 'up' : 'down'" />-->
+<!--              </a>-->
             </span>
           </a-col>
 
@@ -49,54 +46,67 @@
     </div>
 
     <!-- 鎿嶄綔鎸夐挳鍖哄煙 -->
-    <div class="table-operator">
-      <a-button @click="handleAdd" type="primary" icon="plus">鏂板</a-button>
-      <a-button type="primary" icon="download" @click="handleExportXls('璁惧褰掑睘鍙樺姩')">瀵煎嚭</a-button>
-      <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
-        <a-button type="primary" icon="import">瀵煎叆</a-button>
-      </a-upload>
-      <a-dropdown v-if="selectedRowKeys.length > 0">
-        <a-menu slot="overlay">
-          <a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>鍒犻櫎</a-menu-item>
+    <div class='table-operator'>
+      <a-button icon='plus' type='primary' @click='handleAdd'>鏂板</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-menu-item>
         </a-menu>
-        <a-button style="margin-left: 8px"> 鎵归噺鎿嶄綔 <a-icon type="down" /></a-button>
+        <a-button style='margin-left: 8px'> 鎵归噺鎿嶄綔
+          <a-icon type='down' />
+        </a-button>
       </a-dropdown>
     </div>
 
     <!-- table鍖哄煙-begin -->
     <div>
-      <div 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>椤�
-        <a style="margin-left: 24px" @click="onClearSelected">娓呯┖</a>
+      <div 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>椤�
+        <a style='margin-left: 24px' @click='onClearSelected'>娓呯┖</a>
       </div>
 
       <a-table
-        ref="table"
-        size="middle"
+        ref='table'
+        :columns='columns'
+        :dataSource='dataSource'
+        :loading='loading'
+        :pagination='ipagination'
+        :rowSelection='{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}'
+        :scroll="{ x: 'max-content' }"
         bordered
-        rowKey="id"
-        :columns="columns"
-        :dataSource="dataSource"
-        :pagination="ipagination"
-        :loading="loading"
-        class="j-table-force-nowrap"
-        :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
-        @change="handleTableChange">
+        class='j-table-force-nowrap'
+        rowKey='id'
+        size='middle'
+        @change='handleTableChange'>
 
-        <span slot="action" slot-scope="text, record">
-          <a @click="handleEdit(record)">缂栬緫</a>
+        <span slot='action' slot-scope='text, record'>
+          <template v-if="record.transferStatus === 'WAIT_SUBMIT'">
+              <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-menu slot="overlay">
+            <a class='ant-dropdown-link'>鏇村 <a-icon type='down' /></a>
+            <a-menu slot='overlay'>
+               <a-menu-item>
+                 <a @click='handleEdit(record)'>缂栬緫</a>
+              </a-menu-item>
               <a-menu-item>
-                <a-popconfirm title="纭畾鍒犻櫎鍚�?" @confirm="() => handleDelete(record.id)">
+                <a-popconfirm title='纭畾鍒犻櫎鍚�?' @confirm='() => handleDelete(record.id)'>
                   <a>鍒犻櫎</a>
                 </a-popconfirm>
               </a-menu-item>
             </a-menu>
           </a-dropdown>
+            </template>
+          <template v-else>
+            <a href='javascript:;' @click='handleDetail(record)'>璇︽儏</a>
+          </template>
         </span>
 
       </a-table>
@@ -104,122 +114,163 @@
     <!-- table鍖哄煙-end -->
 
     <!-- 琛ㄥ崟鍖哄煙 -->
-    <eamEquipmentTransfer-modal ref="modalForm" @ok="modalFormOk"></eamEquipmentTransfer-modal>
+    <eamEquipmentTransfer-modal ref='modalForm' @ok='modalFormOk'></eamEquipmentTransfer-modal>
   </a-card>
 </template>
 
 <script>
-  import '@/assets/less/TableExpand.less'
-  import EamEquipmentTransferModal from './modules/EamEquipmentTransferModal'
-  import { JeecgListMixin } from '@/mixins/JeecgListMixin'
+import '@/assets/less/TableExpand.less'
+import EamEquipmentTransferModal from './modules/EamEquipmentTransferModal'
+import { JeecgListMixin } from '@/mixins/JeecgListMixin'
+import { getAction } from '@api/manage'
+import LxSearchEquipmentSelect from '@views/eam/equipment/modules/LxSearchEquipmentSelect.vue'
 
-  export default {
-    name: "EamEquipmentTransferList",
-    mixins:[JeecgListMixin],
-    components: {
-      EamEquipmentTransferModal
-    },
-    data () {
-      return {
-        description: '璁惧褰掑睘鍙樺姩绠$悊椤甸潰',
-        // 琛ㄥご
-        columns: [
-          {
-            title: '#',
-            dataIndex: '',
-            key:'rowIndex',
-            width:60,
-            align:"center",
-            customRender:function (t,r,index) {
-              return parseInt(index)+1;
-            }
-           },
-		   {
-            title: '鍒犻櫎鏍囪',
-            align:"center",
-            dataIndex: 'delFlag'
-           },
-		   {
-            title: '鍗曟嵁鍙�',
-            align:"center",
-            dataIndex: 'code'
-           },
-		   {
-            title: '璁惧ID',
-            align:"center",
-            dataIndex: 'equipmentId'
-           },
-		   {
-            title: '璋冨嚭閮ㄩ棬',
-            align:"center",
-            dataIndex: 'oldDepartId'
-           },
-		   {
-            title: '璋冨叆閮ㄩ棬',
-            align:"center",
-            dataIndex: 'newDepartId'
-           },
-		   {
-            title: '鐢宠浜�',
-            align:"center",
-            dataIndex: 'reportUser'
-           },
-		   {
-            title: '鍙樺姩鍘熷洜',
-            align:"center",
-            dataIndex: 'transferReason'
-           },
-		   {
-            title: '鍙樺姩鐘舵��',
-            align:"center",
-            dataIndex: 'transferStatus'
-           },
-		   {
-            title: '鍙樺姩鏃ユ湡',
-            align:"center",
-            dataIndex: 'transferTime'
-           },
-		   {
-            title: '瀹℃牳浜�',
-            align:"center",
-            dataIndex: 'approvalUser'
-           },
-		   {
-            title: '瀹℃牳鏃堕棿',
-            align:"center",
-            dataIndex: 'approvalTime'
-           },
-		   {
-            title: '澶囨敞',
-            align:"center",
-            dataIndex: 'remark'
-           },
-          {
-            title: '鎿嶄綔',
-            dataIndex: 'action',
-            align:"center",
-            scopedSlots: { customRender: 'action' },
+
+export default {
+  name: 'EamEquipmentTransferList',
+  mixins: [JeecgListMixin],
+  components: {
+    EamEquipmentTransferModal,
+    LxSearchEquipmentSelect
+  },
+  data() {
+    return {
+      description: '璁惧褰掑睘鍙樺姩绠$悊椤甸潰',
+      // 琛ㄥご
+      columns: [
+        {
+          title: '#',
+          dataIndex: '',
+          key: 'rowIndex',
+          width: 60,
+          fixed: 'left',
+          align: 'center',
+          customRender: function(t, r, index) {
+            return parseInt(index) + 1
           }
-        ],
-		url: {
-          list: "/eam/eamEquipmentTransfer/list",
-          delete: "/eam/eamEquipmentTransfer/delete",
-          deleteBatch: "/eam/eamEquipmentTransfer/deleteBatch",
-          exportXlsUrl: "eam/eamEquipmentTransfer/exportXls",
-          importExcelUrl: "eam/eamEquipmentTransfer/importExcel",
-       },
+        },
+        {
+          title: '鍗曟嵁鍙�',
+          align: 'center',
+          fixed: 'left',
+          dataIndex: 'code'
+        },
+        {
+          title: '璁惧缂栧彿',
+          align: 'center',
+          fixed: 'left',
+          dataIndex: 'equipmentCode'
+        },
+        {
+          title: '璁惧鍚嶇О',
+          align: 'center',
+          fixed: 'left',
+          dataIndex: 'equipmentName'
+        },
+        {
+          title: '璋冨嚭閮ㄩ棬',
+          align: 'center',
+          dataIndex: 'oldDepartId_dictText'
+        },
+        {
+          title: '璋冨叆閮ㄩ棬',
+          align: 'center',
+          dataIndex: 'newDepartId_dictText'
+        },
+        {
+          title: '鐢宠浜�',
+          align: 'center',
+          dataIndex: 'reportUser_dictText'
+        },
+        {
+          title: '鍙樺姩鍘熷洜',
+          align: 'center',
+          dataIndex: 'transferReason'
+        },
+        {
+          title: '鍙樺姩鐘舵��',
+          align: 'center',
+          dataIndex: 'transferStatus_dictText'
+        },
+        {
+          title: '鍙樺姩鏃ユ湡',
+          align: 'center',
+          dataIndex: 'transferTime'
+        },
+        {
+          title: '瀹℃牳浜�',
+          align: 'center',
+          dataIndex: 'approvalUser_dictText'
+        },
+        {
+          title: '瀹℃牳鎰忚',
+          align: 'center',
+          dataIndex: 'approvalComment'
+        },
+        {
+          title: '瀹℃牳鏃堕棿',
+          align: 'center',
+          dataIndex: 'approvalTime'
+        },
+        {
+          title: '澶囨敞',
+          align: 'center',
+          dataIndex: 'remark'
+        },
+        {
+          title: '鎿嶄綔',
+          dataIndex: 'action',
+          align: 'center',
+          fixed: 'right',
+          width: 150,
+          scopedSlots: { customRender: 'action' }
+        }
+      ],
+      url: {
+        list: '/eam/eamEquipmentTransfer/list',
+        delete: '/eam/eamEquipmentTransfer/delete',
+        deleteBatch: '/eam/eamEquipmentTransfer/deleteBatch',
+        submit: '/eam/eamEquipmentTransfer/submit'
+      }
     }
   },
   computed: {
-    importExcelUrl: function(){
-      return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
+    importExcelUrl: function() {
+      return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`
     }
   },
-    methods: {
-     
+  methods: {
+    handleSubmit(id) {
+      if (!this.url.submit) {
+        this.$message.error('璇疯缃畊rl.submit灞炴��!')
+        return
+      }
+      let that = this
+      this.loading = true
+      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
+          })
+        }
+      }).finally(()=>{
+        this.loading = false
+      })
     }
   }
+}
 </script>
 <style scoped>
-  @import '~@assets/less/common.less';
+@import '~@assets/less/common.less';
 </style>
\ No newline at end of file
diff --git a/src/views/eam/dispose/modules/EamEquipmentLeanOutModal.vue b/src/views/eam/dispose/modules/EamEquipmentLeanOutModal.vue
index 920acdd..59f6ec8 100644
--- a/src/views/eam/dispose/modules/EamEquipmentLeanOutModal.vue
+++ b/src/views/eam/dispose/modules/EamEquipmentLeanOutModal.vue
@@ -3,6 +3,7 @@
     :title="title"
     :width="800"
     :visible="visible"
+    :okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
     :confirmLoading="confirmLoading"
     switchFullscreen
     @ok="handleOk"
@@ -15,12 +16,13 @@
           <a-input placeholder="缂栫爜绯荤粺鑷姩鐢熸垚" v-model="model.code" disabled />
         </a-form-model-item>
         <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="equipmentId" label="璁惧缂栧彿">
-          <lx-search-equipment-select placeholder="璇疯緭鍏ヨ澶囩紪鍙锋垨鍚嶇О鎼滅储"
+          <lx-search-equipment-select placeholder="璇疯緭鍏ヨ澶囩紪鍙锋垨鍚嶇О鎼滅储" :disabled="disableSubmit"
                                       v-model="model.equipmentId"></lx-search-equipment-select>
         </a-form-model-item>
 
         <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="leanDepartId" label="鍊熷叆杞﹂棿">
           <a-tree-select v-model="model.leanDepartId"
+                         :disabled="disableSubmit"
                          style="width: 100%"
                          :tree-data="treeData"
                          :dropdown-style="{ maxHeight: '400px', overflow: 'auto' }"
@@ -31,10 +33,10 @@
           </a-tree-select>
         </a-form-model-item>
         <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="leanReason" label="鍊熺敤鍘熷洜">
-          <a-textarea placeholder="璇疯緭鍏ュ�熺敤鍘熷洜" v-model="model.leanReason" />
+          <a-textarea placeholder="璇疯緭鍏ュ�熺敤鍘熷洜" :disabled="disableSubmit" v-model="model.leanReason" />
         </a-form-model-item>
         <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="remark" label="澶囨敞">
-          <a-textarea placeholder="璇疯緭鍏ュ娉�" v-model="model.remark" />
+          <a-textarea placeholder="璇疯緭鍏ュ娉�" :disabled="disableSubmit" v-model="model.remark" />
         </a-form-model-item>
       </a-form-model>
     </a-spin>
@@ -98,8 +100,9 @@
         this.model = Object.assign({}, record)
         this.visible = true
         this.editable = true
-        this.loadDetail(record.id)
+        // this.loadDetail(record.id)
       },
+
       close () {
         this.$emit('close');
         this.visible = false;
diff --git a/src/views/eam/dispose/modules/EamEquipmentScrapModal.vue b/src/views/eam/dispose/modules/EamEquipmentScrapModal.vue
index a7d63d0..8883a9b 100644
--- a/src/views/eam/dispose/modules/EamEquipmentScrapModal.vue
+++ b/src/views/eam/dispose/modules/EamEquipmentScrapModal.vue
@@ -3,15 +3,16 @@
     :title="title"
     :width="800"
     :visible="visible"
+    :okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
     :confirmLoading="confirmLoading"
     switchFullscreen
     @ok="handleOk"
     @cancel="handleCancel"
     cancelText="鍏抽棴">
-    
+
     <a-spin :spinning="confirmLoading">
       <a-form-model ref="form" :model="model" :rules="validatorRules">
-      
+
         <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="delFlag" label="鍒犻櫎鏍囪">
           <a-input-number v-model="model.delFlag"/>
         </a-form-model-item>
@@ -48,7 +49,7 @@
         <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="remark" label="澶囨敞">
           <a-input placeholder="璇疯緭鍏ュ娉�" v-model="model.remark" />
         </a-form-model-item>
-		
+
       </a-form-model>
     </a-spin>
   </j-modal>
diff --git a/src/views/eam/dispose/modules/EamEquipmentSealUpModal.vue b/src/views/eam/dispose/modules/EamEquipmentSealUpModal.vue
index 9e552ea..f836dc9 100644
--- a/src/views/eam/dispose/modules/EamEquipmentSealUpModal.vue
+++ b/src/views/eam/dispose/modules/EamEquipmentSealUpModal.vue
@@ -3,6 +3,7 @@
     :title="title"
     :width="800"
     :visible="visible"
+    :okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
     :confirmLoading="confirmLoading"
     switchFullscreen
     @ok="handleOk"
@@ -15,14 +16,14 @@
           <a-input placeholder="缂栫爜绯荤粺鑷姩鐢熸垚" v-model="model.code" disabled />
         </a-form-model-item>
         <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="equipmentId" label="璁惧缂栧彿">
-          <lx-search-equipment-select placeholder="璇疯緭鍏ヨ澶囩紪鍙锋垨鍚嶇О鎼滅储"
+          <lx-search-equipment-select placeholder="璇疯緭鍏ヨ澶囩紪鍙锋垨鍚嶇О鎼滅储" :disabled="disableSubmit"
                                       v-model="model.equipmentId"></lx-search-equipment-select>
         </a-form-model-item>
         <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="sealUpReason" label="灏佸瓨鍘熷洜">
-          <a-input placeholder="璇疯緭鍏ュ皝瀛樺師鍥�" v-model="model.sealUpReason" />
+          <a-input placeholder="璇疯緭鍏ュ皝瀛樺師鍥�" :disabled="disableSubmit" v-model="model.sealUpReason" />
         </a-form-model-item>
         <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="remark" label="澶囨敞">
-          <a-input placeholder="璇疯緭鍏ュ娉�" v-model="model.remark" />
+          <a-input placeholder="璇疯緭鍏ュ娉�" :disabled="disableSubmit" v-model="model.remark" />
         </a-form-model-item>
 
       </a-form-model>
diff --git a/src/views/eam/dispose/modules/EamEquipmentTransferModal.vue b/src/views/eam/dispose/modules/EamEquipmentTransferModal.vue
index 6bd5226..515711c 100644
--- a/src/views/eam/dispose/modules/EamEquipmentTransferModal.vue
+++ b/src/views/eam/dispose/modules/EamEquipmentTransferModal.vue
@@ -3,63 +3,56 @@
     :title="title"
     :width="800"
     :visible="visible"
+    :okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
     :confirmLoading="confirmLoading"
     switchFullscreen
     @ok="handleOk"
     @cancel="handleCancel"
     cancelText="鍏抽棴">
-    
+
     <a-spin :spinning="confirmLoading">
       <a-form-model ref="form" :model="model" :rules="validatorRules">
-      
-        <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="delFlag" label="鍒犻櫎鏍囪">
-          <a-input-number v-model="model.delFlag"/>
-        </a-form-model-item>
         <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="code" label="鍗曟嵁鍙�">
-          <a-input placeholder="璇疯緭鍏ュ崟鎹彿" v-model="model.code" />
+          <a-input placeholder="缂栫爜绯荤粺鑷姩鐢熸垚" v-model="model.code"  disabled/>
         </a-form-model-item>
-        <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="equipmentId" label="璁惧ID">
-          <a-input placeholder="璇疯緭鍏ヨ澶嘔D" v-model="model.equipmentId" />
+        <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="equipmentId" label="璋冨嚭璁惧">
+          <lx-search-equipment-select placeholder="璇疯緭鍏ヨ澶囩紪鍙锋垨鍚嶇О鎼滅储"
+                                      v-model="model.equipmentId"  :disabled="disableSubmit"></lx-search-equipment-select>
         </a-form-model-item>
-        <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="oldDepartId" label="璋冨嚭閮ㄩ棬">
-          <a-input placeholder="璇疯緭鍏ヨ皟鍑洪儴闂�" v-model="model.oldDepartId" />
-        </a-form-model-item>
-        <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="newDepartId" label="璋冨叆閮ㄩ棬">
-          <a-input placeholder="璇疯緭鍏ヨ皟鍏ラ儴闂�" v-model="model.newDepartId" />
-        </a-form-model-item>
-        <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="reportUser" label="鐢宠浜�">
-          <a-input placeholder="璇疯緭鍏ョ敵璇蜂汉" v-model="model.reportUser" />
-        </a-form-model-item>
+<!--        <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="oldDepartId" label="璋冨嚭閮ㄩ棬">-->
+<!--          <a-input placeholder="璇疯緭鍏ヨ皟鍑洪儴闂�" v-model="model.oldDepartId" />-->
+<!--        </a-form-model-item>-->
+          <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="newDepartId" label="璋冨叆杞﹂棿">
+            <a-tree-select v-model="model.newDepartId"
+                           style="width: 100%"
+                           :tree-data="treeData"
+                           :dropdown-style="{ maxHeight: '400px', overflow: 'auto' }"
+                           placeholder="璇烽�夋嫨璋冨叆杞﹂棿"
+                           allow-clear
+                           tree-default-expand-all
+                           :disabled="editable || disableSubmit"
+            >
+            </a-tree-select>
+          </a-form-model-item>
         <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="transferReason" label="鍙樺姩鍘熷洜">
-          <a-input placeholder="璇疯緭鍏ュ彉鍔ㄥ師鍥�" v-model="model.transferReason" />
-        </a-form-model-item>
-        <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="transferStatus" label="鍙樺姩鐘舵��">
-          <a-input placeholder="璇疯緭鍏ュ彉鍔ㄧ姸鎬�" v-model="model.transferStatus" />
-        </a-form-model-item>
-        <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="transferTime" label="鍙樺姩鏃ユ湡">
-          <a-input placeholder="璇疯緭鍏ュ彉鍔ㄦ棩鏈�" v-model="model.transferTime" />
-        </a-form-model-item>
-        <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="approvalUser" label="瀹℃牳浜�">
-          <a-input placeholder="璇疯緭鍏ュ鏍镐汉" v-model="model.approvalUser" />
-        </a-form-model-item>
-        <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="approvalTime" label="瀹℃牳鏃堕棿">
-          <a-input placeholder="璇疯緭鍏ュ鏍告椂闂�" v-model="model.approvalTime" />
+          <a-input placeholder="璇疯緭鍏ュ彉鍔ㄥ師鍥�" v-model="model.transferReason"  :disabled="disableSubmit"/>
         </a-form-model-item>
         <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="remark" label="澶囨敞">
-          <a-input placeholder="璇疯緭鍏ュ娉�" v-model="model.remark" />
+          <a-textarea placeholder="璇疯緭鍏ュ娉�" v-model="model.remark"  :disabled="disableSubmit"/>
         </a-form-model-item>
-		
+
       </a-form-model>
     </a-spin>
   </j-modal>
 </template>
 
 <script>
-  import { httpAction } from '@/api/manage'
-  import moment from "moment"
+  import { httpAction,getAction } from '@/api/manage'
+  import LxSearchEquipmentSelect from '@views/eam/equipment/modules/LxSearchEquipmentSelect.vue'
 
   export default {
     name: "EamEquipmentTransferModal",
+    components: { LxSearchEquipmentSelect },
     data () {
       return {
         title:"鎿嶄綔",
@@ -73,22 +66,52 @@
           xs: { span: 24 },
           sm: { span: 16 },
         },
-
+        labelColLong: {
+          xs: { span: 24 },
+          sm: { span: 4 }
+        },
+        wrapperColLong: {
+          xs: { span: 24 },
+          sm: { span: 18 }
+        },
+        treeData: [],
         confirmLoading: false,
         validatorRules:{
+          newDepartId: [
+            { required: true, message: '璇烽�夋嫨璋冨叆杞﹂棿' }
+          ],
+          equipmentId: [
+            { required: true, message: '璇烽�夋嫨璁惧锛�' }
+          ],
+          transferReason: [
+            { required: true, message: '璇疯緭鍏ュ彉鍔ㄥ師鍥狅紒' }
+          ],
         },
         url: {
           add: "/eam/eamEquipmentTransfer/add",
           edit: "/eam/eamEquipmentTransfer/edit",
+          loadProductionOptions:'/mdc/mdcProduction/loadProductionTreeOptions',
         },
       }
     },
     created () {
+      this.loadAllProductionTree();
     },
     methods: {
+      loadAllProductionTree() {
+        //鍔犺浇杞﹂棿閫夋嫨鏍�
+        getAction(this.url.loadProductionOptions).then(res => {
+          if (res.success) {
+            this.treeData = [...res.result]
+          }else {
+            that.$message.warning(res.message)
+          }
+        })
+      },
       add () {
         //鍒濆鍖栭粯璁ゅ��
         this.edit({});
+        this.visible = true;
       },
       edit (record) {
         this.model = Object.assign({}, record);
diff --git a/src/views/flowable/workflow/FlowTodo.vue b/src/views/flowable/workflow/FlowTodo.vue
index 7245338..9d49b55 100644
--- a/src/views/flowable/workflow/FlowTodo.vue
+++ b/src/views/flowable/workflow/FlowTodo.vue
@@ -138,6 +138,7 @@
     <equipment-seal-up-approval-modal ref="equipmentSealUpApprovalModelRef" @searchReset="searchReset" />
     <inbound-order-handle ref="inboundOrderApprovalModal" :selectInboundOrderData="selectInboundOrderData"
                                      @searchReset="searchReset"></inbound-order-handle>
+    <equipment-transfer-approval-modal ref="equipmentTransferApprovalModelRef" @searchReset="searchReset" />
   </a-card>
 </template>
 
@@ -159,10 +160,10 @@
 import DispatchFileBachHandleStyle from '@views/flowable/workflow/dispatchFile/DispatchFileBachHandleStyle#Drawer.vue'
 import OutBoundOrderHandle from '@views/flowable/workflow/outBoundOrder/OutBoundOrderHandle.vue'
 import EquipmentLeanOutApprovalModal from '@views/flowable/workflow/leanOut/EquipmentLeanOutApprovalModal.vue'
-import SecondMaintenanceApprovalModal
-  from '@views/flowable/workflow/secondMaintenance/SecondMaintenanceApprovalModal.vue'
+import SecondMaintenanceApprovalModal from '@views/flowable/workflow/secondMaintenance/SecondMaintenanceApprovalModal.vue'
 import ThirdMaintenanceApprovalModal from '@views/flowable/workflow/thirdMaintenance/ThirdMaintenanceApprovalModal.vue'
 import EquipmentSealUpApprovalModal from '@views/flowable/workflow/sealUp/EquipmentSealUpApprovalModal.vue'
+import EquipmentTransferApprovalModal from '@views/flowable/workflow/transfer/EquipmentTransferApprovalModal.vue'
 import stocktakingBoundHandle from '@views/flowable/workflow/stocktakingBound/stocktakingBoundHandle.vue'
 import lossBoundHandle from '@views/flowable/workflow/lossBound/lossBoundHandle.vue'
 import InboundOrderHandle from '@views/flowable/workflow/inboundOrder/InboundOrderHandle.vue'
@@ -187,7 +188,8 @@
     ThirdMaintenanceApprovalModal,
     OutBoundOrderHandle,
     EquipmentSealUpApprovalModal,
-    InboundOrderHandle
+    InboundOrderHandle,
+    EquipmentTransferApprovalModal
   },
   data() {
     return {
@@ -368,6 +370,9 @@
         case 'toolInStorageApproval':
           this.handleToolInStorage(item)
           break
+        case 'equipment_transfer':
+          this.handleEquipmentTransfer(item)
+          break
         default:
           alert('娌℃壘鍒拌娴佺▼')
       }
@@ -512,6 +517,12 @@
           this.$refs.inboundOrderApprovalModal.getAllApproveData(item)
       }
     },
+    handleEquipmentTransfer(item) {
+      this.$refs.equipmentTransferApprovalModelRef.visible = true
+      this.$refs.equipmentTransferApprovalModelRef.title = item.name
+      this.$refs.equipmentTransferApprovalModelRef.handleDetail(item)
+      this.$refs.equipmentTransferApprovalModelRef.disableSubmit = false
+    },
   }
 }
 </script>
diff --git a/src/views/flowable/workflow/sealUp/EquipmentSealUpApprovalModal.vue b/src/views/flowable/workflow/sealUp/EquipmentSealUpApprovalModal.vue
index 5d730db..ef2f20f 100644
--- a/src/views/flowable/workflow/sealUp/EquipmentSealUpApprovalModal.vue
+++ b/src/views/flowable/workflow/sealUp/EquipmentSealUpApprovalModal.vue
@@ -161,7 +161,7 @@
   },
   computed: {
     approvalDisable: function() {
-      return ['SEALED', 'WAIT_UNSEALING_AUDIT', 'COMPLETE'].includes(this.model.sealStatus)
+      return ['WAIT_CHECK','SEALED', 'WAIT_UNSEALING_AUDIT', 'COMPLETE'].includes(this.model.sealStatus)
     },
     returnDisable: function() {
       return ['SEALED', 'WAIT_UNSEALING_AUDIT', 'COMPLETE'].includes(this.model.sealStatus)
diff --git a/src/views/flowable/workflow/transfer/EquipmentTransferApprovalModal.vue b/src/views/flowable/workflow/transfer/EquipmentTransferApprovalModal.vue
new file mode 100644
index 0000000..c0f5b68
--- /dev/null
+++ b/src/views/flowable/workflow/transfer/EquipmentTransferApprovalModal.vue
@@ -0,0 +1,235 @@
+<template>
+  <j-modal
+    :title="title"
+    :width="800"
+    :visible="visible"
+    :confirmLoading="confirmLoading"
+    :okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
+    switchFullscreen
+    @ok="handleOk"
+    @cancel="handleCancel"
+    centered
+    cancelText="鍏抽棴">
+
+    <a-spin :spinning="spinning">
+      <a-form-model ref="form" :model="model" :rules="validatorRules">
+        <a-divider orientation="center" style="font-size: large;font-style: italic;color: #66aeed;"> 褰掑睘淇℃伅
+        </a-divider>
+        <a-row :gutter="24">
+          <a-col :span="12">
+            <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="code" label="鍗曟嵁鍙�">
+              <a-input v-model="model.code" disabled />
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="12">
+            <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="equipmentId" label="璁惧缂栫爜">
+              <lx-search-equipment-select placeholder="璇疯緭鍏ヨ澶囩紪鍙锋垨鍚嶇О鎼滅储"
+                                          v-model="model.equipmentId" disabled></lx-search-equipment-select>
+            </a-form-model-item>
+          </a-col>
+        </a-row>
+        <a-row :gutter="24">
+          <a-col :span="12">
+            <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="newDepartId_dictText" label="璋冨叆閮ㄩ棬">
+              <a-input v-model="model.newDepartId_dictText" disabled />
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="12">
+            <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="oldDepartId_dictText" label="璋冨嚭閮ㄩ棬">
+              <a-input v-model="model.oldDepartId_dictText" disabled />
+            </a-form-model-item>
+          </a-col>
+        </a-row>
+        <a-row :gutter="24">
+          <a-col :span="12">
+            <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="reportUser_dictText" label="鐢宠浜�">
+              <a-input v-model="model.reportUser_dictText" disabled />
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="12">
+            <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="transferReason" label="鍙樺姩鍘熷洜">
+              <a-input v-model="model.transferReason" disabled />
+            </a-form-model-item>
+          </a-col>
+        </a-row>
+        <a-row :gutter="24">
+          <a-col :span="24">
+            <a-form-model-item :labelCol="labelColLong" :wrapperCol="wrapperColLong" prop="remark" label="澶囨敞">
+              <a-textarea v-model="model.remark" disabled />
+            </a-form-model-item>
+          </a-col>
+        </a-row>
+        <div v-if="approvalDisable">
+          <a-divider orientation="center" style="font-size: large;font-style: italic;color: #66aeed;"> 绠$悊鍛樺皝瀛樺鏍�
+          </a-divider>
+          <a-row :gutter="24">
+            <a-col :span="12">
+              <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="approvalDealType" label="瀹℃壒绫诲瀷">
+                <j-dict-select-tag type="radio" v-model="model.approvalDealType" dictCode="approved_rejected"
+                                   placeholder="璇烽�夋嫨澶勭悊绫诲瀷" :disabled="disableSubmit || initialAcceptanceDisable" />
+              </a-form-model-item>
+            </a-col>
+            <a-col :span="12">
+              <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="approvalComment" label="瀹℃壒鎰忚">
+                <a-textarea placeholder="璇疯緭鍏ユ剰瑙�" v-model="model.approvalComment"
+                            :disabled="disableSubmit || returnDisable" />
+              </a-form-model-item>
+            </a-col>
+          </a-row>
+        </div>
+      </a-form-model>
+    </a-spin>
+  </j-modal>
+</template>
+
+<script>
+import { getAction, httpAction } from '@/api/manage'
+import LxSearchEquipmentSelect from '@views/eam/equipment/modules/LxSearchEquipmentSelect.vue'
+
+export default {
+  name: 'EquipmentTransferApprovalModal',
+  components: {
+    LxSearchEquipmentSelect
+  },
+  props: {
+    selectShenpiData: {
+      type: Object
+    }
+  },
+  data() {
+    return {
+      title: '鎿嶄綔',
+      visible: false,
+      editable: false,
+      model: {},
+      treeData: [],
+      labelCol: {
+        xs: { span: 24 },
+        sm: { span: 5 }
+      },
+      wrapperCol: {
+        xs: { span: 24 },
+        sm: { span: 18 }
+      },
+      labelColLong: {
+        xs: { span: 24 },
+        sm: { span: 2 }
+      },
+      wrapperColLong: {
+        xs: { span: 24 },
+        sm: { span: 21 }
+      },
+      confirmLoading: false,
+      spinning: false,
+      imageSrc: null,
+      validatorRules: {
+        approvalDealType: [
+          { required: true, message: '璇烽�夋嫨閫氳繃鎴栭┏鍥�!' }
+        ],
+        unsealApprovalDealType: [
+          { required: true, message: '璇烽�夋嫨閫氳繃鎴栭┏鍥�!' }
+        ],
+        approvalComment: [
+          { required: true, message: '璇疯緭鍏ュ鎵规剰瑙�!' }
+        ],
+        unsealApprovalComment: [
+          { required: true, message: '璇疯緭鍏ュ鎵规剰瑙�!' }
+        ],
+        returnComment: [
+          { required: true, message: '璇疯緭鍏ュ綊杩樺娉�!' }
+        ],
+        confirmComment: [
+          { required: true, message: '璇疯緭鍏ョ‘璁ゆ剰瑙�!' }
+        ]
+      },
+      url: {
+        queryById: '/eam/eamEquipmentTransfer/queryById',
+        approval: '/eam/eamEquipmentTransfer/approval',
+        loadProductionOptions: '/mdc/mdcProduction/loadProductionTreeOptions'
+      },
+      disableSubmit: false
+    }
+  },
+  created() {
+    this.loadAllProductionTree()
+  },
+  computed: {
+    approvalDisable: function() {
+      return ['WAIT_CHECK'].includes(this.model.transferStatus)
+    },
+  },
+  methods: {
+    async handleDetail(item) {
+      this.initParams()
+      this.model = {}
+      let res = await getAction(this.url.queryById, { id: item.dataId })
+      this.model = Object.assign({}, res.result)
+      this.model.dataId = item.dataId
+      this.model.taskId = item.id
+      this.model.userId = item.assignee
+      this.model.instanceId = item.procInstId
+      this.model.values = item.variables
+      this.spinning = false;
+    },
+
+    recordDetail(record) {
+      console.log('record', record)
+      this.initParams()
+      this.model = Object.assign({}, record)
+    },
+
+    initParams() {
+      this.visible = true
+      this.spinning = true
+    },
+
+    async handleOk() {
+      const that = this
+      // 瑙﹀彂琛ㄥ崟楠岃瘉
+      this.$refs.form.validate(valid => {
+        if (valid) {
+          that.confirmLoading = that.spinning = true
+          let httpurl = this.url.approval
+          let method = 'put'
+          httpAction(httpurl, this.model, method).then((res) => {
+            if (res.success) {
+              that.$message.success(res.message)
+              that.$emit('searchReset')
+              that.close()
+            } else {
+              that.$message.warning(res.message)
+            }
+          }).finally(() => {
+            that.confirmLoading = that.spinning = false
+          })
+        } else {
+          return false
+        }
+      })
+    },
+    handleCancel() {
+      this.close()
+    },
+
+    close() {
+      this.$emit('close')
+      this.visible = false
+      this.$refs.form.clearValidate()
+    },
+    loadAllProductionTree() {
+      //鍔犺浇杞﹂棿閫夋嫨鏍�
+      getAction(this.url.loadProductionOptions).then(res => {
+        if (res.success) {
+          this.treeData = [...res.result]
+        } else {
+          that.$message.warning(res.message)
+        }
+      })
+    }
+  }
+}
+</script>
+
+<style lang="less" scoped>
+
+</style>
\ No newline at end of file

--
Gitblit v1.9.3