MES:Web生产派工,计划生产的数量可以不等于派工的数量(目前只针对4楼折弯工序)
master
xs 8 months ago
parent 6e8fdb258b
commit 24942596ca

@ -2,7 +2,8 @@
<div>
<el-card>
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
<el-divider content-position="left"><span style="font-weight: bold; font-size: larger;">工单信息</span></el-divider>
<el-divider content-position="left"><span style="font-weight: bold; font-size: larger;">工单信息</span>
</el-divider>
<el-row :gutter="10">
<el-col :span="12">
<el-form-item label="工单号:">{{ form.orderCode }}</el-form-item>
@ -19,7 +20,8 @@
</el-col>
</el-row>
<el-divider content-position="left"><span style="font-weight: bold; font-size: larger;">派工信息</span></el-divider>
<el-divider content-position="left"><span style="font-weight: bold; font-size: larger;">派工信息</span>
</el-divider>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
@ -56,9 +58,14 @@
<el-input v-model="scope.row.stationName" :disabled="true"/>
</template>
</el-table-column>
<el-table-column align="center" label="派工数量" prop="planAmount" width="100">
<el-table-column align="center" label="派工数量" prop="dispatchAmount" width="100">
<template slot-scope="scope">
<el-input v-model="scope.row.planAmount" :disabled="scope.row.oldRowFlag"/>
<el-input v-model="scope.row.dispatchAmount" :disabled="scope.row.oldRowFlag"/>
</template>
</el-table-column>
<el-table-column align="center" label="计划数量" prop="planAmount" width="100">
<template slot-scope="scope">
<el-input v-model="scope.row.planAmount" :disabled="scope.row.oldRowFlag || scope.row.processId!==PROCESS_ID.BENDING_PROCESS_ID"/>
</template>
</el-table-column>
<el-table-column align="center" label="派工标准工时" prop="productionTime" width="100">
@ -359,6 +366,9 @@ export default {
headers: {
Authorization: "Bearer " + getToken(),
},
PROCESS_ID: {
BENDING_PROCESS_ID: 42
}
};
},
created() {
@ -392,8 +402,8 @@ export default {
}
// ( + <= )
// processIdplanAmountplanAmount
const sumList = dataList.reduce((result, {processId, planAmount}) => {
const numericAmount = parseInt(planAmount, 10);
const sumList = dataList.reduce((result, {processId, dispatchAmount}) => {
const numericAmount = parseInt(dispatchAmount, 10);
if (!this.isPositiveInteger(numericAmount)) {
this.$modal.msgError("派工数量须为大于等于0的正整数");
return;
@ -454,7 +464,7 @@ export default {
return item.planId;
});
dispatchSum = this.form.dispatchAmount - dispatchSum;
delProductplan(planIds).then(res =>{
delProductplan(planIds).then(res => {
//
updateProductOrder({
productOrderId: this.form.productOrderId,
@ -554,9 +564,9 @@ export default {
obj.planStatus = '1';
// multiStationFlag
if (e.multiStationFlag > 1) {
obj.planAmount = 0;
obj.dispatchAmount = 0;//productplanobj.planAmountplanamount=dispatchamountthis.form.planAmountorderthis.form.dispatchAmountorder
} else {
obj.planAmount = this.form.planAmount - this.form.dispatchAmount;
obj.dispatchAmount = this.form.planAmount - this.form.dispatchAmount;
}
obj.materialId = this.form.materialId;
obj.materialBomId = this.form.materialBomId;
@ -566,7 +576,7 @@ export default {
// ID
if (lastProcessId == null) {
obj.lastProcessId = 0;
} else if(lastProcessId === obj.processId){
} else if (lastProcessId === obj.processId) {
obj.lastProcessId = this.mesProductPlanList[index - 1].lastProcessId;
} else {
obj.lastProcessId = lastProcessId;

Loading…
Cancel
Save