jf 5 лет назад
Родитель
Сommit
7cedcef6a1
2 измененных файлов с 10 добавлено и 6 удалено
  1. 1 1
      ghsApp/src/admin/billing/index.vue
  2. 9 5
      ghsApp/src/mixins/product.js

+ 1 - 1
ghsApp/src/admin/billing/index.vue

@@ -130,7 +130,7 @@ export default {
 		return {
 			COMMODITY_TYPE,
 			isModel: false,
-			isSmallCount:true,//是否是小单位(支)
+			isSmallCount:false,//是否是小单位(支)
 			offVerifyRepertory:true,
 			customData: {
 				bigCount: 0,

+ 9 - 5
ghsApp/src/mixins/product.js

@@ -316,8 +316,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) {
@@ -379,9 +379,13 @@ 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 };}
+						// list[index] = { ...element, bigCount: --element.bigCount };
+					}
+					if (element.smallCount > 0) {
+						if(this.isSmallCount){list[index] = { ...element, smallCount: --element.smallCount };}
+
+						// list[index] = { ...element, smallCount: 0 };
 					}
 
 					if (this.isLimit) {