Browse Source

Merge branch '促销活动购物车' into preview

xiaohaizhao 1 year ago
parent
commit
220901723b

+ 9 - 2
packageA/activity/detail.js

@@ -178,7 +178,7 @@ Page({
 				}
 				}
 			}),
 			}),
 		});
 		});
-		// getApp().globalData.handleSelect = this.creadedOrderForm.bind(this);
+		getApp().globalData.handleSelect = this.creadedOrderForm.bind(this);
 	},
 	},
 	creadedOrderForm({
 	creadedOrderForm({
 		list
 		list
@@ -188,7 +188,11 @@ Page({
 			title: '提示',
 			title: '提示',
 			content: '是否确定创建促销订单?',
 			content: '是否确定创建促销订单?',
 			complete: (res) => {
 			complete: (res) => {
-				if (res.confirm)
+				if (res.confirm) {
+					wx.showLoading({
+						title: '生成中...',
+						mask: true
+					})
 					_Http.basic({
 					_Http.basic({
 						"id": 20221128183202,
 						"id": 20221128183202,
 						"content": {
 						"content": {
@@ -217,6 +221,7 @@ Page({
 							})
 							})
 						}
 						}
 					}).then(res => {
 					}).then(res => {
+						wx.hideLoading()
 						console.log("转化促销订单", res)
 						console.log("转化促销订单", res)
 						wx.showToast({
 						wx.showToast({
 							title: res.msg != '成功' ? res.msg : '创建成功',
 							title: res.msg != '成功' ? res.msg : '创建成功',
@@ -228,6 +233,8 @@ Page({
 							});
 							});
 						}, 300)
 						}, 300)
 					})
 					})
+				}
+
 			}
 			}
 		})
 		})
 	},
 	},

+ 3 - 0
packageA/activity/selectProduct/cart/footer.wxml

@@ -9,4 +9,7 @@
 	<view hover-class="{{disabled?'none':'navigator-hover'}}" style="background: rgba({{disabled?'243,123,29,.7':'243,123,29,1'}});color: #fff;" class="submit" data-event="update" bindtap="{{disabled?'':'clickBut'}}">
 	<view hover-class="{{disabled?'none':'navigator-hover'}}" style="background: rgba({{disabled?'243,123,29,.7':'243,123,29,1'}});color: #fff;" class="submit" data-event="update" bindtap="{{disabled?'':'clickBut'}}">
 		加入促销购物车
 		加入促销购物车
 	</view>
 	</view>
+	<view hover-class="{{disabled?'none':'navigator-hover'}}" style="background: rgba({{disabled?'8,92,223,.7':'8,92,223,1'}});color: #fff;" class="submit" data-event="submit" bindtap="{{disabled?'':'clickBut'}}">
+		生成订单
+	</view>
 </view>
 </view>

+ 1 - 1
packageA/activity/selectProduct/cart/index.wxml

@@ -31,7 +31,7 @@
 				<view class="check label-class">
 				<view class="check label-class">
 					起订量:{{item.orderminqty}},增减量:{{item.orderaddqty}}
 					起订量:{{item.orderminqty}},增减量:{{item.orderaddqty}}
 				</view>
 				</view>
-				<van-stepper value="{{ item.qty }}" min="{{item.orderminqty}}" step="{{item.orderaddqty}}" input-class='input-class' data-index="{{index}}" bind:minus='stepperChange' bind:plus='stepperChange' bind:blur='inputBlur' />
+				<van-stepper value="{{ item.qty }}" min="{{item.orderminqty}}" step="{{item.orderaddqty||1}}" input-class='input-class' data-index="{{index}}" bind:minus='stepperChange' bind:plus='stepperChange' bind:blur='inputBlur' />
 			</view>
 			</view>
 		</view>
 		</view>
 		<view slot="right" class="cell-right">删 除</view>
 		<view slot="right" class="cell-right">删 除</view>

