shish %!s(int64=2) %!d(string=hai) anos
pai
achega
31843a4242

+ 2 - 2
hdApp/src/admin/ghs/pay.vue

@@ -110,8 +110,8 @@
 					actPrice: this.amount,
 					payWay: this.payWay,
 				}
-				let miniOpenId = uni.getStorageSync('miniOpenId')
-				params.miniOpenId = miniOpenId
+				let currentMiniOpenId = uni.getStorageSync('currentMiniOpenId')
+				params.currentMiniOpenId = currentMiniOpenId
 				params.ghsId = this.id
 				params.salt = this.salt
 				rechargeFn(params).then(res => {

+ 73 - 0
hdApp/src/admin/ghs/rechargeChange.vue

@@ -0,0 +1,73 @@
+<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:230upx;">事项</view></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:230upx;">{{ item.event }}</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-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 { getRechargeList } from '@/api/ghs'
+import list from '@/mixins/list'
+export default {
+	name: "debtChange",
+	components: {
+		AppWrapperEmpty
+	},
+	mixins:[list],
+	data() {
+		return {
+		};
+	},
+	methods: {
+		async init(){
+			const res = await getRechargeList({ page:this.list.page,ghsId:this.option.ghsId })
+			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){
+		}
+	},
+	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>

+ 5 - 0
hdApp/src/admin/home/workbench.vue

@@ -258,6 +258,7 @@
   <uni-popup ref="toShowMore" background-color="#fff" type="center" :animation="true" class="class-popup-style">
 			<view style="display:flex;width:100vw;padding:20upx 20upx 40upx 20upx;height:auto;justify-content: space-between;align-items:center;flex-wrap:wrap;max-height:100vh;overflow:auto;">
 				<view style="width:100vw;margin-top:8upx;"><button @click="balanceChange()">余额变动记录</button></view>
+        <view style="width:100vw;margin-top:8upx;"><button @click="rechargeChange()">充值记录</button></view>
 				<view style="width:100vw;margin-top:8upx;"><button @click="bpSj()">屏蔽此商家</button></view>
         <view style="width:100vw;margin-top:8upx;"><button @click="recharge()">充值销账</button></view>
 				<view style="width:100vw;margin-top:30upx;"><button @click="closeToShow()">取消</button></view>
@@ -472,6 +473,10 @@ export default {
       this.closeToShow()
       this.pageTo({url: '/admin/ghs/balanceChange?ghsId='+info.id})
     },
+    rechargeChange(){
+      this.closeToShow()
+      this.pageTo({url: '/admin/ghs/rechargeChange?ghsId='+this.currentGhs.id})
+    },
     balanceChange(){
       this.closeToShow()
       this.pageTo({url: '/admin/ghs/balanceChange?ghsId='+this.currentGhs.id})

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

@@ -60,4 +60,8 @@ export const debtChangeList = data => {
 
 export const balanceChangeList = data => {
 	return https.get('/ghs-balance-change/list', data)
+}
+
+export const getRechargeList = data => {
+	return https.get('/ghs-recharge/list', data)
 }

+ 2 - 1
hdApp/src/pages.json

@@ -169,7 +169,8 @@
 				{ "path": "pay", "style": {"navigationBarTitleText": "收银台"}},
 				{ "path": "addGhs", "style": {"navigationBarTitleText": "添加"}},
 				{ "path": "debtChange", "style": {"navigationBarTitleText": "欠款变动明细"}},
-				{ "path": "balanceChange", "style": {"navigationBarTitleText": "余额变动明细"}}
+				{ "path": "balanceChange", "style": {"navigationBarTitleText": "余额变动明细"}},
+				{ "path": "rechargeChange", "style": {"navigationBarTitleText": "充值记录"}}
 			]
 		},
 		{