src/views/eam/maintenance/EamThirdMaintenanceChangeList.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/views/eam/maintenance/modules/EamThirdMaintenanceChangeModal.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/views/eam/technical/modules/EamThirdMaintenanceChangeModal.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/views/flowable/workflow/thirdMaintenance/ThirdMaintenanceOrderChangeApprovalModal.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
src/views/eam/maintenance/EamThirdMaintenanceChangeList.vue
@@ -41,7 +41,7 @@ :pagination="ipagination" :loading="loading" :scroll="{x:'max-content'}" @change="handleTableChange"> <span slot="action" slot-scope="text, record"> <tamplate v-if="record.changeStatus=='WAIT_SUBMIT'"> <template v-if="record.changeStatus=='WAIT_SUBMIT'"> <a @click="handleEdit(record)">ç¼è¾</a> <a-divider type="vertical"/> @@ -55,41 +55,38 @@ <a-popconfirm title="ç¡®å®ä½åºåï¼" @confirm="handleAbolish(record.id)"> <a>ä½åº</a> </a-popconfirm> </tamplate> </template> <a @click="handleDetail(record)" v-if="record.changeStatus!='WAIT_SUBMIT'&&record.changeStatus!='ABOLISH'">详æ </a> <a @click="handleDetail(record)" v-if="record.changeStatus!='WAIT_SUBMIT'&&record.changeStatus!='ABOLISH'">详æ </a> </span> </a-table> <!-- tableåºå-end --> <!-- 表ååºå --> <eam-third-maintenance-change-modal ref="orderChangeModal" @ok="modalFormOk"/> <eam-third-maintenance-change-modal ref="modalForm" @ok="modalFormOk"/> <!--åæ´æµç¨è¡¨å--> <!-- <third-maintenance-approval-modal ref="thirdMaintenanceApprovalModal"--> <!-- :selectShenpiData="selectThirdMaintenanceData"/>--> <!--审æ¹çªå£--> <third-maintenance-order-change-approval-modal ref="thirdMaintenanceOrderChangeApprovalModal" :selectShenpiData="selectedRowData"/> </a-card> </template> <script> // import EamThirdMaintenanceOrderModal from './modules/EamThirdMaintenanceOrderModal' import { JeecgListMixin } from '@/mixins/JeecgListMixin' import LxSearchEquipmentSelect from '@views/eam/equipment/modules/LxSearchEquipmentSelect.vue' import { deleteAction, getAction } from '@api/manage' // import ThirdMaintenanceApprovalModal // from '@views/flowable/workflow/thirdMaintenance/ThirdMaintenanceApprovalModal.vue' import EamThirdMaintenanceChangeModal from '@views/eam/technical/modules/EamThirdMaintenanceChangeModal.vue' import EamThirdMaintenanceChangeModal from './modules/EamThirdMaintenanceChangeModal.vue' import ThirdMaintenanceOrderChangeApprovalModal from '../../flowable/workflow/thirdMaintenance/ThirdMaintenanceOrderChangeApprovalModal' export default { name: 'EamThirdMaintenanceChangeList', mixins: [JeecgListMixin], components: { ThirdMaintenanceOrderChangeApprovalModal, EamThirdMaintenanceChangeModal, LxSearchEquipmentSelect, // EamThirdMaintenanceOrderModal, // ThirdMaintenanceApprovalModal LxSearchEquipmentSelect }, props: { isDisplayOperation: { @@ -101,7 +98,7 @@ return { description: '设å¤ä¸çº§ä¿å »åæ´é¡µé¢', disableMixinCreated: true, selectThirdMaintenanceData: {}, selectedRowData: {}, // 表头 columns: [ { @@ -134,9 +131,15 @@ fixed: 'left' }, { title: 'åæ´ç¶æ', align: 'center', dataIndex: 'changeStatus_dictText', fixed: 'left' }, { title: 'å·¥åå·', align: 'center', dataIndex: 'orderNum_dictText' dataIndex: 'orderId_dictText' }, { title: 'åæ´åå·', @@ -162,11 +165,6 @@ title: 'ç³è¯·ç±»å', align: 'center', dataIndex: 'applyCategory_dictText' }, { title: 'åæ´ç¶æ', align: 'center', dataIndex: 'changeStatus_dictText' }, { title: 'åæ´åå ç±»å', @@ -221,8 +219,8 @@ ], url: { list: '/eam/eamThirdMaintenanceChange/list', abolish: '/eam/eamThirdMaintenanceChange/abolish', collect: '/eam/eamThirdMaintenanceChange/collect' submit: '/eam/eamThirdMaintenanceChange/submit', abolish: '/eam/eamThirdMaintenanceChange/abolish' } } }, @@ -234,13 +232,13 @@ title: 'æä½', dataIndex: 'action', align: 'center', width: 200, fixed: 'right', scopedSlots: { customRender: 'action' } } this.columns = [...this.columns, operationColumn] this.loadData(1) }, computed: {}, methods: { /** * æäº¤æ¶è§¦å @@ -257,12 +255,12 @@ description: res.message }) that.loadData() that.loading = false } else { that.$notification.warning({ message: 'æ¶æ¯', description: res.message }) that.loading = false } }) }, @@ -292,17 +290,17 @@ }) }, // /** // * ç¹å»è¯¦æ æ¶è§¦å // * @param record // */ // handleDetail(record) { // this.selectThirdMaintenanceData = Object.assign({}, record) // this.$refs.thirdMaintenanceApprovalModal.title = '详æ ' // this.$refs.thirdMaintenanceApprovalModal.visible = true // this.$refs.thirdMaintenanceApprovalModal.disableSubmit = true // this.$refs.thirdMaintenanceApprovalModal.recordDetail(record) // }, /** * ç¹å»è¯¦æ æ¶è§¦å * @param record */ handleDetail(record) { this.selectedRowData = Object.assign({}, record) this.$refs.thirdMaintenanceOrderChangeApprovalModal.title = '详æ ' this.$refs.thirdMaintenanceOrderChangeApprovalModal.visible = true this.$refs.thirdMaintenanceOrderChangeApprovalModal.disableSubmit = true this.$refs.thirdMaintenanceOrderChangeApprovalModal.handleDetail(record) }, /** * ç³è¯·æ¶é´åçæ¹åæ¶è§¦å src/views/eam/maintenance/modules/EamThirdMaintenanceChangeModal.vue
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,168 @@ <template> <j-modal :title="title" :width="1300" :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="8"> <a-form-model-item label="å·¥åå·"> <a-input readOnly v-model="model.orderNum"/> </a-form-model-item> </a-col> <a-col :span="8"> <a-form-model-item label="åæ´åå·"> <a-input placeholder="ç³»ç»èªå¨çæ" disabled v-model="model.changeOrderNum"/> </a-form-model-item> </a-col> <a-col :span="8"> <a-form-model-item prop="equipmentId" label="ç»ä¸ç¼ç "> <maintenance-equipment-select placeholder="请è¾å ¥ç»ä¸ç¼ç æåç§°æç´¢" v-model="model.equipmentId" disabled maintenanceCategory="THIRD_MAINTENANCE"/> </a-form-model-item> </a-col> <a-col :span="8"> <a-form-model-item prop="applyCategory" label="ç³è¯·ç±»å"> <j-dict-select-tag v-model="model.applyCategory" placeholder="è¯·éæ©ç³è¯·ç±»å" @change="handleApplyCategoryChange" dict-code="third_maintenance_change_category"/> </a-form-model-item> </a-col> <a-col :span="8"> <a-form-model-item prop="applyReasonType" label="åæ´åå ç±»å"> <j-dict-select-tag v-model="model.applyReasonType" placeholder="è¯·éæ©åæ´åå ç±»å" :disabled="model.applyCategory==='SCRAPPED'" dict-code="third_maintenance_change_reason"/> </a-form-model-item> </a-col> <a-col :span="8" v-if="model.applyCategory==='DELAYED'"> <a-form-model-item prop="deferredMaintenanceDate" label="å»¶è¿ä¿å »æ¥æ"> <a-date-picker v-model="model.deferredMaintenanceDate" value-format="YYYY-MM-DD" style="width: 100%" :allow-clear="false"/> </a-form-model-item> </a-col> <a-col :span="24"> <a-form-model-item label="åæ´åå " :labelCol="{span:2}" :wrapperCol="{span:21}"> <a-textarea v-model="model.applyReason" placeholder="请è¾å ¥åæ´åå "/> </a-form-model-item> </a-col> <a-col :span="24"> <a-form-model-item label="夿³¨" :labelCol="{span:2}" :wrapperCol="{span:21}"> <a-textarea v-model="model.remark" placeholder="请è¾å ¥å¤æ³¨"/> </a-form-model-item> </a-col> </a-row> </a-form-model> </a-spin> </j-modal> </template> <script> import { postAction } from '@/api/manage' import MaintenanceEquipmentSelect from '@views/eam/equipment/modules/MaintenanceEquipmentSelect.vue' export default { name: 'EamThirdMaintenanceChangeModal', components: { MaintenanceEquipmentSelect }, data() { return { title: 'æä½', visible: false, model: {}, labelCol: { xs: { span: 24 }, sm: { span: 6 } }, wrapperCol: { xs: { span: 24 }, sm: { span: 15 } }, confirmLoading: false, validatorRules: { deferredMaintenanceDate: [{ required: true, message: 'è¯·éæ©æ¥æ', trigger: 'change' }], applyCategory: [{ required: true, message: 'è¯·éæ©ç³è¯·ç±»å', trigger: 'change' }], applyReasonType: [{ required: true, message: 'è¯·éæ©åæ´åå ', trigger: 'change' }] }, url: { add: '/eam/eamThirdMaintenanceChange/add', edit: '/eam/eamThirdMaintenanceChange/edit' } } }, methods: { add({ id, equipmentId, orderNum }) { this.model = Object.assign({ orderId: id, equipmentId, orderNum }) this.visible = true }, edit(record) { this.model = Object.assign({ orderNum: record.orderId_dictText }, record) this.visible = true }, /** * ç³è¯·ç±»ååçæ¹åæ¶è§¦å * @param value */ handleApplyCategoryChange(value) { if (value === 'SCRAPPED') this.model.applyReasonType = 'EQUIPMENT_SCRAPPED' else delete this.model.applyReasonType delete this.model.deferredMaintenanceDate }, handleOk() { const that = this // 触å表åéªè¯ this.$refs.form.validate(valid => { if (valid) { that.confirmLoading = true let httpUrl if (!that.model.id) { httpUrl = that.url.add } else { httpUrl = that.url.edit } postAction(httpUrl, that.model) .then((res) => { if (res.success) { that.$notification.success({ message: 'æ¶æ¯', description: res.message }) if (!that.model.id) { that.$router.push('/eam/maintenance/EamThirdMaintenanceChangeList') return } that.close() that.$emit('ok') } 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> src/views/eam/technical/modules/EamThirdMaintenanceChangeModal.vue
ÎļþÒÑɾ³ý src/views/flowable/workflow/thirdMaintenance/ThirdMaintenanceOrderChangeApprovalModal.vue
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,376 @@ <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.orderId_dictText" readOnly/> </a-form-model-item> </a-col> <a-col :span="12"> <a-form-model-item label="åæ´åå·"> <a-input v-model="model.changeOrderNum" readOnly/> </a-form-model-item> </a-col> </a-row> <a-row> <a-col :span="12"> <a-form-model-item label="ç»ä¸ç¼ç "> <maintenance-equipment-select v-model="model.equipmentId" maintenance-category="THIRD_MAINTENANCE" @autocompleteForm="autocompleteForm" disabled/> </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.factoryOrgCode_dictText" readOnly/> </a-form-model-item> </a-col> <a-col :span="12"> <a-form-model-item label="åæ´åå ç±»å"> <a-input v-model="model.applyReasonType_dictText" readOnly/> </a-form-model-item> </a-col> </a-row> <a-row v-if="model.apapplyReasonType==='DELAYED'"> <a-col :span="12"> <a-form-model-item label="å»¶è¿ä¿å »æ¥æ"> <a-input v-model="model.deferredMaintenanceDate" 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.applyReason" 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 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="displayEquipmentManagerFlag"> <a-tab-pane tab="使ç¨åä½å®¤çº§é¢å¯¼ç¡®è®¤"> <a-row> <a-col :span="24"> <a-form-model-item prop="equipmentManagerSignatureResult" label="确认类å" :labelCol="rightColLabelCol" :wrapperCol="rightColWrapperCol"> <j-dict-select-tag type='radio' v-model='model.equipmentManagerSignatureResult' dictCode='approve_reject' :disabled="disableSubmit||(model.changeStatus&&model.changeStatus!='EQUIPMENT_MANAGER_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.equipmentManagerComment" :disabled="disableSubmit||(model.changeStatus&&model.changeStatus!='EQUIPMENT_MANAGER_SIGNING')"/> </a-form-model-item> </a-col> </a-row> </a-tab-pane> </a-tabs> <a-tabs v-if="displayDepartManagerFlag"> <a-tab-pane tab="é¨é¨é¢å¯¼ç¡®è®¤"> <a-row> <a-col :span="24"> <a-form-model-item prop="departManagerSignatureResult" label="确认类å" :labelCol="rightColLabelCol" :wrapperCol="rightColWrapperCol"> <j-dict-select-tag type='radio' v-model='model.departManagerSignatureResult' dictCode='approve_reject' :disabled="disableSubmit||(model.changeStatus&&model.changeStatus!='DEPART_MANAGER_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.departManagerComment" :disabled="disableSubmit||(model.changeStatus&&model.changeStatus!='DEPART_MANAGER_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.changeStatus&&model.changeStatus!='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.changeStatus&&model.changeStatus!='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 MaintenanceEquipmentSelect from '../../../eam/equipment/modules/MaintenanceEquipmentSelect' export default { name: 'ThirdMaintenanceOrderChangeApprovalModal', components: { MaintenanceEquipmentSelect }, 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, fullScreen: true, validatorRules: { equipmentManagerSignatureResult: [{ required: true, message: 'è¯·éæ©ç¡®è®¤ç±»å' }], departManagerSignatureResult: [{ required: true, message: 'è¯·éæ©ç¡®è®¤ç±»å' }], productionSupportSignatureResult: [{ required: true, message: 'è¯·éæ©ç¡®è®¤ç±»å' }] }, url: { queryById: '/eam/eamThirdMaintenanceChange/queryById', approval: '/eam/eamThirdMaintenanceChange/approval', diagramView: '/assign/flow/diagramView' }, disableSubmit: false, selectedRowKeys: [] } }, computed: { displayEquipmentManagerFlag() { 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', 'REJECTED'].includes(this.model.changeStatus) && this.model.equipmentManagerSignatureResult === '1' }, displayProductionSupportFlag() { return this.model.changeStatus && ['PRODUCTION_SUPPORT_SIGNING', 'COMPLETED', 'REJECTED'].includes(this.model.changeStatus) && this.model.departManagerSignatureResult === '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 }) } }) .finally(() => { that.spinning = false }) }, /** * è·åæµç¨å¾ * @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>