Explorar o código

优化选花材

zhengxin %!s(int64=5) %!d(string=hai) anos
pai
achega
dfb2a20fb2
Modificáronse 1 ficheiros con 6 adicións e 2 borrados
  1. 6 2
      ghs/src/mixins/product.js

+ 6 - 2
ghs/src/mixins/product.js

@@ -280,14 +280,18 @@ export default {
 						return ele.id == item.id;
 						return ele.id == item.id;
 					});
 					});
 				}
 				}
+
 				let params = {
 				let params = {
 					...info,
 					...info,
 					bigCount: 1, //扎数
 					bigCount: 1, //扎数
 					smallCount: 0, //支数
 					smallCount: 0, //支数
 					autoPrice: 0 //调价价格
 					autoPrice: 0 //调价价格
 				};
 				};
-
-				list.push(params);
+				if (info.bigNum && info.bigNum > 0) {
+					list.push(params);
+				} else {
+					this.$msg("库存不足");
+				}
 			}
 			}
 
 
 			this.setSelectInfoByType({ type: this.pageType, info: list });
 			this.setSelectInfoByType({ type: this.pageType, info: list });