| | |
| | | const saveCraft = () => { |
| | | //rowIndex.value.process = craftObj.newCraft.join('->') |
| | | let orderProcess= craftObj.newCraft.join('->') |
| | | request.post(`/processCard/updateProcess/${rowIndex.value.process_id}/${rowIndex.value.technology_number}/${rowIndex.value.order_id}/${orderProcess}`, craftObj).then((res) => { |
| | | request.post(`/processCard/updateProcess/${rowIndex.value.process_id}/${rowIndex.value.order_number}/${rowIndex.value.technology_number}/${rowIndex.value.order_id}/${orderProcess}`, craftObj).then((res) => { |
| | | if (res.code == 200 && res.data === true) { |
| | | ElMessage.success(t('basicData.msg.saveSuccess')) |
| | | router.push({ |
| | |
| | | }) |
| | | } else { |
| | | |
| | | ElMessage.warning('保存失败,检查是否报工') |
| | | ElMessage.warning(t('processCard.updateProcessMsg')) |
| | | |
| | | } |
| | | }) |
| | |
| | | completed.value=res.data.data |
| | | completedOk.value = row.quantity*1 - completed.value*1 |
| | | //弹窗 |
| | | ElMessageBox.prompt( '最大已完工数量:'+completed.value, { |
| | | ElMessageBox.prompt( t('processCard.maxCompleted')+completed.value, { |
| | | confirmButtonText: t('basicData.save'), |
| | | cancelButtonText: t('basicData.cancelButtonText'), |
| | | inputPattern:/^(\d+|)$/, |
| | | inputErrorMessage: t('processCard.terminationMsg'), |
| | | inputValue:row.quantity |
| | | }).then(({ value }) => { |
| | | console.log(completedOk.value, value) |
| | | if (completedOk.value < value ) { |
| | | ElMessage.warning(t('processCard.terminationMsg')) |
| | | return |
| | |
| | | {field: 'order_number', title: t('order.OrderNum') ,filters:[{ data: '' }],slots: { filter: 'num1_filter' },width: 100}, |
| | | {field: 'technology_number', title: t('processCard.technologyNumber') ,filters:[{ data: '' }],slots: { filter: 'num1_filter' },width: 100}, |
| | | {field: 'quantity', title: t('order.quantity'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, width: 80}, |
| | | {field: 'termination_quantity', title: t('processCard.terminationQuantity'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, width: 80}, |
| | | {field: 'child_width', title: t('order.width'),width: 80 }, |
| | | {field: 'child_height', title: t('order.height'),width: 80 }, |
| | | {field: 'area', title: t('order.area') ,showOverflow:"ellipsis",width: 70}, |
| | |
| | | |
| | | }) |
| | | ElMessageBox.confirm( |
| | | "是否合并?", |
| | | t('processCard.msg.msg6'), |
| | | { |
| | | confirmButtonText: t('basicData.confirmButtonText'), |
| | | cancelButtonText: t('basicData.cancelButtonText'), |
| | |
| | | <!--左边固定显示的插槽--> |
| | | <template #button_slot="{ row }"> |
| | | <el-button @click="updateCraft(row)" link type="primary" size="small">{{$t('craft.updateCraft')}}</el-button> |
| | | <el-button @click="updateTermination(row)" link type="primary" size="small">终止</el-button> |
| | | <el-button @click="updateTermination(row)" link type="primary" size="small">{{$t('processCard.termination')}}</el-button> |
| | | </template> |
| | | |
| | | <template #num1_filter="{ column, $panel }"> |