Răsfoiți Sursa

无价格管理

shish 11 luni în urmă
părinte
comite
de0cacabd9
1 a modificat fișierele cu 11 adăugiri și 1 ștergeri
  1. 11 1
      hdApp/src/mixins/hs.js

+ 11 - 1
hdApp/src/mixins/hs.js

@@ -332,6 +332,13 @@ export default {
 					}
 				}else{
 					if(calc == 'add'){
+
+						//无价格商品,没有设置userPrice时,不能一个一个添加,只能弹框方式添加
+						if(item.priceType == 0 && (this.$util.isEmpty(item.userPrice) || Number(item.userPrice) == 0)){
+							this.$msg("无价格商品")
+							return
+						}
+
 						item.bigCount++
 					}
 					if(calc == 'sub'){
@@ -482,7 +489,10 @@ export default {
 				this.customData.bigCount = this.customData.bigCount==0?null:this.customData.bigCount;
 				if(this.selectJobType == 'bill'){
 					if(this.customData.userPrice == null || this.customData.userPrice == 0){
-						this.customData.userPrice =	parseFloat(this.customData.bigPrice)
+						//有价格的才把价格显示上去
+						if(this.customData.priceType == 1){
+							this.customData.userPrice =	parseFloat(this.customData.bigPrice)
+						}
 					}
 				}else{
 					this.customData.userPrice = this.customData.userPrice==0 ? null : parseFloat(this.customData.userPrice)