Bläddra i källkod

欠款变动记录

shish 3 år sedan
förälder
incheckning
7c15577700
2 ändrade filer med 74 tillägg och 0 borttagningar
  1. 73 0
      ghsApp/src/admin/shop/debtChange.vue
  2. 1 0
      ghsApp/src/pages.json

+ 73 - 0
ghsApp/src/admin/shop/debtChange.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 { debtChangeList } from '@/api/custom'
+import list from '@/mixins/list'
+export default {
+	name: "debtChange",
+	components: {
+		AppWrapperEmpty
+	},
+	mixins:[list],
+	data() {
+		return {
+		};
+	},
+	methods: {
+		async init(){
+			const res = await debtChangeList({ 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){
+		}
+	},
+	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>

+ 1 - 0
ghsApp/src/pages.json

@@ -164,6 +164,7 @@
 				{"path": "changeShop","style": {"navigationBarTitleText": "切换门店"}},
 				{"path": "changeShop","style": {"navigationBarTitleText": "切换门店"}},
 				{"path": "sk","style": {"navigationBarTitleText": "自用门店设置"}},
 				{"path": "sk","style": {"navigationBarTitleText": "自用门店设置"}},
 				{"path": "password","style": {"navigationBarTitleText": "密码修改"}},
 				{"path": "password","style": {"navigationBarTitleText": "密码修改"}},
+				{"path": "debtChange","style": {"navigationBarTitleText": "欠款变动记录"}},
 				{"path": "selectShop","style": {"navigationBarTitleText": "选择门店"}}
 				{"path": "selectShop","style": {"navigationBarTitleText": "选择门店"}}
 			]
 			]
 		},
 		},