Browse Source

Merge branch 'master' of http://git.huaml.com/zhh/front-end

wangning 5 years ago
parent
commit
130571a416
45 changed files with 200 additions and 120 deletions
  1. 0 0
      ghsApp/dist/build/mp-weixin/admin/billing/index.js
  2. 0 0
      ghsApp/dist/build/mp-weixin/admin/billing/index.wxml
  3. 0 0
      ghsApp/dist/build/mp-weixin/admin/billing/index.wxss
  4. 2 2
      ghsApp/dist/build/mp-weixin/admin/clear/customOrderItem.json
  5. 2 2
      ghsApp/dist/build/mp-weixin/admin/clear/orderItem.json
  6. 2 2
      ghsApp/dist/build/mp-weixin/admin/home/components/module/operate-line.json
  7. 2 2
      ghsApp/dist/build/mp-weixin/admin/home/components/plugin/time-axis.json
  8. 2 2
      ghsApp/dist/build/mp-weixin/admin/home/components/plugin/timeaxis-item.json
  9. 0 0
      ghsApp/dist/build/mp-weixin/admin/shop/print.js
  10. 1 1
      ghsApp/dist/build/mp-weixin/admin/shop/print.wxml
  11. 1 1
      ghsApp/dist/build/mp-weixin/admin/shop/print.wxss
  12. 0 1
      ghsApp/dist/build/mp-weixin/admin/shopAdmin/bind.wxss
  13. 0 1
      ghsApp/dist/build/mp-weixin/admin/staff/sel-member.wxss
  14. 0 1
      ghsApp/dist/build/mp-weixin/admin/statistics/demo.wxss
  15. 0 0
      ghsApp/dist/build/mp-weixin/common/vendor.js
  16. 2 2
      ghsApp/dist/build/mp-weixin/components/app-date-picker.json
  17. 2 2
      ghsApp/dist/build/mp-weixin/components/module/allSelectInput.json
  18. 0 0
      ghsApp/dist/build/mp-weixin/components/module/app-commodity.js
  19. 0 0
      ghsApp/dist/build/mp-weixin/components/module/app-commodity.wxml
  20. 0 0
      ghsApp/dist/build/mp-weixin/components/module/app-commodity.wxss
  21. 2 2
      ghsApp/dist/build/mp-weixin/components/module/app-search.json
  22. 2 2
      ghsApp/dist/build/mp-weixin/components/module/app-vip.json
  23. 2 2
      ghsApp/dist/build/mp-weixin/components/plugin/alert.json
  24. 2 2
      ghsApp/dist/build/mp-weixin/components/plugin/dropdown-list.json
  25. 2 2
      ghsApp/dist/build/mp-weixin/components/plugin/fab.json
  26. 2 2
      ghsApp/dist/build/mp-weixin/pagesOrder/components/stepStatus.json
  27. 0 0
      ghsApp/dist/build/mp-weixin/pagesPurchase/add.js
  28. 0 0
      ghsApp/dist/build/mp-weixin/pagesPurchase/add.wxml
  29. 0 0
      ghsApp/dist/build/mp-weixin/pagesPurchase/add.wxss
  30. 0 1
      ghsApp/dist/build/mp-weixin/pagesStore/me/rechargeList.wxss
  31. 0 1
      ghsApp/dist/build/mp-weixin/pagesStore/me/withdraw.wxss
  32. 0 0
      ghsApp/dist/build/mp-weixin/pagesStorehouse/allot/exSelect.js
  33. 0 0
      ghsApp/dist/build/mp-weixin/pagesStorehouse/allot/exSelect.wxml
  34. 0 0
      ghsApp/dist/build/mp-weixin/pagesStorehouse/allot/exSelect.wxss
  35. 0 0
      ghsApp/dist/build/mp-weixin/pagesStorehouse/inventory/select.js
  36. 0 0
      ghsApp/dist/build/mp-weixin/pagesStorehouse/inventory/select.wxml
  37. 0 0
      ghsApp/dist/build/mp-weixin/pagesStorehouse/inventory/select.wxss
  38. 39 22
      ghsApp/src/admin/billing/index.vue
  39. 7 2
      ghsApp/src/components/module/app-commodity.vue
  40. 6 6
      ghsApp/src/mixins/product.js
  41. 11 2
      ghsApp/src/pagesPurchase/add.vue
  42. 39 27
      ghsApp/src/pagesStorehouse/allot/exSelect.vue
  43. 17 5
      ghsApp/src/pagesStorehouse/inventory/select.vue
  44. 22 5
      hdApp/src/admin/billing/index.vue
  45. 31 18
      hdApp/src/pagesPurchase/ghsProduct.vue

