lilei 6 months ago
parent
commit
cb7b303dca

+ 13 - 1
pagesB/procureOrder/creatOrder.vue

@@ -139,6 +139,11 @@
 			shelfInfo(){
 				return this.$store.state.vuex_storeShelf
 			},
+			// 最小支付金额
+			minPayAmount(){
+				const shelfInfo = this.shelfInfo
+				return shelfInfo&&shelfInfo.minAmount ? shelfInfo.minAmount : 0
+			},
 			//是否开启线上支付
 			hasPay(){
 				const shelfInfo = this.shelfInfo
@@ -156,7 +161,14 @@
 			// 去结算
 			settlement(){
 				if(this.totalAmount>0){
-					 this.submitOrder()
+					 if(this.hasPay && this.minPayAmount>this.totalAmount){
+					 	uni.showToast({
+					 		title: '支付金额不能小于'+this.minPayAmount+'元!',
+					 		icon: 'none'
+					 	})
+					 }else{
+						this.submitOrder()
+					 }
 				}else{
 					uni.showToast({
 						title: '请选择产品',

+ 12 - 0
pagesB/procureOrder/orderDetail.vue

@@ -246,6 +246,11 @@
 		   hasPay(){
 				return this.info&&this.info.payOnlineFlag==1&&this.info.payInfo
 		   },
+		   // 最小支付金额
+		   minPayAmount(){
+		   	const shelfInfo = this.shelfInfo
+		   	return shelfInfo&&shelfInfo.minAmount ? shelfInfo.minAmount : 0
+		   },
 		   //是否已付款
 		   isPayOk(){
 			   return this.hasPay && this.info.payInfo.payState=='FINISH'
@@ -365,6 +370,13 @@
 		 },
 		 // 立即支付
 		 payOrder(item){
+			if(item.totalAmount<this.minPayAmount){
+				uni.showToast({
+					title: '支付金额不能小于'+this.minPayAmount+'元!',
+					icon: 'none'
+				})
+				return
+			}
 			uni.showLoading({
 				title: '加载中...'
 			})

+ 12 - 0
pagesB/procureOrder/orderList.vue

@@ -125,6 +125,11 @@
 				const shelfInfo = this.shelfInfo
 				return shelfInfo&&shelfInfo.payOnlineFlag&&shelfInfo.payOnlineFlag=='1'
 			},
+			// 最小支付金额
+			minPayAmount(){
+				const shelfInfo = this.shelfInfo
+				return shelfInfo&&shelfInfo.minAmount ? shelfInfo.minAmount : 0
+			},
 			// 付款信息
 			payInfo(){
 				return this.$store.state.vuex_tempOrderData
@@ -272,6 +277,13 @@
 			// 立即支付
 			payOrder(item){
 				const _this = this
+				if(item.totalAmount<this.minPayAmount){
+					uni.showToast({
+						title: '支付金额不能小于'+this.minPayAmount+'元!',
+						icon: 'none'
+					})
+					return
+				}
 				this.$store.state.vuex_tempOrderData = item
 				uni.showLoading({
 					title: '加载中...'

+ 14 - 2
pagesB/shopiing/productDetail.vue

@@ -295,6 +295,11 @@
 				const shelfInfo = this.shelfInfo
 				return shelfInfo&&shelfInfo.payOnlineFlag&&shelfInfo.payOnlineFlag=='1'
 			},
+			// 最小支付金额
+			minPayAmount(){
+				const shelfInfo = this.shelfInfo
+				return shelfInfo&&shelfInfo.minAmount ? shelfInfo.minAmount : 0
+			},
 			// 经销商电话
 			dealerPhone(){
 				const shelfInfo = this.shelfInfo
@@ -465,8 +470,15 @@
 							if(!this.showPopu){
 								this.showPopu = true
 							}else{
-								// 去结算生产订单
-								this.creatOrder()
+								if(this.hasPay && this.minPayAmount>this.payAmount){
+									uni.showToast({
+										title: '支付金额不能小于'+this.minPayAmount+'元!',
+										icon: 'none'
+									})
+								}else{
+									// 去结算生产订单
+									this.creatOrder()
+								}
 							}
 						}
 					}