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="content">我的钱包</block>
</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-item>
<template v-slot:title>
@ -36,12 +46,28 @@
</template>
<script>
import myUniCombox from '@/components/uni-combox/my-uni-combox.vue';
export default {
components: {
myUniCombox
},
data() {
return {
openStatusArr: [], //01
bill: [],
curUserInfo: {}
curUserInfo: {},
billingStateList: [{
code: 1,
name: '待到帐'
},{
code: 6,
name: '已取消'
},{
code: 5,
name: '已到帐'
}],
billingStateObj: null
}
},
onLoad() {
@ -49,13 +75,18 @@
},
methods: {
async loadData() {
//
this.curUserInfo = this.$request.getCurUserInfo();
//
this.qryBills();
},
async qryBills(params = {}) {
let billRes = await this.$request.qryFinancialCount({
financialDetailTypes: [3],
workerId: this.curUserInfo.customerId
workerId: this.curUserInfo.customerId,
...params
});
this.bill = billRes.data;
this.openStatusArr = [];
for (let i = 0; i < this.bill.length; i++) {
this.openStatusArr.push('1');
}
@ -98,6 +129,14 @@
uni.navigateTo({
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
});
}
},
}