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,523 @@
<!--#
layout("/layouts/platform_h5.html"){
#-->
<style scoped>
.search-dialog {
height: 80%;
}
</style>
<div id="app">
<!-- 导航栏 -->
<van-nav-bar title="职工慰问申请" left-text="返回" left-arrow @click-left="historyBack" fixed placeholder></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.applyUserName" readonly
required name="applyUserName"></van-field>
<van-field label="申请人工号" :rules="[{ required: true }]" v-model="formData.applyLoginName" readonly
required name="applyLoginName"></van-field>
<van-field label="申请人单位" :rules="[{ required: true }]" v-model="formData.applyUnitName" readonly
required name="applyUnitName"></van-field>
<van-field label="申请人工会" :rules="[{ required: true }]" v-model="formData.applyUnionName" readonly
required name="applyUnionName"></van-field>
<van-field
v-model="formData.helpUserName"
name="helpUserName"
label="慰问对象"
required
readonly
:rules="[{ required: true }]"
placeholder="请点击选择慰问对象"
@click="helpUserSelectShow = true"
is-link
></van-field>
<van-action-sheet v-model="helpUserSelectShow" title="慰问对象" class="height100">
<van-search
v-model="searchKeyword"
:show-action="false"
:reverse-color="false"
input-align="left"
placeholder="请输入工号或姓名选择慰问对象"
@input="(val) => {userRemoteMethod(val, 'help')}"
@clear="(val) => {userRemoteMethod(val, 'help')}"
shape="round"
></van-search>
<div class="van-action-sheet__content mt5" v-if="userOptions && userOptions.length>0">
<template>
<template v-for="item in userOptions">
<van-button native-type="button" @click="helpUserChange(item)" class="van-action-sheet__item van-hairline--bottom">
<span class="van-action-sheet__name">{{item.userName}}{{item.loginName}}</span>
</van-button>
</template>
</template>
</div>
<van-empty description="暂无数据" v-else></van-empty>
</van-action-sheet>
<van-field
v-model="formData.handlerUserName"
name="handlerUserName"
label="经办人"
required
readonly
:rules="[{ required: true }]"
placeholder="请点击选择经办人"
@click="handlerUserSelectShow = true"
is-link
></van-field>
<van-action-sheet v-model="handlerUserSelectShow" title="经办人" class="height100">
<van-search
v-model="searchKeyword"
:show-action="false"
:reverse-color="false"
input-align="left"
placeholder="请输入工号或姓名选择经办人"
@input="(val) => {userRemoteMethod(val, 'handler')}"
@clear="(val) => {userRemoteMethod(val, 'handler')}"
shape="round"
></van-search>
<div class="van-action-sheet__content mt5" v-if="userOptions && userOptions.length>0">
<template>
<template v-for="item in userOptions">
<van-button native-type="button" @click="handlerUserChange(item)" class="van-action-sheet__item van-hairline--bottom">
<span class="van-action-sheet__name">{{item.userName}}{{item.loginName}}</span>
</van-button>
</template>
</template>
</div>
<van-empty description="暂无数据" v-else></van-empty>
</van-action-sheet>
<van-field
v-model="formData.certifierUserName"
name="certifierUserName"
label="证明人"
required
readonly
:rules="[{ required: true }]"
placeholder="请点击选择证明人"
@click="certifierUserSelectShow = true"
is-link
></van-field>
<van-action-sheet v-model="certifierUserSelectShow" title="证明人" class="height100">
<van-search
v-model="searchKeyword"
:show-action="false"
:reverse-color="false"
input-align="left"
placeholder="请输入工号或姓名选择证明人"
@input="(val) => {userRemoteMethod(val, 'certifier')}"
@clear="(val) => {userRemoteMethod(val, 'certifier')}"
shape="round"
></van-search>
<div class="van-action-sheet__content mt5" v-if="userOptions && userOptions.length>0">
<template>
<template v-for="item in userOptions">
<van-button native-type="button" @click="certifierUserChange(item)" class="van-action-sheet__item van-hairline--bottom">
<span class="van-action-sheet__name">{{item.userName}}{{item.loginName}}</span>
</van-button>
</template>
</template>
</div>
<van-empty description="暂无数据" v-else></van-empty>
</van-action-sheet>
<van-field
v-model="formData.typeName"
name="typeName"
label="慰问类型"
required
readonly
:rules="[{ required: true }]"
placeholder="请点击选择慰问类型"
@click="showTypePicker = true"
clickable
is-link
></van-field>
<van-popup position="bottom" round v-model:show="showTypePicker">
<van-picker :columns="typeColumns" @cancel="showTypePicker = false" @confirm="onTypeConfirm" show-toolbar></van-picker>
</van-popup>
<!--<van-field
v-model="formData.way"
name="way"
label="慰问方式"
required
readonly
:rules="[{ required: true }]"
placeholder="请选择慰问类型"
clickable
></van-field>-->
<van-field
v-model="formData.money"
name="money"
label="慰问金额"
required
:rules="[{ required: true }]"
placeholder="选择慰问类型自动匹配金额"
clickable
type="number"
></van-field>
<van-field
v-model="formData.occurTime"
name="occurTime"
label="慰问时间"
required
:rules="[{ required: true }]"
placeholder="请点击选择慰问时间"
clickable
is-link
readonly
@click="showTimePicker = true"
></van-field>
<van-popup position="bottom" round v-model:show="showTimePicker">
<van-datetime-picker
v-model="formData.occurTime"
type="date"
title="请选择慰问时间"
@confirm="(val) => {formData.occurTime = $moment(val).format('YYYY-MM-DD'); showTimePicker = false}"
@cancel="showTimePicker = false"
></van-datetime-picker>
</van-popup>
<van-field
v-model="formData.bankCardNum"
label="收款账户"
maxlength="20"
clearable
name="bankCardNum"
placeholder="请填写收款账户"
:rules="[{ required: true }]"
required
></van-field>
<van-field
v-model="formData.bankUserName"
label="户名"
type="number"
placeholder="请填写户名"
:rules="[{ required: true }]"
required
name="bankUserName"
></van-field>
<van-field
v-model="formData.bankOfDeposit"
label="开户行"
type="number"
placeholder="请填写开户行"
:rules="[{ required: true }]"
required
name="bankOfDeposit"
></van-field>
<!-- <van-field
v-if="['2'].includes(formData.typeCode)"
v-model="formData.child"
name="child"
label="孩次"
required
:rules="[{ required: true }]"
placeholder="请点击选择孩次"
clickable
is-link
readonly
@click="showChildPicker = true"
></van-field>
<van-popup position="bottom" round v-model:show="showChildPicker">
<van-picker
title="请选择孩次"
show-toolbar
:columns="['一孩', '二孩', '三孩']"
@confirm="(val) => {formData.child = val; showChildPicker = false}"
@cancel="showChildPicker = false"
></van-picker>
</van-popup>-->
<template v-if="['2'].includes(formData.typeCode)">
<van-field
v-model="formData.hospitalizationTime"
name="hospitalizationTime"
label="入院时间"
required
:rules="[{ required: true }]"
placeholder="请点击选择入院时间"
clickable
is-link
readonly
@click="showHospitalizationTimePicker = true"
></van-field>
<van-popup position="bottom" round v-model:show="showHospitalizationTimePicker">
<van-datetime-picker
v-model="formData.hospitalizationTime"
type="date"
:min-date="minDate"
:max-date="maxDate"
title="请选择入院时间"
@confirm="(val) => {formData.hospitalizationTime = $moment(val).format('YYYY-MM-DD'); showHospitalizationTimePicker = false}"
@cancel="showHospitalizationTimePicker = false"
></van-datetime-picker>
</van-popup>
</template>
<van-field
v-model="formData.remark"
name="remark"
label="申请事由"
type="textarea"
rows="4"
autosize
placeholder="请输入申请事由"
:rules="[{ required: true }]"
required
></van-field>
</van-cell-group>
<van-cell-group class="form-section" v-if="chooseType.isUploadFile === true">
<template #title>
<span>附件</span>
<span v-if="chooseType.isUploadFile && chooseType.uploadFileDesc" style="color: orangered">
{{ '(附件说明:' + chooseType.uploadFileDesc + '' }}
</span>
</template>
<van-field class="direction-column-field" name="avatar" label="">
<template #input>
<h5-file-upload
slot="input"
:value.sync="formData.files"
:upload_number="5"
upload_result_category="array"
complete_result
></h5-file-upload>
</template>
</van-field>
</van-cell-group>
<van-cell-group title="签字" class="form-section">
<van-field class="direction-column-field" name="signature" label="">
<template #input>
<h5-signature v-model="formData.signature" slot="input"></h5-signature>
</template>
</van-field>
</van-cell-group>
<!-- 提交按钮 -->
<div class="form-actions">
<van-button native-type="button" @click="onSave" round type="info" plain>保存申请</van-button>
<van-button @click="onSubmit" round type="info" v-if="!taskId">提交申请</van-button>
<van-button @click="onFinishTask" round type="info" v-else>提交申请</van-button>
</div>
</van-form>
</div>
<script nonce="${cspNonce!}">
const vue = new Vue({
el: "#app",
store,
components: {},
data() {
return {
bizId: GetQueryString("bizId"),
taskId: GetQueryString("taskId"),
formData: {},
chooseType: {},
userOptions: [],
typeOptions: [],
helpUserSelectShow: false,
payUserSelectShow: false,
showTypePicker: false,
typeColumns: [],
searchKeyword: '',
showTimePicker: false,
showChildPicker: false,
showFamilyPicker: false,
certifierUserSelectShow:false,
handlerUserSelectShow:false,
showHospitalizationTimePicker:false,
minDate: new Date(2024, 0, 1),
maxDate: new Date(),
}
},
methods: {
//经办人
handlerUserChange(user){
const { id, userName, loginName, unitId, unitName, unionId, unionName } = user
this.$set(this.formData, "handlerUserId", id)
this.$set(this.formData, "handlerUserName", userName)
this.$set(this.formData, "handlerLoginName", loginName)
this.$set(this.formData, "handlerUnitId", unitId)
this.$set(this.formData, "handlerUnitName", unitName)
this.$set(this.formData, "handlerUnionId", unionId)
this.$set(this.formData, "handlerUnionName", unionName)
this.handlerUserSelectShow = false
this.searchKeyword = ''
this.userOptions = []
},
//证明人
certifierUserChange(user){
const { id, userName, loginName, unitId, unitName, unionId, unionName } = user
this.$set(this.formData, "certifierUserId", id)
this.$set(this.formData, "certifierUserName", userName)
this.$set(this.formData, "certifierLoginName", loginName)
this.$set(this.formData, "certifierUnitId", unitId)
this.$set(this.formData, "certifierUnitName", unitName)
this.$set(this.formData, "certifierUnionId", unionId)
this.$set(this.formData, "certifierUnionName", unionName)
this.certifierUserSelectShow = false
this.searchKeyword = ''
this.userOptions = []
},
async userRemoteMethod(event, type) {
if (event) {
this.userOptions = await this.selectQueryUser(event)
if (type === 'help'){
this.helpUserSelectShow = true
}else if (type === 'certifier'){
this.certifierUserSelectShow = true
}else if (type === 'handler'){
this.handlerUserSelectShow = true
}
}
},
async selectQueryUser(keyword) {
const res = await this.$axios.post("/platform/condolence/apply/listUser", { keyword: keyword })
return res.data
},
helpUserChange(user) {
const { id, userName, loginName, unitId, unitName, unionId, unionName } = user
this.$set(this.formData, "helpUserId", id)
this.$set(this.formData, "helpUserName", userName)
this.$set(this.formData, "helpLoginName", loginName)
this.$set(this.formData, "helpUnitId", unitId)
this.$set(this.formData, "helpUnitName", unitName)
this.$set(this.formData, "helpUnionId", unionId)
this.$set(this.formData, "helpUnionName", unionName)
this.helpUserSelectShow = false
this.searchKeyword = ''
this.userOptions = []
},
payUserChange(user) {
const { id, userName, loginName } = user
this.$set(this.formData, "payUserId", id)
this.$set(this.formData, "payUserName", userName)
this.$set(this.formData, "payLoginName", loginName)
this.payUserSelectShow = false
this.searchKeyword = ''
this.userOptions = []
},
typeChange(id) {
this.chooseType = this.typeOptions.find(o => o.id === id)
if (this.chooseType) {
this.$set(this.formData, "money", this.chooseType.money)
this.$set(this.formData, "way", this.chooseType.way)
this.$set(this.formData, "typeCode", this.chooseType.code)
}
},
onTypeConfirm(o) {
this.$set(this.formData, "typeName", o.text)
this.$set(this.formData, "type", o.value)
this.typeChange(o.value)
this.showTypePicker = false
},
onSave() {
this.$dialog.confirm({
title: "提示",
message: "您确定保存吗?"
}).then(() => {
this.$axios.post("/platform/condolence/apply/save", { data: JSON.stringify(this.formData) }).then(res => {
if (res.code === 0) {
this.$toast(res.msg)
this.$pjaxReplace("/platform/condolence/mine/h5")
}
})
})
},
async onSubmit() {
this.$refs.formRef.validate().then(() => {
this.$dialog.confirm({
title: "提示",
message: "您确定要提交申请吗?"
}).then(() => {
this.$axios.post("/platform/condolence/apply/submit", { data: JSON.stringify(this.formData) }).then(res => {
if (res.code === 0) {
this.$toast(res.msg)
this.$pjaxReplace("/platform/condolence/mine/h5")
}
})
})
})
},
async onFinishTask() {
this.$refs.formRef.validate().then(() => {
this.$dialog.confirm({
title: "提示",
message: "您确定要提交申请吗?"
}).then(() => {
this.$axios.post("/platform/condolence/apply/submitAgain", {
data: JSON.stringify(this.formData),
taskId: GetQueryString("taskId")
}).then(res => {
if (res.code === 0) {
this.$toast(res.msg)
this.$pjaxReplace("/platform/condolence/mine/h5")
}
})
})
})
},
init() {
if (this.bizId) {
this.$axios.post("/platform/condolence/mine/info", { id: this.bizId }).then((res) => {
if (res.code === 0) {
this.formData = res.data
this.selectQueryUser(this.formData.helpLoginName, this.helpUserOptions)
this.selectQueryUser(this.formData.payLoginName, this.payUserOptions)
this.chooseType = this.typeOptions.find(o => o.id === this.formData.type)
}
})
} else {
const { username, loginname, id, unit, union, mobile } = this.$store.state.user
this.formData = {
applyUserName: username,
applyLoginName: loginname,
applyUserId: id,
applyUnitId: unit?.id,
applyUnitName: unit?.name,
applyUnionId: union?.id,
applyUnionName: union?.name,
}
}
},
queryCondolenceType() {
this.$axios.post('/platform/condolence/type/queryCondolenceType')
.then((res) => {
this.typeOptions = JSON.parse(JSON.stringify(res.data))
res.data.forEach((v) => {
this.typeColumns.push({ value: v.id, text: v.name + "(" + v.code + ")" })
})
})
},
},
created() {
this.queryCondolenceType()
this.init()
}
})
</script>
<!--#
}
#-->
@@ -0,0 +1,190 @@
<!--#
layout("/layouts/platform_h5.html"){
#-->
<style scoped>
</style>
<div id="app">
<van-nav-bar title="分工会审核" left-text="返回" left-arrow @click-left="historyBack" fixed placeholder></van-nav-bar>
<van-sticky offset-top="46px">
<van-search
v-model="pageForm.searchKeyword"
:show-action="false"
:reverse-color="false"
input-align="left"
placeholder="请输入姓名或者工号搜索"
@search="doSearch"
></van-search>
<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.type" :options="typeOptions" :multiple="false"
@change="doSearch"></van-dropdown-item>
</van-dropdown-menu>
<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/condolence/branchUnionApproval/pageData" :page_form.sync="pageForm" ref="tableListRef" @ready="onReady">
<template v-slot="{index,row}">
<table-column label="慰问对象">{{row.helpUserName}}</table-column>
<table-column label="慰问对象工号">{{row.helpLoginName}}</table-column>
<table-column label="申请人">{{row.applyUserName}}</table-column>
<table-column label="所属工会">{{row.applyUnionName}}</table-column>
<table-column label="所属单位">{{row.applyUnitName}}</table-column>
<table-column label="慰问类型">{{row.typeName}}</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-edit"></i>
<span>审核</span>
</div>
<div class="action-btn delete" v-if="row.canRevoke" @click="onRevoke(row)">
<i class="fa fa-reply"></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(20)">不同意</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,
components: {
info: condolenceInfo
},
data() {
return {
pageForm: {
pageNumber: 1,
pageSize: 10,
totalCount: 0,
searchKeyword: '',
approvalText: "0",
approval: false,
year: new Date().getFullYear(),
type: null,
},
typeOptions: [],
formData: {},
showApprovalForm: false
}
},
methods: {
async onReady() {
const typeList = await this.queryCondolenceType()
this.typeOptions = [
{
text: "全部慰问类型",
value: null
}
].concat(typeList.map((v) => ({ text: v.name, value: v.id })))
if (this.typeOptions.length > 0) {
this.pageForm.type = this.typeOptions[0].value
this.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) {
try {
await this.$refs.formRef.validate();
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.$refs.infoRef.onClose()
this.$toast.success(res.msg)
this.doSearch()
}
})
}).catch(() => {
})
} catch (error) {
}
},
onRevoke(row){
this.$dialog.confirm({
title: "提示",
message: "您确定要撤回吗?"
}).then(() => {
this.$axios.post("/flow/common/revokeTask", {taskId: row.taskId}).then((res) => {
if (res.code === 0) {
this.$toast.success(res.msg)
this.doSearch()
}
})
})
},
async queryCondolenceType() {
const res = await this.$axios.post('/platform/condolence/type/queryCondolenceType')
return res.data
},
doSearch() {
this.$nextTick(() => {
this.pageForm.pageNumber = 1
this.pageForm.totalCount = 0
this.$refs.tableListRef.doSearch()
})
}
},
})
</script>
<!--#
}
#-->
@@ -0,0 +1,99 @@
const condolenceInfo = {
template:
/*language=HTML*/
`
<van-action-sheet v-model="visible" title="查看详情">
<div class="detail-container">
<van-cell-group title="基本信息">
<van-cell title="申请人姓名">{{ viewData.applyUserName }}</van-cell>
<van-cell title="申请人工号">{{ viewData.applyLoginName }}</van-cell>
<van-cell title="申请人单位">{{ viewData.applyUnitName }}</van-cell>
<van-cell title="申请人工会">{{ viewData.applyUnionName }}</van-cell>
<van-cell title="慰问对象">{{ viewData.helpUserName }}</van-cell>
<van-cell title="收款人">{{ viewData.payUserName }}</van-cell>
<van-cell title="慰问类型">{{ viewData.typeName }}</van-cell>
<van-cell title="慰问方式">{{ viewData.way }}</van-cell>
<van-cell title="慰问金额">{{ viewData.money }}</van-cell>
<van-cell title="慰问时间">{{ viewData.occurTime }}</van-cell>
<van-cell v-if="['2'].includes(viewData.type)" title="孩次">{{ viewData.child }}</van-cell>
<van-cell v-if="['3','4'].includes(viewData.type)" title="治疗医院">{{ viewData.hospital }}</van-cell>
<van-cell v-if="['3','4'].includes(viewData.type)" title="病房号">{{ viewData.hospitalHouseNum }}</van-cell>
<van-cell v-if="['3','4'].includes(viewData.type)" title="床号">{{ viewData.hospitalHouseBedNum }}</van-cell>
<van-cell v-if="['4'].includes(viewData.type)" title="患病病种">{{ viewData.hospitalBy }}</van-cell>
<van-cell v-if="['6'].includes(viewData.type)" title="直系亲属">{{ viewData.deadImmediateFamily }}</van-cell>
<van-cell class="direction-column-cell" title="申请事由">
{{ viewData.remark || '暂无' }}
</van-cell>
<van-cell class="direction-column-cell" title="附件">
<file-preview :files="viewData.files" complete_result></file-preview>
</van-cell>
<van-cell class="direction-column-cell" title="签字">
<van-image :src="viewData.signature" v-if="viewData.signature" class="signature-image"></van-image>
<span v-else>暂无签字</span>
</van-cell>
</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.PROCESS_TASK_SUBMIT_TYPE"
:value="task.ext.submitType"></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,
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/condolence/mine/info", { 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*/ `
`
}
@@ -0,0 +1,151 @@
<!--#
layout("/layouts/platform_h5.html"){
#-->
<style scoped>
</style>
<div id="app">
<van-nav-bar title="我的申请" left-text="返回" left-arrow @click-left="historyBack" fixed placeholder></van-nav-bar>
<van-sticky offset-top="46px">
<van-search
v-model="pageForm.searchKeyword"
:show-action="false"
:reverse-color="false"
input-align="left"
placeholder="请输入姓名或者工号搜索"
@search="doSearch"
></van-search>
<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.type" :options="typeOptions" :multiple="false"
@change="doSearch"></van-dropdown-item>
</van-dropdown-menu>
</van-sticky>
<table-list api="/platform/condolence/mine/pageData" :page_form.sync="pageForm" ref="tableListRef" @ready="onReady">
<template v-slot="{index,row}">
<table-column label="慰问对象">{{row.helpUserName}}</table-column>
<table-column label="慰问对象工号">{{row.helpLoginName}}</table-column>
<table-column label="申请人">{{row.applyUserName}}</table-column>
<table-column label="所属工会">{{row.applyUnionName}}</table-column>
<table-column label="所属单位">{{row.applyUnitName}}</table-column>
<table-column label="慰问类型">{{row.typeName}}</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" @click="onRevoke(row)"
v-if="row.canRevoke">
<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>
<info ref="infoRef"></info>
</div>
<script nonce="${cspNonce!}">
<!--#include('../common/info.js'){}#-->
new Vue({
el: "#app",
store,
components: {
info: condolenceInfo
},
data() {
return {
pageForm: {
pageNumber: 1,
pageSize: 10,
totalCount: 0,
year: new Date().getFullYear(),
type: null
},
typeOptions: [],
}
},
methods: {
async onReady() {
const typeList = await this.queryCondolenceType()
this.typeOptions = [
{
text: "全部慰问类型",
value: null
}
].concat(typeList.map((v) => ({ text: v.name, value: v.id })))
if (this.typeOptions.length > 0) {
this.pageForm.type = this.typeOptions[0].value
this.doSearch()
}
},
onRevoke(row) {
this.$dialog.confirm({
title: "提示",
message: "您确定要撤回吗?"
}).then(() => {
this.$axios.post("/flow/common/revokeTask", { taskId: row.startTaskId }).then((res) => {
if (res.code === 0) {
this.$toast(res.msg)
this.doSearch()
}
})
})
},
onView(row) {
this.$refs.infoRef.onOpen(row)
},
onEdit(row) {
this.$pjaxReplace("/platform/condolence/apply/h5?taskId=" + (row.startTaskId || "") + "&bizId=" + row.id)
},
onDelete(row) {
this.$dialog.confirm({
title: "提示",
message: "您确定要删除吗?"
})
.then(() => {
this.$axios.post("/platform/condolence/mine/delete", { id: row.id }).then((res) => {
if (res.code === 0) {
this.$toast.success(res.msg)
this.doSearch()
} else {
this.$toast.fail(res.msg)
}
})
})
.catch(() => {})
},
async queryCondolenceType() {
const res = await this.$axios.post('/platform/condolence/type/queryCondolenceType')
return res.data
},
doSearch() {
this.$nextTick(() => {
this.pageForm.pageNumber = 1
this.pageForm.totalCount = 0
this.$refs.tableListRef.doSearch()
})
}
},
})
</script>
<!--#
}
#-->
@@ -0,0 +1,190 @@
<!--#
layout("/layouts/platform_h5.html"){
#-->
<style scoped>
</style>
<div id="app">
<van-nav-bar title="校工会预审" left-text="返回" left-arrow @click-left="historyBack" fixed placeholder></van-nav-bar>
<van-sticky offset-top="46px">
<van-search
v-model="pageForm.searchKeyword"
:show-action="false"
:reverse-color="false"
input-align="left"
placeholder="请输入姓名或者工号搜索"
@search="doSearch"
></van-search>
<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.type" :options="typeOptions" :multiple="false"
@change="doSearch"></van-dropdown-item>
</van-dropdown-menu>
<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/condolence/schoolPrincipalApproval/pageData" :page_form.sync="pageForm" ref="tableListRef" @ready="onReady">
<template v-slot="{index,row}">
<table-column label="慰问对象">{{row.helpUserName}}</table-column>
<table-column label="慰问对象工号">{{row.helpLoginName}}</table-column>
<table-column label="申请人">{{row.applyUserName}}</table-column>
<table-column label="所属工会">{{row.applyUnionName}}</table-column>
<table-column label="所属单位">{{row.applyUnitName}}</table-column>
<table-column label="慰问类型">{{row.typeName}}</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-edit"></i>
<span>审核</span>
</div>
<div class="action-btn delete" v-if="row.canRevoke" @click="onRevoke(row)">
<i class="fa fa-reply"></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(20)">不同意</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,
components: {
info: condolenceInfo
},
data() {
return {
pageForm: {
pageNumber: 1,
pageSize: 10,
totalCount: 0,
searchKeyword: '',
approvalText: "0",
approval: false,
year: new Date().getFullYear(),
type: null,
},
typeOptions: [],
formData: {},
showApprovalForm: false
}
},
methods: {
async onReady() {
const typeList = await this.queryCondolenceType()
this.typeOptions = [
{
text: "全部慰问类型",
value: null
}
].concat(typeList.map((v) => ({ text: v.name, value: v.id })))
if (this.typeOptions.length > 0) {
this.pageForm.type = this.typeOptions[0].value
this.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) {
try {
await this.$refs.formRef.validate();
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.$refs.infoRef.onClose()
this.$toast.success(res.msg)
this.doSearch()
}
})
}).catch(() => {
})
} catch (error) {
}
},
onRevoke(row){
this.$dialog.confirm({
title: "提示",
message: "您确定要撤回吗?"
}).then(() => {
this.$axios.post("/flow/common/revokeTask", {taskId: row.taskId}).then((res) => {
if (res.code === 0) {
this.$toast.success(res.msg)
this.doSearch()
}
})
})
},
async queryCondolenceType() {
const res = await this.$axios.post('/platform/condolence/type/queryCondolenceType')
return res.data
},
doSearch() {
this.$nextTick(() => {
this.pageForm.pageNumber = 1
this.pageForm.totalCount = 0
this.$refs.tableListRef.doSearch()
})
}
},
})
</script>
<!--#
}
#-->
@@ -0,0 +1,190 @@
<!--#
layout("/layouts/platform_h5.html"){
#-->
<style scoped>
</style>
<div id="app">
<van-nav-bar title="校工会审核" left-text="返回" left-arrow @click-left="historyBack" fixed placeholder></van-nav-bar>
<van-sticky offset-top="46px">
<van-search
v-model="pageForm.searchKeyword"
:show-action="false"
:reverse-color="false"
input-align="left"
placeholder="请输入姓名或者工号搜索"
@search="doSearch"
></van-search>
<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.type" :options="typeOptions" :multiple="false"
@change="doSearch"></van-dropdown-item>
</van-dropdown-menu>
<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/condolence/schoolUnionApproval/pageData" :page_form.sync="pageForm" ref="tableListRef" @ready="onReady">
<template v-slot="{index,row}">
<table-column label="慰问对象">{{row.helpUserName}}</table-column>
<table-column label="慰问对象工号">{{row.helpLoginName}}</table-column>
<table-column label="申请人">{{row.applyUserName}}</table-column>
<table-column label="所属工会">{{row.applyUnionName}}</table-column>
<table-column label="所属单位">{{row.applyUnitName}}</table-column>
<table-column label="慰问类型">{{row.typeName}}</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-edit"></i>
<span>审核</span>
</div>
<div class="action-btn delete" v-if="row.canRevoke" @click="onRevoke(row)">
<i class="fa fa-reply"></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(20)">不同意</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,
components: {
info: condolenceInfo
},
data() {
return {
pageForm: {
pageNumber: 1,
pageSize: 10,
totalCount: 0,
searchKeyword: '',
approvalText: "0",
approval: false,
year: new Date().getFullYear(),
type: null,
},
typeOptions: [],
formData: {},
showApprovalForm: false
}
},
methods: {
async onReady() {
const typeList = await this.queryCondolenceType()
this.typeOptions = [
{
text: "全部慰问类型",
value: null
}
].concat(typeList.map((v) => ({ text: v.name, value: v.id })))
if (this.typeOptions.length > 0) {
this.pageForm.type = this.typeOptions[0].value
this.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) {
try {
await this.$refs.formRef.validate();
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.$refs.infoRef.onClose()
this.$toast.success(res.msg)
this.doSearch()
}
})
}).catch(() => {
})
} catch (error) {
}
},
onRevoke(row){
this.$dialog.confirm({
title: "提示",
message: "您确定要撤回吗?"
}).then(() => {
this.$axios.post("/flow/common/revokeTask", {taskId: row.taskId}).then((res) => {
if (res.code === 0) {
this.$toast.success(res.msg)
this.doSearch()
}
})
})
},
async queryCondolenceType() {
const res = await this.$axios.post('/platform/condolence/type/queryCondolenceType')
return res.data
},
doSearch() {
this.$nextTick(() => {
this.pageForm.pageNumber = 1
this.pageForm.totalCount = 0
this.$refs.tableListRef.doSearch()
})
}
},
})
</script>
<!--#
}
#-->