fix:玻纤原料入库时form表单修改数字后没有删除原来的编码

This commit is contained in:
shijing 2025-02-27 11:29:29 +08:00
parent 20957213a4
commit 770edefcb9
1 changed files with 18 additions and 9 deletions

View File

@ -453,16 +453,26 @@ export default {
},
countChange(){
if(this.project_code=='bxerp'){
let numbers = this.mioitems[0];
if(this.form.count>this.mioitems.length){
let count = this.form.count-this.mioitems.length;
for(let i=0;i<count;i++){
this.mioitems.push('');
this.mioitems = [];
for(let i=0;i<this.form.count;i++){
if(numbers!=''&&numbers!=null&&numbers!=undefined){
this.mioitems[i] = Number(numbers)+i;
}else{
this.mioitems[i] = '';
}
}
}else if(this.form.count<this.mioitems.length){
this.mioitems = [];
for(let i=0;i<this.form.count;i++){
if(numbers!=''&&numbers!=null&&numbers!=undefined){
this.mioitems[i] = Number(numbers)+i;
}else{
this.mioitems[i] = '';
}
}
}else{
this.mioitems.slice(this.form.count);
}
}else{
}
},
firstNumberChange(){
@ -499,8 +509,7 @@ export default {
this.form.mioitemw = mioitemw;
}
try {
var res;
console.log(this.form);
let res;
if (this.mode == "add") {
res = await this.$API.inm.mioitem.create.req(
this.form