shish 3 سال پیش
والد
کامیت
84fe06235e
1فایلهای تغییر یافته به همراه9 افزوده شده و 3 حذف شده
  1. 9 3
      hdApp/src/mixins/cgProduct.js

+ 9 - 3
hdApp/src/mixins/cgProduct.js

@@ -68,8 +68,9 @@ export default {
 			if (this.selectList) {
 			if (this.selectList) {
 				for (const item of this.selectList) {
 				for (const item of this.selectList) {
 					const itemInfo = this.getSelectItemById(item.id, item.classId);
 					const itemInfo = this.getSelectItemById(item.id, item.classId);
-					if ( itemInfo && !this.$util.isEmpty(itemInfo.bigPrice)) {
+					if ( itemInfo && !this.$util.isEmpty(itemInfo.bigPrice) && !this.$util.isEmpty(itemInfo.smallPrice) ) {
 						price += item.bigCount * Number(itemInfo.bigPrice);
 						price += item.bigCount * Number(itemInfo.bigPrice);
+						price += item.smallCount * Number(itemInfo.smallPrice);
 					}
 					}
 				}
 				}
 			}
 			}
@@ -80,8 +81,13 @@ export default {
 			if (this.selectList) {
 			if (this.selectList) {
 				for (const item of this.selectList) {
 				for (const item of this.selectList) {
 					const itemInfo = this.getSelectItemById(item.id, item.classId);
 					const itemInfo = this.getSelectItemById(item.id, item.classId);
-					if ( itemInfo && !this.$util.isEmpty(itemInfo.bigPrice) ) {
-						price += item.bigCount * Number(itemInfo.bigPrice)
+					if (
+						itemInfo &&
+						!this.$util.isEmpty(itemInfo.bigPrice) &&
+						!this.$util.isEmpty(itemInfo.smallPrice)
+					) {
+						price += item.bigCount * Number(itemInfo.bigPrice);
+						price += item.smallCount * Number(itemInfo.smallPrice);
 					}
 					}
 				}
 				}
 			}
 			}