|
|
@@ -146,8 +146,15 @@ export default {
|
|
|
},
|
|
|
//选择商品总数
|
|
|
allCount() {
|
|
|
- // console.log(444444, this.selectList);
|
|
|
- return this.selectList.length;
|
|
|
+ let bigLength = 0;
|
|
|
+ let smallLength = 0;
|
|
|
+ if (this.selectList) {
|
|
|
+ for (const item of this.selectList) {
|
|
|
+ bigLength += item.bigCount
|
|
|
+ smallLength += item.smallCount
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return {bigLength:bigLength,smallLength:smallLength,};
|
|
|
},
|
|
|
/**
|
|
|
* 描点-定位分类
|
|
|
@@ -396,17 +403,32 @@ export default {
|
|
|
if (element.id == item.id && element.classId == item.classId) {
|
|
|
has = true;
|
|
|
if(this.offVerifyRepertory){//盘点页面没有库存验证
|
|
|
- list[index] = { ...element, bigCount: ++element.bigCount };
|
|
|
+ if(this.isSmallCount){
|
|
|
+ list[index] = { ...element, smallCount: ++element.smallCount };
|
|
|
+ }else{
|
|
|
+ list[index] = { ...element, bigCount: ++element.bigCount };
|
|
|
+ }
|
|
|
+ // list[index] = { ...element, bigCount: ++element.bigCount };
|
|
|
}else {
|
|
|
if (this.isLimit) {
|
|
|
if (element.bigCount < item.bigNum) {
|
|
|
- list[index] = {...element, bigCount: ++element.bigCount};
|
|
|
+ if(this.isSmallCount){
|
|
|
+ list[index] = { ...element, smallCount: ++element.smallCount };
|
|
|
+ }else{
|
|
|
+ list[index] = { ...element, bigCount: ++element.bigCount };
|
|
|
+ }
|
|
|
+ // list[index] = {...element, bigCount: ++element.bigCount};
|
|
|
}
|
|
|
// else if (element.smallCount < item.smallNum) {
|
|
|
// list[index] = { ...element, smallCount: ++element.smallCount };
|
|
|
// }
|
|
|
} else {
|
|
|
- list[index] = {...element, bigCount: ++element.bigCount};
|
|
|
+ if(this.isSmallCount){
|
|
|
+ list[index] = { ...element, smallCount: ++element.smallCount };
|
|
|
+ }else{
|
|
|
+ list[index] = { ...element, bigCount: ++element.bigCount };
|
|
|
+ }
|
|
|
+ // list[index] = {...element, bigCount: ++element.bigCount};
|
|
|
}
|
|
|
if (this.isLimit) {
|
|
|
const {bigCount, smallCount} = list[index];
|
|
|
@@ -441,8 +463,8 @@ export default {
|
|
|
|
|
|
let params = {
|
|
|
...info,
|
|
|
- bigCount: 1, //扎数
|
|
|
- smallCount: 0, //支数
|
|
|
+ bigCount: this.isSmallCount?0:1, //扎数
|
|
|
+ smallCount: this.isSmallCount?1:0, //支数
|
|
|
autoPrice: 0 //调价价格
|
|
|
};
|
|
|
if (info.bigNum && info.bigNum > 0) {
|
|
|
@@ -503,9 +525,10 @@ export default {
|
|
|
has = true;
|
|
|
|
|
|
if (element.bigCount > 0) {
|
|
|
- list[index] = { ...element, bigCount: --element.bigCount };
|
|
|
- } else if (element.smallCount > 0) {
|
|
|
- list[index] = { ...element, smallCount: 0 };
|
|
|
+ if(!this.isSmallCount){list[index] = { ...element, bigCount: --element.bigCount };}
|
|
|
+ }
|
|
|
+ if (element.smallCount > 0) {
|
|
|
+ if(this.isSmallCount){list[index] = { ...element, smallCount: --element.smallCount };}
|
|
|
}
|
|
|
|
|
|
if (this.isLimit) {
|