jf 5 лет назад
Родитель
Сommit
bd2f057390
1 измененных файлов с 6 добавлено и 2 удалено
  1. 6 2
      ghsApp/src/pagesPurchase/add.vue

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

@@ -229,14 +229,18 @@ export default {
 				if (val.index === 0) {
 					this.modalCancel();
 				} else {
-					if(this.customData.itemPrice==''){
+					if(this.customData.itemPrice<=0){
 						uni.showToast({title:"请输入总价格",icon:"none"})
 						return;
 					}
-					if(this.customData.bigCount==''&&this.customData.smallCount==''){
+					if(this.customData.bigCount<=0&&this.customData.smallCount<=0){
 						uni.showToast({title:"请输入花材数量",icon:"none"})
 						return;
 					}
+					if(this.customData.realityWeight<=0){
+						uni.showToast({title:"请输入花材重量",icon:"none"})
+						return;
+					}
 					// delAllEvent
 					//超过库存时 设置为库存最大值
 					this.updateItemEvent(this.customData);