From a5093e5c0db210a162b5a409d3f330a0f045d90a Mon Sep 17 00:00:00 2001 From: zhaowei <zhaowei> Date: 星期二, 22 七月 2025 16:59:09 +0800 Subject: [PATCH] 技术状态变更页面设备验收 --- src/views/eam/maintenance/EamInspectionOrderList.vue | 1 src/views/eam/repair/EamRepairOrderList.vue | 30 +++-- src/views/flowable/workflow/TechnicalStatusEvaluation/TechnicalStatusEvaluationApprovalModal.vue | 6 src/views/eam/technical/modules/EamTechnicalStatusChangeEquipmentDetail.vue | 170 ++++++++++++++++++++++++++++ src/views/eam/technical/modules/EamTechnicalStatusEquipmentAcceptanceModal.vue | 100 ++++++++++++++++ src/views/eam/technical/EamTechnicalStatusChangeList.vue | 38 +++++- 6 files changed, 321 insertions(+), 24 deletions(-) diff --git a/src/views/eam/maintenance/EamInspectionOrderList.vue b/src/views/eam/maintenance/EamInspectionOrderList.vue index c8d5ae1..9f36e36 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'"> diff --git a/src/views/eam/repair/EamRepairOrderList.vue b/src/views/eam/repair/EamRepairOrderList.vue index 4bdd93d..f4f9e4f 100644 --- a/src/views/eam/repair/EamRepairOrderList.vue +++ b/src/views/eam/repair/EamRepairOrderList.vue @@ -28,18 +28,17 @@ <a-button @click="searchReset" icon="reload" style="margin-left: 8px">閲嶇疆</a-button> </span> </a-col> - </a-row> </a-form> </div> <!-- 鎿嶄綔鎸夐挳鍖哄煙 --> <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 +60,15 @@ :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}" @change="handleTableChange" :scroll="{x:'max-content'}"> <span slot="action" slot-scope="text, record"> - <a @click="handleFillIn(record)">濉姤</a> - <a-divider type="vertical"/> - <a-popconfirm title="纭畾鎻愪氦鍚�?" @confirm="() => handleSubmit(record.id)"> - <a>鎻愪氦</a> - </a-popconfirm> - <a-divider 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 +262,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/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/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/flowable/workflow/TechnicalStatusEvaluation/TechnicalStatusEvaluationApprovalModal.vue b/src/views/flowable/workflow/TechnicalStatusEvaluation/TechnicalStatusEvaluationApprovalModal.vue index 073a677..43b9901 100644 --- a/src/views/flowable/workflow/TechnicalStatusEvaluation/TechnicalStatusEvaluationApprovalModal.vue +++ b/src/views/flowable/workflow/TechnicalStatusEvaluation/TechnicalStatusEvaluationApprovalModal.vue @@ -56,7 +56,7 @@ 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" + <j-vxe-table ref="editableDetailTable1" rowNumber bordered alwaysEdit keep-source :dataSource="detail.safetyEquipmentCheckList" :columns="detail.safetyEquipmentCheckColumns"> <template v-slot:safetyEquipmentCheckResult="props"> @@ -97,7 +97,7 @@ selectShenpiData.taskDefKey&&(selectShenpiData.taskDefKey=='equipment_precision_check'||selectShenpiData.taskDefKey=='equipment_precision_check_confirm')|| model.evaluationStatus&&model.evaluationStatus!='UNDER_EVALUATION'&&detail.precisionCheckList.length>0"> <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" @@ -136,7 +136,7 @@ selectShenpiData.taskDefKey&&(selectShenpiData.taskDefKey=='other_check'||selectShenpiData.taskDefKey=='other_check_confirm')|| model.evaluationStatus&&model.evaluationStatus!='UNDER_EVALUATION'&&detail.otherCheckList.length>0"> <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" -- Gitblit v1.9.3