File diff suppressed because it is too large
+ 0 - 0
ghsApp/dist/build/mp-weixin/admin/billing/index.js


File diff suppressed because it is too large
+ 0 - 0
ghsApp/dist/build/mp-weixin/admin/billing/index.wxml


File diff suppressed because it is too large
+ 0 - 0
ghsApp/dist/build/mp-weixin/admin/billing/index.wxss


+ 2 - 2
ghsApp/dist/build/mp-weixin/admin/clear/customOrderItem.json

@@ -1,4 +1,4 @@
 {
-  "component": true,
-  "usingComponents": {}
+  "usingComponents": {},
+  "component": true
 }

+ 2 - 2
ghsApp/dist/build/mp-weixin/admin/clear/orderItem.json

@@ -1,4 +1,4 @@
 {
-  "usingComponents": {},
-  "component": true
+  "component": true,
+  "usingComponents": {}
 }

+ 2 - 2
ghsApp/dist/build/mp-weixin/admin/home/components/module/operate-line.json

@@ -1,4 +1,4 @@
 {
-  "component": true,
-  "usingComponents": {}
+  "usingComponents": {},
+  "component": true
 }

+ 2 - 2
ghsApp/dist/build/mp-weixin/admin/home/components/plugin/time-axis.json

@@ -1,4 +1,4 @@
 {
-  "component": true,
-  "usingComponents": {}
+  "usingComponents": {},
+  "component": true
 }

+ 2 - 2
ghsApp/dist/build/mp-weixin/admin/home/components/plugin/timeaxis-item.json

@@ -1,4 +1,4 @@
 {
-  "component": true,
-  "usingComponents": {}
+  "usingComponents": {},
+  "component": true
 }

File diff suppressed because it is too large
+ 0 - 0
ghsApp/dist/build/mp-weixin/admin/shop/print.js


+ 1 - 1
ghsApp/dist/build/mp-weixin/admin/shop/print.wxml

@@ -1 +1 @@
-<view class="app-content _div data-v-48116213"><view hidden="{{!(showStaffArea)}}" class="_div data-v-48116213"><form data-event-opts="{{[['submit',[['formSubmit',['$event']]]],['reset',[['formReset',['$event']]]]]}}" bindsubmit="__e" bindreset="__e" class="data-v-48116213"><view class="module-com input-line-wrap _div data-v-48116213"><tui-list-cell class="line-cell data-v-48116213" vue-id="5beec2b8-1" hover="{{false}}" bind:__l="__l" vue-slots="{{['default']}}"><view class="tui-title _div data-v-48116213">编号(SN)</view><input class="tui-input data-v-48116213" placeholder-class="phcolor" name="printSn" placeholder="请填写编号" maxlength="50" type="number" data-event-opts="{{[['input',[['__set_model',['$0','printSn','$event',[]],['form']]]]]}}" value="{{form.printSn}}" bindinput="__e"/></tui-list-cell><tui-list-cell class="line-cell data-v-48116213" vue-id="5beec2b8-2" hover="{{false}}" bind:__l="__l" vue-slots="{{['default']}}"><view class="tui-title _div data-v-48116213">密钥(KEY)</view><input class="tui-input data-v-48116213" placeholder-class="phcolor" name="printKey" placeholder="请填写密钥" maxlength="50" type="text" data-event-opts="{{[['input',[['__set_model',['$0','printKey','$event',[]],['form']]]]]}}" value="{{form.printKey}}" bindinput="__e"/></tui-list-cell></view><view class="confirm-btn _div data-v-48116213"><button class="admin-button-com big blue data-v-48116213" formType="submit">提交</button></view></form></view></view>
+<view class="app-content _div data-v-12e8de8a"><view hidden="{{!(showStaffArea)}}" class="_div data-v-12e8de8a"><form data-event-opts="{{[['submit',[['formSubmit',['$event']]]],['reset',[['formReset',['$event']]]]]}}" bindsubmit="__e" bindreset="__e" class="data-v-12e8de8a"><view class="module-com input-line-wrap _div data-v-12e8de8a"><tui-list-cell class="line-cell data-v-12e8de8a" vue-id="5beec2b8-1" hover="{{false}}" bind:__l="__l" vue-slots="{{['default']}}"><view class="tui-title _div data-v-12e8de8a">编号(SN):</view><input class="tui-input data-v-12e8de8a" placeholder-class="phcolor" name="printSn" placeholder="请填写编号" maxlength="50" type="number" data-event-opts="{{[['input',[['__set_model',['$0','printSn','$event',[]],['form']]]]]}}" value="{{form.printSn}}" bindinput="__e"/></tui-list-cell><tui-list-cell class="line-cell data-v-12e8de8a" vue-id="5beec2b8-2" hover="{{false}}" bind:__l="__l" vue-slots="{{['default']}}"><view class="tui-title _div data-v-12e8de8a">密钥(KEY):</view><input class="tui-input data-v-12e8de8a" placeholder-class="phcolor" name="printKey" placeholder="请填写密钥" maxlength="50" type="text" data-event-opts="{{[['input',[['__set_model',['$0','printKey','$event',[]],['form']]]]]}}" value="{{form.printKey}}" bindinput="__e"/></tui-list-cell></view><view class="confirm-btn _div data-v-12e8de8a"><button class="admin-button-com big blue data-v-12e8de8a" formType="submit">提交</button></view></form></view></view>

