Selaa lähdekoodia

修改花店采购的一些流程问题

wangn 5 vuotta sitten
vanhempi
commit
331bb47f12

+ 1 - 1
hdApp/src/pagesPurchase/components/keyboard.vue

@@ -93,7 +93,7 @@ export default {
         this.keyContent = ''
         this.Psdlist = [{ class: '' }, { class: '' }, { class: '' }, { class: '' }, { class: '' }, { class: '' }];
       }
-      // this.$emit('closeKey')
+      this.$emit('closeKey')
     },
     // 点击数字键盘
     clickKeyFn (val) {

+ 1 - 1
hdApp/src/pagesPurchase/particulars.vue

@@ -19,7 +19,7 @@ export default {
   name: "AppResult",
   methods: {
     goClose () {
-      this.$util.pageTo({ url: "/pagesPurchase/order", type: 2 });
+      uni.reLaunch({ url: "/pagesPurchase/order", type: 2 });
     }
   }
 };

+ 8 - 5
hdApp/src/pagesPurchase/purDetails.vue

@@ -152,7 +152,7 @@
       class="footer_bar"
       v-if="status === '1'"
     >
-      <view @click="postponePay">延期付</view>
+      <!-- <view @click="postponePay">延期付</view> -->
       <view @click="_weixinPay">支付</view>
     </view>
     <kd-entrance></kd-entrance>
@@ -223,10 +223,13 @@ export default {
 
     },
     _weixinPay () {
-      purchaseWxPay({ orderSn: this.detailInfo.orderSn }).then(res => {
-        console.log(res)
-        wexinPay(res.data, this.getSuccess, this.getError)
-      }).catch(err => { console.log(err) })
+      uni.navigateTo({
+        url: `/pagesPurchase/wechatPay?type=2&orderSn=${this.detailInfo.orderSn}&actPrice=${this.detailInfo.actPrice}`
+      })
+      // purchaseWxPay({ orderSn: this.detailInfo.orderSn }).then(res => {
+      //   console.log(res)
+      //   wexinPay(res.data, this.getSuccess, this.getError)
+      // }).catch(err => { console.log(err) })
     },
     getError () {
       this.$msg("支付失败!");

+ 5 - 3
hdApp/src/pagesPurchase/setPsd.vue

@@ -72,11 +72,13 @@ export default {
     changePsd () {
       console.log(this.keyContent.length)
       if (this.keyContent.length === 6) {
-        console.log(111111)
         adminSetPayPassword({ password: this.keyContent }).then(res => {
-          console.log(res)
+          this.$msg(res.msg)
           uni.navigateBack({})
-        }).catch(err => { console.log(err) })
+        }).catch(err => { 
+          this.$msg(err.msg)
+          uni.navigateBack({}) 
+          })
       } else {
         this.$msg('请输入6位数密码')
       }

+ 18 - 7
hdApp/src/pagesPurchase/wechatPay.vue

@@ -106,12 +106,23 @@ export default {
   methods: {
     // 延期支付
     postponePay () {
-      purchaseDebtPay({ orderSn: this.orderSn }).then(res => {
-        console.log(res)
-        uni.navigateTo({
-          url: '/pagesPurchase/particulars'
-        })
-      }).catch(err => { console.log(err) })
+      let that = this
+      uni.showModal({
+				title: '提示',
+				content: '确认下单?',
+				success: function (res) {
+					if (res.confirm) {
+            console.log(that.orderSn)
+						purchaseDebtPay({ orderSn: that.orderSn }).then(res => {
+              console.log(res)
+              uni.navigateTo({
+                url: '/pagesPurchase/particulars'
+              })
+            }).catch(err => { console.log(err) })
+					}
+				}
+			});
+      
     },
     // getWeChat () {
     //   purchaseClearCreateOrder({ id: this.options.id }).then(res => {
@@ -148,10 +159,10 @@ export default {
     },
     // 设置支付密码
     hideAlert () {
+      this.setPassModal = false
       uni.navigateTo({
         url: '/pagesPurchase/setPsd'
       })
-      this.setPassModal = false
     },
     // 点击数字键盘
     clickKeyFn (val) {