Sfoglia il codice sorgente

修改结账的流程

wangning 5 anni fa
parent
commit
b117239e8c

+ 1 - 1
hdApp/src/admin/billing/affirmGhs.vue

@@ -239,7 +239,7 @@
 						<!-- <appSendTime :placeholder="'默认30分钟后配送'" @alterTime="purchaseFreight(ghsMsg)" :sendDate.sync="form.sendDate" :sendTime.sync="sendTime" ></appSendTime> -->
             <appTimer :placeholder="'默认30分钟后配送'" @confirm="onConfirm" :sendTime="sendTime"></appTimer>
 					<tui-list-cell class="line-cell" :hover="false" :arrow="false" v-show="form.sendType == 1">
-						<view class="tui-title ">运费{{form.sendType}}</view>
+						<view class="tui-title ">运费</view>
 						<input type="number" placeholder="留空表示免运费" @input="countAllPrices" v-model="form.sendCost" placeholder-class="tui-placeholder" disabled>
 					</tui-list-cell>
           <tui-list-cell class="line-cell" :hover="false" :arrow="true" @click="toCoupon">

+ 8 - 1
hdApp/src/pages.json

@@ -771,7 +771,14 @@
 					"path": "gatherPay",
 					"style": {
 						"navigationBarTitleText": "",
-						"enablePullDownRefresh": true
+            "enablePullDownRefresh":false
+					}
+				},
+        {
+					"path": "gatherResult",
+					"style": {
+						"navigationBarTitleText": "",
+            "enablePullDownRefresh":false
 					}
 				},
         {

+ 5 - 35
hdApp/src/pagesPurchase/gatherPay.vue

@@ -30,54 +30,24 @@
         </block>
       </div>
     </div>
-    <!-- 键盘 -->
-    <keyboard-module
-      :show="keyShow"
-      @comfirm="hideKeyFn"
-      @clickKey="clickKeyFn"
-      :psdShow="true"
-      :type="_type"
-      @closeKey="closeKeyFn"
-    />
-    <!-- 弹窗 - 未设置支付密码 -->
-    <alert-module
-      :show="setPassModal"
-      btnText="设置"
-      btnColor="#FF2842"
-      padding="66rpx 24rpx 66rpx 24rpx"
-      @click="hideAlert"
-    >
-      <div class="go-login-module">
-        <div>请先设置支付密码!</div>
-      </div>
-    </alert-module>
   </div>
 </template>
 
 <script>
-import { purchaseClearCreateOrder, purchaseClearWxPay, purchaseBalancePay } from "@/api/purchase/index";
-import keyboardModule from './components/keyboard'
-import AlertModule from "@/components/plugin/alert";
+import { purchaseClearWxPay } from "@/api/purchase/index";
 import { mapGetters } from "vuex";
-import wexinPay from "@/utils/pay/wxPay";
 export default {
   name: "callback",
-  components: {
-    keyboardModule,
-    AlertModule
-  },
   data () {
     return {
     	orderTime:120,
       type: '',
-      keyShow: false,
       modalForm: {
         payPassword: ''
       },
       psdKey: '',
       orderSn: '',
       actPrice: '',
-      setPassModal: false,
       _type: '1'
     };
   },
@@ -85,7 +55,7 @@ export default {
     // this.getWeChat(options.ids,options.id)
     this.orderSn = options.orderSn
     this.actPrice = options.actPrice
-			this.orderTimeFun();
+    this.orderTimeFun();
   },
   computed: {
     ...mapGetters(["getLoginInfo", 'getDictionariesInfo']),
@@ -102,13 +72,13 @@ export default {
 			},
     _wxPay () {
       purchaseClearWxPay({ orderSn: this.orderSn }).then(res => {
-        console.log(res)
         wexinPay(res.data, this.getSuccess, this.getError)
       }).catch(err => { console.log(err) })
     },
     getSuccess () {
-      uni.navigateTo({
-        url: '/pagesPurchase/particulars'
+      this.pageTo({
+        url: '/pagesPurchase/gatherResult',
+        type: 2
       })
     },
     getError () {

+ 75 - 0
hdApp/src/pagesPurchase/gatherResult.vue

@@ -0,0 +1,75 @@
+<template>
+  <view class="app-content">
+    <view class="billing_box_bg">
+      <view class="top-view"> </view>
+      <view class="result-view">
+        <view :class="['iconfont', 'iconchenggong']"></view>
+        <view class="result-title">支付成功</view>
+        <button class="admin-button-com big" @click="goClose">返回首页</button>
+      </view>
+    </view>
+  </view>
+</template>
+
+<script>
+export default {
+  name: "AppResult",
+  methods: {
+    goClose () {
+      this.pageTo({ url: "/admin/home/workbench", type: 3 });
+    }
+  },
+};
+</script>
+
+<style lang="scss" scoped>
+.billing_box_bg {
+  position: relative;
+  padding: 60px 30px;
+  display: flex;
+  flex-direction: column;
+  background-color: #f5f5f5;
+  .top-view {
+    position: absolute;
+    top: 0;
+    left: 0;
+    width: 100%;
+    height: 299px;
+    background: #3385ff;
+    border-radius: 0px 0px 83px 83px;
+  }
+  .result-view {
+    position: relative;
+    display: flex;
+    flex-direction: column;
+    align-items: center;
+    padding: 70px;
+    width: 100%;
+    background: #ffffff;
+    border-radius: 20px;
+    z-index: 1;
+    .iconchenggong {
+      font-size: 170px;
+      color: $mainColor1;
+    }
+    .result-title {
+      margin: 50px 0 70px;
+      font-size: 32px;
+    }
+    .close_btn {
+      line-height: 88upx;
+      text-align: center;
+      width: 550upx;
+      height: 88upx;
+      border: 1px solid #dddddd;
+      border-radius: 8px;
+      font-size: 32upx;
+      color: #666;
+    }
+  }
+  .admin-button-com {
+    margin-bottom: 20px;
+    width: 100%;
+  }
+}
+</style>

+ 16 - 7
hdApp/src/pagesPurchase/gathering.vue

@@ -83,9 +83,13 @@ export default {
       isAllCheck: false,
     }
   },
-  mounted () {
-    this.initData()
-    this.getClient()
+  onPullDownRefresh() {
+    this.initData().then(res => {
+      uni.stopPullDownRefresh();
+    })
+    this.getClient().then(res => {
+      uni.stopPullDownRefresh();
+    })
   },
   computed: {
     selectList () {
@@ -145,9 +149,13 @@ export default {
         });
       }
     },
+    init() {
+      this.initData()
+      this.getClient()
+    },
     // 初始化页面数据
     initData () {
-      purchaseDebtList({id:this.option.id}).then(res => {
+      return purchaseDebtList({id:this.option.id}).then(res => {
         console.log(res)
         this.detailsList = res.data.list.map(ele => {
           return {
@@ -158,7 +166,7 @@ export default {
       }).catch(err => { console.log(err) })
     },
     getClient() {
-      ghsDetail({id:this.option.id}).then(res => {
+      return ghsDetail({id:this.option.id}).then(res => {
         console.log('res', res)
         this.customInfo = res.data
       }).catch(err => {console.log('err', err)})
@@ -192,8 +200,9 @@ export default {
                 purchaseClearCreateOrder({ purchaseIds:arr.join(','),ghsId:this.option.id }).then(res => {
                   console.log('res ===>', res)
                   if(res.code == 1) {
-                    uni.navigateTo({
-                      url: '/pagesPurchase/gatherPay?orderSn=' + res.data.orderSn + '&actPrice=' + res.data.actPrice
+                    this.pageTo({
+                      url: '/pagesPurchase/gatherPay?orderSn=' + res.data.orderSn + '&actPrice=' + res.data.actPrice,
+                      type: 2
                     })
                   }
                 }).catch(err => {console.log('err===>', err)})

+ 17 - 24
hdApp/src/pagesPurchase/order.vue

@@ -21,24 +21,13 @@
               <view class="accumulative">欠款: {{item.debtAmount}}</view>
             </view>
             <view class="store_btn">
-              <view
-                class="btn_entrance"
-                v-if="Number(item.debtAmount) > 0"
-                @click.stop="settleAccounts(item)"
-              >
+              <view class="btn_entrance" v-if="Number(item.debtAmount) > 0" @click.stop="settleAccounts(item)" >
                 结账
               </view>
-              <view
-                class="btn_entrance btn_forbid"
-                v-else
-                @click.stop=""
-              >
+              <view class="btn_entrance btn_forbid" v-else @click.stop="" >
                 结账
               </view>
-              <view
-                class="btn_entrance"
-                @click.stop="enter(item)"
-              >
+              <view class="btn_entrance" @click.stop="enter(item)" >
                 采购
               </view>
             </view>
@@ -88,34 +77,38 @@ export default {
       tabIndex: 0
     }
   },
-  mounted () {
-    this.getGHSList()
-  },
   onPullDownRefresh() {
-    this.getGHSList()
+    this.getGHSList().then(res => {
+      uni.stopPullDownRefresh();
+    })
   },
   methods: {
     enter (item) {
       const { id } = item
-      uni.navigateTo({ url: `/pagesPurchase/ghsProduct?id=${id}` })
+      this.pageTo({ url: `/pagesPurchase/ghsProduct?id=${id}`, type: 2 })
+    },
+    init() {
+      this.getGHSList()
     },
     getGHSList () {
-      ghsList().then(res => {
+      return ghsList().then(res => {
         this.supplierList = res.data.list
         console.log(this.supplierList, 111)
       }).catch(err => { console.log(err) })
     },
     // 结账
     settleAccounts (item) {
-      uni.navigateTo({
-        url: '/pagesPurchase/gathering?id='+item.id
+      this.pageTo({
+        url: '/pagesPurchase/gathering?id='+item.id,
+        type: 2
       })
     },
     // 采购记录详情
     gotoDetails (val) {
       console.log(val)
-      uni.navigateTo({
-        url: '/pagesPurchase/purDetails?status=' + val.status + '&id=' + val.id
+      this.pageTo({
+        url: '/pagesPurchase/purDetails?status=' + val.status + '&id=' + val.id,
+        type:2
       })
     }
   }