From b1c4b9509b3b84594bbc9a541f308101d3a17140 Mon Sep 17 00:00:00 2001 From: lyh <925863403@qq.com> Date: 星期四, 24 七月 2025 10:20:56 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/master' --- src/views/eam/technical/EamTechnicalStatusDeactivateList.vue | 349 +++-- src/views/eam/technical/modules/EamTechnicalStatusChangeModal.vue | 54 src/views/flowable/workflow/TechnicalStatusEvaluation/TechnicalStatusEvaluationApplicationApprovalModal.vue | 353 ++++++ src/views/eam/maintenance/EamThirdMaintenanceOrderList.vue | 11 src/views/eam/technical/modules/EamTechnicalStatusChangeEquipmentDetail.vue | 170 +++ src/views/eam/technical/modules/EamTechnicalStatusEquipmentAcceptanceModal.vue | 100 + src/views/eam/technical/EamTechnicalStatusChangeList.vue | 38 src/views/eam/technical/EamTechnicalStatusEvaluationApplicationList.vue | 395 ++++--- src/views/eam/base/EamMaintenanceStandardList.vue | 53 src/views/flowable/workflow/MaintenanceStandard/MaintenanceStandardApprovalModal.vue | 299 +++- /dev/null | 208 --- src/views/eam/maintenance/EamInspectionOrderList.vue | 12 src/views/flowable/workflow/secondMaintenance/SecondMaintenanceApprovalModal.vue | 32 src/views/flowable/workflow/TechnicalStatus/TechnicalStatusDeactivateApprovalModal.vue | 386 +++++++ src/views/eam/repair/EamRepairOrderList.vue | 29 src/views/eam/technical/modules/EamTechnicalStatusDeactivateModal.vue | 329 ++++- src/views/flowable/workflow/TechnicalStatusEvaluation/TechnicalStatusEvaluationApprovalModal.vue | 26 src/views/flowable/workflow/TechnicalStatusEvaluation/TechnicalStatusEvaluationOrderChangeApprovalModal.vue | 6 src/views/eam/base/modules/EamMaintenanceStandardModal.vue | 1 src/views/flowable/workflow/FlowTodo.vue | 50 src/views/flowable/workflow/TechnicalStatus/TechnicalStatusChangeApprovalModal.vue | 4 src/views/eam/equipment/modules/LxSearchEquipmentSelect.vue | 7 src/views/eam/maintenance/EamSecondMaintenanceOrderList.vue | 21 src/views/eam/technical/modules/EamTechnicalStatusEvaluationApplicationModal.vue | 196 +-- 24 files changed, 2,173 insertions(+), 956 deletions(-) diff --git a/src/views/eam/base/EamMaintenanceStandardList.vue b/src/views/eam/base/EamMaintenanceStandardList.vue index e1e7223..a3af2bd 100644 --- a/src/views/eam/base/EamMaintenanceStandardList.vue +++ b/src/views/eam/base/EamMaintenanceStandardList.vue @@ -117,12 +117,19 @@ </a-popconfirm> </template> - <template v-if="record.standardStatus != 'WAIT_SUBMIT'"> + <template v-if="record.standardStatus !== 'WAIT_SUBMIT'"> <a-divider v-has="'standard:delete'" type="vertical" v-if="record.standardStatus=='START'"/> <a-popconfirm title="纭畾鍒犻櫎鍚�?" @confirm="() => handleDelete(record.id)"> <a v-has="'standard:delete'" @click.stop="event=>event.stopPropagation()">鍒犻櫎</a> </a-popconfirm> + </template> + + <template + v-if="record.standardStatus !== 'WAIT_SUBMIT'&&record.standardStatus!=='ABOLISH'&&record.standardStatus!=='START'"> + <a-divider type="vertical"/> + + <a @click.stop="handleDetail(record)">璇︽儏</a> </template> </span> </a-table> @@ -160,6 +167,9 @@ <!-- 琛ㄥ崟鍖哄煙 --> <eamMaintenanceStandard-modal ref="modalForm" @ok="modalFormOk"/> + + <!--瀹℃壒绐楀彛--> + <maintenance-standard-approval-modal ref="maintenanceStandardApprovalModal" :selectShenpiData="selectedRowData"/> </a-card> </template> @@ -170,6 +180,8 @@ import EamMaintenanceStandardDetailList from '@views/eam/base/modules/EamMaintenanceStandardDetailList' import { deleteAction, getAction, templateXlsDownload } from '@api/manage' import LxSearchEquipmentSelect from '@views/eam/equipment/modules/LxSearchEquipmentSelect.vue' + import MaintenanceStandardApprovalModal + from '../../flowable/workflow/MaintenanceStandard/MaintenanceStandardApprovalModal' export default { @@ -182,6 +194,7 @@ } }, components: { + MaintenanceStandardApprovalModal, LxSearchEquipmentSelect, EamMaintenanceStandardModal, EamMaintenanceStandardDetailList @@ -190,22 +203,28 @@ return { description: '淇濆吇瑙勮寖椤甸潰', disableMixinCreated: true, + selectedRowData: {}, // 琛ㄥご columns: [ { title: '缁熶竴缂栫爜', align: 'center', - dataIndex: 'equipmentCode' + dataIndex: 'equipmentCode', }, { title: '璁惧鍚嶇О', align: 'center', - dataIndex: 'equipmentName' + dataIndex: 'equipmentName', }, { title: '璁惧鍨嬪彿', align: 'center', - dataIndex: 'equipmentModel' + dataIndex: 'equipmentModel', + }, + { + title: '瑙勮寖鐘舵��', + align: 'center', + dataIndex: 'standardStatus_dictText', }, { title: '淇濆吇鍒嗙被', @@ -228,30 +247,21 @@ title: '淇濆吇鍛ㄦ湡', align: 'center', dataIndex: 'maintenancePeriod', - width: 100 }, { title: '淇濆吇鍛ㄦ湡鍗曚綅', align: 'center', dataIndex: 'periodUnit', - width: 120 }, { title: '鍒濆鏃ユ湡', align: 'center', dataIndex: 'initialDate', - width: 100 - }, - { - title: '瑙勮寖鐘舵��', - align: 'center', - dataIndex: 'standardStatus_dictText' }, { title: '瑙勮寖鐗堟湰', align: 'center', dataIndex: 'standardVersion', - width: 100 } ], url: { @@ -357,13 +367,28 @@ }) }, + /** + * 鐐瑰嚮鍗囩増鏃惰Е鍙戞椂瑙﹀彂 + * @param record + */ handleUpgrade(record) { - //鍗囩増 this.$refs.modalForm.upgrade(record) this.$refs.modalForm.title = '鍗囩増' this.$refs.modalForm.disableSubmit = false }, + /** + * 鐐瑰嚮璇︽儏鏃惰Е鍙戞椂瑙﹀彂 + * @param record + */ + handleDetail(record) { + this.selectedRowData = Object.assign({}, record) + this.$refs.maintenanceStandardApprovalModal.title = '璇︽儏' + this.$refs.maintenanceStandardApprovalModal.disableSubmit = true + this.$refs.maintenanceStandardApprovalModal.visible = true + this.$refs.maintenanceStandardApprovalModal.handleDetail(record) + }, + batchDel() { var ids = '' for (var a = 0; a < this.selectedRowKeys.length; a++) { diff --git a/src/views/eam/base/modules/EamMaintenanceStandardModal.vue b/src/views/eam/base/modules/EamMaintenanceStandardModal.vue index 622596d..72ae064 100644 --- a/src/views/eam/base/modules/EamMaintenanceStandardModal.vue +++ b/src/views/eam/base/modules/EamMaintenanceStandardModal.vue @@ -248,6 +248,7 @@ title: '淇濆吇閮ㄤ綅', key: 'itemPart', type: JVXETypes.textarea, + placeholder: '璇疯緭鍏�${title}', slotName: 'itemPart', align: 'center', validateRules: [{ required: true, message: '璇疯緭鍏�${title}' }] diff --git a/src/views/eam/equipment/modules/LxSearchEquipmentSelect.vue b/src/views/eam/equipment/modules/LxSearchEquipmentSelect.vue index e04b5bc..ec840e2 100644 --- a/src/views/eam/equipment/modules/LxSearchEquipmentSelect.vue +++ b/src/views/eam/equipment/modules/LxSearchEquipmentSelect.vue @@ -79,6 +79,13 @@ this.initSelectValue() } } + }, + factoryOrgCode:{ + handler(val){ + if(val){ + this.loadData() + } + } } }, methods: { diff --git a/src/views/eam/maintenance/EamInspectionOrderList.vue b/src/views/eam/maintenance/EamInspectionOrderList.vue index c8d5ae1..7342365 100644 --- a/src/views/eam/maintenance/EamInspectionOrderList.vue +++ b/src/views/eam/maintenance/EamInspectionOrderList.vue @@ -40,7 +40,6 @@ <!-- 鎿嶄綔鎸夐挳鍖哄煙 --> <div class="table-operator" v-if="isDisplayOperation"> <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')" v-has="'eam:inspection:abolish'"> @@ -172,6 +171,12 @@ fixed: 'left' }, { + title: '鐐规鐘舵��', + align: 'center', + dataIndex: 'inspectionStatus_dictText', + fixed: 'left' + }, + { title: '宸ュ崟鍙�', align: 'center', dataIndex: 'orderNum' @@ -203,11 +208,6 @@ title: '鍒涘缓鏂瑰紡', align: 'center', dataIndex: 'creationMethod_dictText' - }, - { - title: '鐐规鐘舵��', - align: 'center', - dataIndex: 'inspectionStatus_dictText' }, { title: '鐐规浜�', diff --git a/src/views/eam/maintenance/EamSecondMaintenanceOrderList.vue b/src/views/eam/maintenance/EamSecondMaintenanceOrderList.vue index 3880652..3278e93 100644 --- a/src/views/eam/maintenance/EamSecondMaintenanceOrderList.vue +++ b/src/views/eam/maintenance/EamSecondMaintenanceOrderList.vue @@ -189,6 +189,12 @@ fixed: 'left' }, { + title: '淇濆吇鐘舵��', + align: 'center', + dataIndex: 'maintenanceStatus_dictText', + fixed: 'left' + }, + { title: '宸ュ崟鍙�', align: 'center', dataIndex: 'orderNum' @@ -222,11 +228,6 @@ title: '缁翠慨宸�', align: 'center', dataIndex: 'repairman_dictText' - }, - { - title: '淇濆吇鐘舵��', - align: 'center', - dataIndex: 'maintenanceStatus_dictText' }, { title: '鍒涘缓鏂瑰紡', @@ -263,10 +264,10 @@ list: '/eam/secondMaintenanceOrder/list', abolish: '/eam/secondMaintenanceOrder/abolish', collect: '/eam/secondMaintenanceOrder/collect', - restore:'/eam/secondMaintenanceOrder/restore', + restore: '/eam/secondMaintenanceOrder/restore', abolishBatch: '/eam/secondMaintenanceOrder/abolishBatch', collectBatch: '/eam/secondMaintenanceOrder/collectBatch', - restoreBatch: '/eam/secondMaintenanceOrder/restoreBatch', + restoreBatch: '/eam/secondMaintenanceOrder/restoreBatch' } } }, @@ -325,7 +326,7 @@ this.$refs.secondMaintenanceApprovalModal.title = '璇︽儏' this.$refs.secondMaintenanceApprovalModal.visible = true this.$refs.secondMaintenanceApprovalModal.disableSubmit = true - this.$refs.secondMaintenanceApprovalModal.recordDetail(record) + this.$refs.secondMaintenanceApprovalModal.handleDetail(record) }, /** @@ -388,7 +389,7 @@ }) }, //杩樺師 - handlerRestore(id){ + handlerRestore(id) { let that = this this.loading = true getAction(that.url.restore, { id }) @@ -409,7 +410,7 @@ }) }, //鎵归噺杩樺師 - handlerBatchRestore(){ + handlerBatchRestore() { if (!this.url.restoreBatch) { this.$message.error('璇疯缃畊rl.restoreBatch灞炴��!') return diff --git a/src/views/eam/maintenance/EamThirdMaintenanceOrderList.vue b/src/views/eam/maintenance/EamThirdMaintenanceOrderList.vue index f0ec1cb..b3aa941 100644 --- a/src/views/eam/maintenance/EamThirdMaintenanceOrderList.vue +++ b/src/views/eam/maintenance/EamThirdMaintenanceOrderList.vue @@ -148,6 +148,12 @@ fixed: 'left' }, { + title: '淇濆吇鐘舵��', + align: 'center', + dataIndex: 'maintenanceStatus_dictText', + fixed: 'left' + }, + { title: '宸ュ崟鍙�', align: 'center', dataIndex: 'orderNum' @@ -176,11 +182,6 @@ title: '缁翠慨浜�', align: 'center', dataIndex: 'repairman_dictText' - }, - { - title: '淇濆吇鐘舵��', - align: 'center', - dataIndex: 'maintenanceStatus_dictText' }, { title: '鍒涘缓鏂瑰紡', diff --git a/src/views/eam/repair/EamRepairOrderList.vue b/src/views/eam/repair/EamRepairOrderList.vue index 34f03c0..29f3659 100644 --- a/src/views/eam/repair/EamRepairOrderList.vue +++ b/src/views/eam/repair/EamRepairOrderList.vue @@ -35,11 +35,11 @@ <!-- 鎿嶄綔鎸夐挳鍖哄煙 --> <div class="table-operator" v-if="isDisplayOperation"> - <a-dropdown v-if="selectedRowKeys.length > 0"> + <a-dropdown :disabled="selectedRowKeys.length == 0"> <a-menu slot="overlay"> - <a-menu-item key="1" @click="batchDel"> - <a-icon type="delete"/> - 鍒犻櫎 + <a-menu-item key="1" @click="handleBatchSubmit"> + <a-icon type="form"/> + 鎻愪氦 </a-menu-item> </a-menu> <a-button style="margin-left: 8px"> 鎵归噺鎿嶄綔 @@ -61,13 +61,15 @@ :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}" @change="handleTableChange" :scroll="{x:'max-content'}"> <span slot="action" slot-scope="text, record"> - <a v-if="record.repairStatus === 'PENDING_REPAIR' || record.repairStatus === 'UNDER_MAINTENANCE'" @click="handleFillIn(record)">濉姤</a> - <a-divider v-if="record.repairStatus === 'PENDING_REPAIR' || record.repairStatus === 'UNDER_MAINTENANCE'" type="vertical"/> - <a-popconfirm v-if="record.repairStatus === 'PENDING_REPAIR' || record.repairStatus === 'UNDER_MAINTENANCE'" title="纭畾鎻愪氦鍚�?" @confirm="() => handleSubmit(record.id)"> - <a>鎻愪氦</a> - </a-popconfirm> - <a-divider v-if="record.repairStatus === 'PENDING_REPAIR' || record.repairStatus === 'UNDER_MAINTENANCE'" type="vertical"/> - <a @click="handleDetail(record)">璇︽儏</a> + <template v-if="record.repairStatus=='PENDING_REPAIR'||record.repairStatus=='UNDER_MAINTENANCE'"> + <a @click="handleFillIn(record)">濉姤</a> + <a-divider type="vertical"/> + <a-popconfirm title="纭畾鎻愪氦鍚�?" @confirm="() => handleSubmit(record.id)"> + <a>鎻愪氦</a> + </a-popconfirm> + </template> + + <a v-else @click="handleDetail(record)">璇︽儏</a> </span> </a-table> </div> @@ -261,6 +263,11 @@ }) }, + // 鎵归噺鎻愪氦鏃惰Е鍙� + handleBatchSubmit() { + + }, + /** * 鐐瑰嚮璇︽儏瑙﹀彂 * @param record 琛ㄦ牸琛屼俊鎭� diff --git a/src/views/eam/technical/EamTechnicalStatusChangeList.vue b/src/views/eam/technical/EamTechnicalStatusChangeList.vue index 0cbd6cc..cd4a84d 100644 --- a/src/views/eam/technical/EamTechnicalStatusChangeList.vue +++ b/src/views/eam/technical/EamTechnicalStatusChangeList.vue @@ -47,30 +47,37 @@ <!-- table鍖哄煙-begin --> <a-table ref="table" size="middle" bordered rowKey="id" :columns="columns" :dataSource="dataSource" - :pagination="ipagination" :loading="loading" :scroll="{x:'max-content'}"> + :pagination="ipagination" :loading="loading" :scroll="{x:'max-content'}" @change="handleTableChange" + :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange,type:'radio'}" + :customRow="customRow"> <span slot="action" slot-scope="text, record"> <template v-if="record.changeStatus=='WAIT_SUBMIT'"> - <a @click="handleEdit(record)">缂栬緫</a> + <a @click.stop="handleEdit(record)">缂栬緫</a> <a-divider type="vertical"/> <a-popconfirm title="纭畾鎻愪氦鍚楋紵" @confirm="handleSubmit(record.id)"> - <a>鎻愪氦</a> + <a @click="e=>e.stopPropagation()">鎻愪氦</a> </a-popconfirm> <a-divider type="vertical"/> <a-popconfirm title="纭畾浣滃簾鍚楋紵" @confirm="handleAbolish(record.id)"> - <a>浣滃簾</a> + <a @click="e=>e.stopPropagation()">浣滃簾</a> </a-popconfirm> </template> - <a @click="handleDetail(record)" + <a @click.stop="handleDetail(record)" v-if="record.changeStatus!='WAIT_SUBMIT'&&record.changeStatus!='ABOLISH'">璇︽儏</a> </span> </a-table> - <!-- table鍖哄煙-end --> + + <a-tabs v-if="selectedRowKeys.length>0"> + <a-tab-pane tab="璁惧鏄庣粏"> + <eam-technical-status-change-equipment-detail :selectedRow="selectionRows[0]"/> + </a-tab-pane> + </a-tabs> <!-- 琛ㄥ崟鍖哄煙 --> <eamTechnicalStatusChange-modal ref="modalForm" @ok="modalFormOk" :productionTreeData="productionTreeData"/> @@ -87,11 +94,13 @@ import { getAction } from '@/api/manage' import TechnicalStatusChangeApprovalModal from '../../flowable/workflow/TechnicalStatus/TechnicalStatusChangeApprovalModal' + import EamTechnicalStatusChangeEquipmentDetail from './modules/EamTechnicalStatusChangeEquipmentDetail' export default { name: 'EamTechnicalStatusChangeList', mixins: [JeecgListMixin], components: { + EamTechnicalStatusChangeEquipmentDetail, TechnicalStatusChangeApprovalModal, EamTechnicalStatusChangeModal }, @@ -133,7 +142,7 @@ { title: '浣跨敤鍗曚綅瀹ょ骇涓荤绛惧瓧', align: 'center', - dataIndex: 'departHeaderSignature' + dataIndex: 'departHeaderSignature_dictText' }, { title: '浣跨敤鍗曚綅瀹ょ骇涓荤绛惧瓧鏃堕棿', @@ -143,7 +152,7 @@ { title: '浣跨敤鍗曚綅閮ㄧ骇涓荤绛惧瓧', align: 'center', - dataIndex: 'departLeaderSignature' + dataIndex: 'departLeaderSignature_dictText' }, { title: '浣跨敤鍗曚綅閮ㄧ骇涓荤绛惧瓧鏃堕棿', @@ -255,6 +264,19 @@ this.$refs.technicalStatusChangeApprovalModal.handleDetail(record) }, + customRow(record) { + return { + style: { + cursor: 'pointer' + }, + on: { + click: event => { + this.onSelectChange([record.id], [record]) + } + } + } + }, + /** * 鐢宠鏃堕棿鍙戠敓鏀瑰彉鏃惰Е鍙� * @param dateStringArray diff --git a/src/views/eam/technical/EamTechnicalStatusDeactivateList.vue b/src/views/eam/technical/EamTechnicalStatusDeactivateList.vue index b419324..3e4ce41 100644 --- a/src/views/eam/technical/EamTechnicalStatusDeactivateList.vue +++ b/src/views/eam/technical/EamTechnicalStatusDeactivateList.vue @@ -1,46 +1,39 @@ <template> <a-card :bordered="false"> - <!-- 鏌ヨ鍖哄煙 --> <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-form-item> - </a-col> - <a-col :xl="6" :lg="7" :md="8" :sm="24"> + <a-col :xl="4" :lg="6" :md="8" :sm="12"> <a-form-item label="鍋滅敤鍗曞彿"> - <a-input placeholder="璇疯緭鍏ュ仠鐢ㄥ崟鍙�" v-model="queryParam.deactivateOrderNum"></a-input> + <a-input placeholder="璇疯緭鍏ュ仠鐢ㄥ崟鍙�" v-model="queryParam.deactivateOrderNum"/> </a-form-item> </a-col> - <template v-if="toggleSearchStatus"> - <a-col :xl="6" :lg="7" :md="8" :sm="24"> - <a-form-item label="鐢宠浜�"> - <a-input placeholder="璇疯緭鍏ョ敵璇蜂汉" v-model="queryParam.applicant"></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.factoryOrgCode"></a-input> - </a-form-item> - </a-col> - <a-col :xl="6" :lg="7" :md="8" :sm="24"> + <a-col :xl="6" :lg="7" :md="8" :sm="12"> <a-form-item label="鐢宠鏃ユ湡"> - <a-input placeholder="璇疯緭鍏ョ敵璇锋棩鏈�" v-model="queryParam.applyDate"></a-input> + <a-range-picker v-model="queryParam.applyDate" value-format="YYYY-MM-DD" @change="handleDateRangeChange"/> </a-form-item> </a-col> - </template> - <a-col :xl="6" :lg="7" :md="8" :sm="24"> + <a-col :xl="5" :lg="6" :md="8" :sm="12"> + <a-form-item label="鐢宠鍗曠姸鎬�"> + <j-dict-select-tag placeholder="璇烽�夋嫨鐢宠鍗曠姸鎬�" v-model="queryParam.applicationStatus" + dict-code="technical_status_deactivate_status"/> + </a-form-item> + </a-col> + <a-col :xl="6" :lg="7" :md="8" :sm="12"> + <a-form-item label="鐢宠閮ㄩ棬"> + <a-tree-select v-model="queryParam.factoryOrgCode" style="width: 100%" :tree-data="productionTreeData" + show-search :replaceFields="{key:'orgCode',value:'orgCode'}" + treeNodeFilterProp="title" searchPlaceholder="璇疯緭鍏ュ叧閿瓧鎼滅储" + :dropdown-style="{ maxHeight: '400px', overflow: 'auto' }" placeholder="璇烽�夋嫨鐢宠閮ㄩ棬" + allow-clear tree-default-expand-all/> + </a-form-item> + </a-col> + + <a-col :xl="3" :lg="6" :md="8" :sm="12"> <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons"> <a-button type="primary" @click="searchQuery" icon="search">鏌ヨ</a-button> <a-button type="info" @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> </span> </a-col> @@ -51,180 +44,242 @@ <!-- 鎿嶄綔鎸夐挳鍖哄煙 --> <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> + <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> - - <a-table - ref="table" - size="middle" - bordered - rowKey="id" - :columns="columns" - :dataSource="dataSource" - :pagination="ipagination" - :loading="loading" - class="j-table-force-nowrap" - :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}" - @change="handleTableChange"> + <a-table ref="table" size="middle" bordered rowKey="id" :columns="columns" :dataSource="dataSource" + :pagination="ipagination" :loading="loading" :scroll="{x:'max-content'}" @change="handleTableChange"> <span slot="action" slot-scope="text, record"> - <a @click="handleEdit(record)">缂栬緫</a> + <template v-if="record.applicationStatus=='WAIT_SUBMIT'"> + <a @click.stop="handleEdit(record)">缂栬緫</a> - <a-divider type="vertical" /> - <a-dropdown> - <a class="ant-dropdown-link">鏇村 <a-icon type="down" /></a> - <a-menu slot="overlay"> - <a-menu-item> - <a-popconfirm title="纭畾鍒犻櫎鍚�?" @confirm="() => handleDelete(record.id)"> - <a>鍒犻櫎</a> - </a-popconfirm> - </a-menu-item> - </a-menu> - </a-dropdown> + <a-divider type="vertical"/> + + <a-popconfirm title="纭畾鎻愪氦鍚楋紵" @confirm="handleSubmit(record.id)"> + <a @click="e=>e.stopPropagation()">鎻愪氦</a> + </a-popconfirm> + + <a-divider type="vertical"/> + + <a-popconfirm title="纭畾浣滃簾鍚楋紵" @confirm="handleAbolish(record.id)"> + <a @click="e=>e.stopPropagation()">浣滃簾</a> + </a-popconfirm> + </template> + + <a @click.stop="handleDetail(record)" + v-if="record.applicationStatus!='WAIT_SUBMIT'&&record.applicationStatus!='ABOLISH'">璇︽儏</a> </span> - - </a-table> - </div> + </a-table> <!-- table鍖哄煙-end --> <!-- 琛ㄥ崟鍖哄煙 --> - <eamTechnicalStatusDeactivate-modal ref="modalForm" @ok="modalFormOk"></eamTechnicalStatusDeactivate-modal> + <eamTechnicalStatusDeactivate-modal ref="modalForm" @ok="modalFormOk" :productionTreeData="productionTreeData"/> + + <!--瀹℃壒绐楀彛--> + <technical-status-deactivate-approval-modal ref="technicalStatusDeactivateApprovalModal" + :selectShenpiData="selectedRowData"/> </a-card> </template> <script> - import '@/assets/less/TableExpand.less' import EamTechnicalStatusDeactivateModal from './modules/EamTechnicalStatusDeactivateModal' import { JeecgListMixin } from '@/mixins/JeecgListMixin' + import { getAction } from '@/api/manage' + import TechnicalStatusDeactivateApprovalModal + from '../../flowable/workflow/TechnicalStatus/TechnicalStatusDeactivateApprovalModal' export default { - name: "EamTechnicalStatusDeactivateList", - mixins:[JeecgListMixin], + name: 'EamTechnicalStatusDeactivateList', + mixins: [JeecgListMixin], components: { + TechnicalStatusDeactivateApprovalModal, EamTechnicalStatusDeactivateModal }, - data () { + data() { return { description: '鍋滅敤鍔犲伐璁惧鐢宠鍗曠鐞嗛〉闈�', + productionTreeData: [], + selectedRowData: {}, // 琛ㄥご columns: [ { title: '#', dataIndex: '', - key:'rowIndex', - width:60, - align:"center", - customRender:function (t,r,index) { - return parseInt(index)+1; + key: 'rowIndex', + width: 60, + align: 'center', + customRender: function(t, r, index) { + return parseInt(index) + 1 } - }, - { - title: '鍒犻櫎鏍囪', - align:"center", - dataIndex: 'delFlag' - }, - { + }, + { title: '鍋滅敤鍗曞彿', - align:"center", + align: 'center', dataIndex: 'deactivateOrderNum' - }, - { + }, + { title: '鐢宠浜�', - align:"center", - dataIndex: 'applicant' - }, - { + align: 'center', + dataIndex: 'applicant_dictText' + }, + { title: '鐢宠閮ㄩ棬', - align:"center", - dataIndex: 'factoryOrgCode' - }, - { + align: 'center', + dataIndex: 'factoryOrgCode_dictText' + }, + { title: '鐢宠鏃ユ湡', - align:"center", + align: 'center', dataIndex: 'applyDate' - }, - { - title: '鐢宠鍗曠姸鎬�;寰呮彁浜ゃ�佸緟鍗曚綅瀹ょ骇棰嗗瀹℃牳銆佺敓浜ц澶囩鐞嗕富绠″鏍搞�佸緟淇濋殰閮ㄩ瀵煎鏍搞�佸凡浣滃簾銆佸凡瀹屾垚', - align:"center", - dataIndex: 'applicationStatus' - }, - { + }, + { + title: '鐢宠鍗曠姸鎬�', + align: 'center', + dataIndex: 'applicationStatus_dictText' + }, + { title: '浣跨敤鍗曚綅瀹や富绠$瀛�', - align:"center", + align: 'center', dataIndex: 'departHeaderSignature' - }, - { + }, + { title: '浣跨敤鍗曚綅瀹や富绠$瀛楁椂闂�', - align:"center", + align: 'center', dataIndex: 'departHeaderSignatureTime' - }, - { - title: '浣跨敤鍗曚綅瀹や富绠℃剰瑙�', - align:"center", - dataIndex: 'departHeaderSignatureComment' - }, - { + }, + { title: '浣跨敤鍗曚綅閮ㄤ富绠$瀛�', - align:"center", + align: 'center', dataIndex: 'departLeaderSignature' - }, - { + }, + { title: '浣跨敤鍗曚綅閮ㄤ富绠$瀛楁椂闂�', - align:"center", + align: 'center', dataIndex: 'departLeaderSignatureTime' - }, - { - title: '浣跨敤鍗曚綅閮ㄤ富绠$瀛�', - align:"center", - dataIndex: 'departLeaderSignatureComment' - }, - { + }, + { title: 'HF缂栫爜', - align:"center", + align: 'center', dataIndex: 'hfCode' - }, + }, { title: '鎿嶄綔', dataIndex: 'action', - align:"center", + align: 'center', scopedSlots: { customRender: 'action' }, + width: 200, + fixed: 'right' } ], - url: { - list: "/eam/eamTechnicalStatusDeactivate/list", - delete: "/eam/eamTechnicalStatusDeactivate/delete", - deleteBatch: "/eam/eamTechnicalStatusDeactivate/deleteBatch", - exportXlsUrl: "eam/eamTechnicalStatusDeactivate/exportXls", - importExcelUrl: "eam/eamTechnicalStatusDeactivate/importExcel", - }, - } - }, - computed: { - importExcelUrl: function(){ - return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`; - } - }, + url: { + list: '/eam/eamTechnicalStatusDeactivate/list', + submit: '/eam/eamTechnicalStatusDeactivate/submit', + abolish: '/eam/eamTechnicalStatusDeactivate/abolish', + getProductionTreeList: '/eam/BaseFactory/queryTreeList' + } + } + }, + created() { + this.getProductionTreeDataByApi() + }, methods: { - + // 鑾峰彇鐢宠閮ㄩ棬鏍� + getProductionTreeDataByApi() { + getAction(this.url.getProductionTreeList) + .then(res => { + if (res.success) { + this.productionTreeData = res.result + } else { + this.$notification.warning({ + message: '娑堟伅', + description: res.message + }) + } + }) + }, + + /** + * 鎻愪氦鏃惰Е鍙� + * @param id + */ + handleSubmit(id) { + const that = this + that.loading = true + getAction(this.url.submit, { id }) + .then(res => { + if (res.success) { + that.$notification.success({ + message: '娑堟伅', + description: res.message + }) + that.loadData() + } else { + that.$notification.warning({ + message: '娑堟伅', + description: res.message + }) + that.loading = false + } + }) + }, + + /** + * 浣滃簾鏃惰Е鍙� + * @param id + */ + handleAbolish(id) { + const that = this + that.loading = true + getAction(this.url.abolish, { id }) + .then(res => { + if (res.success) { + that.$notification.success({ + message: '娑堟伅', + description: res.message + }) + that.loadData() + } else { + that.$notification.warning({ + message: '娑堟伅', + description: res.message + }) + that.loading = false + } + }) + }, + + /** + * 鐐瑰嚮璇︽儏鏃惰Е鍙戞椂瑙﹀彂 + * @param record + */ + handleDetail(record) { + this.selectedRowData = Object.assign({}, record) + this.$refs.technicalStatusDeactivateApprovalModal.title = '璇︽儏' + this.$refs.technicalStatusDeactivateApprovalModal.disableSubmit = true + this.$refs.technicalStatusDeactivateApprovalModal.visible = true + this.$refs.technicalStatusDeactivateApprovalModal.handleDetail(record) + }, + + /** + * 鐢宠鏃ユ湡鍊煎彂鐢熸敼鍙樻椂瑙﹀彂 + * @param dateStringArray + */ + handleDateRangeChange(dateStringArray) { + this.queryParam.dateBegin = dateStringArray[0] + this.queryParam.dateEnd = dateStringArray[1] + } } } -</script> -<style scoped> - @import '~@assets/less/common.less'; -</style> \ No newline at end of file +</script> \ No newline at end of file diff --git a/src/views/eam/technical/EamTechnicalStatusEvaluationApplicationList.vue b/src/views/eam/technical/EamTechnicalStatusEvaluationApplicationList.vue index 18d6f4d..4a5127d 100644 --- a/src/views/eam/technical/EamTechnicalStatusEvaluationApplicationList.vue +++ b/src/views/eam/technical/EamTechnicalStatusEvaluationApplicationList.vue @@ -1,49 +1,45 @@ <template> <a-card :bordered="false"> - <!-- 鏌ヨ鍖哄煙 --> <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 :xl="5" :lg="6" :md="8" :sm="12"> + <a-form-item label="缁熶竴缂栫爜"> + <lx-search-equipment-select placeholder="璇疯緭鍏ョ粺涓�缂栫爜鎴栧悕绉版悳绱�" v-model="queryParam.equipmentId"/> </a-form-item> </a-col> - <a-col :xl="6" :lg="7" :md="8" :sm="24"> + <a-col :xl="4" :lg="6" :md="8" :sm="12"> <a-form-item label="鐢宠鍗曞彿"> - <a-input placeholder="璇疯緭鍏ョ敵璇峰崟鍙�" v-model="queryParam.applicationOrderNum"></a-input> + <a-input placeholder="璇疯緭鍏ョ敵璇峰崟鍙�" v-model="queryParam.applicationOrderNum"/> </a-form-item> </a-col> - <template v-if="toggleSearchStatus"> - <a-col :xl="6" :lg="7" :md="8" :sm="24"> - <a-form-item label="鐢宠浜�"> - <a-input placeholder="璇疯緭鍏ョ敵璇蜂汉" v-model="queryParam.applicant"></a-input> - </a-form-item> - </a-col> - <a-col :xl="6" :lg="7" :md="8" :sm="24"> + <a-col :xl="5" :lg="6" :md="8" :sm="12"> <a-form-item label="鐢宠閮ㄩ棬"> - <a-input placeholder="璇疯緭鍏ョ敵璇烽儴闂�" v-model="queryParam.factoryOrgCode"></a-input> + <a-tree-select v-model="queryParam.factoryOrgCode" style="width: 100%" :tree-data="productionTreeData" + show-search :replaceFields="{key:'orgCode',value:'orgCode'}" + treeNodeFilterProp="title" searchPlaceholder="璇疯緭鍏ュ叧閿瓧鎼滅储" + :dropdown-style="{ maxHeight: '400px', overflow: 'auto' }" placeholder="璇烽�夋嫨鐢宠閮ㄩ棬" + allow-clear tree-default-expand-all/> </a-form-item> </a-col> - <a-col :xl="6" :lg="7" :md="8" :sm="24"> + <a-col :xl="5" :lg="6" :md="8" :sm="12"> <a-form-item label="鐢宠鏃ユ湡"> - <a-input placeholder="璇疯緭鍏ョ敵璇锋棩鏈�" v-model="queryParam.applyDate"></a-input> + <a-range-picker v-model="queryParam.applyDate" value-format="YYYY-MM-DD" @change="handleDateRangeChange"/> </a-form-item> </a-col> - </template> - <a-col :xl="6" :lg="7" :md="8" :sm="24"> + <a-col :xl="5" :lg="6" :md="8" :sm="12"> + <a-form-item label="鐢宠鍗曠姸鎬�"> + <j-dict-select-tag v-model="queryParam.applicationStatus" placeholder="璇烽�夋嫨鐢宠鍗曠姸鎬�" + dict-code="technical_status_evaluation_application_status"/> + </a-form-item> + </a-col> + <a-col :xl="4" :lg="6" :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="info" @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> </span> </a-col> - </a-row> </a-form> </div> @@ -51,195 +47,268 @@ <!-- 鎿嶄綔鎸夐挳鍖哄煙 --> <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> - </a-menu> - <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> - - <a-table - ref="table" - size="middle" - bordered - rowKey="id" - :columns="columns" - :dataSource="dataSource" - :pagination="ipagination" - :loading="loading" - class="j-table-force-nowrap" - :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}" - @change="handleTableChange"> + <a-table ref="table" size="middle" bordered rowKey="id" :columns="columns" :dataSource="dataSource" + :pagination="ipagination" :loading="loading" :scroll="{x:'max-content'}" @change="handleTableChange"> <span slot="action" slot-scope="text, record"> - <a @click="handleEdit(record)">缂栬緫</a> + <template v-if="record.applicationStatus=='WAIT_SUBMIT'"> + <a @click.stop="handleEdit(record)">缂栬緫</a> - <a-divider type="vertical" /> - <a-dropdown> - <a class="ant-dropdown-link">鏇村 <a-icon type="down" /></a> - <a-menu slot="overlay"> - <a-menu-item> - <a-popconfirm title="纭畾鍒犻櫎鍚�?" @confirm="() => handleDelete(record.id)"> - <a>鍒犻櫎</a> - </a-popconfirm> - </a-menu-item> - </a-menu> - </a-dropdown> + <a-divider type="vertical"/> + + <a-popconfirm title="纭畾鎻愪氦鍚楋紵" @confirm="handleSubmit(record.id)"> + <a @click="e=>e.stopPropagation()">鎻愪氦</a> + </a-popconfirm> + + <a-divider type="vertical"/> + + <a-popconfirm title="纭畾浣滃簾鍚楋紵" @confirm="handleAbolish(record.id)"> + <a @click="e=>e.stopPropagation()">浣滃簾</a> + </a-popconfirm> + </template> + + <a @click.stop="handleDetail(record)" + v-if="record.applicationStatus!='WAIT_SUBMIT'&&record.applicationStatus!='ABOLISH'">璇︽儏</a> </span> - - </a-table> - </div> + </a-table> <!-- table鍖哄煙-end --> <!-- 琛ㄥ崟鍖哄煙 --> - <eamTechnicalStatusEvaluationApplication-modal ref="modalForm" @ok="modalFormOk"></eamTechnicalStatusEvaluationApplication-modal> + <eamTechnicalStatusEvaluationApplication-modal ref="modalForm" @ok="modalFormOk" + :productionTreeData="productionTreeData"/> + + <technical-status-evaluation-application-approval-modal ref="technicalStatusEvaluationApplicationApprovalModal" + :selectShenpiData="selectedRowData"/> </a-card> </template> <script> - import '@/assets/less/TableExpand.less' import EamTechnicalStatusEvaluationApplicationModal from './modules/EamTechnicalStatusEvaluationApplicationModal' import { JeecgListMixin } from '@/mixins/JeecgListMixin' + import LxSearchEquipmentSelect from '../equipment/modules/LxSearchEquipmentSelect' + import { getAction } from '@/api/manage' + import TechnicalStatusEvaluationApplicationApprovalModal + from '../../flowable/workflow/TechnicalStatusEvaluation/TechnicalStatusEvaluationApplicationApprovalModal' export default { - name: "EamTechnicalStatusEvaluationApplicationList", - mixins:[JeecgListMixin], + name: 'EamTechnicalStatusEvaluationApplicationList', + mixins: [JeecgListMixin], components: { + TechnicalStatusEvaluationApplicationApprovalModal, + LxSearchEquipmentSelect, EamTechnicalStatusEvaluationApplicationModal }, - data () { + data() { return { description: '鍔犲伐璁惧鎶�鏈壌瀹氱敵璇风鐞嗛〉闈�', + productionTreeData: [], + selectedRowData: {}, // 琛ㄥご columns: [ { title: '#', dataIndex: '', - key:'rowIndex', - width:60, - align:"center", - customRender:function (t,r,index) { - return parseInt(index)+1; - } - }, - { - title: '鍒犻櫎鏍囪', - align:"center", - dataIndex: 'delFlag' - }, - { + key: 'rowIndex', + width: 60, + align: 'center', + customRender: function(t, r, index) { + return parseInt(index) + 1 + }, + fixed: 'left' + }, + { + title: '缁熶竴缂栫爜', + align: 'center', + dataIndex: 'equipmentCode', + fixed: 'left' + }, + { + title: '璁惧鍚嶇О', + align: 'center', + dataIndex: 'equipmentName', + fixed: 'left' + }, + { + title: '璁惧鍨嬪彿', + align: 'center', + dataIndex: 'equipmentModel', + fixed: 'left' + }, + { + title: '鐢宠鍗曠姸鎬�', + align: 'center', + dataIndex: 'applicationStatus_dictText', + fixed: 'left' + }, + { title: '鐢宠鍗曞彿', - align:"center", + align: 'center', dataIndex: 'applicationOrderNum' - }, - { + }, + { title: '鐢宠浜�', - align:"center", - dataIndex: 'applicant' - }, - { + align: 'center', + dataIndex: 'applicant_dictText' + }, + { title: '鐢宠閮ㄩ棬', - align:"center", - dataIndex: 'factoryOrgCode' - }, - { + align: 'center', + dataIndex: 'factoryOrgCode_dictText' + }, + { title: '鐢宠鏃ユ湡', - align:"center", + align: 'center', dataIndex: 'applyDate' - }, - { - title: '鐢宠鍗曠姸鎬�;寰呮彁浜ゃ�佸緟鍗曚綅瀹ょ骇棰嗗瀹℃牳銆佺敓浜ц澶囩鐞嗕富绠″鏍搞�佸緟淇濋殰閮ㄩ瀵煎鏍搞�佸凡浣滃簾銆佸凡瀹屾垚', - align:"center", - dataIndex: 'applicationStatus' - }, - { + }, + { + title: '鎶�鏈姸鎬侀壌瀹氭棩鏈�', + align: 'center', + dataIndex: 'evaluationDate' + }, + { title: '鐢宠鍗曚綅瀹ょ骇棰嗗绛惧瓧', - align:"center", - dataIndex: 'departHeaderSignature' - }, - { + align: 'center', + dataIndex: 'departHeaderSignature_dictText' + }, + { title: '鐢宠鍗曚綅瀹ょ骇棰嗗绛惧瓧鏃堕棿', - align:"center", + align: 'center', dataIndex: 'departHeaderSignatureTime' - }, - { - title: '鐢宠鍗曚綅瀹ょ骇棰嗗鎰忚', - align:"center", - dataIndex: 'departHeaderComment' - }, - { + }, + { title: '鐢熶骇璁惧绠$悊涓荤绛惧瓧', - align:"center", - dataIndex: 'productionHeaderSignature' - }, - { - title: '鐢熶骇璁惧绠$悊涓荤绛惧瓧鍥涗欢', - align:"center", + align: 'center', + dataIndex: 'productionHeaderSignature_dictText' + }, + { + title: '鐢熶骇璁惧绠$悊涓荤绛惧瓧鏃堕棿', + align: 'center', dataIndex: 'productionHeaderSignatureTime' - }, - { - title: '鐢熶骇璁惧绠$悊涓荤鎰忚', - align:"center", - dataIndex: 'productionHeaderComment' - }, - { + }, + { title: '鐢熶骇淇濋殰閮ㄩ瀵肩瀛�', - align:"center", - dataIndex: 'productionSupportSignature' - }, - { + align: 'center', + dataIndex: 'productionSupportSignature_dictText' + }, + { title: '鐢熶骇淇濋殰閮ㄩ瀵肩瀛楁椂闂�', - align:"center", + align: 'center', dataIndex: 'productionSupportSignatureTime' - }, - { - title: '鐢熶骇淇濋殰閮ㄩ瀵兼剰瑙�', - align:"center", - dataIndex: 'productionSupportComment' - }, - { + }, + { title: 'HF缂栫爜', - align:"center", + align: 'center', dataIndex: 'hfCode' - }, + }, { title: '鎿嶄綔', dataIndex: 'action', - align:"center", + align: 'center', scopedSlots: { customRender: 'action' }, + fixed: 'right', + width: 200 } ], - url: { - list: "/eam/eamTechnicalStatusEvaluationApplication/list", - delete: "/eam/eamTechnicalStatusEvaluationApplication/delete", - deleteBatch: "/eam/eamTechnicalStatusEvaluationApplication/deleteBatch", - exportXlsUrl: "eam/eamTechnicalStatusEvaluationApplication/exportXls", - importExcelUrl: "eam/eamTechnicalStatusEvaluationApplication/importExcel", - }, - } - }, - computed: { - importExcelUrl: function(){ - return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`; - } - }, + url: { + list: '/eam/eamTechnicalStatusEvaluationApplication/list', + submit: '/eam/eamTechnicalStatusEvaluationApplication/submit', + abolish: '/eam/eamTechnicalStatusEvaluationApplication/abolish', + getProductionTreeList: '/eam/BaseFactory/queryTreeList' + } + } + }, + created() { + this.getProductionTreeDataByApi() + }, methods: { - + // 鑾峰彇鐢宠閮ㄩ棬鏍� + getProductionTreeDataByApi() { + getAction(this.url.getProductionTreeList) + .then(res => { + if (res.success) { + this.productionTreeData = res.result + } else { + this.$notification.warning({ + message: '娑堟伅', + description: res.message + }) + } + }) + }, + + /** + * 鎻愪氦鏃惰Е鍙� + * @param id + */ + handleSubmit(id) { + const that = this + that.loading = true + getAction(this.url.submit, { id }) + .then(res => { + if (res.success) { + that.$notification.success({ + message: '娑堟伅', + description: res.message + }) + that.loadData() + } else { + that.$notification.warning({ + message: '娑堟伅', + description: res.message + }) + that.loading = false + } + }) + }, + + /** + * 浣滃簾鏃惰Е鍙� + * @param id + */ + handleAbolish(id) { + const that = this + that.loading = true + getAction(this.url.abolish, { id }) + .then(res => { + if (res.success) { + that.$notification.success({ + message: '娑堟伅', + description: res.message + }) + that.loadData() + } else { + that.$notification.warning({ + message: '娑堟伅', + description: res.message + }) + that.loading = false + } + }) + }, + + /** + * 鐐瑰嚮璇︽儏鏃惰Е鍙戞椂瑙﹀彂 + * @param record + */ + handleDetail(record) { + this.selectedRowData = Object.assign({}, record) + this.$refs.technicalStatusEvaluationApplicationApprovalModal.title = '璇︽儏' + this.$refs.technicalStatusEvaluationApplicationApprovalModal.disableSubmit = true + this.$refs.technicalStatusEvaluationApplicationApprovalModal.visible = true + this.$refs.technicalStatusEvaluationApplicationApprovalModal.handleDetail(record) + }, + + /** + * 鐢宠鏃ユ湡鍊煎彂鐢熸敼鍙樻椂瑙﹀彂 + * @param dateStringArray + */ + handleDateRangeChange(dateStringArray) { + this.queryParam.dateBegin = dateStringArray[0] + this.queryParam.dateEnd = dateStringArray[1] + } } } -</script> -<style scoped> - @import '~@assets/less/common.less'; -</style> \ No newline at end of file +</script> \ No newline at end of file diff --git a/src/views/eam/technical/modules/EamTechnicalStatusChangeEquipmentDetail.vue b/src/views/eam/technical/modules/EamTechnicalStatusChangeEquipmentDetail.vue new file mode 100644 index 0000000..3a58564 --- /dev/null +++ b/src/views/eam/technical/modules/EamTechnicalStatusChangeEquipmentDetail.vue @@ -0,0 +1,170 @@ +<template> + <div> + <a-table ref="table" size="middle" bordered rowKey="id" :columns="columns" :dataSource="dataSource" + :pagination="false" :loading="loading" :scroll="{x:'max-content'}"> + <span slot="action" slot-scope="text, record"> + <!--闈炴惉杩�--> + <a v-if="record.changeCategory!='EQUIPMENT_RELOCATION'" + :disabled="selectedRow.changeStatus!='COMPLETED'||(selectedRow.changeStatus=='COMPLETED'&&record.acceptanceChecker)" + @click="handleAcceptance(record)">楠屾敹</a> + + <!--鎼縼--> + <a-popconfirm v-else title="鏄惁鐢熸垚鎶�鏈姸鎬侀壌瀹氬伐鍗曪紵" @confirm="handleAcceptance(record)"> + <a + :disabled="selectedRow.changeStatus!='COMPLETED'||(selectedRow.changeStatus=='COMPLETED'&&record.acceptanceChecker)">楠屾敹</a> + </a-popconfirm> + </span> + </a-table> + + <!--璁惧楠屾敹寮圭獥--> + <eam-technical-status-equipment-acceptance-modal ref="modalForm" @ok="modalFormOk"/> + </div> +</template> + +<script> + import { getAction, postAction } from '@/api/manage' + import { JeecgListMixin } from '@/mixins/JeecgListMixin' + import EamTechnicalStatusEquipmentAcceptanceModal from './EamTechnicalStatusEquipmentAcceptanceModal' + + export default { + name: 'EamTechnicalStatusChangeEquipmentDetail', + components: { EamTechnicalStatusEquipmentAcceptanceModal }, + mixins: [JeecgListMixin], + props: { + selectedRow: { + type: Object + } + }, + watch: { + selectedRow: { + handler(val) { + if (val) { + this.loadData() + } + }, + immediate: true + } + }, + data() { + return { + disableMixinCreated: true, + columns: [ + { + title: '#', + dataIndex: '', + key: 'rowIndex', + width: 60, + align: 'center', + customRender: function(t, r, index) { + return parseInt(index) + 1 + } + }, + { + title: '缁熶竴缂栫爜', + dataIndex: 'equipmentCode', + align: 'center' + }, + { + title: '璁惧鍚嶇О', + dataIndex: 'equipmentName', + align: 'center' + }, + { + title: '璁惧鍨嬪彿', + dataIndex: 'equipmentModel', + align: 'center' + }, + { + title: '浣跨敤鍗曚綅', + dataIndex: 'factoryName', + align: 'center' + }, + { + title: '鍙樻洿鍘熷洜', + dataIndex: 'changeCategory_dictText', + align: 'center' + }, + { + title: '鍙樻洿鏃ユ湡', + dataIndex: 'changeDate', + align: 'center' + }, + { + title: '鍙樻洿鍚庢妧鏈姸鎬�', + dataIndex: 'changeTechnicalStatus_dictText', + align: 'center' + }, + { + title: '楠屾敹浜�', + dataIndex: 'acceptanceChecker_dictText', + align: 'center' + }, + { + title: '楠屾敹鏃堕棿', + dataIndex: 'acceptanceCheckTime', + align: 'center' + }, + { + title: '楠屾敹妫�鏌ョ粨鏋�', + dataIndex: 'acceptanceCheckResult_dictText', + align: 'center' + }, + { + title: '楠屾敹鎰忚', + dataIndex: 'acceptanceCheckComment', + align: 'center' + }, + { + title: '鎿嶄綔', + dataIndex: 'action', + align: 'center', + width: 200, + fixed: 'right', + scopedSlots: { customRender: 'action' } + } + ], + url: { + list: '/eam/eamTechnicalStatusChangeDetail/queryList', + acceptance: '/eam/eamTechnicalStatusChange/acceptance' + } + } + }, + methods: { + loadData() { + this.loading = true + getAction(this.url.list, { orderId: this.selectedRow.id }) + .then((res) => { + if (res.success) this.dataSource = res.result + }) + .finally(() => { + this.loading = false + }) + }, + + handleAcceptance(record) { + if (record.changeCategory != 'EQUIPMENT_RELOCATION') { + this.$refs.modalForm.handleAcceptance(record) + this.$refs.modalForm.title = '楠屾敹' + } else { + this.loading = true + postAction(this.url.acceptance, record) + .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 + } + }) + } + } + } + } +</script> \ No newline at end of file diff --git a/src/views/eam/technical/modules/EamTechnicalStatusChangeModal.vue b/src/views/eam/technical/modules/EamTechnicalStatusChangeModal.vue index 7a4b5b1..5d93703 100644 --- a/src/views/eam/technical/modules/EamTechnicalStatusChangeModal.vue +++ b/src/views/eam/technical/modules/EamTechnicalStatusChangeModal.vue @@ -2,35 +2,33 @@ <j-modal :title="title" :width="1200" :visible="visible" :confirmLoading="confirmLoading" switchFullscreen @ok="handleOk" @cancel="handleCancel" cancelText="鍏抽棴"> <a-spin :spinning="spinning"> - <div class="table-page-search-wrapper"> - <a-form-model ref="form" :model="model" :rules="validatorRules" :labelCol="labelCol" :wrapperCol="wrapperCol"> - <a-row> - <a-col :span="8"> - <a-form-model-item label="鍙樻洿鍗曞彿"> - <a-input placeholder="绯荤粺鑷姩鐢熸垚" v-model="model.changeOrderNum" disabled/> - </a-form-model-item> - </a-col> - <a-col :span="8"> - <a-form-model-item label="鐢宠鍗曚綅" prop="factoryOrgCode"> - <a-tree-select v-model="model.factoryOrgCode" :tree-data="productionTreeData" - @change="detail.dataSource=[]" - show-search :replaceFields="{key:'orgCode',value:'orgCode'}" - treeNodeFilterProp="title" searchPlaceholder="璇疯緭鍏ュ叧閿瓧鎼滅储" - :dropdown-style="{ maxHeight: '400px', overflow: 'auto' }" placeholder="璇烽�夋嫨鐢宠鍗曚綅" - allow-clear tree-default-expand-all :allow-clear="false"/> - </a-form-model-item> - </a-col> - </a-row> + <a-form-model ref="form" :model="model" :rules="validatorRules" :labelCol="labelCol" :wrapperCol="wrapperCol"> + <a-row> + <a-col :span="8"> + <a-form-model-item label="鍙樻洿鍗曞彿"> + <a-input placeholder="绯荤粺鑷姩鐢熸垚" v-model="model.changeOrderNum" disabled/> + </a-form-model-item> + </a-col> + <a-col :span="8"> + <a-form-model-item label="鐢宠鍗曚綅" prop="factoryOrgCode"> + <a-tree-select v-model="model.factoryOrgCode" :tree-data="productionTreeData" + @change="detail.dataSource=[]" + show-search :replaceFields="{key:'orgCode',value:'orgCode'}" + treeNodeFilterProp="title" searchPlaceholder="璇疯緭鍏ュ叧閿瓧鎼滅储" + :dropdown-style="{ maxHeight: '400px', overflow: 'auto' }" placeholder="璇烽�夋嫨鐢宠鍗曚綅" + allow-clear tree-default-expand-all :allow-clear="false"/> + </a-form-model-item> + </a-col> + </a-row> - <a-row> - <a-col :span="24"> - <a-form-model-item label="澶囨敞" :labelCol="{span:2}" :wrapperCol="{span:20}"> - <a-textarea placeholder="璇疯緭鍏ュ娉�" v-model="model.remark"/> - </a-form-model-item> - </a-col> - </a-row> - </a-form-model> - </div> + <a-row> + <a-col :span="24"> + <a-form-model-item label="澶囨敞" :labelCol="{span:2}" :wrapperCol="{span:20}"> + <a-textarea placeholder="璇疯緭鍏ュ娉�" v-model="model.remark"/> + </a-form-model-item> + </a-col> + </a-row> + </a-form-model> <j-vxe-table ref="editableDetailTable" rowNumber rowSelection bordered alwaysEdit toolbar v-if="model.factoryOrgCode" diff --git a/src/views/eam/technical/modules/EamTechnicalStatusDeactivateModal.vue b/src/views/eam/technical/modules/EamTechnicalStatusDeactivateModal.vue index ca3e5d4..ffce398 100644 --- a/src/views/eam/technical/modules/EamTechnicalStatusDeactivateModal.vue +++ b/src/views/eam/technical/modules/EamTechnicalStatusDeactivateModal.vue @@ -1,147 +1,268 @@ <template> - <j-modal - :title="title" - :width="800" - :visible="visible" - :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="deactivateOrderNum" label="鍋滅敤鍗曞彿"> - <a-input placeholder="璇疯緭鍏ュ仠鐢ㄥ崟鍙�" v-model="model.deactivateOrderNum" /> - </a-form-model-item> - <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="applicant" label="鐢宠浜�"> - <a-input placeholder="璇疯緭鍏ョ敵璇蜂汉" v-model="model.applicant" /> - </a-form-model-item> - <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="factoryOrgCode" label="鐢宠閮ㄩ棬"> - <a-input placeholder="璇疯緭鍏ョ敵璇烽儴闂�" v-model="model.factoryOrgCode" /> - </a-form-model-item> - <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="applyDate" label="鐢宠鏃ユ湡"> - <a-input placeholder="璇疯緭鍏ョ敵璇锋棩鏈�" v-model="model.applyDate" /> - </a-form-model-item> - <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="applicationStatus" label="鐢宠鍗曠姸鎬�;寰呮彁浜ゃ�佸緟鍗曚綅瀹ょ骇棰嗗瀹℃牳銆佺敓浜ц澶囩鐞嗕富绠″鏍搞�佸緟淇濋殰閮ㄩ瀵煎鏍搞�佸凡浣滃簾銆佸凡瀹屾垚"> - <a-input placeholder="璇疯緭鍏ョ敵璇峰崟鐘舵��;寰呮彁浜ゃ�佸緟鍗曚綅瀹ょ骇棰嗗瀹℃牳銆佺敓浜ц澶囩鐞嗕富绠″鏍搞�佸緟淇濋殰閮ㄩ瀵煎鏍搞�佸凡浣滃簾銆佸凡瀹屾垚" v-model="model.applicationStatus" /> - </a-form-model-item> - <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="departHeaderSignature" label="浣跨敤鍗曚綅瀹や富绠$瀛�"> - <a-input placeholder="璇疯緭鍏ヤ娇鐢ㄥ崟浣嶅涓荤绛惧瓧" v-model="model.departHeaderSignature" /> - </a-form-model-item> - <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="departHeaderSignatureTime" label="浣跨敤鍗曚綅瀹や富绠$瀛楁椂闂�"> - <a-input placeholder="璇疯緭鍏ヤ娇鐢ㄥ崟浣嶅涓荤绛惧瓧鏃堕棿" v-model="model.departHeaderSignatureTime" /> - </a-form-model-item> - <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="departHeaderSignatureComment" label="浣跨敤鍗曚綅瀹や富绠℃剰瑙�"> - <a-input placeholder="璇疯緭鍏ヤ娇鐢ㄥ崟浣嶅涓荤鎰忚" v-model="model.departHeaderSignatureComment" /> - </a-form-model-item> - <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="departLeaderSignature" label="浣跨敤鍗曚綅閮ㄤ富绠$瀛�"> - <a-input placeholder="璇疯緭鍏ヤ娇鐢ㄥ崟浣嶉儴涓荤绛惧瓧" v-model="model.departLeaderSignature" /> - </a-form-model-item> - <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="departLeaderSignatureTime" label="浣跨敤鍗曚綅閮ㄤ富绠$瀛楁椂闂�"> - <a-input placeholder="璇疯緭鍏ヤ娇鐢ㄥ崟浣嶉儴涓荤绛惧瓧鏃堕棿" v-model="model.departLeaderSignatureTime" /> - </a-form-model-item> - <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="departLeaderSignatureComment" label="浣跨敤鍗曚綅閮ㄤ富绠$瀛�"> - <a-input placeholder="璇疯緭鍏ヤ娇鐢ㄥ崟浣嶉儴涓荤绛惧瓧" v-model="model.departLeaderSignatureComment" /> - </a-form-model-item> - <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="hfCode" label="HF缂栫爜"> - <a-input placeholder="璇疯緭鍏F缂栫爜" v-model="model.hfCode" /> - </a-form-model-item> - + <j-modal :title="title" :width="1200" :visible="visible" :confirmLoading="confirmLoading" switchFullscreen + @ok="handleOk" @cancel="handleCancel" cancelText="鍏抽棴"> + <a-spin :spinning="spinning"> + <a-form-model ref="form" :model="model" :rules="validatorRules" :labelCol="labelCol" :wrapperCol="wrapperCol"> + <a-row> + <a-col :span="8"> + <a-form-model-item label="鍋滅敤鍗曞彿"> + <a-input placeholder="绯荤粺鑷姩鐢熸垚" v-model="model.deactivateOrderNum" disabled/> + </a-form-model-item> + </a-col> + <a-col :span="8"> + <a-form-model-item label="鐢宠閮ㄩ棬" prop="factoryOrgCode"> + <a-tree-select v-model="model.factoryOrgCode" :tree-data="productionTreeData" + @change="detail.dataSource=[]" + show-search :replaceFields="{key:'orgCode',value:'orgCode'}" + treeNodeFilterProp="title" searchPlaceholder="璇疯緭鍏ュ叧閿瓧鎼滅储" + :dropdown-style="{ maxHeight: '400px', overflow: 'auto' }" placeholder="璇烽�夋嫨鐢宠閮ㄩ棬" + allow-clear tree-default-expand-all :allow-clear="false"/> + </a-form-model-item> + </a-col> + </a-row> + + <a-row> + <a-col :span="24"> + <a-form-model-item label="澶囨敞" :labelCol="{span:2}" :wrapperCol="{span:20}"> + <a-textarea placeholder="璇疯緭鍏ュ娉�" v-model="model.remark"/> + </a-form-model-item> + </a-col> + </a-row> </a-form-model> + + <j-vxe-table ref="editableDetailTable" rowNumber rowSelection bordered alwaysEdit toolbar + v-if="model.factoryOrgCode" + :toolbarConfig="detail.toolbarConfig" keep-source :height="300" + :dataSource="detail.dataSource" :columns="detail.columns"> + <!--缁熶竴缂栫爜--> + <template v-slot:equipmentId="props"> + <lx-search-equipment-select v-model="props.row.equipmentId" placeholder="璇疯緭鍏ョ粺涓�缂栫爜鎴栧悕绉版悳绱�" + :factoryOrgCode="model.factoryOrgCode" + @autocompleteForm="autocompleteForm($event,props.row)" :allowClear="false"/> + </template> + + <!-- 淇濆吇鏃ユ湡--> + <template v-slot:changeDate="props"> + <a-date-picker v-model="props.row.changeDate" value-format="YYYY-MM-DD" :allow-clear="false"/> + </template> + + <!-- 鎿嶄綔--> + <template v-slot:action="props"> + <a :disabled="!props.row.equipmentId" @click="handlePreviewDetail(props.row.standardId)">棰勮鏄庣粏</a> + </template> + </j-vxe-table> </a-spin> </j-modal> </template> <script> - import { httpAction } from '@/api/manage' - import moment from "moment" + import { httpAction, getAction } from '@/api/manage' + import { JVXETypes } from '@comp/jeecg/JVxeTable' + import LxSearchEquipmentSelect from '../../equipment/modules/LxSearchEquipmentSelect' export default { - name: "EamTechnicalStatusDeactivateModal", - data () { + name: 'EamTechnicalStatusDeactivateModal', + components: { LxSearchEquipmentSelect }, + props: { + productionTreeData: { + type: Array + } + }, + data() { return { - title:"鎿嶄綔", + title: '鎿嶄綔', visible: false, + spinning: false, model: {}, labelCol: { xs: { span: 24 }, - sm: { span: 5 }, + sm: { span: 6 } }, wrapperCol: { xs: { span: 24 }, - sm: { span: 16 }, + sm: { span: 18 } }, - confirmLoading: false, - validatorRules:{ + validatorRules: { + factoryOrgCode: [{ required: true, message: '璇烽�夋嫨鐢宠閮ㄩ棬', trigger: 'change' }] + }, + detail: { + dataSource: [], + columns: [ + { + title: 'ID', + key: 'id', + type: JVXETypes.hidden + }, + { + title: '缁熶竴缂栫爜', + key: 'equipmentId', + align: 'center', + type: JVXETypes.slot, + slotName: 'equipmentId', + width: 250, + validateRules: [ + { required: true, message: '璇疯緭鍏�${title}鎴栧悕绉版悳绱�' }, + { unique: true, message: '${title}涓嶈兘閲嶅' } + ] + }, + { + title: '璁惧鍚嶇О', + key: 'equipmentName', + align: 'center', + type: JVXETypes.normal, + width: 200 + }, + { + title: '璁惧鍨嬪彿', + key: 'equipmentModel', + align: 'center', + type: JVXETypes.normal, + width: 200 + }, + { + title: '浣跨敤鍗曚綅', + key: 'factoryName', + align: 'center', + type: JVXETypes.normal, + width: 200 + }, + { + title: '鍋滅敤鍘熷洜', + key: 'deactivateReason', + align: 'center', + type: JVXETypes.textarea, + width: 200, + placeholder: '璇疯緭鍏�${title}', + validateRules: [{ required: true, message: '璇疯緭鍏�${title}' }] + }, + { + title: '宸插仠鐢ㄦ椂闀�', + key: 'deactivateDuration', + align: 'center', + type: JVXETypes.inputNumber, + width: 200, + placeholder: '璇疯緭鍏�${title}', + validateRules: [{ required: true, message: '璇疯緭鍏�${title}' }] + } + ], + toolbarConfig: { + // prefix 鍓嶇紑锛泂uffix 鍚庣紑 + slot: ['prefix', 'suffix'], + // add 鏂板鎸夐挳锛況emove 鍒犻櫎鎸夐挳锛沜learSelection 娓呯┖閫夋嫨鎸夐挳 + btn: ['add', 'remove', 'clearSelection'] + } }, url: { - add: "/eam/eamTechnicalStatusDeactivate/add", - edit: "/eam/eamTechnicalStatusDeactivate/edit", - }, + add: '/eam/eamTechnicalStatusDeactivate/add', + edit: '/eam/eamTechnicalStatusDeactivate/edit', + detail: '/eam/eamTechnicalStatusDeactivateDetail/queryList' + } } }, - created () { - }, methods: { - add () { + add() { //鍒濆鍖栭粯璁ゅ�� - this.edit({}); + this.edit({}) }, - edit (record) { - this.model = Object.assign({}, record); - this.visible = true; + + edit(record) { + this.model = Object.assign({}, record) + this.visible = true + if (this.model.id) this.loadDetail(record.id) }, - close () { - this.$emit('close'); - this.visible = false; - this.$refs.form.clearValidate(); + + autocompleteForm(selectObj, record) { + record.factoryName = selectObj.factoryOrgCode_dictText + record.equipmentName = selectObj.equipmentName + record.equipmentModel = selectObj.equipmentModel }, - handleOk () { - const that = this; + + /** + * 鑾峰彇璁惧鏄庣粏 + * @param applicationId + */ + loadDetail(applicationId) { + this.spinning = true + this.detail.dataSource = [] + getAction(this.url.detail, { applicationId }) + .then(res => { + console.log('res', res) + if (res.success) this.detail.dataSource = res.result + }) + .finally(() => { + this.spinning = false + }) + }, + + async handleOk() { + const tableData = this.$refs.editableDetailTable.getTableData() + if (tableData.length == 0) { + this.$notification.warning({ + message: '娑堟伅', + description: '璇疯嚦灏戞柊澧炰竴鏉¤褰�' + }) + return + } + + const errMap = await this.$refs.editableDetailTable.validateTable() + if (errMap) return + + const that = this // 瑙﹀彂琛ㄥ崟楠岃瘉 - this.$refs.form.validate(valid => { + this.$refs.form.validate(valid => { if (valid) { - that.confirmLoading = true; - let httpurl = ''; - let method = ''; - if(!this.model.id){ - httpurl+=this.url.add; - method = 'post'; - }else{ - httpurl+=this.url.edit; - method = 'put'; + that.confirmLoading = that.spinning = true + let httpUrl = '' + let method = '' + if (!this.model.id) { + httpUrl += this.url.add + method = 'post' + } else { + httpUrl += this.url.edit + method = 'put' } - httpAction(httpurl,this.model,method).then((res)=>{ - if(res.success){ - that.$message.success(res.message); - that.$emit('ok'); - }else{ - that.$message.warning(res.message); - } - }).finally(() => { - that.confirmLoading = false; - that.close(); - }) - }else{ - return false; + + that.model.tableDetailList = this.$refs.editableDetailTable.getTableData() + httpAction(httpUrl, this.model, method) + .then((res) => { + if (res.success) { + that.$notification.success({ + message: '娑堟伅', + description: res.message + }) + that.$emit('ok') + that.close() + } else { + that.$notification.warning({ + message: '娑堟伅', + description: res.message + }) + } + }) + .finally(() => { + that.confirmLoading = that.spinning = false + }) + } else { + return false } }) }, - handleCancel () { + handleCancel() { this.close() }, - + close() { + this.$emit('close') + this.visible = false + if (this.$refs.form) this.$refs.form.clearValidate() + } } } </script> <style lang="less" scoped> - + /deep/ .ant-select-dropdown-menu { + text-align: left; + } </style> \ No newline at end of file diff --git a/src/views/eam/technical/modules/EamTechnicalStatusEquipmentAcceptanceModal.vue b/src/views/eam/technical/modules/EamTechnicalStatusEquipmentAcceptanceModal.vue new file mode 100644 index 0000000..ef71136 --- /dev/null +++ b/src/views/eam/technical/modules/EamTechnicalStatusEquipmentAcceptanceModal.vue @@ -0,0 +1,100 @@ +<template> + <j-modal :title="title" :width="500" :visible="visible" :confirmLoading="confirmLoading" switchFullscreen + @ok="handleOk" @cancel="handleCancel" cancelText="鍏抽棴"> + <a-spin :spinning="confirmLoading"> + <a-form-model ref="form" :model="model" :rules="validatorRules" :labelCol="labelCol" :wrapperCol="wrapperCol"> + <a-row> + <a-col :span="24"> + <a-form-model-item label="楠屾敹妫�鏌ョ粨鏋�" prop="acceptanceCheckResult"> + <j-dict-select-tag dict-code="equipment_technology_status" type="radio" + v-model="model.acceptanceCheckResult"/> + </a-form-model-item> + </a-col> + <a-col :span="24"> + <a-form-model-item label="楠屾敹鎰忚" prop="acceptanceCheckComment"> + <a-textarea placeholder="璇疯緭鍏ラ獙鏀舵剰瑙�" v-model="model.acceptanceCheckComment"/> + </a-form-model-item> + </a-col> + </a-row> + </a-form-model> + </a-spin> + </j-modal> +</template> + +<script> + import { postAction } from '@/api/manage' + + export default { + name: 'EamTechnicalStatusEquipmentAcceptanceModal', + data() { + return { + title: '鎿嶄綔', + visible: false, + model: {}, + labelCol: { + xs: { span: 24 }, + sm: { span: 7 } + }, + wrapperCol: { + xs: { span: 24 }, + sm: { span: 15 } + }, + confirmLoading: false, + validatorRules: { + acceptanceCheckResult: [{ required: true, message: '璇烽�夋嫨楠屾敹妫�鏌ョ粨鏋�', trigger: 'change' }], + acceptanceCheckComment: [{ required: true, message: '璇疯緭鍏ラ獙鏀舵剰瑙�', trigger: 'change' }] + }, + url: { + acceptance: '/eam/eamTechnicalStatusChange/acceptance' + } + } + }, + methods: { + handleAcceptance(record) { + this.model = Object.assign({}, record) + this.visible = true + }, + + handleOk() { + const that = this + // 瑙﹀彂琛ㄥ崟楠岃瘉 + this.$refs.form.validate(valid => { + if (valid) { + that.confirmLoading = true + postAction(this.url.acceptance, this.model) + .then(res => { + if (res.success) { + that.$notification.success({ + message: '娑堟伅', + description: res.message + }) + that.$emit('ok') + that.handleCancel() + } else { + that.$notification.warning({ + message: '娑堟伅', + description: res.message + }) + } + }) + .finally(() => { + that.confirmLoading = false + }) + } else { + return false + } + }) + }, + + handleCancel() { + this.close() + }, + + close() { + this.$emit('close') + this.visible = false + this.$refs.form.clearValidate() + } + } + } +</script> \ No newline at end of file diff --git a/src/views/eam/technical/modules/EamTechnicalStatusEvaluationApplicationModal.vue b/src/views/eam/technical/modules/EamTechnicalStatusEvaluationApplicationModal.vue index 6a92710..c8e2087 100644 --- a/src/views/eam/technical/modules/EamTechnicalStatusEvaluationApplicationModal.vue +++ b/src/views/eam/technical/modules/EamTechnicalStatusEvaluationApplicationModal.vue @@ -1,66 +1,30 @@ <template> - <j-modal - :title="title" - :width="800" - :visible="visible" - :confirmLoading="confirmLoading" - switchFullscreen - @ok="handleOk" - @cancel="handleCancel" - cancelText="鍏抽棴"> - + <j-modal :title="title" :width="800" :visible="visible" :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 ref="form" :model="model" :rules="validatorRules" :labelCol="labelCol" :wrapperCol="wrapperCol"> + <a-form-model-item prop="factoryOrgCode" label="鐢宠閮ㄩ棬"> + <a-tree-select v-model="model.factoryOrgCode" style="width: 100%" :tree-data="productionTreeData" + :disabled="!editable" + show-search :replaceFields="{key:'orgCode',value:'orgCode'}" + @change="()=>delete model.equipmentId" + treeNodeFilterProp="title" searchPlaceholder="璇疯緭鍏ュ叧閿瓧鎼滅储" + :dropdown-style="{ maxHeight: '400px', overflow: 'auto' }" placeholder="璇烽�夋嫨鐢宠閮ㄩ棬" + :allow-clear="false" tree-default-expand-all/> </a-form-model-item> - <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="applicationOrderNum" label="鐢宠鍗曞彿"> - <a-input placeholder="璇疯緭鍏ョ敵璇峰崟鍙�" v-model="model.applicationOrderNum" /> + <a-form-model-item prop="equipmentId" label="缁熶竴缂栫爜"> + <lx-search-equipment-select :disabled="!editable||!model.factoryOrgCode" + :placeholder="!model.factoryOrgCode?'璇烽�夋嫨鐢宠閮ㄩ棬':'璇疯緭鍏ョ粺涓�缂栫爜鎴栧悕绉版悳绱�'" + v-model="model.equipmentId" :allow-clear="false" + :factoryOrgCode="model.factoryOrgCode"/> </a-form-model-item> - <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="applicant" label="鐢宠浜�"> - <a-input placeholder="璇疯緭鍏ョ敵璇蜂汉" v-model="model.applicant" /> + <a-form-model-item prop="evaluationDate" label="鎶�鏈姸鎬侀壌瀹氭棩鏈�"> + <a-date-picker value-format="YYYY-MM-DD" v-model="model.evaluationDate" :allow-clear="false" + style="width: 100%"/> </a-form-model-item> - <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="factoryOrgCode" label="鐢宠閮ㄩ棬"> - <a-input placeholder="璇疯緭鍏ョ敵璇烽儴闂�" v-model="model.factoryOrgCode" /> + <a-form-model-item label="澶囨敞"> + <a-textarea placeholder="璇疯緭鍏ュ娉�" v-model="model.remark"/> </a-form-model-item> - <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="applyDate" label="鐢宠鏃ユ湡"> - <a-input placeholder="璇疯緭鍏ョ敵璇锋棩鏈�" v-model="model.applyDate" /> - </a-form-model-item> - <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="applicationStatus" label="鐢宠鍗曠姸鎬�;寰呮彁浜ゃ�佸緟鍗曚綅瀹ょ骇棰嗗瀹℃牳銆佺敓浜ц澶囩鐞嗕富绠″鏍搞�佸緟淇濋殰閮ㄩ瀵煎鏍搞�佸凡浣滃簾銆佸凡瀹屾垚"> - <a-input placeholder="璇疯緭鍏ョ敵璇峰崟鐘舵��;寰呮彁浜ゃ�佸緟鍗曚綅瀹ょ骇棰嗗瀹℃牳銆佺敓浜ц澶囩鐞嗕富绠″鏍搞�佸緟淇濋殰閮ㄩ瀵煎鏍搞�佸凡浣滃簾銆佸凡瀹屾垚" v-model="model.applicationStatus" /> - </a-form-model-item> - <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="departHeaderSignature" label="鐢宠鍗曚綅瀹ょ骇棰嗗绛惧瓧"> - <a-input placeholder="璇疯緭鍏ョ敵璇峰崟浣嶅绾ч瀵肩瀛�" v-model="model.departHeaderSignature" /> - </a-form-model-item> - <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="departHeaderSignatureTime" label="鐢宠鍗曚綅瀹ょ骇棰嗗绛惧瓧鏃堕棿"> - <a-input placeholder="璇疯緭鍏ョ敵璇峰崟浣嶅绾ч瀵肩瀛楁椂闂�" v-model="model.departHeaderSignatureTime" /> - </a-form-model-item> - <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="departHeaderComment" label="鐢宠鍗曚綅瀹ょ骇棰嗗鎰忚"> - <a-input placeholder="璇疯緭鍏ョ敵璇峰崟浣嶅绾ч瀵兼剰瑙�" v-model="model.departHeaderComment" /> - </a-form-model-item> - <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="productionHeaderSignature" label="鐢熶骇璁惧绠$悊涓荤绛惧瓧"> - <a-input placeholder="璇疯緭鍏ョ敓浜ц澶囩鐞嗕富绠$瀛�" v-model="model.productionHeaderSignature" /> - </a-form-model-item> - <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="productionHeaderSignatureTime" label="鐢熶骇璁惧绠$悊涓荤绛惧瓧鍥涗欢"> - <a-input placeholder="璇疯緭鍏ョ敓浜ц澶囩鐞嗕富绠$瀛楀洓浠�" v-model="model.productionHeaderSignatureTime" /> - </a-form-model-item> - <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="productionHeaderComment" label="鐢熶骇璁惧绠$悊涓荤鎰忚"> - <a-input placeholder="璇疯緭鍏ョ敓浜ц澶囩鐞嗕富绠℃剰瑙�" v-model="model.productionHeaderComment" /> - </a-form-model-item> - <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="productionSupportSignature" label="鐢熶骇淇濋殰閮ㄩ瀵肩瀛�"> - <a-input placeholder="璇疯緭鍏ョ敓浜т繚闅滈儴棰嗗绛惧瓧" v-model="model.productionSupportSignature" /> - </a-form-model-item> - <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="productionSupportSignatureTime" label="鐢熶骇淇濋殰閮ㄩ瀵肩瀛楁椂闂�"> - <a-input placeholder="璇疯緭鍏ョ敓浜т繚闅滈儴棰嗗绛惧瓧鏃堕棿" v-model="model.productionSupportSignatureTime" /> - </a-form-model-item> - <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="productionSupportComment" label="鐢熶骇淇濋殰閮ㄩ瀵兼剰瑙�"> - <a-input placeholder="璇疯緭鍏ョ敓浜т繚闅滈儴棰嗗鎰忚" v-model="model.productionSupportComment" /> - </a-form-model-item> - <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="hfCode" label="HF缂栫爜"> - <a-input placeholder="璇疯緭鍏F缂栫爜" v-model="model.hfCode" /> - </a-form-model-item> - </a-form-model> </a-spin> </j-modal> @@ -68,89 +32,103 @@ <script> import { httpAction } from '@/api/manage' - import moment from "moment" + import LxSearchEquipmentSelect from '../../equipment/modules/LxSearchEquipmentSelect' export default { - name: "EamTechnicalStatusEvaluationApplicationModal", - data () { + name: 'EamTechnicalStatusEvaluationApplicationModal', + components: { LxSearchEquipmentSelect }, + props: { + productionTreeData: { + type: Array + } + }, + data() { return { - title:"鎿嶄綔", + title: '鎿嶄綔', + editable: true, visible: false, model: {}, labelCol: { xs: { span: 24 }, - sm: { span: 5 }, + sm: { span: 5 } }, wrapperCol: { xs: { span: 24 }, - sm: { span: 16 }, + sm: { span: 16 } }, confirmLoading: false, - validatorRules:{ + validatorRules: { + factoryOrgCode: [{ required: true, message: '璇烽�夋嫨鐢宠閮ㄩ棬', trigger: 'change' }], + equipmentId: [{ required: true, message: '璇疯緭鍏ョ粺涓�缂栫爜鎴栧悕绉版悳绱�', trigger: 'change' }], + evaluationDate: [{ required: true, message: '璇烽�夋嫨鎶�鏈姸鎬侀壌瀹氭棩鏈�', trigger: 'change' }] }, url: { - add: "/eam/eamTechnicalStatusEvaluationApplication/add", - edit: "/eam/eamTechnicalStatusEvaluationApplication/edit", - }, + add: '/eam/eamTechnicalStatusEvaluationApplication/add', + edit: '/eam/eamTechnicalStatusEvaluationApplication/edit' + } } }, - created () { - }, methods: { - add () { - //鍒濆鍖栭粯璁ゅ�� - this.edit({}); + add() { + this.model = {} + this.editable = true + this.visible = true }, - edit (record) { - this.model = Object.assign({}, record); - this.visible = true; + + edit(record) { + this.model = Object.assign({}, record) + this.editable = false + this.visible = true }, - close () { - this.$emit('close'); - this.visible = false; - this.$refs.form.clearValidate(); - }, - handleOk () { - const that = this; + + handleOk() { + const that = this // 瑙﹀彂琛ㄥ崟楠岃瘉 - this.$refs.form.validate(valid => { + this.$refs.form.validate(valid => { if (valid) { - that.confirmLoading = true; - let httpurl = ''; - let method = ''; - if(!this.model.id){ - httpurl+=this.url.add; - method = 'post'; - }else{ - httpurl+=this.url.edit; - method = 'put'; + that.confirmLoading = true + let httpurl = '' + let method = '' + if (!this.model.id) { + httpurl += this.url.add + method = 'post' + } else { + httpurl += this.url.edit + method = 'put' } - httpAction(httpurl,this.model,method).then((res)=>{ - if(res.success){ - that.$message.success(res.message); - that.$emit('ok'); - }else{ - that.$message.warning(res.message); + httpAction(httpurl, this.model, method).then((res) => { + if (res.success) { + that.$notification.success({ + message: '娑堟伅', + description: res.message + }) + that.close() + that.$emit('ok') + } else { + that.$notification.warning({ + message: '娑堟伅', + description: res.message + }) } }).finally(() => { - that.confirmLoading = false; - that.close(); + that.confirmLoading = false }) - }else{ - return false; + } else { + return false } }) }, - handleCancel () { + + handleCancel() { this.close() }, - + close() { + this.$emit('close') + this.visible = false + this.$refs.form.clearValidate() + } } } -</script> - -<style lang="less" scoped> - -</style> \ No newline at end of file +</script> \ No newline at end of file diff --git a/src/views/flowable/workflow/FlowTodo.vue b/src/views/flowable/workflow/FlowTodo.vue index a3b335e..64c32b7 100644 --- a/src/views/flowable/workflow/FlowTodo.vue +++ b/src/views/flowable/workflow/FlowTodo.vue @@ -110,6 +110,16 @@ <!--鎶�鏈姸鎬佸彉鏇�--> <technical-status-change-approval-modal ref="technicalStatusChangeApprovalModal" :selectShenpiData="selectedRowData" @modalFormOk="modalFormOk"/> + + <!--鎶�鏈姸鎬侀壌瀹氱敵璇�--> + <technical-status-evaluation-application-approval-modal ref="technicalStatusEvaluationApplicationApprovalModal" + :selectShenpiData="selectedRowData" + @modalFormOk="modalFormOk"/> + + <!--璁惧鍋滅敤鐢宠--> + <technical-status-deactivate-approval-modal ref="technicalStatusDeactivateApprovalModal" + :selectShenpiData="selectedRowData" + @modalFormOk="modalFormOk"/> </a-card> </template> @@ -126,11 +136,16 @@ from './TechnicalStatusEvaluation/TechnicalStatusEvaluationOrderChangeApprovalModal' import RepairOrderApprovalModal from './repairOrder/RepairOrderApprovalModal' import TechnicalStatusChangeApprovalModal from './TechnicalStatus/TechnicalStatusChangeApprovalModal' + import TechnicalStatusEvaluationApplicationApprovalModal + from './TechnicalStatusEvaluation/TechnicalStatusEvaluationApplicationApprovalModal' + import TechnicalStatusDeactivateApprovalModal from './TechnicalStatus/TechnicalStatusDeactivateApprovalModal' export default { name: 'FlowTodo', mixins: [JeecgListMixin], components: { + TechnicalStatusDeactivateApprovalModal, + TechnicalStatusEvaluationApplicationApprovalModal, TechnicalStatusChangeApprovalModal, RepairOrderApprovalModal, TechnicalStatusEvaluationOrderChangeApprovalModal, @@ -245,6 +260,12 @@ case 'TECHNICAL_STATUS_CHANGE_PROCESS': this.handleTechnicalStatusChange(record) break + case 'TECHNICAL_STATUS_EVALUATION_APPLY_PROCESS': + this.handleTechnicalStatusEvaluationApply(record) + break + case 'TECHNICAL_STATUS_DEACTIVATE_PROCESS': + this.handleTechnicalStatusDeactivate(record) + break default: alert('娌℃壘鍒拌娴佺▼') } @@ -257,9 +278,8 @@ handleMaintenanceStandard(record) { this.selectedRowData = Object.assign({}, record) this.$refs.maintenanceStandardApprovalModal.visible = true - this.$refs.maintenanceStandardApprovalModal.title = '淇濆吇瑙勮寖' - this.$refs.maintenanceStandardApprovalModal.getAllApproveData(record) - this.$refs.maintenanceStandardApprovalModal.getBasicInformation(record) + this.$refs.maintenanceStandardApprovalModal.title = record.name + this.$refs.maintenanceStandardApprovalModal.handleApprove(record) }, /** @@ -288,7 +308,7 @@ this.selectedRowData = Object.assign({}, record) this.$refs.secondMaintenanceApprovalModal.visible = true this.$refs.secondMaintenanceApprovalModal.title = record.name - this.$refs.secondMaintenanceApprovalModal.handleDetail(record) + this.$refs.secondMaintenanceApprovalModal.handleApprove(record) }, /** @@ -335,6 +355,28 @@ this.$refs.technicalStatusChangeApprovalModal.handleApprove(record) }, + /** + * 鐐瑰嚮鎶�鏈姸鎬侀壌瀹氱敵璇峰垎绫绘祦绋嬪鎵规椂瑙﹀彂 + * @param record + */ + handleTechnicalStatusEvaluationApply(record) { + this.selectedRowData = Object.assign({}, record) + this.$refs.technicalStatusEvaluationApplicationApprovalModal.visible = true + this.$refs.technicalStatusEvaluationApplicationApprovalModal.title = record.name + this.$refs.technicalStatusEvaluationApplicationApprovalModal.handleApprove(record) + }, + + /** + * 鐐瑰嚮鍋滅敤鍔犲伐璁惧鐢宠鍒嗙被娴佺▼瀹℃壒鏃惰Е鍙� + * @param record + */ + handleTechnicalStatusDeactivate(record) { + this.selectedRowData = Object.assign({}, record) + this.$refs.technicalStatusDeactivateApprovalModal.visible = true + this.$refs.technicalStatusDeactivateApprovalModal.title = record.name + this.$refs.technicalStatusDeactivateApprovalModal.handleApprove(record) + }, + batchHandle() { const categorySet = new Set(this.selectionRows.map(item => item.category)) const nameSet = new Set(this.selectionRows.map(item => item.name)) diff --git a/src/views/flowable/workflow/MaintenanceStandard/MaintenanceStandardApprovalModal.vue b/src/views/flowable/workflow/MaintenanceStandard/MaintenanceStandardApprovalModal.vue index 95e580f..f3e18a9 100644 --- a/src/views/flowable/workflow/MaintenanceStandard/MaintenanceStandardApprovalModal.vue +++ b/src/views/flowable/workflow/MaintenanceStandard/MaintenanceStandardApprovalModal.vue @@ -3,7 +3,7 @@ :okButtonProps="{ class:{'jee-hidden': disableSubmit} }" @ok="submitForm" @cancel="handleCancel" :mask-closable="false" :confirmLoading="confirmLoading"> <a-spin :spinning="spinning"> - <a-form-model ref='form' :model='tableRowRecord' :labelCol="labelCol" :wrapperCol="wrapperCol" + <a-form-model ref='form' :model='model' :labelCol="labelCol" :wrapperCol="wrapperCol" :rules="validatorRules"> <a-row :gutter="24" id="outer-row"> <a-col :span="8" class="scroll-col"> @@ -12,12 +12,12 @@ <a-row> <a-col :span="span"> <a-form-model-item prop="standardCode" label="瑙勮寖缂栫爜"> - <a-input v-model="tableRowRecord.standardCode" readOnly/> + <a-input v-model="model.standardCode" readOnly/> </a-form-model-item> </a-col> <a-col :span="span"> <a-form-model-item prop="standardName" label="瑙勮寖鍚嶇О"> - <a-input v-model="tableRowRecord.standardName" readOnly/> + <a-input v-model="model.standardName" readOnly/> </a-form-model-item> </a-col> </a-row> @@ -25,12 +25,12 @@ <a-row> <a-col :span='span'> <a-form-model-item label="缁熶竴缂栫爜"> - <a-input v-model="tableRowRecord.equipmentCode" readOnly/> + <a-input v-model="model.equipmentCode" readOnly/> </a-form-model-item> </a-col> <a-col :span='span'> <a-form-model-item label="淇濆吇鍒嗙被"> - <a-input v-model="tableRowRecord.maintenanceCategory_dictText" readOnly/> + <a-input v-model="model.maintenanceCategory_dictText" readOnly/> </a-form-model-item> </a-col> @@ -39,12 +39,12 @@ <a-row> <a-col :span='span'> <a-form-model-item label="淇濆吇鍛ㄦ湡鍗曚綅"> - <a-input v-model="tableRowRecord.periodUnit" readOnly/> + <a-input v-model="model.periodUnit" readOnly/> </a-form-model-item> </a-col> <a-col :span='span'> <a-form-model-item label="淇濆吇鍛ㄦ湡"> - <a-input v-model="tableRowRecord.maintenancePeriod" readOnly/> + <a-input v-model="model.maintenancePeriod" readOnly/> </a-form-model-item> </a-col> </a-row> @@ -52,12 +52,12 @@ <a-row> <a-col :span='span'> <a-form-model-item label="鍒濆鏃ユ湡"> - <a-input v-model="tableRowRecord.initialDate" readOnly/> + <a-input v-model="model.initialDate" readOnly/> </a-form-model-item> </a-col> <a-col :span='span'> <a-form-model-item label="瑙勮寖鐘舵��"> - <a-input v-model="tableRowRecord.standardStatus_dictText" readOnly/> + <a-input v-model="model.standardStatus_dictText" readOnly/> </a-form-model-item> </a-col> </a-row> @@ -65,7 +65,7 @@ <a-row> <a-col :span="span"> <a-form-model-item label="瑙勮寖鐗堟湰"> - <a-input v-model="tableRowRecord.standardVersion" readOnly/> + <a-input v-model="model.standardVersion" readOnly/> </a-form-model-item> </a-col> </a-row> @@ -76,9 +76,8 @@ <a-col :span="10" class="scroll-col"> <a-tabs default-active-key="1"> <a-tab-pane key="1" tab="淇濆吇椤规槑缁�"> - <j-vxe-table ref="editableDetailTable" :rowNumber="false" :bordered="true" - :alwaysEdit="true" :toolbar="false" keep-source :loading="detail.loading" - :dataSource="detail.dataSource" :columns="detail.columns"> + <j-vxe-table ref="editableDetailTable" bordered alwaysEdit keep-source :dataSource="detail.dataSource" + :columns="detail.columns"> <template v-slot:itemCategory="props"> <j-dict-select-tag v-model="props.row.itemCategory" :dict-code="encodedDictCode" disabled/> </template> @@ -94,41 +93,43 @@ </a-col> <a-col :span="6" class="scroll-col"> - <a-tabs> + <a-tabs v-if="displayRepairLeaderFlag"> <a-tab-pane tab="缁翠慨涓讳换瀹℃壒"> <a-row :gutter="24"> <a-col :span="24"> - <a-form-model-item prop="repairManagerApproveResult" label="澶勭悊绫诲瀷"> - <j-dict-select-tag type='radio' v-model='tableRowRecord.repairManagerApproveResult' - dictCode='approved_rejected' - :disabled="disableSubmit||tableRowRecord.standardStatus!=='WAIT_REPAIR_DIRECTOR'"/> + <a-form-model-item prop="repairManagerApproveResult" label="纭绫诲瀷"> + <j-dict-select-tag type='radio' v-model='model.repairManagerApproveResult' + dictCode='approve_reject' + :disabled="disableSubmit||model.standardStatus!=='WAIT_REPAIR_DIRECTOR'"/> </a-form-model-item> </a-col> <a-col :span="24"> - <a-form-model-item label="澶勭悊鎰忚"> + <a-form-model-item label="纭鎰忚"> <a-textarea placeholder="璇疯緭鍏ユ剰瑙�" - :disabled="disableSubmit||tableRowRecord.standardStatus!=='WAIT_REPAIR_DIRECTOR'" - v-model="tableRowRecord.repairManagerApproveComment"/> + :disabled="disableSubmit||model.standardStatus!=='WAIT_REPAIR_DIRECTOR'" + v-model="model.repairManagerApproveComment"/> </a-form-model-item> </a-col> </a-row> </a-tab-pane> </a-tabs> - <a-tabs v-if="tableRowRecord.standardStatus&&tableRowRecord.standardStatus!=='WAIT_REPAIR_DIRECTOR'"> + <a-tabs v-if="displayTechnicalDirectorFlag"> <a-tab-pane tab="鎶�鏈富绠″鎵�"> <a-row :gutter="24"> <a-col :span="24"> - <a-form-model-item prop="technicalManagerApproveResult" label="澶勭悊绫诲瀷"> - <j-dict-select-tag type='radio' v-model='tableRowRecord.technicalManagerApproveResult' - dictCode='approved_rejected'/> + <a-form-model-item prop="technicalManagerApproveResult" label="纭绫诲瀷"> + <j-dict-select-tag type='radio' v-model='model.technicalManagerApproveResult' + dictCode='approve_reject' + :disabled="disableSubmit||model.standardStatus!=='WAIT_TECHNICAL_DIRECTOR'"/> </a-form-model-item> </a-col> <a-col :span="24"> - <a-form-model-item label="澶勭悊鎰忚"> - <a-textarea placeholder="璇疯緭鍏ユ剰瑙�" v-model="tableRowRecord.technicalManagerApproveComment"/> + <a-form-model-item label="纭鎰忚"> + <a-textarea placeholder="璇疯緭鍏ユ剰瑙�" v-model="model.technicalManagerApproveComment" + :disabled="disableSubmit||model.standardStatus!=='WAIT_TECHNICAL_DIRECTOR'"/> </a-form-model-item> </a-col> </a-row> @@ -142,10 +143,9 @@ </template> <script> - import { getAction, deleteAction, postAction, downFile, httpAction } from '@api/manage' + import { getAction, downFile, httpAction } from '@api/manage' import MaintenanceEquipmentSelect from '@views/eam/equipment/modules/MaintenanceEquipmentSelect.vue' import { JVXETypes } from '@comp/jeecg/JVxeTable' - import moment from 'moment' export default { name: 'MaintenanceStandardApprovalModal', @@ -160,14 +160,10 @@ span: 12, confirmLoading: false, spinning: false, - tableRowRecord: {}, + model: {}, validatorRules: { - repairManagerApproveResult: [ - { required: true, message: '璇烽�夋嫨澶勭悊绫诲瀷' } - ], - technicalManagerApproveResult: [ - { required: true, message: '璇烽�夋嫨澶勭悊绫诲瀷' } - ] + repairManagerApproveResult: [{ required: true, message: '璇烽�夋嫨纭绫诲瀷' }], + technicalManagerApproveResult: [{ required: true, message: '璇烽�夋嫨纭绫诲瀷' }] }, imageSrc: null, labelCol: { @@ -188,10 +184,9 @@ detailList: '/eam/eamMaintenanceStandardDetail/queryList' }, detail: { - loading: false, dataSource: [], columns: [], - defaultColumns: [ + inspectionColumns: [ { title: 'ID', key: 'id', @@ -205,37 +200,90 @@ { title: '椤圭洰搴忓彿', key: 'itemCode', - type: JVXETypes.inputNumber, - align: 'center', - disabled: true - }, - { - title: '閮ㄤ綅', - key: 'itemPart', - type: JVXETypes.textarea, - align: 'center', - disabled: true + type: JVXETypes.normal, + align: 'center' }, { title: '淇濆吇椤瑰垎绫�', key: 'itemCategory', type: JVXETypes.slot, slotName: 'itemCategory', - align: 'center' + align: 'center', + disabled: true }, { title: '淇濆吇椤圭洰', key: 'itemName', - type: JVXETypes.textarea, - align: 'center', - disabled: true + type: JVXETypes.normal, + align: 'center' }, { title: '淇濆吇瑙勮寖鎴栬姹�', key: 'itemDemand', - type: JVXETypes.textarea, + type: JVXETypes.normal, + align: 'center' + } + ], + secondMaintenanceColumns: [ + { + title: 'ID', + key: 'id', + type: JVXETypes.hidden + }, + { + title: 'standardId', + key: 'standardId', + type: JVXETypes.hidden + }, + { + title: '椤圭洰搴忓彿', + key: 'itemCode', + type: JVXETypes.normal, + align: 'center' + }, + { + title: '淇濆吇椤瑰垎绫�', + key: 'itemCategory', + type: JVXETypes.slot, + slotName: 'itemCategory', align: 'center', disabled: true + }, + { + title: '淇濆吇椤圭洰', + key: 'itemName', + type: JVXETypes.normal, + align: 'center' + } + ], + thirdMaintenanceColumns: [ + { + title: 'ID', + key: 'id', + type: JVXETypes.hidden + }, + { + title: 'standardId', + key: 'standardId', + type: JVXETypes.hidden + }, + { + title: '淇濆吇閮ㄤ綅', + key: 'itemPart', + type: JVXETypes.normal, + align: 'center' + }, + { + title: '淇濆吇鍐呭', + key: 'itemName', + type: JVXETypes.normal, + align: 'center' + }, + { + title: '楠屾敹鏍囧噯', + key: 'itemDemand', + type: JVXETypes.normal, + align: 'center' } ] }, @@ -244,17 +292,36 @@ } }, watch: { - 'tableRowRecord.maintenanceCategory': { + 'model.maintenanceCategory': { handler(val) { if (val) { - if (val != 'THIRD_MAINTENANCE') this.detail.columns = [...this.detail.defaultColumns.filter(item => item.key != 'itemPart')] - else this.detail.columns = [...this.detail.defaultColumns.filter(item => item.key != 'itemCategory')] + console.log('val', val) + switch (val) { + case 'POINT_INSPECTION': + this.detail.columns = this.detail.inspectionColumns + break + case 'SECOND_MAINTENANCE': + this.detail.columns = this.detail.secondMaintenanceColumns + break + case 'THIRD_MAINTENANCE': + this.detail.columns = this.detail.thirdMaintenanceColumns + break + default: + break + } } - else this.detail.columns = [...this.detail.defaultColumns] } } }, computed: { + displayRepairLeaderFlag() { + return this.model.standardStatus && ['WAIT_REPAIR_DIRECTOR', 'WAIT_TECHNICAL_DIRECTOR', 'REJECTED'].includes(this.model.standardStatus) + }, + + displayTechnicalDirectorFlag() { + return this.model.standardStatus && ['WAIT_TECHNICAL_DIRECTOR', 'REJECTED'].includes(this.model.standardStatus) && this.model.repairManagerApproveResult === '1' + }, + encodedDictCode() { const dictCode = `sys_dict_item,item_text,item_value,dict_id='1940598438685134850'` return encodeURIComponent(dictCode) @@ -262,39 +329,75 @@ }, methods: { /** - * 鑾峰彇娴佺▼鑺傜偣鍜屾祦绋嬪浘 - * @param record 寰呭姙璁板綍淇℃伅 + * 涓婚〉闈㈢偣鍑绘墽琛屽鎵规椂瑙﹀彂 + * @param record 涓婚〉闈㈠垪琛ㄨ璁板綍 */ - getAllApproveData(record) { - if (record.procInstId) { - const { processDefinitionId, processInstanceId, processDefinitionKey, procInstId } = record - const imageParam = { processDefinitionId, processInstanceId, TaskDefinitionKey: processDefinitionKey } - const that = this - this.imageSrc = null - - downFile(this.url.diagramView, imageParam, 'get') - .then((res => { - const urlObject = window.URL.createObjectURL(new Blob([res])) - that.imageSrc = urlObject - })) - .finally(() => { - this.spinning = false - }) - } + handleApprove(record) { + this.getBasicInformationByApi(record) + this.getFlowChartImageByApi(record) }, /** - * 鑾峰彇寰呭姙璁板綍鐨勫熀鏈俊鎭� - * @param record 寰呭姙璁板綍淇℃伅 + * 涓婚〉闈㈢偣鍑昏鎯呮椂瑙﹀彂 + * @param record 涓婚〉闈㈠垪琛ㄨ璁板綍 */ - async getBasicInformation(record) { + handleDetail(record) { this.detail.dataSource = [] - this.tableRowRecord = {} + this.model = Object.assign({}, record) + this.loadDetail(record.id) + }, + + /** + * 鑾峰彇鍩虹淇℃伅 + * @param record 涓婚〉闈㈠垪琛ㄨ璁板綍 + */ + getBasicInformationByApi(record) { this.spinning = true - const param = { id: record.dataId } - let res = await getAction(this.url.queryById, param) - this.tableRowRecord = Object.assign({}, res.result.records[0]) - await this.loadDetail(record.dataId) + this.model = {} + this.detail.dataSource = [] + const that = this + getAction(this.url.queryById, { id: record.dataId }) + .then(res => { + if (res.success) { + that.model = Object.assign({}, res.result.records[0]) + that.model.dataId = record.dataId + that.model.taskId = record.id + that.model.userId = record.assignee + that.model.instanceId = record.procInstId + } + else { + that.$notification.warning({ + message: '娑堟伅', + description: res.message + }) + } + }) + .finally(() => { + this.loadDetail(record.dataId) + }) + }, + + /** + * 鑾峰彇娴佺▼鍥� + * @param record 涓婚〉闈㈠垪琛ㄨ璁板綍 + */ + getFlowChartImageByApi(record) { + const { processDefinitionId, processInstanceId, processDefinitionKey } = record + this.imageSrc = null + downFile(this.url.diagramView, { + processDefinitionId, + processInstanceId, + TaskDefinitionKey: processDefinitionKey + }, 'get') + .then((res => { + this.imageSrc = window.URL.createObjectURL(new Blob([res])) + })) + .catch(err => { + this.$notification.error({ + message: '娑堟伅', + description: err.message + }) + }) }, /** @@ -302,14 +405,13 @@ * @param dataId 涓氬姟ID */ loadDetail(dataId) { - if (dataId) { - getAction(this.url.detailList, { standardId: dataId }) - .then(res => { - if (res.success) { - this.detail.dataSource = [...res.result] - } - }) - } + getAction(this.url.detailList, { standardId: dataId }) + .then(res => { + if (res.success) this.detail.dataSource = res.result + }) + .finally(() => { + this.spinning = false + }) }, async submitForm() { @@ -321,21 +423,8 @@ this.$refs.form.validate(valid => { if (valid) { this.confirmLoading = this.spinning = true - const flowTaskVo = {} - flowTaskVo.dataId = this.selectShenpiData.dataId - flowTaskVo.taskId = this.selectShenpiData.id - flowTaskVo.userId = this.selectShenpiData.assignee - flowTaskVo.instanceId = this.selectShenpiData.procInstId - if (this.tableRowRecord.standardStatus == 'WAIT_REPAIR_DIRECTOR') { - flowTaskVo.repairManagerApproveResult = this.tableRowRecord.repairManagerApproveResult - flowTaskVo.repairManagerApproveComment = this.tableRowRecord.repairManagerApproveComment - } else { - flowTaskVo.technicalManagerApproveResult = this.tableRowRecord.technicalManagerApproveResult - flowTaskVo.technicalManagerApproveComment = this.tableRowRecord.technicalManagerApproveComment - } const that = this - console.log('琛ㄥ崟鎻愪氦鏁版嵁', flowTaskVo) - httpAction(this.url.approve, flowTaskVo, 'post') + httpAction(this.url.approve, that.model, 'post') .then((res) => { if (res.success) { that.$notification.success({ diff --git a/src/views/flowable/workflow/TechnicalStatus/TechnicalStatusChangeApprovalModal.vue b/src/views/flowable/workflow/TechnicalStatus/TechnicalStatusChangeApprovalModal.vue index b3de472..79e25b8 100644 --- a/src/views/flowable/workflow/TechnicalStatus/TechnicalStatusChangeApprovalModal.vue +++ b/src/views/flowable/workflow/TechnicalStatus/TechnicalStatusChangeApprovalModal.vue @@ -231,10 +231,10 @@ }, computed: { displayDepartHeaderFlag() { - return this.model.changeStatus && ['DEPART_HEADER_SIGNING', 'DEPART_LEADER_SIGNING', 'COMPLETED'].includes(this.model.changeStatus) + return this.model.changeStatus && ['DEPART_HEADER_SIGNING', 'DEPART_LEADER_SIGNING', 'COMPLETED', 'REJECTED'].includes(this.model.changeStatus) }, displayDepartLeaderFlag() { - return this.model.changeStatus && ['DEPART_LEADER_SIGNING', 'COMPLETED'].includes(this.model.changeStatus) + return this.model.changeStatus && ['DEPART_LEADER_SIGNING', 'COMPLETED', 'REJECTED'].includes(this.model.changeStatus) && this.model.departHeaderSignatureResult === '1' } }, methods: { diff --git a/src/views/flowable/workflow/TechnicalStatus/TechnicalStatusDeactivateApprovalModal.vue b/src/views/flowable/workflow/TechnicalStatus/TechnicalStatusDeactivateApprovalModal.vue new file mode 100644 index 0000000..2115ee8 --- /dev/null +++ b/src/views/flowable/workflow/TechnicalStatus/TechnicalStatusDeactivateApprovalModal.vue @@ -0,0 +1,386 @@ +<template> + <j-modal :title="title" fullscreen :visible="visible" :confirmLoading="confirmLoading" + :okButtonProps="{ class:{'jee-hidden': disableSubmit} }" @ok="handleOk" + @cancel="handleCancel" cancelText="鍏抽棴"> + <a-spin :spinning="spinning"> + <a-form-model ref="form" :model="model" :rules="validatorRules" :labelCol="labelCol" :wrapperCol="wrapperCol"> + <a-row id="outer-row" :gutter="24"> + <!--宸︿晶鍩虹淇℃伅鍒�--> + <a-col :span="8" class="scroll-col"> + <a-tabs> + <a-tab-pane tab="鍩虹淇℃伅"> + <a-row> + <a-col :span="12"> + <a-form-model-item label="鍋滅敤鍗曞彿"> + <a-input v-model="model.deactivateOrderNum" readOnly/> + </a-form-model-item> + </a-col> + <a-col :span="12"> + <a-form-model-item label="鐢宠鍗曚綅"> + <a-input v-model="model.factoryOrgCode_dictText" readOnly/> + </a-form-model-item> + </a-col> + </a-row> + + <a-row> + <a-col :span="12"> + <a-form-model-item label="鐢宠浜�"> + <a-input v-model="model.applicant_dictText" readOnly/> + </a-form-model-item> + </a-col> + <a-col :span="12"> + <a-form-model-item label="鐢宠鏃堕棿"> + <a-input v-model="model.applyDate" readOnly/> + </a-form-model-item> + </a-col> + </a-row> + + <a-row> + <a-col :span="24"> + <a-form-model-item :labelCol="labelColLong" :wrapperCol="wrapperColLong" label="澶囨敞"> + <a-textarea v-model="model.remark" readOnly/> + </a-form-model-item> + </a-col> + </a-row> + </a-tab-pane> + </a-tabs> + </a-col> + + <!-- 涓棿鏄庣粏椤瑰垪--> + <a-col :span="10" class="scroll-col"> + <a-tabs> + <a-tab-pane key="1" tab="璁惧鏄庣粏"> + <j-vxe-table ref="editableDetailTable" rowNumber bordered keep-source :dataSource="detail.dataSource" + :columns="detail.columns"/> + </a-tab-pane> + <a-tab-pane key='2' tab='娴佺▼鍥�' v-if="selectShenpiData.procInstId"> + <img :src="imageSrc" alt="Fetched Image" style="width: 100%" v-if="imageSrc"/> + </a-tab-pane> + </a-tabs> + </a-col> + + <!--鍙充晶瀹℃壒鍒�--> + <a-col :span="6" class="scroll-col"> + <a-tabs v-if="displayDepartHeaderFlag"> + <a-tab-pane tab="浣跨敤鍗曚綅瀹ょ骇棰嗗纭"> + <a-row> + <a-col :span="24"> + <a-form-model-item prop="departHeaderSignatureResult" label="纭绫诲瀷" :labelCol="rightColLabelCol" + :wrapperCol="rightColWrapperCol"> + <j-dict-select-tag type='radio' v-model='model.departHeaderSignatureResult' + dictCode='approve_reject' + :disabled="disableSubmit||(model.applicationStatus&&model.applicationStatus!=='DEPART_HEADER_SIGNING')"/> + </a-form-model-item> + </a-col> + <a-col :span="24"> + <a-form-model-item label="纭鎰忚" :labelCol="rightColLabelCol" :wrapperCol="rightColWrapperCol"> + <a-textarea placeholder="璇疯緭鍏ユ剰瑙�" v-model="model.departHeaderComment" + :disabled="disableSubmit||(model.applicationStatus&&model.applicationStatus!=='DEPART_HEADER_SIGNING')"/> + </a-form-model-item> + </a-col> + </a-row> + </a-tab-pane> + </a-tabs> + + <a-tabs v-if="displayDepartLeaderFlag||(disableSubmit&&model.departLeaderSignatureResult==='2')"> + <a-tab-pane tab="浣跨敤鍗曚綅閮ㄧ骇棰嗗纭"> + <a-row> + <a-col :span="24"> + <a-form-model-item prop="departLeaderSignatureResult" label="纭绫诲瀷" :labelCol="rightColLabelCol" + :wrapperCol="rightColWrapperCol"> + <j-dict-select-tag type='radio' v-model='model.departLeaderSignatureResult' + dictCode='approve_reject' + :disabled="disableSubmit||(model.applicationStatus&&model.applicationStatus!=='DEPART_LEADER_SIGNING')"/> + </a-form-model-item> + </a-col> + <a-col :span="24"> + <a-form-model-item label="纭鎰忚" :labelCol="rightColLabelCol" :wrapperCol="rightColWrapperCol"> + <a-textarea placeholder="璇疯緭鍏ユ剰瑙�" v-model="model.departLeaderComment" + :disabled="disableSubmit||(model.applicationStatus&&model.applicationStatus!=='DEPART_LEADER_SIGNING')"/> + </a-form-model-item> + </a-col> + </a-row> + </a-tab-pane> + </a-tabs> + </a-col> + </a-row> + </a-form-model> + </a-spin> + </j-modal> +</template> + +<script> + import { downFile, getAction, postAction } from '@/api/manage' + import TechnicalStatusEquipmentSelect from '../../../eam/equipment/modules/TechnicalStatusEquipmentSelect' + import { JVXETypes } from '@comp/jeecg/JVxeTable' + + export default { + name: 'TechnicalStatusDeactivateApprovalModal', + components: { + TechnicalStatusEquipmentSelect + }, + props: { + selectShenpiData: { + type: Object + } + }, + data() { + return { + title: '鎿嶄綔', + visible: false, + model: {}, + labelCol: { + xs: { span: 24 }, + sm: { span: 8 } + }, + wrapperCol: { + xs: { span: 24 }, + sm: { span: 16 } + }, + labelColLong: { + xs: { span: 24 }, + sm: { span: 4 } + }, + wrapperColLong: { + xs: { span: 24 }, + sm: { span: 20 } + }, + rightColLabelCol: { + xs: { span: 24 }, + sm: { span: 6 } + }, + rightColWrapperCol: { + xs: { span: 24 }, + sm: { span: 16 } + }, + confirmLoading: false, + spinning: false, + imageSrc: null, + validatorRules: { + departHeaderSignatureResult: [{ required: true, message: '璇烽�夋嫨纭绫诲瀷' }], + departLeaderSignatureResult: [{ required: true, message: '璇烽�夋嫨纭绫诲瀷' }] + }, + url: { + queryById: '/eam/eamTechnicalStatusDeactivate/queryById', + approval: '/eam/eamTechnicalStatusDeactivate/approval', + detail: '/eam/eamTechnicalStatusDeactivateDetail/queryList', + diagramView: '/assign/flow/diagramView' + }, + disableSubmit: false, + selectedRowKeys: [], + detail: { + dataSource: [], + columns: [ + { + title: 'ID', + key: 'id', + type: JVXETypes.hidden + }, + { + title: '缁熶竴缂栫爜', + key: 'equipmentCode', + align: 'center', + type: JVXETypes.normal, + width: 200 + }, + { + title: '璁惧鍚嶇О', + key: 'equipmentName', + align: 'center', + type: JVXETypes.normal, + width: 200 + }, + { + title: '璁惧鍨嬪彿', + key: 'equipmentModel', + align: 'center', + type: JVXETypes.normal, + width: 200 + }, + { + title: '浣跨敤鍗曚綅', + key: 'factoryName', + align: 'center', + type: JVXETypes.normal, + width: 200 + }, + { + title: '鍋滅敤鍘熷洜', + key: 'deactivateReason', + align: 'center', + type: JVXETypes.normal, + width: 200 + }, + { + title: '宸插仠鐢ㄦ椂闀�', + key: 'deactivateDuration', + align: 'center', + type: JVXETypes.normal, + width: 200 + } + ] + } + } + }, + computed: { + displayDepartHeaderFlag() { + return this.model.applicationStatus && ['DEPART_HEADER_SIGNING', 'DEPART_LEADER_SIGNING', 'COMPLETED', 'REJECTED'].includes(this.model.applicationStatus) + }, + displayDepartLeaderFlag() { + return this.model.applicationStatus && ['DEPART_LEADER_SIGNING', 'COMPLETED', 'REJECTED'].includes(this.model.applicationStatus) && this.model.departHeaderSignatureResult === '1' + } + }, + methods: { + /** + * 涓婚〉闈㈢偣鍑绘墽琛屽鎵规椂瑙﹀彂 + * @param record 涓婚〉闈㈠垪琛ㄨ璁板綍 + */ + handleApprove(record) { + this.model = {} + this.getBasicInformationByApi(record) + this.getFlowChartImageByApi(record) + }, + + /** + * 涓婚〉闈㈢偣鍑昏鎯呮椂瑙﹀彂 + * @param record 涓婚〉闈㈠垪琛ㄨ璁板綍 + */ + handleDetail(record) { + this.model = Object.assign({}, record) + this.loadDetail(record.id) + }, + + /** + * 鑾峰彇鍩虹淇℃伅 + * @param record 涓婚〉闈㈠垪琛ㄨ璁板綍 + */ + getBasicInformationByApi(record) { + this.spinning = true + const that = this + getAction(this.url.queryById, { id: record.dataId }) + .then(res => { + if (res.success) { + that.model = Object.assign({}, res.result) + that.model.dataId = record.dataId + that.model.taskId = record.id + that.model.userId = record.assignee + that.model.instanceId = record.procInstId + } + else { + that.$notification.warning({ + message: '娑堟伅', + description: res.message + }) + } + }) + .finally(() => { + this.loadDetail(record.dataId) + }) + }, + + /** + * 鑾峰彇娴佺▼鍥� + * @param record 涓婚〉闈㈠垪琛ㄨ璁板綍 + */ + getFlowChartImageByApi(record) { + const { processDefinitionId, processInstanceId, processDefinitionKey } = record + this.imageSrc = null + downFile(this.url.diagramView, { + processDefinitionId, + processInstanceId, + TaskDefinitionKey: processDefinitionKey + }, 'get') + .then((res => { + this.imageSrc = window.URL.createObjectURL(new Blob([res])) + })) + .catch(err => { + this.$notification.error({ + message: '娑堟伅', + description: err.message + }) + }) + }, + + /** + * 鑾峰彇璁惧鏄庣粏 + * @param applicationId + */ + loadDetail(applicationId) { + this.detail.dataSource = [] + getAction(this.url.detail, { applicationId }) + .then(res => { + if (res.success) this.detail.dataSource = res.result + }) + .finally(() => { + this.spinning = false + }) + }, + + async handleOk() { + const that = this + + // 瑙﹀彂琛ㄥ崟楠岃瘉 + this.$refs.form.validate(valid => { + if (valid) { + that.confirmLoading = that.spinning = true + + postAction(that.url.approval, that.model) + .then((res) => { + if (res.success) { + that.$notification.success({ + message: '娑堟伅', + description: res.message + }) + that.$emit('modalFormOk') + that.close() + } else { + that.$notification.warning({ + message: '娑堟伅', + description: 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() + } + } + } +</script> + +<style scoped lang="less"> + /deep/ .ant-spin-nested-loading { + height: 100%; + + .ant-spin-container { + height: 100%; + + .ant-form { + height: 100%; + + #outer-row { + height: 100%; + + .scroll-col { + height: 100%; + overflow: auto; + } + } + } + } + } +</style> \ No newline at end of file diff --git a/src/views/flowable/workflow/TechnicalStatusEvaluation/TechnicalStatusEvaluationApplicationApprovalModal.vue b/src/views/flowable/workflow/TechnicalStatusEvaluation/TechnicalStatusEvaluationApplicationApprovalModal.vue new file mode 100644 index 0000000..8fbf118 --- /dev/null +++ b/src/views/flowable/workflow/TechnicalStatusEvaluation/TechnicalStatusEvaluationApplicationApprovalModal.vue @@ -0,0 +1,353 @@ +<template> + <j-modal :title="title" :width="1300" :fullscreen="fullScreen" :visible="visible" :confirmLoading="confirmLoading" + :okButtonProps="{ class:{'jee-hidden': disableSubmit} }" @ok="handleOk" + @cancel="handleCancel" cancelText="鍏抽棴"> + <a-spin :spinning="spinning"> + <a-form-model ref="form" :model="model" :rules="validatorRules" :labelCol="labelCol" :wrapperCol="wrapperCol"> + <a-row id="outer-row" :gutter="24"> + <!--宸︿晶鍩虹淇℃伅鍒�--> + <a-col :span="!disableSubmit?8:14" class="scroll-col"> + <a-tabs> + <a-tab-pane tab="鍩虹淇℃伅"> + <a-row> + <a-col :span="12"> + <a-form-model-item label="鐢宠鍗曞彿"> + <a-input v-model="model.applicationOrderNum" readOnly/> + </a-form-model-item> + </a-col> + <a-col :span="12"> + <a-form-model-item label="缁熶竴缂栫爜"> + <technical-status-equipment-select v-model="model.equipmentId" + @autocompleteForm="autocompleteForm" disabled/> + </a-form-model-item> + </a-col> + </a-row> + + <a-row> + + + </a-row> + + <a-row> + <a-col :span="12"> + <a-form-model-item label="鐢宠閮ㄩ棬"> + <a-input v-model="model.factoryOrgCode_dictText" readOnly/> + </a-form-model-item> + </a-col> + <a-col :span="12"> + <a-form-model-item label="鐢宠浜�"> + <a-input v-model="model.applicant_dictText" readOnly/> + </a-form-model-item> + </a-col> + </a-row> + + <a-row> + <a-col :span="12"> + <a-form-model-item label="鎶�鏈姸鎬侀壌瀹氭棩鏈�"> + <a-input v-model="model.evaluationDate" readOnly/> + </a-form-model-item> + </a-col> + </a-row> + + <a-row> + <a-form-model-item :labelCol="labelColLong" :wrapperCol="wrapperColLong" label="澶囨敞"> + <a-textarea v-model="model.remark" readOnly/> + </a-form-model-item> + </a-row> + </a-tab-pane> + </a-tabs> + </a-col> + + <!-- 涓棿鏄庣粏椤瑰垪--> + <a-col v-if="selectShenpiData.procInstId" :span="10" class="scroll-col"> + <a-tabs> + <a-tab-pane key='1' tab='娴佺▼鍥�'> + <img :src="imageSrc" alt="Fetched Image" style="width: 100%" v-if="imageSrc"/> + </a-tab-pane> + </a-tabs> + </a-col> + + <!--鍙充晶瀹℃壒鍒�--> + <a-col :span="!disableSubmit?6:10" class="scroll-col"> + <a-tabs v-if="displayDepartHeaderFlag"> + <a-tab-pane tab="浣跨敤鍗曚綅瀹ょ骇棰嗗纭"> + <a-row> + <a-col :span="24"> + <a-form-model-item prop="departHeaderSignatureResult" label="纭绫诲瀷" :labelCol="rightColLabelCol" + :wrapperCol="rightColWrapperCol"> + <j-dict-select-tag type='radio' v-model='model.departHeaderSignatureResult' + dictCode='approve_reject' + :disabled="disableSubmit||(model.applicationStatus&&model.applicationStatus!=='DEPART_HEADER_SIGNING')"/> + </a-form-model-item> + </a-col> + <a-col :span="24"> + <a-form-model-item label="纭鎰忚" :labelCol="rightColLabelCol" :wrapperCol="rightColWrapperCol"> + <a-textarea placeholder="璇疯緭鍏ユ剰瑙�" v-model="model.departHeaderComment" + :disabled="disableSubmit||(model.applicationStatus&&model.applicationStatus!=='DEPART_HEADER_SIGNING')"/> + </a-form-model-item> + </a-col> + </a-row> + </a-tab-pane> + </a-tabs> + + <a-tabs v-if="displayProductionHeaderFlag"> + <a-tab-pane tab="鐢熶骇璁惧绠$悊涓荤纭"> + <a-row> + <a-col :span="24"> + <a-form-model-item prop="productionHeaderSignatureResult" label="纭绫诲瀷" :labelCol="rightColLabelCol" + :wrapperCol="rightColWrapperCol"> + <j-dict-select-tag type='radio' v-model='model.productionHeaderSignatureResult' + dictCode='approve_reject' + :disabled="disableSubmit||(model.applicationStatus&&model.applicationStatus!=='PRODUCTION_HEADER_SIGNING')"/> + </a-form-model-item> + </a-col> + <a-col :span="24"> + <a-form-model-item label="纭鎰忚" :labelCol="rightColLabelCol" :wrapperCol="rightColWrapperCol"> + <a-textarea placeholder="璇疯緭鍏ユ剰瑙�" v-model="model.productionHeaderComment" + :disabled="disableSubmit||(model.applicationStatus&&model.applicationStatus!=='PRODUCTION_HEADER_SIGNING')"/> + </a-form-model-item> + </a-col> + </a-row> + </a-tab-pane> + </a-tabs> + + <a-tabs v-if="displayProductionSupportFlag"> + <a-tab-pane tab="鐢熶骇淇濋殰閮ㄩ瀵肩‘璁�"> + <a-row> + <a-col :span="24"> + <a-form-model-item prop="productionSupportSignatureResult" label="纭绫诲瀷" + :labelCol="rightColLabelCol" :wrapperCol="rightColWrapperCol"> + <j-dict-select-tag type='radio' v-model='model.productionSupportSignatureResult' + dictCode='approve_reject' + :disabled="disableSubmit||(model.applicationStatus&&model.applicationStatus!=='PRODUCTION_SUPPORT_SIGNING')"/> + </a-form-model-item> + </a-col> + <a-col :span="24"> + <a-form-model-item label="纭鎰忚" :labelCol="rightColLabelCol" :wrapperCol="rightColWrapperCol"> + <a-textarea placeholder="璇疯緭鍏ユ剰瑙�" v-model="model.productionSupportComment" + :disabled="disableSubmit||(model.applicationStatus&&model.applicationStatus!=='PRODUCTION_SUPPORT_SIGNING')"/> + </a-form-model-item> + </a-col> + </a-row> + </a-tab-pane> + </a-tabs> + </a-col> + </a-row> + </a-form-model> + </a-spin> + </j-modal> +</template> + +<script> + import { downFile, getAction, postAction } from '@/api/manage' + import TechnicalStatusEquipmentSelect from '../../../eam/equipment/modules/TechnicalStatusEquipmentSelect' + + export default { + name: 'TechnicalStatusEvaluationApplicationApprovalModal', + components: { + TechnicalStatusEquipmentSelect + }, + props: { + selectShenpiData: { + type: Object + } + }, + data() { + return { + title: '鎿嶄綔', + visible: false, + model: {}, + labelCol: { + xs: { span: 24 }, + sm: { span: 10 } + }, + wrapperCol: { + xs: { span: 24 }, + sm: { span: 14 } + }, + labelColLong: { + xs: { span: 24 }, + sm: { span: 5 } + }, + wrapperColLong: { + xs: { span: 24 }, + sm: { span: 19 } + }, + rightColLabelCol: { + xs: { span: 24 }, + sm: { span: 6 } + }, + rightColWrapperCol: { + xs: { span: 24 }, + sm: { span: 16 } + }, + confirmLoading: false, + spinning: false, + imageSrc: null, + fullScreen: true, + validatorRules: { + departHeaderSignatureResult: [{ required: true, message: '璇烽�夋嫨纭绫诲瀷' }], + productionHeaderSignatureResult: [{ required: true, message: '璇烽�夋嫨纭绫诲瀷' }], + productionSupportSignatureResult: [{ required: true, message: '璇烽�夋嫨纭绫诲瀷' }] + }, + url: { + queryById: '/eam/eamTechnicalStatusEvaluationApplication/queryById', + approval: '/eam/eamTechnicalStatusEvaluationApplication/approval', + diagramView: '/assign/flow/diagramView' + }, + disableSubmit: false, + selectedRowKeys: [] + } + }, + computed: { + displayDepartHeaderFlag() { + return this.model.applicationStatus && ['DEPART_HEADER_SIGNING', 'PRODUCTION_HEADER_SIGNING', 'PRODUCTION_SUPPORT_SIGNING', 'COMPLETED', 'REJECTED'].includes(this.model.applicationStatus) + }, + displayProductionHeaderFlag() { + return this.model.applicationStatus && ['PRODUCTION_HEADER_SIGNING', 'PRODUCTION_SUPPORT_SIGNING', 'COMPLETED', 'REJECTED'].includes(this.model.applicationStatus) && this.model.departHeaderSignatureResult === '1' + }, + displayProductionSupportFlag() { + return this.model.applicationStatus && ['PRODUCTION_SUPPORT_SIGNING', 'COMPLETED', 'REJECTED'].includes(this.model.applicationStatus) && this.model.productionHeaderSignatureResult === '1' + } + }, + methods: { + /** + * 涓婚〉闈㈢偣鍑绘墽琛屽鎵规椂瑙﹀彂 + * @param record 涓婚〉闈㈠垪琛ㄨ璁板綍 + */ + handleApprove(record) { + this.fullScreen = true + this.model = {} + this.getBasicInformationByApi(record) + this.getFlowChartImageByApi(record) + }, + + /** + * 涓婚〉闈㈢偣鍑昏鎯呮椂瑙﹀彂 + * @param record 涓婚〉闈㈠垪琛ㄨ璁板綍 + */ + handleDetail(record) { + this.fullScreen = false + this.model = Object.assign({}, record) + }, + + /** + * 鑾峰彇鍩虹淇℃伅 + * @param record 涓婚〉闈㈠垪琛ㄨ璁板綍 + */ + getBasicInformationByApi(record) { + this.spinning = true + const that = this + getAction(this.url.queryById, { id: record.dataId }) + .then(res => { + if (res.success) { + that.model = Object.assign({}, res.result) + that.model.dataId = record.dataId + that.model.taskId = record.id + that.model.userId = record.assignee + that.model.instanceId = record.procInstId + } + else { + that.$notification.warning({ + message: '娑堟伅', + description: res.message + }) + } + }) + }, + + /** + * 鑾峰彇娴佺▼鍥� + * @param record 涓婚〉闈㈠垪琛ㄨ璁板綍 + */ + getFlowChartImageByApi(record) { + const { processDefinitionId, processInstanceId, processDefinitionKey } = record + this.imageSrc = null + downFile(this.url.diagramView, { + processDefinitionId, + processInstanceId, + TaskDefinitionKey: processDefinitionKey + }, 'get') + .then((res => { + this.imageSrc = window.URL.createObjectURL(new Blob([res])) + })) + .catch(err => { + this.$notification.error({ + message: '娑堟伅', + description: err.message + }) + }) + }, + + async handleOk() { + const that = this + // 瑙﹀彂琛ㄥ崟楠岃瘉 + this.$refs.form.validate(valid => { + if (valid) { + that.confirmLoading = that.spinning = true + + postAction(this.url.approval, this.model) + .then((res) => { + if (res.success) { + that.$notification.success({ + message: '娑堟伅', + description: res.message + }) + that.$emit('modalFormOk') + that.close() + } else { + that.$notification.warning({ + message: '娑堟伅', + description: res.message + }) + } + }) + .finally(() => { + that.confirmLoading = that.spinning = false + }) + } else { + return false + } + }) + }, + + autocompleteForm(selectObj) { + this.$set(this.model, 'equipmentId', selectObj.equipmentId) + this.spinning = false + }, + + handleCancel() { + this.close() + }, + + close() { + this.$emit('close') + this.visible = false + this.$refs.form.clearValidate() + } + } + } +</script> + +<style scoped lang="less"> + /deep/ .ant-spin-nested-loading { + height: 100%; + + .ant-spin-container { + height: 100%; + + .ant-form { + height: 100%; + + #outer-row { + height: 100%; + + .scroll-col { + height: 100%; + overflow: auto; + } + } + } + } + } +</style> \ No newline at end of file diff --git a/src/views/flowable/workflow/TechnicalStatusEvaluation/TechnicalStatusEvaluationApprovalModal.vue b/src/views/flowable/workflow/TechnicalStatusEvaluation/TechnicalStatusEvaluationApprovalModal.vue index 073a677..20a3606 100644 --- a/src/views/flowable/workflow/TechnicalStatusEvaluation/TechnicalStatusEvaluationApprovalModal.vue +++ b/src/views/flowable/workflow/TechnicalStatusEvaluation/TechnicalStatusEvaluationApprovalModal.vue @@ -53,10 +53,10 @@ <a-tabs :active-key="activeTabKey" @change="handleTabChange"> <a-tab-pane :key="1" tab="瀹夊叏瑁呯疆妫�鏌�" forceRender - v-if="disableSubmit|| - selectShenpiData.taskDefKey&&(selectShenpiData.taskDefKey=='safety_equipment_check'||selectShenpiData.taskDefKey=='safety_equipment_check_confirm')|| - model.evaluationStatus&&model.evaluationStatus!='UNDER_EVALUATION'&&detail.safetyEquipmentCheckList.length>0"> - <j-vxe-table ref="editableDetailTable1" rowNumber bordered alwaysEdit keep-source :height="300" + v-if="(disableSubmit&&detail.safetyEquipmentCheckList.length>0)|| + (selectShenpiData.taskDefKey&&(selectShenpiData.taskDefKey=='safety_equipment_check'||selectShenpiData.taskDefKey=='safety_equipment_check_confirm'))|| + (model.evaluationStatus&&model.evaluationStatus!='UNDER_EVALUATION'&&model.evaluationStatus!='WAIT_EVALUATION')"> + <j-vxe-table ref="editableDetailTable1" rowNumber bordered alwaysEdit keep-source :dataSource="detail.safetyEquipmentCheckList" :columns="detail.safetyEquipmentCheckColumns"> <template v-slot:safetyEquipmentCheckResult="props"> @@ -93,11 +93,11 @@ </a-tab-pane> <a-tab-pane :key="2" tab="璁惧绮惧害妫�鏌�" forceRender - v-if="disableSubmit|| - selectShenpiData.taskDefKey&&(selectShenpiData.taskDefKey=='equipment_precision_check'||selectShenpiData.taskDefKey=='equipment_precision_check_confirm')|| - model.evaluationStatus&&model.evaluationStatus!='UNDER_EVALUATION'&&detail.precisionCheckList.length>0"> + v-if="(disableSubmit&&detail.precisionCheckList.length>0)|| + (selectShenpiData.taskDefKey&&(selectShenpiData.taskDefKey=='equipment_precision_check'||selectShenpiData.taskDefKey=='equipment_precision_check_confirm'))|| + (model.evaluationStatus&&model.evaluationStatus!='UNDER_EVALUATION'&&model.evaluationStatus!='WAIT_EVALUATION')"> <j-vxe-table ref="editableDetailTable2" rowNumber bordered - alwaysEdit keep-source :height="300" + alwaysEdit keep-source :dataSource="detail.precisionCheckList" :columns="detail.precisionCheckColumns"> <template v-slot:precisionCheckResult="props"> <a-input-number v-model="props.row.precisionCheckResult" @@ -132,11 +132,11 @@ </a-tab-pane> <a-tab-pane :key="3" tab="鍏朵粬妫�鏌�" forceRender - v-if="disableSubmit|| - selectShenpiData.taskDefKey&&(selectShenpiData.taskDefKey=='other_check'||selectShenpiData.taskDefKey=='other_check_confirm')|| - model.evaluationStatus&&model.evaluationStatus!='UNDER_EVALUATION'&&detail.otherCheckList.length>0"> + v-if="(disableSubmit&&detail.otherCheckList.length>0)|| + (selectShenpiData.taskDefKey&&(selectShenpiData.taskDefKey=='other_check'||selectShenpiData.taskDefKey=='other_check_confirm'))|| + (model.evaluationStatus&&model.evaluationStatus!='UNDER_EVALUATION'&&model.evaluationStatus!='WAIT_EVALUATION')"> <j-vxe-table ref="editableDetailTable3" rowNumber bordered - alwaysEdit keep-source :height="300" + alwaysEdit keep-source :dataSource="detail.otherCheckList" :columns="detail.otherCheckColumns"> <template v-slot:otherCheckResult="props"> <a-textarea v-model="props.row.otherCheckResult" :rows="1" @@ -323,7 +323,7 @@ name: 'TechnicalStatusEvaluationApprovalModal', mixins: [JVxeTableModelMixin], components: { - TechnicalStatusEquipmentSelect, + TechnicalStatusEquipmentSelect }, props: { selectShenpiData: { diff --git a/src/views/flowable/workflow/TechnicalStatusEvaluation/TechnicalStatusEvaluationOrderChangeApprovalModal.vue b/src/views/flowable/workflow/TechnicalStatusEvaluation/TechnicalStatusEvaluationOrderChangeApprovalModal.vue index f34b70f..0808fe0 100644 --- a/src/views/flowable/workflow/TechnicalStatusEvaluation/TechnicalStatusEvaluationOrderChangeApprovalModal.vue +++ b/src/views/flowable/workflow/TechnicalStatusEvaluation/TechnicalStatusEvaluationOrderChangeApprovalModal.vue @@ -211,13 +211,13 @@ }, computed: { displayEquipmentManagerFlag() { - return this.model.changeStatus && ['EQUIPMENT_MANAGER_SIGNING', 'DEPART_MANAGER_SIGNING', 'PRODUCTION_SUPPORT_SIGNING', 'COMPLETED'].includes(this.model.changeStatus) + return this.model.changeStatus && ['EQUIPMENT_MANAGER_SIGNING', 'DEPART_MANAGER_SIGNING', 'PRODUCTION_SUPPORT_SIGNING', 'COMPLETED', 'REJECTED'].includes(this.model.changeStatus) }, displayDepartManagerFlag() { - return this.model.changeStatus && ['DEPART_MANAGER_SIGNING', 'PRODUCTION_SUPPORT_SIGNING', 'COMPLETED'].includes(this.model.changeStatus) + return this.model.changeStatus && ['DEPART_MANAGER_SIGNING', 'PRODUCTION_SUPPORT_SIGNING', 'COMPLETED', 'REJECTED'].includes(this.model.changeStatus) && this.model.equipmentManagerSignatureResult === '1' }, displayProductionSupportFlag() { - return this.model.changeStatus && ['PRODUCTION_SUPPORT_SIGNING', 'COMPLETED'].includes(this.model.changeStatus) + return this.model.changeStatus && ['PRODUCTION_SUPPORT_SIGNING', 'COMPLETED', 'REJECTED'].includes(this.model.changeStatus) && this.model.departManagerSignatureResult === '1' } }, methods: { diff --git a/src/views/flowable/workflow/leanOut/EquipmentLeanOutApprovalModal.vue b/src/views/flowable/workflow/leanOut/EquipmentLeanOutApprovalModal.vue deleted file mode 100644 index 8256df4..0000000 --- a/src/views/flowable/workflow/leanOut/EquipmentLeanOutApprovalModal.vue +++ /dev/null @@ -1,257 +0,0 @@ -<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 :guitter="24"> - <a-col :span="12"> - <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="leanDepartId_dictText" label="鍊熷叆杞﹂棿"> - <a-input v-model="model.leanDepartId_dictText" disabled /> - </a-form-model-item> - </a-col> - <a-col :span="12"> - <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="leanPerson_dictText" label="鍊熺敤浜�"> - <a-input v-model="model.leanPerson_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="leanReason" label="鍊熺敤鍘熷洜"> - <a-textarea v-model="model.leanReason" disabled /> - </a-form-model-item> - </a-col> - <a-col :span="12"> - <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" 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> - <div v-if="returnDisable"> - <a-divider orientation="center" style="font-size: large;font-style: italic;color: #66aeed;"> 褰掕繕淇℃伅 - </a-divider> - <a-row :gutter="24"> - <a-col :span="24"> - <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="returnComment" - label="褰掕繕澶囨敞"> - <a-textarea placeholder="璇疯緭鍏ュ綊杩樺娉�" v-model="model.returnComment" - :disabled="disableSubmit || confirmDisable" /> - </a-form-model-item> - </a-col> - </a-row> - </div> - <div v-if="confirmDisable"> - <a-divider orientation="center" style="font-size: large;font-style: italic;color: #66aeed;"> 绠$悊鍛樼‘璁� - </a-divider> - <a-row :gutter="24"> - <a-col :span="24"> - <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="confirmComment" - label="纭鎰忚"> - <a-textarea placeholder="璇疯緭鍏ユ剰瑙�" v-model="model.confirmComment" - :disabled="disableSubmit || completionDisable" /> - </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: 'EquipmentLeanOutApprovalModal', - 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: '璇烽�夋嫨閫氳繃鎴栭┏鍥�!' } - ], - approvalComment: [ - { required: true, message: '璇疯緭鍏ュ鎵规剰瑙�!' } - ], - returnComment: [ - { required: true, message: '璇疯緭鍏ュ綊杩樺娉�!' } - ], - confirmComment: [ - { required: true, message: '璇疯緭鍏ョ‘璁ゆ剰瑙�!' } - ] - }, - url: { - queryById: '/eam/eamEquipmentLeanOut/queryById', - approval: '/eam/eamEquipmentLeanOut/approval', - loadProductionOptions: '/mdc/mdcProduction/loadProductionTreeOptions' - }, - disableSubmit: false - } - }, - created() { - this.loadAllProductionTree() - }, - computed: { - approvalDisable: function() { - return ['WAIT_APPROVAL', 'WAIT_RETURN', 'WAIT_CONFIRM', 'COMPLETE'].includes(this.model.leanStatus) - }, - returnDisable: function() { - return ['WAIT_RETURN', 'WAIT_CONFIRM', 'COMPLETE'].includes(this.model.leanStatus) - }, - confirmDisable: function() { - return ['WAIT_CONFIRM', 'COMPLETE'].includes(this.model.leanStatus) - }, - completionDisable: function() { - return ['COMPLETE'].includes(this.model.leanStatus) - } - }, - 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 diff --git a/src/views/flowable/workflow/scrap/EquipmentScrapApprovalModal.vue b/src/views/flowable/workflow/scrap/EquipmentScrapApprovalModal.vue deleted file mode 100644 index 9ec7e26..0000000 --- a/src/views/flowable/workflow/scrap/EquipmentScrapApprovalModal.vue +++ /dev/null @@ -1,223 +0,0 @@ -<template> - <j-modal - :confirmLoading='confirmLoading' - :okButtonProps="{ class:{'jee-hidden': disableSubmit} }" - :title='title' - :visible='visible' - :width='800' - cancelText='鍏抽棴' - centered - switchFullscreen - @cancel='handleCancel' - @ok='handleOk'> - - <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' label='鍗曟嵁鍙�' prop='code'> - <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' label='璁惧缂栫爜' prop='equipmentId'> - <lx-search-equipment-select v-model='model.equipmentId' - disabled placeholder='璇疯緭鍏ヨ澶囩紪鍙锋垨鍚嶇О鎼滅储'></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' label='鐢宠浜�' prop='reportUser_dictText'> - <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' label='澶勭疆鍘熷洜' prop='scrapReason'> - <a-input v-model='model.scrapReason' 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' label='澶囨敞' prop='remark'> - <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' label='瀹℃壒绫诲瀷' prop='approvalDealType'> - <j-dict-select-tag v-model='model.approvalDealType' :disabled='disableSubmit || initialAcceptanceDisable' dictCode='approved_rejected' - placeholder='璇烽�夋嫨澶勭悊绫诲瀷' type='radio' /> - </a-form-model-item> - </a-col> - <a-col :span='12'> - <a-form-model-item :labelCol='labelCol' :wrapperCol='wrapperCol' label='瀹℃壒鎰忚' prop='approvalComment'> - <a-textarea v-model='model.approvalComment' :disabled='disableSubmit || returnDisable' - placeholder='璇疯緭鍏ユ剰瑙�' /> - </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: 'EquipmentScrapApprovalModal', - 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/eamEquipmentScrap/queryById', - approval: '/eam/eamEquipmentScrap/approval', - loadProductionOptions: '/mdc/mdcProduction/loadProductionTreeOptions' - }, - disableSubmit: false - } - }, - created() { - this.loadAllProductionTree() - }, - computed: { - approvalDisable: function() { - return ['WAIT_CHECK'].includes(this.model.scrapStatus) - } - }, - 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 diff --git a/src/views/flowable/workflow/sealUp/EquipmentSealUpApprovalModal.vue b/src/views/flowable/workflow/sealUp/EquipmentSealUpApprovalModal.vue deleted file mode 100644 index ef2f20f..0000000 --- a/src/views/flowable/workflow/sealUp/EquipmentSealUpApprovalModal.vue +++ /dev/null @@ -1,250 +0,0 @@ -<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="sealUpReason" label="灏佸瓨鍘熷洜"> - <a-textarea v-model="model.sealUpReason" disabled /> - </a-form-model-item> - </a-col> - <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-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> - <div v-if="confirmDisable"> - <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="unsealApprovalDealType" label="瀹℃壒绫诲瀷"> - <j-dict-select-tag type="radio" v-model="model.unsealApprovalDealType" 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="unsealApprovalComment" label="瀹℃壒鎰忚"> - <a-textarea placeholder="璇疯緭鍏ユ剰瑙�" v-model="model.unsealApprovalComment" - :disabled="disableSubmit || completionDisable" /> - </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: 'EquipmentLeanOutApprovalModal', - 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/eamEquipmentSealUp/queryById', - approval: '/eam/eamEquipmentSealUp/approval', - loadProductionOptions: '/mdc/mdcProduction/loadProductionTreeOptions' - }, - disableSubmit: false - } - }, - created() { - this.loadAllProductionTree() - }, - computed: { - approvalDisable: function() { - return ['WAIT_CHECK','SEALED', 'WAIT_UNSEALING_AUDIT', 'COMPLETE'].includes(this.model.sealStatus) - }, - returnDisable: function() { - return ['SEALED', 'WAIT_UNSEALING_AUDIT', 'COMPLETE'].includes(this.model.sealStatus) - }, - confirmDisable: function() { - return ['WAIT_UNSEALING_AUDIT', 'COMPLETE'].includes(this.model.sealStatus) - }, - completionDisable: function() { - return ['COMPLETE'].includes(this.model.leanStatus) - } - }, - 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 diff --git a/src/views/flowable/workflow/secondMaintenance/SecondMaintenanceApprovalModal.vue b/src/views/flowable/workflow/secondMaintenance/SecondMaintenanceApprovalModal.vue index d866f53..cf5982c 100644 --- a/src/views/flowable/workflow/secondMaintenance/SecondMaintenanceApprovalModal.vue +++ b/src/views/flowable/workflow/secondMaintenance/SecondMaintenanceApprovalModal.vue @@ -69,7 +69,7 @@ :span="model.maintenanceStatus&&model.maintenanceStatus!='WAIT_MAINTENANCE'&&model.maintenanceStatus!='UNDER_MAINTENANCE'?10:16"> <a-tabs :active-key="activeTabKey" @change="handleTabChange"> <a-tab-pane :key="1" tab="鎿嶄綔宸�" - v-if="selectShenpiData.taskDefKey&&selectShenpiData.taskDefKey=='operator_task'|| + v-if="selectShenpiData.taskDefKey&&selectShenpiData.taskDefKey==='operator_task'|| (model.maintenanceStatus&&model.maintenanceStatus!='UNDER_MAINTENANCE')"> <j-vxe-table ref="editableDetailTable1" :rowNumber="false" rowSelection bordered alwaysEdit keep-source @@ -104,7 +104,7 @@ </a-tab-pane> <a-tab-pane :key="2" tab="缁翠慨宸�" - v-if="selectShenpiData.taskDefKey&&selectShenpiData.taskDefKey=='maintenance_task'|| + v-if="selectShenpiData.taskDefKey&&selectShenpiData.taskDefKey==='maintenance_task'|| (model.maintenanceStatus&&model.maintenanceStatus!='UNDER_MAINTENANCE')"> <j-vxe-table ref="editableDetailTable2" :rowNumber="false" rowSelection bordered alwaysEdit kee-source @@ -149,8 +149,8 @@ v-if="activeTabKey!=='3'" :disabled="disableSubmit || (model.maintenanceStatus&&model.maintenanceStatus!='UNDER_MAINTENANCE') || - (activeTabKey=='1'&&selectedOperatorMaintenanceRowKeys.length == 0)|| - (activeTabKey=='2'&&selectedRepairerMaintenanceRowKeys.length == 0)" + (activeTabKey==='1'&&selectedOperatorMaintenanceRowKeys.length === 0)|| + (activeTabKey==='2'&&selectedRepairerMaintenanceRowKeys.length === 0)" slot="tabBarExtraContent" type="primary" @click="handleSelectAllInspectionResult">鎵归噺淇濆吇姝e父 </a-button> @@ -330,10 +330,10 @@ }, computed: { displayAdminConfirmFlag() { - return ['WAIT_ADMIN_CONFIRM', 'WAIT_INSPECTOR_CONFIRM', 'COMPLETE'].includes(this.model.maintenanceStatus) + return ['WAIT_ADMIN_CONFIRM', 'WAIT_INSPECTOR_CONFIRM', 'COMPLETE', 'REJECTED'].includes(this.model.maintenanceStatus) }, displayInspectorConfirmFlag() { - return ['WAIT_INSPECTOR_CONFIRM', 'COMPLETE'].includes(this.model.maintenanceStatus) + return ['WAIT_INSPECTOR_CONFIRM', 'COMPLETE', 'REJECTED'].includes(this.model.maintenanceStatus) && this.model.manageUserResult === '1' } }, methods: { @@ -341,7 +341,7 @@ * 涓婚〉闈㈢偣鍑绘墽琛屽鎵规椂瑙﹀彂 * @param record 涓婚〉闈㈠垪琛ㄨ璁板綍 */ - async handleDetail(record) { + async handleApprove(record) { this.spinning = true this.model = {} this.detail.operatorMaintenanceList = this.detail.repairerMaintenanceList = [] @@ -355,7 +355,7 @@ * 涓婚〉闈㈢偣鍑昏鎯呮椂瑙﹀彂 * @param record 涓婚〉闈㈠垪琛ㄨ璁板綍 */ - recordDetail(record) { + handleDetail(record) { this.spinning = true this.activeTabKey = 1 this.detail.operatorMaintenanceList = this.detail.repairerMaintenanceList = [] @@ -443,7 +443,7 @@ that.confirmLoading = that.spinning = true // 浠呭湪淇濆吇涓姸鎬佷紶閫掕〃鏍煎垪琛� - if (this.model.maintenanceStatus == 'UNDER_MAINTENANCE') { + if (this.model.maintenanceStatus === 'UNDER_MAINTENANCE') { for (let index = 1; index <= 2; index++) { if (that.$refs['editableDetailTable' + index]) { this.model.tableDetailList = that.$refs['editableDetailTable' + index].getTableData() @@ -499,8 +499,8 @@ handleTabToFirstTable() { this.$nextTick(() => { console.log('taskDefKey', this.selectShenpiData.taskDefKey) - if ((this.selectShenpiData.taskDefKey && this.selectShenpiData.taskDefKey == 'operator_task') || !this.selectShenpiData.taskDefKey) this.activeTabKey = 1 - else if (this.selectShenpiData.taskDefKey && this.selectShenpiData.taskDefKey == 'maintenance_task') this.activeTabKey = 2 + if ((this.selectShenpiData.taskDefKey && this.selectShenpiData.taskDefKey === 'operator_task') || !this.selectShenpiData.taskDefKey) this.activeTabKey = 1 + else if (this.selectShenpiData.taskDefKey && this.selectShenpiData.taskDefKey === 'maintenance_task') this.activeTabKey = 2 }) }, @@ -509,8 +509,8 @@ getAction(this.url.detail, { orderId }) .then(res => { if (res.success) { - this.detail.operatorMaintenanceList = res.result.filter(item => item.itemCategory == 'OPERATOR_MAINTENANCE') - this.detail.repairerMaintenanceList = res.result.filter(item => item.itemCategory == 'REPAIRER_MAINTENANCE') + this.detail.operatorMaintenanceList = res.result.filter(item => item.itemCategory === 'OPERATOR_MAINTENANCE') + this.detail.repairerMaintenanceList = res.result.filter(item => item.itemCategory === 'REPAIRER_MAINTENANCE') } }) }, @@ -523,16 +523,16 @@ // 鎵归噺閫夋嫨鎵�鏈夌偣妫�缁撴灉 handleSelectAllInspectionResult() { let selectedRowKeys, prefix - if (this.activeTabKey == 1) { + if (this.activeTabKey === 1) { selectedRowKeys = this.selectedOperatorMaintenanceRowKeys prefix = 'operator' } - else if (this.activeTabKey == 2) { + else if (this.activeTabKey === 2) { selectedRowKeys = this.selectedRepairerMaintenanceRowKeys prefix = 'repairer' } else selectedRowKeys = [] - if (selectedRowKeys.length == 0) return + if (selectedRowKeys.length === 0) return selectedRowKeys.forEach(key => { const dataItem = this.detail[prefix + 'MaintenanceList'].find(item => item.id === key) diff --git a/src/views/flowable/workflow/weekMaintenance/WeekMaintenanceApprovalModal.vue b/src/views/flowable/workflow/weekMaintenance/WeekMaintenanceApprovalModal.vue deleted file mode 100644 index fc68d77..0000000 --- a/src/views/flowable/workflow/weekMaintenance/WeekMaintenanceApprovalModal.vue +++ /dev/null @@ -1,589 +0,0 @@ -<template> - <j-modal - :title="title" - :width="1200" - :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="8"> - <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="orderNum" label="宸ュ崟鍙�"> - <a-input placeholder="宸ュ崟鍙风郴缁熻嚜鍔ㄧ敓鎴�" v-model="model.orderNum" disabled/> - </a-form-model-item> - </a-col> - <a-col :span="8"> - <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="equipmentId" label="璁惧缂栫爜"> - <maintenance-equipment-select placeholder="璇疯緭鍏ヨ澶囩紪鍙锋垨鍚嶇О鎼滅储" v-model="model.equipmentId" - :maintenanceCategory="maintenanceCategory" - @autocompleteForm="autocompleteForm" - disabled></maintenance-equipment-select> - </a-form-model-item> - </a-col> - <a-col :span="8"> - <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="standardName" label="鏍囧噯鍚嶇О"> - <a-input placeholder="閫夋嫨璁惧鍚庤嚜鍔ㄥ甫鍑�" v-model="model.standardName" disabled/> - </a-form-model-item> - </a-col> - </a-row> - <a-row :gutter="24"> - <a-col :span="8"> - <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="maintenanceDate" label="淇濆吇鏃ユ湡"> - <a-date-picker placeholder="璇烽�夋嫨璁″垝淇濆吇鏃ユ湡" v-model="model.maintenanceDate" format="YYYY-MM-DD" - disabled - style="width: 100%"/> - </a-form-model-item> - </a-col> - <a-col :span="8"> - <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="operator" label="淇濆吇浜�"> - <j-search-select-tag v-model="model.operator" placeholder="璇烽�夋嫨淇濆吇浜�" disabled - :dictOptions="maintenanceOperatorOptions"/> - </a-form-model-item> - </a-col> - <a-col :span="8"> - <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="maintenancePeriod" label="淇濆吇鍛ㄦ湡"> - <a-input placeholder="閫夋嫨璁惧鍚庤嚜鍔ㄥ甫鍑�" v-model="model.maintenancePeriod" disabled/> - </a-form-model-item> - </a-col> - </a-row> - <a-row :gutter="24"> - <a-form-model-item :labelCol="labelColLong" :wrapperCol="wrapperColLong" prop="remark" label="澶囨敞"> - <a-textarea placeholder="璇疯緭鍏ュ娉�" v-model="model.remark" disabled/> - </a-form-model-item> - </a-row> - <a-row :gutter="24"> - <a-form-model-item :labelCol="labelColLong" :wrapperCol="wrapperColLong" label="淇濆吇鍥剧墖"> - <lx-upload :returnUrl="false" - :isMultiple="true" - file-type="image" - :disabled="confirmDisable" - :number="3" - v-model="model.imageFilesResult"/> - </a-form-model-item> - </a-row> - <a-divider orientation="center" style="font-size: large;font-style: italic;color: #66aeed;"> 淇濆吇椤逛俊鎭� - </a-divider> - <a-row :gutter="24"> - <a-tabs v-model="activeTabKey"> - <a-tab-pane key="1" tab="淇濆吇椤规槑缁�"> - <j-vxe-table - ref="editableDetailTable" - :rowNumber="false" - :rowSelection="true" - :bordered="true" - :alwaysEdit="true" - :toolbar="false" - keep-source - :height="300" - :loading="detail.loading" - :dataSource="detail.dataSource" - :columns="detail.columns" - @selectRowChange="handleTableSelectRowChange" - > - <template v-slot:maintenanceResult="props"> - <j-dict-select-tag v-model="props.row.maintenanceResult" dictCode="eam_inspection_result" - placeholder="璇烽�夋嫨淇濆吇缁撴灉" - :disabled="disableSubmit || confirmDisable" - @change="handleInspectionResultSelectChange($event,props.row)" - style="width: 100%"/> - </template> - - <template v-slot:exceptionDescription="props"> - <a-textarea style="height: 32px" v-model="props.row.exceptionDescription" - :disabled="disableSubmit || confirmDisable || !props.row.maintenanceResult || props.row.maintenanceResult === '1'"/> - </template> - - <template v-slot:reportFlag="props"> - <j-dict-select-tag v-model="props.row.reportFlag" - :disabled="disableSubmit || confirmDisable || !props.row.maintenanceResult || props.row.maintenanceResult === '1'" - dictCode="yn" - style="width: 100%"/> - </template> - </j-vxe-table> - </a-tab-pane> - <template v-if="selectShenpiData.procInstId"> - <a-tab-pane key='2' tab='娴佺▼鑺傜偣'> - <a-card :bordered="false"> - <a-timeline> - <a-timeline-item v-for="(item,index) in taskData" :key="index"> - <div> - <h3 style="font-weight: bold;">{{item.taskName}}</h3> - <div>澶勭悊浜猴細{{item.assignee_dictText}}</div> - <div v-if="index !==0">澶勭悊鏃堕暱锛歿{item.duration}}</div> - <div v-if="item.name !== '鎻愪氦鐢宠'">澶勭悊绫诲瀷锛歿{item.sequenceFlowName}}</div> - <div v-if="item.description">澶勭悊鎰忚锛歿{item.description}}</div> - </div> - </a-timeline-item> - </a-timeline> - </a-card> - </a-tab-pane> - <a-tab-pane key='3' tab='娴佺▼鍥�'> - <img :src="imageSrc" alt="Fetched Image"/> - </a-tab-pane> - </template> - <a-button v-if="!disableSubmit &&!confirmDisable&& selectedRowKeys.length > 0" slot="tabBarExtraContent" - type="primary" @click="handleSelectAllInspectionResult">淇濆吇姝e父 - </a-button> - </a-tabs> - </a-row> - <div v-if="confirmDisable"> - <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="confirmDealType" label="纭绫诲瀷"> - <j-dict-select-tag type='radio' v-model='model.confirmDealType' 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="confirmComment" label="纭鎰忚"> - <a-textarea placeholder="璇疯緭鍏ユ剰瑙�" v-model="model.confirmComment" - :disabled="disableSubmit || initialAcceptanceDisable"/> - </a-form-model-item> - </a-col> - </a-row> - </div> - <div v-if="initialAcceptanceDisable"> - <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="initialAcceptanceComment" - label="鍒濋獙鏀舵剰瑙�"> - <a-textarea placeholder="璇疯緭鍏ユ剰瑙�" v-model="model.initialAcceptanceComment" - :disabled="disableSubmit || finalAcceptanceDisable"/> - </a-form-model-item> - </a-col> - <a-col :span="12"> - <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="initialAcceptanceFilesResult" - label="鍒濋獙鏀堕檮浠�"> - <lx-upload :returnUrl="false" - :isMultiple="true" - :disabled="disableSubmit || finalAcceptanceDisable" - v-model="model.initialAcceptanceFilesResult"/> - </a-form-model-item> - </a-col> - </a-row> - </div> - <div v-if="finalAcceptanceDisable"> - <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="finalAcceptanceComment" - label="缁堥獙鏀舵剰瑙�"> - <a-textarea placeholder="璇疯緭鍏ユ剰瑙�" v-model="model.finalAcceptanceComment" - :disabled="disableSubmit || completionDisable"/> - </a-form-model-item> - </a-col> - <a-col :span="12"> - <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="finalAcceptanceFilesResult" - label="缁堥獙鏀堕檮浠�"> - <lx-upload :returnUrl="false" - :isMultiple="true" - :disabled="disableSubmit || completionDisable" - v-model="model.finalAcceptanceFilesResult"/> - </a-form-model-item> - </a-col> - </a-row> - </div> - </a-form-model> - </a-spin> - </j-modal> -</template> - -<script> - import { downFile, getAction, httpAction } from '@/api/manage' - import { JVxeTableModelMixin } from '@/mixins/JVxeTableModelMixin.js' - import { JVXETypes } from '@comp/jeecg/JVxeTable' - import MaintenanceEquipmentSelect from '@views/eam/equipment/modules/MaintenanceEquipmentSelect' - - export default { - name: 'WeekMaintenanceApprovalModal', - mixins: [JVxeTableModelMixin], - components: { - MaintenanceEquipmentSelect - }, - props: { - selectShenpiData: { - type: Object - } - }, - data() { - return { - title: '鎿嶄綔', - visible: false, - //鐘舵�佹帶鍒� - //淇濆吇涓� 涓嶅彲缂栬緫 - // confirmDisable: false, - // initialAcceptanceDisable: false, - // finalAcceptanceDisable: false, - editable: false, - model: {}, - maintenanceCategory: 'WEEK_MAINTENANCE', - maintenanceOperatorOptions: [], - labelCol: { - xs: { span: 24 }, - sm: { span: 6 } - }, - wrapperCol: { - xs: { span: 24 }, - sm: { span: 16 } - }, - labelColLong: { - xs: { span: 24 }, - sm: { span: 2 } - }, - wrapperColLong: { - xs: { span: 24 }, - sm: { span: 21 } - }, - confirmLoading: false, - spinning: false, - imageSrc: null, - activeTabKey: '1', - validatorRules: { - confirmDealType: [ - { required: true, message: '璇烽�夋嫨閫氳繃鎴栭┏鍥�!' } - ], - confirmComment: [ - { required: true, message: '璇疯緭鍏ョ‘璁ゆ剰瑙�!' } - ], - initialAcceptanceComment: [ - { required: true, message: '璇疯緭鍏ュ垵楠屾敹鎰忚!' } - ], - finalAcceptanceComment: [ - { required: true, message: '璇疯緭鍏ョ粓楠屾敹鎰忚!' } - ] - }, - url: { - queryById: '/eam/weekMaintenanceOrder/queryById', - detail: '/eam/weekMaintenanceOrderDetail/queryList', - approval: '/eam/weekMaintenanceOrder/approval', - userSelect: '/eam/user_select/list', - queryHisTaskList: '/assign/flow/queryHisTaskList', - diagramView: '/assign/flow/diagramView' - }, - disableSubmit: false, - taskData: [], - isDisplayBmp: false, - showBmpButtonLoading: false, - selectedRowKeys: [], - detail: { - loading: false, - dataSource: [], - columns: [ - { - title: 'ID', - key: 'id', - type: JVXETypes.hidden - }, - { - title: 'orderId', - key: 'orderId', - type: JVXETypes.hidden - }, - { - title: '搴忓彿', - key: 'itemCode', - type: JVXETypes.normal, - width: '5%', - align: 'center' - }, - { - title: '淇濆吇椤�', - key: 'itemName', - type: JVXETypes.normal, - width: '10%', - align: 'center' - }, - { - title: '瀛愪繚鍏婚」', - key: 'subItemName', - type: JVXETypes.normal, - width: '10%', - align: 'center' - }, - { - title: '淇濆吇瑕佹眰', - key: 'itemDemand', - type: JVXETypes.normal, - width: '20%', - align: 'center' - }, - { - title: '淇濆吇缁撴灉', - key: 'maintenanceResult', - type: JVXETypes.slot, - width: '10%', - align: 'center', - slotName: 'maintenanceResult', - validateRules: [ - { required: true, message: '淇濆吇缁撴灉涓嶈兘涓虹┖锛�' } - ] - }, - { - title: '寮傚父鎻忚堪', - key: 'exceptionDescription', - type: JVXETypes.slot, - width: '20%', - align: 'center', - slotName: 'exceptionDescription', - validateRules: [ - { handler: this.customValidator } - ] - }, - { - title: '鏄惁鎶ヤ慨', - key: 'reportFlag', - type: JVXETypes.slot, - width: '10%', - align: 'center', - slotName: 'reportFlag', - validateRules: [ - { handler: this.customValidator } - ] - } - ], - toolbarConfig: { - // prefix 鍓嶇紑锛泂uffix 鍚庣紑 - slot: ['prefix', 'suffix'], - // add 鏂板鎸夐挳锛況emove 鍒犻櫎鎸夐挳锛沜learSelection 娓呯┖閫夋嫨鎸夐挳 - btn: ['clearSelection'] - } - } - } - }, - created() { - }, - computed: { - confirmDisable: function() { - return ['WAIT_CONFIRM', 'WAIT_INITIAL_ACCEPTANCE', 'WAIT_FINAL_ACCEPTANCE', 'COMPLETE'].includes(this.model.maintenanceStatus) - }, - initialAcceptanceDisable: function() { - return ['WAIT_INITIAL_ACCEPTANCE', 'WAIT_FINAL_ACCEPTANCE', 'COMPLETE'].includes(this.model.maintenanceStatus) - }, - finalAcceptanceDisable: function() { - return ['WAIT_FINAL_ACCEPTANCE', 'COMPLETE'].includes(this.model.maintenanceStatus) - }, - completionDisable: function() { - return ['COMPLETE', 'ABOLISH'].includes(this.model.maintenanceStatus) - } - }, - methods: { - async handleDetail(item) { - this.initParams() - this.model = {} - if (item.procInstId) { - const { processDefinitionId, processInstanceId, processDefinitionKey, procInstId } = item - - let taskDataList = await getAction(this.url.queryHisTaskList, { procInstId }) - this.taskData = [...taskDataList.result] - - downFile(this.url.diagramView, { - processDefinitionId, - processInstanceId, - TaskDefinitionKey: processDefinitionKey - }, 'get') - .then((res => { - const urlObject = window.URL.createObjectURL(new Blob([res])) - this.imageSrc = urlObject - })) - .catch(err => { - this.$notification.error({ - message: '娑堟伅', - description: res.message - }) - }) - } - let res = await getAction(this.url.queryById, { id: item.dataId }) - this.model = Object.assign({}, res.result) - if (this.model.imageFiles) { - let obj = JSON.parse(this.model.imageFiles) - this.model.imageFilesResult = [...obj] - } - if (this.model.initialAcceptanceFiles) { - let obj = JSON.parse(this.model.initialAcceptanceFiles) - this.model.initialAcceptanceFilesResult = [...obj] - } - if (this.model.finalAcceptanceFiles) { - let obj = JSON.parse(this.model.finalAcceptanceFiles) - this.model.finalAcceptanceFilesResult = [...obj] - } - 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 - await this.loadDetail(item.dataId) - }, - - recordDetail(record) { - console.log('record', record) - this.initParams() - this.model = Object.assign({}, record) - if (this.model.imageFiles) { - let obj = JSON.parse(this.model.imageFiles) - this.model.imageFilesResult = [...obj] - } - if (this.model.initialAcceptanceFiles) { - let obj = JSON.parse(this.model.initialAcceptanceFiles) - this.model.initialAcceptanceFilesResult = [...obj] - } - if (this.model.finalAcceptanceFiles) { - let obj = JSON.parse(this.model.finalAcceptanceFiles) - this.model.finalAcceptanceFilesResult = [...obj] - } - this.loadDetail(record.id) - }, - - initParams() { - this.detail.dataSource = [] - this.visible = true - this.activeTabKey = '1' - this.spinning = true - }, - - async handleOk() { - const that = this - let errMap = await that.$refs.editableDetailTable.validateTable() - if (errMap) { - this.$message.warning('鏁版嵁鏍¢獙澶辫触锛�') - return - } - // 瑙﹀彂琛ㄥ崟楠岃瘉 - this.$refs.form.validate(valid => { - if (valid) { - that.confirmLoading = that.spinning = true - let tableData = that.$refs.editableDetailTable.getTableData() - that.model.tableDetailList = [...tableData] - 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 - } - }) - }, - - autocompleteForm(selectObj) { - this.$set(this.model, 'standardName', selectObj.standardName) - this.$set(this.model, 'maintenancePeriod', selectObj.maintenancePeriod) - this.$set(this.model, 'standardId', selectObj.id) - this.$set(this.model, 'equipmentId', selectObj.equipmentId) - // console.log('model', this.model) - if (!this.model.id) { - this.loadStandardDetail(selectObj.id) - } - this.loadMaintenanceOperatorList(this.model.equipmentId) - }, - - //鏍囧噯閫夋嫨鍙樺寲 - loadDetail(orderId) { - if (orderId) { - getAction(this.url.detail, { orderId: orderId }) - .then(res => { - if (res.success) { - this.detail.dataSource = [...res.result] - } - }) - .finally(() => { - this.spinning = false - }) - } - }, - - loadMaintenanceOperatorList(equipmentId) { - this.maintenanceOperatorOptions = [] - let params = { positionCode: 'PCR0001' } - if (equipmentId) { - params.equipmentId = equipmentId - } - getAction(this.url.userSelect, params).then(res => { - if (res.success) { - this.maintenanceOperatorOptions = res.result.map(item => ({ - key: item.id, - value: item.username, - text: item.realname - })) - } - }) - }, - - handleInspectionResultSelectChange(value, record) { - if (record.exceptionDescription) delete record.exceptionDescription - if (record.reportFlag) delete record.reportFlag - }, - - // 鎵归噺閫夋嫨鎵�鏈夌偣妫�缁撴灉 - handleSelectAllInspectionResult() { - this.selectedRowKeys.forEach(key => { - const dataItem = this.detail.dataSource.find(item => item.id === key) - if (dataItem && dataItem.maintenanceResult !== '1') { - console.log('dataItem', dataItem) - delete dataItem.exceptionDescription - delete dataItem.reportFlag - dataItem.maintenanceResult = '1' - } - }) - this.$refs.editableDetailTable.clearCheckboxRow() - this.selectedRowKeys = [] - }, - - /** - * 琛ㄦ牸澶氶�夋鍙戠敓鏀瑰彉鏃惰Е鍙� - * @param {selectedRowIds} 琛ㄦ牸涓凡閫夋嫨鐨処D鍒楄〃 - */ - handleTableSelectRowChange({ selectedRowIds }) { - this.selectedRowKeys = selectedRowIds - }, - - customValidator({ cellValue, row }, callback) { - if (row.maintenanceResult === '2') { - if (!cellValue) { - callback(false, '${title}涓嶈兘涓虹┖锛�') // false = 鏈�氳繃锛屽彲浠ヨ窡鑷畾涔夋彁绀� - } else { - callback(true) // true = 閫氳繃楠岃瘉 - } - } else { - callback(true) - } - }, - - handleCancel() { - this.close() - }, - - close() { - this.$emit('close') - this.visible = false - this.$refs.form.clearValidate() - } - } - } -</script> - -<style lang="less" scoped> - -</style> \ No newline at end of file diff --git a/src/views/flowable/workflow/weekMaintenance/WeekMaintenanceBatchApprovalModal.vue b/src/views/flowable/workflow/weekMaintenance/WeekMaintenanceBatchApprovalModal.vue deleted file mode 100644 index a51d614..0000000 --- a/src/views/flowable/workflow/weekMaintenance/WeekMaintenanceBatchApprovalModal.vue +++ /dev/null @@ -1,208 +0,0 @@ -<template> - <j-modal - :title="title" - :width="1200" - :visible="visible" - :confirmLoading="confirmLoading" - :okButtonProps="{ class:{'jee-hidden': !isDisplaySubmitButton} }" - switchFullscreen - @ok="handleOk" - @cancel="handleCancel" - centered - cancelText="鍏抽棴"> - <a-spin :spinning="spinning"> - <a-form-model ref="form" :model="model" :rules="validatorRules" :labelCol="labelCol" :wrapperCol="wrapperCol"> - <a-row :gutter="24"> - <a-tabs> - <a-tab-pane key='1' tab='娴佺▼鍥�'> - <img :src="imageSrc" alt="娴佺▼鍥捐幏鍙栦腑..."/> - </a-tab-pane> - </a-tabs> - </a-row> - - <div v-if="model.maintenanceStatus==='WAIT_CONFIRM'"> - <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 prop="confirmDealType" label="纭绫诲瀷"> - <j-dict-select-tag type='radio' v-model='model.confirmDealType' dictCode='approved_rejected' - placeholder="璇烽�夋嫨澶勭悊绫诲瀷"/> - </a-form-model-item> - </a-col> - <a-col :span="12"> - <a-form-model-item prop="confirmComment" label="纭鎰忚"> - <a-textarea placeholder="璇疯緭鍏ユ剰瑙�" v-model="model.confirmComment"/> - </a-form-model-item> - </a-col> - </a-row> - </div> - - <div v-if="model.maintenanceStatus==='WAIT_INITIAL_ACCEPTANCE'"> - <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 prop="initialAcceptanceComment" - label="鍒濋獙鏀舵剰瑙�"> - <a-textarea placeholder="璇疯緭鍏ユ剰瑙�" v-model="model.initialAcceptanceComment"/> - </a-form-model-item> - </a-col> - <a-col :span="12"> - <a-form-model-item prop="initialAcceptanceFilesResult" - label="鍒濋獙鏀堕檮浠�"> - <lx-upload :returnUrl="false" :isMultiple="true" v-model="model.initialAcceptanceFilesResult"/> - </a-form-model-item> - </a-col> - </a-row> - </div> - - <div v-if="model.maintenanceStatus==='WAIT_FINAL_ACCEPTANCE'"> - <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 prop="finalAcceptanceComment" - label="缁堥獙鏀舵剰瑙�"> - <a-textarea placeholder="璇疯緭鍏ユ剰瑙�" v-model="model.finalAcceptanceComment"/> - </a-form-model-item> - </a-col> - <a-col :span="12"> - <a-form-model-item prop="finalAcceptanceFilesResult" - label="缁堥獙鏀堕檮浠�"> - <lx-upload :returnUrl="false" :isMultiple="true" v-model="model.finalAcceptanceFilesResult"/> - </a-form-model-item> - </a-col> - </a-row> - </div> - </a-form-model> - </a-spin> - </j-modal> -</template> - -<script> - import { downFile, getAction, httpAction } from '@/api/manage' - - export default { - name: 'WeekMaintenanceBatchApprovalModal', - props: { - taskList: { - type: Array - } - }, - data() { - return { - title: '', - visible: false, - model: {}, - labelCol: { - xs: { span: 24 }, - sm: { span: 6 } - }, - wrapperCol: { - xs: { span: 24 }, - sm: { span: 16 } - }, - confirmLoading: false, - spinning: false, - imageSrc: null, - validatorRules: { - confirmDealType: [ - { required: true, message: '璇烽�夋嫨閫氳繃鎴栭┏鍥�!' } - ], - confirmComment: [ - { required: true, message: '璇疯緭鍏ョ‘璁ゆ剰瑙�!' } - ], - initialAcceptanceComment: [ - { required: true, message: '璇疯緭鍏ュ垵楠屾敹鎰忚!' } - ], - finalAcceptanceComment: [ - { required: true, message: '璇疯緭鍏ョ粓楠屾敹鎰忚!' } - ] - }, - url: { - queryById: '/eam/weekMaintenanceOrder/queryById', - batchApprove: '/eam/weekMaintenanceOrder/batchApproval', - diagramView: '/assign/flow/diagramView' - } - } - }, - computed: { - isDisplaySubmitButton: function() { - return ['WAIT_CONFIRM', 'WAIT_INITIAL_ACCEPTANCE', 'WAIT_FINAL_ACCEPTANCE'].includes(this.model.maintenanceStatus) - } - }, - methods: { - async handleDetail(item) { - this.visible = true - this.spinning = true - this.imageSrc = null - if (item.procInstId) { - const { processDefinitionId, processInstanceId, processDefinitionKey } = item - - downFile(this.url.diagramView, { - processDefinitionId, - processInstanceId, - TaskDefinitionKey: processDefinitionKey - }, 'get') - .then((res => { - const urlObject = window.URL.createObjectURL(new Blob([res])) - this.imageSrc = urlObject - })) - .catch(err => { - this.$notification.error({ - message: '娑堟伅', - description: res.message - }) - }) - } - let res = await getAction(this.url.queryById, { id: item.dataId }) - this.model = Object.assign({}, res.result) - this.spinning = false - }, - - async handleOk() { - const that = this - // 瑙﹀彂琛ㄥ崟楠岃瘉 - this.$refs.form.validate(valid => { - if (valid) { - that.confirmLoading = that.spinning = true - const { confirmComment, confirmDealType, initialAcceptanceComment, initialAcceptanceFilesResult, finalAcceptanceComment, finalAcceptanceFilesResult } = that.model - const params = {} - params.taskList = that.taskList - params.confirmComment = confirmComment - params.confirmDealType = confirmDealType - params.initialAcceptanceComment = initialAcceptanceComment - params.initialAcceptanceFilesResult = initialAcceptanceFilesResult - params.finalAcceptanceComment = finalAcceptanceComment - params.finalAcceptanceFilesResult = finalAcceptanceFilesResult - console.log('params', params) - httpAction(this.url.batchApprove, params, 'post').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 - if (this.$refs.form) this.$refs.form.clearValidate() - } - } - } -</script> \ No newline at end of file -- Gitblit v1.9.3