Ver Fonte

优化公斤数

jf há 5 anos atrás
pai
commit
935da2ad72

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

@@ -429,9 +429,11 @@ export default {
 					...info,
 					bigCount: 0, //扎数
 					smallCount: 0, //支数
-					autoPrice: 0 //调价价格
+					autoPrice: 0, //调价价格
+					realityWeight: 0 //调价价格
 				};
 				list.push(params);
+				console.log(list)
 				if(type!='noAdd'){
 					this.setSelectInfoByType({ type: this.pageType, info: list });
 				}
@@ -516,6 +518,7 @@ export default {
 						) {
 							list[index].bigCount = Number(item.bigNum);
 							list[index].smallCount = Number(item.smallNum);
+							list[index].realityWeight = Number(item.realityWeight),
 							list[index].itemPrice = item.itemPrice?Number(item.itemPrice):'';
 						}
 					}
@@ -533,6 +536,7 @@ export default {
 			}
 
 			this.setSelectInfoByType({ type: this.pageType, info: list });
+			console.log(this.selectList,'this.selectList')
 			// this.$forceUpdate();
 		},
 		/**

+ 2 - 0
ghsApp/src/pagesPurchase/add.vue

@@ -36,6 +36,7 @@
 								:bigCount=" getSelectItemById(productItem.id, classItem.classId).bigCount"
 								:smallCount="getSelectItemById(productItem.id, classItem.classId).smallCount"
 								:itemPrice="getSelectItemById(productItem.id, classItem.classId).itemPrice"
+								:realityWeight="getSelectItemById(productItem.id, classItem.classId).realityWeight"
 								@customNum="customNum"
 								@add="addEvent"
 								@addOneEvent="addCustomNumEvent"
@@ -190,6 +191,7 @@ export default {
 		//自定义数量
 		customNum(info) {
 			this.isModel = true;
+			console.log(info,'customData')
 			this.customData = info;
 			this.$nextTick(()=>{
 				// this.initAllInput();

+ 7 - 2
ghsApp/src/pagesPurchase/components/CommodityPurchase.vue

@@ -91,6 +91,9 @@ export default {
     itemPrice: {
       type: Number,
       default: 0
+    },realityWeight: {
+      type: Number,
+      default: 0
     },
   },
   data () {
@@ -129,7 +132,8 @@ export default {
           ...this.info,
           bigCount: this.bigCount,
           smallCount: this.smallCount,
-          itemPrice: this.itemPrice
+          itemPrice: this.itemPrice,
+										realityWeight: this.realityWeight
         };
         this.$emit("addOneEvent", this.info, params, 'noAdd');
       }
@@ -137,7 +141,8 @@ export default {
         ...this.info,
         bigCount: this.bigCount,
         smallCount: this.smallCount,
-        itemPrice: this.itemPrice
+        itemPrice: this.itemPrice,
+								realityWeight: this.realityWeight
       });
     }
   }