shish 2 years ago
parent
commit
416b17bae8

+ 79 - 0
ghsApp/src/admin/custom/rechargeChange.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>场景</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></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 { 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>

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

@@ -4,6 +4,10 @@ export const getCustomBalanceChange = data => {
 	return https.get('/custom-balance-change/list', data)
 }
 
+export const getCustomRechargeChange = data => {
+	return https.get('/custom-recharge/list', data)
+}
+
 export const getCustomRechargeList = data => {
 	return https.get('/custom-recharge/list', data)
 }

+ 1 - 0
ghsApp/src/pages.json

@@ -58,6 +58,7 @@
 				{"path": "visit","style": {"navigationBarTitleText": "今日访客"}},
 				{"path": "debtChange","style": {"navigationBarTitleText": "欠款变动明细","enablePullDownRefresh": false}},
 				{"path": "balanceChange","style": {"navigationBarTitleText": "余额变动明细","enablePullDownRefresh": false}},
+				{"path": "rechargeChange","style": {"navigationBarTitleText": "充值记录","enablePullDownRefresh": false}},
 				{"path": "addStaff","style": {"navigationBarTitleText": "帮客户添加员工"}}
 			]
 		},

+ 6 - 2
ghsApp/src/pagesClient/member/detail.vue

@@ -76,6 +76,10 @@
               <div class="tui-title">结账记录</div>
             </tui-list-cell>
 
+            <tui-list-cell class="line-cell" :hover="false" :arrow="true" @click="pageTo({url:'/admin/order/itemOrder?customId='+userInfo.id})">
+              <div class="tui-title">下单记录</div>
+            </tui-list-cell>
+
             <tui-list-cell class="line-cell" :hover="false" :arrow="true" @click="pageTo({ url: '/admin/custom/debtChange',query: {customId: userInfo.id}})">
               <div class="tui-title">欠款变动明细</div>
             </tui-list-cell>
@@ -84,8 +88,8 @@
               <div class="tui-title">余额变动明细</div>
             </tui-list-cell>
 
-            <tui-list-cell class="line-cell" :hover="false" :arrow="true" @click="pageTo({url:'/admin/order/itemOrder?customId='+userInfo.id})">
-              <div class="tui-title">下单记录</div>
+            <tui-list-cell class="line-cell" :hover="false" :arrow="true" @click="pageTo({ url: '/admin/custom/rechargeChange?customId='+userInfo.id})">
+              <div class="tui-title">充值记录</div>
             </tui-list-cell>
 
             <tui-list-cell class="line-cell" :hover="false">