first commit

This commit is contained in:
2026-09-09 09:14:28 +08:00
commit 5343198112
5199 changed files with 1052895 additions and 0 deletions
@@ -0,0 +1,289 @@
<!--#
layout("/layouts/platform.html"){
#-->
<style>
.aidPay_view {
padding-top: 20px;
padding-left: 50px;
}
</style>
<div id="app" class="platform" v-cloak>
<guava ref="guava" padding="0">
<template>
<search v-model="pageForm" @search="doSearch" :has_year="true"></search>
<el-card shadow="never" class="mt10">
<table-tool label="会员列表" :app="this">
<template #func>
<el-radio-group class="mr5" v-model="pageForm.isAudit" @change="doSearch" size="small"
style="margin-bottom: -7.5px">
<el-radio-button :label="1">全部</el-radio-button>
<el-radio-button :label="2">已缴费</el-radio-button>
<el-radio-button :label="3">未缴费</el-radio-button>
</el-radio-group>
<el-dropdown>
<el-button @click="download" type="primary" plain icon="el-icon-download" size="small">导出{{pageForm.year}}名单 <i
class="el-icon-arrow-down el-icon--right"></i>
</el-button>
</el-dropdown>
<el-button type="primary" class="ml5" plain icon="el-icon-upload2" size="small"
@click="openImport">导入缴费记录
</el-button>
<el-button type="primary" class="ml5" plain icon="el-icon-delete-solid" :loading="doPayLoading"
size="small"
:disabled="tableData.length==0"
@click="doPay">清空{{pageForm.year}}年缴费名单
</el-button>
</template>
</table-tool>
<el-table :data="tableData" style="width: 100%" row-key="id" @sort-change="pageOrder" :size="tableSize"
v-loading="tableLoading" ref="table" class="vi-table">
<el-table-column align="center" header-align="center" type="index" :index="indexMethod" label="序号"
width="80px"></el-table-column>
<el-table-column
align="center"
header-align="center"
v-for="column in tableColumns"
show-overflow-tooltip
:sortable="column.sortable"
:label="column.label"
:prop="column.prop" :width="column.width" min-width="100px">
<template v-if="column.prop==='payed'" scope="{row:{payed}}">
<el-tag type="success" v-if="payed">已扣款</el-tag>
<el-tag type="info" v-else-if="!payed">未扣款</el-tag>
</template>
<template v-else-if="column.prop==='money'" scope="{row:{money}}">
<el-tag>{{money}}</el-tag>
</template>
</el-table-column>
<el-table-column prop="userOnline" align="center" header-align="center" label="操作"
width="180px" fixed="right">
<template scope="{row}">
<el-dropdown @command="dropdownCommand">
<el-button plain size="mini">
<i class="ti-settings"></i>
<span class="ti-angle-down"></span>
</el-button>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item :command="{action:view,value:row}">
查看
</el-dropdown-item>
<el-dropdown-item :disabled="row.payed" :command="{action:isPayed,value:row.id}"
:loading="isPayedLoading">
已扣款
</el-dropdown-item>
<el-dropdown-item :disabled="!row.payed" :command="{action:isPayed,value:row.id}"
:loading="isPayedLoading">
未扣款
</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</template>
</el-table-column>
</el-table>
<!--#include("/layouts/pagination.html"){}#-->
</el-card>
</template>
<template #view>
<el-tabs v-model="activeName" class="aidPay_view">
<el-tab-pane label="用户信息" :name="1">
<info ref="info" :userid="info.userId"></info>
</el-tab-pane>
<el-tab-pane label="变更记录" :name="2">
<app_record :userid="info.userId" ref="app_record"></app_record>
</el-tab-pane>
<el-tab-pane label="缴费记录" :name="3">
<pay_record :userid="info.userId" ref="pay_record"></pay_record>
</el-tab-pane>
</el-tabs>
</template>
</guava>
<el-dialog
title="扣费记录导入"
:visible.sync="importVisible"
:close-on-click-modal="false"
width="50%"
>
<el-timeline>
<el-timeline-item timestamp="下载模板" placement="top">
<el-card>
<el-button size="medium" type="" style="width: 200px"
@click="location.href='/platform/basics/downloadTemplate?filePath=diseaseaid/aidfund/kkmodel1.xls&fileName=扣费记录模板.xls'"
icon="el-icon-download">下载模板
</el-button>
</el-card>
</el-timeline-item>
<el-timeline-item timestamp="上传文件" placement="top">
<el-card>
<el-upload
name="file"
ref="upload"
:on-remove="(file, fileList) => {
importData.fileList = fileHandleRemove(file, fileList)
}"
:on-change="(file, fileList) => {
importData.fileList = fileHandleChange(file, fileList,{type:['xls','xlsx']})
}"
:auto-upload="false"
:limit="1"
:file-list="importData.fileList">
<el-button size="medium" type="" icon="el-icon-upload" style="width: 200px">选择文件
</el-button>
</el-upload>
</el-card>
</el-timeline-item>
</el-timeline>
<span slot="footer" class="dialog-footer">
<el-button @click="importVisible = false" :disabled="importLoading">取 消</el-button>
<el-button type="primary" @click="doImport" :loading="importLoading">确定</el-button>
</span>
</el-dialog>
</div>
<script>
const vue = new Vue({
el: '#app',
mixins: [initTableMixins],
data() {
return {
activeName: 1,
importData: {},
info: {},
importLoading: false,
importVisible: false,
doPayLoading: false,
isPayedLoading: false,
pageForm: {
searchName: 'username',
year: new Date().getFullYear() + "",
isAudit: "1"
},
tableColumns: [
{prop: 'year', label: '年度'},
{prop: 'loginname', label: '工号'},
{prop: 'username', label: '姓名'},
{prop: 'sex', label: '性别', sortable: true, width: '100px'},
{prop: 'userState', label: '在职状态', sortable: true},
{prop: 'unitname', label: '所在单位', sortable: true},
{prop: 'unionname', label: '所属工会', sortable: true},
{prop: 'money', label: '缴费金额', sortable: true},
{prop: 'payed', label: '是否扣款', sortable: true}
]
}
},
components: {
'guava': httpVueLoader('/components/plugins/Guava.vue'),
'search': httpVueLoader('/components/diseaseaid/aidfund/Search.vue?v=1.0.0'),
'info': httpVueLoader('/components/diseaseaid/aidfund/info.vue'),
'app_record': httpVueLoader('/components/diseaseaid/aidfund/AppRecord.vue'),
'pay_record': httpVueLoader('/components/diseaseaid/aidfund/PayRecord.vue'),
},
methods: {
download() {
location.href = location.href + '/download?year=' + this.pageForm.year
},
async isPayed(id) {
this.isPayedLoading = true
const resp = await $.post(loc() + "/isPayed", {id})
requestLaterMsgFun(this, resp, () => {
this.pageData()
}, null, () => {
this.isPayedLoading = false
})
},
view(row) {
this.info = row
this.activeName = 1
this.$refs.guava.view()
},
doPay() {
if (!this.pageForm.year) {
this.notifyWarning("请先选择年度!")
return;
} else if (this.pageForm.year < (new Date().getFullYear()).toString()) {
this.notifyWarning("历史数据不能删除!")
return;
}
this.$confirm('您确定要清空' + this.pageForm.year + '年的数据吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(async () => {
this.doPayLoading = true
const resp = await $.post(loc() + "/doPay", {year: this.pageForm.year})
requestLaterMsgFun(this, resp, () => {
this.pageData()
}, null, () => {
this.doPayLoading = false
})
})
},
openImport() {
this.importData = {
fileList: []
}
this.importVisible = true;
},
doImport() {
if (!this.importData.fileList.length) {
this.notifyWarning("请选择文件!")
return
}
const data = new FormData();
this.importData.fileList.forEach((val) => {
data.append("file", val.raw, val.raw.name);
});
this.importLoading = true
$.ajax({
url: loc() + "/importUserpays",
type: "post",
data: data,
processData: false,
contentType: false,
success: (data) => {
if (!data.code) {
this.notifySuccess("导入成功!");
this.pageData();
this.importVisible = false
} else {
this.notifyWarning("导入失败")
}
this.importLoading = false
},
error: (data) => {
this.notifyWarning("导入失败")
this.importLoading = false
}
});
}
},
async created() {
this.pageData();
}
})
</script>
<!--#
}
#-->