|
|
|
@ -1228,6 +1228,7 @@ export default {
|
|
|
|
|
_this.$modal.msgSuccess("报工成功");
|
|
|
|
|
}
|
|
|
|
|
_this.loading = false;
|
|
|
|
|
_this.getList();
|
|
|
|
|
});
|
|
|
|
|
}).then(() => {
|
|
|
|
|
|
|
|
|
@ -1247,6 +1248,7 @@ export default {
|
|
|
|
|
_this.$modal.msgSuccess("报工撤销成功");
|
|
|
|
|
}
|
|
|
|
|
_this.loading = false;
|
|
|
|
|
_this.getList();
|
|
|
|
|
});
|
|
|
|
|
}).then(() => {
|
|
|
|
|
|
|
|
|
@ -1545,8 +1547,19 @@ export default {
|
|
|
|
|
//物料损耗表格--删除
|
|
|
|
|
deleteBomRow(index, rows) {
|
|
|
|
|
this.$modal.confirm('是否确认删除?确认后,不需要点击下方确定,立马删除!').then(function() {
|
|
|
|
|
return deleteBomRowNow(rows[index].recordId);
|
|
|
|
|
if(rows[index].recordId != null ){
|
|
|
|
|
return deleteBomRowNow(rows[index].recordId);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}).then(() => {
|
|
|
|
|
var newPConsumeRows = [];
|
|
|
|
|
this.pConsumeRows.forEach(item=>{
|
|
|
|
|
if (item.workorderCode!=rows[index].workorderCode
|
|
|
|
|
|| item.materialCode!=rows[index].materialCode) {
|
|
|
|
|
newPConsumeRows.push(item)
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
this.pConsumeRows = newPConsumeRows;
|
|
|
|
|
rows.splice(index, 1);
|
|
|
|
|
this.$modal.msgSuccess("删除成功");
|
|
|
|
|
}).catch(() => {});
|
|
|
|
@ -1554,7 +1567,6 @@ export default {
|
|
|
|
|
},
|
|
|
|
|
//物料损耗表格--新增
|
|
|
|
|
addConsumeTableRow(rows){
|
|
|
|
|
debugger
|
|
|
|
|
this.consumeList = rows;
|
|
|
|
|
if(rows.length==0){
|
|
|
|
|
this.$modal.msgError(`上位机尚未填写损耗,不允许提前新增`);
|
|
|
|
@ -1568,16 +1580,35 @@ export default {
|
|
|
|
|
onSelectNewPrepare(obj) {
|
|
|
|
|
let sr = this.selectRow[0]
|
|
|
|
|
for(let i=0;i<obj.length;i++){
|
|
|
|
|
const row = {
|
|
|
|
|
workorderCode: obj[i].workorderCode,
|
|
|
|
|
materialCode: obj[i].component,
|
|
|
|
|
materialName: obj[i].componentName,
|
|
|
|
|
quantity: obj[i].quantity,
|
|
|
|
|
unit: obj[i].unit,
|
|
|
|
|
recoil:"X",
|
|
|
|
|
parentOrder:sr.workorderCode
|
|
|
|
|
};
|
|
|
|
|
this.consumeList.push(row);
|
|
|
|
|
if(this.pConsumeRows.length !=0 ){
|
|
|
|
|
this.pConsumeRows.forEach(item=>{
|
|
|
|
|
if (item.materialCode==obj[i].component) {
|
|
|
|
|
this.$modal.msgError("选择物料重复,自动过滤!");
|
|
|
|
|
}else{
|
|
|
|
|
const row = {
|
|
|
|
|
workorderCode: obj[i].workorderCode,
|
|
|
|
|
materialCode: obj[i].component,
|
|
|
|
|
materialName: obj[i].componentName,
|
|
|
|
|
quantity: obj[i].quantity,
|
|
|
|
|
unit: obj[i].unit,
|
|
|
|
|
recoil:"X",
|
|
|
|
|
parentOrder:sr.workorderCode
|
|
|
|
|
};
|
|
|
|
|
this.consumeList.push(row);
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}else{
|
|
|
|
|
const row = {
|
|
|
|
|
workorderCode: obj[i].workorderCode,
|
|
|
|
|
materialCode: obj[i].component,
|
|
|
|
|
materialName: obj[i].componentName,
|
|
|
|
|
quantity: obj[i].quantity,
|
|
|
|
|
unit: obj[i].unit,
|
|
|
|
|
recoil:"X",
|
|
|
|
|
parentOrder:sr.workorderCode
|
|
|
|
|
};
|
|
|
|
|
this.consumeList.push(row);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|