+ 2 - 0
packageA/activity/selectProduct/index.js

@@ -62,6 +62,8 @@ Page({
           })
           })
         }`,
         }`,
       })
       })
+    } else if (detail == "submit") {
+      this.submit()
     } else {
     } else {
       _Http.basic({
       _Http.basic({
         "id": 20231024110003,
         "id": 20231024110003,

+ 1 - 1
packageA/activity/selectProduct/index.wxml

@@ -33,7 +33,7 @@
 						起订量:{{item.orderminqty}},增减量:{{item.orderaddqty}}
 						起订量:{{item.orderminqty}},增减量:{{item.orderaddqty}}
 					</view>
 					</view>
 				</view>
 				</view>
-				<van-stepper value="{{ item.qty }}" min="{{item.orderminqty}}" max="{{item.maxQty||'99999999'}}" disabled="{{item.groupqty!=0 && item.maxQty<=0}}" step="{{item.orderaddqty}}" input-class='input-class' data-index="{{index}}" data-iscatch="catch" catch:minus='stepperChange' catch:plus='stepperChange' catch:blur='inputBlur' />
+				<van-stepper value="{{ item.qty }}" min="{{item.orderminqty}}" max="{{item.maxQty||'99999999'}}" disabled="{{item.groupqty!=0 && item.maxQty<=0}}" step="{{item.orderaddqty||1}}" input-class='input-class' data-index="{{index}}" data-iscatch="catch" catch:minus='stepperChange' catch:plus='stepperChange' catch:blur='inputBlur' />
 			</view>
 			</view>
 	</navigator>
 	</navigator>
 	<view style="height: 100rpx;" />
 	<view style="height: 100rpx;" />

+ 1 - 1
pages/index/collect/index.wxml

@@ -30,7 +30,7 @@
 				<view class="check label-class">
 				<view class="check label-class">
 					起订量:{{item.orderminqty}},增减量:{{item.orderaddqty}}
 					起订量:{{item.orderminqty}},增减量:{{item.orderaddqty}}
 				</view>
 				</view>
-				<van-stepper value="{{ item.qty }}" min="{{item.orderminqty}}" step="{{item.orderaddqty}}" input-class='input-class' data-index="{{index}}" bind:minus='stepperChange' bind:plus='stepperChange' bind:blur='inputBlur' />
+				<van-stepper value="{{ item.qty }}" min="{{item.orderminqty}}" step="{{item.orderaddqty||1}}" input-class='input-class' data-index="{{index}}" bind:minus='stepperChange' bind:plus='stepperChange' bind:blur='inputBlur' />
 			</view>
 			</view>
 		</view>
 		</view>
 		<view slot="right" class="cell-right">删 除</view>
 		<view slot="right" class="cell-right">删 除</view>

+ 1 - 1
select/product/index.wxml

@@ -48,7 +48,7 @@
                     起订量:{{item.orderminqty}},增减量:{{item.orderaddqty}},包装量:{{item.packageqty}}
                     起订量:{{item.orderminqty}},增减量:{{item.orderaddqty}},包装量:{{item.packageqty}}
                 </view>
                 </view>
             </view>
             </view>
-            <van-stepper value="{{ item.qty }}" min="{{item.orderminqty}}" step="{{item.orderaddqty}}" input-class='input-class' data-index="{{index}}" data-iscatch="catch" catch:minus='stepperChange' catch:plus='stepperChange' catch:blur='inputBlur' />
+            <van-stepper value="{{ item.qty }}" min="{{item.orderminqty}}" step="{{item.orderaddqty||1}}" input-class='input-class' data-index="{{index}}" data-iscatch="catch" catch:minus='stepperChange' catch:plus='stepperChange' catch:blur='inputBlur' />
         </view>
         </view>
     </view>
     </view>
     <view wx:if="{{!radio}}" style="height: 130rpx;" />
     <view wx:if="{{!radio}}" style="height: 130rpx;" />