新增了编辑可修改库存

This commit is contained in:
weipengfei 2023-09-28 14:05:07 +08:00
parent ed6bea9962
commit 250654511b

View File

@ -44,6 +44,13 @@
type: 'digit',
model: 'price',
holder: '请填写售价'
}, {
id: 10,
label: '库存',
type: 'digit',
model: 'stock',
holder: '请填写库存',
disable: true
}],
moreThanList: [{
id: 2,
@ -141,16 +148,16 @@
}
})
}
if (!this.$props.product_id) {
this.formList.push({
id: 10,
label: '库存',
type: 'digit',
model: 'stock',
holder: '请填写库存',
disable: true
})
}
// if (!this.$props.product_id) {
// this.formList.push({
// id: 10,
// label: '',
// type: 'digit',
// model: 'stock',
// holder: '',
// disable: true
// })
// }
},
destroyed() {
setStorage('singleSpecification', {});
@ -162,7 +169,8 @@
},
spliceMoreThan() {
this.moreThanFlag = true;
this.formList.splice(!this.$props.product_id?2:1, this.formList.length);
// this.formList.splice(!this.$props.product_id ? 2 : 1, this.formList.length);
this.formList.splice(2, this.formList.length);
},
input(val) {
this.singleSpecification = val