基金会员
This commit is contained in:
@@ -111,6 +111,12 @@ module.exports = {
|
||||
errorList: 0
|
||||
}
|
||||
},
|
||||
clearImportFile() {
|
||||
this.$set(this.importData, "fileList", [])
|
||||
if (this.$refs.upload) {
|
||||
this.$refs.upload.clearFiles()
|
||||
}
|
||||
},
|
||||
doImport() {
|
||||
if (this.importData.fileList.length === 0) {
|
||||
this.$message.error({
|
||||
@@ -122,6 +128,10 @@ module.exports = {
|
||||
const data = new FormData()
|
||||
data.append("isFlag", this.importData.isFlag)
|
||||
data.append("businessId", this.business_id)
|
||||
// 部分业务导入需要页面上下文参数(如缴费年度),有值时一并提交。
|
||||
if (this.importData.year) {
|
||||
data.append("year", this.importData.year)
|
||||
}
|
||||
this.importData.fileList.forEach((val) => {
|
||||
data.append("file", val.raw, val.raw.name)
|
||||
})
|
||||
@@ -132,20 +142,28 @@ module.exports = {
|
||||
background: "rgba(0, 0, 0, 0.7)"
|
||||
})
|
||||
this.$axios.post(this.post_url, data).then((res) => {
|
||||
loading.close()
|
||||
if (res.code === 0) {
|
||||
if (res.data) {
|
||||
this.$message.warning("导入失败")
|
||||
this.errorInfoData = res.data
|
||||
this.$emit("flush")
|
||||
} else {
|
||||
this.$message.success("导入成功")
|
||||
this.$emit("flush")
|
||||
this.resetImportData()
|
||||
}
|
||||
} else {
|
||||
this.$message.warning("导入失败")
|
||||
if (res.code !== 0) {
|
||||
this.$message.error(res.msg || "导入失败")
|
||||
return
|
||||
}
|
||||
// 导入接口统一返回统计数据,先回显统计再按错误数量提示结果。
|
||||
if (res.data) {
|
||||
this.errorInfoData = res.data
|
||||
}
|
||||
if (res.data && Number(res.data.errorCount) > 0) {
|
||||
this.$message.warning("导入完成,存在异常记录")
|
||||
this.$emit("flush")
|
||||
return
|
||||
}
|
||||
this.$message.success("导入成功")
|
||||
this.$emit("flush")
|
||||
// 成功后仅清除文件,保留本次导入统计供用户核对。
|
||||
this.clearImportFile()
|
||||
}).catch(() => {
|
||||
this.$message.error("导入失败,请稍后重试")
|
||||
}).finally(() => {
|
||||
// 请求成功、校验失败或网络异常时都必须关闭导入遮罩。
|
||||
loading.close()
|
||||
})
|
||||
},
|
||||
exportErrors() {
|
||||
|
||||
+206
@@ -0,0 +1,206 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
<div id="app">
|
||||
<guava ref="guava">
|
||||
<el-card shadow="never">
|
||||
<search @search="doSearch">
|
||||
<search-item label="缴费年度">
|
||||
<el-date-picker v-model="pageForm.year" type="year" value-format="yyyy" :clearable="false"
|
||||
placeholder="请选择年度" style="width: 100%" @change="doSearch"></el-date-picker>
|
||||
</search-item>
|
||||
<search-item label="姓名/工号">
|
||||
<el-input v-model="pageForm.searchKeyword" clearable placeholder="请输入姓名或工号"
|
||||
@keyup.enter.native="doSearch"></el-input>
|
||||
</search-item>
|
||||
<search-item label="会员类别">
|
||||
<dict-select v-model="pageForm.aidFundMemberType" code="USER_AID_FUND_MEMBER_TYPE"
|
||||
placeholder="请选择会员类别" style="width: 100%"></dict-select>
|
||||
</search-item>
|
||||
<search-item label="所属分工会">
|
||||
<el-select v-model="pageForm.unionId" clearable filterable placeholder="请选择分工会"
|
||||
style="width: 100%" @change="unionChange">
|
||||
<el-option v-for="item in unionList" :key="item.id" :label="item.name" :value="item.id"></el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
<search-item label="所属单位">
|
||||
<el-select v-model="pageForm.unitId" clearable filterable placeholder="请选择单位" style="width: 100%">
|
||||
<el-option v-for="item in unitList" :key="item.id" :label="item.name" :value="item.id"></el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
</search>
|
||||
</el-card>
|
||||
|
||||
<el-card shadow="never" class="mt10">
|
||||
<table-tool label="基金会员缴费">
|
||||
<el-radio-group v-model="pageForm.isPayed" size="small" @change="doSearch">
|
||||
<el-radio-button :label="null">全部</el-radio-button>
|
||||
<el-radio-button :label="true">已缴费</el-radio-button>
|
||||
<el-radio-button :label="false">未缴费</el-radio-button>
|
||||
</el-radio-group>
|
||||
<el-button size="small" type="primary" icon="el-icon-plus" @click="createPayList">生成年度名单</el-button>
|
||||
<el-button size="small" type="primary" icon="el-icon-upload2" @click="openImport">导入缴费记录</el-button>
|
||||
<el-button size="small" type="primary" icon="el-icon-download" @click="exportPayRecord">导出名单</el-button>
|
||||
<el-button size="small" type="danger" icon="el-icon-delete" :disabled="tableData.length === 0"
|
||||
@click="clearPayRecord">清空{{pageForm.year}}年缴费名单</el-button>
|
||||
</table-tool>
|
||||
<el-table :data="tableData" :size="tableSize" @sort-change="pageOrder" row-key="id" style="width: 100%"
|
||||
v-loading="tableLoading">
|
||||
<el-table-column type="index" label="序号" width="60px" :index="indexMethod" align="center"></el-table-column>
|
||||
<el-table-column prop="year" label="缴费年度" width="100px" align="center"></el-table-column>
|
||||
<el-table-column prop="loginName" label="工号" min-width="110px" show-overflow-tooltip></el-table-column>
|
||||
<el-table-column prop="userName" label="姓名" min-width="100px" show-overflow-tooltip></el-table-column>
|
||||
<el-table-column prop="sex" label="性别" width="80px" align="center"></el-table-column>
|
||||
<el-table-column prop="aidFundMemberType" label="会员类别" min-width="120px" show-overflow-tooltip></el-table-column>
|
||||
<el-table-column prop="unitName" label="所属单位" min-width="150px" show-overflow-tooltip></el-table-column>
|
||||
<el-table-column prop="unionName" label="所属分工会" min-width="150px" show-overflow-tooltip></el-table-column>
|
||||
<el-table-column prop="joinTime" label="加入时间" width="120px" align="center"></el-table-column>
|
||||
<el-table-column prop="money" label="缴费金额(元)" width="130px" align="right"></el-table-column>
|
||||
<el-table-column prop="isPayed" label="缴费状态" width="100px" align="center">
|
||||
<template slot-scope="{row}">
|
||||
<el-tag v-if="row.isPayed" type="success">已缴费</el-tag>
|
||||
<el-tag v-else type="info">未缴费</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" fixed="right" width="130px" align="center">
|
||||
<template slot-scope="{row}">
|
||||
<el-button v-if="!row.isPayed" size="mini" type="primary" @click="updatePayed(row, true)">设为已缴</el-button>
|
||||
<el-button v-else size="mini" type="danger" @click="updatePayed(row, false)">设为未缴</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!--#include("/layouts/pagination.html"){}#-->
|
||||
</el-card>
|
||||
|
||||
<template #edit>
|
||||
<file-import ref="viewImport" temp_url="/platform/fundMember/payRecord/downloadImportTemp"
|
||||
post_url="/platform/fundMember/payRecord/doImport" @flush="pageData"></file-import>
|
||||
</template>
|
||||
</guava>
|
||||
</div>
|
||||
|
||||
<script nonce="${cspNonce!}">
|
||||
new Vue({
|
||||
el: "#app",
|
||||
store,
|
||||
mixins: [initTableMixins],
|
||||
components: {
|
||||
"file-import": httpVueLoader("/components/plugins/sysImport/index.vue")
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
pageForm: {
|
||||
year: this.$moment().format("YYYY"),
|
||||
searchKeyword: "",
|
||||
unionId: "",
|
||||
unitId: "",
|
||||
aidFundMemberType: "",
|
||||
isPayed: null
|
||||
},
|
||||
unionList: [],
|
||||
unitList: []
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
createPayList() {
|
||||
if (!this.pageForm.year) {
|
||||
this.notifyWarning("请选择缴费年度")
|
||||
return
|
||||
}
|
||||
this.$axios.post(loc() + "/memberConfig", {year: this.pageForm.year}).then((configRes) => {
|
||||
if (configRes.code !== 0) {
|
||||
this.$message.error(configRes.msg)
|
||||
return
|
||||
}
|
||||
this.$confirm("将按会员入会月份生成" + this.pageForm.year + "年缴费名单:入会当年从当月起按每月 " + configRes.data.monthAmount + " 元计算,是否继续?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(() => {
|
||||
this.tableLoading = true
|
||||
this.$axios.post(loc() + "/createPayList", {year: this.pageForm.year}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$message.success(res.msg)
|
||||
this.doSearch()
|
||||
}
|
||||
}).finally(() => {
|
||||
this.tableLoading = false
|
||||
})
|
||||
})
|
||||
})
|
||||
},
|
||||
openImport() {
|
||||
if (!this.pageForm.year) {
|
||||
this.notifyWarning("请选择缴费年度")
|
||||
return
|
||||
}
|
||||
this.$refs.guava.edit(() => {
|
||||
setTimeout(() => {
|
||||
this.$refs.viewImport.resetImportData()
|
||||
this.$set(this.$refs.viewImport.importData, "year", this.pageForm.year)
|
||||
}, 500)
|
||||
})
|
||||
},
|
||||
exportPayRecord() {
|
||||
if (!this.pageForm.year) {
|
||||
this.notifyWarning("请选择缴费年度")
|
||||
return
|
||||
}
|
||||
this.$downLoad(loc() + "/exportExcel", this.pageForm)
|
||||
},
|
||||
clearPayRecord() {
|
||||
const currentYear = new Date().getFullYear().toString()
|
||||
if (this.pageForm.year !== currentYear) {
|
||||
this.notifyWarning("仅允许清空本年度缴费名单")
|
||||
return
|
||||
}
|
||||
this.$confirm("清空后将删除" + this.pageForm.year + "年全部缴费记录,且无法恢复,是否继续?", "危险操作", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(() => {
|
||||
this.tableLoading = true
|
||||
this.$axios.post(loc() + "/clearPayList", {year: this.pageForm.year}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$message.success(res.msg)
|
||||
this.doSearch()
|
||||
}
|
||||
}).finally(() => {
|
||||
this.tableLoading = false
|
||||
})
|
||||
})
|
||||
},
|
||||
updatePayed(row, isPayed) {
|
||||
const stateName = isPayed ? "已缴费" : "未缴费"
|
||||
this.$confirm("确认将【" + row.userName + "】设置为" + stateName + "吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(() => {
|
||||
this.tableLoading = true
|
||||
this.$axios.post(loc() + "/updatePayed", {id: row.id, isPayed: isPayed}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$message.success(res.msg)
|
||||
this.pageData()
|
||||
}
|
||||
}).finally(() => {
|
||||
this.tableLoading = false
|
||||
})
|
||||
})
|
||||
},
|
||||
async unionChange(unionId) {
|
||||
this.$set(this.pageForm, "unitId", "")
|
||||
this.$set(this, "unitList", await this.$businessTool.listUnit(unionId))
|
||||
this.doSearch()
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
this.$set(this, "unionList", await this.$businessTool.listUnion())
|
||||
this.$set(this, "unitList", await this.$businessTool.listUnit())
|
||||
this.pageData()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -83,6 +83,9 @@ layout("/layouts/platform.html"){
|
||||
code="USER_AID_FUND_MEMBER_TYPE" style="width: 100%"
|
||||
@change="onAidFundMemberTypeChange(row)"></dict-select>
|
||||
</template>
|
||||
<template v-else-if="column.prop === 'joinTime'" scope="{row}">
|
||||
{{ formatDate(row.joinTime) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" fixed="right" width="200px">
|
||||
<template slot-scope="{row}">
|
||||
@@ -133,6 +136,10 @@ layout("/layouts/platform.html"){
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 查询列表中的加入时间仅展示年月日,避免显示接口返回的时分秒。
|
||||
formatDate(value) {
|
||||
return value ? this.$moment(value).format('YYYY-MM-DD') : '-'
|
||||
},
|
||||
openView(row) {
|
||||
this.$refs.guava.edit(() => {
|
||||
this.$refs.fundMemberInfoRef.onOpen(row)
|
||||
@@ -193,12 +200,7 @@ layout("/layouts/platform.html"){
|
||||
|
||||
// 导出登记汇总表
|
||||
exportExcel() {
|
||||
if (!this.pageForm.year) {
|
||||
this.$message.error('请选择年度再导出')
|
||||
return
|
||||
}
|
||||
this.$downLoad('/platform/fundMember/query/exportExcel', {
|
||||
year: this.pageForm.year,
|
||||
unionId: this.pageForm.unionId
|
||||
})
|
||||
},
|
||||
|
||||
+129
@@ -0,0 +1,129 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
<div id="app">
|
||||
<guava ref="guava">
|
||||
<el-card shadow="never">
|
||||
<search @search="doSearch">
|
||||
<search-item label="年度">
|
||||
<el-date-picker v-model="pageForm.year" type="year" value-format="yyyy" placeholder="请选择年度"
|
||||
style="width: 100%"></el-date-picker>
|
||||
</search-item>
|
||||
<search-item label="姓名/工号">
|
||||
<el-input v-model="pageForm.searchKeyword" placeholder="请输入姓名或工号" clearable></el-input>
|
||||
</search-item>
|
||||
</search>
|
||||
</el-card>
|
||||
<el-card shadow="never">
|
||||
<table-tool>
|
||||
<el-radio-group v-model="pageForm.approval" size="small" @change="doSearch">
|
||||
<el-radio-button :label="true">已审核</el-radio-button>
|
||||
<el-radio-button :label="false">未审核</el-radio-button>
|
||||
</el-radio-group>
|
||||
</table-tool>
|
||||
<el-table :data="tableData" @sort-change="pageOrder" style="width: 100%">
|
||||
<el-table-column type="index" width="50px" label="序号" :index="indexMethod"></el-table-column>
|
||||
<el-table-column prop="loginName" label="工号"></el-table-column>
|
||||
<el-table-column prop="userName" label="姓名"></el-table-column>
|
||||
<el-table-column prop="aidFundMemberType" label="会员类别"></el-table-column>
|
||||
<el-table-column prop="submitTime" label="申请时间"></el-table-column>
|
||||
<el-table-column prop="curTaskName" label="当前节点"></el-table-column>
|
||||
<el-table-column prop="instanceState" label="流程状态">
|
||||
<template slot-scope="{row}">
|
||||
<enum-tag :value="row.instanceState" name="ProcessInstanceStateEnum" label_key="message" size="small"></enum-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" fixed="right" width="300px">
|
||||
<template slot-scope="{row}">
|
||||
<el-button @click="openView(row)" size="mini" type="primary">查看</el-button>
|
||||
<el-button v-if="row.taskState === 10" @click="openAudit(row)" size="mini" type="primary">审核</el-button>
|
||||
<el-button v-if="row.canRevoke" @click="onRevoke(row)" size="mini" type="danger">撤回</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!--#include("/layouts/pagination.html"){}#-->
|
||||
</el-card>
|
||||
<template #edit>
|
||||
<fund-member-info ref="fundMemberInfoRef">
|
||||
<div v-if="showApprovalForm">
|
||||
<div class="process-title">{{formData.taskName}}</div>
|
||||
<el-form :model="formData" ref="formRef" label-width="0" label-suffix=":" class="flow-task-form">
|
||||
<el-form-item label="审批意见" prop="tf_opinion" :rules="[{required:true,message:'必填',trigger:['change','blur']}]">
|
||||
<user-opinion-textarea v-model="formData.tf_opinion"></user-opinion-textarea>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-row type="flex" justify="end">
|
||||
<el-button @click="$refs.guava.index()" size="small">取消</el-button>
|
||||
<el-button @click="handleTaskAction(6)" size="small" type="info">退回到发起人</el-button>
|
||||
<el-button @click="handleTaskAction(2)" size="small" type="danger">拒绝申请</el-button>
|
||||
<el-button @click="handleTaskAction(1)" size="small" type="primary">同意申请</el-button>
|
||||
</el-row>
|
||||
</div>
|
||||
</fund-member-info>
|
||||
</template>
|
||||
</guava>
|
||||
</div>
|
||||
|
||||
<script nonce="${cspNonce!}">
|
||||
<!--#include('../info.js'){}#-->
|
||||
new Vue({
|
||||
el: "#app",
|
||||
store,
|
||||
mixins: [initTableMixins],
|
||||
components: {"fund-member-info": fundMemberInfo},
|
||||
data() {
|
||||
return {pageForm: {approval: false}, formData: {}, showApprovalForm: false}
|
||||
},
|
||||
methods: {
|
||||
openView(row) {
|
||||
this.$refs.guava.edit(() => {
|
||||
this.showApprovalForm = false
|
||||
this.$refs.fundMemberInfoRef.onOpen(row)
|
||||
})
|
||||
},
|
||||
openAudit(row) {
|
||||
this.$refs.guava.edit(() => {
|
||||
this.showApprovalForm = true
|
||||
this.formData = {processTaskId: row.taskId, taskName: row.curTaskName}
|
||||
this.$refs.fundMemberInfoRef.onOpen(row)
|
||||
})
|
||||
},
|
||||
handleTaskAction(val) {
|
||||
this.$refs.formRef.validate(valid => {
|
||||
if (!valid) return
|
||||
this.$confirm("您确定要提交吗?", "提示", {
|
||||
confirmButtonText: "确定", cancelButtonText: "取消", type: "warning"
|
||||
}).then(() => {
|
||||
this.$axios.post("/flow/common/executeTask", {
|
||||
data: JSON.stringify(Object.assign({}, this.formData, {submitType: val}))
|
||||
}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$refs.guava.index()
|
||||
this.$message.success(res.msg)
|
||||
this.doSearch()
|
||||
}
|
||||
})
|
||||
})
|
||||
})
|
||||
},
|
||||
onRevoke(row) {
|
||||
this.$confirm("您确定要撤回吗?", "提示", {
|
||||
confirmButtonText: "确定", cancelButtonText: "取消", type: "info"
|
||||
}).then(() => {
|
||||
this.$axios.post("/flow/common/revokeTask", {taskId: row.taskId}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$message.success(res.msg)
|
||||
this.doSearch()
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.pageData()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -125,7 +125,7 @@ layout("/layouts/platform.html"){
|
||||
</el-row>
|
||||
-->
|
||||
|
||||
<el-form-item label="家庭主要成员" prop="families" required>
|
||||
<el-form-item label="家庭主要成员" prop="families">
|
||||
<el-table :data="formData.families" border size="small">
|
||||
<el-table-column label="序号" width="80" align="center">
|
||||
<template slot-scope="scope">
|
||||
@@ -223,8 +223,21 @@ layout("/layouts/platform.html"){
|
||||
healthStatus: [{required: true, message: '请输入健康状况', trigger: 'blur'}],
|
||||
education: [{required: true, message: '请选择学历', trigger: 'change'}],
|
||||
joinWorkTime: [{required: true, message: '请选择入职时间', trigger: 'blur'}],
|
||||
retireTime: [{required: false, message: '请选择退休时间', trigger: 'blur'}],
|
||||
retireTime: [{validator: function (rule, value, callback) {
|
||||
if (this.formData.aidFundMemberType === '退休' && !value) {
|
||||
callback(new Error('会员类别为退休时,请选择退休时间'))
|
||||
return
|
||||
}
|
||||
callback()
|
||||
}.bind(this), trigger: ['change', 'blur']}],
|
||||
aidFundMemberType: [{required: true, message: '请选择会员类别', trigger: 'change'}],
|
||||
families: [{required: true, validator: function (rule, value, callback) {
|
||||
if (!Array.isArray(value) || value.length === 0) {
|
||||
callback(new Error('请至少添加一名家庭主要成员'))
|
||||
return
|
||||
}
|
||||
callback()
|
||||
}, trigger: 'change'}],
|
||||
mobile: [{required: true, message: '请输入手机号码', trigger: 'blur'},
|
||||
{
|
||||
pattern: /^1[3456789]\d{9}$/,
|
||||
|
||||
+19
-6
@@ -353,12 +353,15 @@ layout("/layouts/platform.html"){
|
||||
<div class="dialog-section">
|
||||
<div class="dialog-section-title">会员缴费配置</div>
|
||||
<el-form :model="memberForm" :rules="memberRules" ref="memberFormRef" label-width="190px" style="max-width: 760px">
|
||||
<el-form-item label="年度" prop="year">
|
||||
<el-date-picker :value="memberForm.year" type="year" value-format="yyyy" format="yyyy" placeholder="请选择年度" style="width: 320px" @input="$set(memberForm,'year',$event)"></el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="每月缴纳互助金额(元)" prop="monthAmount">
|
||||
<el-input-number v-model="memberForm.monthAmount" :min="0" :precision="2" :step="1" controls-position="right" style="width: 320px"></el-input-number>
|
||||
</el-form-item>
|
||||
<el-form-item label="缴费减半年限" prop="halfPriceYear">
|
||||
<el-input-number v-model="memberForm.halfPriceYear" :min="1" :step="1" controls-position="right" style="width: 320px"></el-input-number>
|
||||
<span style="margin-left: 10px; color: #909399">连续缴费满该年限后,次年缴费减半</span>
|
||||
<span style="margin-left: 10px; color: #909399">自加入或最近一次医疗互助申请年份起满该年限后,次年缴费减半</span>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
@@ -407,6 +410,7 @@ layout("/layouts/platform.html"){
|
||||
status: [{ required: true, message: "请选择状态", trigger: "change" }]
|
||||
},
|
||||
memberRules: {
|
||||
year: [{ required: true, message: "请选择年度", trigger: "change" }],
|
||||
monthAmount: [{ required: true, message: "请输入每月缴纳互助金额", trigger: "change" }],
|
||||
halfPriceYear: [{ required: true, message: "请输入缴费减半年限", trigger: "change" }]
|
||||
}
|
||||
@@ -459,7 +463,9 @@ layout("/layouts/platform.html"){
|
||||
if (resp.code === 0) {
|
||||
this.configForm = resp.data.config || this.defaultConfig(year)
|
||||
this.configForm.year = this.toYearString(this.configForm.year)
|
||||
this.memberForm = resp.data.memberConfig || this.defaultMemberConfig()
|
||||
const memberForm = resp.data.memberConfig || this.defaultMemberConfig(year)
|
||||
this.$set(memberForm, "year", this.toYearString(memberForm.year || year))
|
||||
this.$set(this, "memberForm", memberForm)
|
||||
this.ratioList = resp.data.ratios || []
|
||||
this.bonusList = resp.data.bonuses || []
|
||||
}
|
||||
@@ -476,7 +482,7 @@ layout("/layouts/platform.html"){
|
||||
const year = new Date().getFullYear()
|
||||
this.dialogLoading = false
|
||||
this.configForm = this.defaultConfig(year)
|
||||
this.memberForm = this.defaultMemberConfig()
|
||||
this.$set(this, "memberForm", this.defaultMemberConfig(year))
|
||||
this.ratioList = []
|
||||
this.bonusList = []
|
||||
this.$nextTick(() => {
|
||||
@@ -527,7 +533,7 @@ layout("/layouts/platform.html"){
|
||||
return Promise.reject(resp)
|
||||
}
|
||||
const savedConfig = resp.data
|
||||
const tasks = [this.$axios.post(loc() + "/saveMemberConfig", this.memberForm)]
|
||||
const tasks = [this.$axios.post(loc() + "/saveMemberConfig", this.buildMemberConfigPayload())]
|
||||
this.deletedRatioIds.forEach((id) => {
|
||||
tasks.push(this.$axios.post(loc() + "/deleteRatio", { id: id }))
|
||||
})
|
||||
@@ -642,13 +648,20 @@ layout("/layouts/platform.html"){
|
||||
payload.year = this.toYearNumber(payload.year)
|
||||
return payload
|
||||
},
|
||||
// 会员缴费配置为全局单条配置,未配置时给出可编辑默认值。
|
||||
defaultMemberConfig() {
|
||||
// 会员缴费配置按年度维护,新增配置时默认使用当前年度。
|
||||
defaultMemberConfig(year) {
|
||||
return {
|
||||
year: this.toYearString(year),
|
||||
monthAmount: 0,
|
||||
halfPriceYear: 1
|
||||
}
|
||||
},
|
||||
// 后端年度字段为整型,保存会员缴费配置前统一转换。
|
||||
buildMemberConfigPayload() {
|
||||
const payload = this.copy(this.memberForm)
|
||||
payload.year = this.toYearNumber(payload.year)
|
||||
return payload
|
||||
},
|
||||
// 清理前端临时字段,避免弹窗编辑辅助字段传到后端实体。
|
||||
cleanPayload(row) {
|
||||
const payload = this.copy(row)
|
||||
|
||||
+26
@@ -0,0 +1,26 @@
|
||||
<!--#
|
||||
layout("/layouts/platform_h5.html"){
|
||||
#-->
|
||||
<div id="app">
|
||||
<van-nav-bar title="分工会审核" left-text="返回" left-arrow fixed placeholder @click-left="historyBack"></van-nav-bar>
|
||||
<van-sticky offset-top="46px">
|
||||
<van-search v-model="pageForm.searchKeyword" placeholder="请输入姓名或工号" @search="doSearch"></van-search>
|
||||
<van-tabs v-model="pageForm.approvalText" @change="changeApproval">
|
||||
<van-tab title="已审核" name="1"></van-tab><van-tab title="未审核" name="0"></van-tab>
|
||||
</van-tabs>
|
||||
</van-sticky>
|
||||
<table-list ref="tableListRef" api="/platform/fundMember/branchUnionApproval/pageData" :page_form.sync="pageForm" @ready="doSearch">
|
||||
<template v-slot="{row}"><table-column label="工号">{{row.loginName}}</table-column><table-column label="姓名">{{row.userName}}</table-column><table-column label="会员类别">{{row.aidFundMemberType}}</table-column><table-column label="当前节点">{{row.curTaskName}}</table-column></template>
|
||||
<template #actions="{row}"><div class="action-btn" @click="view(row)"><i class="fa fa-eye"></i><span>查看</span></div><div class="action-btn" v-if="row.taskState===10" @click="audit(row)"><i class="fa fa-check"></i><span>审核</span></div><div class="action-btn delete" v-if="row.canRevoke" @click="onRevoke(row)"><i class="fa fa-undo"></i><span>撤回</span></div></template>
|
||||
</table-list>
|
||||
<h5-fund-member-info ref="infoRef"><div v-if="formData.processTaskId" class="p10"><van-form ref="formRef"><van-field :value="formData.tf_opinion" label="审批意见" type="textarea" required placeholder="请输入审批意见" :rules="[{required:true,message:'请填写审批意见'}]" @input="$set(formData,'tf_opinion',$event)"></van-field></van-form><div class="audit-actions"><van-button block type="info" @click="handleTaskAction(6)">退回</van-button><van-button block type="danger" @click="handleTaskAction(2)">拒绝</van-button><van-button block type="primary" @click="handleTaskAction(1)">同意</van-button></div></div></h5-fund-member-info>
|
||||
</div>
|
||||
<style>.audit-actions{display:flex;column-gap:10px;padding-top:10px}.audit-actions .van-button{flex:1}</style>
|
||||
<script nonce="${cspNonce!}">
|
||||
<!--#include('../mine/info.js'){}#-->
|
||||
new Vue({el:'#app',store,components:{'h5-fund-member-info':H5_FUND_MEMBER_INFO},data(){return {pageForm:{pageNumber:1,pageSize:10,totalCount:0,searchKeyword:'',approval:false,approvalText:'0'},formData:{}}},methods:{changeApproval(value){this.doSearch(value==='1')},doSearch(approval){if(approval!==undefined){this.$set(this.pageForm,'approval',approval)}this.$set(this.pageForm,'pageNumber',1);this.$set(this.pageForm,'totalCount',0);this.$nextTick(()=>this.$refs.tableListRef.doSearch())},view(row){this.$set(this,'formData',{});this.$refs.infoRef.onOpen(row)},audit(row){this.$set(this,'formData',{processTaskId:row.taskId,taskName:row.curTaskName,tf_opinion:''});this.$refs.infoRef.onOpen(row)},onRevoke(row){this.$dialog.confirm({title:'提示',message:'您确定要撤回吗?'}).then(()=>this.$axios.post('/flow/common/revokeTask',{taskId:row.taskId}).then(res=>{if(res.code===0){this.$toast.success(res.msg||'撤回成功');this.doSearch()}}))},// 与 PC 端保持一致:6 为退回、2 为拒绝、1 为同意。
|
||||
handleTaskAction(submitType){this.$refs.formRef.validate().then(()=>this.$dialog.confirm({title:'提示',message:'您确定要提交吗?'}).then(()=>this.$axios.post('/flow/common/executeTask',{data:JSON.stringify(Object.assign({},this.formData,{submitType:submitType}))}).then(res=>{if(res.code===0){this.$toast.success(res.msg||'提交成功');this.$refs.infoRef.onClose();this.doSearch()}}))).catch(()=>{})}}})
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,8 @@
|
||||
<!--#
|
||||
layout("/layouts/platform_h5.html"){
|
||||
#-->
|
||||
<div id="app" v-cloak><van-nav-bar title="我的基金会员申请" left-text="返回" left-arrow fixed placeholder @click-left="historyBack"></van-nav-bar><van-sticky offset-top="46px"><van-dropdown-menu :close-on-click-outside="false" :close-on-click-overlay="false"><year-van-dropdown-item :num="5" @change="doSearch" v-model="pageForm.year"></year-van-dropdown-item></van-dropdown-menu></van-sticky><table-list ref="tableListRef" api="/platform/fundMember/mine/pageData" :page_form.sync="pageForm" @ready="doSearch"><template v-slot="{row}"><table-column label="工号">{{row.loginName}}</table-column><table-column label="姓名">{{row.userName}}</table-column><table-column label="会员类别">{{row.aidFundMemberType}}</table-column><table-column label="申请时间">{{row.submitTime}}</table-column><table-column label="当前节点">{{row.taskName}}</table-column></template><template #actions="{row}"><div class="action-btn" @click="onView(row)"><i class="fa fa-eye"></i><span>查看</span></div><div class="action-btn" v-if="row.taskKey === 'startTask' || !row.instanceId" @click="onEdit(row)"><i class="fa fa-edit"></i><span>编辑</span></div><div class="action-btn delete" v-if="row.canRevoke" @click="onRevoke(row)"><i class="fa fa-undo"></i><span>撤回</span></div></template></table-list><h5-fund-member-info ref="infoRef"></h5-fund-member-info></div>
|
||||
<script nonce="${cspNonce!}"><!--#include('info.js'){}#-->new Vue({el:'#app',store,components:{'h5-fund-member-info':H5_FUND_MEMBER_INFO},data(){return {pageForm:{pageNumber:1,pageSize:10,totalCount:0,year:new Date().getFullYear()}}},methods:{doSearch(year){if(year!==undefined){this.$set(this.pageForm,'year',year)}this.$set(this.pageForm,'pageNumber',1);this.$set(this.pageForm,'totalCount',0);this.$nextTick(()=>this.$refs.tableListRef.doSearch())},onView(row){this.$refs.infoRef.onOpen(row)},onEdit(row){this.$pjaxReplace('/platform/fundMember/write/h5?bizId='+row.id+'&taskId='+(row.startTaskId||''))},onRevoke(row){this.$dialog.confirm({title:'提示',message:'您确定要撤回吗?'}).then(()=>this.$axios.post('/flow/common/revokeTask',{taskId:row.startTaskId}).then(res=>{if(res.code===0){this.$toast.success('撤回成功');this.doSearch()}}))}}})</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,42 @@
|
||||
const H5_FUND_MEMBER_INFO = {
|
||||
template: [
|
||||
'<van-action-sheet v-model="visible" title="基金会员申请详情"><div class="detail-container">',
|
||||
'<van-cell-group title="申请信息">',
|
||||
'<van-cell title="姓名" :value="viewData.userName || \'-\'"></van-cell>',
|
||||
'<van-cell title="工号" :value="viewData.loginName || \'-\'"></van-cell>',
|
||||
'<van-cell title="出生年月" :value="formatDate(viewData.birthday)"></van-cell>',
|
||||
'<van-cell title="性别" :value="viewData.sex || \'-\'"></van-cell>',
|
||||
'<van-cell title="籍贯" :value="viewData.nativePlace || \'-\'"></van-cell>',
|
||||
'<van-cell title="家庭住址" :value="viewData.address || \'-\'"></van-cell>',
|
||||
'<van-cell title="健康状况" :value="viewData.healthStatus || \'-\'"></van-cell>',
|
||||
'<van-cell title="学历" :value="viewData.education || \'-\'"></van-cell>',
|
||||
'<van-cell title="联系电话" :value="viewData.mobile || \'-\'"></van-cell>',
|
||||
'<van-cell title="入职时间" :value="formatDate(viewData.joinWorkTime)"></van-cell>',
|
||||
'<van-cell title="身份证号码" :value="viewData.idCard || \'-\'"></van-cell>',
|
||||
'<van-cell title="会员类别" :value="viewData.aidFundMemberType || \'-\'"></van-cell>',
|
||||
'<van-cell title="退休时间" :value="viewData.retireTime || \'-\'"></van-cell>',
|
||||
'<van-cell title="家庭主要成员" class="column-cell"><table><tr><th>序号</th><th>姓名</th><th>年龄</th><th>与本人关系</th></tr><tr v-for="(item,index) in viewData.families || []" :key="index"><td style="text-align:center">{{item.sequence || index + 1}}</td><td style="text-align:center">{{item.name}}</td><td style="text-align:center">{{item.age}}</td><td style="text-align:center">{{item.relation}}</td></tr></table></van-cell>',
|
||||
'<van-cell title="备注" :value="viewData.remark || \'-\'"></van-cell>',
|
||||
'</van-cell-group>',
|
||||
'<div v-for="task in doneTasks" :key="task.id">',
|
||||
'<div class="process-title">{{ task.displayName }}</div>',
|
||||
'<van-cell-group v-if="task.ext && task.ext.isFirstTaskNode">',
|
||||
'<van-cell title="申请用户" :value="(task.ext.initiatorName || \'-\') + (task.ext.initiatorAccount ? \'(\' + task.ext.initiatorAccount + \')\' : \'\')"></van-cell>',
|
||||
'<van-cell title="申请时间" :value="task.finishTime || \'-\'"></van-cell>',
|
||||
'<van-cell title="办理结果"><dict-tag :options="dict.type.PROCESS_TASK_SUBMIT_TYPE" :value="task.ext.submitType"></dict-tag></van-cell>',
|
||||
'</van-cell-group>',
|
||||
'<van-cell-group v-else>',
|
||||
'<van-cell title="办理用户" :value="((task.taskFormData && task.taskFormData.userName) || \'-\') + ((task.taskFormData && task.taskFormData.loginName) ? \'(\' + task.taskFormData.loginName + \')\' : \'\')"></van-cell>',
|
||||
'<van-cell title="办理时间" :value="task.finishTime || \'-\'"></van-cell>',
|
||||
'<van-cell title="办理结果"><dict-tag :options="dict.type.PROCESS_TASK_SUBMIT_TYPE" :value="task.ext && task.ext.submitType"></dict-tag></van-cell>',
|
||||
'<van-cell title="办理意见" class="column-cell"><template #label>{{ (task.taskFormData && (task.taskFormData.opinion || task.taskFormData.tf_opinion)) || \'-\' }}</template></van-cell>',
|
||||
'</van-cell-group>',
|
||||
'</div>',
|
||||
'</div><slot></slot></van-action-sheet>'
|
||||
].join(''),
|
||||
dicts: ["PROCESS_TASK_SUBMIT_TYPE"],
|
||||
data(){return {visible:false,row:{},viewData:{},doneTasks:[]}},
|
||||
methods:{// 查看页面统一显示年月日,空值沿用“-”占位。
|
||||
formatDate(value){return value?this.$moment(value).format('YYYY-MM-DD'):'-'},onOpen(row){this.$set(this,'row',row);this.$set(this,'visible',true);this.getInfo();this.getDoneTasks()},onClose(){this.$set(this,'visible',false)},getInfo(){this.$axios.post('/platform/fundMember/write/info',{id:this.row.id}).then(res=>{if(res.code===0){this.$set(this,'viewData',res.data||{})}})},getDoneTasks(){this.$axios.post('/flow/common/doneTasks',{bizId:this.row.id}).then(res=>{if(res.code===0){this.$set(this,'doneTasks',res.data||[])}})}},
|
||||
style: '.column-cell{flex-direction:column}.column-cell table{width:100%;border-collapse:collapse;table-layout:fixed;margin-top:8px}.column-cell table th,.column-cell table td{border:1px solid #ddd;padding:6px;text-align:center;vertical-align:middle}'
|
||||
}
|
||||
+25
@@ -0,0 +1,25 @@
|
||||
<!--#
|
||||
layout("/layouts/platform_h5.html"){
|
||||
#-->
|
||||
<div id="app">
|
||||
<van-nav-bar title="离退休审核" left-text="返回" left-arrow fixed placeholder @click-left="historyBack"></van-nav-bar>
|
||||
<van-sticky offset-top="46px">
|
||||
<van-search v-model="pageForm.searchKeyword" placeholder="请输入姓名或工号" @search="doSearch"></van-search>
|
||||
<van-tabs v-model="pageForm.approvalText" @change="changeApproval">
|
||||
<van-tab title="已审核" name="1"></van-tab><van-tab title="未审核" name="0"></van-tab>
|
||||
</van-tabs>
|
||||
</van-sticky>
|
||||
<table-list ref="tableListRef" api="/platform/fundMember/retiredApproval/pageData" :page_form.sync="pageForm" @ready="doSearch">
|
||||
<template v-slot="{row}"><table-column label="工号">{{row.loginName}}</table-column><table-column label="姓名">{{row.userName}}</table-column><table-column label="会员类别">{{row.aidFundMemberType}}</table-column><table-column label="当前节点">{{row.curTaskName}}</table-column></template>
|
||||
<template #actions="{row}"><div class="action-btn" @click="view(row)"><i class="fa fa-eye"></i><span>查看</span></div><div class="action-btn" v-if="row.taskState===10" @click="audit(row)"><i class="fa fa-check"></i><span>审核</span></div><div class="action-btn delete" v-if="row.canRevoke" @click="onRevoke(row)"><i class="fa fa-undo"></i><span>撤回</span></div></template>
|
||||
</table-list>
|
||||
<h5-fund-member-info ref="infoRef"><div v-if="formData.processTaskId" class="p10"><van-form ref="formRef"><van-field :value="formData.tf_opinion" label="审批意见" type="textarea" required placeholder="请输入审批意见" :rules="[{required:true,message:'请填写审批意见'}]" @input="$set(formData,'tf_opinion',$event)"></van-field></van-form><div class="audit-actions"><van-button block type="info" @click="handleTaskAction(6)">退回</van-button><van-button block type="danger" @click="handleTaskAction(2)">拒绝</van-button><van-button block type="primary" @click="handleTaskAction(1)">同意</van-button></div></div></h5-fund-member-info>
|
||||
</div>
|
||||
<style>.audit-actions{display:flex;column-gap:10px;padding-top:10px}.audit-actions .van-button{flex:1}</style>
|
||||
<script nonce="${cspNonce!}">
|
||||
<!--#include('../mine/info.js'){}#-->
|
||||
new Vue({el:'#app',store,components:{'h5-fund-member-info':H5_FUND_MEMBER_INFO},data(){return {pageForm:{pageNumber:1,pageSize:10,totalCount:0,searchKeyword:'',approval:false,approvalText:'0'},formData:{}}},methods:{changeApproval(value){this.doSearch(value==='1')},doSearch(approval){if(approval!==undefined){this.$set(this.pageForm,'approval',approval)}this.$set(this.pageForm,'pageNumber',1);this.$set(this.pageForm,'totalCount',0);this.$nextTick(()=>this.$refs.tableListRef.doSearch())},view(row){this.$set(this,'formData',{});this.$refs.infoRef.onOpen(row)},audit(row){this.$set(this,'formData',{processTaskId:row.taskId,taskName:row.curTaskName,tf_opinion:''});this.$refs.infoRef.onOpen(row)},onRevoke(row){this.$dialog.confirm({title:'提示',message:'您确定要撤回吗?'}).then(()=>this.$axios.post('/flow/common/revokeTask',{taskId:row.taskId}).then(res=>{if(res.code===0){this.$toast.success(res.msg||'撤回成功');this.doSearch()}}))},handleTaskAction(submitType){this.$refs.formRef.validate().then(()=>this.$dialog.confirm({title:'提示',message:'您确定要提交吗?'}).then(()=>this.$axios.post('/flow/common/executeTask',{data:JSON.stringify(Object.assign({},this.formData,{submitType:submitType}))}).then(res=>{if(res.code===0){this.$toast.success(res.msg||'提交成功');this.$refs.infoRef.onClose();this.doSearch()}}))).catch(()=>{})}}})
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
+26
@@ -0,0 +1,26 @@
|
||||
<!--#
|
||||
layout("/layouts/platform_h5.html"){
|
||||
#-->
|
||||
<div id="app">
|
||||
<van-nav-bar title="校工会审核" left-text="返回" left-arrow fixed placeholder @click-left="historyBack"></van-nav-bar>
|
||||
<van-sticky offset-top="46px">
|
||||
<van-search v-model="pageForm.searchKeyword" placeholder="请输入姓名或工号" @search="doSearch"></van-search>
|
||||
<van-tabs v-model="pageForm.approvalText" @change="changeApproval">
|
||||
<van-tab title="已审核" name="1"></van-tab><van-tab title="未审核" name="0"></van-tab>
|
||||
</van-tabs>
|
||||
</van-sticky>
|
||||
<table-list ref="tableListRef" api="/platform/fundMember/schoolUnionApproval/pageData" :page_form.sync="pageForm" @ready="doSearch">
|
||||
<template v-slot="{row}"><table-column label="工号">{{row.loginName}}</table-column><table-column label="姓名">{{row.userName}}</table-column><table-column label="所属分工会">{{row.unionName}}</table-column><table-column label="会员类别">{{row.aidFundMemberType}}</table-column><table-column label="当前节点">{{row.curTaskName}}</table-column></template>
|
||||
<template #actions="{row}"><div class="action-btn" @click="view(row)"><i class="fa fa-eye"></i><span>查看</span></div><div class="action-btn" v-if="row.taskState===10" @click="audit(row)"><i class="fa fa-check"></i><span>审核</span></div><div class="action-btn delete" v-if="row.canRevoke" @click="onRevoke(row)"><i class="fa fa-undo"></i><span>撤回</span></div></template>
|
||||
</table-list>
|
||||
<h5-fund-member-info ref="infoRef"><div v-if="formData.processTaskId" class="p10"><van-form ref="formRef"><van-field :value="formData.tf_opinion" label="审批意见" type="textarea" required placeholder="请输入审批意见" :rules="[{required:true,message:'请填写审批意见'}]" @input="$set(formData,'tf_opinion',$event)"></van-field></van-form><div class="audit-actions"><van-button block type="info" @click="handleTaskAction(6)">退回</van-button><van-button block type="danger" @click="handleTaskAction(2)">拒绝</van-button><van-button block type="primary" @click="handleTaskAction(1)">同意</van-button></div></div></h5-fund-member-info>
|
||||
</div>
|
||||
<style>.audit-actions{display:flex;column-gap:10px;padding-top:10px}.audit-actions .van-button{flex:1}</style>
|
||||
<script nonce="${cspNonce!}">
|
||||
<!--#include('../mine/info.js'){}#-->
|
||||
new Vue({el:'#app',store,components:{'h5-fund-member-info':H5_FUND_MEMBER_INFO},data(){return {pageForm:{pageNumber:1,pageSize:10,totalCount:0,searchKeyword:'',year:new Date().getFullYear(),approval:false,approvalText:'0'},formData:{}}},methods:{changeApproval(value){this.doSearch(value==='1')},doSearch(approval){if(approval!==undefined){this.$set(this.pageForm,'approval',approval)}this.$set(this.pageForm,'pageNumber',1);this.$set(this.pageForm,'totalCount',0);this.$nextTick(()=>this.$refs.tableListRef.doSearch())},view(row){this.$set(this,'formData',{});this.$refs.infoRef.onOpen(row)},audit(row){this.$set(this,'formData',{processTaskId:row.taskId,taskName:row.curTaskName,tf_opinion:''});this.$refs.infoRef.onOpen(row)},onRevoke(row){this.$dialog.confirm({title:'提示',message:'您确定要撤回吗?'}).then(()=>this.$axios.post('/flow/common/revokeTask',{taskId:row.taskId}).then(res=>{if(res.code===0){this.$toast.success(res.msg||'撤回成功');this.doSearch()}}))},// 与 PC 端保持一致:6 为退回、2 为拒绝、1 为同意。
|
||||
handleTaskAction(submitType){this.$refs.formRef.validate().then(()=>this.$dialog.confirm({title:'提示',message:'您确定要提交吗?'}).then(()=>this.$axios.post('/flow/common/executeTask',{data:JSON.stringify(Object.assign({},this.formData,{submitType:submitType}))}).then(res=>{if(res.code===0){this.$toast.success(res.msg||'提交成功');this.$refs.infoRef.onClose();this.doSearch()}}))).catch(()=>{})}}})
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,50 @@
|
||||
<!--#
|
||||
layout("/layouts/platform_h5.html"){
|
||||
#-->
|
||||
<div id="app" v-cloak>
|
||||
<van-nav-bar title="基金会员入会申请" left-text="返回" left-arrow fixed placeholder @click-left="historyBack"></van-nav-bar>
|
||||
<van-notice-bar v-if="isFundMember" wrapable color="#d46b08" background="#fff7e6">您已是基金会员,无需重复申请。</van-notice-bar>
|
||||
<van-form ref="formRef" :show-error-message="false">
|
||||
<van-cell-group title="基本信息">
|
||||
<van-field v-model="formData.userName" label="姓名" readonly></van-field>
|
||||
<van-field v-model="formData.loginName" label="工号" readonly></van-field>
|
||||
<van-field v-model="formData.birthday" label="出生年月" readonly is-link required @click="showBirthday = true" :rules="[{required:true,message:'请选择出生年月'}]"></van-field>
|
||||
<van-field v-model="formData.sex" label="性别" readonly is-link required @click="showSex = true" :rules="[{required:true,message:'请选择性别'}]"></van-field>
|
||||
<van-field v-model="formData.nativePlace" label="籍贯" required placeholder="请输入籍贯" :rules="[{required:true,message:'请输入籍贯'}]"></van-field>
|
||||
<van-field v-model="formData.address" label="家庭住址" required placeholder="请输入家庭住址" :rules="[{required:true,message:'请输入家庭住址'}]"></van-field>
|
||||
<van-field v-model="formData.healthStatus" label="健康状况" required placeholder="请输入健康状况" :rules="[{required:true,message:'请输入健康状况'}]"></van-field>
|
||||
<van-field v-model="formData.education" label="学历" readonly is-link required placeholder="请选择学历" @click="showEducation = true" :rules="[{required:true,message:'请选择学历'}]"></van-field>
|
||||
<van-field v-model="formData.mobile" label="联系电话" required type="tel" maxlength="11" placeholder="请输入联系电话" :rules="[{required:true,message:'请输入手机号码'},{pattern:/^1[3456789]\d{9}$/,message:'请输入正确的手机号码'}]"></van-field>
|
||||
<van-field v-model="formData.joinWorkTime" label="入职时间" readonly is-link required @click="showJoinWorkTime = true" :rules="[{required:true,message:'请选择入职时间'}]"></van-field>
|
||||
<van-field v-model="formData.idCard" label="身份证号码" required maxlength="18" placeholder="请输入身份证号码" :rules="[{required:true,message:'请输入身份证号码'},{pattern:/^[1-9]\d{5}(18|19|20)\d{2}(0[1-9]|1[0-2])(0[1-9]|[12]\d|3[01])\d{3}[Xx\d]$/,message:'请输入正确的身份证号码'}]"></van-field>
|
||||
<van-field v-model="formData.aidFundMemberType" label="会员类别" readonly is-link required placeholder="请选择会员类别" @click="showMemberType = true" :rules="[{required:true,message:'请选择会员类别'}]"></van-field>
|
||||
<van-field v-model="formData.retireTime" label="退休时间" readonly is-link :required="formData.aidFundMemberType === '退休'" @click="showRetireTime = true"></van-field>
|
||||
<!-- <van-field v-model="formData.homePhone" label="住宅号码"></van-field> -->
|
||||
</van-cell-group>
|
||||
<van-cell-group title="家庭主要成员">
|
||||
<div v-for="(family, index) in formData.families" :key="index" class="family-item">
|
||||
<div class="family-title">成员{{index + 1}} <van-button size="mini" type="danger" plain @click="removeFamily(index)">删除</van-button></div>
|
||||
<van-field v-model="family.name" label="姓名" required placeholder="请输入姓名"></van-field>
|
||||
<van-field v-model.number="family.age" label="年龄" required type="digit" placeholder="请输入年龄"></van-field>
|
||||
<van-field v-model="family.relation" label="与本人关系" required placeholder="请输入与本人关系"></van-field>
|
||||
</div>
|
||||
<div class="p10"><van-button block plain type="primary" icon="plus" @click="addFamily">添加家庭成员</van-button></div>
|
||||
</van-cell-group>
|
||||
<van-cell-group title="备注"><van-field v-model="formData.remark" type="textarea" rows="3" maxlength="500" show-word-limit placeholder="请输入备注"></van-field></van-cell-group>
|
||||
<div class="p10"><van-button v-if="!isFundMember" block type="primary" @click="submit">提交申请</van-button></div>
|
||||
</van-form>
|
||||
<van-popup v-model="showBirthday" position="bottom"><van-datetime-picker type="date" :min-date="dateMin" :max-date="dateMax" @confirm="setDate('birthday', $event)" @cancel="showBirthday=false"></van-datetime-picker></van-popup>
|
||||
<van-popup v-model="showJoinWorkTime" position="bottom"><van-datetime-picker type="date" :min-date="dateMin" :max-date="dateMax" @confirm="setDate('joinWorkTime', $event)" @cancel="showJoinWorkTime=false"></van-datetime-picker></van-popup>
|
||||
<van-popup v-model="showRetireTime" position="bottom"><van-datetime-picker type="date" :min-date="dateMin" :max-date="dateMax" @confirm="setDate('retireTime', $event)" @cancel="showRetireTime=false"></van-datetime-picker></van-popup>
|
||||
<van-popup v-model="showSex" position="bottom"><van-picker show-toolbar :columns="['男','女']" @confirm="setPicker('sex', $event, 'showSex')" @cancel="showSex=false"></van-picker></van-popup>
|
||||
<van-popup v-model="showEducation" position="bottom"><van-picker show-toolbar :columns="educationOptions" value-key="name" @confirm="setPicker('education', $event.name, 'showEducation')" @cancel="showEducation=false"></van-picker></van-popup>
|
||||
<van-popup v-model="showMemberType" position="bottom"><van-picker show-toolbar :columns="memberTypeOptions" value-key="name" @confirm="setPicker('aidFundMemberType', $event.name, 'showMemberType')" @cancel="showMemberType=false"></van-picker></van-popup>
|
||||
</div>
|
||||
<script nonce="${cspNonce!}">
|
||||
new Vue({el:'#app',store,data(){return {bizId:GetQueryString('bizId'),taskId:GetQueryString('taskId'),isFundMember:false,dateMin:new Date(1950,0,1),dateMax:new Date(),formData:{families:[]},educationOptions:[],memberTypeOptions:[],showBirthday:false,showJoinWorkTime:false,showRetireTime:false,showSex:false,showEducation:false,showMemberType:false}},methods:{// 统一处理接口返回的日期,避免表单回显到时分秒。
|
||||
formatDate(value){return value?this.$moment(value).format('YYYY-MM-DD'):value},setDate(field,date){this.$set(this.formData,field,this.$moment(date).format('YYYY-MM-DD'));this.$set(this,'show' + field.charAt(0).toUpperCase() + field.slice(1),false)},setPicker(field,value,popup){this.$set(this.formData,field,value);this.$set(this,popup,false)},addFamily(){this.formData.families.push({sequence:this.formData.families.length+1,name:'',age:null,relation:''})},removeFamily(index){this.formData.families.splice(index,1);this.formData.families.forEach((item,i)=>this.$set(item,'sequence',i+1))},validateFamilies(){return this.formData.families.length>0&&this.formData.families.every(item=>item.name&&item.age!==null&&item.age!==''&&item.relation)},submit(){this.$refs.formRef.validate().then(()=>{if(this.formData.aidFundMemberType==='退休'&&!this.formData.retireTime){this.$toast.fail('会员类别为退休时,请选择退休时间');return}if(!this.validateFamilies()){this.$toast.fail('请完整填写至少一名家庭主要成员');return}this.$dialog.confirm({title:'提示',message:'您确定要提交申请吗?'}).then(()=>this.$axios.post(this.taskId?'/platform/fundMember/write/submitAgain':'/platform/fundMember/write/submit',{data:JSON.stringify(this.formData),taskId:this.taskId}).then(res=>{if(res.code===0){this.$toast.success('提交成功');this.$pjaxReplace('/platform/fundMember/mine/h5')}}))})},init(){if(this.bizId){this.$axios.post('/platform/fundMember/write/info',{id:this.bizId}).then(res=>{if(res.code===0){this.$set(this,'formData',res.data);this.$set(this.formData,'birthday',this.formatDate(this.formData.birthday));if(!Array.isArray(this.formData.families)){this.$set(this.formData,'families',[])}}})}else{const user=this.$store.state.user;this.$set(this,'formData',{userName:user.username,loginName:user.loginname,sex:user.sex,birthday:this.formatDate(user.birthday),mobile:user.mobile,idCard:user.idCard,unionId:user.union&&user.union.id,unionName:user.union&&user.union.name,userState:user.userState,education:user.education||'',nativePlace:'',healthStatus:'',remark:'',families:[]})}this.$businessTool.getDictOptions('USER_EDUCATION').then(data=>this.$set(this,'educationOptions',data));this.$businessTool.getDictOptions('USER_AID_FUND_MEMBER_TYPE').then(data=>this.$set(this,'memberTypeOptions',data));this.$axios.post('/platform/fundMember/write/memberStatus').then(res=>{if(res.code===0){this.$set(this,'isFundMember',Boolean(res.data))}})}},created(){this.init()}})
|
||||
</script>
|
||||
<style>.p10{padding:10px}.family-item{padding:10px;border-bottom:1px solid #eee}.family-title{display:flex;justify-content:space-between;align-items:center;font-weight:600}</style>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
Reference in New Issue
Block a user