Browse Source

HY站点提交设置提醒日期

xiaohaizhao 2 months ago
parent
commit
8a9b7a755a

+ 49 - 22
packageA/orderForm/detail.js

@@ -24,6 +24,8 @@ Page({
             model: "#Invoice"
         }],
         saletypeList: null,
+        showMYModel: false,
+        reminddays: 7,
     },
     onLoad(options) {
         this.setData({
@@ -593,28 +595,53 @@ Page({
     /* 提交订单 */
     submit() {
         let that = this;
-        wx.showModal({
-            cancelText: getApp().globalData.Language.getMapText('取消'),
-            confirmText: getApp().globalData.Language.getMapText('确定'),
-            title: getApp().globalData.Language.getMapText('提示'),
-            content: getApp().globalData.Language.getMapText('是否确认提交订单') + '?',
-            complete: (res) => {
-                if (res.confirm) _Http.basic({
-                    "id": 20221108153402,
-                    "content": {
-                        sa_orderid: that.data.sa_orderid
-                    },
-                }).then(s => {
-                    console.log("提交订单", s)
-                    wx.showToast({
-                        title: s.code != '1' ? s.msg : getApp().globalData.Language.getMapText('提交成功'),
-                        icon: "none"
-                    });
-                    if (s.code == '1') that.setData({
-                        "detail.status": "提交"
-                    })
-                })
-            }
+        if (['HY', 'YOSTEST1'].includes(wx.getStorageSync('userMsg').siteid)) {
+            this.setData({
+                showMYModel: true
+            })
+        } else {
+            wx.showModal({
+                cancelText: getApp().globalData.Language.getMapText('取消'),
+                confirmText: getApp().globalData.Language.getMapText('确定'),
+                title: getApp().globalData.Language.getMapText('提示'),
+                content: getApp().globalData.Language.getMapText('是否确认提交订单') + '?',
+                complete: (res) => {
+                    if (res.confirm) that.handleSubmit();
+                }
+            })
+        }
+    },
+    handleSubmit(reminddays = 0) {
+        _Http.basic({
+            "id": 20221108153402,
+            "content": {
+                sa_orderid: this.data.sa_orderid,
+                reminddays
+            },
+        }).then(s => {
+            console.log("提交订单", s)
+            wx.showToast({
+                title: s.code != '1' ? s.msg : getApp().globalData.Language.getMapText('提交成功'),
+                icon: "none"
+            });
+            if (s.code == '1') this.setData({
+                "detail.status": "提交"
+            })
+        })
+    },
+    stepperSubmit() {
+        this.handleSubmit(this.data.reminddays)
+    },
+    dialogOnClose() {
+        this.setData({
+            showMYModel: false
+        })
+    },
+    stepperChange({
+        detail
+    }) {
+        this.setData({
+            reminddays: detail
         })
     },
     /* 确认订单交期 */

+ 3 - 1
packageA/orderForm/detail.json

@@ -5,6 +5,8 @@
         "Progress": "./modules/progress/index",
         "Invoice": "../invoice/modules/InvoiceList/index",
         "van-radio": "@vant/weapp/radio/index",
-        "van-radio-group": "@vant/weapp/radio-group/index"
+        "van-radio-group": "@vant/weapp/radio-group/index",
+        "van-dialog": "@vant/weapp/dialog/index",
+        "van-stepper": "@vant/weapp/stepper/index"
     }
 }

+ 10 - 2
packageA/orderForm/detail.scss

@@ -33,8 +33,7 @@
     }
 
     .exp {
-        height: 34rpx;
-        line-height: 34rpx;
+        line-height: 36rpx;
         font-size: 26rpx;
         margin-bottom: 8rpx;
         color: #666;
@@ -205,4 +204,13 @@
             background: var(--warning);
         }
     }
+}
+
+.dialog-box {
+    padding: 0 20rpx 40rpx;
+    font-size: 30rpx;
+}
+
+.dialog-input-class{
+    width: 100rpx !important;
 }

+ 15 - 0
packageA/orderForm/detail.wxml

@@ -118,6 +118,21 @@
 	<Invoice slot='发票' id='Invoice' apiId='20221229154102' />
 </Yl_FunTabs>
 
+<!-- 提交订单 -->
+<van-dialog show="{{ showMYModel }}" bind:close="dialogOnClose" bind:confirm='stepperSubmit' use-slot title="{{language['提示']||'提示'}}" confirmButtonText="{{language['确定']||'确定'}}" cancelButtonText="{{language['取消']||'取消'}}" confirm-button-color='#3774F6' show-cancel-button confirm-button-open-type="getUserInfo" zIndex="99999999">
+	<view class="dialog-box">
+		<view style="margin-top: 20rpx;">
+			{{language['是否确认提交订单']||'是否确认提交订单'}}?
+		</view>
+		<view style="margin:20rpx 0;">
+			<text style="color: #FF3B30;margin-right: 6rpx;">*</text>{{language['发货提醒天数']||'发货提醒天数'}}
+		</view>
+		<van-stepper value="{{ reminddays }}" input-class='dialog-input-class' min="0" bind:change="stepperChange" />
+		<view style="margin-top: 20rpx;font-size: 24rpx;">
+			{{language['用于提醒订单负责人待发货信息,若值为0则不提醒'] || '用于提醒订单负责人待发货信息,若值为0则不提醒'}}
+		</view>
+	</view>
+</van-dialog>
 <view style="height: 130rpx;" />
 <view class="footer">
 	<view class="price">

+ 1 - 1
project.private.config.json

@@ -5,6 +5,6 @@
     "compileHotReLoad": true,
     "urlCheck": false
   },
-  "libVersion": "3.6.1",
+  "libVersion": "3.7.1",
   "condition": {}
 }