|
@@ -84,6 +84,7 @@
|
|
this.stock = JSON.parse(JSON.stringify(data))
|
|
this.stock = JSON.parse(JSON.stringify(data))
|
|
this.tableData = JSON.parse(JSON.stringify(data.chennelStock))
|
|
this.tableData = JSON.parse(JSON.stringify(data.chennelStock))
|
|
this.allData = JSON.parse(JSON.stringify(allData))
|
|
this.allData = JSON.parse(JSON.stringify(allData))
|
|
|
|
+ this.title = "渠道默认库存设置" + `(可售库存:${this.stock.stock})`
|
|
},
|
|
},
|
|
/** 票务信息 */
|
|
/** 票务信息 */
|
|
async saveCommonConfigFun(value){
|
|
async saveCommonConfigFun(value){
|
|
@@ -111,11 +112,11 @@
|
|
async submitForm() {
|
|
async submitForm() {
|
|
let count = 0
|
|
let count = 0
|
|
this.tableData.forEach((item,index)=>{
|
|
this.tableData.forEach((item,index)=>{
|
|
- count = count + (item.stock?item.stock:0)
|
|
|
|
|
|
+ count = count + (item.stock?item.stock:0) + (item.soldNum?item.soldNum:0)
|
|
})
|
|
})
|
|
console.log("count====",count)
|
|
console.log("count====",count)
|
|
- if(this.stock.stock < count) {
|
|
|
|
- this.$message.error("库存总合不能大于可售库存!");
|
|
|
|
|
|
+ if( this.stock.stock < count ) {
|
|
|
|
+ this.$message.error("渠道在售库存和已售数量总合不能大于总库存!");
|
|
return
|
|
return
|
|
}
|
|
}
|
|
let params = JSON.parse(JSON.stringify(this.allData))
|
|
let params = JSON.parse(JSON.stringify(this.allData))
|