tanyanfei il y a 4 ans
Parent
commit
7324f4b4ea
3 fichiers modifiés avec 55 ajouts et 4 suppressions
  1. 49 0
      pages/eventDetail/eventDetail.js
  2. 1 1
      pages/eventDetail/eventDetail.wxml
  3. 5 3
      pages/hotel/hotel.js

+ 49 - 0
pages/eventDetail/eventDetail.js

@@ -222,6 +222,13 @@ Page({
       })
       return;
     }
+    if (!form.code) {
+      wx.showToast({
+        title: '请输入验证码!',
+        icon: 'none'
+      })
+      return;
+    }
     wx.showLoading({
       title: '正在提交',
     })
@@ -251,6 +258,48 @@ Page({
     var form = e.detail.value;
     form.id=this.data.apply_id;
     form.proof_img = this.data.proof_img;
+    if (!form.proof_img) {
+      wx.showToast({
+        title: '请上传凭证!',
+        icon: 'none'
+      })
+      return;
+    }
+    if (!form.paytype) {
+      wx.showToast({
+        title: '请选择支付方式!',
+        icon: 'none'
+      })
+      return;
+    }
+    if (!form.billtype) {
+      wx.showToast({
+        title: '请选择发票类型!',
+        icon: 'none'
+      })
+      return;
+    }
+    if (!form.billhead) {
+      wx.showToast({
+        title: '请输入发票抬头!',
+        icon: 'none'
+      })
+      return;
+    }
+    if (!form.billno) {
+      wx.showToast({
+        title: '请输入识别号!',
+        icon: 'none'
+      })
+      return;
+    }
+    if (!form.billaddress || !form.billphone || !form.billbank || !form.billbankno) {
+      wx.showToast({
+        title: '请填写完整的发票信息!',
+        icon: 'none'
+      })
+      return;
+    }
     wx.showLoading({
       title: '正在提交',
     })

+ 1 - 1
pages/eventDetail/eventDetail.wxml

@@ -110,7 +110,7 @@
         <view class="item">
             <label style="width:105rpx;">支付方式</label>
             <radio-group name='paytype'>
-                <radio value="1">汇款:</radio>
+                <radio value="1">汇款</radio>
                 <radio style="margin-left:10px;" value="2">支票</radio>
             </radio-group>
         </view>

+ 5 - 3
pages/hotel/hotel.js

@@ -87,9 +87,11 @@ Page({
           wx.showToast({
             title: '预定成功',
           })
-          wx.navigateTo({
-            url: '../order/order',
-          })
+          setTimeout(()=>{
+            wx.redirectTo({
+              url: '../order/order',
+            })
+          },1000)
         } else {
           wx.showToast({
             title: '提交失败',