From 3b6c930a4c8cbefa0b442bbec426a7b608220117 Mon Sep 17 00:00:00 2001 From: zhangherong <571457620@qq.com> Date: 星期六, 07 六月 2025 16:16:42 +0800 Subject: [PATCH] art: 设备管理-设备维修审批表单修改,维修、报修列表修改 --- src/views/flowable/workflow/repairOrder/RepairOrderApprovalModal.vue | 287 ++++++++++++++++++++++++++++++++++++++++---------------- 1 files changed, 204 insertions(+), 83 deletions(-) diff --git a/src/views/flowable/workflow/repairOrder/RepairOrderApprovalModal.vue b/src/views/flowable/workflow/repairOrder/RepairOrderApprovalModal.vue index 4384150..50aebc3 100644 --- a/src/views/flowable/workflow/repairOrder/RepairOrderApprovalModal.vue +++ b/src/views/flowable/workflow/repairOrder/RepairOrderApprovalModal.vue @@ -57,45 +57,179 @@ </a-col> </a-row> - <a-divider orientation="center" style="font-size: large;font-style: italic;color: #66aeed;">鏄惁闇�瑕侀鐢ㄥ浠�</a-divider> - <a-tabs v-model="activeTabKey"> - <a-tab-pane key="1" tab="棰嗙敤澶囦欢"> - <a-row> - <a-col :span="twoColSpan*2"> - <a-form-model-item label="鏄惁闇�瑕侀鐢ㄥ浠�" prop="isUseSpare"> - <a-radio-group v-model="tableRowRecord.isUseSpare" - :disabled="isDisableUseSpare"> - <a-radio :value="1">鏄�</a-radio> - <a-radio :value="0">鍚�</a-radio> - </a-radio-group> - </a-form-model-item> - </a-col> + <a-tab-pane key="1" tab="缁翠慨澶勭悊"> - <template v-if="tableRowRecord.isUseSpare===0"> + <div v-if="repairConfirm"> + <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="repairConfirm" label="鏄惁鍐呴儴鍙淮淇�"> + <j-dict-select-tag type='radio' v-model='tableRowRecord.repairConfirm' dictCode='yn' + placeholder="璇烽�夋嫨" :disabled="disableSubmit || tableRowRecord.repairStatus !== 'WAIT_INTERNAL_CONFIRM'"/> + </a-form-model-item> + </a-col> + <a-col :span="12"> + <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="repairConfirmComment" label="缁翠慨纭鎰忚"> + <a-textarea placeholder="璇疯緭鍏ユ剰瑙�" v-model="tableRowRecord.repairConfirmComment" + :readOnly="disableSubmit || tableRowRecord.repairStatus !== 'WAIT_INTERNAL_CONFIRM'"/> + </a-form-model-item> + </a-col> + </a-row> + </div> + <div v-if="underInternalRepair && tableRowRecord.repairConfirm === '1'"> + <a-divider orientation="center" style="font-size: large;font-style: italic;color: #66aeed;">缁翠慨缁撴灉</a-divider> + <a-row> <a-col :span="twoColSpan*2"> - <a-form-model-item label="鏁呴殰鍘熷洜" prop="faultReason"> - <a-input :readOnly="disableSubmit||tableRowRecord.repairStatus!=='UNDER_REPAIR'" + <a-form-model-item label="鏁呴殰鍘熷洜" prop="faultReason" :labelCol="labelColLong" :wrapperCol="wrapperColLong"> + <a-input :readOnly="disableSubmit||tableRowRecord.repairStatus!=='UNDER_INTERNAL_REPAIR'" v-model="tableRowRecord.faultReason" rows="4" placeholder="璇疯緭鍏ユ晠闅滃師鍥�"/> </a-form-model-item> </a-col> <a-col :span="twoColSpan*2"> - <a-form-model-item label="缁翠慨缁撴灉鎻忚堪" prop="repairDescription"> - <a-textarea :readOnly="disableSubmit||tableRowRecord.repairStatus!=='UNDER_REPAIR'" + <a-form-model-item label="缁翠慨缁撴灉鎻忚堪" prop="repairDescription" :labelCol="labelColLong" :wrapperCol="wrapperColLong"> + <a-textarea :readOnly="disableSubmit||tableRowRecord.repairStatus!=='UNDER_INTERNAL_REPAIR'" v-model="tableRowRecord.repairDescription" placeholder="璇疯緭鍏ョ淮淇粨鏋滄弿杩�"/> </a-form-model-item> </a-col> <a-col :span="twoColSpan*2"> - <a-form-model-item label="缁翠慨鍥剧墖"> + <a-form-model-item label="缁翠慨鍥剧墖" :labelCol="labelColLong" :wrapperCol="wrapperColLong"> <lx-upload :returnUrl="false" :isMultiple="true" file-type="image" :number="3" - :disabled="disableSubmit||tableRowRecord.repairStatus!=='UNDER_REPAIR'" + :disabled="disableSubmit||tableRowRecord.repairStatus!=='UNDER_INTERNAL_REPAIR'" v-model="tableRowRecord.imageFiles"/> </a-form-model-item> </a-col> - </template> - </a-row> + </a-row> + </div> + <div v-if="leaderConfirm && tableRowRecord.repairConfirm === '0'"> + <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="leaderConfirm" label="鏄惁鍚屾剰澶栭儴缁翠慨"> + <j-dict-select-tag type='radio' v-model='tableRowRecord.leaderConfirm' dictCode='approved_rejected' + placeholder="璇烽�夋嫨" :disabled="disableSubmit || tableRowRecord.repairStatus!=='WAIT_LEADER_CONFIRM'"/> + </a-form-model-item> + </a-col> + <a-col :span="12"> + <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="leaderConfirmComment" label="纭鎰忚"> + <a-textarea placeholder="璇疯緭鍏ユ剰瑙�" v-model="tableRowRecord.leaderConfirmComment" + :readOnly="disableSubmit || tableRowRecord.repairStatus!=='WAIT_LEADER_CONFIRM'"/> + </a-form-model-item> + </a-col> + </a-row> + </div> + <div v-if="underInternalRepair && tableRowRecord.leaderConfirm === '2'"> + <a-divider orientation="center" style="font-size: large;font-style: italic;color: #66aeed;">缁翠慨缁撴灉</a-divider> + <a-row> + <a-col :span="twoColSpan*2"> + <a-form-model-item label="鏁呴殰鍘熷洜" prop="faultReason" :labelCol="labelColLong" :wrapperCol="wrapperColLong"> + <a-input :readOnly="disableSubmit||tableRowRecord.repairStatus!=='UNDER_INTERNAL_REPAIR'" + v-model="tableRowRecord.faultReason" rows="4" + placeholder="璇疯緭鍏ユ晠闅滃師鍥�"/> + </a-form-model-item> + </a-col> + <a-col :span="twoColSpan*2"> + <a-form-model-item label="缁翠慨缁撴灉鎻忚堪" prop="repairDescription" :labelCol="labelColLong" :wrapperCol="wrapperColLong"> + <a-textarea :readOnly="disableSubmit||tableRowRecord.repairStatus!=='UNDER_INTERNAL_REPAIR'" + v-model="tableRowRecord.repairDescription" + placeholder="璇疯緭鍏ョ淮淇粨鏋滄弿杩�"/> + </a-form-model-item> + </a-col> + <a-col :span="twoColSpan*2"> + <a-form-model-item label="缁翠慨鍥剧墖" :labelCol="labelColLong" :wrapperCol="wrapperColLong"> + <lx-upload :returnUrl="false" :isMultiple="true" file-type="image" :number="3" + :disabled="disableSubmit||tableRowRecord.repairStatus!=='UNDER_INTERNAL_REPAIR'" + v-model="tableRowRecord.imageFiles"/> + </a-form-model-item> + </a-col> + </a-row> + </div> + <div v-if="externalConfirm && tableRowRecord.leaderConfirm === '1'"> + <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="externalConfirm" label="鏈哄姩鍔炴槸鍚﹀彲缁翠慨"> + <j-dict-select-tag type='radio' v-model='tableRowRecord.externalConfirm' dictCode='yn' + placeholder="璇烽�夋嫨" :disabled="disableSubmit||tableRowRecord.repairStatus!=='WAIT_EXTERNAL_CONFIRM'"/> + </a-form-model-item> + </a-col> + <a-col :span="12"> + <a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="externalConfirmComment" label="纭鎰忚"> + <a-textarea placeholder="璇疯緭鍏ユ剰瑙�" v-model="tableRowRecord.externalConfirmComment" + :readOnly="disableSubmit || tableRowRecord.repairStatus!=='WAIT_EXTERNAL_CONFIRM'"/> + </a-form-model-item> + </a-col> + </a-row> + </div> + <div v-if="underExternalRepair && tableRowRecord.externalConfirm === '1'"> + <a-divider orientation="center" style="font-size: large;font-style: italic;color: #66aeed;">鏈哄姩鍔炵淮淇粨鏋�</a-divider> + <a-row> + <a-col :span="twoColSpan*2"> + <a-form-model-item label="鏁呴殰鍘熷洜" prop="faultReason" :labelCol="labelColLong" :wrapperCol="wrapperColLong"> + <a-input :readOnly="disableSubmit||tableRowRecord.repairStatus!=='UNDER_EXTERNAL_REPAIR'" + v-model="tableRowRecord.faultReason" rows="4" + placeholder="璇疯緭鍏ユ晠闅滃師鍥�"/> + </a-form-model-item> + </a-col> + <a-col :span="twoColSpan*2"> + <a-form-model-item label="缁翠慨缁撴灉鎻忚堪" prop="repairDescription" :labelCol="labelColLong" :wrapperCol="wrapperColLong"> + <a-textarea :readOnly="disableSubmit||tableRowRecord.repairStatus!=='UNDER_EXTERNAL_REPAIR'" + v-model="tableRowRecord.repairDescription" + placeholder="璇疯緭鍏ョ淮淇粨鏋滄弿杩�"/> + </a-form-model-item> + </a-col> + <a-col :span="twoColSpan*2"> + <a-form-model-item label="缁翠慨鍥剧墖" :labelCol="labelColLong" :wrapperCol="wrapperColLong"> + <lx-upload :returnUrl="false" :isMultiple="true" file-type="image" :number="3" + :disabled="disableSubmit||tableRowRecord.repairStatus!=='UNDER_EXTERNAL_REPAIR'" + v-model="tableRowRecord.imageFiles"/> + </a-form-model-item> + </a-col> + </a-row> + </div> + <div v-if="underOutsideRepair && tableRowRecord.externalConfirm === '0'"> + <a-divider orientation="center" style="font-size: large;font-style: italic;color: #66aeed;">濮斿缁翠慨缁撴灉</a-divider> + <a-row> + <a-col :span="twoColSpan*2"> + <a-form-model-item label="鏁呴殰鍘熷洜" prop="faultReason" :labelCol="labelColLong" :wrapperCol="wrapperColLong"> + <a-input :readOnly="disableSubmit||tableRowRecord.repairStatus!=='UNDER_OUTSIDE_REPAIR'" + v-model="tableRowRecord.faultReason" rows="4" + placeholder="璇疯緭鍏ユ晠闅滃師鍥�"/> + </a-form-model-item> + </a-col> + <a-col :span="twoColSpan*2"> + <a-form-model-item label="缁翠慨缁撴灉鎻忚堪" prop="repairDescription" :labelCol="labelColLong" :wrapperCol="wrapperColLong"> + <a-textarea :readOnly="disableSubmit||tableRowRecord.repairStatus!=='UNDER_OUTSIDE_REPAIR'" + v-model="tableRowRecord.repairDescription" + placeholder="璇疯緭鍏ョ淮淇粨鏋滄弿杩�"/> + </a-form-model-item> + </a-col> + <a-col :span="twoColSpan*2"> + <a-form-model-item label="缁翠慨鍥剧墖" :labelCol="labelColLong" :wrapperCol="wrapperColLong"> + <lx-upload :returnUrl="false" :isMultiple="true" file-type="image" :number="3" + :disabled="disableSubmit||tableRowRecord.repairStatus!=='UNDER_OUTSIDE_REPAIR'" + v-model="tableRowRecord.imageFiles"/> + </a-form-model-item> + </a-col> + </a-row> + </div> + <div v-if="operatorConfirm"> + <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="labelColLong" :wrapperCol="wrapperColLong" prop="confirmComment" label="纭鎰忚"> + <a-textarea placeholder="璇疯緭鍏ユ剰瑙�" v-model="tableRowRecord.confirmComment" + :readOnly="disableSubmit || tableRowRecord.repairStatus!=='WAIT_CONFIRM'"/> + </a-form-model-item> + </a-col> + </a-row> + </div> </a-tab-pane> <template v-if="selectShenpiData.procInstId"> @@ -116,56 +250,10 @@ </a-tab-pane> <a-tab-pane key='3' tab='娴佺▼鍥�'> - <img :src="imageSrc" alt="Fetched Image"/>--> + <img :src="imageSrc" alt="Fetched Image"/> </a-tab-pane> </template> </a-tabs> - - <template v-if="tableRowRecord.isUseSpare===1&&isDisableUseSpare"> - <a-divider orientation="center" style="font-size: large;font-style: italic;color: #66aeed;">绠$悊鍛橀鐢ㄥ浠� - </a-divider> - - <a-row> - <a-col :span="twoColSpan*2"> - <a-form-model-item prop="sparePartDescription" label="澶囦欢鎻忚堪"> - <a-textarea placeholder="璇疯緭鍏ュ浠舵弿杩�" :readOnly="disableSubmit||tableRowRecord.repairStatus!=='WAIT_SPARES'" - v-model="tableRowRecord.sparePartDescription"></a-textarea> - </a-form-model-item> - </a-col> - </a-row> - </template> - - <template v-if="Boolean(tableRowRecord.sparePartDescription)&&isDisplayRepairResult"> - <a-divider orientation="center" style="font-size: large;font-style: italic;color: #66aeed;">缁翠慨缁撴灉涓婃姤</a-divider> - <a-row> - <a-col :span="twoColSpan*2"> - <a-form-model-item label="鏁呴殰鍘熷洜" prop="faultReason"> - <a-input :readOnly="disableSubmit||isDisableSubmitRepairResult" v-model="tableRowRecord.faultReason" - rows="4" placeholder="璇疯緭鍏ユ晠闅滃師鍥�"/> - </a-form-model-item> - </a-col> - </a-row> - - <a-row> - <a-col :span="twoColSpan*2"> - <a-form-model-item label="缁翠慨缁撴灉鎻忚堪" prop="repairDescription"> - <a-textarea :readOnly="disableSubmit||isDisableSubmitRepairResult" - v-model="tableRowRecord.repairDescription" - placeholder="璇疯緭鍏ョ淮淇粨鏋滄弿杩�"/> - </a-form-model-item> - </a-col> - </a-row> - - <a-row> - <a-col :span="twoColSpan*2"> - <a-form-model-item label="缁翠慨鍥剧墖"> - <lx-upload :disabled="disableSubmit||isDisableSubmitRepairResult" :returnUrl="false" :isMultiple="true" - file-type="image" :number="3" - v-model="tableRowRecord.imageFiles"/> - </a-form-model-item> - </a-col> - </a-row> - </template> </a-form-model> </a-spin> </j-modal> @@ -173,8 +261,8 @@ <script> import '@assets/less/TableExpand.less' - import { getAction, deleteAction, postAction, downFile, httpAction } from '@api/manage' - import LxSearchEquipmentSelect from '../../../eam/equipment/modules/LxSearchEquipmentSelect' + import { getAction, downFile, httpAction } from '@api/manage' + import LxSearchEquipmentSelect from '@views/eam/equipment/modules/LxSearchEquipmentSelect' export default { name: 'RepairOrderApprovalModal', @@ -215,11 +303,26 @@ sm: { span: 20 } }, validatorRules: { - isUseSpare: [ - { required: true, message: '璇烽�夋嫨鏄惁闇�瑕侀鐢ㄥ浠�' } + repairConfirm: [ + { required: true, message: '璇烽�夋嫨鏄惁鍐呴儴鍙淮淇紒' } ], - sparePartDescription: [ - { required: true, message: '璇疯緭鍏ュ浠舵弿杩�' } + repairConfirmComment: [ + { required: true, message: '璇疯緭鍏ョ淮淇‘璁ゆ剰瑙�' } + ], + leaderConfirm: [ + { required: true, message: '璇烽�夋嫨鏄惁鍚屾剰澶栭儴缁翠慨锛�' } + ], + leaderConfirmComment: [ + { required: true, message: '璇疯緭鍏ラ瀵肩‘璁ゆ剰瑙�' } + ], + externalConfirm: [ + { required: true, message: '璇烽�夋嫨鏈哄姩鍔炴槸鍚﹀彲缁翠慨锛�' } + ], + externalConfirmComment: [ + { required: true, message: '璇疯緭鍏ユ満鍔ㄥ姙纭鎰忚' } + ], + confirmComment: [ + { required: true, message: '璇疯緭鍏ユ搷浣滃伐纭鎰忚' } ], faultReason: [ { required: true, message: '璇疯緭鍏ユ晠闅滃師鍥�' } @@ -240,13 +343,25 @@ } }, computed: { - isDisableUseSpare() { - return this.disableSubmit || this.tableRowRecord.repairStatus !== 'UNDER_REPAIR' || Boolean(this.tableRowRecord.sparePartDescription) + repairConfirm() { + return ['WAIT_INTERNAL_CONFIRM', 'UNDER_INTERNAL_REPAIR', 'WAIT_LEADER_CONFIRM', 'WAIT_EXTERNAL_CONFIRM', 'UNDER_EXTERNAL_REPAIR', 'UNDER_OUTSIDE_REPAIR', 'WAIT_CONFIRM', 'COMPLETE'].includes(this.tableRowRecord.repairStatus) }, - isDisplayRepairResult() { - return ['UNDER_REPAIR', 'WAIT_CONFIRM', 'COMPLETE'].includes(this.tableRowRecord.repairStatus) + underInternalRepair() { + return ['UNDER_INTERNAL_REPAIR', 'WAIT_CONFIRM', 'COMPLETE'].includes(this.tableRowRecord.repairStatus) }, - isDisableSubmitRepairResult() { + leaderConfirm() { + return ['UNDER_INTERNAL_REPAIR', 'WAIT_LEADER_CONFIRM', 'WAIT_EXTERNAL_CONFIRM', 'UNDER_EXTERNAL_REPAIR', 'UNDER_OUTSIDE_REPAIR', 'WAIT_CONFIRM', 'COMPLETE'].includes(this.tableRowRecord.repairStatus) + }, + externalConfirm() { + return ['WAIT_EXTERNAL_CONFIRM', 'UNDER_EXTERNAL_REPAIR', 'UNDER_OUTSIDE_REPAIR', 'WAIT_CONFIRM', 'COMPLETE'].includes(this.tableRowRecord.repairStatus) + }, + underExternalRepair() { + return ['UNDER_EXTERNAL_REPAIR', 'WAIT_CONFIRM', 'COMPLETE'].includes(this.tableRowRecord.repairStatus) + }, + underOutsideRepair() { + return ['UNDER_OUTSIDE_REPAIR', 'WAIT_CONFIRM', 'COMPLETE'].includes(this.tableRowRecord.repairStatus) + }, + operatorConfirm() { return ['WAIT_CONFIRM', 'COMPLETE'].includes(this.tableRowRecord.repairStatus) } }, @@ -313,14 +428,20 @@ this.$refs.form.validate(valid => { if (valid) { that.confirmLoading = that.spinning = true - const { isUseSpare, faultReason, repairDescription, sparePartDescription, imageFiles, equipmentId } = that.tableRowRecord + const { confirmComment, externalConfirm, externalConfirmComment, repairConfirm, repairConfirmComment, leaderConfirm, leaderConfirmComment, faultReason, repairDescription, imageFiles, equipmentId } = that.tableRowRecord const { dataId, id, procInstId, taskDefKey, variables } = that.selectShenpiData const flowTaskVo = {} - flowTaskVo.isUseSpare = isUseSpare + flowTaskVo.repairConfirm = repairConfirm + flowTaskVo.repairConfirmComment = repairConfirmComment + flowTaskVo.leaderConfirm = leaderConfirm + flowTaskVo.leaderConfirmComment = leaderConfirmComment + flowTaskVo.externalConfirm = externalConfirm + flowTaskVo.externalConfirmComment = externalConfirmComment + flowTaskVo.confirmComment = confirmComment + flowTaskVo.faultReason = faultReason flowTaskVo.repairDescription = repairDescription - flowTaskVo.sparePartDescription = sparePartDescription flowTaskVo.imageFilesResult = imageFiles flowTaskVo.equipmentId = equipmentId flowTaskVo.id = dataId -- Gitblit v1.9.3