tmp commit

This commit is contained in:
donqi 2023-03-05 23:50:28 +08:00
parent b25402c91c
commit 9c031bf97d
1 changed files with 42 additions and 3 deletions

View File

@ -5,6 +5,16 @@
<block slot="backText">返回</block> <block slot="backText">返回</block>
<block slot="content">我的钱包</block> <block slot="content">我的钱包</block>
</cu-custom> </cu-custom>
<view class="padding-tb bg-white solid-bottom">
<view class="flex justify-between align-center margin-top-xs padding-left">
<my-uni-combox class="flex-sub margin-right-xs" :candidates="billingStateList"
:showField="'name'" placeholder="筛选账单状态" v-model="billingStateObj"
@input="chooseBillingState($event)"></my-uni-combox>
<view class="text-xl text-bold">
<text class="cuIcon-search margin-right-sm" @click="searchBills"></text>
</view>
</view>
</view>
<uni-collapse v-model="openStatusArr[index]" ref="collapse" v-for="(billItem, index) in bill"> <uni-collapse v-model="openStatusArr[index]" ref="collapse" v-for="(billItem, index) in bill">
<uni-collapse-item> <uni-collapse-item>
<template v-slot:title> <template v-slot:title>
@ -36,12 +46,28 @@
</template> </template>
<script> <script>
import myUniCombox from '@/components/uni-combox/my-uni-combox.vue';
export default { export default {
components: {
myUniCombox
},
data() { data() {
return { return {
openStatusArr: [], //01 openStatusArr: [], //01
bill: [], bill: [],
curUserInfo: {} curUserInfo: {},
billingStateList: [{
code: 1,
name: '待到帐'
},{
code: 6,
name: '已取消'
},{
code: 5,
name: '已到帐'
}],
billingStateObj: null
} }
}, },
onLoad() { onLoad() {
@ -49,13 +75,18 @@
}, },
methods: { methods: {
async loadData() { async loadData() {
//
this.curUserInfo = this.$request.getCurUserInfo(); this.curUserInfo = this.$request.getCurUserInfo();
//
this.qryBills();
},
async qryBills(params = {}) {
let billRes = await this.$request.qryFinancialCount({ let billRes = await this.$request.qryFinancialCount({
financialDetailTypes: [3], financialDetailTypes: [3],
workerId: this.curUserInfo.customerId workerId: this.curUserInfo.customerId,
...params
}); });
this.bill = billRes.data; this.bill = billRes.data;
this.openStatusArr = [];
for (let i = 0; i < this.bill.length; i++) { for (let i = 0; i < this.bill.length; i++) {
this.openStatusArr.push('1'); this.openStatusArr.push('1');
} }
@ -98,6 +129,14 @@
uni.navigateTo({ uni.navigateTo({
url: '/pages/my/statement-desc?statementDesc=' + encodeURIComponent(JSON.stringify(item)) url: '/pages/my/statement-desc?statementDesc=' + encodeURIComponent(JSON.stringify(item))
}) })
},
chooseBillingState(e) {
this.billingStateObj = e;
},
searchBills() {
this.qryBills({
billingState: this.billingStateObj ? this.billingStateObj.code : null
});
} }
}, },
} }