shish há 1 ano atrás
pai
commit
fb6a810928

+ 79 - 0
hdApp/src/admin/custom/balanceChange.vue

@@ -0,0 +1,79 @@
+<template>
+    <view class="app-content">
+            <block v-if="!$util.isEmpty(list.data)">
+                <t-table :headerBackgroundColor="'#F0F2F6'">
+                    <t-tr header>
+                        <t-th>日期</t-th>
+                        <t-th><view style="width:180upx;">事项</view></t-th>
+                        <t-th>人员</t-th>
+                        <t-th>变动</t-th>
+                        <t-th>余额</t-th>
+                        <t-th>备注</t-th>
+                    </t-tr>
+                    <view v-for="(item, index) in list.data" :key="index" @click="goDetail(item)">
+                        <t-tr>
+                            <t-td align="center" color="info"><view >{{ item.addTime.substr(5,11) }}</view></t-td>
+                            <t-td align="center" color="info"><view style="width:180upx;">{{ item.event }}</view></t-td>
+                            <t-td align="center" color="info"><view >{{ item.staffName }}</view></t-td>
+                            <t-td align="center" color="info"><view >{{ item.amount }}</view></t-td>
+                            <t-td align="center" color="info"><view >{{ parseFloat(item.balance) }}</view></t-td>
+                            <t-td align="center" color="info"><view >{{ item.remark }}</view></t-td>
+                        </t-tr>
+                    </view>
+                </t-table>
+            </block>
+            <block v-else>
+                <AppWrapperEmpty title="暂无数据" :is-empty="$util.isEmpty(list.data)" />
+            </block>
+        </view>
+    </template>
+    <script>
+    import AppWrapperEmpty from "@/components/app-wrapper-empty";
+    import { getCustomBalanceChange } from '@/api/custom'
+    import list from '@/mixins/list'
+    export default {
+        name: "balanceChange",
+        components: {
+            AppWrapperEmpty
+        },
+        mixins:[list],
+        data() {
+            return {
+            };
+        },
+        methods: {
+            async init(){
+                const res = await getCustomBalanceChange({ page:this.list.page,customId:this.option.customId })
+                if (this.$util.isEmpty(res.data.list)){
+                    this.completes(res)
+                    return
+                }
+                let currentList = res.data.list
+                currentList.forEach(function(item,index,array){
+                    array[index].amount = item.io == 0 ? '-'+parseFloat(item.amount) : '+'+parseFloat(item.amount)
+                });
+                res.data.list = currentList
+                this.completes(res)
+            },
+            goDetail(item){
+                if(item.capitalType == 64){
+                    this.$util.pageTo({url: "/admin/clear/customInfo?id="+item.relateId})
+                }
+            }
+        },
+        async onPullDownRefresh() {
+            this.resetList();
+            await this.init()
+            uni.stopPullDownRefresh();
+        },
+        async onReachBottom() {
+            if (!this.list.finished) {
+                await this.init()
+                uni.stopPullDownRefresh();;
+            } else {
+                uni.stopPullDownRefresh();
+            }
+        }
+    };
+    </script>
+    <style lang="scss" scoped></style>

+ 81 - 0
hdApp/src/admin/custom/rechargeChange.vue

@@ -0,0 +1,81 @@
+<template>
+    <view class="app-content">
+            <block v-if="!$util.isEmpty(list.data)">
+                <t-table :headerBackgroundColor="'#F0F2F6'">
+                    <t-tr header>
+                        <t-th>日期</t-th>
+                        <t-th>场景</t-th>
+                        <t-th>人员</t-th>
+                        <t-th>状态</t-th>
+                        <t-th>金额</t-th>
+                        <t-th>充后余额</t-th>
+                        <t-th>备注</t-th>
+                    </t-tr>
+                    <view v-for="(item, index) in list.data" :key="index" @click="goDetail(item)">
+                        <t-tr>
+                            <t-td align="center" color="info"><view >{{ item.addTime.substr(5,11) }}</view></t-td>
+                            <t-td align="center" color="info"><view >{{ item.onlinePay == 2 ? '线上' : '线下'}}<view>{{ item.payWay==0?'微信':item.payWay == 1 ?'支付宝':''}}</view></view></t-td>
+                            <t-td align="center" color="info"><view >{{ item.staffName }}</view></t-td>
+                            <t-td align="center" color="info"><view >{{ item.payStatus == 1 ? '已付款' : '待付款' }}</view></t-td>
+                            <t-td align="center" color="info"><view >{{ item.amount }}{{item.rechargeType==1?'返':''}}</view></t-td>
+                            <t-td align="center" color="info"><view >{{ item.payStatus == 1 ? parseFloat(item.balance):'' }}</view></t-td>
+                            <t-td align="center" color="info"><view >{{ item.remark }}</view></t-td>
+                        </t-tr>
+                    </view>
+                </t-table>
+            </block>
+            <block v-else>
+                <AppWrapperEmpty title="暂无数据" :is-empty="$util.isEmpty(list.data)" />
+            </block>
+        </view>
+    </template>
+    <script>
+    import AppWrapperEmpty from "@/components/app-wrapper-empty";
+    import { getCustomRechargeChange } from '@/api/custom'
+    import list from '@/mixins/list'
+    export default {
+        name: "balanceChange",
+        components: {
+            AppWrapperEmpty
+        },
+        mixins:[list],
+        data() {
+            return {
+            };
+        },
+        methods: {
+            async init(){
+                const res = await getCustomRechargeChange({ page:this.list.page,customId:this.option.customId })
+                if (this.$util.isEmpty(res.data.list)){
+                    this.completes(res)
+                    return
+                }
+                let currentList = res.data.list
+                currentList.forEach(function(item,index,array){
+                    array[index].amount = item.io == 0 ? '-'+parseFloat(item.amount) : '+'+parseFloat(item.amount)
+                });
+                res.data.list = currentList
+                this.completes(res)
+            },
+            goDetail(item){
+                if(item.capitalType == 64){
+                    this.$util.pageTo({url: "/admin/clear/customInfo?id="+item.relateId})
+                }
+            }
+        },
+        async onPullDownRefresh() {
+            this.resetList();
+            await this.init()
+            uni.stopPullDownRefresh();
+        },
+        async onReachBottom() {
+            if (!this.list.finished) {
+                await this.init()
+                uni.stopPullDownRefresh();;
+            } else {
+                uni.stopPullDownRefresh();
+            }
+        }
+    };
+    </script>
+    <style lang="scss" scoped></style>

+ 39 - 24
hdApp/src/admin/member/detail.vue

@@ -15,10 +15,27 @@
         </div>
       </div>
       <div class="user-bottom">
-        <div class="data-list" v-for="(item, index) in fundsData" :key="index">
-          <div class="app-size-30 app-bold">{{ item.value }}</div>
-          <div class="app-color-3">{{ item.name }}</div>
+
+        <div class="data-list">
+          <div class="app-size-30 app-bold">{{ balance }}</div>
+          <div class="app-color-3">余额</div>
+        </div>
+
+        <div class="data-list">
+          <div class="app-size-30 app-bold">{{ buyAmount }}</div>
+          <div class="app-color-3">累计消费</div>
+        </div>
+
+        <div class="data-list">
+          <div class="app-size-30 app-bold">{{ growth }}</div>
+          <div class="app-color-3">成长值</div>
         </div>
+
+        <div class="data-list">
+          <div class="app-size-30 app-bold">{{ debtAmount }}</div>
+          <div class="app-color-3">欠款</div>
+        </div>
+
       </div>
     </div>
 
@@ -67,6 +84,12 @@
         <tui-list-cell @click="pageTo({ url: '/admin/order/debtList?id='+data.id })" class="line-cell" :hover="false" :arrow="true" >
             <view class="tui-title">赊账订单</view>
         </tui-list-cell>
+        <tui-list-cell @click="pageTo({ url: '/admin/custom/rechargeChange?id='+data.id })" class="line-cell" :hover="false" :arrow="true" >
+            <view class="tui-title">充值记录</view>
+        </tui-list-cell>
+        <tui-list-cell @click="pageTo({ url: '/admin/custom/balanceChange?id='+data.id })" class="line-cell" :hover="false" :arrow="true" >
+            <view class="tui-title">余额明细</view>
+        </tui-list-cell>
       </view>
     </view>
 
@@ -254,6 +277,10 @@ export default {
   props: {},
   data() {
     return {
+      growth:0,
+      debtAmount:0,
+      buyAmount:0,
+      balance:0,
       constant: this.$constant,
       data: {},
       rechargeModal: false,
@@ -261,20 +288,6 @@ export default {
       passwordModal: false,
       upgradeModal: false,
       remarkModal: false,
-      fundsData: [
-        {
-          name: "成长值",
-          value: 0
-        },
-        {
-          name: "欠款",
-          value: 0
-        },
-        {
-          name: "累计消费",
-          value: 0
-        }
-      ],
       tabsData: [
         {
           name: "优惠券",
@@ -351,7 +364,6 @@ export default {
 			this.rForm.rechargeAmount = amount
 		},
     toRecharge(e){
-      let that = this
       if(e.index === 0){
         this.rechargeModal = false
         return false
@@ -364,6 +376,7 @@ export default {
         this.$msg('充值金额要大于0')
         return false
       }
+      uni.showToast({mask:true})
       toManRecharge({amount:this.rForm.rechargeAmount,remark:this.rForm.rechargeRemark,payWay:this.rForm.rechargePayWay,customId:this.option.id}).then(res=>{
         if(res.code == 1){
           this.rechargeModal = false
@@ -371,6 +384,7 @@ export default {
           this.rForm.rechargeAmount = ''
           this.rForm.rechargeRemark = ''
           this.rForm.rechargePayWay = 0
+          this.init()
         }
       })
     },
@@ -416,8 +430,8 @@ export default {
       this.userTagModal = true;
     },
     init() {
-      this.getCustomInfo();
-      getLevel();
+      this.getCustomInfo()
+      getLevel()
     },
     getCustomInfo() {
       getUserDet({ userId: this.option.id }).then(res => {
@@ -425,10 +439,11 @@ export default {
           return false;
         }
         this.data = res.data;
-        this.fundsData[0].value = res.data.growth?parseFloat(res.data.growth):0;
-        this.fundsData[1].value = res.data.debtAmount?parseFloat(res.data.debtAmount):0;
-        this.fundsData[2].value = res.data.buyAmount?parseFloat(res.data.buyAmount):0;
-      });
+        this.growth = res.data.growth?parseFloat(res.data.growth):0;
+        this.debtAmount = res.data.debtAmount?parseFloat(res.data.debtAmount):0;
+        this.buyAmount = res.data.buyAmount?parseFloat(res.data.buyAmount):0;
+        this.balance = res.data.balance?parseFloat(res.data.balance):0;
+      })
     },
     _upgrade() {
       upgrade({

+ 3 - 1
hdApp/src/pages.json

@@ -43,7 +43,9 @@
 		{
 			"root": "admin/custom",
 			"pages": [
-				{"path": "addCustom","style": {"navigationBarTitleText": "添加客户"}}
+				{"path": "addCustom","style": {"navigationBarTitleText": "添加客户"}},
+				{"path": "balanceChange","style": {"navigationBarTitleText": "余额变动明细"}},
+				{"path": "rechargeChange","style": {"navigationBarTitleText": "充值记录"}}
 			]
 		},
 		{

+ 2 - 1
mallApp/src/pages.json

@@ -23,7 +23,8 @@
         {
             "root": "pages/member",
             "pages": [
-                { "path": "recharge", "style": { "navigationBarTitleText": "充值活动" } }
+                { "path": "recharge", "style": { "navigationBarTitleText": "充值活动" } },
+                { "path": "rechargeResult", "style": { "navigationBarTitleText": "结果" } }
             ]
         },
         {

+ 1 - 5
mallApp/src/pages/member/recharge.vue

@@ -202,20 +202,16 @@ export default {
 		focusFn() {
 			this.inpFocus = true
 		},
-		// 失焦
 		blurFn() {
 			this.inpFocus = false
 		},
-		// 点击键盘
 		clickKeyFn(val) {
 			this.amount = val
 		},
-		// 支付宝支付
 		aliPayFn() {
 			this.payWay = 1
 			this.toPay()
 		},
-		// 微信支付
 		wexinPayFn() {
 
 			let platformType = uni.getSystemInfoSync().platform
@@ -247,7 +243,7 @@ export default {
 			}				
 		},
 		paySuccess() {
-			this.$util.pageTo({url: '/admin/ghs/result?id='+this.id+'&salt='+this.salt,type: 2})
+			this.$util.pageTo({url: '/pages/member/rechargeResult?id='+this.id+'&salt='+this.salt,type: 2})
 		},
 		payFail() {
 		}

+ 158 - 0
mallApp/src/pages/member/rechargeResult.vue

@@ -0,0 +1,158 @@
+<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>
+  export default {
+    name: "rechargeResult",
+    data() {
+      return {
+
+      }
+    },
+    computed: {
+
+    },
+    onLoad() {
+      
+    },
+    methods: {
+      init(){
+      },
+      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>