| | |
| | | <template> |
| | | <a-modal |
| | | <j-modal |
| | | :width="1200" |
| | | :visible="visible" |
| | | :title="title" |
| | | :okButtonProps="{ class:{'jee-hidden': disableSubmit} }" |
| | | @cancel="handCancel" |
| | | @ok="submitForm" |
| | | :mask-closable="false" |
| | | :confirmLoading="confirmLoading" |
| | | centered |
| | | > |
| | | <a-spin :spinning="spinning"> |
| | |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span='threeColSpan'> |
| | | <a-form-model-item label='工单状态'> |
| | | <a-input :readOnly='inputReadOnly' v-model='tableRowRecord.repairStatus_dictText'/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span='threeColSpan'> |
| | | <a-form-model-item label='设备编号'> |
| | | <lx-search-equipment-select disabled v-model='tableRowRecord.equipmentId'/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | </a-row> |
| | | <a-row> |
| | | <a-col :span='threeColSpan'> |
| | | <a-form-model-item label='维修负责人'> |
| | | <a-input :readOnly='inputReadOnly' v-model='tableRowRecord.repairer'/> |
| | | <a-form-model-item label='安装位置'> |
| | | <a-input :readOnly='inputReadOnly' v-model='tableRowRecord.installationPosition_dictText'/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span='threeColSpan'> |
| | | <a-form-model-item label='报修人'> |
| | | <a-input :readOnly='inputReadOnly' v-model='tableRowRecord.reporter_dictText'/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span='threeColSpan'> |
| | | <a-form-model-item label='报修人电话'> |
| | | <a-input :readOnly='inputReadOnly' v-model='tableRowRecord.reporterPhone_dictText'/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | </a-row> |
| | | <a-row> |
| | | <a-col :span='threeColSpan'> |
| | | <a-form-model-item label='维修人'> |
| | | <a-input :readOnly='inputReadOnly' v-model='tableRowRecord.repairer_dictText'/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span='threeColSpan'> |
| | | <a-form-model-item label='维修人电话'> |
| | | <a-input :readOnly='inputReadOnly' v-model='tableRowRecord.repairerPhone_dictText'/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | <a-col :span='threeColSpan'> |
| | | <a-form-model-item label='故障简称'> |
| | | <a-input :readOnly='inputReadOnly' v-model='tableRowRecord.faultName'/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | </a-row> |
| | |
| | | </a-form-model-item> |
| | | </a-col> |
| | | </a-row> |
| | | |
| | | <a-row> |
| | | <a-col :span="24"> |
| | | <a-form-model-item label='故障描述' :labelCol='labelColLong' :wrapperCol='wrapperColLong'> |
| | | <a-textarea :readOnly='inputReadOnly' v-model='tableRowRecord.faultDescription'/> |
| | | </a-form-model-item> |
| | | </a-col> |
| | | </a-row> |
| | | <a-row> |
| | | <a-col :span='threeColSpan*3'> |
| | | <a-form-model-item label='报修图片' :labelCol='labelColLong' :wrapperCol='wrapperColLong'> |
| | |
| | | <a-row> |
| | | <a-col :span="twoColSpan*2"> |
| | | <a-form-model-item label="是否需要领用备件" prop="isUseSpare"> |
| | | <a-radio-group v-model="tableRowRecord.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-row> |
| | | </a-tab-pane> |
| | | |
| | | <a-tab-pane key='2' tab='流程节点'> |
| | | <a-card :bordered="false"> |
| | | <a-timeline> |
| | | <a-timeline-item v-for="(item,index) in hitaskDataSource" :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> |
| | | <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 hitaskDataSource" :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> |
| | | <a-tab-pane key='3' tab='流程图'> |
| | | <img :src="imageSrc" alt="Fetched Image"/>--> |
| | | </a-tab-pane> |
| | | </template> |
| | | </a-tabs> |
| | | |
| | | <template v-if="isDisplayConfirmSpare"> |
| | | <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 :readOnly="disableSubmit||tableRowRecord.repairStatus!=='WAIT_SPARES'" |
| | | v-model="tableRowRecord.sparePartDescription"/> |
| | | <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="tableRowRecord.sparePartDescription"> |
| | | <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"> |
| | |
| | | </template> |
| | | </a-form-model> |
| | | </a-spin> |
| | | </a-modal> |
| | | </j-modal> |
| | | </template> |
| | | |
| | | <script> |
| | |
| | | twoColSpan: 12, |
| | | inputReadOnly: true, |
| | | disableSubmit: false, |
| | | confirmLoading: false, |
| | | spinning: false, |
| | | tableRowRecord: {}, |
| | | hitaskDataSource: [], |
| | |
| | | } |
| | | }, |
| | | computed: { |
| | | isDisplayConfirmSpare() { |
| | | return ['WAIT_SPARES', 'WAIT_CONFIRM', 'COMPLETE'].includes(this.tableRowRecord.repairStatus) |
| | | isDisableUseSpare() { |
| | | return this.disableSubmit || this.tableRowRecord.repairStatus !== 'UNDER_REPAIR' || Boolean(this.tableRowRecord.sparePartDescription) |
| | | }, |
| | | isDisplayRepairResult() { |
| | | return ['UNDER_REPAIR', 'WAIT_CONFIRM', 'COMPLETE'].includes(this.tableRowRecord.repairStatus) |
| | | }, |
| | | isDisableSubmitRepairResult() { |
| | | return ['WAIT_CONFIRM', 'COMPLETE'].includes(this.tableRowRecord.repairStatus) |
| | |
| | | * @param record 待办记录信息 |
| | | */ |
| | | getAllApproveData(record) { |
| | | if (!record.procInstId) return |
| | | console.log('record----->', record) |
| | | const { procInstId, processDefinitionId, processInstanceId, processDefinitionKey } = record |
| | | const param = { procInstId } |
| | |
| | | // 触发表单验证 |
| | | this.$refs.form.validate(valid => { |
| | | if (valid) { |
| | | that.confirmLoading = true |
| | | that.confirmLoading = that.spinning = true |
| | | const { isUseSpare, faultReason, repairDescription, sparePartDescription, imageFiles, equipmentId } = that.tableRowRecord |
| | | const { dataId, id, procInstId, taskDefKey, variables } = that.selectShenpiData |
| | | |
| | |
| | | .then((res) => { |
| | | if (res.success) { |
| | | that.$message.success(res.message) |
| | | that.$emit('ok') |
| | | that.handCancel() |
| | | that.$emit('searchReset') |
| | | } else { |
| | | that.$message.warning(res.message) |
| | | } |
| | | }).finally(() => { |
| | | that.confirmLoading = false |
| | | that.confirmLoading = that.spinning = false |
| | | }) |
| | | } else { |
| | | return false |