فهرست منبع

app 花材列表待完成

shish 4 سال پیش
والد
کامیت
e3f358507f
2فایلهای تغییر یافته به همراه19 افزوده شده و 7 حذف شده
  1. 2 1
      ghsApp/src/admin/billing/index.vue
  2. 17 6
      ghsApp/src/components/module/app-commodity.vue

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

@@ -30,7 +30,8 @@
 									:checkStock="true"
 									:pageType="pageType"
 									:info="productItem"
-									:storeItem="getSelectItemById(productItem.id, classItem.classId)"
+									:classItem="classItem"
+									:selectList="selectList"
 									@showAddModel="showAddModel"
 									@add="addEvent"
 									@groupDataBeforeShowModel="groupInfoBeforeShowModel"

+ 17 - 6
ghsApp/src/components/module/app-commodity.vue

@@ -37,10 +37,16 @@ export default {
 				return {};
 			}
 		},
-		storeItem:{
+		classItem: {
 			type: Object,
 			default() {
-				return {bigCount:0,smallCount:0,userPrice:0};
+				return {};
+			}
+		},
+		selectList: {
+			type: Array,
+			default() {
+				return []
 			}
 		},
 		scrollTop: {
@@ -94,10 +100,15 @@ export default {
 		this.showPrice = this.info.priceLabel==1?null:this.info.price
 		this.oldPrice = (Number(this.info.cost) + Number(this.info.addPrice)).toFixed(2)
 
-		this.bigCount = this.storeItem.bigCount
-		this.smallCount = this.storeItem.smallCount
-		this.userPrice = this.storeItem.userPrice
-
+		let newList = this.selectList
+		if(!this.$util.isEmpty(newList)){
+			const item = newList && newList.find(ele => { return ele.id == this.info.id && ele.classId == this.classItem.classId })
+			if (item) {
+				this.bigCount = item.bigCount
+				this.smallCount = item.smallCount
+				this.userPrice = item.userPrice
+			}				
+		}
 	},
 	methods: {
 		addEvents(variety) {