Parcourir la source

订单添加特殊订单创建,特殊订单添加预提交和确认状态

xiaohaizhao il y a 2 ans
Parent
commit
64babd0259

+ 6 - 0
packageA/orderForm/add/add.js

@@ -13,6 +13,12 @@ Page({
         domainList: [],
         type: "标准订单",
     },
+    /* 切换订单类型 */
+    onSelectType(e) {
+        this.setData({
+            type: e.currentTarget.dataset.name
+        })
+    },
     onLoad(options) {
         this.setData({
             type: options.type || '标准订单',

+ 9 - 0
packageA/orderForm/add/add.wxml

@@ -17,6 +17,15 @@
         点击选择经销商
     </view>
 </navigator>
+<view class="groud" wx:if="{{brandList.length}}">
+    <view class="label">
+        订单类型
+    </view>
+    <view class="content">
+        <van-button custom-class='but {{type=="标准订单"?"active":""}}' data-name="标准订单" bindtap="onSelectType">标准订单</van-button>
+        <van-button custom-class='but {{type=="特殊订单"?"active":""}}' data-name="特殊订单" bindtap="onSelectType">特殊订单</van-button>
+    </view>
+</view>
 <view class="groud" wx:if="{{brandList.length}}">
     <view class="label">
         选择品牌

+ 26 - 0
packageA/orderForm/detail.js

@@ -386,6 +386,32 @@ Page({
             }
         })
     },
+    /* 特殊订单预提交 */
+    presubmission() {
+        let that = this;
+        wx.showModal({
+            title: '提示',
+            content: '是否确认预提交订单?',
+            complete: (res) => {
+                if (res.confirm) _Http.basic({
+                    "id": 20230331152503,
+                    "content": {
+                        isrecheck: true,
+                        sa_orderid: that.data.sa_orderid
+                    },
+                }).then(s => {
+                    console.log("提交订单", s)
+                    wx.showToast({
+                        title: s.msg != '成功' ? s.msg : '预提交成功',
+                        icon: "none"
+                    });
+                    if (s.msg == '成功') that.setData({
+                        "detail.status": "预提交"
+                    })
+                })
+            }
+        })
+    },
     /* 提交订单 */
     submit() {
         let that = this;

+ 7 - 1
packageA/orderForm/detail.wxml

@@ -92,7 +92,13 @@
 	</view>
 	<view class="but-box">
 		<van-button custom-class='but delete' wx:if="{{detail.status=='新建'&&detail.type!='特殊订单'}}" bind:click="deleteItem">删除订单</van-button>
-		<van-button custom-class='but' wx:if="{{detail.status=='新建'}}" bind:click="submit">提交订单</van-button>
+		<block wx:if="{{detail.type=='特殊订单'}}">
+			<van-button custom-class='but' wx:if="{{detail.status=='新建'}}" bind:click="presubmission">预提交</van-button>
+			<van-button custom-class='but' wx:if="{{detail.status=='确定'}}" bind:click="submit">提交订单</van-button>
+		</block>
+		<block wx:else>
+			<van-button custom-class='but' wx:if="{{detail.status=='新建'}}" bind:click="submit">提交订单</van-button>
+		</block>
 	</view>
 </view>
 

+ 2 - 97
packageA/orderForm/index.scss

@@ -1,3 +1,5 @@
+@import "../../static/filter.scss";
+
 .search-right {
 	padding: 0 10rpx !important;
 }
@@ -82,101 +84,4 @@ page {
 			margin-top: 20rpx;
 		}
 	}
-}
-.DrawerPage {
-	position: fixed;
-	width: 100vw;
-	height: 100vh;
-	left: 0vw;
-	background-color: #f1f1f1;
-	transition: all 0.4s;
-}
-
-.DrawerPage.show {
-	transform: scale(0.9, 0.9);
-	left: 50vw;
-	box-shadow: 0 0 60rpx rgba(0, 0, 0, 0.2);
-	transform-origin: 0;
-}
-
-.DrawerWindow {
-	position: absolute;
-	width: 50vw;
-	height: 100vh;
-	left: 0;
-	top: 0;
-	transform: scale(0.9, 0.9) translateX(-100%);
-	opacity: 0;
-	pointer-events: none;
-	transition: all 0.4s;
-}
-
-.DrawerWindow.show {
-	transform: scale(1, 1) translateX(0%);
-	opacity: 1;
-	pointer-events: all;
-}
-
-.DrawerClose {
-	position: absolute;
-	width: 40vw;
-	height: 100vh;
-	right: 0;
-	top: 0;
-	color: transparent;
-	padding-bottom: 30rpx;
-	display: flex;
-	align-items: flex-end;
-	justify-content: center;
-	background-image: linear-gradient(90deg, rgba(0, 0, 0, 0.01), rgba(0, 0, 0, 0.6));
-	letter-spacing: 5px;
-	font-size: 50rpx;
-	opacity: 0;
-	pointer-events: none;
-	transition: all 0.4s;
-}
-
-.DrawerClose.show {
-	opacity: 1;
-	pointer-events: all;
-	width: 50vw;
-	color: #fff;
-}
-
-.DrawerPage .cu-bar.tabbar .action button.icon {
-	width: 64rpx;
-	height: 64rpx;
-	line-height: 64rpx;
-	margin: 0;
-	display: inline-block;
-}
-
-.DrawerPage .cu-bar.tabbar .action .cu-avatar {
-	margin: 0;
-}
-
-.DrawerPage .nav {
-	flex: 1;
-}
-
-.DrawerPage .nav .cu-item.cur {
-	border-bottom: 0;
-	position: relative;
-}
-
-.DrawerPage .nav .cu-item.cur::after {
-	content: "";
-	width: 10rpx;
-	height: 10rpx;
-	background-color: currentColor;
-	position: absolute;
-	bottom: 10rpx;
-	border-radius: 10rpx;
-	left: 0;
-	right: 0;
-	margin: auto;
-}
-
-.DrawerPage .cu-bar.tabbar .action {
-	flex: initial;
 }

+ 2 - 0
packageA/orderForm/index.wxml

@@ -7,7 +7,9 @@
     <van-tabs color='var(--assist)' title-active-color='var(--assist)' bind:change="tabsChange">
         <van-tab title="全部" />
         <van-tab title="新建" />
+        <van-tab title="预提交" />
         <van-tab title="提交" />
+        <van-tab title="确认" />
         <van-tab title="审核" />
         <van-tab title="关闭" />
     </van-tabs>