Commit 9b642a19 authored by 李苏's avatar 李苏 💬

调整

parent 45e3455f
......@@ -134,7 +134,18 @@
this.$refs.basePage.$refs.TablePager.tableData.forEach(item => {
if (item.packid == row.packid) {
/* 判定初始数量*/
this.jsbc(row.jhsl, this.sljl[row.packid], item)
if(!item.yfpsl){
item.yfpsl=0
}
console.log(parseFloat(row.jhsl),parseFloat(item.yfpsl),parseFloat(item.kcsl))
if(parseFloat(row.jhsl)>(parseFloat(item.yfpsl)+parseFloat(item.kcsl))){
this.$warning('分配数量超出库存')
row.jhsl=0
this.jsbc(0, this.sljl[row.packid], item)
}else{
this.jsbc(row.jhsl, this.sljl[row.packid], item)
}
}
})
......@@ -319,9 +330,7 @@
*/
jsbc(n, o, item) {
let slc = o - n
if(n>( parseFloat(item.yfpsl) + parseFloat(item.kcsl) )){
this.$warning('分配超出库存,请重新分配')
}
/* 数量记录为新*/
this.sljl[item.packid] = n
item.kcsl = item.kcsl + slc
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment