shish před 1 rokem
rodič
revize
e3beec1e7f

+ 16 - 10
hdApp/src/admin/custom/balanceChange.vue

@@ -8,17 +8,22 @@
                         <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>
                     </t-tr>
-                    <view v-for="(item, index) in list.data" :key="index" @click="goDetail(item)">
+                    <view v-for="(item, index) in list.data" :key="index">
                         <t-tr>
                         <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.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 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.staffName }}</view></t-td>
                             <t-td align="center" color="info"><view >{{ item.amount }}</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 >{{ parseFloat(item.balance) }}</view></t-td>
-                            <t-td align="center" color="info"><view >{{ item.remark }}</view></t-td>
                         </t-tr>
                         </t-tr>
+                        <block v-if="!$util.isEmpty(item.remark)">
+                            <t-tr>
+                                <t-td align="center" color="info">
+                                    <view style="text-align: left;color:red;">备注:{{ item.remark }}</view>
+                                </t-td>
+                            </t-tr>
+                        </block>
                     </view>
                     </view>
                 </t-table>
                 </t-table>
             </block>
             </block>
@@ -29,7 +34,7 @@
     </template>
     </template>
     <script>
     <script>
     import AppWrapperEmpty from "@/components/app-wrapper-empty";
     import AppWrapperEmpty from "@/components/app-wrapper-empty";
