first commit

This commit is contained in:
2026-01-08 14:58:16 +08:00
commit 556e5d64aa
9575 changed files with 1621095 additions and 0 deletions
@@ -0,0 +1,75 @@
const CHILD_MANAGE_INFO = {
template:
/*language=HTML*/`
<van-action-sheet v-model="visible" title="查看详情">
<div class="detail-container">
<van-cell-group>
<van-cell title="姓名">{{ viewData.childrenName }}</van-cell>
<van-cell title="就读年级">
<dict-tag :options="dict.type.CHILD_MANAGE_GRADE"
:value="viewData.childrenGrade">
</dict-tag></van-cell>
<van-cell title="入学年份">{{ viewData.childrenYear }}</van-cell>
<van-cell title="身份证号">{{ viewData.childrenIdCard }}</van-cell>
<van-cell title="出生日期">{{$moment(viewData.childrenBirthday).format('YYYY-MM-DD')}}</van-cell>
<van-cell title="性别">{{ viewData.childrenSex }}</van-cell>
<van-cell title="国籍">{{ viewData.childrenCountry }}</van-cell>
<van-cell title="就读学校">{{ viewData.childrenCurrentSchool }}</van-cell>
<van-cell title="中考总成绩">{{ viewData.childrenMiddleScore }}</van-cell>
<van-cell title="学科组合">{{ viewData.childrenSubjectCombination }}</van-cell>
<van-cell title="户籍所在地">{{ viewData.childrenHuKouAddress }}</van-cell>
<div class="process-title">监护人信息</div>
<van-cell title="监护人1">{{ viewData.guardianUserName1 }}</van-cell>
<van-cell title="联系电话">{{ viewData.guardianMobile1 }}</van-cell>
<van-cell title="工作单位">{{ viewData.guardianUnitName1 }}</van-cell>
<van-cell title="监护人2">{{ viewData.guardianUserName2 }}</van-cell>
<van-cell title="联系电话">{{ viewData.guardianMobile2 }}</van-cell>
<van-cell title="工作单位">{{ viewData.guardianUnitName2 }}</van-cell>
<van-cell title="备注">{{ viewData.note }}</van-cell>
<template slot="default">
<van-image :src="viewData.avatar"></van-image>
</template>
</van-cell>
</van-cell-group>
</div>
<slot></slot>
</van-action-sheet>
`,
dicts: ["CHILD_MANAGE_GRADE"],
data() {
return {
visible:false,
viewData: {},
activeName: "first",
isScrollNow: "0"
}
},
methods: {
onOpen(row) {
this.row = row
this.visible = true
this.getInfo()
},
// 关闭
onClose(){
this.visible = false
},
// 获取申请信息
getInfo() {
this.$axios.post("/platform/childManage/write/findOne", {id: this.row.id}).then((res) => {
if (res.code === 0) {
this.viewData = res.data
}
})
},
// 查看
openView(id) {
this.$nextTick(() => {
this.$refs.infoDialogRef.onOpen(id)
})
},
},
style: /*language=CSS*/ `
`
}
@@ -0,0 +1,155 @@
<!--#
layout("/layouts/platform_h5.html"){
#-->
<div id="app">
<van-nav-bar @click-left="historyBack" left-arrow left-text="返回" title="信息管理" placeholder fixed></van-nav-bar>
<van-sticky offset-top="46px">
<van-search
:reverse-color="false"
:show-action="false"
@search="doSearch"
input-align="left"
placeholder="请输入子女名称搜索"
v-model="pageForm.childrenName"
></van-search>
<van-dropdown-menu :close-on-click-outside="false" :close-on-click-overlay="false">
<van-dropdown-item :options="yearList" @change="doSearch" v-model="pageForm.year"></van-dropdown-item>
</van-dropdown-menu>
</van-sticky>
<table-list api="/platform/childManage/manage/pageData" :page_form.sync="pageForm" ref="tableListRef"
@ready="doSearch" title="taskName">
<template v-slot="{index,row}">
<table-column label="子女姓名">{{row.childrenName}}</table-column>
<table-column label="性别">{{row.childrenSex}}</table-column>
<table-column label="年龄">{{calculateAge(row.childrenBirthday)}}</table-column>
<table-column label="年级">
<dict-tag :options="dict.type.CHILD_MANAGE_GRADE"
:value="row.childrenGrade">
</dict-tag>
</table-column>
<table-column label="入学年份">{{row.childrenYear}}</table-column>
<!-- <table-column label="监护人1姓名">{{row.guardianUserName1}}</table-column>-->
<!-- <table-column label="手机号码">{{row.guardianMobile1}}</table-column>-->
<!-- <table-column label="所属单位">{{row.guardianUnitName1}}</table-column>-->
<!-- <table-column label="监护人2姓名">{{row.guardianUserName2}}</table-column>-->
<!-- <table-column label="手机号码">{{row.guardianMobile2}}</table-column>-->
<!-- <table-column label="所属单位">{{row.guardianUnitName2}}</table-column>-->
<!-- <table-column label="填报时间">{{row.applyTime}}</table-column>-->
</template>
<template #actions="{index,row}">
<div class="action-btn" @click="onView(row)">
<i class="fa fa-eye"></i>
<span>查看</span>
</div>
<div class="action-btn" @click="onEdit(row)">
<i class="fa fa-edit"></i>
<span>编辑</span>
</div>
<div class="action-btn delete" @click="onDelete(row)">
<i class="fa fa-trash"></i>
<span>删除</span>
</div>
</template>
</table-list>
<child-manage-info ref="childManageInfoRef"></child-manage-info>
</div>
<script nonce="${cspNonce!}">
<!--#include('../info.js'){}#-->
const vue = new Vue({
el: "#app",
store,
dicts: ["CHILD_MANAGE_GRADE"],
components: {
"child-manage-info":CHILD_MANAGE_INFO
},
data() {
return {
viewShow: false,
yearList: [],
infoShow: false,
pageForm: {
pageNumber: 1,
pageSize: 10,
totalCount: 0,
year: "",
},
}
},
methods: {
onView(row) {
this.showApprovalForm = false
this.$refs.childManageInfoRef.onOpen(row)
},
onEdit(row) {
window.location.href = '/platform/childManage/write/h5?bizId=' + row.id
},
onDelete(id) {
this.$dialog.confirm({
title: '温馨提示',
message: '您确定要删除吗?',
}).then(() => {
this.$axios.post("/platform/childManage/manage/doDelete", {id}).then((res) => {
if (res.code === 0) {
this.$toast.success(res.msg)
this.doSearch()
} else {
this.$toast.fail(res.msg)
}
})
}).catch(() => {
// on cancel
});
},
doSearch() {
this.$nextTick(() => {
this.pageForm.pageNumber = 1
this.pageForm.totalCount = 0
this.$refs.tableListRef.doSearch()
})
},
initData() {
for (let i = new Date().getFullYear() - 10; i <= new Date().getFullYear(); i++) {
this.yearList.unshift({value: i, text: i + "年"})
}
this.$set(this.pageForm, "year", this.yearList[0].value)
},
// 计算年龄的方法
calculateAge(birthday) {
if (!birthday) return '';
try {
// 解析日期字符串 (YYYY-MM-DD格式)
const birthDate = new Date(birthday);
const today = new Date();
let age = today.getFullYear() - birthDate.getFullYear();
const monthDiff = today.getMonth() - birthDate.getMonth();
// 如果还没过生日,则年龄减1
if (monthDiff < 0 || (monthDiff === 0 && today.getDate() < birthDate.getDate())) {
age--;
}
return age > 0 ? age + '岁' : '0岁';
} catch (error) {
console.error('计算年龄出错:', error);
return '';
}
},
},
created() {
this.initData()
}
})
</script>
<!--#
}
#-->
@@ -0,0 +1,148 @@
<!--#
layout("/layouts/platform_h5.html"){
#-->
<div id="app">
<van-nav-bar @click-left="historyBack" left-arrow left-text="返回" title="我的子女" placeholder fixed></van-nav-bar>
<van-sticky offset-top="46px">
<van-dropdown-menu :close-on-click-outside="false" :close-on-click-overlay="false">
<van-dropdown-item :options="yearList" @change="doSearch" v-model="pageForm.year"></van-dropdown-item>
</van-dropdown-menu>
</van-sticky>
<table-list api="/platform/childManage/mine/pageData" :page_form.sync="pageForm" ref="tableListRef"
@ready="doSearch" title="taskName">
<template v-slot="{index,row}">
<table-column label="子女姓名">{{row.childrenName}}</table-column>
<table-column label="性别">{{row.childrenSex}}</table-column>
<table-column label="年龄">{{calculateAge(row.childrenBirthday)}}</table-column>
<table-column label="年级">
<dict-tag :options="dict.type.CHILD_MANAGE_GRADE"
:value="row.childrenGrade">
</dict-tag>
</table-column>
<table-column label="入学年份">{{row.childrenYear}}</table-column>
<!-- <table-column label="监护人1姓名">{{row.guardianUserName1}}</table-column>-->
<!-- <table-column label="手机号码">{{row.guardianMobile1}}</table-column>-->
<!-- <table-column label="所属单位">{{row.guardianUnitName1}}</table-column>-->
<!-- <table-column label="监护人2姓名">{{row.guardianUserName2}}</table-column>-->
<!-- <table-column label="手机号码">{{row.guardianMobile2}}</table-column>-->
<!-- <table-column label="所属单位">{{row.guardianUnitName2}}</table-column>-->
<!-- <table-column label="填报时间">{{row.applyTime}}</table-column>-->
</template>
<template #actions="{index,row}">
<div class="action-btn" @click="onView(row)">
<i class="fa fa-eye"></i>
<span>查看</span>
</div>
<div class="action-btn" @click="onEdit(row)">
<i class="fa fa-edit"></i>
<span>编辑</span>
</div>
<div class="action-btn delete" @click="onDelete(row)">
<i class="fa fa-trash"></i>
<span>删除</span>
</div>
</template>
</table-list>
<child-manage-info ref="childManageInfoRef"></child-manage-info>
</div>
<script nonce="${cspNonce!}">
<!--#include('../info.js'){}#-->
const vue = new Vue({
el: "#app",
store,
dicts: ["CHILD_MANAGE_GRADE"],
components: {
"child-manage-info":CHILD_MANAGE_INFO
},
data() {
return {
viewShow: false,
yearList: [],
infoShow: false,
pageForm: {
pageNumber: 1,
pageSize: 10,
totalCount: 0,
year: "",
},
}
},
methods: {
onView(row) {
this.showApprovalForm = false
this.$refs.childManageInfoRef.onOpen(row)
},
onEdit(row) {
window.location.href = '/platform/childManage/write/h5?bizId=' + row.id
},
onDelete(row) {
this.$dialog.confirm({
title: '温馨提示',
message: '您确定要删除吗?',
}).then(() => {
this.$axios.post("/platform/childManage/mine/doDelete", {id: row.id}).then((res) => {
if (res.code === 0) {
this.$toast.success(res.msg)
this.doSearch()
} else {
this.$toast.fail(res.msg)
}
})
}).catch(() => {
// on cancel
});
},
doSearch() {
this.$nextTick(() => {
this.pageForm.pageNumber = 1
this.pageForm.totalCount = 0
this.$refs.tableListRef.doSearch()
})
},
initData() {
for (let i = new Date().getFullYear() - 10; i <= new Date().getFullYear(); i++) {
this.yearList.unshift({value: i, text: i + "年"})
}
this.$set(this.pageForm, "year", this.yearList[0].value)
},
// 计算年龄的方法
calculateAge(birthday) {
if (!birthday) return '';
try {
// 解析日期字符串 (YYYY-MM-DD格式)
const birthDate = new Date(birthday);
const today = new Date();
let age = today.getFullYear() - birthDate.getFullYear();
const monthDiff = today.getMonth() - birthDate.getMonth();
// 如果还没过生日,则年龄减1
if (monthDiff < 0 || (monthDiff === 0 && today.getDate() < birthDate.getDate())) {
age--;
}
return age > 0 ? age + '岁' : '0岁';
} catch (error) {
console.error('计算年龄出错:', error);
return '';
}
},
},
created() {
this.initData()
}
})
</script>
<!--#
}
#-->
@@ -0,0 +1,342 @@
<!--#
layout("/layouts/platform_h5.html"){
#-->
<style scoped>
#app {
background-color: #f7f8fa;
height: 100vh;
overflow-y: auto;
}
</style>
<div id="app">
<van-nav-bar title="子女信息填报" left-text="返回" left-arrow @click-left="historyBack" placeholder fixed></van-nav-bar>
<!-- 表单容器 -->
<van-form ref="formRef" class="form-container">
<!-- 子女信息 -->
<van-cell-group title="子女信息" class="form-section">
<van-field label="姓名" :rules="[{ required: true }]" v-model="formData.childrenName" placeholder="请输入姓名" required></van-field>
<van-field
v-model="formData.childrenGrade"
name="childrenGrade"
label="就读年级"
readonly
placeholder="请选择就读年级"
@click="showChildrenGradePicker = true"
clickable
></van-field>
<van-popup position="bottom" round v-model:show="showChildrenGradePicker">
<van-picker :columns="childrenGradeColumns" @cancel="showChildrenGradePicker = false" @confirm="onChildrenGradeConfirm" show-toolbar></van-picker>
</van-popup>
<van-field
label="入学年份"
v-model="formData.childrenYear"
placeholder="请选择入学年份"
readonly
@click="showYearPicker = true"
clickable
></van-field>
<van-popup position="bottom" round v-model="showYearPicker">
<van-picker
:columns="yearColumns"
@cancel="showYearPicker = false"
@confirm="onYearConfirm"
show-toolbar
></van-picker>
</van-popup>
<van-field
label="身份证号"
v-model="formData.childrenIdCard"
placeholder="请输入身份证号"
:rules="formRules.childrenIdCard"
required
></van-field> <van-field
label="出生年月"
v-model="formData.childrenBirthday"
placeholder="请选择出生年月"
readonly
@click="showBirthdayPicker = true"
clickable
></van-field>
<van-popup v-model="showBirthdayPicker" position="bottom">
<van-datetime-picker
v-model="currentDate"
type="date"
title="选择年月日"
:min-date="minDate"
:max-date="maxDate"
@confirm="onBirthdayConfirm"
@cancel="showBirthdayPicker = false"
/>
</van-popup>
<van-field
label="性别"
v-model="formData.childrenSex"
placeholder="请选择性别"
readonly
@click="showSexPicker = true"
clickable
></van-field>
<van-popup position="bottom" round v-model="showSexPicker">
<van-picker
:columns="sexColumns"
@cancel="showSexPicker = false"
@confirm="onSexConfirm"
show-toolbar
></van-picker>
</van-popup>
<van-field label="国籍" v-model="formData.childrenCountry" placeholder="请输入国籍"></van-field>
<van-field label="就读学校" v-model="formData.childrenCurrentSchool" placeholder="请输入就读学校"></van-field>
<van-field label="中考总成绩" v-model="formData.childrenMiddleScore" placeholder="请输入中考总成绩"></van-field>
<van-field label="学科组合" v-model="formData.childrenSubjectCombination" placeholder="请输入学科组合"></van-field>
<van-field label="户籍所在地" v-model="formData.childrenHuKouAddress" placeholder="请输入户籍所在地"></van-field>
</van-cell-group>
<!-- 监护人信息 -->
<van-cell-group title="监护人信息" class="form-section">
<van-field label="监护人1" v-model="formData.guardianUserName1" readonly placeholder="读取信息中心数据"></van-field>
<van-field label="工号" v-model="formData.guardianLoginName1" readonly placeholder="读取信息中心数据"></van-field>
<van-field
label="手机号码"
v-model="formData.guardianMobile1"
placeholder="读取信息中心数据"
:rules="formRules.guardianMobile1"
></van-field>
<van-field label="所在单位" v-model="formData.guardianUnitName1" readonly placeholder="读取信息中心数据"></van-field>
<van-field
label="监护人2"
v-model="formData.guardianUserName2"
placeholder="请输入监护人姓名"
></van-field>
<van-field label="工号" v-model="formData.guardianLoginName2" placeholder="没有则不填" ></van-field>
<van-field
label="手机号码"
v-model="formData.guardianMobile2"
placeholder="请输入手机号码"
></van-field>
<van-field label="所在单位" v-model="formData.guardianUnitName2" placeholder="请输入所在单位"></van-field>
<van-field
label="备注"
v-model="formData.note"
placeholder="请输入备注"
type="textarea"
rows="4"
autosize
></van-field>
</van-cell-group>
<!-- 提交按钮 -->
<div class="form-actions">
<van-button @click="onSave" round type="info">保存申请</van-button>
</div>
</van-form>
</div>
<script nonce="${cspNonce!}">
new Vue({
store,
el: '#app',
dicts: ["CHILD_MANAGE_GRADE"],
data() {
return {
bizId: GetQueryString("bizId"),
formData: {
childrenName: '',
childrenGrade: '',
childrenYear: '',
childrenIdCard: '',
childrenBirthday: '',
childrenSex: '',
childrenCountry: '',
childrenCurrentSchool: '',
childrenMiddleScore: '',
childrenSubjectCombination: '',
childrenHuKouAddress: '',
guardianUserName1: '',
guardianLoginName1: '',
guardianMobile1: '',
guardianUnitName1: '',
guardianUserName2: '',
guardianLoginName2: '',
guardianMobile2: '',
guardianUnitName2: '',
// 添加监护人ID和工会信息
guardianUserId1: '',
guardianUnionId1: '',
guardianUnionName1: '',
guardianUnitId1: '',
guardianUserId2: '',
guardianUnionId2: '',
guardianUnionName2: '',
guardianUnitId2: ''
},
//就读年级
showChildrenGradePicker: false,
childrenGradeColumns: [],
//入学年份
showYearPicker: false,
yearColumns: [],
//性别选择
showSexPicker: false,
sexColumns: [
{ text: '男', value: '男' },
{ text: '女', value: '女' }
],
//监护人1
showGuardian1Picker: false,
guardian1SearchKeyword: '',
guardian1Options: [],
showManualGuardian1Dialog: false,
manualGuardian1Name: '',
//监护人2
showGuardian2Picker: false,
guardian2SearchKeyword: '',
guardian2Options: [],
showManualGuardian2Dialog: false,
manualGuardian2Name: '',
//出生年月
showBirthdayPicker: false,
currentDate: new Date(), // 添加这一行
minDate: new Date(1900, 0, 1),
maxDate: new Date(),
formRules: {
childrenIdCard: [
{ pattern: /^[1-9]\d{5}(18|19|20)\d{2}((0[1-9])|(1[0-2]))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/, message: '请输入正确的身份证号码' }
],
guardianMobile1: [
{ pattern: /^1[3-9]\d{9}$/, message: '请输入正确的手机号码' }
],
}
}
},
methods: {
onSave() {
// 先进行表单验证
this.$refs.formRef.validate().then(() => {
this.$dialog.confirm({
title: "提示",
message: "您确定保存吗?"
}).then(() => {
// 创建提交数据的副本
const submitData = {...this.formData};
// 如果有年级代码值,则使用代码值提交
if (this.formData.childrenGradeCode) {
submitData.childrenGrade = this.formData.childrenGradeCode;
}
this.$axios.post("/platform/childManage/write/save", { data: JSON.stringify(submitData) }).then(res => {
if (res.code === 0) {
this.$toast(res.msg)
this.$pjaxReplace('/platform/childManage/mine/h5')
}
})
})
}).catch(() => {
// 验证失败,Vant 会自动显示错误信息
});
},
onChildrenGradeConfirm(o) {
// 显示名称给用户看
this.$set(this.formData, "childrenGrade", o.text);
// 同时保存代码值用于提交到数据库
this.$set(this.formData, "childrenGradeCode", o.value);
this.showChildrenGradePicker = false;
},
// 入学年份确认选择
onYearConfirm(o) {
this.$set(this.formData, "childrenYear", o.value)
this.showYearPicker = false
},
// 初始化年份选项
initYearOptions() {
const currentYear = new Date().getFullYear();
const years = [];
// 生成近20年的年份选项
for (let i = currentYear - 20; i <= currentYear + 3; i++) {
years.push({ text: i + '年', value: i.toString() });
}
this.yearColumns = years;
},
// 性别确认选择
onSexConfirm(o) {
this.$set(this.formData, "childrenSex", o.value)
this.showSexPicker = false
},
// 出生年月确认选择
onBirthdayConfirm(value) {
try {
// 格式化日期为 YYYY-MM-DD
const year = value.getFullYear();
const month = String(value.getMonth() + 1).padStart(2, '0');
const day = String(value.getDate()).padStart(2, '0');
this.$set(this.formData, "childrenBirthday", year + "-" + month + "-" + day);
this.showBirthdayPicker = false;
} catch (error) {
this.$toast.fail('日期格式化失败');
console.error('日期格式化错误:', error);
}
},
async initDictOptions() {
// 就读年级
const childrenGradeData = await this.$businessTool.getDictOptions('CHILD_MANAGE_GRADE')
this.childrenGradeColumns = childrenGradeData.map(item => {
return {value: item.code, text: item.name}
})
// 初始化年份选项
this.initYearOptions();
},
init() {
this.bizId = GetQueryString("bizId")
if (this.bizId) {
this.$axios.post("/platform/childManage/write/findOne", { id: this.bizId }).then((res) => {
if (res.code === 0) {
this.formData = res.data
// 修复:正确处理年级显示
if (this.childrenGradeColumns.length > 0) {
const matchedGrade = this.childrenGradeColumns.find(item =>
item.value === this.formData.childrenGrade
)
if (matchedGrade) {
// 显示名称给用户看
this.$set(this.formData, "childrenGrade", matchedGrade.text)
// 保存代码值用于提交
this.$set(this.formData, "childrenGradeCode", matchedGrade.value)
}
}
}
})
} else {
const user = this.$store.state.user
this.$set(this.formData, "guardianUserId1", user.id)
this.$set(this.formData, "guardianUserName1", user.username)
this.$set(this.formData, "guardianLoginName1", user.loginname)
this.$set(this.formData, "guardianUnitId1", user.unit ? user.unit.id : null)
this.$set(this.formData, "guardianUnitName1", user.unit ? user.unit.name : null)
this.$set(this.formData, "guardianUnionId1", user.union ? user.union.id : null)
this.$set(this.formData, "guardianUnionName1", user.union ? user.union.name : null)
this.$set(this.formData, "guardianMobile1", user.mobile)
}
}
},
created() {
this.initDictOptions();
this.init();
}
});
</script>
<!--#
}
#-->
@@ -0,0 +1,223 @@
<!--#
layout("/layouts/platform_h5.html"){
#-->
<div id="app" v-cloak>
<van-nav-bar title="入会分工会审核" left-text="返回" left-arrow @click-left="historyBack" placeholder fixed></van-nav-bar>
<van-sticky>
<van-search
v-model="pageForm.searchKeyword"
placeholder="请输入工号或者姓名进行查询"
show-action
:reverse-color="false"
input-align="left"
@search="doSearch">
<template #action>
<div @click="doSearch">搜索</div>
</template>
</van-search>
<van-dropdown-menu :close-on-click-outside="false" :close-on-click-overlay="false">
<van-dropdown-item :options="unitList" @change="doSearch" v-model="pageForm.unitId"></van-dropdown-item>
<van-dropdown-item :options="auditList" @change="doSearch" v-model="pageForm.audit"></van-dropdown-item>
</van-dropdown-menu>
</van-sticky>
<table-list api="/platform/member/apply/branchUnionApproval/pageData" :page_form.sync="pageForm" ref="tableListRef" title="userName" @ready="doSearch">
<template v-slot="{index,row}">
<table-column label="工号">{{row.loginName}}</table-column>
<table-column label="所属工会">{{row.unionName}}</table-column>
<table-column label="工作单位">{{row.unitName}}</table-column>
<table-column label="填报时间">{{row.applyDateTime}}</table-column>
<table-column label="当前节点">{{row.curTaskName}}</table-column>
</template>
<template #actions="{index,row}">
<div class="action-btn" @click="onView(row)">
<i class="fa fa-eye"></i>
<span>查看</span>
</div>
<div class="action-btn" v-if="row.taskState === 10" @click="onApproval(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>
<info ref="infoRef">
<div v-if="showApprovalForm">
<div class="process-title">{{formData.taskName}}</div>
<van-form ref="formRef">
<van-field
v-model="formData.tf_opinion"
name="tf_opinion"
label="审批意见"
placeholder="请输入审批意见"
:rules="[{ required: true, message: '请填写审批意见' }]"
required
maxlength="100"
show-word-limit
></van-field>
</van-form>
<div style="display: flex; justify-content: space-between; column-gap: 10px; padding: 10px">
<van-button type="danger" block @click="handleTaskAction(6)">退回</van-button>
<van-button type="danger" block @click="handleTaskAction(2)">拒绝</van-button>
<van-button type="primary" block @click="handleTaskAction(1)">同意</van-button>
</div>
</div>
</info>
</div>
<script nonce="${cspNonce!}">
<!--#include("../common/info.js"){}#-->
new Vue({
el: "#app",
store,
data() {
return {
pageForm: {
pageNumber: 1,
pageSize: 10,
totalCount: 0,
unionId: "",
unitId: "",
audit: false
},
unitList: [],
auditList: [
{ text: "已审核", value: true },
{ text: "未审核", value: false }
],
// 审核相关
formData: {},
showApprovalForm: false
}
},
components: {
"info": INFO
},
methods: {
historyBack,
onReady() {
this.doSearch()
},
doSearch() {
this.$nextTick(() => {
this.pageForm.pageNumber = 1
this.pageForm.totalCount = 0
this.$refs.tableListRef.doSearch()
})
},
// 查看详情
onView(row) {
this.showApprovalForm = false
this.$refs.infoRef.onOpen(row)
},
onApproval(row) {
this.showApprovalForm = true
this.$refs.infoRef.onOpen(row)
this.formData = {
processTaskId: row.taskId,
taskName: row.curTaskName
}
},
async handleTaskAction(val) {
await this.$refs.formRef.validate();
this.$dialog.confirm({
title: "提示",
message: "您确定要提交吗?"
}).then(() => {
const loading = this.$toast.loading({
message: "加载中...",
forbidClick: true,
overlay: true,
duration: 0
})
this.$axios.post("/flow/common/executeTask", {
data: JSON.stringify({
...this.formData,
submitType: val
})
}).then((res) => {
if (res.code === 0) {
this.$refs.infoRef.onClose()
this.$toast.success(res.msg)
this.doSearch()
}
}).finally(() => {
loading.close()
})
})
},
// 撤回
onRevoke(row) {
this.$dialog.confirm({
title: '提示',
message: '您确定要撤回吗?',
}).then(() => {
const loading = this.$toast.loading({
message: "加载中...",
forbidClick: true,
overlay: true,
duration: 0
})
this.$axios.post('/flow/common/revokeTask', {taskId: row.taskId}).then(res => {
if (res.code === 0) {
this.$toast.success('撤回成功');
this.doSearch();
}
}).finally(() => {
loading.close()
})
})
},
initUnion() {
const hasAdmin = this.$auth.hasRoleOr(["SYSADMIN", "SCHOOL_UNION_ADMIN"])
const unionId = hasAdmin ? null : this.$store.state.user.union.id
this.$businessTool.listUnion(unionId).then((data) => {
this.unionList = data
this.unionList.forEach((v) => {
v.text = v.name
v.value = v.id
})
if (hasAdmin) {
this.unionList.unshift({ text: "全部工会", value: null })
}
if (this.unionList && this.unionList.length > 0) {
this.$set(this.pageForm, "unionId", this.unionList[0].value)
}
})
},
flushUnits() {
const hasAdmin = this.$auth.hasRoleOr(["SYSADMIN", "SCHOOL_UNION_ADMIN"])
const unionId = hasAdmin ? this.pageForm.unionId : this.$store.state.user.union.id
this.$businessTool.listUnit(unionId).then((data) => {
this.unitList = data
this.unitList.forEach((v) => {
v.text = v.name
v.value = v.id
})
if (this.unitList && this.unitList.length > 0) {
this.unitList.unshift({ text: "全部单位", value: null })
this.$set(this.pageForm, "unitId", this.unitList[0].value)
}
})
}
},
async created() {
await this.initUnion()
await this.flushUnits()
}
})
</script>
<!--#
}
#-->
@@ -0,0 +1,160 @@
const INFO = {
template: /*language=HTML*/ `
<van-action-sheet v-model="visible" title="查看详情">
<div class="detail-container">
<van-cell-group title="基本信息">
<van-cell title="工号">{{ viewData.loginname }}</van-cell>
<van-cell title="姓名">{{ viewData.username }}</van-cell>
<van-cell title="性别">{{ viewData.sex }}</van-cell>
<van-cell title="民族">{{ viewData.nation }}</van-cell>
<van-cell title="出生日期">{{ $moment(viewData.birthday).format("YYYY年MM月DD日") }}</van-cell>
<van-cell title="政治面貌">{{ viewData.political }}</van-cell>
<van-cell title="学历">{{ viewData.education }}</van-cell>
<van-cell title="学位">{{ viewData.academicDegree }}</van-cell>
<van-cell title="党政职务">{{ viewData.position }}</van-cell>
<van-cell title="工作单位">{{ viewData.unitName }}</van-cell>
<van-cell title="所属工会">{{ viewData.unionName }}</van-cell>
<van-cell title="所属校区">{{ viewData.campus }}</van-cell>
<van-cell title="身份证号码">{{ viewData.idCard }}</van-cell>
<van-cell title="联系电话">{{ viewData.mobile }}</van-cell>
<van-cell title="电子邮箱">{{ viewData.email }}</van-cell>
<van-cell title="在职状态">{{ viewData.userState }}</van-cell>
<van-cell title="教职工类别">{{ viewData.personType }}</van-cell>
<van-cell title="人员性质">{{ viewData.preparedBy || '暂无' }}</van-cell>
<template v-if="viewData.loginname === $store.state.user.loginnmae">
<van-cell title="家庭成员" class="column-cell">
<table class="family-table">
<thead>
<tr>
<th class="table-header">序号</th>
<th class="table-header">与本人关系</th>
<th class="table-header">姓名</th>
<th class="table-header">单位</th>
<th class="table-header">备注</th>
</tr>
</thead>
<tbody>
<tr class="table-row" v-for="(item, index) in viewData.families" :key="index">
<td class="table-cell">{{ index + 1 }}</td>
<td class="table-cell">{{ item.relation }}</td>
<td class="table-cell">{{ item.name }}</td>
<td class="table-cell">{{ item.unit }}</td>
<td class="table-cell">{{ item.remark }}</td>
</tr>
</tbody>
</table>
</van-cell>
<van-cell title="个人简历">
<template #label>
<div v-if="viewData.vita" class="text-left" v-html="viewData.vita"></div>
<span style="font-size: 14px" v-else>无数据</span>
</template>
</van-cell>
</template>
</van-cell-group>
<template v-for="task in doneTasks">
<van-cell-group :title="task.displayName" v-if="task.ext.isFirstTaskNode">
<van-cell title="申请用户">{{ task.ext.initiatorName }}({{task.ext.initiatorAccount}})
</van-cell>
<van-cell title="申请时间">{{ 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 :title="task.displayName" v-else>
<van-cell title="办理用户">{{ task.taskFormData.userName }}({{task.taskFormData.loginName}})
</van-cell>
<van-cell title="办理时间">{{ task.finishTime }}</van-cell>
<van-cell title="办理结果">
<dict-tag :options="dict.type.PROPOSAL_CASE_FILING_RESULT"
:value="task.ext.caseFilingResult"></dict-tag>
</van-cell>
<van-cell title="办理意见" v-if="!task.ext.isFirstTaskNode" class="direction-column-cell">
<div v-html="task.taskFormData.tf_opinion"></div>
</van-cell>
</van-cell-group>
</template>
</div>
<slot></slot>
</van-action-sheet>
`,
dicts: ["PROCESS_TASK_SUBMIT_TYPE"],
data() {
return {
visible: false,
row: {},
viewData: {},
doneTasks: [],
}
},
methods: {
onOpen(row) {
this.row = row
this.visible = true
this.info()
this.getDoneTasks()
},
// 关闭
onClose(){
this.visible = false
},
info() {
this.$axios.post("/platform/member/apply/mine/findMemberApplyRecord", { id: this.row.id }).then((res) => {
if (res.code === 0) {
this.viewData = res.data
}
})
},
getDoneTasks() {
this.$axios.post("/flow/common/doneTasks", { bizId: this.row.id }).then((res) => {
if (res.code === 0) {
this.doneTasks = res.data
}
})
},
},
style: /*language=CSS*/ `
.column-cell {
flex-direction: column;
}
.family-table {
width: 100%;
max-width: 100%;
border-collapse: collapse;
table-layout: auto;
text-align: center;
font-family: 'Arial', sans-serif;
margin: 20px 0;
}
.table-header {
background-color: gray;
color: white;
font-weight: bold;
text-transform: uppercase;
}
.table-row {
background-color: #f9f9f9;
transition: background-color 0.3s;
}
.table-row:hover {
background-color: #f1f1f1;
}
.table-cell {
padding: 10px 20px;
border: 1px solid #ddd;
text-align: center;
}
`
}
@@ -0,0 +1,189 @@
<!--#
layout("/layouts/platform_h5.html"){
#-->
<div id="app" v-cloak>
<van-sticky>
<van-nav-bar title="入会填报记录" left-text="返回" left-arrow @click-left="historyBack" placeholder fixed></van-nav-bar>
<van-search
v-model="pageForm.searchKeyword"
placeholder="请输入工号或者姓名进行查询"
show-action
:reverse-color="false"
input-align="left"
@search="doSearch">
<template #action>
<div @click="doSearch">搜索</div>
</template>
</van-search>
<van-dropdown-menu
v-if="$auth.hasRoleOr('SYSADMIN,SCHOOL_UNION_ADMIN,BRANCH_UNION_CHAIRMAN')"
:close-on-click-outside="false"
:close-on-click-overlay="false"
>
<van-dropdown-item :options="unionList" @change="unionChange" v-model="pageForm.unionId"></van-dropdown-item>
<van-dropdown-item :options="unitList" @change="doSearch" v-model="pageForm.unitId"></van-dropdown-item>
</van-dropdown-menu>
</van-sticky>
<table-list api="/platform/member/apply/mine/pageData" :page_form.sync="pageForm" ref="tableListRef" title="userName" @ready="doSearch">
<template v-slot="{index,row}">
<table-column label="工号">{{row.loginName}}</table-column>
<table-column label="所属工会">{{row.unionName}}</table-column>
<table-column label="工作单位">{{row.unitName}}</table-column>
<table-column label="填报时间">{{row.applyDateTime}}</table-column>
<table-column label="当前节点">{{row.curTaskName}}</table-column>
</template>
<template #actions="{index,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>
<div class="action-btn delete" v-if="row.taskKey === 'startTask' || !row.instanceId"
@click="onDelete(row.id)">
<i class="fa fa-trash"></i>
<span>删除</span>
</div>
</template>
</table-list>
<info ref="infoRef"></info>
</div>
<script nonce="${cspNonce!}">
<!--#include("../common/info.js"){}#-->
new Vue({
el: "#app",
store,
data() {
return {
pageForm: {
pageNumber: 1,
pageSize: 10,
totalCount: 0,
searchKeyword: "",
unionId: "",
unitId: ""
},
unionList: [],
unitList: [],
}
},
components: {
"info": INFO
},
methods: {
historyBack,
onView(row) {
this.$refs.infoRef.onOpen(row)
},
onEdit(row) {
this.$pjaxReplace('/platform/member/apply/submit/h5?taskId=' + (row.startTaskId || '') + "&bizId=" + row.id)
},
onRevoke(row) {
this.$dialog.confirm({
title: "提示",
message: "您确定要撤销吗?",
confirmButtonText: "确定",
cancelButtonText: "取消"
}).then(() => {
const loading = this.$toast.loading({
message: "加载中...",
forbidClick: true,
overlay: true,
duration: 0
})
this.$axios.post("/flow/common/revokeTask", { taskId: row.startTaskId }).then((resp) => {
this.$toast.success(resp.msg)
this.doSearch()
}).finally(() => {
loading.close()
})
})
},
onDelete(id) {
this.$dialog.confirm({
title: "提示",
message: "您确定要删除吗?",
confirmButtonText: "确定",
cancelButtonText: "取消"
}).then(() => {
const loading = this.$toast.loading({
message: "加载中...",
forbidClick: true,
overlay: true,
duration: 0
})
this.$axios.post("/platform/member/apply/mine/onDelete", { id }).then((res) => {
if (res.code === 0) {
this.doSearch()
this.$toast.success(res.msg)
} else {
this.$toast.fail(res.msg)
}
}).finally(() => {
loading.close()
})
})
},
doSearch() {
this.pageForm.pageNumber = 1
this.pageForm.totalCount = 0
this.$refs.tableListRef.doSearch()
},
unionChange() {
this.$set(this.pageForm, "unitId", null)
this.flushUnits()
this.doSearch()
},
async initUnion() {
const hasAdmin = this.$auth.hasRoleOr(["SYSADMIN", "SCHOOL_UNION_ADMIN"])
const unionId = hasAdmin ? null : this.$store.state.user.union.id
this.unionList = await this.$businessTool.listUnion(unionId)
this.unionList.forEach((v) => {
v.text = v.name
v.value = v.id
})
if (hasAdmin) {
this.unionList.unshift({ text: "全部工会", value: null })
}
if (this.unionList && this.unionList.length > 0) {
this.$set(this.pageForm, "unionId", this.unionList[0].value)
}
},
async flushUnits() {
const hasAdmin = this.$auth.hasRoleOr(["SYSADMIN", "SCHOOL_UNION_ADMIN"])
const unionId = hasAdmin ? this.pageForm.unionId : this.$store.state.user.union.id
this.unitList = await this.$businessTool.listUnit(unionId)
this.unitList.forEach((v) => {
v.text = v.name
v.value = v.id
})
this.unitList.unshift({ text: "全部单位", value: null })
if (this.unitList && this.unitList.length > 0) {
this.$set(this.pageForm, "unitId", this.unitList[0].value)
}
}
},
async created() {
await this.initUnion()
await this.flushUnits()
}
})
</script>
<!--#
}
#-->
@@ -0,0 +1,223 @@
<!--#
layout("/layouts/platform_h5.html"){
#-->
<div id="app" v-cloak>
<van-nav-bar title="入会校工会审核" left-text="返回" left-arrow @click-left="historyBack" placeholder fixed></van-nav-bar>
<van-sticky>
<van-search
v-model="pageForm.searchKeyword"
placeholder="请输入工号或者姓名进行查询"
show-action
:reverse-color="false"
input-align="left"
@search="doSearch">
<template #action>
<div @click="doSearch">搜索</div>
</template>
</van-search>
<van-dropdown-menu :close-on-click-outside="false" :close-on-click-overlay="false">
<van-dropdown-item :options="unitList" @change="doSearch" v-model="pageForm.unitId"></van-dropdown-item>
<van-dropdown-item :options="auditList" @change="doSearch" v-model="pageForm.audit"></van-dropdown-item>
</van-dropdown-menu>
</van-sticky>
<table-list api="/platform/member/apply/schoolUnionApproval/pageData" :page_form.sync="pageForm" ref="tableListRef" title="userName" @ready="doSearch">
<template v-slot="{index,row}">
<table-column label="工号">{{row.loginName}}</table-column>
<table-column label="所属工会">{{row.unionName}}</table-column>
<table-column label="工作单位">{{row.unitName}}</table-column>
<table-column label="填报时间">{{row.applyDateTime}}</table-column>
<table-column label="当前节点">{{row.curTaskName}}</table-column>
</template>
<template #actions="{index,row}">
<div class="action-btn" @click="onView(row)">
<i class="fa fa-eye"></i>
<span>查看</span>
</div>
<div class="action-btn" v-if="row.taskState === 10" @click="onApproval(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>
<info ref="infoRef">
<div v-if="showApprovalForm">
<div class="process-title">{{formData.taskName}}</div>
<van-form ref="formRef">
<van-field
v-model="formData.tf_opinion"
name="tf_opinion"
label="审批意见"
placeholder="请输入审批意见"
:rules="[{ required: true, message: '请填写审批意见' }]"
required
maxlength="100"
show-word-limit
></van-field>
</van-form>
<div style="display: flex; justify-content: space-between; column-gap: 10px; padding: 10px">
<van-button type="danger" block @click="handleTaskAction(6)">退回</van-button>
<van-button type="danger" block @click="handleTaskAction(2)">拒绝</van-button>
<van-button type="primary" block @click="handleTaskAction(1)">同意</van-button>
</div>
</div>
</info>
</div>
<script nonce="${cspNonce!}">
<!--#include("../common/info.js"){}#-->
new Vue({
el: "#app",
store,
data() {
return {
pageForm: {
pageNumber: 1,
pageSize: 10,
totalCount: 0,
unionId: "",
unitId: "",
audit: false
},
unitList: [],
auditList: [
{ text: "已审核", value: true },
{ text: "未审核", value: false }
],
// 审核相关
formData: {},
showApprovalForm: false
}
},
components: {
"info": INFO
},
methods: {
historyBack,
onReady() {
this.doSearch()
},
doSearch() {
this.$nextTick(() => {
this.pageForm.pageNumber = 1
this.pageForm.totalCount = 0
this.$refs.tableListRef.doSearch()
})
},
// 查看详情
onView(row) {
this.showApprovalForm = false
this.$refs.infoRef.onOpen(row)
},
onApproval(row) {
this.showApprovalForm = true
this.$refs.infoRef.onOpen(row)
this.formData = {
processTaskId: row.taskId,
taskName: row.curTaskName
}
},
async handleTaskAction(val) {
await this.$refs.formRef.validate();
this.$dialog.confirm({
title: "提示",
message: "您确定要提交吗?"
}).then(() => {
const loading = this.$toast.loading({
message: "加载中...",
forbidClick: true,
overlay: true,
duration: 0
})
this.$axios.post("/flow/common/executeTask", {
data: JSON.stringify({
...this.formData,
submitType: val
})
}).then((res) => {
if (res.code === 0) {
this.$refs.infoRef.onClose()
this.$toast.success(res.msg)
this.doSearch()
}
}).finally(() => {
loading.close()
})
})
},
// 撤回
onRevoke(row) {
this.$dialog.confirm({
title: '提示',
message: '您确定要撤回吗?',
}).then(() => {
const loading = this.$toast.loading({
message: "加载中...",
forbidClick: true,
overlay: true,
duration: 0
})
this.$axios.post('/flow/common/revokeTask', {taskId: row.startTaskId}).then(res => {
if (res.code === 0) {
this.$toast.success('撤回成功');
this.doSearch();
}
}).finally(() => {
loading.close()
})
})
},
initUnion() {
const hasAdmin = this.$auth.hasRoleOr(["SYSADMIN", "SCHOOL_UNION_ADMIN"])
const unionId = hasAdmin ? null : this.$store.state.user.union.id
this.$businessTool.listUnion(unionId).then((data) => {
this.unionList = data
this.unionList.forEach((v) => {
v.text = v.name
v.value = v.id
})
if (hasAdmin) {
this.unionList.unshift({ text: "全部工会", value: null })
}
if (this.unionList && this.unionList.length > 0) {
this.$set(this.pageForm, "unionId", this.unionList[0].value)
}
})
},
flushUnits() {
const hasAdmin = this.$auth.hasRoleOr(["SYSADMIN", "SCHOOL_UNION_ADMIN"])
const unionId = hasAdmin ? this.pageForm.unionId : this.$store.state.user.union.id
this.$businessTool.listUnit(unionId).then((data) => {
this.unitList = data
this.unitList.forEach((v) => {
v.text = v.name
v.value = v.id
})
if (this.unitList && this.unitList.length > 0) {
this.unitList.unshift({ text: "全部单位", value: null })
this.$set(this.pageForm, "unitId", this.unitList[0].value)
}
})
}
},
async created() {
await this.initUnion()
await this.flushUnits()
}
})
</script>
<!--#
}
#-->
@@ -0,0 +1,534 @@
<!--#
layout("/layouts/platform_h5.html"){
#-->
<style>
.up_down > .van-cell {
flex-flow: column;
}
.up_down > .van-cell > .van-field__label {
width: 100%;
}
.van-cell, .van-picker button, .submit .van-button--normal {
font-size: 16px;
}
</style>
<div id="app" v-cloak>
<van-nav-bar title="入会申请" left-text="返回" left-arrow @click-left="historyBack" placeholder fixed></van-nav-bar>
<van-form ref="formRef" class="form-container" :show-error-message="false">
<van-cell-group title="基础信息" class="form-section">
<van-field v-model="formData.loginname" label="工号" readonly></van-field>
<van-field v-model="formData.username" label="姓名" readonly></van-field>
<van-field v-model="formData.sex" label="性别" readonly></van-field>
<van-field
v-model="formData.nation"
name="nation"
label="民族"
readonly
placeholder="请点击选择民族"
@click="showNationPicker = true"
clickable
></van-field>
<van-popup position="bottom" round v-model:show="showNationPicker">
<van-picker show-toolbar
:columns="nationColumns"
@cancel="showNationPicker = false"
@confirm="(v)=>{formData.nation = v;showNationPicker = false}"
></van-picker>
</van-popup>
<van-field
v-model="formData.birthday"
label="出生年月"
is-link
@click="showDatePicker = true"
:rules="[{ required: true, message: '请填写出生年月' }]"
></van-field>
<van-popup v-model="showDatePicker" position="bottom">
<van-datetime-picker
type="date"
:min-date="new Date(1900, 0, 1)"
:max-date="new Date()"
@confirm="onDateConfirm"
@cancel="showDatePicker=false"
></van-datetime-picker>
</van-popup>
<van-field
v-model="formData.political"
name="nation"
label="政治面貌"
readonly
placeholder="请选择政治面貌"
@click="showPoliticalPicker = true"
clickable
></van-field>
<van-popup position="bottom" round v-model:show="showPoliticalPicker">
<van-picker show-toolbar
:columns="politicalColumns"
@cancel="showPoliticalPicker = false"
@confirm="(v)=>{formData.political = v;showPoliticalPicker = false}"
></van-picker>
</van-popup>
<van-field
v-model="formData.education"
name="education"
label="学历"
readonly
placeholder="请选择学历"
@click="showEducationPicker = true"
clickable
></van-field>
<van-popup position="bottom" round v-model:show="showEducationPicker">
<van-picker show-toolbar
:columns="educationColumns"
@cancel="showEducationPicker = false"
@confirm="(v)=>{formData.education = v;showEducationPicker = false}"
></van-picker>
</van-popup>
<van-field
v-model="formData.academicDegree"
name="academicDegree"
label="学位"
readonly
placeholder="请选择学位"
@click="showAcademicDegreePicker = true"
clickable
></van-field>
<van-popup position="bottom" round v-model:show="showAcademicDegreePicker">
<van-picker show-toolbar
:columns="academicDegreeColumns"
@cancel="showAcademicDegreePicker = false"
@confirm="(v)=>{formData.academicDegree = v;showAcademicDegreePicker = false}"
></van-picker>
</van-popup>
<van-field
v-model="formData.position"
name="position"
label="党政职务"
placeholder="请输入党政职务"
clearable
maxlength="30"
></van-field>
<van-field v-model="formData.unitName" label="工作单位" readonly></van-field>
<van-field v-model="formData.unionName" label="所属工会" readonly></van-field>
<van-field
v-model="formData.campusName"
name="campusName"
label="所属校区"
readonly
placeholder="请选择所属校区"
@click="showCampusPicker = true"
clickable
></van-field>
<van-popup position="bottom" round v-model:show="showCampusPicker">
<van-picker :columns="campusColumns" @cancel="showCampusPicker = false" @confirm="onCampusColumns" show-toolbar></van-picker>
</van-popup>
<van-field
v-model="formData.userState"
name="userState"
label="在职状态"
readonly
placeholder="请填写在职状态"
clickable
></van-field>
<van-field
v-model="formData.personType"
name="personType"
label="教职工类别"
readonly
placeholder="请填写人员类型"
clickable
></van-field>
<van-field
v-model="formData.preparedBy"
name="preparedBy"
label="编制类别"
readonly
placeholder="请填写编制类别"
clickable
></van-field>
<van-field
v-model="formData.idCard"
disabled
name="idCard"
label="身份证号"
placeholder="请输入身份证件号"
clearable
maxlength="18"
></van-field>
<van-field
v-model="formData.mobile"
disabled
name="mobile"
label="联系电话"
placeholder="请输入联系电话"
clearable
type="tel"
maxlength="11"
></van-field>
<van-field
v-model="formData.email"
name="email"
label="电子邮箱"
placeholder="请输入电子邮箱"
clearable
maxlength="25"
></van-field>
</van-cell-group>
<van-cell-group title="家庭信息" class="form-section up_down">
<div class="van-cell">
<div style="display: flex;justify-content: space-between">
<div style="display: flex;">
<div style="width: 100%">
<span>家庭主要成员及联系方式</span>
</div>
</div>
<van-button v-if="formData.families && formData.families.length>0 && formData.families.length<5" style="width: 40px"
icon="plus" type="primary" round size="mini"
@click="formData.families.push({})"
native-type="button"></van-button>
</div>
<template v-if="formData.families && formData.families.length>0">
<div v-for="o,i in formData.families" class="mt5">
<div style="font-weight: 700;display: flex;justify-content: space-between">
<span>成员{{toChinesNum(i+1)}}</span>
<van-button style="width: 40px"
icon="cross" type="danger" round size="mini"
@click="formData.families.splice(i,1)"
native-type="button"></van-button>
</div>
<van-field label="关系" v-model="o.relation" placeholder="请填写与本人关系"
:rules="[{ required:true, message: '请填写与本人关系' }]"></van-field>
<van-field label="姓名" v-model="o.name" placeholder="请填写姓名"
:rules="[{ required:true, message: '请填写姓名' }]"></van-field>
<van-field label="工作单位" v-model="o.unit" placeholder="请填写工作单位"
:rules="[{ required:true, message: '请填写工作单位' }]"></van-field>
<van-field label="备注" v-model="o.remark" placeholder="请填写备注"
:rules="[{ required:true, message: '请填写备注' }]"></van-field>
</div>
</template>
<template v-else>
<div style="padding: 50px;text-align: center">
<van-button style="width: 50px"
icon="plus" type="primary" round size="mini"
@click="formData.families.push({})"
native-type="button"></van-button>
</div>
</template>
</div>
</van-cell-group>
<van-cell-group title="个人简况" class="form-section">
<text-editor v-model="formData.personalData"></text-editor>
</van-cell-group>
<van-cell-group title="入会意愿" class="form-section">
<van-checkbox style="font-size: 17px;padding: 12px" icon-size="24px"
v-model="formData.isVoluntary" shape="square">
<div style="text-indent: 2.1rem">
<span :style="'color:' + (formData.isVoluntary ? '#1989fa' : '#F56C6C') ">
我自愿申请加入学校工会,并委托学校按规定代为扣缴工会会员会费。
</span>
</div>
<div style="text-indent: 2.1rem">
<span :style="'color:' + (formData.isVoluntary ? '#1989fa' : '#F56C6C') ">
我将严格遵守工会章程,认真执行工会决议,积极参与工会活动,主动融入“学校健康幸福家”建设,为营造温暖、和谐、奋进的校园氛围贡献力量,以实际行动助力学校各项事业发展。
</span>
</div>
</van-checkbox>
</van-cell-group>
<div style="display: flex; justify-content: space-between; column-gap: 10px; padding: 10px">
<van-button block type="primary" @click.submit="onSave">保存</van-button>
<van-button v-if="!taskId" block type="primary" @click.submit="onSubmit">提交</van-button>
<van-button v-else block type="primary" @click.submit="onFinishTask">提交</van-button>
</div>
</van-form>
</div>
<script nonce="${cspNonce!}">
new Vue({
el: '#app',
store,
dicts:['USER_NATION', 'USER_POLITICAL', 'USER_EDUCATION','USER_ACADEMIC_DEGREE', 'USER_CAMPUS'],
data() {
return {
id: GetQueryString("bizId"),
taskId: GetQueryString("taskId"),
formData: {
families: [],
},
// 民族
showNationPicker: false,
// 政治面貌
showPoliticalPicker: false,
// 学历
showEducationPicker: false,
// 学位
showAcademicDegreePicker: false,
// 校区
showCampusPicker: false,
campusColumns: [],
// 生日
showDatePicker: false,
}
},
methods: {
historyBack,
onSave() {
this.$dialog.confirm({
title: "提示",
message: "您确定要保存吗?",
confirmButtonText: "确定",
cancelButtonText: "取消"
}).then(() => {
const loading = this.$toast.loading({
message: "加载中...",
forbidClick: true,
overlay: true,
duration: 0
})
this.$axios.post('/platform/member/apply/submit/save', {data: JSON.stringify(this.formData)}).then(res => {
if (res.code === 0) {
this.$toast.success(res.msg)
this.$pjaxReplace('/platform/member/apply/mine/h5')
} else {
this.$toast.fail('操作失败')
console.log(res.msg)
}
}).finally(() => {
loading.close()
})
})
},
onSubmit() {
this.$refs.formRef.validate().then(() => {
this.$dialog.confirm({
title: "提示",
message: "您确定要提交吗?"
}).then(() => {
const loading = this.$toast.loading({
message: "加载中...",
forbidClick: true,
overlay: true,
duration: 0
})
this.$axios.post('/platform/member/apply/submit/submit', {
data: JSON.stringify(this.formData)
}).then(res => {
if (res.code === 0) {
this.$toast.success(res.msg)
this.$pjaxReplace('/platform/member/apply/mine/h5')
} else {
this.$toast.fail('操作失败')
console.log(res.msg)
}
}).finally(() => {
loading.close()
})
})
})
},
onFinishTask() {
this.$refs.formRef.validate().then(() => {
this.$dialog.confirm({
title: "提示",
message: "您确定要提交吗?"
}).then(() => {
const loading = this.$toast.loading({
message: "加载中...",
forbidClick: true,
overlay: true,
duration: 0
})
this.$axios.post('/platform/member/apply/submit/submitAgain', {
data: JSON.stringify(this.formData),
taskId: this.taskId,
}).then(res => {
if (res.code === 0) {
this.$toast.success(res.msg)
this.$pjaxReplace('/platform/member/apply/mine/h5')
} else {
this.$toast.fail('操作失败')
console.log(res.msg)
}
}).finally(() => {
loading.close()
})
})
})
},
onDateConfirm(value) {
this.formData.birthday = value;
this.showDatePicker = false;
},
async init() {
let user
const resp = await $.post('/platform/member/apply/submit/getSelfUserInfo')
if (resp.code === 0) {
if (!resp.data) {
user = this.$store.state.user
} else {
user = resp.data
}
} else {
user = this.$store.state.user
}
if (this.id) {
const res = await this.$axios.post("/platform/member/apply/submit/findApplyById", { id: this.id })
debugger
if (res.code === 0) {
this.formData = res.data
}
} else {
const {
id,
username,
loginname,
sex,
nation,
birthday,
political,
education,
academicDegree,
position,
unitId,
unitName,
unit,
unionId,
unionName,
union,
campus,
userState,
personType,
idCard,
mobile,
email,
families,
personalData
} = user
this.$set(this.formData, "userId", id)
this.$set(this.formData, "username", username)
this.$set(this.formData, "loginname", loginname)
this.$set(this.formData, "birthday", birthday)
this.$set(this.formData, "sex", sex)
this.$set(this.formData, "idCard", idCard)
this.$set(this.formData, "nation", nation)
this.$set(this.formData, "political", political)
this.$set(this.formData, "position", position)
this.$set(this.formData, "education", education)
this.$set(this.formData, "academicDegree", academicDegree)
this.$set(this.formData, "campus", campus)
this.$set(this.formData, "userState", userState)
this.$set(this.formData, "personType", personType)
this.$set(this.formData, "unitName", unit ? unit.name : unitName)
this.$set(this.formData, "unitId", unit ? unit.id : unitId)
this.$set(this.formData, "unionName", union ? union.name : unionName)
this.$set(this.formData, "unionId", union ? union.id : unionId)
this.$set(this.formData, "mobile", mobile)
this.$set(this.formData, "email", email)
this.$set(this.formData, "families", families ? families : [])
this.$set(this.formData, "personalData", personalData)
// 处理校区信息
if (campus) {
this.$set(this.formData, "campus", campus) // 保存校区代码值
// 根据校区代码值查找对应的名称
if (this.campusColumns && this.campusColumns.length > 0) {
const campusItem = this.campusColumns.find(item => item.value === campus)
if (campusItem) {
this.$set(this.formData, "campusName", campusItem.text)
}
}
} else {
this.$set(this.formData, "campus", "")
this.$set(this.formData, "campusName", "")
}
}
},
toChinesNum(num){
let changeNum = ['零', '一', '二', '三', '四', '五', '六', '七', '八', '九'];
let unit = ["", "十", "百", "千", "万"];
num = parseInt(num);
let getWan = (temp) => {
let strArr = temp.toString().split("").reverse();
let newNum = "";
for (let i = 0; i < strArr.length; i++) {
newNum = (i == 0 && strArr[i] == 0 ? "" : (i > 0 && strArr[i] == 0 && strArr[i - 1] == 0 ? "" : changeNum[strArr[i]] + (strArr[i] == 0 ? unit[0] : unit[i]))) + newNum;
}
return newNum;
}
let overWan = Math.floor(num / 10000);
let noWan = num % 10000;
if (noWan.toString().length < 4) {
noWan = "0" + noWan;
}
return overWan ? getWan(overWan) + "万" + getWan(noWan) : getWan(num);
},
onCampusColumns(o) {
this.$set(this.formData, "campusName", o.text); // 显示名称
this.$set(this.formData, "campus", o.value); // 字典值
this.showCampusPicker = false;
},
async initDictOptions() {
// 初始化校区字典数据
const campusData = await this.$businessTool.getDictOptions('USER_CAMPUS')
this.campusColumns = campusData.map(item => {
return {value: item.code, text: item.name}
})
// 初始化完成后,如果已经有用户数据,更新校区显示名称
if (this.formData.campus && this.campusColumns.length > 0) {
const campusItem = this.campusColumns.find(item => item.value === this.formData.campus)
if (campusItem) {
this.$set(this.formData, "campusName", campusItem.text)
}
}
}
},
computed: {
nationColumns(){
if(this.dict && this.dict.type && this.dict.type.USER_NATION){
return this.dict.type.USER_NATION.map(v=>v.name)
}
return []
},
politicalColumns(){
if(this.dict && this.dict.type && this.dict.type.USER_POLITICAL){
return this.dict.type.USER_POLITICAL.map(v=>v.name)
}
return []
},
educationColumns(){
if(this.dict && this.dict.type && this.dict.type.USER_EDUCATION){
return this.dict.type.USER_EDUCATION.map(v=>v.name)
}
return []
},
academicDegreeColumns(){
if(this.dict && this.dict.type && this.dict.type.USER_ACADEMIC_DEGREE){
return this.dict.type.USER_ACADEMIC_DEGREE.map(v=>v.name)
}
return []
},
},
created() {
this.initDictOptions();
this.init()
},
})
</script>
<!--#
}
#-->
@@ -0,0 +1,224 @@
<!--#
layout("/layouts/platform_h5.html"){
#-->
<div id="app" v-cloak>
<van-nav-bar title="入会校工会审核" left-text="返回" left-arrow @click-left="historyBack" placeholder fixed></van-nav-bar>
<van-sticky>
<van-search
v-model="pageForm.searchKeyword"
placeholder="请输入工号或者姓名进行查询"
show-action
:reverse-color="false"
input-align="left"
@search="doSearch">
<template #action>
<div @click="doSearch">搜索</div>
</template>
</van-search>
<van-dropdown-menu :close-on-click-outside="false" :close-on-click-overlay="false">
<van-dropdown-item :options="unitList" @change="doSearch" v-model="pageForm.unitId"></van-dropdown-item>
<van-dropdown-item :options="auditList" @change="doSearch" v-model="pageForm.audit"></van-dropdown-item>
</van-dropdown-menu>
</van-sticky>
<table-list api="/platform/member/apply/unionGroupApproval/pageData" :page_form.sync="pageForm" ref="tableListRef" title="userName" @ready="doSearch">
<template v-slot="{index,row}">
<table-column label="工号">{{row.loginName}}</table-column>
<table-column label="所属工会">{{row.unionName}}</table-column>
<table-column label="工作单位">{{row.unitName}}</table-column>
<table-column label="填报时间">{{row.applyDateTime}}</table-column>
<table-column label="当前节点">{{row.curTaskName}}</table-column>
</template>
<template #actions="{index,row}">
<div class="action-btn" @click="onView(row)">
<i class="fa fa-eye"></i>
<span>查看</span>
</div>
<div class="action-btn" v-if="row.taskState === 10" @click="onApproval(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>
<info ref="infoRef">
<div v-if="showApprovalForm">
<div class="process-title">{{formData.taskName}}</div>
<van-form ref="formRef">
<van-field
v-model="formData.tf_opinion"
name="tf_opinion"
label="审批意见"
placeholder="请输入审批意见"
:rules="[{ required: true, message: '请填写审批意见' }]"
required
maxlength="100"
show-word-limit
></van-field>
</van-form>
<div style="display: flex; justify-content: space-between; column-gap: 10px; padding: 10px">
<van-button type="danger" block @click="handleTaskAction(6)">退回</van-button>
<van-button type="danger" block @click="handleTaskAction(2)">拒绝</van-button>
<van-button type="primary" block @click="handleTaskAction(1)">同意</van-button>
</div>
</div>
</info>
</div>
<script nonce="${cspNonce!}">
<!--#include("../common/info.js"){}#-->
new Vue({
el: "#app",
store,
data() {
return {
pageForm: {
pageNumber: 1,
pageSize: 10,
totalCount: 0,
unionId: "",
unitId: "",
audit: false
},
unitList: [],
auditList: [
{ text: "已审核", value: true },
{ text: "未审核", value: false }
],
// 审核相关
formData: {},
showApprovalForm: false
}
},
components: {
"info": INFO
},
methods: {
historyBack,
onReady() {
this.doSearch()
},
doSearch() {
this.$nextTick(() => {
this.pageForm.pageNumber = 1
this.pageForm.totalCount = 0
this.$refs.tableListRef.doSearch()
})
},
// 查看详情
onView(row) {
this.showApprovalForm = false
this.$refs.infoRef.onOpen(row)
},
onApproval(row) {
this.showApprovalForm = true
this.$refs.infoRef.onOpen(row)
this.formData = {
processTaskId: row.taskId,
taskName: row.curTaskName
}
},
async handleTaskAction(val) {
await this.$refs.formRef.validate();
this.$dialog.confirm({
title: "提示",
message: "您确定要提交吗?"
}).then(() => {
const loading = this.$toast.loading({
message: "加载中...",
forbidClick: true,
overlay: true,
duration: 0
})
this.$axios.post("/flow/common/executeTask", {
data: JSON.stringify({
...this.formData,
submitType: val
})
}).then((res) => {
if (res.code === 0) {
this.$refs.infoRef.onClose()
this.$toast.success(res.msg)
this.doSearch()
}
}).finally(() => {
loading.close()
})
})
},
// 撤回
onRevoke(row) {
this.$dialog.confirm({
title: '提示',
message: '您确定要撤回吗?',
}).then(() => {
const loading = this.$toast.loading({
message: "加载中...",
forbidClick: true,
overlay: true,
duration: 0
})
this.$axios.post('/flow/common/revokeTask', {taskId: row.startTaskId}).then(res => {
if (res.code === 0) {
this.$toast.success('撤回成功');
this.doSearch();
}
}).finally(() => {
loading.close()
})
}).catch(() => {
});
},
initUnion() {
const hasAdmin = this.$auth.hasRoleOr(["SYSADMIN", "SCHOOL_UNION_ADMIN"])
const unionId = hasAdmin ? null : this.$store.state.user.union.id
this.$businessTool.listUnion(unionId).then((data) => {
this.unionList = data
this.unionList.forEach((v) => {
v.text = v.name
v.value = v.id
})
if (hasAdmin) {
this.unionList.unshift({ text: "全部工会", value: null })
}
if (this.unionList && this.unionList.length > 0) {
this.$set(this.pageForm, "unionId", this.unionList[0].value)
}
})
},
flushUnits() {
const hasAdmin = this.$auth.hasRoleOr(["SYSADMIN", "SCHOOL_UNION_ADMIN"])
const unionId = hasAdmin ? this.pageForm.unionId : this.$store.state.user.union.id
this.$businessTool.listUnit(unionId).then((data) => {
this.unitList = data
this.unitList.forEach((v) => {
v.text = v.name
v.value = v.id
})
if (this.unitList && this.unitList.length > 0) {
this.unitList.unshift({ text: "全部单位", value: null })
this.$set(this.pageForm, "unitId", this.unitList[0].value)
}
})
}
},
async created() {
await this.initUnion()
await this.flushUnits()
}
})
</script>
<!--#
}
#-->
@@ -0,0 +1,91 @@
const MOBILE_MEMBER_CHANGE_INFO = {
template: `
<div>
<van-collapse v-model="activeName" accordion>
<van-collapse-item name="basic">
<template #title>
<span style="color: #409eff">会员基础信息</span>
</template>
<van-cell-group>
<van-cell title="姓名">{{ viewData.username }}</van-cell>
<van-cell title="性别">{{ viewData.sex }}</van-cell>
<van-cell title="联系方式">{{ viewData.mobile }}</van-cell>
<van-cell title="所属工会">{{ viewData.unionName }}</van-cell>
<van-cell title="所属单位">{{ viewData.unitName }}</van-cell>
<van-cell title="在职状态">{{ viewData.userState }}</van-cell>
<van-cell title="编制类别">{{ viewData.preparedBy }}</van-cell>
<van-cell title="教职工类别">{{ viewData.personType }}</van-cell>
<van-cell title="出生日期">{{ $moment(viewData.birthday).format('YYYY-MM-DD') }}</van-cell>
<van-cell title="学历">{{ viewData.education }}</van-cell>
<van-cell title="政治面貌">{{ viewData.political }}</van-cell>
<van-cell title="是否会员">{{ viewData.member ? '是' : '否' }}</van-cell>
<van-cell title="是否福利会员">{{ viewData.welfareMember ? '是' : '否' }}</van-cell>
<van-cell title="是否劳模">{{ viewData.isModelWorker ? '是' : '否' }}</van-cell>
<van-cell title="个人简历">
<div slot="label" class="van-cell-rich-text" v-html="viewData.personalData"></div>
</van-cell>
</van-cell-group>
</van-collapse-item>
<van-collapse-item v-if="changeList && changeList.length > 0" title="会员变更信息" name="change">
<template #title>
<span style="color: #409eff">会员变更信息</span>
</template>
<table width="100%" style="line-height: 1.5rem;font-size: 13px; table-layout: fixed;border-collapse: collapse;">
<thead>
<tr>
<th style="background-color: #f2f2f2;border: 1px solid #ddd;">序号</th>
<th style="background-color: #f2f2f2;border: 1px solid #ddd;">变更字段</th>
<th style="width: 35%;background-color: #f2f2f2;border: 1px solid #ddd;">原数据</th>
<th style="width: 35%;background-color: #f2f2f2;border: 1px solid #ddd;">新数据</th>
</tr>
</thead>
<tbody>
<tr style="text-align: center;border-bottom: 1px solid #ddd;" v-for="(item,index) in changeList" :key="index">
<td style="border: 1px solid #ddd;">{{ index + 1 }}</td>
<td style="border: 1px solid #ddd;">{{ item.name }}</td>
<td style="border: 1px solid #ddd;">{{ removeHTMLTag(item.value) }}</td>
<td style="border: 1px solid #ddd;">{{ removeHTMLTag(item.newValue) }}</td>
</tr>
</tbody>
</table>
</van-collapse-item>
</van-collapse>
</div>
`,
data() {
return {
changeList: [],
viewData: {},
activeName: "basic"
}
},
methods: {
removeHTMLTag,
findAuditChangeInfo(recordId) {
if (!recordId) {
return
}
this.$axios.post("/platform/member/apply/branchUnionAudit/findAuditChangeInfo", { recordId: recordId }).then((res) => {
if (res.code === 0) {
this.changeList = res.data
}
})
},
findUserInfo(userId) {
if (!userId) {
return
}
this.$axios.post("/platform/member/apply/common/findOne", { id: userId }).then((res) => {
if (res.code === 0) {
this.viewData = res.data
}
})
},
onOpen(data) {
this.findAuditChangeInfo(data.recordId)
this.$nextTick(() => {
this.findUserInfo(data.userId)
})
}
}
}
@@ -0,0 +1,91 @@
const MOBILE_MEMBER_INFO = {
template: /*language=HTML*/ `
<div class="detail-container">
<van-cell-group title="基本信息">
<van-cell title="工号">{{ viewData.loginname }}</van-cell>
<van-cell title="姓名">{{ viewData.username }}</van-cell>
<van-cell title="性别">{{ viewData.sex }}</van-cell>
<van-cell title="民族">{{ viewData.nation }}</van-cell>
<van-cell title="出生日期">{{ $moment(viewData.birthday).format("YYYY年MM月DD日") }}</van-cell>
<van-cell title="政治面貌">{{ viewData.political }}</van-cell>
<van-cell title="学历">{{ viewData.education }}</van-cell>
<van-cell title="学位">{{ viewData.academicDegree }}</van-cell>
<van-cell title="党政职务">{{ viewData.position }}</van-cell>
<van-cell title="工作单位">{{ viewData.unitName }}</van-cell>
<van-cell title="所属工会">{{ viewData.unionName }}</van-cell>
<van-cell title="所属校区">{{ viewData.campus }}</van-cell>
<van-cell title="身份证号码">{{ viewData.idCard }}</van-cell>
<van-cell title="联系电话">{{ viewData.mobile }}</van-cell>
<van-cell title="电子邮箱">{{ viewData.email }}</van-cell>
<van-cell title="在职状态">{{ viewData.userState }}</van-cell>
<van-cell title="教职工类别">{{ viewData.personType }}</van-cell>
<van-cell title="人员性质">{{ viewData.preparedBy || '暂无' }}</van-cell>
<template v-if="viewData.loginname === $store.state.user.loginnmae">
<van-cell title="家庭成员" class="column-cell">
<table class="family-table">
<thead>
<tr>
<th class="table-header">序号</th>
<th class="table-header">与本人关系</th>
<th class="table-header">姓名</th>
<th class="table-header">单位</th>
<th class="table-header">备注</th>
</tr>
</thead>
<tbody>
<tr class="table-row" v-for="(item, index) in viewData.families" :key="index">
<td class="table-cell">{{ index + 1 }}</td>
<td class="table-cell">{{ item.relation }}</td>
<td class="table-cell">{{ item.name }}</td>
<td class="table-cell">{{ item.unit }}</td>
<td class="table-cell">{{ item.remark }}</td>
</tr>
</tbody>
</table>
</van-cell>
<van-cell title="个人简历">
<template #label>
<div v-if="viewData.vita" class="text-left" v-html="viewData.vita"></div>
<span style="font-size: 14px" v-else>无数据</span>
</template>
</van-cell>
</template>
</van-cell-group>
</div>
`,
props: {
userId: { type: String, required: true }
},
data() {
return {
viewData: {}
}
},
watch: {
userId: {
handler: function () {
this.findUserInfoByUserId()
},
immediate: true
}
},
methods: {
findUserInfoByUserId() {
if (!this.userId) {
return
}
this.$axios.post("/platform/member/apply/common/findOne", { id: this.userId }).then((res) => {
if (res.code === 0) {
this.viewData = res.data
}
})
}
}
}
@@ -0,0 +1,539 @@
<!--#
layout("/layouts/platform_h5.html"){
#-->
<style>
.top-col {
background-color: white;
position: relative;
box-sizing: border-box;
padding: 20px;
width: calc((100% - 5px) / 2);
}
.top-col:not(:last-child),
.center-col:not(:last-child) {
margin-right: 5px;
}
.col-title {
color: rgba(0, 0, 0, 0.45);
font-size: 14px;
margin-bottom: 10px;
}
.top-col-member-number {
font-size: 30px;
color: rgba(0, 0, 0, 0.85);
}
.top-col-chart {
height: 80px;
width: 100%;
position: relative;
}
.center-col {
background-color: white;
position: relative;
box-sizing: border-box;
padding: 20px;
/*width: calc((100% - (20px * 1)) / 2);*/
}
.idx {
display: flex;
justify-content: center;
align-items: center;
color: rgba(0, 0, 0, 0.85);
width: 20px;
height: 20px;
border-radius: 50%;
background-color: #f0f0f0;
font-size: 12px;
}
.idx-rank {
color: white !important;
background-color: #314659 !important;
}
.el-table__body-wrapper::-webkit-scrollbar {
display: none; /* Chrome Safari */
}
.el-table__body-wrapper {
scrollbar-width: none; /* firefox */
-ms-overflow-style: none; /* IE 10+ */
overflow-x: hidden;
overflow-y: auto;
}
.data-box{
text-align: center;
font-size:13px;
margin:12px 0;
}
.th-row,.td-row{
display:flex;
height:30px;
line-height:30px;
padding:0 12px;
}
.th-row{background:#f8f8f8;}
/* 关键:比例 + 最小宽度0 */
.col-index{flex:0 0 60px;} /* 序号固定60 */
.col-name{flex:1 1 120px;min-width:0;} /* 名称占剩余,最小120 */
.col-num{flex:0 0 80px;text-align:right;} /* 人数固定80 */
.common-ellipsis{
overflow:hidden;
white-space:nowrap;
text-overflow:ellipsis;
}
</style>
<div id="app" v-cloak>
<van-nav-bar title="会员统计" left-text="返回" left-arrow @click-left="historyBack" placeholder fixed></van-nav-bar>
<van-row style="background-color: #f0f2f5" class="margin-top5" type="flex">
<van-col span="12" class="top-col">
<div class="col-title">会员数</div>
<div class="top-col-member-number">
{{memberNumberData.memberNum}}
<span style="font-size: 14px">&ensp;</span>
</div>
<div style="color: rgba(0, 0, 0, 0.85); margin-top: 20px; font-size: 14px; display: flex; align-items: center; justify-content: flex-end">
年同比 {{memberNumberData.ratio}}&ensp;
<svg
aria-hidden="true"
data-icon="caret-up"
fill="currentColor"
focusable="false"
height="1em"
style="color: #67c23a"
v-if="memberNumberData.diff>=0"
viewBox="0 0 1024 1024"
width="1em"
>
<path
d="M858.9 689L530.5 308.2c-9.4-10.9-27.5-10.9-37 0L165.1 689c-12.2 14.2-1.2 35 18.5 35h656.8c19.7 0 30.7-20.8 18.5-35z"
></path>
</svg>
<svg
aria-hidden="true"
data-icon="caret-up"
fill="currentColor"
focusable="false"
height="1em"
style="color: #f56c6c"
v-else
viewBox="0 0 1024 1024"
width="1em"
>
<path
d="M840.4 300H183.6c-19.7 0-30.7 20.8-18.5 35l328.4 380.8c9.4 10.9 27.5 10.9 37 0L858.9 335c12.2-14.2 1.2-35-18.5-35z"
></path>
</svg>
</div>
</van-col>
<van-col span="12" class="top-col">
<div class="col-title">增长趋势</div>
<div class="top-col-chart" id="growthTrendChart"></div>
</van-col>
</van-row>
<van-row style="background-color: #f0f2f5; margin-top: 5px" type="flex">
<van-col span="12" class="top-col">
<div class="col-title">会员占比</div>
<div class="top-col-chart" id="memberPercentageChart"></div>
</van-col>
<van-col span="12" class="top-col">
<div class="col-title">性别占比</div>
<div class="top-col-chart" id="memberSexPercentageChart"></div>
</van-col>
</van-row>
<van-row style="background-color: #f0f2f5; margin-top: 5px" type="flex">
<van-col span="24" class="center-col">
<div class="col-title">在职状态</div>
<div id="userStateMemberChart" style="width: 100%; height: 240px; box-sizing: border-box"></div>
<div class="col-title">人员类型</div>
<div id="personTypeMemberChart" style="width: 100%; height: 240px; box-sizing: border-box"></div>
</van-col>
</van-row>
<van-row style="background-color: #f0f2f5; margin-top: 5px" type="flex">
<van-col span="24" class="center-col">
<div class="col-title">工会会员数</div>
<div id="unionMemberChart" style="width: 100%; height: 200px"></div>
<div class="data-box">
<!-- 表头 -->
<van-row class="th-row">
<van-col class="col-index">序号</van-col>
<van-col class="col-name">工会名称</van-col>
<van-col class="col-num">会员人数</van-col>
</van-row>
<!-- 数据行 -->
<van-row
class="td-row"
v-for="(item,index) in unionMember"
:key="index"
:style="{background:index%2?'#fafafa':'#fff'}"
>
<van-col class="col-index">{{ index+1 }}</van-col>
<van-col class="col-name common-ellipsis" :title="item.unionname">
{{ item.unionname }}
</van-col>
<van-col class="col-num">{{ item.value }}</van-col>
</van-row>
</div>
</van-col>
</van-row>
</div>
<script>
const chart = {
growthTrendChart: undefined,
memberPercentageChart: undefined,
memberSexPercentageChart: undefined,
unionMemberChart: undefined,
personTypeMemberChart: undefined,
userStateMemberChart: undefined
}
new Vue({
el: "#app",
data: {
loading: {
memberNumber: false,
growthTrend: false,
memberPercentage: false,
memberSexPercentage: false,
unionMember: false,
personTypeMember: false,
userStateMember: false
},
memberNumberData: {
memberNum: "--",
lastYearMemberNum: "--",
ratio: "0.0%",
diff: 0
},
memberPercentage: "--",
unionMember: []
},
methods: {
historyBack,
/**
* 会员数
* @returns {Promise<void>}
*/
getMemberNumber() {
this.loading.memberNumber = true
this.$axios.post("/platform/member/info/board/memberNumber").then((resp) => {
if (resp.code === 0) {
const {
data: { memberNum, lastYearMemberNum }
} = resp
const diff = memberNum - lastYearMemberNum
const ratio = (lastYearMemberNum ? (Math.abs(diff) / lastYearMemberNum) * 100 : (diff / 1) * 10).toFixed(2) + " %"
this.memberNumberData = { memberNum, lastYearMemberNum, diff, ratio }
this.loading.memberNumber = false
} else {
this.$toast.fail(resp.msg)
}
})
},
/**
* 增长趋势
* @returns {Promise<void>}
*/
async getGrowthTrend() {
this.loading.growthTrend = true
this.$axios.post("/platform/member/info/board/growthTrend").then((resp) => {
this.loading.growthTrend = false
if (resp.code === 0) {
const { data } = resp
const labels = data.map((v) => v.label)
const values = data.map((v) => v.value)
if (chart.growthTrendChart) {
chart.growthTrendChart.changeData(values)
return
}
chart.growthTrendChart = new G2Plot.TinyArea("growthTrendChart", {
autoFit: true,
data: values,
smooth: true,
showContent: true,
areaStyle: {
fill: "#d6e3fd"
},
tooltip: {
customContent: function (i, data) {
if (labels[i]) {
return labels[i] + "-" + data[0]?.data?.y + "人"
}
return ""
}
}
})
chart.growthTrendChart.render()
} else {
this.$toast.fail(resp.msg)
}
})
},
/**
* 会员占比
* @returns {Promise<void>}
*/
async getMemberPercentage() {
this.loading.memberPercentage = true
this.$axios.post("/platform/member/info/board/memberPercentage").then((resp) => {
this.loading.memberPercentage = false
if (resp.code === 0) {
const { data } = resp
this.memberPercentage = data.toFixed(2)
if (chart.memberPercentageChart) {
chart.memberPercentageChart.changeData(data)
return
}
chart.memberPercentageChart = new G2Plot.Liquid("memberPercentageChart", {
outline: {
border: 4,
distance: 8
},
wave: {
length: 128
},
autoFit: true,
percent: data,
statistic: {
content: {
style: {
fontSize: 16
}
}
}
})
chart.memberPercentageChart.render()
} else {
this.$toast.fail(resp.msg)
}
})
},
/**
* 男女占比
* @returns {Promise<void>}
*/
async getMemberSexPercentage() {
this.loading.memberSexPercentage = true
this.$axios.post("/platform/member/info/board/memberSexPercentage").then((resp) => {
this.loading.memberSexPercentage = false
if (resp.code === 0) {
const { data } = resp
if (chart.memberSexPercentageChart) {
chart.memberSexPercentageChart.changeData(data)
return
}
chart.memberSexPercentageChart = new G2Plot.Pie("memberSexPercentageChart", {
data,
angleField: "value",
colorField: "type",
legend: false,
label: {
formatter: () => ""
},
interactions: [{ type: "element-active" }],
color: ["#409EFF", "#F56C6C"]
})
chart.memberSexPercentageChart.render()
} else {
this.$toast.fail(resp.msg)
}
})
},
/**
* 各工会会员数
* @returns {Promise<void>}
*/
async getUnionMember() {
this.loading.unionMember = true
this.$axios.post("/platform/member/info/board/unionMember").then((resp) => {
this.loading.unionMember = false
if (resp.code === 0) {
const { chartData, tableData } = resp.data
this.unionMember = tableData
const labels = chartData.map((v) => v.unionname)
const values = chartData.map((v) => v.value)
if (chart.unionMemberChart) {
chart.unionMemberChart.changeData(values)
return
}
chart.unionMemberChart = new G2Plot.Column("unionMemberChart", {
data: chartData,
autoFit: true,
xField: "unionname",
yField: "value",
label: {
// 可手动配置 label 数据标签位置
position: "middle", // 'top', 'bottom', 'middle',
// 配置样式
style: {
fill: "#FFFFFF",
opacity: 0.6
}
},
xAxis: {
label: {
autoHide: true,
autoRotate: false
}
},
meta: {
label: {
alias: "类型"
},
value: {
alias: "会员数"
}
}
})
chart.unionMemberChart.render()
} else {
this.$message.warning(resp.msg)
}
})
},
/**
* 根据人员类型查找会员数
* @returns {Promise<void>}
*/
async getPersonTypeMember() {
this.loading.personTypeMember = true
this.$axios.post("/platform/member/info/board/personTypeMember").then((resp) => {
this.loading.personTypeMember = false
if (resp.code === 0) {
const { data } = resp
if (chart.personTypeMemberChart) {
chart.personTypeMemberChart.changeData(data)
return
}
chart.personTypeMemberChart = new G2Plot.Column("personTypeMemberChart", {
data,
autoFit: true,
xField: "label",
yField: "value",
label: {
// 可手动配置 label 数据标签位置
position: "middle", // 'top', 'bottom', 'middle',
// 配置样式
style: {
fill: "#FFFFFF",
opacity: 0.6
}
},
xAxis: {
label: {
autoHide: true,
autoRotate: false
}
},
meta: {
label: {
alias: "类型"
},
value: {
alias: "会员数"
}
}
})
chart.personTypeMemberChart.render()
} else {
this.$toast.fail(resp.msg)
}
})
},
/**
* 根据在职状态查找会员数
* @returns {Promise<void>}
*/
async getUserStateMember() {
this.loading.userStateMember = true
this.$axios.post("/platform/member/info/board/userStateMember").then((resp) => {
this.loading.userStateMember = false
if (resp.code === 0) {
const { data } = resp
if (chart.userStateMemberChart) {
chart.userStateMemberChart.changeData(data)
return
}
chart.userStateMemberChart = new G2Plot.Radar("userStateMemberChart", {
data,
xField: "label",
yField: "value",
appendPadding: [0, 10, 0, 10],
meta: {
value: {
alias: "会员数量",
min: 0,
nice: true,
formatter: (v) => parseInt(v)
}
},
xAxis: {
tickLine: null
},
yAxis: {
label: false,
grid: {
alternateColor: "rgba(0, 0, 0, 0.04)"
}
},
// 开启辅助点
point: {
size: 2
},
area: {}
})
chart.userStateMemberChart.render()
} else {
this.$toast.fail(resp.msg)
}
})
},
initData() {
this.getMemberNumber()
this.getGrowthTrend()
this.getMemberPercentage()
this.getMemberSexPercentage()
this.getUnionMember()
this.getPersonTypeMember()
this.getUserStateMember()
}
},
created() {
this.initData()
}
})
</script>
<!--#
}
#-->
@@ -0,0 +1,138 @@
<!--#
layout("/layouts/platform_h5.html"){
#-->
<style></style>
<div id="app" v-cloak>
<van-nav-bar title="会员查询" left-text="返回" left-arrow @click-left="historyBack" placeholder fixed></van-nav-bar>
<van-sticky offset-top="46px">
<van-search
v-model="pageForm.searchKeyword"
placeholder="请输入工号或者姓名进行查询"
show-action
:reverse-color="false"
input-align="left"
@search="doSearch">
<template #action>
<div @click="doSearch">搜索</div>
</template>
</van-search>
<van-dropdown-menu :close-on-click-outside="false" :close-on-click-overlay="false">
<van-dropdown-item :options="unionList" @change="unionChange"
v-model="pageForm.unionId"></van-dropdown-item>
<van-dropdown-item :options="unitList" @change="doSearch" v-model="pageForm.unitId"></van-dropdown-item>
</van-dropdown-menu>
</van-sticky>
<table-list api="/platform/member/info/group/pageData" :page_form.sync="pageForm" ref="tableListRef" @ready="onReady">
<template v-slot="{index,row}">
<table-column label="姓名">{{row.username}}</table-column>
<table-column label="工号">{{row.loginname}}</table-column>
<table-column label="性别">{{row.sex}}</table-column>
<table-column label="所属工会">{{row.unionName}}</table-column>
<table-column label="所属单位">{{row.unitName}}</table-column>
</template>
<template #actions="{index,row}">
<div class="action-btn" @click="viewInfo(row)">
<i class="fa fa-eye"></i>
<span>查看</span>
</div>
</template>
</table-list>
<div :style="{color:'#1890ff'}" style="text-align: right; position: fixed; bottom: 20px; right: 20px">
<van-button :color="'#1890ff'" hairline size="small" type="primary">总人数:{{pageForm.totalCount}}人
</van-button>
</div>
<van-action-sheet v-model="infoShow" title="会员详细信息">
<member-info ref="memberInfoRef" :user-id="userId"></member-info>
</van-action-sheet>
</div>
<script nonce="${cspNonce!}">
<!--#include("../../common/mobileMemberInfo.js"){}#-->
new Vue({
el: "#app",
store,
data() {
return {
pageForm: {
pageNumber: 1,
pageSize: 10,
totalCount: 0,
unionId: "",
unitId: ""
},
unionList: [],
unitList: [],
userId: "",
infoShow: false
}
},
components: {
"member-info": MOBILE_MEMBER_INFO
},
methods: {
historyBack,
onReady() {
this.doSearch()
},
viewInfo(row) {
this.userId = row.id
this.infoShow = true
},
unionChange() {
this.$set(this.pageForm, "unitId", null)
this.flushUnits()
this.doSearch()
},
doSearch() {
this.$nextTick(() => {
this.pageForm.pageNumber = 1
this.pageForm.totalCount = 0
this.$refs.tableListRef.doSearch()
})
},
async initUnion() {
const hasAdmin = this.$auth.hasRoleOr(["SYSADMIN", "SCHOOL_UNION_ADMIN"])
const unionId = hasAdmin ? null : this.$store.state.user.union.id
this.unionList = await this.$businessTool.listUnion(unionId)
this.unionList.forEach((v) => {
v.text = v.name
v.value = v.id
})
if (hasAdmin) {
this.unionList.unshift({ text: "全部工会", value: null })
}
if (this.unionList && this.unionList.length > 0) {
this.$set(this.pageForm, "unionId", this.unionList[0].value)
}
},
async flushUnits() {
const hasAdmin = this.$auth.hasRoleOr(["SYSADMIN", "SCHOOL_UNION_ADMIN"])
const unionId = hasAdmin ? this.pageForm.unionId : this.$store.state.user.union.id
this.unitList = await this.$businessTool.listUnit(unionId)
this.unitList.forEach((v) => {
v.text = v.name
v.value = v.id
})
if (hasAdmin && !this.pageForm.unionId) {
this.unitList.unshift({ text: "全部单位", value: null })
}
if (this.unitList && this.unitList.length > 0) {
this.$set(this.pageForm, "unitId", this.unitList[0].value)
}
},
},
created() {
this.initUnion()
this.flushUnits()
}
})
</script>
<!--#
}
#-->
@@ -0,0 +1,416 @@
<!--#
layout("/layouts/platform_h5.html"){
#-->
<style>
.parent-card {
margin: 14px;
padding: 12px 12px;
background-color: #fff;
border-radius: 10px;
box-shadow: 0 8px 12px #ebedf0;
line-height: 22px;
font-size: 13px;
position: relative;
}
.content-card {
display: flex;
align-items: center;
}
.left-child-card {
display: table;
margin-right: 8px;
}
.left-child-card img {
display: table-cell;
width: 40px;
}
.footer-card {
text-align: right;
}
.footer-card .van-button {
border-radius: 6px;
height: 28px;
}
.pay-content {
}
.pay-content .van-cell {
align-items: center;
justify-content: space-between;
}
.pay-content .van-cell__title {
color: #646566;
}
.pay_img {
display: table;
}
.pay_img img {
display: table-cell;
}
.costFormula {
}
.costFormula .van-cell__title {
max-width: 100px;
}
.van-action-sheet__content {
padding-bottom: 50px;
}
.van-dropdown-menu__bar {
box-shadow: none;
}
.van-empty {
position: relative;
transform: none;
left: 0;
}
</style>
<div id="app" v-cloak>
<van-sticky>
<van-nav-bar @click-left="pjaxReplace('/mobile/index')" left-arrow title="会费支付"></van-nav-bar>
</van-sticky>
<van-dropdown-menu active-color="#1989fa">
<van-dropdown-item v-model="pageForm.year" @change="doSearch" :options="yearList"></van-dropdown-item>
<van-dropdown-item v-model="pageForm.isPay" @change="doSearch" :options="payList"></van-dropdown-item>
</van-dropdown-menu>
<div class="parent-card">
<div v-for="item in tableData">
<div class="content-card">
<div class="left-child-card">
<img src="/assets/mobile/svg/memberPay/icon_xsgj.svg"/>
</div>
<div class="right-child-card">
<div>
<span>项目名称:</span>
<span>{{item.projectName}}</span>
</div>
<div>
<span>所属时间:</span>
<span>{{item.paymentStartMonth}} 至 {{item.paymentEndMonth}}</span>
</div>
<div>
<span>缴费时间:</span>
<span>{{moment(item.startTime).format('MM-DD') + ' 至 ' + moment(item.endTime).format('MM-DD')}}</span>
</div>
</div>
</div>
<div class="footer-card">
<van-button v-if="!item.isPayment" @click.stop="openPay(item)" color="#1867b0" size="small" type="primary">
我要缴费
</van-button>
<template v-else>
<van-button v-if="item.isPayment && !item.isRefund" size="small" type="primary" :disabled="true">
您已缴费
</van-button>
<van-button v-else size="small" type="danger" :disabled="true">
{{ getRefundStates(item.refundState) }}
</van-button>
<!-- <van-button size="small" type="primary" @click.stop="showPayInfo(item)">-->
<!-- 查看详情-->
<!-- </van-button>-->
</template>
</div>
</div>
<van-empty
class="custom-image"
description="暂无缴费记录"
image="https://img01.yzcdn.cn/vant/custom-empty-image.png"
v-if="tableData && tableData.length===0"
></van-empty>
</div>
<van-action-sheet :close-on-click-overlay="false" :title="payInfo.projectName" style="height: 60%" v-model="payVisible" @close="payVisibleClose">
<div class="pay-content">
<template>
<van-cell class="costFormula" title="缴费所属时间">
<template #right-icon>
{{formData.paymentStartMonth}} 至 {{formData.paymentEndMonth}}
</template>
</van-cell>
<van-cell class="costFormula" title="缴费标准">
<template #right-icon>
<div style="color: red"
v-if="formData.payModeValueList&&formData.payModeValueList.length>0">
(
<template v-for="(o,i) in formData.payModeValueList">
{{o.name}}
<template v-if="i != formData.payModeValueList.length - 1">+</template>
</template>
) * 0.5% * {{formData.paymentMonth}}个月
</div>
<div v-else>固定金额缴费</div>
</template>
</van-cell>
<van-field
:label="o.name"
:placeholder="'请输入' + o.name"
@input="moneyInput"
input-align="right"
type="number"
v-for="(o,index) in formData.payModeValueList"
v-model="o.value"
>
<template #left-icon>
<div class="pay_img">
<img src="/assets/mobile/svg/memberPay/money.svg"/>
</div>
</template>
</van-field>
</template>
<van-radio-group checked-color="#1867b0" v-model="moneyModel">
<van-cell @click="moneyModel = 1" clickable title="支付宝">
<template #icon>
<div class="pay_img" style="margin-right: 4px">
<img src="/assets/mobile/svg/memberPay/zfb.svg"/>
</div>
</template>
<template #right-icon>
<van-radio :name="1"></van-radio>
</template>
</van-cell>
<van-cell @click="moneyModel = 2" clickable title="微信">
<template #icon>
<div class="pay_img" style="margin-right: 4px">
<img src="/assets/mobile/svg/memberPay/wx.svg"/>
</div>
</template>
<template #right-icon>
<van-radio :name="2"></van-radio>
</template>
</van-cell>
</van-radio-group>
<van-submit-bar :loading="loading" :price="formData.paymentMoney" @submit="doPay" button-color="#1867b0" button-text="支付"></van-submit-bar>
</div>
</van-action-sheet>
<van-popup :style="{ height: '100%', width: '100%'}" @close="imgClose" closeable position="right" v-model="payToOtherPage">
<van-image src="/assets/mobile/svg/memberPay/zf_img.png" style="margin-top: 40px; height: 95%; width: 100%"></van-image>
</van-popup>
</div>
<script src="https://res2.wx.qq.com/open/js/jweixin-1.4.0.js"></script>
<script nonce="${cspNonce!}">
function onBridgeReady(json) {
// const data = JSON.parse(json)
WeixinJSBridge.invoke("getBrandWCPayRequest", JSON.parse(json), function (res) {
if (res.err_msg === "get_brand_wcpay_request:ok") {
// 使用以上方式判断前端返回,微信团队郑重提示:
//res.err_msg将在用户支付成功后返回ok,但并不保证它绝对可靠。
}
})
}
const vue = new Vue({
el: "#app",
mixins: [mobileMixins],
data() {
return {
payToOtherPage: false,
costFormula: "",
payVisible: false,
loading: false,
viewData: {},
tableData: [],
payList: [
{text: '全部', value: null},
{text: '已缴费', value: true},
{text: '未缴费', value: false},
],
pageForm: {
year: new Date().getFullYear(),
isPay: false
},
payInfo: {},
formData: {},
moneyModel: 2,
intervalTimer: null,
hasPayed: false,
tradingStates: [],
refundStates: [],
tradingChannels: []
}
},
methods: {
// showPayInfo(data) {
//
// },
async payVisibleClose() {
clearInterval(this.intervalTimer)
},
doSearch() {
this.pageForm.pageNumber = 1
this.tableData = []
this.finished = false
this.pageData()
},
imgClose() {
this.loading = false
this.payToOtherPage = false
},
moneyInput() {
let paymentMoney = this.formData.payModeValueList.reduce((a, b) => {
return Number(a) + Number(b.value)
}, 0)
console.log(paymentMoney)
const pr = parseFloat((Number(paymentMoney) * 0.005 * this.formData.paymentMonth).toFixed(2))
this.$set(this.formData, "paymentMoney", pr * 100)
},
async doPay() {
if (!this.formData.paymentMoney) {
this.$toast('请计算会费金额')
return
}
if (!this.moneyModel) {
this.$toast('请选择支付方式')
return
}
if(this.moneyModel === 1) {
this.$toast('暂未开通,敬请期待')
return
}
const u = navigator.userAgent
const isiOS = !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/) //ios终端
let userAgent = window.navigator.userAgent.toLowerCase()
if (this.moneyModel === 1) {
//是否微信浏览器
if (userAgent.match(/MicroMessenger/i) && userAgent.match(/MicroMessenger/i)[0] === "micromessenger") {
this.payToOtherPage = true
} else {
const resp = await $.get("/mobile/memberCost/AlipayClient/tradePagePay", {
money: paymentMoney,
paymentProjectId: this.payInfo.id
})
const div = document.createElement("div")
div.innerHTML = resp // data就是接口返回的form 表单字符串
document.body.appendChild(div)
//如果是ios,不新开页面直接跳转
if (isiOS) {
document.forms[0].submit()
} else {
document.forms[0].setAttribute("target", "_blank") // 新开窗口跳转
document.forms[0].submit()
}
}
} else if(this.moneyModel === 2) {
if (userAgent.match(/MicroMessenger/i) && userAgent.match(/MicroMessenger/i)[0] === "micromessenger") {
const confirm = await this.$dialog.confirm({
title: '温馨提示',
message: '您确定要支付吗?',
})
if (confirm === 'confirm') {
const loading = this.$toast.loading({
message: '支付中...',
forbidClick: true,
})
this.hasPayed = false
await this.pullWeChatPay()
await this.getIsPay(loading)
}
} else {
this.$toast('微信支付只能在微信APP中使用,请切换支付方式')
}
}
},
//拉起微信支付
async pullWeChatPay() {
const resp = await $.post("/mobile/memberCost/list/pullWeChatPay", {
money: this.formData.paymentMoney,
busId: this.payInfo.id
})
if (resp.code === 0) {
if (typeof WeixinJSBridge == "undefined") {
if (document.addEventListener) {
document.addEventListener("WeixinJSBridgeReady", onBridgeReady(resp.data))
} else if (document.attachEvent) {
document.attachEvent("WeixinJSBridgeReady", onBridgeReady(resp.data))
document.attachEvent("onWeixinJSBridgeReady", onBridgeReady(resp.data))
}
} else {
onBridgeReady(resp.data)
}
}
},
async getIsPay(loading) {
this.intervalTimer = setInterval(async () => {
const resp = await $.get("/platform/member/payment/mine/getIsPay", { paymentInfoId: this.payInfo.id })
if (resp.code === 0) {
loading.close()
if(resp.data > 0) {
this.hasPayed = true
}
}
}, 2000)
},
async openPay(row) {
this.payInfo = row
const payStandards = JSON.parse(row.payStandards)
const payStandard = payStandards.find(p => p.payPersonnel === row.payPersonnel && p.personType === row.personType)
this.$set(this.formData, "paymentMonth", row.paymentMonth)
this.$set(this.formData, "paymentStartMonth", row.paymentStartMonth)
this.$set(this.formData, "paymentEndMonth", row.paymentEndMonth)
this.$set(this.formData, "paymentInfoId", row.id)
if (payStandard.payModeValue) {
this.$set(this.formData, "payModeValueList", [])
this.$set(this.formData, "paymentMoney", payStandard.payModeValue)
} else {
this.$set(this.formData, "payModeValueList", payStandard.payModeValueList)
this.$set(this.formData, "paymentMoney", 0)
}
this.payVisible = true
},
async pageData() {
const res = await $.post("/platform/member/payment/mine/pageData", this.pageForm)
if (res.code === 0) {
this.tableData = this.tableData.concat(res.data.list)
if (this.tableData.length === res.data.totalCount) {
this.finished = true
} else {
this.pageForm.pageNumber++
}
}
},
getRefundStates(data) {
if (!data) {
return
}
return this.refundStates.find(item => item.name === data).refundStateName
},
async getPaymentEnums() {
this.tradingStates = await getEnumOptions("TradingStateEnum")
this.refundStates = await getEnumOptions("RefundStateEnum")
this.tradingChannels = await getEnumOptions("TradingChannelEnum")
}
},
async created() {
let nowYear = new Date().getFullYear()
for (let i = nowYear; i >= nowYear - 9; i--) {
this.yearList.push({ text: i, value: i })
}
await this.pageData()
await this.getPaymentEnums()
},
watch: {
"hasPayed"(val) {
if(val === true) {
clearInterval(this.intervalTimer)
this.$dialog.alert({title: '温馨提示', message: '支付成功'})
this.doSearch()
this.payVisible = false
}
}
}
})
</script>
<!--#
}
#-->
@@ -0,0 +1,134 @@
<!--#
layout("/layouts/platform_h5.html"){
#-->
<style>
.head {
position: relative;
height: 300px;
background-color: #02be6e;
}
.head_img {
position: absolute;
top: 35%;
left: 54%;
transform: translate(-50%, -50%);
}
.head_zfcg {
position: absolute;
top: 63%;
left: 52%;
transform: translate(-50%, -50%);
font-size: 20px;
font-weight: 700;
color: #ffffff;
}
.head_xq {
position: absolute;
top: 70%;
left: 15%;
color: #ffffff;
}
.middle_zfxx {
background: radial-gradient(circle, transparent, transparent 8px, #FFFFFF 8px, #FFFFFF) 170px;
height: 20vh;
position: relative;
top: -25px;
margin-left: 25px;
margin-right: 25px;
}
.middle_x {
margin-right: 20px;
position: relative;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}
.middle_jine {
position: absolute;
top: 25%;
left: 50%;
transform: translate(-50%, -50%);
font-weight: 700;
font-size: 20px;
color: #02be6e;
}
.middle_zxxx {
position: absolute;
top: 55%;
line-height: 25px;
font-size: 13px;
width: 100%;
}
.app {
background-color: #f7f7f7;
}
</style>
<div id="app" v-cloak>
<div class="head">
<div>
<van-image class="head_img"
src="/assets/mobile/svg/memberPay/paySuccess.svg"></van-image>
<span class="head_zfcg">支付成功</span>
<span class="head_xq">您已付款成功,请返回查看会费情况</span>
</div>
</div>
<div class="middle_zfxx">
<div class="middle_jine">¥{{total_amount}}</div>
<div class="middle_x">
<van-divider dashed></van-divider>
</div>
<div class="middle_zxxx">
<van-row>
<van-col span="8" style="text-align: left;padding-left: 10px;">订单编号</van-col>
<van-col span="16" style="text-align: right;padding-right: 10px;">
{{out_trade_no}}
</van-col>
</van-row>
<van-row>
<van-col span="8" style="text-align: left;padding-left: 10px;">支付时间</van-col>
<van-col span="16" style="text-align: right;padding-right: 10px;">
{{timestamp}}
</van-col>
</van-row>
</div>
</div>
</div>
<script nonce="${cspNonce!}">
const vue = new Vue({
el: '#app',
mixins: [mobileMixins],
data() {
return {
out_trade_no: 0,
total_amount: 0,
timestamp: 0,
}
},
methods: {},
async created() {
this.out_trade_no = GetQueryString("out_trade_no")
this.total_amount = GetQueryString("total_amount")
this.timestamp = GetQueryString("timestamp").replace("+", " ")
}
})
</script>
<!--#
}
#-->
@@ -0,0 +1,198 @@
<!--#
layout("/layouts/platform_h5.html"){
#-->
<div id="app" v-cloak>
<van-sticky>
<van-nav-bar @click-left="pjaxReplace('/mobile/index')" left-arrow title="缴费汇总"></van-nav-bar>
</van-sticky>
<div>
<van-search v-model="pageForm.search" placeholder="请输入搜索关键词" @search="doSearch">
</van-search>
</div>
<div>
<van-tabs @change="doSearch" v-model="pageForm.isPay">
<van-tab title="未缴费" :name="false"></van-tab>
<van-tab title="已缴费" :name="true"></van-tab>
</van-tabs>
<van-list
v-model="loading"
:finished="finished"
finished-text="没有更多了"
@load="pageData"
>
<van-cell-group>
<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>
<span class="custom-title">{{item.username}}</span>({{item.loginname}})
<van-tag :type="item.isPayment?'primary':'danger'">{{item.isPayment?'已缴':'未缴'}}</van-tag>
</template>
<template #label>
<div class="custom-title">教职工类别:{{item.personType}}</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="openPay(item)" v-if="!item.isPayment" size="mini" plain type="info">设为已缴</van-button>
</template>
</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-list>
<van-empty
class="custom-image"
description="暂无缴费记录"
image="https://img01.yzcdn.cn/vant/custom-empty-image.png"
v-if="tableData&&tableData.length===0"
></van-empty>
<van-action-sheet v-model="show" title="标题">
<div class="content">
<van-form @submit="onSubmit">
<van-field
v-model="formData.paymentMoney"
name="缴费金额"
label="缴费金额"
type="digit"
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>
<script nonce="${cspNonce!}">
const vue = new Vue({
el: "#app",
data() {
return {
tableData: [],
memberActive: 0,
loading: false,
finished: false,
pageForm: {
pageNumber: 1,
pageSize: 10,
totalCount: 0,
username: "",
isPay:false,
search:''
},
option1: [
{ text: '姓名', value: 'u.username' },
{ text: '工号', value: 'u.loginname' },
],
show:false,
formData: {}
}
},
methods: {
async pageData() {
const resp = await $.post("/platform/member/payment/summary/pageData", this.pageForm)
if (resp.code === 0) {
this.tableData = this.tableData.concat(resp.data.list)
this.pageForm.totalCount = resp.data.totalCount
if (this.tableData.length >= this.pageForm.totalCount) {
this.finished = true
} else {
this.pageForm.pageNumber++
}
this.loading = false
}
},
doSearch(){
this.pageForm.pageNumber = 1
if(this.tableData.length==this.pageForm.totalCount){
this.finished = true
}else{
this.finished = false
}
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)
}
})
},
openPay(item){
this.show=true
this.formData=item
},
onSubmit(){
this.$dialog.confirm({
title: '提示',
message: "您确定要更改缴费信息吗?",
}).then(async () => {
const data={
ids:JSON.stringify([this.formData.id]),
paymentMoney:this.formData.paymentMoney,
remark:this.formData.remark,
isPay:this.formData.isPayment
}
const resp = await $.get("/platform/member/payment/summary/modify", data)
if (resp.code === 0) {
this.$toast.success(resp.msg)
await this.doSearch()
this.show=false
} else {
this.$toast.fail(resp.msg)
}
})
}
},
async created() {
await this.pageData()
}
})
</script>
<!--#
}
#-->