shish 1 год назад
Родитель
Сommit
b4265d1952

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

@@ -538,7 +538,7 @@ export default {
         }else if(this.form.hasPay == 1){
           name = '确认线下付款?'
           if(this.form.forward == 1){
-            name = '确认清楚负数订单用法,要开单?'
+            name = '确认要开负数订单?'
           }
         }else if(this.form.hasPay == 2){
           name = '确认赊账?'

+ 27 - 2
hdApp/src/admin/billing/remind.vue

@@ -7,10 +7,10 @@
           <view class="result-title">操作成功,还有下一步</view>
           <view class="pay-confirm-content">
             <view class="confirm-text">
-              <view class="text-desc">请线下转账给客户,或充到客户账户</view>
+              <view class="text-desc">请线下转账给客户,或充余额给客户</view>
             </view>
             <view>
-                <button class="admin-button-com blue big" @click="" style="width:320upx;">充到客户余额</button>
+                <button class="admin-button-com blue big" @click="recharge()" style="width:320upx;">充余额给客户</button>
             </view>
             <view style="margin-top:30upx;">
                 <button class="admin-button-com big" @click="goBack" style="width:320upx;">线下退钱给客户</button>
@@ -22,10 +22,12 @@
   </template>
   <script>
   import { getDetB} from "@/api/order";
+  import {toManRecharge} from "@/api/recharge"
   export default {
     name: "remind",
     data() {
       return {
+        orderInfo:[]
       }
     },
     onLoad(){
@@ -35,6 +37,29 @@
       prevPage.$vm.pageAction = {refresh:1}
     },
     methods: {
+      recharge(){
+        if(this.$util.isEmpty(this.orderInfo)){
+          this.$msg('没有找到订单信息')
+          return false
+        }
+        this.$util.confirmModal({content:'确认充余额给客户?'},() => {
+          this.toRecharge()
+			  })
+      },
+      toRecharge(){
+        let that = this
+        uni.showLoading({mask:true})
+        let remark = '开负数订单退款,单号'+this.orderInfo.orderSn
+        toManRecharge({amount:this.orderInfo.actPrice,remark:remark,payWay:0,customId:this.orderInfo.customId}).then(res=>{
+          uni.hideLoading()
+          if(res.code == 1){
+            this.$msg('充值成功')
+            setTimeout(() => {
+              that.pageTo({url:`/admin/billing/resultCp?id=${this.option.orderId}`, type: 2})
+            }, 1100)
+          }
+        })
+      },
       init(){
         let orderId = this.option.orderId?this.option.orderId:0
         getDetB({id: orderId}).then(res => {

+ 141 - 0
hdApp/src/admin/billing/resultCp.vue

@@ -0,0 +1,141 @@
+<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="textarea-container">
+            <textarea 
+              class="result-textarea" 
+              v-model="copyText" 
+              readonly 
+              placeholder="售后金额¥20元,已充值到你的账户,点击下面链接查看你的账户余额和明细&#10;链接:#小程序://花掌柜/v9C1DSa6pqAVGGH&#10;链接有效期30天"
+            ></textarea>
+          </view>
+          <view class="pay-confirm-content">
+            <view>
+                <button class="admin-button-com blue big" @click="recharge()" style="width:420upx;">复制上面文字,发给客户</button>
+            </view>
+            <view style="margin-top:40upx;">
+                <button class="admin-button-com big" @click="goBack" style="width:420upx;">返回</button>
+            </view>
+          </view>
+        </view>
+      </view>
+    </view>
+  </template>
+  <script>
+  export default {
+    name: "resultCp",
+    data() {
+      return {
+        orderInfo:[],
+        copyText: "售后金额¥20元,已充值到你的账户,点击下面链接查看你的账户余额和明细\n链接:#小程序://花掌柜/v9C1DSa6pqAVGGH\n链接有效期30天"
+      }
+    },
+    onLoad(){
+      //返回上一页时刷新
+      let pages = getCurrentPages();
+      let prevPage = pages[ pages.length - 2 ];
+      prevPage.$vm.pageAction = {refresh:1}
+    },
+    methods: {
+      init(){
+        let id = this.option.id?this.option.id:0
+        getDetB({id: id}).then(res => {
+          this.orderInfo = res.data
+        })
+      },
+      recharge(){
+        // 复制文本到剪贴板
+        uni.setClipboardData({
+          data: this.copyText,
+          success: () => {
+            uni.showToast({
+              title: '复制成功',
+              icon: 'success',
+              duration: 2000
+            });
+          },
+          fail: () => {
+            uni.showToast({
+              title: '复制失败',
+              icon: 'none',
+              duration: 2000
+            });
+          }
+        });
+      },
+      goBack(){
+        uni.navigateBack()
+      }
+    },
+  };
+  </script>
+  <style lang="scss" scoped>
+  .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: 80upx 0upx 70upx 0upx;
+      width: 100%;
+      background: #ffffff;
+      border-radius: 20upx;
+      z-index: 1;
+      .iconchenggong {
+        font-size: 130upx;
+        color: $mainColor1;
+      }
+      .result-title {
+        margin: 50upx 0 30upx;
+        font-size: 38upx;
+      }
+      
+      .textarea-container {
+        width: 100%;
+        padding: 0 40upx;
+        margin-bottom: 40upx;
+        
+        .result-textarea {
+          width: 100%;
+          min-height: 300upx;
+          padding: 30upx;
+          background: #f8f9fa;
+          border: 2upx solid #e9ecef;
+          border-radius: 16upx;
+          font-size: 32upx;
+          line-height: 1.6;
+          color: #333;
+          resize: none;
+          
+          &:focus {
+            border-color: $mainColor1;
+            background: #fff;
+          }
+        }
+      }
+    }
+  }
+
+  .pay-confirm-content {
+    padding: 30upx 40upx;
+    text-align: center;
+  }
+  </style>

+ 4 - 3
hdApp/src/admin/custom/balanceChange.vue

@@ -19,7 +19,7 @@
                         </view>
                         <view class="table-row table-row-extra" v-if="Number(item.settleId)>0 || Number(item.orderId)>0 || !$util.isEmpty(item.remark)">
                             <view class="table-cell cell-extra" :colspan="5">
-                                <view v-if="Number(item.settleId)>0">结账单 {{item.settleNo}} {{item.settleAmount?parseFloat(item.settleAmount):0}}元</view>
+                                <view v-if="Number(item.settleId)>0" @click="goSettle(item)">结账单 {{item.settleNo}} {{item.settleAmount?parseFloat(item.settleAmount):0}}元</view>
                                 <view v-if="Number(item.settleAmount)>0 && Number(item.becomeBalance)>0">余额 {{item.becomeBalance}}元</view>
                                 <view v-if="!$util.isEmpty(item.remark)">{{ item.remark }}</view>
                             </view>
@@ -47,6 +47,9 @@
             };
         },
         methods: {
+            goSettle(item){
+                this.$util.pageTo({url:'/admin/settle/detail?id='+item.settleId})
+            },
             goDetail(item){
                 if(item.capitalType == 0){
                     //订单详情
@@ -154,13 +157,11 @@
             &.cell-amount {
                 text-align: right;
                 min-width: 100upx;
-                font-weight: 500;
                 flex: 1;
             }
             &.cell-balance {
                 text-align: right;
                 min-width: 100upx;
-                font-weight: 500;
                 padding-right: 32upx;
                 flex: 1;
             }

+ 1 - 0
hdApp/src/pages.json

@@ -362,6 +362,7 @@
 				{ "path": "customerPlace", "style": { "navigationBarTitleText": "开单" } },
 				{ "path": "priceChange", "style": { "navigationBarTitleText": "改价", "enablePullDownRefresh": true } },
 				{ "path": "result", "style": { "navigationBarTitleText": "开单状态" } },
+				{ "path": "resultCp", "style": { "navigationBarTitleText": "成功" } },
 				{ "path": "remind", "style": { "navigationBarTitleText": "提示" } },
 				{ "path": "affirm", "style": { "navigationBarTitleText": "确认订单信息" } },
 				{ "path": "toPay", "style": { "navigationBarTitleText": "等待付款" } },