shish 2 лет назад
Родитель
Сommit
c1901fe71d
3 измененных файлов с 173 добавлено и 15 удалено
  1. 1 15
      hdApp/src/admin/ghs/pay.vue
  2. 171 0
      hdApp/src/admin/ghs/result.vue
  3. 1 0
      hdApp/src/pages.json

+ 1 - 15
hdApp/src/admin/ghs/pay.vue

@@ -173,22 +173,8 @@
 				this.payWay = 0
 				this.toPay()
 			},
-			// 暂未设置密码
-			hideAlert() {
-				this.$util.pageTo('/pages/user/password')
-			},
 			paySuccess() {
-				this.$util.pageTo({
-					url: '/pages/callback/index',
-					type: 2,
-					query: {
-						pageStatus: 3,
-						orderSn:this.payCallData.orderSn,
-						totalPrice:this.payCallData.totalPrice,
-						id: this.payCallData.orderId,
-						...this.params
-					}
-				})
+				this.$util.pageTo({url: '/admin/ghs/result?id='+this.id+'&salt='+this.salt,type: 2})
 			},
 			payFail() {
 			

+ 171 - 0
hdApp/src/admin/ghs/result.vue

@@ -0,0 +1,171 @@
+<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>
+          <view class="result-title" v-if="Number(customInfo.remainDebtAmount)>0">剩余欠款:{{ customInfo.remainDebtAmount }}元</view>
+          <view class="result-title" v-else>欠款已全部结清</view>
+          <button class="admin-button-com big" style="width:70vw;margin-top:20upx;" @click="goBack">返回</button>  
+        </view>
+      </view>
+    </view>
+  </template>
+  <script>
+  import { mapGetters } from "vuex";
+  import { getGhsData } from '@/api/ghs'
+  export default {
+    name: "result",
+    data() {
+      return {
+        id:0,
+        salt:'',
+        ghsInfo:[],
+        customInfo:[]
+      }
+    },
+    computed: {
+      ...mapGetters(['getDictionariesInfo']),
+    },
+    methods: {
+      init(){
+        let that = this
+        let id = this.option.id?this.option.id:0
+        let salt = this.option.salt?this.option.salt:''
+        getGhsData({id:id,salt:salt}).then(res=>{
+            if(res.code == 1){
+                if (res.data && res.data.ghs && !this.$util.isEmpty(res.data.ghs)){
+                    that.ghsInfo = res.data.ghs
+                    that.customInfo = res.data.custom?res.data.custom:[]
+                }
+            }
+        })
+      },
+      goBack(){
+        uni.navigateBack()
+      }
+    },
+  };
+  </script>
+  <style lang="scss" scoped>
+  .go-back{
+      width: 80%;
+      height: 80upx;
+      color: #FFFFFF;
+      margin-top: 50upx;
+      background: #3385FF;
+      border-radius: 10upx;
+      font-size:30upx;
+  }
+  .title{
+      font-weight:700;
+      margin-bottom:30upx;
+      font-size:30upx;
+  }
+  .product-area{
+      width:730upx;
+      height:90upx;
+      display:flex;
+      align-items:center;
+      .first-area{
+          border-bottom:1upx solid #e4e2e2;
+          position:relative;
+      width:550upx;
+          .name{
+              width:280upx;
+              overflow: hidden;
+              text-overflow:ellipsis;
+              white-space: nowrap;
+              display:inline-block;
+              font-weight:bold;
+              font-size:28upx;
+          }
+          .cg-cost{
+              font-weight:bold;
+              font-size:27upx;
+              color:red;
+              position:absolute;
+              left:480upx;
+              top:8upx;
+          }
+          .cost-price{
+              font-weight:bold;
+              font-size:27upx;
+              color:blue;
+              position:absolute;
+              left:515upx;
+              top:18upx;
+          }
+          input{
+              border:1upx solid #cccccc;
+              display:inline-block;
+              width:135upx;
+              margin-left:10upx;
+              margin-right:30upx;
+              text-align:center;
+              font-size:30upx;
+          }
+      }
+      .second-area{
+          float:left;
+          color:#646464;
+          margin-top:10upx;
+          .one{
+              color:red;
+          }
+          .two{
+              color:#CCCCCC;
+          }
+      }
+  }
+  .billing_box_bg {
+    position: relative;
+    padding: 30upx 30upx;
+    display: flex;
+    flex-direction: column;
+    background-color: #f5f5f5;
+    .top-view {
+      position: absolute;
+      top: 0;
+      left: 0;
+      width: 100%;
+      height: 299upx;
+      background: #3385ff;
+      border-radius: 0upx 0upx 83upx 83upx;
+    }
+    .result-view {
+      position: relative;
+      display: flex;
+      flex-direction: column;
+      align-items: center;
+      padding: 30upx 70upx 70upx 70upx;
+      width: 100%;
+      background: #ffffff;
+      border-radius: 20upx;
+      z-index: 1;
+      .iconchenggong {
+        font-size: 170upx;
+        color: $mainColor1;
+      }
+      .result-title {
+        margin: 20upx 0 50upx;
+        font-size: 32upx;
+      }
+      .close_btn {
+        line-height: 88upx;
+        text-align: center;
+        width: 550upx;
+        height: 88upx;
+        border: 1px solid #dddddd;
+        border-radius: 8upx;
+        font-size: 32upx;
+        color: #666;
+      }
+    }
+    .admin-button-com {
+      margin-bottom: 20upx;
+      width: 100%;
+    }
+  }
+  </style>

+ 1 - 0
hdApp/src/pages.json

@@ -167,6 +167,7 @@
 			"pages": [
 				{ "path": "shop", "style": {"navigationBarTitleText": "供货商"}},
 				{ "path": "pay", "style": {"navigationBarTitleText": "收银台"}},
+				{ "path": "result", "style": {"navigationBarTitleText": "付款成功"}},
 				{ "path": "addGhs", "style": {"navigationBarTitleText": "添加"}},
 				{ "path": "debtChange", "style": {"navigationBarTitleText": "欠款变动明细"}},
 				{ "path": "balanceChange", "style": {"navigationBarTitleText": "余额变动明细"}},