src/views/mes/MesProductionWorkOrderListView.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/views/mes/modules/MesProductionWorkOrderReportModal.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
src/views/mes/MesProductionWorkOrderListView.vue
@@ -83,9 +83,19 @@ <span slot="action" slot-scope="text, record"> <a @click="handleDetail(record)">详æ </a> <span v-if="record.workOrderStatus === 'PUBLISHED'"> <span v-if="record.workOrderStatus === 'PUBLISHED' || record.workOrderStatus === 'EXECUTING'"> <a-divider type="vertical" /> <a @click="handleRePublish(record)">éåå¸</a> </span> <span v-if="record.workOrderStatus === 'PUBLISHED'"> <a-divider type="vertical" /> <a-popconfirm title="ç¡®å®å¼å§æ§è¡å?" @confirm="() => handleExecute(record.id)"> <a>æ§è¡</a> </a-popconfirm> </span> <span v-if="record.workOrderStatus === 'EXECUTING'"> <a-divider type="vertical" /> <a @click="handleWorkReport(record)">æ¥å·¥</a> </span> <span v-if="record.workOrderStatus === 'NEW'"> <a-divider type="vertical" /> @@ -195,6 +205,7 @@ <MesMaterialTransferDetailList ref="MesMaterialTransferDetailList"></MesMaterialTransferDetailList> <MesProductionWorkOrderScheduleModal ref="MesProductionWorkOrderScheduleModal"></MesProductionWorkOrderScheduleModal> <MesProductionWorkOrderRepublishModal ref="MesProductionWorkOrderRepublishModal" @ok="modalFormOk"></MesProductionWorkOrderRepublishModal> <MesProductionWorkOrderReportModal ref="MesProductionWorkOrderReportModal" @ok="modalFormOk"></MesProductionWorkOrderReportModal> </a-card> </template> @@ -213,6 +224,7 @@ import MesMaterialTransferDetailList from '@views/mes/MesMaterialTransferDetailList.vue' import MesProductionWorkOrderScheduleModal from '@views/mes/modules/MesProductionWorkOrderScheduleModal.vue' import MesProductionWorkOrderRepublishModal from '@views/mes/modules/MesProductionWorkOrderRepublishModal.vue' import MesProductionWorkOrderReportModal from '@views/mes/modules/MesProductionWorkOrderReportModal.vue' export default { name: 'MesProductionWorkOrderList', @@ -223,7 +235,8 @@ MesMaterialUnloadingList, MesMaterialTransferDetailList, MesProductionWorkOrderScheduleModal, MesProductionWorkOrderRepublishModal MesProductionWorkOrderRepublishModal, MesProductionWorkOrderReportModal, }, data() { return { @@ -274,7 +287,7 @@ dataIndex: 'planQuantity' }, { title: '产线(åä½)', title: '产线', align: 'center', dataIndex: 'factoryId_dictText' }, @@ -284,7 +297,7 @@ dataIndex: 'groupId_dictText' }, { title: 'çæ¬¡(åä½)', title: 'çæ¬¡', align: 'center', dataIndex: 'shiftId_dictText' }, @@ -674,7 +687,8 @@ queryOrderById:'/mesproductionwork/mesProductionOrder/queryById', queryUnloadingByLoadingId:'/mes/mesMaterialUnloading/queryUnloadingByLoadingId', queryTransferDetailBy:'/mes/mesMaterialTransferDetail/queryTransferDetailBy', publish: '/mesproductionworkorder/mesProductionWorkOrder/publish' publish: '/mesproductionworkorder/mesProductionWorkOrder/publish', execute: '/mesproductionworkorder/mesProductionWorkOrder/execute', }, dictOptions: {}, superFieldList: [] @@ -702,9 +716,22 @@ } }) }, handleExecute(id) { getAction(this.url.execute, { id: id }).then((res) => { if (res.success) { this.$message.success(res.message) this.loadData() } else { this.$message.warning(res.message) } }) }, handleRePublish(record) { this.$refs.MesProductionWorkOrderRepublishModal.add(record) }, handleWorkReport(record) { this.$refs.MesProductionWorkOrderReportModal.add(record) }, async handleTransferDetail(row){ console.log('row---->',row) const transferDetailResult = await getAction(this.url.queryTransferDetailBy,{'requestId':row.id}) src/views/mes/modules/MesProductionWorkOrderReportModal.vue
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,143 @@ <template> <j-modal :title="title" :width="width" :visible="visible" switchFullscreen @ok="handleOk" :okButtonProps="{ class:{'jee-hidden': disableSubmit} }" @cancel="handleCancel" cancelText="å ³é"> <a-spin :spinning="confirmLoading"> <j-form-container :disabled="formDisabled"> <a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail"> <a-row :gutter="24"> <a-col :span="12"> <a-form-model-item label="æ¥å·¥è®¢å" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="orderId"> <a-select v-model="model.orderId" :options="workOrderOptions" placeholder="è¯·éæ©æ¥å·¥è®¢å"> </a-select> </a-form-model-item> </a-col> <a-col :span="12"> <a-form-model-item label="æ¥å·¥å·¥å" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="workOrderCode"> <a-input v-model="model.workOrderCode" :disabled="true" placeholder="è¯·éæ©æ¥å·¥å·¥å"> </a-input> </a-form-model-item> </a-col> <a-col :span="12"> <a-form-model-item label="产线" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="factoryId_dictText"> <a-input v-model="model.factoryId_dictText" :disabled="true" placeholder="è¯·éæ©äº§çº¿"> </a-input> </a-form-model-item> </a-col> <a-col :span="12"> <a-form-model-item label="æ¥å·¥æ°é" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="quantity"> <a-input-number v-model="model.quantity" placeholder="è¯·å¡«åæ¥å·¥æ°é" style="width: 100%" :min="0"> </a-input-number> </a-form-model-item> </a-col> </a-row> </a-form-model> </j-form-container> </a-spin> </j-modal> </template> <script> import { postAction, getAction } from '@api/manage' export default { name: 'MesProductionWorkOrderRepublishModal', data () { return { title: 'æ¥å·¥', width: 800, visible: false, disableSubmit: false, confirmLoading: false, model: {}, validatorRules: { }, labelCol: { xs: { span: 24 }, sm: { span: 6 }, }, wrapperCol: { xs: { span: 24 }, sm: { span: 18 }, }, url: { republish: '/mesproductionworkorder/mesProductionWorkOrder/republish', selectReportWorkOrderList: '/mes/productionOrder/selectReportWorkOrderList' }, workOrderOptions: [] } }, computed: { formDisabled(){ return this.disabled }, }, methods: { add (record) { // é置表å this.$refs.form && this.$refs.form.resetFields() // 设置åå§å¼ this.model = Object.assign({}, record); getAction(this.url.selectReportWorkOrderList, {materialNumber: record.materialNumber}).then(res => { if (res.success) { this.workOrderOptions = res.result } }) this.visible = true }, close () { this.$emit('close'); this.visible = false; }, handleOk () { this.$refs.form.validate(valid => { if (valid) { this.confirmLoading = true let formData = { id: this.model.id, planQuantity: this.model.planQuantity, republishReason: this.model.republishReason } postAction(this.url.republish, formData).then(res => { if (res.success) { this.$message.success(res.message) this.submitCallback() } else { this.$message.warning(res.message) } }).finally(() => { this.confirmLoading = false }) } }) }, submitCallback(){ this.$emit('ok'); this.visible = false; }, handleCancel () { this.close() } } } </script>