Browse Source

欠款变动记录

shish 1 year ago
parent
commit
ce351b5ca5

+ 77 - 0
hdApp/src/admin/custom/debtChange.vue

@@ -0,0 +1,77 @@
+<template>
+<view class="app-content">
+		<block v-if="!$util.isEmpty(list.data)">
+			<t-table :headerBackgroundColor="'#F0F2F6'">
+				<t-tr header>
+					<t-th><view style="width:150upx;">创建 / 账单</view></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 style="width:150upx;">
+								<view style="width:100%;">{{ item.addTime.substr(5,11) }}</view>
+							</view>
+						</t-td>
+						<t-td align="center" color="info"><view style="width:200upx;">{{ 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 { debtRecordList } from '@/api/custom'
+import list from '@/mixins/list'
+export default {
+	name: "debtChange",
+	components: {
+		AppWrapperEmpty
+	},
+	mixins:[list],
+	data() {
+		return {
+		};
+	},
+	methods: {
+		async init(){
+			const res = await debtRecordList({ 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>

+ 3 - 0
hdApp/src/admin/member/detail.vue

@@ -97,6 +97,9 @@
         <tui-list-cell @click="pageTo({ url: '/admin/custom/levelChange?id='+data.id })" class="line-cell" :hover="false" :arrow="true" >
         <tui-list-cell @click="pageTo({ url: '/admin/custom/levelChange?id='+data.id })" class="line-cell" :hover="false" :arrow="true" >
             <view class="tui-title">等级变动记录</view>
             <view class="tui-title">等级变动记录</view>
         </tui-list-cell>
         </tui-list-cell>
+        <tui-list-cell @click="pageTo({ url: '/admin/custom/debtChange?customId='+data.id })" class="line-cell" :hover="false" :arrow="true" >
+            <view class="tui-title">欠款变动记录(废弃)</view>
+        </tui-list-cell>
       </view>
       </view>
     </view>
     </view>
 
 

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

@@ -23,4 +23,8 @@ export const changeName = data => {
 
 
 export const modifyAddress = data => {
 export const modifyAddress = data => {
 	return https.post('/custom/modify-address', data)
 	return https.post('/custom/modify-address', data)
+}
+
+export const debtRecordList = data => {
+	return https.get('/custom-debt-record/list', data)
 }
 }

+ 1 - 0
hdApp/src/pages.json

@@ -46,6 +46,7 @@
 				{"path": "addCustom","style": {"navigationBarTitleText": "添加客户"}},
 				{"path": "addCustom","style": {"navigationBarTitleText": "添加客户"}},
 				{"path": "selectCustom","style": {"navigationBarTitleText": "选择客户"}},
 				{"path": "selectCustom","style": {"navigationBarTitleText": "选择客户"}},
 				{"path": "balanceChange","style": {"navigationBarTitleText": "余额变动明细"}},
 				{"path": "balanceChange","style": {"navigationBarTitleText": "余额变动明细"}},
+				{"path": "debtChange","style": {"navigationBarTitleText": "欠款变动明细"}},
 				{"path": "rechargeChange","style": {"navigationBarTitleText": "充值记录"}},
 				{"path": "rechargeChange","style": {"navigationBarTitleText": "充值记录"}},
 				{"path": "levelChange","style": {"navigationBarTitleText": "等级变动记录"}}
 				{"path": "levelChange","style": {"navigationBarTitleText": "等级变动记录"}}
 			]
 			]