This commit is contained in:
=
2025-03-07 11:17:13 +08:00
parent 61357693b8
commit 55e9010fb5
@@ -22,17 +22,31 @@ layout("/mobile/platform.html"){
finished-text="没有更多了" finished-text="没有更多了"
@load="pageData" @load="pageData"
> >
<van-cell-group inset> <van-cell-group>
<van-cell v-for="item in tableData" :value="item.isPayment?'已缴':'未缴'"> <van-swipe-cell v-for="item in tableData">
<template #left>
<van-button @click="sendPaymentMsg(item)" style="height: 100%" square type="info" text="催缴" />
</template>
<van-cell >
<template #title> <template #title>
<span class="custom-title">{{item.username}}</span> <span class="custom-title">{{item.username}}</span>({{item.loginname}})
<van-tag type="danger">{{item.isPayment?'已缴':'未缴'}}</van-tag> <van-tag :type="item.isPayment?'primary':'danger'">{{item.isPayment?'已缴':'未缴'}}</van-tag>
</template> </template>
<template #label> <template #label>
<div class="custom-title">工会:{{item.unionname}}</div> <div class="custom-title">人员类型:{{item.personType}}</div>
<div class="custom-title">单位:{{item.unitname}}</div> <div class="custom-title">在职状态:{{item.userState}}</div>
<div class="custom-title">所属工会:{{item.unionname}}</div>
<div class="custom-title">所属单位:{{item.unitname}}</div>
<div class="custom-title">缴费金额:{{item.paymentMoney}}</div>
</template>
<template #right-icon>
<van-button @click="show=true" v-if="!item.isPayment" size="mini" plain type="info">设为已缴</van-button>
</template> </template>
</van-cell> </van-cell>
<template #right>
<van-button style="height: 100%" @click="doDelete(item.id)" square type="danger" text="删除" />
</template>
</van-swipe-cell>
</van-cell-group> </van-cell-group>
</van-list> </van-list>
@@ -42,6 +56,29 @@ layout("/mobile/platform.html"){
image="https://img01.yzcdn.cn/vant/custom-empty-image.png" image="https://img01.yzcdn.cn/vant/custom-empty-image.png"
v-if="tableData&&tableData.length===0" v-if="tableData&&tableData.length===0"
></van-empty> ></van-empty>
<van-action-sheet v-model="show" title="标题">
<div class="content">
<van-form @submit="onSubmit">
<van-field
v-model="formData.paymentMoney"
name="缴费金额"
label="缴费金额"
placeholder="缴费金额"
:rules="[{ required: true, message: '请填写缴费金额' }]"
></van-field>
<van-field
v-model="formData.remark"
name="备注"
label="备注"
placeholder="备注"
></van-field>
<div style="margin: 16px;">
<van-button round block type="info" native-type="submit">提交</van-button>
</div>
</van-form>
</div>
</van-action-sheet>
</div> </div>
</div> </div>
@@ -66,7 +103,9 @@ layout("/mobile/platform.html"){
option1: [ option1: [
{ text: '姓名', value: 'u.username' }, { text: '姓名', value: 'u.username' },
{ text: '工号', value: 'u.loginname' }, { text: '工号', value: 'u.loginname' },
] ],
show:false,
formData: {}
} }
}, },
methods: { methods: {
@@ -75,7 +114,6 @@ layout("/mobile/platform.html"){
if (resp.code === 0) { if (resp.code === 0) {
this.tableData = this.tableData.concat(resp.data.list) this.tableData = this.tableData.concat(resp.data.list)
this.pageForm.totalCount = resp.data.totalCount this.pageForm.totalCount = resp.data.totalCount
console.log(this.tableData.length >= this.pageForm.totalCount)
if (this.tableData.length >= this.pageForm.totalCount) { if (this.tableData.length >= this.pageForm.totalCount) {
this.finished = true this.finished = true
} else { } else {
@@ -86,10 +124,44 @@ layout("/mobile/platform.html"){
}, },
doSearch(){ doSearch(){
this.pageForm.pageNumber = 1 this.pageForm.pageNumber = 1
this.tableData = [] if(this.tableData.length==this.pageForm.totalCount){
this.finished = true
}else{
this.finished = false this.finished = false
this.pageData()
} }
this.tableData = []
this.pageData()
},
async doDelete(id) {
const loading = this.$toast.loading({
message: "加载中...",
forbidClick: true,
overlay: true,
duration: 0
})
const resp = await $.get("/platform/member/payment/summary/doRemoveById", { id: id })
if (resp.code === 0) {
this.$toast.success(resp.msg)
await this.doSearch()
loading.close()
} else {
this.$toast.fail(resp.msg)
}
},
async sendPaymentMsg(row) {
this.$dialog.confirm({
title: '提示',
message: "您确定对【" + row.username + "】会员进行催缴吗?",
}).then(async () => {
const resp = await $.get("/platform/member/payment/summary/sendPaymentMsg", { id: row.id })
if (resp.code === 0) {
this.$toast.success(resp.msg)
await this.doSearch()
} else {
this.$toast.fail(resp.msg)
}
})
},
}, },
async created() { async created() {
await this.pageData() await this.pageData()