-    import { getCustomBalanceChange } from '@/api/custom'
+    import { getBalanceChangeList } from '@/api/custom'
     import list from '@/mixins/list'
     import list from '@/mixins/list'
     export default {
     export default {
         name: "balanceChange",
         name: "balanceChange",
@@ -43,19 +48,20 @@
         },
         },
         methods: {
         methods: {
             async init(){
             async init(){
-                const res = await getCustomBalanceChange({ page:this.list.page,customId:this.option.customId })
+                let id = this.option.id ? this.option.id : 0
+                const res = await getBalanceChangeList({ page:this.list.page,customId:id })
                 if (this.$util.isEmpty(res.data.list)){
                 if (this.$util.isEmpty(res.data.list)){
                     this.completes(res)
                     this.completes(res)
                     return
                     return
                 }
                 }
                 let currentList = res.data.list
                 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
                 res.data.list = currentList
                 this.completes(res)
                 this.completes(res)
-            },
-            goDetail(item){
-                if(item.capitalType == 64){
-                    this.$util.pageTo({url: "/admin/clear/customInfo?id="+item.relateId})
-                }
             }
             }
         },
         },
         async onPullDownRefresh() {
         async onPullDownRefresh() {

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

@@ -41,7 +41,8 @@
         },
         },
         methods: {
         methods: {
             async init(){
             async init(){
-                const res = await getMemberChange({ page:this.list.page,customId:this.option.customId })
+                let id = this.option.id ? this.option.id : 0
+                const res = await getMemberChange({ page:this.list.page,customId:id })
                 if (this.$util.isEmpty(res.data.list)){
                 if (this.$util.isEmpty(res.data.list)){
                     this.completes(res)
                     this.completes(res)
                     return
                     return
@@ -52,9 +53,9 @@
             }
             }
         },
         },
         async onPullDownRefresh() {
         async onPullDownRefresh() {
-            this.resetList();
+            this.resetList()
             await this.init()
             await this.init()
-            uni.stopPullDownRefresh();
+            uni.stopPullDownRefresh()
         },
         },
         async onReachBottom() {
         async onReachBottom() {
             if (!this.list.finished) {
             if (!this.list.finished) {

+ 15 - 14
hdApp/src/admin/custom/rechargeChange.vue

@@ -8,19 +8,24 @@
                         <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-th>备注</t-th>
+                        <t-th>赠送</t-th>
                     </t-tr>
                     </t-tr>
-                    <view v-for="(item, index) in list.data" :key="index" @click="goDetail(item)">
+                    <view v-for="(item, index) in list.data" :key="index">
                         <t-tr>
                         <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.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.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.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.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-td align="center" color="info"><view >{{ item.amount }}</view></t-td>
+                            <t-td align="center" color="info"><view >{{ item.giveAmount>0 ? parseFloat(item.giveAmount) : '-' }}</view></t-td>
                         </t-tr>
                         </t-tr>
+                        <block v-if="!$util.isEmpty(item.remark)">
+                        <t-tr>
+                            <t-td align="center" color="info">
+                                <view style="text-align: left;color:red;">备注:{{ item.remark }}</view>
+                            </t-td>
+                        </t-tr>
+                        </block>
                     </view>
                     </view>
                 </t-table>
                 </t-table>
             </block>
             </block>
@@ -31,10 +36,10 @@
     </template>
     </template>
     <script>
     <script>
     import AppWrapperEmpty from "@/components/app-wrapper-empty";
     import AppWrapperEmpty from "@/components/app-wrapper-empty";
-    import { getCustomRechargeChange } from '@/api/custom'
+    import { rechargeList } from '@/api/recharge'
     import list from '@/mixins/list'
     import list from '@/mixins/list'
     export default {
     export default {
-        name: "balanceChange",
+        name: "rechargeBalance",
         components: {
         components: {
             AppWrapperEmpty
             AppWrapperEmpty
         },
         },
@@ -45,7 +50,8 @@
         },
         },
         methods: {
         methods: {
             async init(){
             async init(){
-                const res = await getCustomRechargeChange({ page:this.list.page,customId:this.option.customId })
+                let id = this.option.id ? this.option.id : 0
+                const res = await rechargeList({ page:this.list.page,customId:id })
                 if (this.$util.isEmpty(res.data.list)){
                 if (this.$util.isEmpty(res.data.list)){
                     this.completes(res)
                     this.completes(res)
                     return
                     return
@@ -56,11 +62,6 @@
                 });
                 });
                 res.data.list = currentList
                 res.data.list = currentList
                 this.completes(res)
                 this.completes(res)
-            },
-            goDetail(item){
-                if(item.capitalType == 64){
-                    this.$util.pageTo({url: "/admin/clear/customInfo?id="+item.relateId})
-                }
             }
             }
         },
         },
         async onPullDownRefresh() {
         async onPullDownRefresh() {

+ 1 - 0
hdApp/src/admin/home/member.vue

@@ -31,6 +31,7 @@
                         <span class="amount_num">-¥{{parseFloat(item.debtAmount)}}</span>
                         <span class="amount_num">-¥{{parseFloat(item.debtAmount)}}</span>
                       </span>
                       </span>
                     </span>
                     </span>
+                    <text v-if="!$util.isEmpty(item.memberName)" style="color:#3385FF;font-weight:bold;margin-left:20upx;">{{ item.memberName }}</text>
                   </div>
                   </div>
                 </div>
                 </div>
               </div>
               </div>

+ 19 - 13
hdApp/src/admin/member/detail.vue

@@ -13,18 +13,21 @@
             <div class="app-color-3">ID:{{ data.id }}</div>
             <div class="app-color-3">ID:{{ data.id }}</div>
           </div>
           </div>
           <div class="source-wrap">
           <div class="source-wrap">
-            <text style="font-weight:bold;font-size:30upx;color:#3385ff;">{{ data.memberName }} {{ data.discount }}</text>
+            <text style="font-weight:bold;font-size:30upx;color:#3385ff;">
+              {{ data.memberName }}
+              <text v-if="Number(data.discount)>0 && Number(data.discount)<1" style="margin-left:10upx;">{{ data.discount*100 }}折</text>
+            </text>
           </div>
           </div>
         </div>
         </div>
       </div>
       </div>
       <div class="user-bottom">
       <div class="user-bottom">
 
 
-        <div class="data-list">
+        <div class="data-list" @click="pageTo({ url: '/admin/custom/balanceChange?id='+data.id })">
           <div class="app-size-30 app-bold">{{ balance }}</div>
           <div class="app-size-30 app-bold">{{ balance }}</div>
           <div class="app-color-3">余额</div>
           <div class="app-color-3">余额</div>
         </div>
         </div>
 
 
-        <div class="data-list">
+        <div class="data-list" @click="pageTo({ url: '/admin/order/debtList?id='+data.id })">
           <div class="app-size-30 app-bold">{{ debtAmount }}</div>
           <div class="app-size-30 app-bold">{{ debtAmount }}</div>
           <div class="app-color-3">欠款</div>
           <div class="app-color-3">欠款</div>
         </div>
         </div>
@@ -401,16 +404,19 @@ export default {
         this.$msg('充值金额要大于0')
         this.$msg('充值金额要大于0')
         return false
         return false
       }
       }
-      uni.showLoading({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
-          this.$msg('充值成功')
-          this.rForm.rechargeAmount = ''
-          this.rForm.rechargeRemark = ''
-          this.rForm.rechargePayWay = 0
-          this.init()
-        }
+      this.$util.confirmModal({content:'确认充值?'},() => {
+        uni.showLoading({mask:true})
+        toManRecharge({amount:this.rForm.rechargeAmount,remark:this.rForm.rechargeRemark,payWay:this.rForm.rechargePayWay,customId:this.option.id}).then(res=>{
+          uni.hideLoading()
+          if(res.code == 1){
+            this.rechargeModal = false
+            this.$msg('充值成功')
+            this.rForm.rechargeAmount = ''
+            this.rForm.rechargeRemark = ''
+            this.rForm.rechargePayWay = 0
+            this.init()
+          }
+        })
       })
       })
     },
     },
     callMobile() {
     callMobile() {

+ 4 - 0
hdApp/src/api/custom/index.js

@@ -1,5 +1,9 @@
 import https from '@/plugins/luch-request_0.0.7/request'
 import https from '@/plugins/luch-request_0.0.7/request'
 
 
+export const getBalanceChangeList = data => {
+	return https.get('/balance-change/list', data)
+}
+
 //修改会员等级
 //修改会员等级
 export const changeMemberLevel = data => {
 export const changeMemberLevel = data => {
 	return https.get('/custom/change-level', data)
 	return https.get('/custom/change-level', data)