Merge remote-tracking branch 'origin/main'

This commit is contained in:
@jyuhsin
2025-09-19 17:18:42 +08:00
51 changed files with 3965 additions and 332 deletions
@@ -8,8 +8,8 @@ layout("/layouts/platform_h5.html"){
}
.list-card-body {
/* width: calc(100% - 140px);
display: flex;*/
width: calc(100% - 140px);
display: flex;
flex-direction: column;
justify-content: space-between;
}
@@ -35,9 +35,6 @@ layout("/layouts/platform_h5.html"){
padding: 5px;
border-radius: 5px;
}
.list-card-img img{
width: 100%;
}
</style>
<div id="app" v-cloak>
@@ -47,7 +44,6 @@ layout("/layouts/platform_h5.html"){
<year-van-dropdown-item :num="5" @change="doSearch" v-model="pageForm.year"></year-van-dropdown-item>
<van-dropdown-item :options="stateList" @change="doSearch" v-model="pageForm.state"></van-dropdown-item>
<van-dropdown-item :options="isEnrolledOptions" @change="doSearch" v-model="pageForm.isEnrolledText"></van-dropdown-item>
<van-dropdown-item :options="activityTypeOptions" @change="doSearch" v-model="pageForm.activity_type"></van-dropdown-item>
</van-dropdown-menu>
</van-sticky>
@@ -119,13 +115,12 @@ layout("/layouts/platform_h5.html"){
loading: false,
refreshing: false,
pageForm: {
state: 1,
state: 2,
isEnrolledText: 0,
year: new Date().getFullYear(),
pageNumber: 1,
pageSize: 5,
totalCount: 0,
activity_type: 40001
totalCount: 0
},
yearList: [],
isEnrolledOptions: [
@@ -139,12 +134,7 @@ layout("/layouts/platform_h5.html"){
],
subLoading: false,
viewShow: false,
viewData: {},
activityTypeOptions: [
{ value: 40001, text: "校文化活动" },
{ value: 40002, text: "分工会文化活动" },
{ value: 40003, text: "协会文化活动" },
]
viewData: {}
}
},
components: {
@@ -279,7 +279,7 @@ layout("/layouts/platform_h5.html"){
<!-- 分工会报名-->
<div v-else-if="viewData.signUpMethod===3" class="block">
<div class="notice-title left-tag-title">选择报名人员
<div class="notice-title left-tag-title">选择报名人员
<span v-if="viewData.userNumberLimit===2">
,报名人数 <span style="color: red">
{{viewData.unionTeamNum}}</span>
@@ -1,7 +0,0 @@
<!--#
layout("/layouts/platform_h5.html"){
#-->
<!--#
}
#-->
@@ -0,0 +1,112 @@
<!--#
layout("/layouts/platform_h5.html"){
#-->
<div id="app">
<!-- 导航栏 -->
<van-nav-bar title="作品上传" left-text="返回" left-arrow placeholder
@click-left="historyBack" fixed></van-nav-bar>
<van-sticky offset-top="46px">
<van-dropdown-menu :close-on-click-outside="false" :close-on-click-overlay="false">
<year-van-dropdown-item :num="5" @change="doSearch" v-model="pageForm.year"></year-van-dropdown-item>
</van-dropdown-menu>
</van-sticky>
<table-list api="/platform/activity/worksCollection/upload/pageData"
:page_form.sync="pageForm"
ref="tableListRef"
title="name"
@ready="onReady"
>
<template v-slot="{index,row}">
<table-column label="主题类型">{{row.subjectName}}</table-column>
<table-column label="作品类型">{{row.worksName}}</table-column>
<table-column label="姓名">{{row.userName}}</table-column>
<table-column label="上传时间">{{$moment(row.createdAt).format('YYYY-MM-DD')}}</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>
<apply-form ref="applyFormRef"></apply-form>
<info ref="infoRef"></info>
</div>
<script>
<!--#include('../upload/applyForm.js'){}#-->
<!--#include('info.js'){}#-->
new Vue({
el: "#app",
store,
data() {
return {
pageForm: {
pageNumber: 1,
pageSize: 10,
totalCount: 0,
searchKeyword: '',
year: new Date().getFullYear(),
},
}
},
components: {
'apply-form': applyForm,
'info': INFO,
},
methods: {
onView(row) {
this.$refs.infoRef.onOpen(row)
},
onEdit(row) {
if (this.$moment().isAfter(this.$moment(row.activityEndDateTime))) {
this.$toast.fail("活动已结束,无法修改!")
return
}
this.$refs.applyFormRef.onOpenEdit(row)
},
onDelete(row) {
this.$dialog.confirm({
title: '温馨提示',
message: '您确定要删除吗?',
}).then(() => {
this.$axios.post("/platform/activity/worksCollection/upload/delete", {id:row.id}).then((res) => {
if (res.code === 0) {
this.$toast.success(res.msg)
this.doSearch()
}
})
}).catch(() => {
// on cancel
});
},
onReady() {
this.doSearch()
},
doSearch() {
this.$nextTick(() => {
this.pageForm.pageNumber = 1
this.pageForm.totalCount = 0
this.$refs.tableListRef.doSearch()
})
},
}
})
</script>
<!--#
}
#-->
@@ -0,0 +1,67 @@
const INFO = {
template: /*language=HTML*/
`
<div>
<van-action-sheet v-model="visible" :style="{ 'background-color': '#F7F8FA' }" title="报名信息">
<div class="detail-container">
<van-cell-group>
<van-cell title="姓名">
{{ viewData.userName }}
</van-cell>
<van-cell title="工号">
{{ viewData.loginName }}
</van-cell>
<van-cell title="单位">
{{ viewData.unitName }}
</van-cell>
<van-cell title="分工会">
{{ viewData.unionName }}
</van-cell>
<van-cell title="分工会">
{{ viewData.unionName }}
</van-cell>
<van-cell title="作品名称">
{{ viewData.name }}
</van-cell>
<van-cell title="活动主题">
{{ viewData.activityName }}
</van-cell>
<van-cell title="主题类型">
{{ viewData.subjectName }}
</van-cell>
<van-cell title="作品类型">
{{ viewData.worksName }}
</van-cell>
<van-cell title="作品描述" class="direction-column-cell">
{{ viewData.description }}
</van-cell>
<van-cell title="作品附件" class="direction-column-cell">
<file-preview :files="viewData.files" complete_result></file-preview>
</van-cell>
</van-cell-group>
</div>
</van-action-sheet>
</div>
`,
data() {
return {
viewData: {},
visible: false,
}
},
methods: {
onOpen(row) {
this.$axios.post("/platform/activity/worksCollection/common/findOne", {id: row.id}).then((res) => {
if (res.code === 0) {
this.viewData = res.data
try {
this.viewData.files = JSON.parse(this.viewData.files)
} catch (err) {
}
}
})
this.visible = true
},
}
}
@@ -0,0 +1,159 @@
<!--#
layout("/layouts/platform_h5.html"){
#-->
<div id="app">
<!-- 导航栏 -->
<van-nav-bar title="作品阅览" left-text="返回" left-arrow placeholder
@click-left="historyBack" 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.searchKeyword"
></van-search>
<van-dropdown-menu :close-on-click-outside="false" :close-on-click-overlay="false">
<van-dropdown-item v-model="pageForm.activityId" :options="activityOptions"
@change="doSearch"></van-dropdown-item>
</van-dropdown-menu>
<van-tabs v-model="pageForm.pageOrderName"
@change="doSearch">
<van-tab title="按上传时间正序排序" name="createdAt"></van-tab>
<van-tab title="按点赞多少倒序排序" name="num"></van-tab>
</van-tabs>
</van-sticky>
<table-list api="/platform/activity/worksCollection/read/h5/pageData"
:page_form.sync="pageForm"
ref="tableListRef"
title="name"
@ready="onReady"
>
<template v-slot="{index,row}">
<table-column label="主题类型">{{row.subjectName}}</table-column>
<table-column label="作品类型">{{row.worksName}}</table-column>
<table-column label="姓名">{{row.userName}}</table-column>
<table-column label="上传时间">{{$moment(row.createdAt).format('YYYY-MM-DD')}}</table-column>
<table-column label="点赞数">{{row.num}}</table-column>
<table-column label="附件">
<template v-if="row.files">
<file-preview :files="JSON.parse(row.files)" complete_result></file-preview>
</template>
</table-column>
</template>
<template #actions="{index,row}">
<div class="action-btn" @click="onView(row)">
<i class="fa fa-eye"></i>
<span>查看</span>
</div>
<template v-if="row.nbCount>0">
<div class="action-btn" @click="onLike(row)" v-if="!row.isThisLike">
<i class="fa fa-thumbs-o-up"></i>
<span>点赞</span>
</div>
<div class="action-btn" @click="onDeleteLike(row)" v-if="row.isThisLike">
<i class="fa fa-thumbs-up"></i>
<span>取消点赞</span>
</div>
</template>
</template>
</table-list>
<info ref="infoRef"></info>
</div>
<script>
<!--#include('../mine/info.js'){}#-->
new Vue({
el: "#app",
store,
data() {
return {
pageForm: {
pageNumber: 1,
pageSize: 10,
totalCount: 0,
searchKeyword: '',
pageOrderName: 'createdAt',
pageOrderNameText: '',
activityId: '',
year: new Date().getFullYear(),
},
activityOptions: []
}
},
components: {
'info': INFO,
},
methods: {
onLike(row) {
this.$dialog.confirm({
title: '温馨提示',
message: '您确定要点赞吗?',
}).then(() => {
this.$axios.post("/platform/activity/worksCollection/read/h5/doLike", {uploadId: row.id}).then((res) => {
if (res.code === 0) {
row.num = row.num + 1
row.isThisLike = true
this.$toast.success(res.msg)
}
})
}).catch(() => {
// on cancel
});
},
onDeleteLike(row) {
this.$dialog.confirm({
title: '温馨提示',
message: '您确定要取消点赞吗?',
}).then(() => {
this.$axios.post("/platform/activity/worksCollection/read/h5/doDeleteLike", {uploadId: row.id}).then((res) => {
if (res.code === 0) {
row.num = row.num - 1
row.isThisLike = false
this.$toast.success(res.msg)
}
})
}).catch(() => {
// on cancel
});
},
onView(row) {
this.$refs.infoRef.onOpen(row)
},
async listActivity() {
const res = await this.$axios.post("/platform/activity/worksCollection/common/listActivity")
if (res.code === 0) {
res.data.forEach(v => {
v.text = v.name
v.value = v.id
})
this.activityOptions = res.data
if (this.activityOptions.length > 0) {
this.pageForm.activityId = this.activityOptions[0].id
}
}
},
async onReady() {
await this.listActivity()
this.doSearch()
},
doSearch() {
this.$nextTick(() => {
this.pageForm.pageNumber = 1
this.pageForm.totalCount = 0
this.$refs.tableListRef.doSearch()
})
},
},
created() {
}
})
</script>
<!--#
}
#-->
@@ -0,0 +1,191 @@
const applyForm = {
template:
/*language=HTML*/
`
<div>
<van-action-sheet v-model="visible" :style="{ 'background-color': '#F7F8FA' }" title="报名信息">
<van-form ref="formRef" class="form-container">
<van-cell-group title="基础信息" class="form-section">
<van-field label="姓名" readonly v-model="formData.username"></van-field>
<van-field label="工号" readonly v-model="formData.loginname"></van-field>
<van-field label="所在单位" readonly v-model="formData.unitName"></van-field>
<van-field label="所属工会" readonly v-model="formData.unionName"></van-field>
<van-field label="性别" readonly v-model="formData.sex"></van-field>
</van-cell-group>
<van-cell-group title="报名信息" class="form-section">
<van-field label="主题类型"
required
:rules="[{ required: true, message: '请选择主题类型' }]"
readonly
is-link
@click="showSubjectPicker = true"
placeholder="请选择主题类型"
name="subjectName"
v-model="formData.subjectName">
</van-field>
<van-popup v-model="showSubjectPicker" position="bottom">
<van-picker
show-toolbar
:columns="subjectTypesOptions.map(v=>v.typeName)"
@confirm="onSubjectConfirm"
@cancel="showSubjectPicker=false"
></van-picker>
</van-popup>
<van-field label="作品类型"
required
:rules="[{ required: true, message: '请选择作品类型' }]"
readonly
is-link
@click="showWorksPicker = true"
placeholder="请选择作品类型"
name="worksName"
v-model="formData.worksName">
</van-field>
<van-popup v-model="showWorksPicker" position="bottom">
<van-picker
show-toolbar
:columns="worksTypeOptions.map(v=>v.worksTypeName)"
@confirm="onWorksConfirm"
@cancel="showWorksPicker=false"
></van-picker>
</van-popup>
<van-field label="作品名称"
required
v-model="formData.name"
name="name"
placeholder="请填写作品名称"
:rules="[{ required: true, message: '请填写作品名称' }]"></van-field>
<van-field label="作品描述"
v-model="formData.description"
type="textarea"
name="description"
rows="4"
autosize
maxlength="150"
:rules="[{ required: true, message: '请填写作品描述' }]"
class="more-text"
placeholder="请填写作品描述"></van-field>
</van-cell-group>
<van-cell-group title="附件">
<van-field class="more-text"
name="files"
:rules="[{ required: true,message:'请上传附件' }]"
label=""
required>
<template #input>
<h5-file-upload
slot="input"
:value.sync="formData.files"
:upload_number="chooseWorksType && chooseWorksType.allowFileNum"
upload_mode="file"
upload_result_category="array"
upload_result_type="url"
complete_result
:accept="fileAccept"
></h5-file-upload>
</template>
</van-field>
</van-cell-group>
<div class="form-actions">
<van-button @click="onSubmit" round type="info">提交</van-button>
</div>
</van-form>
</van-action-sheet>
</div>
`,
data() {
return {
row: {},
visible: false,
formData: {},
subjectTypesOptions: [],
showSubjectPicker: false,
worksTypeOptions: [],
showWorksPicker: false,
fileAccept: null,
chooseWorksType: {}
}
},
methods: {
async onOpen(row) {
this.$set(this.formData, 'username', this.$store.state.user.username)
this.$set(this.formData, 'loginname', this.$store.state.user.loginname)
this.$set(this.formData, 'unionName', this.$store.state.user.union.name)
this.$set(this.formData, 'unitName', this.$store.state.user.unit.name)
this.$set(this.formData, 'sex', this.$store.state.user.sex)
this.$set(this.formData, 'activityId', row.id)
await this.activityChange(row.id)
this.row = row
this.visible = true
},
async onOpenEdit(row) {
const formData = clone(row)
formData.files = JSON.parse(formData.files)
await this.activityChange(formData.activityId)
await this.subjectChange(formData.subjectId)
this.row = formData
this.formData = formData
this.$set(this.formData, 'username', this.$store.state.user.username)
this.$set(this.formData, 'loginname', this.$store.state.user.loginname)
this.$set(this.formData, 'sex', this.$store.state.user.sex)
this.chooseWorksType = this.worksTypeOptions.find((o) => o.id === formData.worksId)
if (this.chooseWorksType.allowFileTypes && this.chooseWorksType.allowFileTypes.length > 0) {
this.fileAccept = this.chooseWorksType.allowFileTypes.map((item) => "." + item).join(",")
}
this.visible = true
},
onWorksConfirm(value, index) {
this.$set(this.formData, 'worksName', value)
this.$set(this.formData, 'worksId', this.worksTypeOptions[index].id)
this.showWorksPicker = false
this.chooseWorksType = this.worksTypeOptions.find((o) => o.id === this.worksTypeOptions[index].id)
if (this.chooseWorksType.allowFileTypes && this.chooseWorksType.allowFileTypes.length > 0) {
this.fileAccept = this.chooseWorksType.allowFileTypes.map((item) => "." + item).join(",")
}
},
async onSubjectConfirm(value, index) {
this.$set(this.formData, 'subjectName', value)
this.$set(this.formData, 'subjectId', this.subjectTypesOptions[index].id)
await this.subjectChange(this.subjectTypesOptions[index].id)
this.showSubjectPicker = false
},
onSubmit() {
this.$refs.formRef.validate().then(() => {
this.$dialog.confirm({
title: "提示",
message: "您确定要提交吗?"
}).then(() => {
this.$toast.loading({
message: '提交中...',
forbidClick: true,
});
this.$axios.post("/platform/activity/worksCollection/upload" + (this.formData.id ? "/update" : "/insert"), {data: JSON.stringify(this.formData)}).then((res) => {
if (res.code === 0) {
this.$toast.clear();
this.$toast.success("提交成功")
pjaxReplace("/platform/activity/worksCollection/mine/h5")
}
})
})
}).catch();
},
async activityChange(value) {
const resp = await this.$axios.post("/platform/activity/worksCollection/common/getSubjectTypes", {activityId: value})
if (resp.code === 0) {
this.subjectTypesOptions = resp.data
}
},
async subjectChange(value) {
const resp = await this.$axios.post("/platform/activity/worksCollection/common/getWorksTypes", {subjectId: value})
if (resp.code === 0) {
this.worksTypeOptions = resp.data
}
}
}
}
@@ -1,7 +1,166 @@
<!--#
layout("/layouts/platform_h5.html"){
#-->
22222222222
<style scoped>
.info-title {
font-weight: bold;
background-color: white;
padding: 13px;
box-shadow: 0 8px 12px #ebedf0;
text-align: center !important;
}
.info-container {
height: calc(100vh - 46px - 44px);
min-height: calc(100vh - 46px - 44px);
overflow-y: auto;
}
.info-img {
display: block;
}
.van-count-down {
color: #fff;
}
</style>
<div id="app">
<!-- 导航栏 -->
<van-nav-bar title="作品上传" left-text="返回" left-arrow placeholder
@click-left="historyBack" fixed></van-nav-bar>
<van-sticky offset-top="46px">
<van-dropdown-menu :close-on-click-outside="false" :close-on-click-overlay="false">
<year-van-dropdown-item :num="5" @change="doSearch" v-model="pageForm.year"></year-van-dropdown-item>
<van-dropdown-item v-model="pageForm.activityType" :options="typeOptions" :multiple="false"
@change="doSearch"></van-dropdown-item>
</van-dropdown-menu>
</van-sticky>
<table-list api="/platform/activity/worksCollection/upload/h5/activityPageData"
:page_form.sync="pageForm"
ref="tableListRef"
title="name"
img="cover"
@ready="onReady"
>
<template v-slot="{index,row}">
<table-column label="面向对象">{{row.activityGroupName}}</table-column>
<table-column label="报名时间">
{{$moment(row.startDateTime).format('MM/DD HH:mm')
+ '~' + $moment(row.endDateTime).format('MM/DD HH:mm')}}
</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="onApply(row)">
<i class="fa fa-edit"></i>
<span>去报名</span>
</div>
</template>
</table-list>
<van-action-sheet v-model="infoVisible" title="详细信息">
<div class="info-container">
<van-image class="info-img" height="186" width="100%" :src="infoRow.cover"></van-image>
<div class="info-title">{{infoRow.name}}</div>
<pdf-preview style="height: calc(100vh - 46px - 44px - 186px - 57px)"
:content="infoRow.content"></pdf-preview>
</div>
<div class="form-container">
<div class="form-actions">
<van-button @click="onApply(infoRow)" type="primary" block>
<span v-if="time >= 0">
去报名
</span>
<template v-else>
距离开始
<van-count-down :time="Math.abs(time)" class="count-down" format="DD 天 HH 时 mm 分 ss 秒"
@finish="time = 0"></van-count-down>
</template>
</van-button>
</div>
</div>
</van-action-sheet>
<apply-form ref="applyFormRef"></apply-form>
</div>
<script>
<!--#include('applyForm.js'){}#-->
new Vue({
el: "#app",
store,
data() {
return {
time: 0,
pageForm: {
pageNumber: 1,
pageSize: 10,
totalCount: 0,
searchKeyword: '',
year: new Date().getFullYear(),
activityType: 2,
},
typeOptions: [
{text: '全部', value: 1},
{text: '即将开始', value: 4},
{text: '报名中', value: 2},
{text: '已结束', value: 3},
],
infoVisible: false,
infoRow: {},
}
},
components: {
'apply-form': applyForm,
"pdf-preview": httpVueLoader("/components/plugins/sysFilePreview/PdfIndex.vue?v=" + new Date().getTime())
},
methods: {
onApply(row) {
if (this.$moment().isBefore(this.$moment(row.startDateTime))) {
this.onView(row)
return
}
if (this.$moment().isAfter(this.$moment(row.endDateTime))) {
this.$toast.fail("活动已结束")
return
}
this.$refs.applyFormRef.onOpen(row)
},
onView(row) {
this.infoRow = row
this.time = this.$moment().diff(this.$moment(row.startDateTime), 'milliseconds')
this.infoVisible = true
},
onReady() {
this.doSearch()
},
doSearch() {
this.$nextTick(() => {
this.pageForm.pageNumber = 1
this.pageForm.totalCount = 0
this.$refs.tableListRef.doSearch()
})
},
},
created() {
},
})
</script>
<!--#
}
#-->
@@ -1,8 +0,0 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<title>Title</title>
</head>
<body></body>
</html>
@@ -84,7 +84,7 @@ const H5_ASSET_INFO = {
<div style="white-space: pre">{{item.oldAssetNotes}}</div>
</van-cell>
<van-cell title="旧资产图片" class="direction-column-cell">
{{item.oldAssetFiles}}
<file-preview :files="item.oldAssetFiles" complete_result></file-preview>
</van-cell>
</van-cell-group>
</template>
@@ -5,6 +5,9 @@ layout("/layouts/platform_h5.html"){
<div id="app" v-cloak>
<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-search
:reverse-color="false"
:show-action="false"
@@ -13,9 +16,6 @@ layout("/layouts/platform_h5.html"){
placeholder="请输入经办人搜索"
v-model="pageForm.userName"
></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>
@@ -0,0 +1,378 @@
<!--#
layout("/layouts/platform_h5.html"){
#-->
<style>
.signature-image {
max-width: 200px;
max-height: 100px;
}
</style>
<div id="app" v-cloak>
<van-nav-bar title="独生子女父母退休申请" left-text="返回" left-arrow @click-left="historyBack" placeholder fixed z-index="999"
class="custom-nav"></van-nav-bar>
<div class="form-container">
<van-form ref="formRef">
<van-cell-group title="人员信息" class="form-section">
<van-field label="职工姓名" v-model="formData.userName" placeholder="从信息中心获取"
readonly></van-field>
<van-field label="性别" v-model="formData.sex" placeholder="从信息中心获取" readonly></van-field>
<van-field label="出生年月" v-model="formData.birthday" placeholder="从信息中心获取"
readonly></van-field>
<van-field label="原工作单位" v-model="formData.unitName" placeholder="从信息中心获取"
readonly></van-field>
<van-field label="退休时间"
v-model="formData.retireTime"
placeholder="请选择退休时间"
readonly
@click="showDatePicker('retireTime')"
clickable
required
></van-field>
<van-field label="爱人姓名" v-model="formData.loverName" placeholder="请输入爱人姓名" required></van-field>
<van-field
v-model="formData.loverSex"
name="loverSex"
label="性别"
readonly
placeholder="请选择性别"
@click="showLoverSexPicker = true"
clickable
required
></van-field>
<van-popup position="bottom" round v-model:show="showLoverSexPicker">
<van-picker :columns="loverSexColumns" @cancel="showLoverSexPicker = false"
@confirm="onLoverSexConfirm" show-toolbar ></van-picker>
</van-popup>
<van-field label="工作单位" v-model="formData.loverUnitName" placeholder="请输入工作单位" required></van-field>
<van-field label="结婚日期"
v-model="formData.marryTime"
placeholder="请选择结婚日期"
readonly
@click="showDatePicker('marryTime')"
clickable
required
></van-field>
<van-field label="子女出生日"
v-model="formData.childrenBirthday"
placeholder="请选择子女出生日"
readonly
@click="showDatePicker('childrenBirthday')"
clickable
required
></van-field>
<van-field label="领独生子女证日"
v-model="formData.getCertificateTime"
placeholder="请选择日期"
readonly
@click="showDatePicker('getCertificateTime')"
clickable
required
></van-field>
<van-field label="独生子女光荣证号" v-model="formData.childrenGraceNumber" placeholder="请输入独生子女光荣证号" required></van-field>
<van-field label="办证机关" v-model="formData.office" placeholder="请输入办证机关" required></van-field>
<van-field class="more-text" name="honorFiles"
label="独生子女父母光荣证" required>
<template #input>
<h5-file-upload
slot="input"
:value.sync="formData.honorFiles"
:upload_number="10"
upload_mode="file"
upload_result_category="array"
upload_result_type="url"
complete_result
></h5-file-upload>
</template>
</van-field>
<van-field class="more-text" name="retireFiles"
label="退休证" required>
<template #input>
<h5-file-upload
slot="input"
:value.sync="formData.retireFiles"
:upload_number="10"
upload_mode="file"
upload_result_category="array"
upload_result_type="url"
complete_result
></h5-file-upload>
</template>
</van-field>
<van-field class="more-text" name="sign" label="">
<template #input>
<h5-signature v-model="formData.sign" slot="input"></h5-signature>
</template>
</van-field>
</van-cell-group>
<van-field name="declarationAgreed" class="declaration-checkbox">
<template #input>
<van-checkbox v-model="formData.declarationAgreed" checked-color="#ee0a24">
我已阅读并同意以下声明
</van-checkbox>
</template>
</van-field>
<van-cell class="declaration-text">
根据《河北省人口与计划生育条例》第四章第三十四条第四款"独生子女父母是国家工作人员、企事业单位员工的,退休时分别给予不低于三千元一次性奖励"的规定。<br/>
说明:1. 本人应如实填写各项情况。2. 申报时需持《独生子女父母光荣证》、《退休证》原件及其复印件各一份。
</van-cell>
</van-cell-group>
<!-- 日期选择器弹窗 -->
<van-popup position="bottom" round v-model:show="showDatePopup">
<van-datetime-picker
type="date"
:min-date="minDate"
:max-date="maxDate"
@confirm="onDateConfirm"
@cancel="showDatePopup = false"
show-toolbar
/>
</van-popup>
<!-- 提交按钮 -->
<div class="form-actions">
<van-button plain @click="onSave" type="info">保存</van-button>
<van-button @click="onSubmit" type="primary" v-if="!taskId">提交</van-button>
<van-button @click="onSubmitAgain" type="primary" v-else>提交1</van-button>
</div>
</van-form>
</div>
</div>
<script>
new Vue({
store,
el: '#app',
dicts: ["USER_NATION"],
data() {
return {
bizId: GetQueryString("bizId"),
taskId: GetQueryString("taskId"),
formData: {},
// 性别选择器
showLoverSexPicker: false,
loverSexColumns: [
{ value: '男性', text: '男性' },
{ value: '女性', text: '女性' }
],
// 日期选择器
showDatePopup: false,
currentDatePickerField: '', // 当前正在选择日期的字段名
minDate: new Date(1950, 0, 1),
maxDate: new Date(2040, 11, 31)
}
},
methods: {
// 显示日期选择器
showDatePicker(fieldName) {
this.currentDatePickerField = fieldName;
this.showDatePopup = true;
},
// 日期确认事件
onDateConfirm(value) {
const formattedDate = this.$moment(value).format("YYYY-MM-DD");
this.$set(this.formData, this.currentDatePickerField, formattedDate);
this.showDatePopup = false;
},
async onSave() {
// 保存时不需要验证,直接提交数据
this.$axios.post("/platform/dsznfmtx/apply/save", {data: JSON.stringify(this.formData)})
.then((res) => {
this.$toast.clear();
if (res.code === 0) {
this.$toast.success(res.msg);
pjaxReplace('/platform/dsznfmtx/mine/h5')
} else {
this.$toast.fail(res.msg || '保存失败');
}
})
.catch(err => {
this.$toast.clear();
this.$toast.fail('网络错误,请稍后重试');
});
},
// 提交前进行表单验证
async validateForm() {
const errors = [];
// 必填字段验证
if (!this.formData.retireTime) {
errors.push('请选择退休时间');
}
if (!this.formData.loverName) {
errors.push('请输入爱人姓名');
}
if (!this.formData.loverSex) {
errors.push('请选择爱人性别');
}
if (!this.formData.loverUnitName) {
errors.push('请输入爱人工作单位');
}
if (!this.formData.marryTime) {
errors.push('请选择结婚日期');
}
if (!this.formData.childrenBirthday) {
errors.push('请选择子女出生日');
}
if (!this.formData.getCertificateTime) {
errors.push('请选择领独生子女证日');
}
if (!this.formData.childrenGraceNumber) {
errors.push('请输入独生子女光荣证号');
}
if (!this.formData.office) {
errors.push('请输入办证机关');
}
if (!this.formData.honorFiles || this.formData.honorFiles.length === 0) {
errors.push('请上传独生子女父母光荣证');
}
if (!this.formData.retireFiles || this.formData.retireFiles.length === 0) {
errors.push('请上传退休证');
}
if (!this.formData.sign) {
errors.push('请签字');
}
if (!this.formData.declarationAgreed) {
errors.push('请阅读并同意声明');
}
return errors;
},
// 添加检查是否为退休人员的方法
async checkRetirementStatus() {
try {
const resp = await this.$axios.post('/platform/dsznfmtx/apply/checkRetirementStatus');
// 如果返回code为0且data为true,表示用户是退休人员
if (resp.code === 0 && resp.data === true) {
return true;
}
return false;
} catch (error) {
console.error('检查退休状态失败:', error);
return false;
}
},
// 检查用户是否已申请过
async checkUserApplication() {
try {
const resp = await this.$axios.post('/platform/dsznfmtx/apply/checkUserApplied');
// 如果返回code为0且data为true,表示用户已申请过
if (resp.code === 0 && resp.data === true) {
return true;
}
return false;
} catch (error) {
console.error('检查用户申请状态失败:', error);
return false;
}
},
// 提交
async onSubmit() {
// 检查是否为退休人员
const isRetired = await this.checkRetirementStatus();
if (!isRetired) {
this.$message.warning('您不是退休人员,无法申请此项福利');
return;
}
if (!this.bizId) {
const isApplied = await this.checkUserApplication();
if (isApplied) {
this.$message.warning('您已经提交过申请,不能重复申请');
return;
}
}
// 提交时进行表单验证
const errors = await this.validateForm();
if (errors.length > 0) {
this.$toast.fail(errors[0]); // 显示第一条错误信息
return;
}
this.$axios.post('/platform/dsznfmtx/apply/submit', {data: JSON.stringify(this.formData)})
.then(res => {
this.$toast.clear();
if (res.code === 0) {
this.$toast.success("提交成功");
pjaxReplace('/platform/dsznfmtx/mine/h5')
} else {
this.$toast.fail(res.msg || '提交失败');
}
})
.catch(err => {
this.$toast.clear();
this.$toast.fail('网络错误,请稍后重试');
});
},
// 再次提交
async onSubmitAgain() {
// 提交时进行表单验证
const errors = await this.validateForm();
if (errors.length > 0) {
this.$toast.fail(errors[0]); // 显示第一条错误信息
return;
}
this.$axios.post('/platform/dsznfmtx/apply/submitAgain', {
data: JSON.stringify(this.formData),
taskId: GetQueryString("taskId")
}).then(res => {
this.$toast.clear();
if (res.code === 0) {
this.$toast.success("提交成功");
setTimeout(() => {
pjaxReplace('/platform/dsznfmtx/mine/h5')
}, 1500);
} else {
this.$toast.fail(res.msg || '提交失败');
}
}).catch(err => {
this.$toast.clear();
this.$toast.fail('网络错误,请稍后重试');
});
},
// 添加性别确认方法
onLoverSexConfirm(o) {
this.$set(this.formData, "loverSex", o.text);
this.showLoverSexPicker = false;
},
init() {
this.bizId = GetQueryString("bizId")
if (this.bizId) {
this.$axios.post("/platform/dsznfmtx/apply/findOne", {id: this.bizId}).then((res) => {
if (res.code === 0) {
this.formData = res.data;
}
})
} else {
const user = this.$store.state.user
this.$set(this.formData, "userId", user.id)
this.$set(this.formData, "userName", user.username)
this.$set(this.formData, "loginName", user.loginname)
this.$set(this.formData, "unitId", user.unitId)
this.$set(this.formData, "unitName", user.unit.name)
this.$set(this.formData, "unionId", user.union.id)
this.$set(this.formData, "unionName", user.union.name)
this.$set(this.formData, "sex", user.sex)
this.$set(this.formData, "birthday", user.birthday)
}
}
},
async created() {
await this.init();
}
})
</script>
<!--#
}
#-->
@@ -0,0 +1,127 @@
<!--#
layout("/layouts/platform_h5.html"){
#-->
<div id="app" v-cloak>
<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-search
:reverse-color="false"
:show-action="false"
@search="doSearch"
input-align="left"
placeholder="请输入职工姓名搜索"
v-model="pageForm.userName"
></van-search>
</van-sticky>
<table-list api="/platform/dsznfmtx/collect/pageData" :page_form.sync="pageForm" ref="tableListRef"
@ready="doSearch" >
<template v-slot="{index,row}">
<table-column label="职工姓名">{{row.userName}}</table-column>
<table-column label="性别">{{row.sex}}</table-column>
<table-column label="工会">{{row.unionName}}</table-column>
<table-column label="所属单位">{{row.unitName}}</table-column>
<table-column label="退休时间">{{row.retireTime}}</table-column>
<table-column label="申请时间">{{row.applyTime}}</table-column>
<table-column label="当前节点">{{row.taskName}}</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 delete" @click="onDelete(row)" v-if="$auth.hasRole('SYSADMIN')">
<i class="fa fa-trash"></i>
<span>删除</span>
</div>
</template>
</table-list>
<dsznfmtx-info ref="dsznfmtxInfoRef"></dsznfmtx-info>
</div>
<script>
<!--#include('../common/info.js'){}#-->
const vue = new Vue({
el: "#app",
store,
dicts: [],
components: {
"dsznfmtx-info":DSZNFMTX_INFO
},
data() {
return {
viewShow: false,
yearList: [],
pageForm: {
pageNumber: 1,
pageSize: 10,
totalCount: 0,
searchKeyword: "",
year: "",
},
infoShow: false
}
},
methods: {
onView(row) {
this.showApprovalForm = false
this.$refs.dsznfmtxInfoRef.onOpen(row)
},
onRevoke(row){
this.$dialog
.confirm({
title: "提示",
message: "您确定要撤销申请吗?"
})
.then(() => {
this.$axios.post("/flow/common/revokeTask", {taskId: row.startTaskId}).then((resp) => {
this.$toast.success(resp.msg)
this.doSearch()
})
})
},
onDelete(row) {
this.$dialog
.confirm({
title: "提示",
message: "您确定要删除吗?"
})
.then(() => {
this.$axios.post("/platform/dsznfmtx/mine/delete", {id: row.id}).then((resp) => {
if (resp.code === 0) {
this.$toast.success(resp.msg)
this.doSearch()
}
})
})
},
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)
},
},
created() {
this.initData()
}
})
</script>
<!--#
}
#-->
@@ -0,0 +1,123 @@
const DSZNFMTX_INFO = {
template:
/*language=HTML*/`
<van-action-sheet v-model="visible" title="查看详情">
<div class="detail-container">
<van-cell-group title="基本信息">
<van-cell title="职工姓名">{{ viewData.userName }}</van-cell>
<van-cell title="性别">{{ viewData.sex }}</van-cell>
<van-cell title="出生年月">{{ viewData.birthday }}</van-cell>
<van-cell title="原工作单位">{{ viewData.unitName }}</van-cell>
<van-cell title="退休时间">{{ viewData.retireTime }}</van-cell>
<van-cell title="爱人姓名">{{ viewData.loverName }}</van-cell>
<van-cell title="性别">{{ viewData.loverSex }}</van-cell>
<van-cell title="工作单位">{{ viewData.loverUnitName }}</van-cell>
<van-cell title="结婚日期">{{ viewData.loverBirthday }}</van-cell>
<van-cell title="子女出生日">{{ viewData.loverBirthday }}</van-cell>
<van-cell title="领独生子女光时间">{{ viewData.getCertificateTime }}</van-cell>
<van-cell title="独生子女光荣证号">{{ viewData.childrenGraceNumber }}</van-cell>
<van-cell title="办证机关">{{ viewData.office }}</van-cell>
<van-cell title="奖励金额">{{ viewData.bonus }}</van-cell>
<van-cell title="独生子女父母光荣证">
<file-preview :files="viewData.honorFiles" complete_result></file-preview>
</van-cell>
<van-cell title="退休证">
<file-preview :files="viewData.retireFiles" complete_result></file-preview>
</van-cell>
<van-cell title="签字" >
<van-image :src="viewData.sign"
v-if="viewData.sign"
class="signature-image"></van-image>
</van-cell>
</van-cell-group>
<template v-for="(task,index) in doneTasks">
<div class="process-title">
{{ task.displayName }}
</div>
<van-cell-group 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 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.PROCESS_TASK_SUBMIT_TYPE"
:value="task.ext.submitType"></dict-tag>
</van-cell>
<van-cell title="办理意见" v-if="!task.ext.isFirstTaskNode">
<template #label>
{{
task.taskFormData.opinion
}}
</template>
</van-cell>
<van-cell title="签字" v-if="!task.ext.isFirstTaskNode">
<van-image :src="task.ext.tf_userSign"
v-if="task.ext.tf_userSign"
class="signature-image"></van-image>
</van-cell>
</van-cell-group>
</template>
</div>
<slot></slot>
</van-action-sheet>
`,
dicts: ["PROCESS_TASK_SUBMIT_TYPE"],
data() {
return {
visible:false,
viewData: {},
doneTasks: [],
row: null,
}
},
methods: {
onOpen(row) {
this.row = row
this.visible = true
this.getInfo()
this.getDoneTasks()
},
// 关闭
onClose(){
this.visible = false
},
// 获取申请信息
getInfo() {
this.$axios.post("/platform/dsznfmtx/apply/findOne", {id: this.row.id}).then((res) => {
if (res.code === 0) {
this.viewData = res.data
}
})
},
// 查看
openView(id) {
this.$nextTick(() => {
this.$refs.infoDialogRef.onOpen(id)
})
},
// 获取已办任务审批记录
getDoneTasks() {
this.$axios.post("/flow/common/doneTasks", {bizId: this.row.id}).then((res) => {
if (res.code === 0) {
this.doneTasks = res.data
}
})
},
},
}
@@ -0,0 +1,134 @@
<!--#
layout("/layouts/platform_h5.html"){
#-->
<div id="app" v-cloak>
<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/dsznfmtx/mine/pageData" :page_form.sync="pageForm" ref="tableListRef"
@ready="doSearch" >
<template v-slot="{index,row}">
<table-column label="职工姓名">{{row.userName}}</table-column>
<table-column label="性别">{{row.sex}}</table-column>
<table-column label="工会">{{row.unionName}}</table-column>
<table-column label="所属单位">{{row.unitName}}</table-column>
<table-column label="退休时间">{{row.retireTime}}</table-column>
<table-column label="申请时间">{{row.applyTime}}</table-column>
<table-column label="当前节点">{{row.taskName}}</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)" v-if="row.taskKey === 'startTask' || !row.instanceId">
<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" @click="onDelete(row)" v-if="row.taskKey === 'startTask' || !row.instanceId">
<i class="fa fa-trash"></i>
<span>删除</span>
</div>
</template>
</table-list>
<dsznfmtx-info ref="dsznfmtxInfoRef"></dsznfmtx-info>
</div>
<script>
<!--#include('../common/info.js'){}#-->
const vue = new Vue({
el: "#app",
store,
dicts: [],
components: {
"dsznfmtx-info":DSZNFMTX_INFO
},
data() {
return {
viewShow: false,
yearList: [],
pageForm: {
pageNumber: 1,
pageSize: 10,
totalCount: 0,
searchKeyword: "",
year: "",
},
infoShow: false
}
},
methods: {
onView(row) {
this.showApprovalForm = false
this.$refs.dsznfmtxInfoRef.onOpen(row)
},
onEdit(row) {
this.$pjaxReplace('/platform/dsznfmtx/apply/h5?taskId=' + (row.startTaskId || '') + "&bizId=" + row.id)
},
onRevoke(row){
this.$dialog
.confirm({
title: "提示",
message: "您确定要撤销申请吗?"
})
.then(() => {
this.$axios.post("/flow/common/revokeTask", {taskId: row.startTaskId}).then((resp) => {
this.$toast.success(resp.msg)
this.doSearch()
})
})
},
onDelete(row) {
this.$dialog
.confirm({
title: "提示",
message: "您确定要删除吗?"
})
.then(() => {
this.$axios.post("/platform/dsznfmtx/mine/delete", {id: row.id}).then((resp) => {
if (resp.code === 0) {
this.$toast.success(resp.msg)
this.doSearch()
}
})
})
},
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)
},
},
created() {
this.initData()
}
})
</script>
<!--#
}
#-->
@@ -0,0 +1,257 @@
<!--#
layout("/layouts/platform_h5.html"){
#-->
<div id="app" v-cloak>
<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.userName"
></van-search>
<van-tabs v-model="pageForm.approvalText"
@change="(val)=>{this.pageForm.approval = val==='1';this.doSearch();}">
<van-tab title="已审核" name="1"></van-tab>
<van-tab title="未审核" name="0"></van-tab>
</van-tabs>
</van-sticky>
<table-list api="/platform/dsznfmtx/schoolAudit/pageData" :page_form.sync="pageForm" ref="tableListRef"
@ready="doSearch" >
<template v-slot="{index,row}">
<table-column label="职工姓名">{{row.userName}}</table-column>
<table-column label="性别">{{row.sex}}</table-column>
<table-column label="工会">{{row.unionName}}</table-column>
<table-column label="所属单位">{{row.unitName}}</table-column>
<table-column label="奖励金额">{{row.bonus}}</table-column>
<table-column label="申请时间">{{row.applyTime}}</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="onAudit(row)">
<i class="fa fa-edit"></i>
<span>审核</span>
</div>
</template>
</table-list>
<dsznfmtx-info ref="dsznfmtxInfoRef">
<div v-if="showApprovalForm">
<div class="process-title">
校工会审核
</div>
<div class="form-container">
<van-form ref="formRef">
<van-cell-group title="审批意见">
<van-field label=""
:rules="[{ required: true,message:'请填审批意见' }]"
v-model="formData.tf_opinion"
required
type="textarea"
name="tf_opinion"
rows="4"
autosize
class="more-text"
placeholder="请填审批意见"></van-field>
</van-cell-group>
<van-cell-group title="电子签名" class="form-section">
<van-field class="more-text" name="tf_userSign" label="">
<template #input>
<h5-signature v-model="formData.tf_userSign" slot="input"></h5-signature>
</template>
</van-field>
</van-cell-group>
<!-- 按钮区域 -->
<div class="form-actions">
<van-button type="danger" @click="handleTaskAction(6)">退回到发起人</van-button>
<van-button type="danger" @click="handleTaskAction(2)">拒绝申请</van-button>
<van-button type="primary" @click="handleTaskAction(1)">同意申请</van-button>
</div>
</van-form>
</div>
</div>
</dsznfmtx-info>
<!-- 奖励金额输入弹窗 -->
<van-dialog v-model="bonusDialogVisible" title="输入奖励金额" show-cancel-button
@confirm="confirmBonusInput" @cancel="cancelBonusInput">
<van-field v-model="bonusFormData.bonus" placeholder="请输入奖励金额" type="number">
<template #right-icon>
<span></span>
</template>
</van-field>
</van-dialog>
</div>
<script>
<!--#include('../common/info.js'){}#-->
const vue = new Vue({
el: "#app",
store,
dicts: [],
components: {
"dsznfmtx-info":DSZNFMTX_INFO
},
data() {
return {
pageForm: {
pageNumber: 1,
pageSize: 10,
totalCount: 0,
searchKeyword: "",
approvalText: "0",
approval: false,
year: new Date().getFullYear(),
},
formData: {},
showApprovalForm: false,
infoShow: false,
// 奖励金额输入弹窗相关数据
bonusDialogVisible: false,
bonusFormData: {
bonus: ''
},
currentRow: null,
currentSubmitType: null
}
},
methods: {
// 显示奖励金额输入弹窗
showBonusInputDialog(submitType) {
this.currentSubmitType = submitType;
this.bonusFormData.bonus = '';
this.bonusDialogVisible = true;
},
// 确认奖励金额输入
confirmBonusInput() {
if (!this.bonusFormData.bonus) {
this.$toast.fail('请输入奖励金额');
return false; // 阻止弹窗关闭
}
// 验证金额格式
const bonusPattern = /^([0-9]*[.]{0,1}[0-9]{0,2})$/;
if (!bonusPattern.test(this.bonusFormData.bonus)) {
this.$toast.fail('请输入有效的金额格式');
return false; // 阻止弹窗关闭
}
this.bonusDialogVisible = false;
// 保存奖励金额并执行审批操作
this.saveBonusAndApprove();
return true; // 允许弹窗关闭
},
// 取消奖励金额输入
cancelBonusInput() {
this.bonusDialogVisible = false;
},
// 保存奖励金额并执行审批
saveBonusAndApprove() {
// 先获取完整的申请数据
this.$axios.post('/platform/dsznfmtx/apply/findOne', {id: this.currentRow.id}).then(res => {
if (res.code === 0) {
// 获取完整的数据后,更新奖励金额
const fullData = res.data;
fullData.bonus = this.bonusFormData.bonus;
// 调用申请页面的保存方法,传递完整数据
this.$axios.post('/platform/dsznfmtx/apply/save', {data: JSON.stringify(fullData)}).then(saveRes => {
if (saveRes.code === 0) {
// 保存成功后执行审批操作
this.executeTaskAction(this.currentSubmitType);
} else {
this.$toast.fail(saveRes.msg || '保存奖励金额失败');
}
}).catch(error => {
this.$toast.fail('保存奖励金额失败');
console.error('保存奖励金额失败:', error);
});
} else {
this.$toast.fail(res.msg || '获取申请数据失败');
}
}).catch(error => {
this.$toast.fail('获取申请数据失败');
console.error('获取申请数据失败:', error);
});
},
// 执行任务操作
executeTaskAction(val) {
this.$refs.formRef.validate().then(() => {
this.$dialog.confirm({
title: '温馨提示',
message: '您确定要提交吗?',
}).then(() => {
this.$axios.post('/flow/common/executeTask', {
data: JSON.stringify({
...this.formData,
submitType: val
})
}).then(res => {
if (res.code === 0) {
this.$toast.success("提交成功")
this.doSearch()
this.$refs.dsznfmtxInfoRef.onClose()
}
})
}).catch(() => {
// on cancel
});
}).catch();
},
handleTaskAction(val) {
// 如果是同意申请操作(val=1),需要先输入奖励金额
if (val === 1) {
this.showBonusInputDialog(val);
return;
}
// 其他操作直接执行
this.executeTaskAction(val);
},
onView(row) {
this.showApprovalForm = false
this.$refs.dsznfmtxInfoRef.onOpen(row)
},
onAudit(row) {
this.showApprovalForm = true
this.currentRow = row;
this.formData = {
tf_opinion: null,
tf_userSign: null,
processTaskId: row.taskId,
taskName: row.curTaskName
}
this.$refs.dsznfmtxInfoRef.onOpen(row)
},
doSearch() {
this.$nextTick(() => {
this.pageForm.pageNumber = 1
this.pageForm.totalCount = 0
this.$refs.tableListRef.doSearch()
})
},
},
created() {
}
})
</script>
<!--#
}
#-->
@@ -0,0 +1,167 @@
<!--#
layout("/layouts/platform_h5.html"){
#-->
<div id="app" v-cloak>
<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.userName"
></van-search>
<van-tabs v-model="pageForm.approvalText"
@change="(val)=>{this.pageForm.approval = val==='1';this.doSearch();}">
<van-tab title="已审核" name="1"></van-tab>
<van-tab title="未审核" name="0"></van-tab>
</van-tabs>
</van-sticky>
<table-list api="/platform/dsznfmtx/unionAudit/pageData" :page_form.sync="pageForm" ref="tableListRef"
@ready="doSearch" >
<template v-slot="{index,row}">
<table-column label="职工姓名">{{row.userName}}</table-column>
<table-column label="性别">{{row.sex}}</table-column>
<table-column label="工会">{{row.unionName}}</table-column>
<table-column label="所属单位">{{row.unitName}}</table-column>
<table-column label="退休时间">{{row.retireTime}}</table-column>
<table-column label="申请时间">{{row.applyTime}}</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="onAudit(row)">
<i class="fa fa-edit"></i>
<span>审核</span>
</div>
</template>
</table-list>
<dsznfmtx-info ref="dsznfmtxInfoRef">
<div v-if="showApprovalForm">
<div class="process-title">
分工会审核
</div>
<div class="form-container">
<van-form ref="formRef">
<van-cell-group title="审批意见">
<van-field label=""
:rules="[{ required: true,message:'请填审批意见' }]"
v-model="formData.tf_opinion"
required
type="textarea"
name="tf_opinion"
rows="4"
autosize
class="more-text"
placeholder="请填审批意见"></van-field>
</van-cell-group>
<van-cell-group title="电子签名" class="form-section">
<van-field class="more-text" name="tf_userSign" label="">
<template #input>
<h5-signature v-model="formData.tf_userSign" slot="input"></h5-signature>
</template>
</van-field>
</van-cell-group>
<!-- 按钮区域 -->
<div class="form-actions">
<van-button type="danger" @click="handleTaskAction(6)">退回到发起人</van-button>
<van-button type="danger" @click="handleTaskAction(2)">拒绝申请</van-button>
<van-button type="primary" @click="handleTaskAction(1)">同意申请</van-button>
</div>
</van-form>
</div>
</div>
</dsznfmtx-info>
</div>
<script>
<!--#include('../common/info.js'){}#-->
const vue = new Vue({
el: "#app",
store,
dicts: [],
components: {
"dsznfmtx-info":DSZNFMTX_INFO
},
data() {
return {
pageForm: {
pageNumber: 1,
pageSize: 10,
totalCount: 0,
searchKeyword: "",
approvalText: "0",
approval: false,
year: new Date().getFullYear(),
},
formData: {},
showApprovalForm: false,
infoShow: false
}
},
methods: {
handleTaskAction(val) {
this.$refs.formRef.validate().then(() => {
this.$dialog.confirm({
title: '温馨提示',
message: '您确定要提交吗?',
}).then(() => {
this.$axios.post('/flow/common/executeTask', {
data: JSON.stringify({
...this.formData,
submitType: val
})
}).then(res => {
if (res.code === 0) {
this.$toast.success("提交成功")
this.doSearch()
this.$refs.dsznfmtxInfoRef.onClose()
}
})
}).catch(() => {
// on cancel
});
}).catch();
},
onView(row) {
this.showApprovalForm = false
this.$refs.dsznfmtxInfoRef.onOpen(row)
},
onAudit(row) {
this.showApprovalForm = true
this.formData = {
tf_opinion: null,
tf_userSign: null,
processTaskId: row.taskId,
taskName: row.curTaskName
}
this.$refs.dsznfmtxInfoRef.onOpen(row)
},
doSearch() {
this.$nextTick(() => {
this.pageForm.pageNumber = 1
this.pageForm.totalCount = 0
this.$refs.tableListRef.doSearch()
})
},
},
created() {
}
})
</script>
<!--#
}
#-->
@@ -0,0 +1,465 @@
<!--#
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 z-index="999"
class="custom-nav"></van-nav-bar>
<div class="form-container">
<van-form ref="formRef">
<van-cell-group title="人员信息" class="form-section">
<van-field label="职工姓名" v-model="formData.userName" placeholder="从信息中心获取"
readonly></van-field>
<van-field label="性别" v-model="formData.sex" placeholder="从信息中心获取" readonly></van-field>
<van-field label="民族" v-model="formData.nation" placeholder="从信息中心获取" readonly></van-field>
<van-field label="出生年月" v-model="formData.birthday" placeholder="从信息中心获取"
readonly></van-field>
<van-field label="工作单位" v-model="formData.unitName" placeholder="从信息中心获取"
readonly></van-field>
<van-field label="电话" v-model="formData.mobile" placeholder="从信息中心获取" readonly></van-field>
<van-field label="爱人姓名" v-model="formData.loverName" placeholder="请输入爱人姓名" required></van-field>
<van-field
v-model="formData.loverSex"
name="loverSex"
label="性别"
readonly
placeholder="请选择性别"
@click="showLoverSexPicker = true"
clickable
required
></van-field>
<van-popup position="bottom" round v-model:show="showLoverSexPicker">
<van-picker :columns="loverSexColumns" @cancel="showLoverSexPicker = false"
@confirm="onLoverSexConfirm" show-toolbar></van-picker>
</van-popup>
<van-field
v-model="formData.loverNationName"
name="loverNationName"
label="民族"
readonly
placeholder="请选择民族"
@click="showLoverNationPicker = true"
clickable
required
></van-field>
<van-popup position="bottom" round v-model:show="showLoverNationPicker">
<van-picker :columns="loverNationColumns" @cancel="showLoverNationPicker = false"
@confirm="onLoverNationConfirm" show-toolbar></van-picker>
</van-popup>
<van-field label="出生年月"
v-model="formData.loverBirthday"
placeholder="请选择出生年月"
readonly
@click="showLoverBirthdayPicker = true"
clickable
required
></van-field>
<van-popup position="bottom" round v-model:show="showLoverBirthdayPicker">
<van-datetime-picker
type="date"
:min-date="minDate"
:max-date="maxDate"
@confirm="onLoverBirthdayConfirm"
@cancel="showLoverBirthdayPicker = false"
show-toolbar
/>
</van-popup>
<van-field label="工作单位" v-model="formData.loverUnitName" placeholder="请输入工作单位" required></van-field>
</van-cell-group>
<van-cell-group title="假期类型" class="form-section">
<van-field label="陪产假" v-model="formData.withLeave" placeholder="请输入天数" type="number"
v-if="formData.sex === '男性' || formData.sex === '男'" required></van-field>
<van-field label="育儿假" v-model="formData.parentalLeave" placeholder="请输入天数" type="number"
v-if="formData.sex === '男性' || formData.sex === '男'" required></van-field>
<van-field label="产假" v-model="formData.maternityLeave" placeholder="请输入天数" type="number"
v-if="formData.sex === '女性' || formData.sex === '女'" required></van-field>
<van-field label="延长假" v-model="formData.extendLeave" placeholder="请输入天数" type="number"
v-if="formData.sex === '女性' || formData.sex === '女'" required></van-field>
<van-field label="多胞胎" v-model="formData.birthsLeave" placeholder="请输入天数" type="number"
v-if="formData.sex === '女性' || formData.sex === '女'" required></van-field>
<van-field label="难产假" v-model="formData.difficultLeave" placeholder="请输入天数" type="number"
v-if="formData.sex === '女性' || formData.sex === '女'" required></van-field>
<van-field label="寒假" v-model="formData.winterLeave" placeholder="请输入天数"
type="number" required></van-field>
<van-field label="暑假" v-model="formData.summerLeave" placeholder="请输入天数"
type="number" required></van-field>
<van-field label="合计天数" :value="totalLeaveDays" readonly></van-field>
<van-field label="休假时间起"
v-model="formData.startTime"
placeholder="请选择休假开始时间"
readonly
@click="showStartTimePicker = true"
clickable
required
></van-field>
<van-popup position="bottom" round v-model:show="showStartTimePicker">
<van-datetime-picker
type="date"
:min-date="minDate"
:max-date="maxDate"
@confirm="onStartTimeConfirm"
@cancel="showStartTimePicker = false"
show-toolbar
/>
</van-popup>
<van-field label="休假时间止"
v-model="formData.endTime"
placeholder="请选择休假结束时间"
readonly
@click="showEndTimePicker = true"
clickable
required
></van-field>
<van-popup position="bottom" round v-model:show="showEndTimePicker">
<van-datetime-picker
type="date"
:min-date="minDate"
:max-date="maxDate"
@confirm="onEndTimeConfirm"
@cancel="showEndTimePicker = false"
show-toolbar
/>
</van-popup>
<van-field label="子女出生日"
v-model="formData.childrenBirthday"
placeholder="请选择子女出生日期"
readonly
@click="showChildrenBirthdayPicker = true"
clickable
required
></van-field>
<van-popup position="bottom" round v-model:show="showChildrenBirthdayPicker">
<van-datetime-picker
type="date"
:min-date="minDate"
:max-date="maxDate"
@confirm="onChildrenBirthdayConfirm"
@cancel="showChildrenBirthdayPicker = false"
show-toolbar
/>
</van-popup>
</van-cell-group>
<!-- 提交按钮 -->
<div class="form-actions">
<van-button plain @click="onSave" type="info">保存</van-button>
<van-button @click="onSubmit" type="primary" v-if="!taskId">提交</van-button>
<van-button @click="onSubmitAgain" type="primary" v-else>提交1</van-button>
</div>
</van-form>
</div>
</div>
<script>
new Vue({
store,
el: '#app',
dicts: ["USER_NATION"],
data() {
return {
bizId: GetQueryString("bizId"),
taskId: GetQueryString("taskId"),
formData: {},
// 民族
showLoverNationPicker: false,
loverNationColumns: [],
// 性别
showLoverSexPicker: false,
loverSexColumns: [
{ value: '男性', text: '男性' },
{ value: '女性', text: '女性' }
],
showLoverBirthdayPicker: false,
showStartTimePicker: false,
showEndTimePicker: false,
showChildrenBirthdayPicker: false,
minDate: new Date(1950, 0, 1), // 设置最小日期为2000年1月1日
maxDate: new Date(2040, 12, 31), // 设置最大日期为2030年12月31日
// 表单验证规则
formRules: {
loverName: [{ required: true, message: '请输入爱人姓名' }],
loverSex: [{ required: true, message: '请选择爱人性别' }],
loverNationName: [{ required: true, message: '请选择爱人民族' }],
loverBirthday: [{ required: true, message: '请选择爱人出生年月' }],
loverUnitName: [{ required: true, message: '请输入爱人工作单位' }],
withLeave: [{ required: true, message: '请输入陪产假天数' }],
parentalLeave: [{ required: true, message: '请输入育儿假天数' }],
maternityLeave: [{ required: true, message: '请输入产假天数' }],
extendLeave: [{ required: true, message: '请输入延长假天数' }],
birthsLeave: [{ required: true, message: '请输入多胞胎天数' }],
difficultLeave: [{ required: true, message: '请输入难产假天数' }],
winterLeave: [{ required: true, message: '请输入寒假天数' }],
summerLeave: [{ required: true, message: '请输入暑假天数' }],
startTime: [{ required: true, message: '请选择休假开始时间' }],
endTime: [{ required: true, message: '请选择休假结束时间' }],
childrenBirthday: [{ required: true, message: '请选择子女出生日期' }]
}
}
},
computed: {
totalLeaveDays() {
const fields = [
'withLeave', // 陪产假
'parentalLeave', // 育儿假
'maternityLeave', // 产假
'extendLeave', // 延长假
'birthsLeave', // 多胞胎
'difficultLeave', // 难产假
'winterLeave', // 寒假
'summerLeave' // 暑假
];
let total = 0;
fields.forEach(field => {
const value = parseFloat(this.formData[field]) || 0;
total += value;
});
// 同时更新 formData.leaveDays,以便保存到后端
this.$set(this.formData, 'leaveDays', total);
return total;
}
},
methods: {
async onSave() {
// 保存时不需要验证,直接提交数据
this.$axios.post("/platform/maternityLeave/apply/save", {data: JSON.stringify(this.formData)})
.then((res) => {
this.$toast.clear();
if (res.code === 0) {
this.$toast.success(res.msg);
pjaxReplace('/platform/maternityLeave/mine/h5')
} else {
this.$toast.fail(res.msg || '保存失败');
}
})
.catch(err => {
this.$toast.clear();
this.$toast.fail('网络错误,请稍后重试');
});
},
// 提交前进行表单验证
async validateForm() {
const errors = [];
// 根据性别确定需要验证的字段
const isMale = this.formData.sex === '男性' || this.formData.sex === '男';
const isFemale = this.formData.sex === '女性' || this.formData.sex === '女';
// 必填字段验证
if (!this.formData.loverName) {
errors.push('请输入爱人姓名');
}
if (!this.formData.loverSex) {
errors.push('请选择爱人性别');
}
if (!this.formData.loverNationName) {
errors.push('请选择爱人民族');
}
if (!this.formData.loverBirthday) {
errors.push('请选择爱人出生年月');
}
if (!this.formData.loverUnitName) {
errors.push('请输入爱人工作单位');
}
// 根据性别验证假期字段
if (isMale) {
if (!this.formData.withLeave && this.formData.withLeave !== 0) {
errors.push('请输入陪产假天数');
}
if (!this.formData.parentalLeave && this.formData.parentalLeave !== 0) {
errors.push('请输入育儿假天数');
}
}
if (isFemale) {
if (!this.formData.maternityLeave && this.formData.maternityLeave !== 0) {
errors.push('请输入产假天数');
}
if (!this.formData.extendLeave && this.formData.extendLeave !== 0) {
errors.push('请输入延长假天数');
}
if (!this.formData.birthsLeave && this.formData.birthsLeave !== 0) {
errors.push('请输入多胞胎天数');
}
if (!this.formData.difficultLeave && this.formData.difficultLeave !== 0) {
errors.push('请输入难产假天数');
}
}
// 所人性别都需要填写的字段
if (!this.formData.winterLeave && this.formData.winterLeave !== 0) {
errors.push('请输入寒假天数');
}
if (!this.formData.summerLeave && this.formData.summerLeave !== 0) {
errors.push('请输入暑假天数');
}
if (!this.formData.startTime) {
errors.push('请选择休假开始时间');
}
if (!this.formData.endTime) {
errors.push('请选择休假结束时间');
}
if (!this.formData.childrenBirthday) {
errors.push('请选择子女出生日期');
}
return errors;
},
// 提交
async onSubmit() {
// 提交时进行表单验证
const errors = await this.validateForm();
if (errors.length > 0) {
this.$toast.fail(errors[0]); // 显示第一条错误信息
return;
}
this.$axios.post('/platform/maternityLeave/apply/submit', {data: JSON.stringify(this.formData)})
.then(res => {
this.$toast.clear();
if (res.code === 0) {
this.$toast.success("提交成功");
pjaxReplace('/platform/maternityLeave/mine/h5')
} else {
this.$toast.fail(res.msg || '提交失败');
}
})
.catch(err => {
this.$toast.clear();
this.$toast.fail('网络错误,请稍后重试');
});
},
// 再次提交
async onSubmitAgain() {
// 提交时进行表单验证
const errors = await this.validateForm();
if (errors.length > 0) {
this.$toast.fail(errors[0]); // 显示第一条错误信息
return;
}
this.$axios.post('/platform/maternityLeave/apply/submitAgain', {
data: JSON.stringify(this.formData),
taskId: GetQueryString("taskId")
}).then(res => {
this.$toast.clear();
if (res.code === 0) {
this.$toast.success("提交成功");
setTimeout(() => {
pjaxReplace('/platform/maternityLeave/mine/h5')
}, 1500);
} else {
this.$toast.fail(res.msg || '提交失败');
}
}).catch(err => {
this.$toast.clear();
this.$toast.fail('网络错误,请稍后重试');
});
},
// 出生日期确认事件
onLoverBirthdayConfirm(value) {
this.$set(this.formData, "loverBirthday", this.$moment(value).format("YYYY-MM-DD"));
this.showLoverBirthdayPicker = false;
},
// 休假开始时间确认事件
onStartTimeConfirm(value) {
this.$set(this.formData, "startTime", this.$moment(value).format("YYYY-MM-DD"));
this.showStartTimePicker = false;
},
// 休假结束时间确认事件
onEndTimeConfirm(value) {
this.$set(this.formData, "endTime", this.$moment(value).format("YYYY-MM-DD"));
this.showEndTimePicker = false;
},
// 子女出生日期确认事件
onChildrenBirthdayConfirm(value) {
this.$set(this.formData, "childrenBirthday", this.$moment(value).format("YYYY-MM-DD"));
this.showChildrenBirthdayPicker = false;
},
onLoverNationConfirm(o) {
this.$set(this.formData, "loverNationName", o.text); // 显示名称
this.$set(this.formData, "loverNation", o.value); // 字典值
this.showLoverNationPicker = false;
},
// 添加性别确认方法
onLoverSexConfirm(o) {
this.$set(this.formData, "loverSex", o.text);
this.showLoverSexPicker = false;
},
async initDictOptions() {
// 民族
const loverNationData = await this.$businessTool.getDictOptions('USER_NATION')
this.loverNationColumns = loverNationData.map(item => {
return {value: item.code, text: item.name}
})
},
init() {
this.bizId = GetQueryString("bizId")
if (this.bizId) {
this.$axios.post("/platform/maternityLeave/apply/findOne", {id: this.bizId}).then((res) => {
if (res.code === 0) {
// 先保存原始数据
const originalData = {...res.data};
this.formData = res.data;
// 处理支付方式显示
if (this.loverNationColumns.length > 0) {
const matched = this.loverNationColumns.find(item =>
item.value === originalData.loverNation
)
if (matched) {
this.$set(this.formData, "loverNationName", matched.text)
this.$set(this.formData, "loverNation", matched.value)
}
}
}
})
} else {
const user = this.$store.state.user
this.$set(this.formData, "userId", user.id)
this.$set(this.formData, "userName", user.username)
this.$set(this.formData, "loginName", user.loginname)
this.$set(this.formData, "unitId", user.unitId)
this.$set(this.formData, "unitName", user.unit.name)
this.$set(this.formData, "unionId", user.union.id)
this.$set(this.formData, "unionName", user.union.name)
this.$set(this.formData, "sex", user.sex)
this.$set(this.formData, "nation", user.nation)
this.$set(this.formData, "birthday", user.birthday)
this.$set(this.formData, "mobile", user.mobile)
}
}
},
async created() {
await this.initDictOptions();
await this.init();
}
})
</script>
<!--#
}
#-->
@@ -0,0 +1,127 @@
<!--#
layout("/layouts/platform_h5.html"){
#-->
<div id="app" v-cloak>
<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-search
:reverse-color="false"
:show-action="false"
@search="doSearch"
input-align="left"
placeholder="请输入职工姓名搜索"
v-model="pageForm.userName"
></van-search>
</van-sticky>
<table-list api="/platform/maternityLeave/collect/pageData" :page_form.sync="pageForm" ref="tableListRef"
@ready="doSearch" >
<template v-slot="{index,row}">
<table-column label="职工姓名">{{row.userName}}</table-column>
<table-column label="性别">{{row.sex}}</table-column>
<table-column label="工会">{{row.unionName}}</table-column>
<table-column label="所属单位">{{row.unitName}}</table-column>
<table-column label="休假天数">{{row.leaveDays}}</table-column>
<table-column label="申请时间">{{row.applyTime}}</table-column>
<table-column label="当前节点">{{row.taskName}}</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 delete" @click="onDelete(row)" v-if="$auth.hasRole('SYSADMIN')">
<i class="fa fa-trash"></i>
<span>删除</span>
</div>
</template>
</table-list>
<maternity-leave-info ref="maternityLeaveInfoRef"></maternity-leave-info>
</div>
<script>
<!--#include('../common/info.js'){}#-->
const vue = new Vue({
el: "#app",
store,
dicts: [],
components: {
"maternity-leave-info":MATERNITY_LEAVE_INFO
},
data() {
return {
viewShow: false,
yearList: [],
pageForm: {
pageNumber: 1,
pageSize: 10,
totalCount: 0,
searchKeyword: "",
year: "",
},
infoShow: false
}
},
methods: {
onView(row) {
this.showApprovalForm = false
this.$refs.maternityLeaveInfoRef.onOpen(row)
},
onRevoke(row){
this.$dialog
.confirm({
title: "提示",
message: "您确定要撤销申请吗?"
})
.then(() => {
this.$axios.post("/flow/common/revokeTask", {taskId: row.startTaskId}).then((resp) => {
this.$toast.success(resp.msg)
this.doSearch()
})
})
},
onDelete(row) {
this.$dialog
.confirm({
title: "提示",
message: "您确定要删除吗?"
})
.then(() => {
this.$axios.post("/platform/maternityLeave/mine/delete", {id: row.id}).then((resp) => {
if (resp.code === 0) {
this.$toast.success(resp.msg)
this.doSearch()
}
})
})
},
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)
},
},
created() {
this.initData()
}
})
</script>
<!--#
}
#-->
@@ -0,0 +1,125 @@
const MATERNITY_LEAVE_INFO = {
template:
/*language=HTML*/`
<van-action-sheet v-model="visible" title="查看详情">
<div class="detail-container">
<van-cell-group title="人员信息">
<van-cell title="职工姓名">{{ viewData.userName }}</van-cell>
<van-cell title="性别">{{ viewData.sex }}</van-cell>
<van-cell title="民族">{{ viewData.nation }}</van-cell>
<van-cell title="出生年月">{{ viewData.birthday }}</van-cell>
<van-cell title="单位">{{ viewData.unitName }}</van-cell>
<van-cell title="电话">{{ viewData.mobile }}</van-cell>
<van-cell title="爱人姓名">{{ viewData.loverName }}</van-cell>
<van-cell title="性别">{{ viewData.loverSex }}</van-cell>
<van-cell title="民族">{{ viewData.loverNation }}</van-cell>
<van-cell title="出生年月">{{ viewData.loverBirthday }}</van-cell>
<van-cell title="单位">{{ viewData.loverUnitName }}</van-cell>
</van-cell-group>
<van-cell-group title="假期类型">
<van-cell title="陪产假" v-if="viewData.sex === '男性' || viewData.sex === '男'">{{ viewData.withLeave }}</van-cell>
<van-cell title="育儿假" v-if="viewData.sex === '男性' || viewData.sex === '男'">{{ viewData.parentalLeave }}</van-cell>
<van-cell title="产假" v-if="viewData.sex === '女性' || viewData.sex === '女'">{{ viewData.maternityLeave }}</van-cell>
<van-cell title="延长假" v-if="viewData.sex === '女性' || viewData.sex === '女'">{{ viewData.extendLeave }}</van-cell>
<van-cell title="多胞胎" v-if="viewData.sex === '女性' || viewData.sex === '女'">{{ viewData.birthsLeave }}</van-cell>
<van-cell title="难产假" v-if="viewData.sex === '女性' || viewData.sex === '女'">{{ viewData.difficultLeave }}</van-cell>
<van-cell title="寒假">{{ viewData.winterLeave }}</van-cell>
<van-cell title="暑假">{{ viewData.summerLeave }}</van-cell>
<van-cell title="合计">{{ viewData.leaveDays }}</van-cell>
<van-cell title="休假时间起">{{ viewData.startTime }}</van-cell>
<van-cell title="休假时间止">{{ viewData.endTime }}</van-cell>
<van-cell title="子女出生日">{{ viewData.childrenBirthday }}</van-cell>
</van-cell-group>
<template v-for="(task,index) in doneTasks">
<div class="process-title">
{{ task.displayName }}
</div>
<van-cell-group 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 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.PROCESS_TASK_SUBMIT_TYPE"
:value="task.ext.submitType"></dict-tag>
</van-cell>
<van-cell title="办理意见" v-if="!task.ext.isFirstTaskNode">
<template #label>
{{
task.taskFormData.opinion
}}
</template>
</van-cell>
<van-cell title="签字" v-if="!task.ext.isFirstTaskNode">
<van-image :src="task.ext.tf_userSign"
v-if="task.ext.tf_userSign"
class="signature-image"></van-image>
</van-cell>
</van-cell-group>
</template>
</div>
<slot></slot>
</van-action-sheet>
`,
dicts: ["PROCESS_TASK_SUBMIT_TYPE"],
data() {
return {
visible:false,
viewData: {},
doneTasks: [],
row: null,
}
},
methods: {
onOpen(row) {
this.row = row
this.visible = true
this.getInfo()
this.getDoneTasks()
},
// 关闭
onClose(){
this.visible = false
},
// 获取申请信息
getInfo() {
this.$axios.post("/platform/maternityLeave/apply/findOne", {id: this.row.id}).then((res) => {
if (res.code === 0) {
this.viewData = res.data
}
})
},
// 查看
openView(id) {
this.$nextTick(() => {
this.$refs.infoDialogRef.onOpen(id)
})
},
// 获取已办任务审批记录
getDoneTasks() {
this.$axios.post("/flow/common/doneTasks", {bizId: this.row.id}).then((res) => {
if (res.code === 0) {
this.doneTasks = res.data
}
})
},
},
}
@@ -0,0 +1,133 @@
<!--#
layout("/layouts/platform_h5.html"){
#-->
<div id="app" v-cloak>
<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/maternityLeave/mine/pageData" :page_form.sync="pageForm" ref="tableListRef"
@ready="doSearch" >
<template v-slot="{index,row}">
<table-column label="职工姓名">{{row.userName}}</table-column>
<table-column label="性别">{{row.sex}}</table-column>
<table-column label="工会">{{row.unionName}}</table-column>
<table-column label="所属单位">{{row.unitName}}</table-column>
<table-column label="休假天数">{{row.leaveDays}}</table-column>
<table-column label="申请时间">{{row.applyTime}}</table-column>
<table-column label="当前节点">{{row.taskName}}</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)" v-if="row.taskKey === 'startTask' || !row.instanceId">
<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" @click="onDelete(row)" v-if="row.taskKey === 'startTask' || !row.instanceId">
<i class="fa fa-trash"></i>
<span>删除</span>
</div>
</template>
</table-list>
<maternity-leave-info ref="maternityLeaveInfoRef"></maternity-leave-info>
</div>
<script>
<!--#include('../common/info.js'){}#-->
const vue = new Vue({
el: "#app",
store,
dicts: [],
components: {
"maternity-leave-info":MATERNITY_LEAVE_INFO
},
data() {
return {
viewShow: false,
yearList: [],
pageForm: {
pageNumber: 1,
pageSize: 10,
totalCount: 0,
searchKeyword: "",
year: "",
},
infoShow: false
}
},
methods: {
onView(row) {
this.showApprovalForm = false
this.$refs.maternityLeaveInfoRef.onOpen(row)
},
onEdit(row) {
this.$pjaxReplace('/platform/maternityLeave/apply/h5?taskId=' + (row.startTaskId || '') + "&bizId=" + row.id)
},
onRevoke(row){
this.$dialog
.confirm({
title: "提示",
message: "您确定要撤销申请吗?"
})
.then(() => {
this.$axios.post("/flow/common/revokeTask", {taskId: row.startTaskId}).then((resp) => {
this.$toast.success(resp.msg)
this.doSearch()
})
})
},
onDelete(row) {
this.$dialog
.confirm({
title: "提示",
message: "您确定要删除吗?"
})
.then(() => {
this.$axios.post("/platform/maternityLeave/mine/delete", {id: row.id}).then((resp) => {
if (resp.code === 0) {
this.$toast.success(resp.msg)
this.doSearch()
}
})
})
},
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)
},
},
created() {
this.initData()
}
})
</script>
<!--#
}
#-->
@@ -0,0 +1,167 @@
<!--#
layout("/layouts/platform_h5.html"){
#-->
<div id="app" v-cloak>
<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.userName"
></van-search>
<van-tabs v-model="pageForm.approvalText"
@change="(val)=>{this.pageForm.approval = val==='1';this.doSearch();}">
<van-tab title="已审核" name="1"></van-tab>
<van-tab title="未审核" name="0"></van-tab>
</van-tabs>
</van-sticky>
<table-list api="/platform/maternityLeave/schoolAudit/pageData" :page_form.sync="pageForm" ref="tableListRef"
@ready="doSearch" >
<template v-slot="{index,row}">
<table-column label="职工姓名">{{row.userName}}</table-column>
<table-column label="性别">{{row.sex}}</table-column>
<table-column label="工会">{{row.unionName}}</table-column>
<table-column label="所属单位">{{row.unitName}}</table-column>
<table-column label="休假天数">{{row.leaveDays}}</table-column>
<table-column label="申请时间">{{row.applyTime}}</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="onAudit(row)">
<i class="fa fa-edit"></i>
<span>审核</span>
</div>
</template>
</table-list>
<maternity-leave-info ref="maternityLeaveInfoRef">
<div v-if="showApprovalForm">
<div class="process-title">
校工会审核
</div>
<div class="form-container">
<van-form ref="formRef">
<van-cell-group title="审批意见">
<van-field label=""
:rules="[{ required: true,message:'请填审批意见' }]"
v-model="formData.tf_opinion"
required
type="textarea"
name="tf_opinion"
rows="4"
autosize
class="more-text"
placeholder="请填审批意见"></van-field>
</van-cell-group>
<van-cell-group title="电子签名" class="form-section">
<van-field class="more-text" name="tf_userSign" label="">
<template #input>
<h5-signature v-model="formData.tf_userSign" slot="input"></h5-signature>
</template>
</van-field>
</van-cell-group>
<!-- 按钮区域 -->
<div class="form-actions">
<van-button type="danger" @click="handleTaskAction(6)">退回到发起人</van-button>
<van-button type="danger" @click="handleTaskAction(2)">拒绝申请</van-button>
<van-button type="primary" @click="handleTaskAction(1)">同意申请</van-button>
</div>
</van-form>
</div>
</div>
</maternity-leave-info>
</div>
<script>
<!--#include('../common/info.js'){}#-->
const vue = new Vue({
el: "#app",
store,
dicts: [],
components: {
"maternity-leave-info":MATERNITY_LEAVE_INFO
},
data() {
return {
pageForm: {
pageNumber: 1,
pageSize: 10,
totalCount: 0,
searchKeyword: "",
approvalText: "0",
approval: false,
year: new Date().getFullYear(),
},
formData: {},
showApprovalForm: false,
infoShow: false
}
},
methods: {
handleTaskAction(val) {
this.$refs.formRef.validate().then(() => {
this.$dialog.confirm({
title: '温馨提示',
message: '您确定要提交吗?',
}).then(() => {
this.$axios.post('/flow/common/executeTask', {
data: JSON.stringify({
...this.formData,
submitType: val
})
}).then(res => {
if (res.code === 0) {
this.$toast.success("提交成功")
this.doSearch()
this.$refs.maternityLeaveInfoRef.onClose()
}
})
}).catch(() => {
// on cancel
});
}).catch();
},
onView(row) {
this.showApprovalForm = false
this.$refs.maternityLeaveInfoRef.onOpen(row)
},
onAudit(row) {
this.showApprovalForm = true
this.formData = {
tf_opinion: null,
tf_userSign: null,
processTaskId: row.taskId,
taskName: row.curTaskName
}
this.$refs.maternityLeaveInfoRef.onOpen(row)
},
doSearch() {
this.$nextTick(() => {
this.pageForm.pageNumber = 1
this.pageForm.totalCount = 0
this.$refs.tableListRef.doSearch()
})
},
},
created() {
}
})
</script>
<!--#
}
#-->
@@ -0,0 +1,167 @@
<!--#
layout("/layouts/platform_h5.html"){
#-->
<div id="app" v-cloak>
<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.userName"
></van-search>
<van-tabs v-model="pageForm.approvalText"
@change="(val)=>{this.pageForm.approval = val==='1';this.doSearch();}">
<van-tab title="已审核" name="1"></van-tab>
<van-tab title="未审核" name="0"></van-tab>
</van-tabs>
</van-sticky>
<table-list api="/platform/maternityLeave/unionAudit/pageData" :page_form.sync="pageForm" ref="tableListRef"
@ready="doSearch" >
<template v-slot="{index,row}">
<table-column label="职工姓名">{{row.userName}}</table-column>
<table-column label="性别">{{row.sex}}</table-column>
<table-column label="工会">{{row.unionName}}</table-column>
<table-column label="所属单位">{{row.unitName}}</table-column>
<table-column label="休假天数">{{row.leaveDays}}</table-column>
<table-column label="申请时间">{{row.applyTime}}</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="onAudit(row)">
<i class="fa fa-edit"></i>
<span>审核</span>
</div>
</template>
</table-list>
<maternity-leave-info ref="maternityLeaveInfoRef">
<div v-if="showApprovalForm">
<div class="process-title">
分工会审核
</div>
<div class="form-container">
<van-form ref="formRef">
<van-cell-group title="审批意见">
<van-field label=""
:rules="[{ required: true,message:'请填审批意见' }]"
v-model="formData.tf_opinion"
required
type="textarea"
name="tf_opinion"
rows="4"
autosize
class="more-text"
placeholder="请填审批意见"></van-field>
</van-cell-group>
<van-cell-group title="电子签名" class="form-section">
<van-field class="more-text" name="tf_userSign" label="">
<template #input>
<h5-signature v-model="formData.tf_userSign" slot="input"></h5-signature>
</template>
</van-field>
</van-cell-group>
<!-- 按钮区域 -->
<div class="form-actions">
<van-button type="danger" @click="handleTaskAction(6)">退回到发起人</van-button>
<van-button type="danger" @click="handleTaskAction(2)">拒绝申请</van-button>
<van-button type="primary" @click="handleTaskAction(1)">同意申请</van-button>
</div>
</van-form>
</div>
</div>
</maternity-leave-info>
</div>
<script>
<!--#include('../common/info.js'){}#-->
const vue = new Vue({
el: "#app",
store,
dicts: [],
components: {
"maternity-leave-info":MATERNITY_LEAVE_INFO
},
data() {
return {
pageForm: {
pageNumber: 1,
pageSize: 10,
totalCount: 0,
searchKeyword: "",
approvalText: "0",
approval: false,
year: new Date().getFullYear(),
},
formData: {},
showApprovalForm: false,
infoShow: false
}
},
methods: {
handleTaskAction(val) {
this.$refs.formRef.validate().then(() => {
this.$dialog.confirm({
title: '温馨提示',
message: '您确定要提交吗?',
}).then(() => {
this.$axios.post('/flow/common/executeTask', {
data: JSON.stringify({
...this.formData,
submitType: val
})
}).then(res => {
if (res.code === 0) {
this.$toast.success("提交成功")
this.doSearch()
this.$refs.maternityLeaveInfoRef.onClose()
}
})
}).catch(() => {
// on cancel
});
}).catch();
},
onView(row) {
this.showApprovalForm = false
this.$refs.maternityLeaveInfoRef.onOpen(row)
},
onAudit(row) {
this.showApprovalForm = true
this.formData = {
tf_opinion: null,
tf_userSign: null,
processTaskId: row.taskId,
taskName: row.curTaskName
}
this.$refs.maternityLeaveInfoRef.onOpen(row)
},
doSearch() {
this.$nextTick(() => {
this.pageForm.pageNumber = 1
this.pageForm.totalCount = 0
this.$refs.tableListRef.doSearch()
})
},
},
created() {
}
})
</script>
<!--#
}
#-->