+ 1 - 1
ghsApp/dist/build/mp-weixin/admin/shop/print.wxss

@@ -1 +1 @@
-.app-content.data-v-48116213{min-height:calc(100vh - 20rpx);padding-top:20rpx}.prompt-text.data-v-48116213{color:#999;padding-left:30rpx;margin-bottom:30rpx}.module-com.data-v-48116213{margin-bottom:20rpx}.module-com .member-wrap .member-det.data-v-48116213{font-size:24rpx;margin-left:20rpx}.module-com .remark-wrap.data-v-48116213{-webkit-box-align:start;-webkit-align-items:flex-start;align-items:flex-start}.module-com .remark-wrap .remark.data-v-48116213{height:240rpx}.confirm-btn.data-v-48116213{width:calc(100% - 60rpx);margin:60rpx 30rpx 20rpx}.confirm-btn .admin-button-com.data-v-48116213{width:100%}
+.app-content.data-v-12e8de8a{min-height:calc(100vh - 20rpx);padding-top:20rpx}.prompt-text.data-v-12e8de8a{color:#999;padding-left:30rpx;margin-bottom:30rpx}.module-com.data-v-12e8de8a{margin-bottom:20rpx}.module-com .member-wrap .member-det.data-v-12e8de8a{font-size:24rpx;margin-left:20rpx}.module-com .remark-wrap.data-v-12e8de8a{-webkit-box-align:start;-webkit-align-items:flex-start;align-items:flex-start}.module-com .remark-wrap .remark.data-v-12e8de8a{height:240rpx}.confirm-btn.data-v-12e8de8a{width:calc(100% - 60rpx);margin:60rpx 30rpx 20rpx}.confirm-btn .admin-button-com.data-v-12e8de8a{width:100%}

+ 0 - 1
ghsApp/dist/build/mp-weixin/admin/shopAdmin/bind.wxss

@@ -1 +0,0 @@
-/* admin/shopAdmin/bind.wxss */

+ 0 - 1
ghsApp/dist/build/mp-weixin/admin/staff/sel-member.wxss

@@ -1 +0,0 @@
-/* admin/staff/sel-member.wxss */

+ 0 - 1
ghsApp/dist/build/mp-weixin/admin/statistics/demo.wxss

@@ -1 +0,0 @@
-/* admin/statistics/demo.wxss */

File diff suppressed because it is too large
+ 0 - 0
ghsApp/dist/build/mp-weixin/common/vendor.js


+ 2 - 2
ghsApp/dist/build/mp-weixin/components/app-date-picker.json

@@ -1,4 +1,4 @@
 {
-  "usingComponents": {},
-  "component": true
+  "component": true,
+  "usingComponents": {}
 }

+ 2 - 2
ghsApp/dist/build/mp-weixin/components/module/allSelectInput.json

@@ -1,4 +1,4 @@
 {
-  "component": true,
-  "usingComponents": {}
+  "usingComponents": {},
+  "component": true
 }

File diff suppressed because it is too large
+ 0 - 0
ghsApp/dist/build/mp-weixin/components/module/app-commodity.js


File diff suppressed because it is too large
+ 0 - 0
ghsApp/dist/build/mp-weixin/components/module/app-commodity.wxml


File diff suppressed because it is too large
+ 0 - 0
ghsApp/dist/build/mp-weixin/components/module/app-commodity.wxss


+ 2 - 2
ghsApp/dist/build/mp-weixin/components/module/app-search.json

@@ -1,4 +1,4 @@
 {
-  "component": true,
-  "usingComponents": {}
+  "usingComponents": {},
+  "component": true
 }

+ 2 - 2
ghsApp/dist/build/mp-weixin/components/module/app-vip.json

@@ -1,4 +1,4 @@
 {
-  "component": true,
-  "usingComponents": {}
+  "usingComponents": {},
+  "component": true
 }

+ 2 - 2
ghsApp/dist/build/mp-weixin/components/plugin/alert.json

@@ -1,4 +1,4 @@
 {
-  "component": true,
-  "usingComponents": {}
+  "usingComponents": {},
+  "component": true
 }

+ 2 - 2
ghsApp/dist/build/mp-weixin/components/plugin/dropdown-list.json

@@ -1,4 +1,4 @@
 {
-  "usingComponents": {},
-  "component": true
+  "component": true,
+  "usingComponents": {}
 }

+ 2 - 2
ghsApp/dist/build/mp-weixin/components/plugin/fab.json

@@ -1,4 +1,4 @@
 {
-  "component": true,
-  "usingComponents": {}
+  "usingComponents": {},
+  "component": true
 }

+ 2 - 2
ghsApp/dist/build/mp-weixin/pagesOrder/components/stepStatus.json

@@ -1,4 +1,4 @@
 {
-  "component": true,
-  "usingComponents": {}
+  "usingComponents": {},
+  "component": true
 }

File diff suppressed because it is too large
+ 0 - 0
ghsApp/dist/build/mp-weixin/pagesPurchase/add.js


File diff suppressed because it is too large
+ 0 - 0
ghsApp/dist/build/mp-weixin/pagesPurchase/add.wxml


File diff suppressed because it is too large
+ 0 - 0
ghsApp/dist/build/mp-weixin/pagesPurchase/add.wxss


+ 0 - 1
ghsApp/dist/build/mp-weixin/pagesStore/me/rechargeList.wxss

@@ -1 +0,0 @@
-/* pagesStore/me/rechargeList.wxss */

+ 0 - 1
ghsApp/dist/build/mp-weixin/pagesStore/me/withdraw.wxss

@@ -1 +0,0 @@
-/* pagesStore/me/withdraw.wxss */

File diff suppressed because it is too large
+ 0 - 0
ghsApp/dist/build/mp-weixin/pagesStorehouse/allot/exSelect.js


File diff suppressed because it is too large
+ 0 - 0
ghsApp/dist/build/mp-weixin/pagesStorehouse/allot/exSelect.wxml


File diff suppressed because it is too large
+ 0 - 0
ghsApp/dist/build/mp-weixin/pagesStorehouse/allot/exSelect.wxss


File diff suppressed because it is too large
+ 0 - 0
ghsApp/dist/build/mp-weixin/pagesStorehouse/inventory/select.js


File diff suppressed because it is too large
+ 0 - 0
ghsApp/dist/build/mp-weixin/pagesStorehouse/inventory/select.wxml


File diff suppressed because it is too large
+ 0 - 0
ghsApp/dist/build/mp-weixin/pagesStorehouse/inventory/select.wxss


+ 39 - 22
ghsApp/src/admin/billing/index.vue

@@ -155,33 +155,50 @@ export default {
 		modalCancel() {
 			this.isModel = false;
 			this.customData = {};
-		}, // 取消 确认
+		},
+		// 取消 确认
 		affirm(val) {
-				if(this.customData.bigCount==0 && this.customData.smallCount==0){
-					this.delAllEvent(this.customData)}
+
 				if (val.index === 0) {
+					this.delAllEvent(this.customData)
 					this.modalCancel();
-				} else {
-					const { bigCount,smallCount,bigNum,bigUnit,smallNum,smallUnit,ratio} = this.customData;
-					const ratioNum = Number(ratio);
-					//超过库存时 设置为库存最大值 1
-					if (Number(bigCount) * ratioNum + Number(smallCount) > Number(bigNum) * ratioNum + Number(smallNum)) {
-						uni.showToast({
-							// title: `库存只有${bigNum}${bigUnit}${smallNum}${smallUnit}`,
-							title: '库存不足',
-							icon: "none"
-						});
-						this.customData.bigCount = 0;
-						this.customData.smallCount = 0;
-						this.delAllEvent(this.customData)
-					} else {
-						this.updateItemEvent(this.customData);
-						this.modalCancel();
-					}
-					// this.updateItemEvent(this.customData);
-					// this.modalCancel();
+					return false
+				}
+
+				if(this.customData.bigCount==null && this.customData.smallCount==null){
+					this.delAllEvent(this.customData)
+					uni.showToast({title: '请填写数量',icon: "none"})
+					return false
 				}
 
+				if(this.customData.bigCount==0 && this.customData.smallCount==0){
+					this.delAllEvent(this.customData)
+					uni.showToast({title: '请填写数量',icon: "none"})
+					return false
+				}
+				if(this.customData.bigCount<0 || this.customData.smallCount<0){
+					this.delAllEvent(this.customData)
+					uni.showToast({title: '数量填写错误',icon: "none"})
+					return false
+				}
+				 
+				const { bigCount,smallCount,bigNum,bigUnit,smallNum,smallUnit,ratio} = this.customData;
+				const ratioNum = Number(ratio);
+				//超过库存时 设置为库存最大值 1
+				if (Number(bigCount) * ratioNum + Number(smallCount) > Number(bigNum) * ratioNum + Number(smallNum)) {
+					uni.showToast({
+						title: '库存不足',
+						icon: "none"
+					});
+					this.customData.bigCount = 0;
+					this.customData.smallCount = 0;
+					this.delAllEvent(this.customData)
+				} else {
+					this.updateItemEvent(this.customData);
+					this.modalCancel();
+				}
+				// this.updateItemEvent(this.customData);
+				// this.modalCancel();
 
 		},
 		cancelEvent() {

+ 7 - 2
ghsApp/src/components/module/app-commodity.vue

@@ -218,19 +218,24 @@ export default {
 
 		},
 		customNum() {
-			// if(!this.info.bigCount){
 			if(this.offVerifyRepertory){
-				if(this.info.stock<=0){uni.showToast({title:'库存不足',icon:'none'});return;}
+				if(this.info.stock<=0){
+					uni.showToast({title:'库存不足',icon:'none'})
+					return;
+				}
 			}
 
 			if(!this.bigCount && !this.smallCount){
+				
 				let params = {
 					...this.info,
 					bigCount: this.bigCount,
 					smallCount: this.smallCount
 				};
+
 				this.$emit("addOneEvent", this.info,params);
 			}
+			
 			this.$emit("customNum", {
 				...this.info,
 				bigCount: this.bigCount,

+ 6 - 6
ghsApp/src/mixins/product.js

@@ -386,9 +386,8 @@ export default {
 		},
 
 		addCustomNumEvent(item,params1,type) {
-			const list = this.selectList;
+				const list = this.selectList;
 
-			// if (!has) {}
 				let info = { classId: item.classId, id: item.id };
 
 				const classInfo =
@@ -414,10 +413,10 @@ export default {
 				if(type!='noAdd'){
 					this.setSelectInfoByType({ type: this.pageType, info: list });
 				}
-			this.$nextTick(()=>{
-				this.customNum(params1)
-			})
-			// this.$forceUpdate();
+				this.$nextTick(()=>{
+					this.customNum(params1)
+				})
+				// this.$forceUpdate();
 		},
 		/**
 		 * 减去商品
@@ -451,6 +450,7 @@ export default {
 			}else{
 				for (let index = 0; index < list.length; index++) {
 					const element = list[index];
+					console.log("element.id == item.id ",element.id ,item.id )
 					if (element.id == item.id ) {
 						list.splice(index, 1);
 						break;

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

@@ -229,24 +229,33 @@ export default {
 				console.log('customData',this.customData);
 				console.log('val.index',val.index);
 				if (val.index === 3) {
-					this.modalCancel();
 					this.delAllEvent(this.customData);
+					this.modalCancel();
 					return
 				}
 				if(this.customData.bigCount==0 && this.customData.smallCount==0){
 					this.delAllEvent(this.customData)}
 
 				if (val.index === 0) {
+					this.delAllEvent(this.customData);
 					this.modalCancel();
 				} else {
 					if(this.customData.itemPrice<=0){
 						uni.showToast({title:"请输入总价格",icon:"none"})
 						return;
 					}
-					if(this.customData.bigCount<=0&&this.customData.smallCount<=0){
+					if(this.customData.bigCount==0&&this.customData.smallCount==0){
+						uni.showToast({title:"请输入花材数量",icon:"none"})
+						return;
+					}
+					if(this.customData.bigCount==null&&this.customData.smallCount==null){
 						uni.showToast({title:"请输入花材数量",icon:"none"})
 						return;
 					}
+					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;

+ 39 - 27
ghsApp/src/pagesStorehouse/allot/exSelect.vue

@@ -201,35 +201,47 @@ export default {
 			this.isFocus = false;
 			this.isFocusOne = false;
 			this.$nextTick(()=>{
-				if(this.customData.bigCount==0 && this.customData.smallCount==0){
-					this.delAllEvent(this.customData)}
+				//取消操作
 				if (val.index === 0) {
-					this.modalCancel();
-				} else {
-					this.updateItemEvent(this.customData);
-					this.modalCancel();
-					// const {
-					// 	bigCount,
-					// 	smallCount,
-					// 	bigNum,
-					// 	bigUnit,
-					// 	smallNum,
-					// 	smallUnit,
-					// 	ratio
-					// } = this.customData;
-					// const ratioNum = Number(ratio);
-					//
-					// //超过库存时 设置为库存最大值
-					// if (Number(bigCount) * ratioNum + Number(smallCount) > Number(bigNum) * ratioNum + Number(smallNum)) {
-					// 	uni.showToast({title: `库存只有${bigNum}${bigUnit}${smallNum}${smallUnit}`,icon: "none"});
-					// 	this.customData.bigCount = 0;
-					// 	this.customData.smallCount = 0;
-					// 	this.delAllEvent(this.customData)
-					// } else {
-					// 	this.updateItemEvent(this.customData);
-					// 	this.modalCancel();
-					// }
+					this.delAllEvent(this.customData)
+					this.modalCancel()
+					return false
+				}
+				if(this.customData.bigCount==0 && this.customData.smallCount==0){
+					uni.showToast({title:"请输入花材数量",icon:"none"})
+					return
+				}
+				if(this.customData.bigCount==null && this.customData.smallCount==null){
+					uni.showToast({title:"请输入花材数量",icon:"none"})
+					return
+				}
+				if(this.customData.bigCount<0 || this.customData.smallCount<0){
+					uni.showToast({title:"请输入花材数量",icon:"none"})
+					return
 				}
+				this.updateItemEvent(this.customData);
+				this.modalCancel();
+				// const {
+				// 	bigCount,
+				// 	smallCount,
+				// 	bigNum,
+				// 	bigUnit,
+				// 	smallNum,
+				// 	smallUnit,
+				// 	ratio
+				// } = this.customData;
+				// const ratioNum = Number(ratio);
+				//
+				// //超过库存时 设置为库存最大值
+				// if (Number(bigCount) * ratioNum + Number(smallCount) > Number(bigNum) * ratioNum + Number(smallNum)) {
+				// 	uni.showToast({title: `库存只有${bigNum}${bigUnit}${smallNum}${smallUnit}`,icon: "none"});
+				// 	this.customData.bigCount = 0;
+				// 	this.customData.smallCount = 0;
+				// 	this.delAllEvent(this.customData)
+				// } else {
+				// 	this.updateItemEvent(this.customData);
+				// 	this.modalCancel();
+				// }
 			})
 
 		},

+ 17 - 5
ghsApp/src/pagesStorehouse/inventory/select.vue

@@ -204,14 +204,26 @@ export default {
 			this.isFocus = false;
 			this.isFocusOne = false;
 			this.$nextTick(()=>{
-				if(this.customData.bigCount==0 && this.customData.smallCount==0){
-					this.delAllEvent(this.customData)}
 				if (val.index === 0) {
+					this.delAllEvent(this.customData)
 					this.modalCancel();
-				} else {
-					this.updateItemEvent(this.customData);
-					this.modalCancel();
+					return;
+				}
+				if(this.customData.bigCount==0 && this.customData.smallCount==0){
+					uni.showToast({title:"请输入花材数量",icon:"none"})
+					return;
+				}
+				if(this.customData.bigCount==null && this.customData.smallCount==null){
+					uni.showToast({title:"请输入花材数量",icon:"none"})
+					return;
+				}
+				if(this.customData.bigCount<0 || this.customData.smallCount<0){
+					uni.showToast({title:"数量输入错误",icon:"none"})
+					return;
 				}
+				this.updateItemEvent(this.customData);
+				this.modalCancel();
+				
 			})
 
 		},

+ 22 - 5
hdApp/src/admin/billing/index.vue

@@ -254,14 +254,31 @@ export default {
 			this.isFocus = false;
 			this.isFocusOne = false;
 			this.$nextTick(()=>{
-				if(this.customData.bigCount==0 && this.customData.smallCount==0){
-					this.delAllEvent(this.customData)}
+
 				if (val.index === 0) {
+					this.delAllEvent(this.customData)
 					this.modalCancel();
-				} else {
-					this.updateItemEvent(this.customData);
-					this.modalCancel();
+					return false;
+				}
+
+				if(this.customData.bigCount==0 && this.customData.smallCount==0){
+					uni.showToast({title: '请填写花材数量',icon: "none"})
+					return
 				}
+
+				if(this.customData.bigCount==null && this.customData.smallCount==null){
+					uni.showToast({title: '请填写花材数量',icon: "none"})
+					return
+				}
+
+				if(this.customData.bigCount<0 || this.customData.smallCount<0){
+					uni.showToast({title: '数量填写错误',icon: "none"})
+					return
+				}
+
+				this.updateItemEvent(this.customData);
+				this.modalCancel();
+				
 			})
 
 		},

+ 31 - 18
hdApp/src/pagesPurchase/ghsProduct.vue

@@ -331,28 +331,41 @@ export default {
 			this.isFocus = false;
 			this.isFocusOne = false;
 			this.$nextTick(()=>{
-				if(this.customData.bigCount==0 && this.customData.smallCount==0){
-					this.delAllEvent(this.customData)}
+
 				if (val.index === 0) {
+					this.delAllEvent(this.customData)
 					this.modalCancel();
+					return false
+				}
+				if(this.customData.bigCount==0 && this.customData.smallCount==0){
+					uni.showToast({title: '请填写花材数量',icon: "none"})
+					return
+				}
+				if(this.customData.bigCount==null && this.customData.smallCount==null){
+					uni.showToast({title: '请填写花材数量',icon: "none"})
+					return
+				}
+				if(this.customData.bigCount<0 || this.customData.smallCount<0){
+					uni.showToast({title: '数量填写错误',icon: "none"})
+					return
+				}
+
+				const { bigCount,smallCount,bigNum,bigUnit,smallNum,smallUnit,ratio} = this.customData;
+				const ratioNum = Number(ratio);
+				//超过库存时 设置为库存最大值 1
+				if (Number(bigCount) * ratioNum + Number(smallCount) > Number(bigNum) * ratioNum + Number(smallNum)) {
+					uni.showToast({
+						title: '库存不足',
+						icon: "none"
+					});
+					this.customData.bigCount = 0;
+					this.customData.smallCount = 0;
+					this.delAllEvent(this.customData)
 				} else {
-					const { bigCount,smallCount,bigNum,bigUnit,smallNum,smallUnit,ratio} = this.customData;
-					const ratioNum = Number(ratio);
-					//超过库存时 设置为库存最大值 1
-					if (Number(bigCount) * ratioNum + Number(smallCount) > Number(bigNum) * ratioNum + Number(smallNum)) {
-						uni.showToast({
-							// title: `库存只有${bigNum}${bigUnit}${smallNum}${smallUnit}`,
-							title: '库存不足',
-							icon: "none"
-						});
-						this.customData.bigCount = 0;
-						this.customData.smallCount = 0;
-						this.delAllEvent(this.customData)
-					} else {
-						this.updateItemEvent(this.customData);
-						this.modalCancel();
-					}
+					this.updateItemEvent(this.customData);
+					this.modalCancel();
 				}
+				
 			})
 
 		},

Some files were not shown because too many files changed in this diff