bug 修复

This commit is contained in:
bb_pan 2025-03-27 15:28:12 +08:00
parent bedb962335
commit 822623eeef
1 changed files with 19 additions and 12 deletions

View File

@ -1163,25 +1163,25 @@ export default {
}, },
//-- //--
saveInnerDialog() { saveInnerDialog() {
const isNum = this.partTableList.some( // const isNum = this.partTableList.some(
(item) => item.partNum == 0 || item.partNum == undefined // (item) => item.partNum == 0 || item.partNum == undefined
); // );
if (isNum) { // if (isNum) {
this.$message.error("配件数量不能为0"); // this.$message.error("0");
return; // return;
} // }
this.innerRowData.partTableList = this.partTableList; this.innerRowData.partTableList = this.partTableList;
this.innerRowData.repairType = 1; this.innerRowData.repairType = 1;
this.innerRowData.partTableList.forEach((item) => { this.innerRowData.partTableList.forEach((item) => {
this.innerRowData.codeInRepairPartList.push(item); this.innerRowData.codeInRepairPartList.push(item);
}); });
if(this.partTableList.length==0) { // if(this.partTableList.length==0) {
this.$message.error("请添加配件!"); // this.$message.error("");
return; // return;
}else{ // }else{
this.innerRowData.status = 1; this.innerRowData.status = 1;
this.openInner = false; this.openInner = false;
} // }
// console.log(this.equipmentList) // console.log(this.equipmentList)
}, },
@ -1526,6 +1526,13 @@ export default {
}, },
// //
async saveNumAll() { async saveNumAll() {
if((Number(this.formLeft.repairNum) + Number(this.formMiddle.repairNum)+ Number(this.formRight.scrapNum)) >this.disrepairNumTemp) {
this.$message({
message: '维修总数不能大于待维修数量',
type: 'warning'
})
return
}
let refTemp = []; let refTemp = [];
if(this.formLeft.repairNum!=0){ if(this.formLeft.repairNum!=0){
refTemp.push(this.$refs.formLeft) refTemp.push(this.$refs.formLeft)