省级互助保障
This commit is contained in:
+7
-2
@@ -1,6 +1,6 @@
|
||||
const formEdit = {
|
||||
template: /*language=HTML*/ `
|
||||
<el-dialog :title="formData.id ? '编辑' : '新增'" :visible="visible" width="70%" :close-on-click-modal="false">
|
||||
<el-dialog :title="formData.id ? '编辑' : '新增'" :visible="visible" width="70%" :close-on-click-modal="false" :before-close="handleClose">
|
||||
<el-steps :active="activeStep" finish-status="success" simple>
|
||||
<el-step title="基础信息"></el-step>
|
||||
<el-step title="名额设置"></el-step>
|
||||
@@ -96,7 +96,7 @@ const formEdit = {
|
||||
</div>
|
||||
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="visible = false">取 消</el-button>
|
||||
<el-button @click="handleClose">取 消</el-button>
|
||||
<el-button @click="prevStep" v-if="activeStep > 0">
|
||||
<i class="el-icon-arrow-left"></i> 上一步
|
||||
</el-button>
|
||||
@@ -188,6 +188,11 @@ const formEdit = {
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 处理关闭弹窗
|
||||
handleClose() {
|
||||
this.visible = false;
|
||||
},
|
||||
|
||||
// 检查名额是否未设置
|
||||
isQuotaUnset(value) {
|
||||
return value === null || value === undefined
|
||||
|
||||
+2
-3
@@ -30,8 +30,8 @@ layout("/layouts/platform.html"){
|
||||
</search-item>
|
||||
<search-item label="性别">
|
||||
<el-select v-model="pageForm.sex" placeholder="请选择性别" clearable style="width: 100%">
|
||||
<el-option label="男性" value="男性"></el-option>
|
||||
<el-option label="女性" value="女性"></el-option>
|
||||
<el-option label="男" value="男"></el-option>
|
||||
<el-option label="女" value="女"></el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
<search-item label="工会名称">
|
||||
@@ -151,7 +151,6 @@ layout("/layouts/platform.html"){
|
||||
this.activityList = res.data;
|
||||
// 默认选中最新的活动(第一个)
|
||||
if (res.data && res.data.length > 0) {
|
||||
this.pageForm.activityId = res.data[0].id;
|
||||
this.pageData()
|
||||
} else {
|
||||
this.pageForm.activityId = ""; // 数据为空时设为空字符串
|
||||
|
||||
+2
-2
@@ -29,8 +29,8 @@ layout("/layouts/platform.html"){
|
||||
</search-item>
|
||||
<search-item label="性别">
|
||||
<el-select v-model="pageForm.sex" placeholder="请选择性别" clearable style="width: 100%">
|
||||
<el-option label="男性" value="男性"></el-option>
|
||||
<el-option label="女性" value="女性"></el-option>
|
||||
<el-option label="男" value="男"></el-option>
|
||||
<el-option label="女" value="女"></el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
<search-item label="工会名称">
|
||||
|
||||
@@ -22,7 +22,7 @@ layout("/layouts/platform.html"){
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="出生年月" prop="birthday">
|
||||
<el-input v-model="formData.birthday" readonly></el-input>
|
||||
<el-input :value="formatDate(formData.birthday)" readonly ></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
@@ -55,8 +55,8 @@ layout("/layouts/platform.html"){
|
||||
<el-col :span="12">
|
||||
<el-form-item label="性别" prop="loverSex">
|
||||
<el-select v-model="formData.loverSex" placeholder="请选择" style="width: 100%">
|
||||
<el-option label="男性" value="男性"></el-option>
|
||||
<el-option label="女性" value="女性"></el-option>
|
||||
<el-option label="男" value="男"></el-option>
|
||||
<el-option label="女" value="女"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@@ -190,6 +190,31 @@ layout("/layouts/platform.html"){
|
||||
},
|
||||
|
||||
methods: {
|
||||
// 添加日期格式化方法
|
||||
formatDate(date) {
|
||||
if (!date) return '';
|
||||
// 如果已经是 yyyy-MM-dd 格式,直接返回
|
||||
if (typeof date === 'string' && /^\d{4}-\d{2}-\d{2}/.test(date)) {
|
||||
// 如果包含时间,只取日期部分
|
||||
if (date.length > 10) {
|
||||
return date.substring(0, 10);
|
||||
}
|
||||
return date;
|
||||
}
|
||||
// 否则转换为 yyyy-MM-dd 格式
|
||||
try {
|
||||
const d = new Date(date);
|
||||
if (isNaN(d.getTime())) {
|
||||
return date;
|
||||
}
|
||||
const year = d.getFullYear();
|
||||
const month = String(d.getMonth() + 1).padStart(2, '0');
|
||||
const day = String(d.getDate()).padStart(2, '0');
|
||||
return year + '-' + month + '-' + day;
|
||||
} catch (e) {
|
||||
return date;
|
||||
}
|
||||
},
|
||||
// 保存
|
||||
onSave() {
|
||||
this.$confirm("您确定保存吗?", "提示", {
|
||||
|
||||
@@ -14,8 +14,8 @@ layout("/layouts/platform.html"){
|
||||
</search-item>
|
||||
<search-item label="性别">
|
||||
<el-select v-model="pageForm.sex" placeholder="请选择性别" clearable style="width: 100%">
|
||||
<el-option label="男性" value="男性"></el-option>
|
||||
<el-option label="女性" value="女性"></el-option>
|
||||
<el-option label="男" value="男"></el-option>
|
||||
<el-option label="女" value="女"></el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
<search-item label="工会名称">
|
||||
|
||||
@@ -9,19 +9,19 @@ const DSZNFMTX_INFO = {
|
||||
<el-descriptions :column="3" border class="flow-task-form">
|
||||
<el-descriptions-item label="职工姓名">{{viewData.userName}}</el-descriptions-item>
|
||||
<el-descriptions-item label="性别">{{viewData.sex}}</el-descriptions-item>
|
||||
<el-descriptions-item label="出生年月">{{viewData.birthday}}</el-descriptions-item>
|
||||
<el-descriptions-item label="出生年月">{{formatDate(viewData.birthday)}}</el-descriptions-item>
|
||||
<el-descriptions-item label="原工作单位">{{viewData.unitName}}</el-descriptions-item>
|
||||
<el-descriptions-item label="退休时间" >{{viewData.retireTime}}</el-descriptions-item>
|
||||
<el-descriptions-item label="退休时间" >{{formatDate(viewData.retireTime)}}</el-descriptions-item>
|
||||
<el-descriptions-item label="爱人姓名">{{viewData.loverName}}</el-descriptions-item>
|
||||
<el-descriptions-item label="性别">{{viewData.loverSex}}</el-descriptions-item>
|
||||
<el-descriptions-item label="工作单位" :span="2">{{viewData.loverUnitName}}</el-descriptions-item>
|
||||
<el-descriptions-item label="结婚日期">{{viewData.marryTime}}</el-descriptions-item>
|
||||
<el-descriptions-item label="子女出生日">{{viewData.childrenBirthday}}</el-descriptions-item>
|
||||
<el-descriptions-item label="领独生子女证时间">{{viewData.getCertificateTime}}</el-descriptions-item>
|
||||
<el-descriptions-item label="结婚日期">{{formatDate(viewData.marryTime)}}</el-descriptions-item>
|
||||
<el-descriptions-item label="子女出生日">{{formatDate(viewData.childrenBirthday)}}</el-descriptions-item>
|
||||
<el-descriptions-item label="领独生子女证时间">{{formatDate(viewData.getCertificateTime)}}</el-descriptions-item>
|
||||
<el-descriptions-item label="独生子女光荣证号">{{viewData.childrenGraceNumber}}</el-descriptions-item>
|
||||
<el-descriptions-item label="办证机关">{{viewData.office}}</el-descriptions-item>
|
||||
<el-descriptions-item label="奖励金额">{{viewData.bonus}}</el-descriptions-item>
|
||||
|
||||
|
||||
<el-descriptions-item :span="3" label="独生子女父母光荣证">
|
||||
<file-preview :files="viewData.honorFiles" complete_result></file-preview>
|
||||
</el-descriptions-item>
|
||||
@@ -88,6 +88,32 @@ const DSZNFMTX_INFO = {
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 添加日期格式化方法
|
||||
formatDate(date) {
|
||||
if (!date) return '';
|
||||
// 如果已经是 yyyy-MM-dd 格式,直接返回
|
||||
if (typeof date === 'string' && /^\d{4}-\d{2}-\d{2}/.test(date)) {
|
||||
// 如果包含时间,只取日期部分
|
||||
if (date.length > 10) {
|
||||
return date.substring(0, 10);
|
||||
}
|
||||
return date;
|
||||
}
|
||||
// 否则转换为 yyyy-MM-dd 格式
|
||||
try {
|
||||
const d = new Date(date);
|
||||
if (isNaN(d.getTime())) {
|
||||
return date;
|
||||
}
|
||||
const year = d.getFullYear();
|
||||
const month = String(d.getMonth() + 1).padStart(2, '0');
|
||||
const day = String(d.getDate()).padStart(2, '0');
|
||||
return year + '-' + month + '-' + day;
|
||||
} catch (e) {
|
||||
return date;
|
||||
}
|
||||
},
|
||||
|
||||
// 打开
|
||||
onOpen(row) {
|
||||
this.row = row
|
||||
@@ -120,6 +146,4 @@ const DSZNFMTX_INFO = {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -14,8 +14,8 @@ layout("/layouts/platform.html"){
|
||||
</search-item>
|
||||
<search-item label="性别">
|
||||
<el-select v-model="pageForm.sex" placeholder="请选择性别" clearable style="width: 100%">
|
||||
<el-option label="男性" value="男性"></el-option>
|
||||
<el-option label="女性" value="女性"></el-option>
|
||||
<el-option label="男" value="男"></el-option>
|
||||
<el-option label="女" value="女"></el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
<search-item label="工会名称">
|
||||
|
||||
@@ -14,8 +14,8 @@ layout("/layouts/platform.html"){
|
||||
</search-item>
|
||||
<search-item label="性别">
|
||||
<el-select v-model="pageForm.sex" placeholder="请选择性别" clearable style="width: 100%">
|
||||
<el-option label="男性" value="男性"></el-option>
|
||||
<el-option label="女性" value="女性"></el-option>
|
||||
<el-option label="男" value="男"></el-option>
|
||||
<el-option label="女" value="女"></el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
<search-item label="工会名称">
|
||||
|
||||
@@ -25,8 +25,8 @@ layout("/layouts/platform.html"){
|
||||
<el-descriptions-item label="性别">
|
||||
<el-form-item label="性别" prop="loverSex">
|
||||
<el-select v-model="formData.loverSex" placeholder="请选择">
|
||||
<el-option label="男性" value="男性"></el-option>
|
||||
<el-option label="女性" value="女性"></el-option>
|
||||
<el-option label="男" value="男"></el-option>
|
||||
<el-option label="女" value="女"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
@@ -227,7 +227,7 @@ layout("/layouts/platform.html"){
|
||||
isMale(newVal) {
|
||||
if (newVal) {
|
||||
// 男性默认设置
|
||||
this.$set(this.formData, 'loverSex', '女性');
|
||||
this.$set(this.formData, 'loverSex', '女');
|
||||
this.$set(this.formData, 'withLeave', 15);
|
||||
this.$set(this.formData, 'parentalLeave', 10);
|
||||
}
|
||||
@@ -235,7 +235,7 @@ layout("/layouts/platform.html"){
|
||||
isFemale(newVal) {
|
||||
if (newVal) {
|
||||
// 女性默认设置
|
||||
this.$set(this.formData, 'loverSex', '男性');
|
||||
this.$set(this.formData, 'loverSex', '男');
|
||||
this.$set(this.formData, 'maternityLeave', 98);
|
||||
this.$set(this.formData, 'extendLeave', 60);
|
||||
}
|
||||
@@ -389,7 +389,7 @@ layout("/layouts/platform.html"){
|
||||
// 根据性别设置默认值
|
||||
if (this.isMale) {
|
||||
// 男性默认设置
|
||||
this.$set(this.formData, 'loverSex', '女性');
|
||||
this.$set(this.formData, 'loverSex', '女');
|
||||
this.$set(this.formData, 'withLeave', 15);
|
||||
this.$set(this.formData, 'parentalLeave', 10);
|
||||
// 男性默认产假和延长假为0,因为男性不休产假
|
||||
@@ -397,7 +397,7 @@ layout("/layouts/platform.html"){
|
||||
this.$set(this.formData, 'extendLeave', 0);
|
||||
} else if (this.isFemale) {
|
||||
// 女性默认设置
|
||||
this.$set(this.formData, 'loverSex', '男性');
|
||||
this.$set(this.formData, 'loverSex', '男');
|
||||
this.$set(this.formData, 'maternityLeave', 98);
|
||||
this.$set(this.formData, 'extendLeave', 60);
|
||||
// 女性默认陪产假和育儿假为0
|
||||
|
||||
+2
-2
@@ -14,8 +14,8 @@ layout("/layouts/platform.html"){
|
||||
</search-item>
|
||||
<search-item label="性别">
|
||||
<el-select v-model="pageForm.sex" placeholder="请选择性别" clearable style="width: 100%">
|
||||
<el-option label="男性" value="男性"></el-option>
|
||||
<el-option label="女性" value="女性"></el-option>
|
||||
<el-option label="男" value="男"></el-option>
|
||||
<el-option label="女" value="女"></el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
<search-item label="工会名称">
|
||||
|
||||
+2
-2
@@ -14,8 +14,8 @@ layout("/layouts/platform.html"){
|
||||
</search-item>
|
||||
<search-item label="性别">
|
||||
<el-select v-model="pageForm.sex" placeholder="请选择性别" clearable style="width: 100%">
|
||||
<el-option label="男性" value="男性"></el-option>
|
||||
<el-option label="女性" value="女性"></el-option>
|
||||
<el-option label="男" value="男"></el-option>
|
||||
<el-option label="女" value="女"></el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
<search-item label="工会名称">
|
||||
|
||||
+2
-2
@@ -14,8 +14,8 @@ layout("/layouts/platform.html"){
|
||||
</search-item>
|
||||
<search-item label="性别">
|
||||
<el-select v-model="pageForm.sex" placeholder="请选择性别" clearable style="width: 100%">
|
||||
<el-option label="男性" value="男性"></el-option>
|
||||
<el-option label="女性" value="女性"></el-option>
|
||||
<el-option label="男" value="男"></el-option>
|
||||
<el-option label="女" value="女"></el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
<search-item label="工会名称">
|
||||
|
||||
@@ -0,0 +1,396 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
<div id="app">
|
||||
<guava ref="guava">
|
||||
<template>
|
||||
<el-card shadow="never">
|
||||
<snaker-start slot="header" label="省级互助保障" define_key="SJHZBZ"></snaker-start>
|
||||
<el-form :model="formData" ref="formRef" :rules="formRules" label-width="140px" label-position="right"
|
||||
label-suffix=":">
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="10">
|
||||
<el-form-item prop="projectId" label="所属事项">
|
||||
<el-select v-model="formData.projectId"
|
||||
style="width: 100%"
|
||||
placeholder="请选择所属事项">
|
||||
<el-option v-for="item in projectList" :key="item.id" :label="item.projectName"
|
||||
:value="item.id"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="2">
|
||||
<div style="margin-top: 8px">
|
||||
<span style="color: #0a84ff;cursor: pointer;" @click="onView">查看详情</span>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item prop="mode" label="申请模式">
|
||||
<el-select v-model="formData.mode" placeholder="申请模式" @change="modeChange" style="width: 100%">
|
||||
<el-option label="本人申请" value="本人申请"></el-option>
|
||||
<el-option v-if="$auth.hasRoleOr('SYSADMIN, SCHOOL_UNION_ADMIN, BRANCH_UNION_CHAIRMAN, BRANCH_UNION_OPERATOR')"
|
||||
label="替他人申请" value="替他人申请"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-form-item prop="proxyUserName" label="填写人姓名">
|
||||
<el-input readonly v-model="formData.proxyUserName" placeholder="请输入姓名"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item prop="proxyLoginName" label="填写人工号">
|
||||
<el-input readonly v-model="formData.proxyLoginName" placeholder="请输入工号"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item prop="userId" label="申请人" label-width="140px">
|
||||
<el-select :remote-method="queryRecipients"
|
||||
@change="userChange"
|
||||
clearable
|
||||
filterable
|
||||
remote
|
||||
placeholder="输入工号或者姓名查找"
|
||||
style="width: 100%"
|
||||
v-model="formData.userId"
|
||||
v-if="formData.mode == '替他人申请'">
|
||||
<el-option :key="o.id"
|
||||
:label="o.username+'('+o.loginname+')'"
|
||||
:value="o.id"
|
||||
v-for="o in subsidizedList"></el-option>
|
||||
</el-select>
|
||||
<el-input v-else
|
||||
readonly
|
||||
v-model="formData.userName"
|
||||
placeholder="申请人姓名">
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
|
||||
<el-col :span="12">
|
||||
<el-form-item prop="loginName" label="工号">
|
||||
<el-input readonly v-model="formData.loginName" placeholder="请输入工号"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item prop="unitName" label="所属单位">
|
||||
<el-input readonly v-model="formData.unitName" placeholder="请输入所属单位"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item prop="unionName" label="所属工会">
|
||||
<el-input readonly v-model="formData.unionName" placeholder="请输入所属工会"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item prop="sex" label="性别">
|
||||
<el-input readonly v-model="formData.sex" placeholder="请输入性别"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="12">
|
||||
<el-form-item prop="mobile" label="手机号">
|
||||
<el-input v-model="formData.mobile" placeholder="请输入手机号"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="12">
|
||||
<el-form-item prop="idCard" label="身份证号">
|
||||
<el-input v-model="formData.idCard" placeholder="请输入身份证号"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="12">
|
||||
<el-form-item prop="medicalInsuranceState" label="医保状态">
|
||||
<dict-select v-model="formData.medicalInsuranceState" code="USER_MEDICINE" style="width: 100%"></dict-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="12">
|
||||
<el-form-item prop="insuranceUserState" label="在职状态">
|
||||
<el-select clearable placeholder="请选择在职状态"
|
||||
style="width: 100%;"
|
||||
v-model="formData.insuranceUserState">
|
||||
<el-option :label="item.name" :value="item.code" :key="item.code"
|
||||
v-for="item in dict.type.USER_STATE"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="12">
|
||||
<el-form-item prop="noDutyTime" label="不在岗时间">
|
||||
<el-date-picker
|
||||
v-model="formData.noDutyTime"
|
||||
type="datetime"
|
||||
format="yyyy-MM-dd HH:mm"
|
||||
value-format="yyyy-MM-dd HH:mm"
|
||||
clearable
|
||||
placeholder="请选择不在岗时间">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-form-item prop="sign" label="签字">
|
||||
<pc-signature v-model="formData.sign"></pc-signature>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-row type="flex" justify="end" class="mt20">
|
||||
<el-button type="primary" plain @click="onSave">保存</el-button>
|
||||
<el-button type="primary" @click="onSubmit" v-if="!taskId">提交</el-button>
|
||||
<el-button type="primary" @click="onFinishTask" v-else>提交1</el-button>
|
||||
</el-row>
|
||||
</el-card>
|
||||
</template>
|
||||
|
||||
<template #view>
|
||||
<project-info ref="projectInfoRef"></project-info>
|
||||
</template>
|
||||
</guava>
|
||||
</div>
|
||||
<script>
|
||||
<!--#include('../common/projectInfo.js'){}#-->
|
||||
const vue = new Vue({
|
||||
el: '#app',
|
||||
store,
|
||||
dicts: ["USER_STATE", "USER_MEDICINE"],
|
||||
mixins: [initTableMixins],
|
||||
components: {
|
||||
'project-info': projectInfo
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
bizId: GetQueryString("bizId"),
|
||||
taskId: GetQueryString("taskId"),
|
||||
formData: {
|
||||
mode: '本人申请' // 默认为本人申请
|
||||
},
|
||||
// 替他人申请相关
|
||||
subsidizedList: [],
|
||||
formRules: {
|
||||
projectId: [{ required: true, message: '请选择所属事项', trigger: 'change' }],
|
||||
mode: [{ required: true, message: '请选择申请模式', trigger: 'change' }],
|
||||
proxyUserName: [{ required: true, message: '请填写填写人姓名', trigger: 'blur' }],
|
||||
proxyLoginName: [{ required: true, message: '请填写填写人工号', trigger: 'blur' }],
|
||||
userId: [{ required: true, message: '请选择申请人', trigger: 'change' }],
|
||||
loginName: [{ required: true, message: '请填写工号', trigger: 'blur' }],
|
||||
unitName: [{ required: true, message: '请填写所属单位', trigger: 'blur' }],
|
||||
unionName: [{ required: true, message: '请填写所属工会', trigger: 'blur' }],
|
||||
sex: [{ required: true, message: '请填写性别', trigger: 'blur' }],
|
||||
mobile: [{ required: true, message: '请填写手机号', trigger: 'blur' }],
|
||||
idCard: [{ required: true, message: '请填写身份证号', trigger: 'blur' }],
|
||||
medicalInsuranceState: [{ required: true, message: '请选择医保状态', trigger: 'change' }],
|
||||
insuranceUserState: [{ required: true, message: '请选择在职状态', trigger: 'change' }],
|
||||
sign: [{ required: true, message: '请签字', trigger: 'change' }]
|
||||
},
|
||||
projectList: [],
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
// 监听 projectId 变化,自动设置 projectName
|
||||
'formData.projectId': {
|
||||
handler(newVal) {
|
||||
if (newVal && this.projectList.length > 0) {
|
||||
const project = this.projectList.find(item => item.id === newVal);
|
||||
if (project) {
|
||||
this.$set(this.formData, 'projectName', project.projectName);
|
||||
}
|
||||
}
|
||||
},
|
||||
immediate: true
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 申请模式切换
|
||||
modeChange(val) {
|
||||
const user = this.$store.state.user;
|
||||
if (val === "本人申请") {
|
||||
// 本人申请
|
||||
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, 'proxyUserId', user.id);
|
||||
this.$set(this.formData, 'proxyUserName', user.username);
|
||||
this.$set(this.formData, 'proxyLoginName', user.loginname);
|
||||
this.$set(this.formData, 'unitId', user.unit.id);
|
||||
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);
|
||||
} else {
|
||||
// 替他人申请,清空被帮助人信息
|
||||
this.$set(this.formData, 'proxyUserId', user.id);
|
||||
this.$set(this.formData, 'proxyUserName', user.username);
|
||||
this.$set(this.formData, 'proxyLoginName', user.loginname);
|
||||
this.$set(this.formData, 'userId', null);
|
||||
this.$set(this.formData, 'userName', null);
|
||||
this.$set(this.formData, 'loginName', null);
|
||||
this.$set(this.formData, 'unitId', null);
|
||||
this.$set(this.formData, 'unitName', null);
|
||||
this.$set(this.formData, 'unionId', null);
|
||||
this.$set(this.formData, 'unionName', null);
|
||||
this.$set(this.formData, 'sex', null);
|
||||
this.$set(this.formData, 'nation', null);
|
||||
this.$set(this.formData, 'birthday', null);
|
||||
this.$set(this.formData, 'mobile', null);
|
||||
}
|
||||
},
|
||||
|
||||
// 查询受助人
|
||||
queryRecipients(key) {
|
||||
this.$axios.get("/platform/mutualInsurance/apply/queryRecipients", {
|
||||
params: { key }
|
||||
}).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.subsidizedList = res.data;
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
// 用户选择变化
|
||||
async userChange() {
|
||||
const user = this.subsidizedList.find(item => item.id === this.formData.userId);
|
||||
if (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, 'sex', user.sex);
|
||||
this.$set(this.formData, 'unitId', user.unitId);
|
||||
this.$set(this.formData, 'unitName', user.unitName);
|
||||
this.$set(this.formData, 'unionId', user.unionId);
|
||||
this.$set(this.formData, 'unionName', user.unionName);
|
||||
this.$set(this.formData, 'birthday', user.birthday);
|
||||
this.$set(this.formData, 'mobile', user.mobile);
|
||||
} else {
|
||||
this.$set(this.formData, 'userId', null);
|
||||
this.$set(this.formData, 'userName', null);
|
||||
this.$set(this.formData, 'loginName', null);
|
||||
this.$set(this.formData, 'sex', null);
|
||||
this.$set(this.formData, 'unitId', null);
|
||||
this.$set(this.formData, 'unitName', null);
|
||||
this.$set(this.formData, 'unionId', null);
|
||||
this.$set(this.formData, 'unionName', null);
|
||||
this.$set(this.formData, 'birthday', null);
|
||||
this.$set(this.formData, 'mobile', null);
|
||||
}
|
||||
},
|
||||
// 保存
|
||||
onSave() {
|
||||
this.$confirm("您确定保存吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(() => {
|
||||
this.$axios.post('/platform/mutualInsurance/apply/save', {data: JSON.stringify(this.formData)}).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.$message.success(res.msg)
|
||||
commonUtil.pjaxPush('/platform/mutualInsurance/mine/index')
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
// 提交验证
|
||||
validateBeforeSubmit() {
|
||||
return new Promise((resolve) => {
|
||||
this.$refs.formRef.validate((valid) => {
|
||||
if (valid) {
|
||||
resolve(true);
|
||||
} else {
|
||||
this.$message.error('请完善必填信息');
|
||||
resolve(false);
|
||||
}
|
||||
});
|
||||
});
|
||||
},
|
||||
// 提交
|
||||
async onSubmit() {
|
||||
const isValid = await this.validateBeforeSubmit();
|
||||
if (!isValid) return;
|
||||
|
||||
this.$confirm("您确定要提交吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(() => {
|
||||
this.$axios.post('/platform/mutualInsurance/apply/submit', {
|
||||
data: JSON.stringify(this.formData)
|
||||
}).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.$message.success("提交成功")
|
||||
commonUtil.pjaxPush('/platform/mutualInsurance/mine/index')
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
// 再次提交
|
||||
async onFinishTask() {
|
||||
const isValid = await this.validateBeforeSubmit();
|
||||
if (!isValid) return;
|
||||
|
||||
this.$confirm("您确定要提交吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(() => {
|
||||
this.$axios.post('/platform/mutualInsurance/apply/submitAgain', {
|
||||
data: JSON.stringify(this.formData),
|
||||
taskId: GetQueryString("taskId")
|
||||
}).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.$message.success("提交成功")
|
||||
commonUtil.pjaxPush('/platform/mutualInsurance/mine/index')
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
onView() {
|
||||
this.$refs.guava.view(() => {
|
||||
this.$refs.projectInfoRef.onOpen(this.formData.projectId)
|
||||
})
|
||||
},
|
||||
onEdit(row) {
|
||||
commonUtil.pjaxPush('/platform/mutualInsurance/apply/index?taskId=' + (row.startTaskId || '') + "&bizId=" + row.id)
|
||||
},
|
||||
async findOne(id) {
|
||||
const resp = await $.get('/platform/mutualInsurance/apply/findOne', {id})
|
||||
if (resp.code === 0) {
|
||||
return resp.data
|
||||
}
|
||||
},
|
||||
async listProject() {
|
||||
const currentYear = new Date().getFullYear().toString();
|
||||
const resp = await $.post('/platform/mutualInsurance/project/listProject', {year: currentYear})
|
||||
if (resp.code === 0) {
|
||||
this.projectList = resp.data
|
||||
if (resp.data && resp.data.length > 0) {
|
||||
this.$set(this.formData, 'projectId', resp.data[0].id)
|
||||
this.$set(this.formData, 'projectName', resp.data[0].projectName)
|
||||
}
|
||||
}
|
||||
},
|
||||
init() {
|
||||
if (this.bizId) {
|
||||
this.findOne(this.bizId).then(async data => {
|
||||
this.formData = data
|
||||
})
|
||||
} else {
|
||||
// 初始化为本人申请模式
|
||||
this.modeChange("本人申请");
|
||||
}
|
||||
}
|
||||
|
||||
},
|
||||
created() {
|
||||
this.init()
|
||||
this.listProject()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
+195
@@ -0,0 +1,195 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
<div id="app">
|
||||
<guava ref="guava">
|
||||
<el-card shadow="never">
|
||||
<search @search="doSearch">
|
||||
<search-item label="年度">
|
||||
<el-date-picker v-model="pageForm.year"
|
||||
type="year"
|
||||
value-format="yyyy"
|
||||
placeholder="年度"
|
||||
style="width: 100%"
|
||||
@change="getProjectByYear"
|
||||
></el-date-picker>
|
||||
</search-item>
|
||||
<search-item label="事项名称">
|
||||
<el-select v-model="pageForm.projectId" placeholder="请选择事项名称" clearable style="width: 100%" @change="doSearch">
|
||||
<el-option v-for="item in projectList"
|
||||
:value="item.id"
|
||||
:key="item.id"
|
||||
:label="item.projectName"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
<search-item label="姓名">
|
||||
<el-input placeholder="请输入姓名" clearable v-model="pageForm.userName"></el-input>
|
||||
</search-item>
|
||||
<search-item label="性别">
|
||||
<el-select v-model="pageForm.sex" placeholder="请选择性别" clearable style="width: 100%">
|
||||
<el-option label="男" value="男"></el-option>
|
||||
<el-option label="女" value="女"></el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
<search-item label="工会名称">
|
||||
<el-select v-model="pageForm.unionId" @change="doSearch" style="width: 100%"
|
||||
placeholder="请选择工会名称" clearable>
|
||||
<el-option v-for="item in unionOptions"
|
||||
:value="item.id"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
<search-item label="单位名称">
|
||||
<el-select v-model="pageForm.unitId" @change="doSearch" style="width: 100%"
|
||||
placeholder="请选择单位名称" clearable>
|
||||
<el-option v-for="item in unitOptions"
|
||||
:value="item.id"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
</search>
|
||||
</el-card>
|
||||
<el-card shadow="never">
|
||||
<table-tool>
|
||||
<el-button @click="onExport" icon="el-icon-s-promotion" type="primary" size="small">导出</el-button>
|
||||
</table-tool>
|
||||
<el-table :data="tableData" @sort-change="pageOrder" style="width: 100%">
|
||||
<el-table-column type="index" width="50px" label="序号" :index="indexMethod"></el-table-column>
|
||||
<el-table-column prop="userName" label="职工姓名"></el-table-column>
|
||||
<el-table-column prop="sex" label="性别"></el-table-column>
|
||||
<el-table-column prop="unionName" label="所属工会"></el-table-column>
|
||||
<el-table-column prop="unitName" label="所属单位"></el-table-column>
|
||||
<el-table-column prop="insuranceUserState" label="在职状态"></el-table-column>
|
||||
<el-table-column prop="medicalInsuranceState" label="医保状态"></el-table-column>
|
||||
<el-table-column prop="applyTime" label="申请时间"></el-table-column>
|
||||
<el-table-column prop="taskName" label="当前节点"></el-table-column>·
|
||||
<el-table-column prop="instanceState" label="流程状态">
|
||||
<template slot-scope="{row}">
|
||||
<enum-tag :value="row.instanceState" name="ProcessInstanceStateEnum" label_key="message"
|
||||
size="small"></enum-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" fixed="right" width="300px">
|
||||
<template slot-scope="{row}">
|
||||
<el-button @click="onView(row)" size="mini" type="primary">查看</el-button>
|
||||
<el-button @click="onDelete(row.id)" size="mini" type="danger">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<!--#include("/layouts/pagination.html"){}#-->
|
||||
</el-card>
|
||||
<template #view>
|
||||
<user-info ref="userInfoInfoRef"></user-info>
|
||||
</template>
|
||||
</guava>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
<!--#include('../common/userInfo.js'){}#-->
|
||||
new Vue({
|
||||
el: "#app",
|
||||
store,
|
||||
//分页数据
|
||||
mixins: [initTableMixins],
|
||||
components: {
|
||||
"user-info": userInfo
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
pageDataUrl: "/platform/mutualInsurance/collect/pageData",
|
||||
unionOptions: [],
|
||||
unitOptions: [],
|
||||
userOptions: [],
|
||||
projectList: [],
|
||||
}
|
||||
}
|
||||
,
|
||||
methods: {
|
||||
onExport() {
|
||||
this.$downLoad('/platform/mutualInsurance/collect/onExport', this.pageForm)
|
||||
},
|
||||
onView(row) {
|
||||
this.$refs.guava.view(()=>{
|
||||
this.$refs.userInfoInfoRef.onOpen(row)
|
||||
})
|
||||
},
|
||||
onEdit(row) {
|
||||
commonUtil.pjaxPush('/platform/mutualInsurance/apply/index?taskId=' + (row.startTaskId || '') + "&bizId=" + row.id)
|
||||
},
|
||||
onRevoke(row) {
|
||||
this.$confirm("您确定要撤回吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(() => {
|
||||
this.$axios.post("/flow/common/revokeTask", {taskId: row.startTaskId}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$message.success(res.msg)
|
||||
this.pageData()
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
|
||||
onDelete(id) {
|
||||
this.$confirm("您确定要删除吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(() => {
|
||||
this.$axios.post("/platform/mutualInsurance/collect/delete", {id}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$message.success(res.msg)
|
||||
this.pageData()
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
// 根据年度获取项目列表
|
||||
async getProjectByYear() {
|
||||
if (!this.pageForm.year) {
|
||||
this.projectList = [];
|
||||
this.pageForm.projectId = "";
|
||||
return;
|
||||
}
|
||||
try {
|
||||
// 修改为互助保障项目的查询接口
|
||||
const res = await this.$axios.post("/platform/mutualInsurance/project/listProject", {
|
||||
year: this.pageForm.year
|
||||
});
|
||||
if (res.code === 0) {
|
||||
this.projectList = res.data;
|
||||
// 如果当前选中的项目不在新列表中,清空选择
|
||||
if (this.pageForm.projectId && !res.data.some(item => item.id === this.pageForm.projectId)) {
|
||||
this.pageForm.projectId = "";
|
||||
}
|
||||
}
|
||||
} catch (error) {
|
||||
console.error("获取项目列表失败:", error);
|
||||
this.projectList = [];
|
||||
this.pageForm.projectId = "";
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
},
|
||||
created() {
|
||||
this.pageData()
|
||||
// 设置默认年份为当前年份
|
||||
const currentYear = new Date().getFullYear().toString();
|
||||
this.$set(this.pageForm, 'year', currentYear);
|
||||
// 获取当前年份的项目列表
|
||||
this.getProjectByYear();
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
+135
@@ -0,0 +1,135 @@
|
||||
const formEdit = {
|
||||
template: /*language=HTML*/ `
|
||||
<el-dialog :title="formData.id ? '编辑项目' : '新增项目'" :visible="visible" width="70%" :close-on-click-modal="false" :before-close="handleClose">
|
||||
<el-form :model="formData" :rules="formRules" label-width="110px" ref="form">
|
||||
<el-form-item label="事项名称" prop="projectName">
|
||||
<el-input v-model="formData.projectName" placeholder="请输入事项名称" maxlength="50"
|
||||
show-word-limit></el-input>
|
||||
</el-form-item>
|
||||
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="开始时间" prop="startTime">
|
||||
<el-date-picker v-model="formData.startTime" type="datetime"
|
||||
placeholder="请选择活动开始时间"
|
||||
value-format="yyyy-MM-dd HH:mm:ss" style="width: 100%">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="结束时间" prop="endTime">
|
||||
<el-date-picker v-model="formData.endTime" type="datetime"
|
||||
placeholder="请选择活动结束时间"
|
||||
value-format="yyyy-MM-dd HH:mm:ss" style="width: 100%">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-form-item label="内容详情" prop="content">
|
||||
<text-editor v-model="formData.content"></text-editor>
|
||||
</el-form-item>
|
||||
<el-form-item prop="files" label="附件">
|
||||
<file-upload :upload_number="5" :value.sync="formData.files"
|
||||
upload_result_type="url"
|
||||
upload_text="请上传附件"
|
||||
complete_result upload_mode="drag"
|
||||
upload_result_category="array"></file-upload>
|
||||
</el-form-item>
|
||||
<el-form-item prop="cover" label="封面">
|
||||
<file-upload :upload_number="5" :value.sync="formData.cover"
|
||||
upload_result_type="url"
|
||||
upload_text="请上传封面"
|
||||
complete_result upload_mode="drag"
|
||||
upload_result_category="array"></file-upload>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<div slot="footer" style="text-align: right">
|
||||
<el-button @click="handleClose">取消</el-button>
|
||||
<el-button @click="doSubmit" type="primary" :loading="submitting">确定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
`,
|
||||
data() {
|
||||
// 日期验证器
|
||||
const validateDateRange = (rule, value, callback) => {
|
||||
const { startTime, endTime } = this.formData
|
||||
|
||||
if (rule.field === "endTime" && startTime && endTime) {
|
||||
if (new Date(endTime) <= new Date(startTime)) {
|
||||
callback(new Error("结束时间必须晚于开始时间"))
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
callback()
|
||||
}
|
||||
|
||||
return {
|
||||
visible: false,
|
||||
submitting: false,
|
||||
formData: {},
|
||||
formRules: {
|
||||
projectName: [
|
||||
{ required: true, message: "请输入事项名称", trigger: "blur" },
|
||||
{ min: 1, max: 50, message: "长度在 1 到 50 个字符", trigger: "blur" }
|
||||
],
|
||||
startTime: [
|
||||
{ required: true, message: "请选择活动开始时间", trigger: "blur" }
|
||||
],
|
||||
endTime: [
|
||||
{ required: true, message: "请选择活动结束时间", trigger: "blur" },
|
||||
{ validator: validateDateRange, trigger: "blur" }
|
||||
],
|
||||
content: [{ required: true, message: "内容详情", trigger: "blur" }]
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 处理关闭弹窗
|
||||
handleClose() {
|
||||
this.visible = false;
|
||||
},
|
||||
|
||||
// 打开表单
|
||||
onOpen(id) {
|
||||
this.visible = true
|
||||
this.formData = {}
|
||||
|
||||
if (id) {
|
||||
// 如果是编辑模式,加载数据
|
||||
this.$axios.post("/platform/mutualInsurance/project/findOne", { id: id }).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.formData = res.data
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
async doSubmit() {
|
||||
const valid = await this.$refs['form'].validate()
|
||||
if (!valid) return
|
||||
|
||||
this.submitting = true
|
||||
|
||||
this.$confirm("您确定保存吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(() => {
|
||||
this.$axios.post('/platform/mutualInsurance/project/save', {data: JSON.stringify(this.formData)}).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.visible = false
|
||||
this.$message.success(res.msg)
|
||||
this.submitting = false
|
||||
// 通过 $emit 触发父组件的刷新方法
|
||||
this.$emit('refresh')
|
||||
}
|
||||
})
|
||||
}).catch(() => {
|
||||
this.submitting = false;
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
+51
@@ -0,0 +1,51 @@
|
||||
const projectInfo = {
|
||||
template: /*language=HTML*/ `
|
||||
<div>
|
||||
<div class="process-title">事项信息</div>
|
||||
|
||||
<el-descriptions :column="2" border class="flow-task-form">
|
||||
<el-descriptions-item label="年度">{{viewData.year}}</el-descriptions-item>
|
||||
<el-descriptions-item label="事项名称">{{viewData.projectName}}</el-descriptions-item>
|
||||
<el-descriptions-item label="开始时间">{{viewData.startTime}}</el-descriptions-item>
|
||||
<el-descriptions-item label="结束时间">{{viewData.endTime}}</el-descriptions-item>
|
||||
<el-descriptions-item label="详细信息" :span="2">
|
||||
<div v-html="stripHtmlTags(viewData.content)"></div>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="附件" :span="2">
|
||||
<file-preview v-if="viewData.files && viewData.files.length > 0" :files="viewData.files" complete_result></file-preview>
|
||||
<span v-else>暂无附件</span>
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</div>
|
||||
`,
|
||||
store,
|
||||
data() {
|
||||
return {
|
||||
visible: false,
|
||||
viewData: {},
|
||||
row: null
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 打开
|
||||
onOpen(projectId) {
|
||||
this.projectId = projectId
|
||||
this.visible = true
|
||||
this.getInfo()
|
||||
},
|
||||
// 获取申请信息
|
||||
getInfo() {
|
||||
this.$axios.post('/platform/mutualInsurance/project/findOne', {id: this.projectId}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.viewData = res.data
|
||||
}
|
||||
})
|
||||
},
|
||||
// 去除HTML标签的方法
|
||||
stripHtmlTags(html) {
|
||||
if (!html) return '';
|
||||
// 去除所有HTML标签
|
||||
return html.replace(/<[^>]*>/g, '');
|
||||
}
|
||||
}
|
||||
}
|
||||
+122
@@ -0,0 +1,122 @@
|
||||
const userInfo = {
|
||||
template: /*language=HTML*/ `
|
||||
<div>
|
||||
<div class="process-title">
|
||||
申请信息
|
||||
<el-link type="primary" @click="openChart">点击查看流程图</el-link>
|
||||
</div>
|
||||
<table-tool label="人员信息"></table-tool>
|
||||
<el-descriptions :column="2" border class="flow-task-form">
|
||||
<el-descriptions-item label="所属事项">{{viewData.projectName}}</el-descriptions-item>
|
||||
<el-descriptions-item label="申请模式">{{ viewData.mode}}</el-descriptions-item>
|
||||
<el-descriptions-item label="填写人姓名">{{ viewData.proxyUserName }}</el-descriptions-item>
|
||||
<el-descriptions-item label="填写人工号">{{ viewData.proxyLoginName }}</el-descriptions-item>
|
||||
<el-descriptions-item label="姓名">{{viewData.userName}}</el-descriptions-item>
|
||||
<el-descriptions-item label="工号">{{viewData.loginName}}</el-descriptions-item>
|
||||
<el-descriptions-item label="所属单位">{{viewData.unitName}}</el-descriptions-item>
|
||||
<el-descriptions-item label="所属工会">{{viewData.unionName}}</el-descriptions-item>
|
||||
<el-descriptions-item label="性别">{{viewData.sex}}</el-descriptions-item>
|
||||
<el-descriptions-item label="手机号">{{viewData.mobile}}</el-descriptions-item>
|
||||
<el-descriptions-item label="身份证号">{{viewData.idCard}}</el-descriptions-item>
|
||||
<el-descriptions-item label="医保状态" >{{viewData.medicalInsuranceState}}</el-descriptions-item>
|
||||
<el-descriptions-item label="在职状态">{{viewData.insuranceUserState}}</el-descriptions-item>
|
||||
<el-descriptions-item label="不在岗时间">{{viewData.noDutyTime}}</el-descriptions-item>
|
||||
<el-descriptions-item label="签字" >
|
||||
<el-image v-if="viewData.sign"
|
||||
:src="viewData.sign"
|
||||
class="signature-image"
|
||||
style="height: 60px"
|
||||
></el-image>
|
||||
<span v-else>暂无</span>
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
<template v-for="task in doneTasks">
|
||||
<div class="mt10">
|
||||
<div class="process-title">{{ task.displayName }}</div>
|
||||
<el-descriptions border class="flow-task-form" :column="3" :key="task.id"
|
||||
v-if="task.ext.isFirstTaskNode">
|
||||
<el-descriptions-item label="申请用户">{{ task.ext.initiatorName
|
||||
}}({{task.ext.initiatorAccount}})
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="申请时间">{{ task.finishTime }}</el-descriptions-item>
|
||||
<el-descriptions-item label="办理结果">
|
||||
<dict-tag :options="dict.type.PROCESS_TASK_SUBMIT_TYPE"
|
||||
:value="task.ext.submitType"></dict-tag>
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
|
||||
<el-descriptions border class="flow-task-form" :column="3" :key="task.id" v-else>
|
||||
<el-descriptions-item label="办理用户">{{ task.taskFormData.userName
|
||||
}}({{task.taskFormData.loginName}})
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="办理时间">{{ task.finishTime }}</el-descriptions-item>
|
||||
<el-descriptions-item label="办理结果">
|
||||
<dict-tag :options="dict.type.PROCESS_TASK_SUBMIT_TYPE"
|
||||
:value="task.ext.submitType"></dict-tag>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="办理意见" :span="3" v-if="!task.ext.isFirstTaskNode">{{
|
||||
task.taskFormData.opinion }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="签字" :span="3" v-if="!task.ext.isFirstTaskNode">
|
||||
<el-image :src="task.ext.tf_userSign"
|
||||
v-if="task.ext.tf_userSign"
|
||||
class="signature-image"
|
||||
style="height: 60px"
|
||||
></el-image>
|
||||
<span v-else>暂无</span>
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</div>
|
||||
</template>
|
||||
<slot></slot>
|
||||
|
||||
<snaker-chart ref="snakerChartRef"></snaker-chart>
|
||||
</div>
|
||||
`,
|
||||
store,
|
||||
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()
|
||||
},
|
||||
|
||||
// 获取申请信息
|
||||
getInfo() {
|
||||
this.$axios.post('/platform/mutualInsurance/apply/findOne', {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
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
// 查看流程图
|
||||
openChart(){
|
||||
this.$refs.snakerChartRef.onOpenFull(this.row.instanceProcessDefineId,this.row.instanceId)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,118 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
<div id="app">
|
||||
<guava ref="guava">
|
||||
<el-card shadow="never">
|
||||
<search @search="doSearch">
|
||||
<search-item label="年度">
|
||||
<el-date-picker v-model="pageForm.year" type="year" value-format="yyyy" placeholder="年度"
|
||||
style="width: 100%"></el-date-picker>
|
||||
</search-item>
|
||||
</search>
|
||||
</el-card>
|
||||
<el-card shadow="never">
|
||||
<table-tool></table-tool>
|
||||
<el-table :data="tableData" @sort-change="pageOrder" style="width: 100%">
|
||||
<el-table-column type="index" width="50px" label="序号" :index="indexMethod"></el-table-column>
|
||||
<el-table-column prop="userName" label="职工姓名"></el-table-column>
|
||||
<el-table-column prop="sex" label="性别"></el-table-column>
|
||||
<el-table-column prop="unionName" label="所属工会"></el-table-column>
|
||||
<el-table-column prop="unitName" label="所属单位"></el-table-column>
|
||||
<el-table-column prop="insuranceUserState" label="在职状态"></el-table-column>
|
||||
<el-table-column prop="medicalInsuranceState" label="医保状态"></el-table-column>
|
||||
<el-table-column prop="applyTime" label="申请时间"></el-table-column>
|
||||
<el-table-column prop="taskName" label="当前节点"></el-table-column>·
|
||||
<el-table-column prop="instanceState" label="流程状态">
|
||||
<template slot-scope="{row}">
|
||||
<enum-tag :value="row.instanceState" name="ProcessInstanceStateEnum" label_key="message"
|
||||
size="small"></enum-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" fixed="right" width="300px">
|
||||
<template slot-scope="{row}">
|
||||
<el-button @click="onView(row)" size="mini" type="primary">查看</el-button>
|
||||
<el-button v-if="row.taskKey === 'startTask' || !row.instanceId" @click="onEdit(row)" size="mini" type="primary">编辑</el-button>
|
||||
<el-button v-if="row.canRevoke" @click="onRevoke(row)" size="mini" type="danger">撤回
|
||||
</el-button>
|
||||
<el-button v-if="row.taskKey === 'startTask' || !row.instanceId" @click="onDelete(row.id)" size="mini" type="danger">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<!--#include("/layouts/pagination.html"){}#-->
|
||||
</el-card>
|
||||
<template #view>
|
||||
<user-info ref="userInfoInfoRef"></user-info>
|
||||
</template>
|
||||
</guava>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
<!--#include('../common/userInfo.js'){}#-->
|
||||
new Vue({
|
||||
el: "#app",
|
||||
store,
|
||||
//分页数据
|
||||
mixins: [initTableMixins],
|
||||
components: {
|
||||
"user-info": userInfo
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
pageDataUrl: "/platform/mutualInsurance/mine/pageData",
|
||||
unionOptions: [],
|
||||
unitOptions: [],
|
||||
userOptions: [],
|
||||
}
|
||||
}
|
||||
,
|
||||
methods: {
|
||||
onView(row) {
|
||||
this.$refs.guava.view(()=>{
|
||||
this.$refs.userInfoInfoRef.onOpen(row)
|
||||
})
|
||||
},
|
||||
onEdit(row) {
|
||||
commonUtil.pjaxPush('/platform/mutualInsurance/apply/index?taskId=' + (row.startTaskId || '') + "&bizId=" + row.id)
|
||||
},
|
||||
onRevoke(row) {
|
||||
this.$confirm("您确定要撤回吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(() => {
|
||||
this.$axios.post("/flow/common/revokeTask", {taskId: row.startTaskId}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$message.success(res.msg)
|
||||
this.pageData()
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
|
||||
onDelete(id) {
|
||||
this.$confirm("您确定要删除吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(() => {
|
||||
this.$axios.post("/platform/mutualInsurance/mine/delete", {id}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$message.success(res.msg)
|
||||
this.pageData()
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
},
|
||||
created() {
|
||||
this.pageData()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
+118
@@ -0,0 +1,118 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<el-card shadow="never">
|
||||
<search @search="doSearch">
|
||||
<search-item label="年度:">
|
||||
<el-date-picker placeholder="选择年度" type="year" style="width: 100%" v-model="pageForm.year" value-format="yyyy"></el-date-picker>
|
||||
</search-item>
|
||||
<search-item label="事项名称:">
|
||||
<el-input placeholder="请输入事项名称查询" clearable v-model="pageForm.searchKeyword"></el-input>
|
||||
</search-item>
|
||||
</search>
|
||||
</el-card>
|
||||
|
||||
<el-card shadow="never">
|
||||
<table-tool>
|
||||
<el-button size="mini" type="primary" icon="el-icon-plus" @click="openAdd">新增</el-button>
|
||||
</table-tool>
|
||||
<el-table :data="tableData">
|
||||
<el-table-column type="index" width="50px" label="序号" :index="indexMethod"></el-table-column>
|
||||
<el-table-column prop="projectName" label="事项名称" show-overflow-tooltip></el-table-column>
|
||||
<el-table-column prop="year" label="年度" show-overflow-tooltip></el-table-column>
|
||||
<el-table-column prop="startTime" label="开始时间"></el-table-column>
|
||||
<el-table-column prop="endTime" label="结束时间"></el-table-column>
|
||||
<el-table-column prop="isOpen" label="是否发布">
|
||||
<template slot-scope="{row}">
|
||||
<el-switch @change="switchChange(row)" active-color="#13ce66"
|
||||
inactive-color="#ff4949"
|
||||
v-model="row.isOpen"></el-switch>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="200px" fixed="right">
|
||||
<template slot-scope="{row}">
|
||||
<el-button size="mini" type="primary" @click="openEdit(row)">编辑</el-button>
|
||||
<el-button size="mini" type="danger" @click="onDelete(row.id)">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!--#include("/layouts/pagination.html"){}#-->
|
||||
</el-card>
|
||||
|
||||
<form-edit ref="formEditRef" @refresh="doSearch"></form-edit>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
<!--#include('../common/formEdit.js'){}#-->
|
||||
|
||||
new Vue({
|
||||
el: "#app",
|
||||
mixins: [initTableMixins],
|
||||
components: {
|
||||
"form-edit": formEdit
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
pageForm: {
|
||||
year: moment().format('YYYY') + "",
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 重写分页数据获取方法,使用正确的接口路径
|
||||
pageData() {
|
||||
this.tableLoading = true
|
||||
this.$axios
|
||||
.post("/platform/mutualInsurance/project/pageData", this.pageForm)
|
||||
.then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.tableData = res.data.list
|
||||
this.pageForm.totalCount = res.data.totalCount
|
||||
}
|
||||
})
|
||||
.finally(() => {
|
||||
this.tableLoading = false
|
||||
})
|
||||
},
|
||||
openAdd() {
|
||||
this.$refs.formEditRef.onOpen()
|
||||
},
|
||||
openEdit(row) {
|
||||
this.$refs.formEditRef.onOpen(row.id)
|
||||
},
|
||||
async switchChange(row) {
|
||||
const resp = await this.$axios.post("/platform/mutualInsurance/project/switchChange", row)
|
||||
if (resp.code === 0) {
|
||||
this.pageData()
|
||||
this.$message.success(resp.msg)
|
||||
} else {
|
||||
this.$message.warning(resp.msg)
|
||||
}
|
||||
},
|
||||
onDelete(id) {
|
||||
this.$confirm("您确定要删除吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
})
|
||||
.then(async () => {
|
||||
const { code, msg } = await this.$axios.post("/platform/mutualInsurance/project/delete", { id: id })
|
||||
if (code === 0) {
|
||||
this.$message.success(msg)
|
||||
this.doSearch()
|
||||
}
|
||||
})
|
||||
.catch(() => {})
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.pageData()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
+240
@@ -0,0 +1,240 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
<div id="app">
|
||||
<guava ref="guava">
|
||||
<el-card shadow="never">
|
||||
<search @search="doSearch">
|
||||
<search-item label="年度">
|
||||
<el-date-picker v-model="pageForm.year"
|
||||
type="year"
|
||||
value-format="yyyy"
|
||||
placeholder="年度"
|
||||
style="width: 100%"
|
||||
@change="getProjectByYear"
|
||||
></el-date-picker>
|
||||
</search-item>
|
||||
<search-item label="事项名称">
|
||||
<el-select v-model="pageForm.projectId" placeholder="请选择事项名称" clearable style="width: 100%" @change="doSearch">
|
||||
<el-option v-for="item in projectList"
|
||||
:value="item.id"
|
||||
:key="item.id"
|
||||
:label="item.projectName"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
<search-item label="姓名">
|
||||
<el-input placeholder="请输入姓名" clearable v-model="pageForm.userName"></el-input>
|
||||
</search-item>
|
||||
<search-item label="性别">
|
||||
<el-select v-model="pageForm.sex" placeholder="请选择性别" clearable style="width: 100%">
|
||||
<el-option label="男" value="男"></el-option>
|
||||
<el-option label="女" value="女"></el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
<search-item label="工会名称">
|
||||
<el-select v-model="pageForm.unionId" @change="doSearch" style="width: 100%"
|
||||
placeholder="请选择工会名称" clearable>
|
||||
<el-option v-for="item in unionOptions"
|
||||
:value="item.id"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
<search-item label="单位名称">
|
||||
<el-select v-model="pageForm.unitId" @change="doSearch" style="width: 100%"
|
||||
placeholder="请选择单位名称" clearable>
|
||||
<el-option v-for="item in unitOptions"
|
||||
:value="item.id"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
</search>
|
||||
</el-card>
|
||||
<el-card shadow="never">
|
||||
<table-tool><el-radio-group v-model="pageForm.approval" size="small" @change="doSearch">
|
||||
<el-radio-button :label="true">已审核</el-radio-button>
|
||||
<el-radio-button :label="false">未审核</el-radio-button>
|
||||
</el-radio-group>
|
||||
</table-tool>
|
||||
<el-table :data="tableData" @sort-change="pageOrder" style="width: 100%">
|
||||
<el-table-column type="index" width="50px" label="序号" :index="indexMethod"></el-table-column>
|
||||
<el-table-column prop="userName" label="职工姓名"></el-table-column>
|
||||
<el-table-column prop="sex" label="性别"></el-table-column>
|
||||
<el-table-column prop="unionName" label="所属工会"></el-table-column>
|
||||
<el-table-column prop="unitName" label="所属单位"></el-table-column>
|
||||
<el-table-column prop="insuranceUserState" label="在职状态"></el-table-column>
|
||||
<el-table-column prop="medicalInsuranceState" label="医保状态"></el-table-column>
|
||||
<el-table-column prop="applyTime" label="申请时间"></el-table-column>
|
||||
<el-table-column prop="curTaskName" label="当前节点"></el-table-column>·
|
||||
<el-table-column prop="instanceState" label="流程状态">
|
||||
<template slot-scope="{row}">
|
||||
<enum-tag :value="row.instanceState" name="ProcessInstanceStateEnum" label_key="message"
|
||||
size="small"></enum-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" fixed="right" width="300px">
|
||||
<template slot-scope="{row}">
|
||||
<el-button @click="onView(row)" size="mini" type="primary">查看</el-button>
|
||||
<el-button v-if="row.taskState === 10" @click="openAudit(row)" size="mini" type="primary">审核
|
||||
</el-button>
|
||||
<el-button v-if="row.canRevoke" @click="onRevoke(row)" size="mini" type="danger">撤回
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<!--#include("/layouts/pagination.html"){}#-->
|
||||
</el-card>
|
||||
<template #view>
|
||||
<user-info ref="userInfoInfoRef">
|
||||
<div v-if="showApprovalForm">
|
||||
<div class="process-title">
|
||||
{{formData.taskName}}
|
||||
</div>
|
||||
<el-form :model="formData" ref="formRef" :rules="formRules" label-width="0" label-suffix=":"
|
||||
class="flow-task-form">
|
||||
<el-form-item label="审批意见" prop="tf_opinion"
|
||||
:rules="[{required:true,message:'必填',trigger:['change','blur']}]">
|
||||
<user-opinion-textarea v-model="formData.tf_opinion"></user-opinion-textarea>
|
||||
</el-form-item>
|
||||
<el-form-item label="电子签名" prop="tf_userSign" :rules="[{required:true,message:'必填',trigger:['change','blur']}]">
|
||||
<pc-signature v-model="formData.tf_userSign"></pc-signature>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-row type="flex" justify="end">
|
||||
<el-button @click="$refs.guava.index()" size="small">取消</el-button>
|
||||
<el-button @click="handleTaskAction(6)" size="small" type="info">退回到发起人</el-button>
|
||||
<el-button @click="handleTaskAction(2)" size="small" type="danger">拒绝申请</el-button>
|
||||
<el-button @click="handleTaskAction(1)" size="small" type="primary">同意申请</el-button>
|
||||
</el-row>
|
||||
</div>
|
||||
</user-info>
|
||||
</template>
|
||||
</guava>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
<!--#include('../common/userInfo.js'){}#-->
|
||||
new Vue({
|
||||
el: "#app",
|
||||
store,
|
||||
//分页数据
|
||||
mixins: [initTableMixins],
|
||||
components: {
|
||||
"user-info": userInfo
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
pageDataUrl: "/platform/mutualInsurance/schoolAudit/pageData",
|
||||
pageForm: {
|
||||
approval: false
|
||||
},
|
||||
formData: {},
|
||||
showApprovalForm: false,
|
||||
unionOptions: [],
|
||||
unitOptions: [],
|
||||
userOptions: [],
|
||||
projectList: [],
|
||||
}
|
||||
}
|
||||
,
|
||||
methods: {
|
||||
onView(row) {
|
||||
this.$refs.guava.view(()=>{
|
||||
this.showApprovalForm = false;
|
||||
this.$refs.userInfoInfoRef.onOpen(row)
|
||||
})
|
||||
},
|
||||
openAudit(row) {
|
||||
this.$refs.guava.view(()=>{
|
||||
this.showApprovalForm = true
|
||||
this.formData = {
|
||||
processTaskId: row.taskId,
|
||||
taskName: row.curTaskName
|
||||
}
|
||||
this.$refs.userInfoInfoRef.onOpen(row)
|
||||
})
|
||||
},
|
||||
onRevoke(row) {
|
||||
this.$confirm("您确定要撤回吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(() => {
|
||||
this.$axios.post("/flow/common/revokeTask", {taskId: row.startTaskId}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$message.success(res.msg)
|
||||
this.pageData()
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
handleTaskAction(val) {
|
||||
this.$confirm("您确定要提交吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(() => {
|
||||
this.$axios.post("/flow/common/executeTask", {
|
||||
data: JSON.stringify({
|
||||
...this.formData,
|
||||
submitType: val
|
||||
})
|
||||
}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$refs.guava.index()
|
||||
this.$message.success(res.msg)
|
||||
this.doSearch()
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
// 根据年度获取项目列表
|
||||
async getProjectByYear() {
|
||||
if (!this.pageForm.year) {
|
||||
this.projectList = [];
|
||||
this.pageForm.projectId = "";
|
||||
return;
|
||||
}
|
||||
try {
|
||||
// 修改为互助保障项目的查询接口
|
||||
const res = await this.$axios.post("/platform/mutualInsurance/project/listProject", {
|
||||
year: this.pageForm.year
|
||||
});
|
||||
if (res.code === 0) {
|
||||
this.projectList = res.data;
|
||||
// 如果当前选中的项目不在新列表中,清空选择
|
||||
if (this.pageForm.projectId && !res.data.some(item => item.id === this.pageForm.projectId)) {
|
||||
this.pageForm.projectId = "";
|
||||
}
|
||||
}
|
||||
} catch (error) {
|
||||
console.error("获取项目列表失败:", error);
|
||||
this.projectList = [];
|
||||
this.pageForm.projectId = "";
|
||||
}
|
||||
},
|
||||
|
||||
},
|
||||
created() {
|
||||
this.pageData()
|
||||
//工会查询
|
||||
this.$businessTool.listUnion().then((res) => (this.unionOptions = res))
|
||||
//单位查询
|
||||
this.$businessTool.listUnit().then((res) => (this.unitOptions = res))
|
||||
// 设置默认年份为当前年份
|
||||
const currentYear = new Date().getFullYear().toString();
|
||||
this.$set(this.pageForm, 'year', currentYear);
|
||||
// 获取当前年份的项目列表
|
||||
this.getProjectByYear();
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
+240
@@ -0,0 +1,240 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
<div id="app">
|
||||
<guava ref="guava">
|
||||
<el-card shadow="never">
|
||||
<search @search="doSearch">
|
||||
<search-item label="年度">
|
||||
<el-date-picker v-model="pageForm.year"
|
||||
type="year"
|
||||
value-format="yyyy"
|
||||
placeholder="年度"
|
||||
style="width: 100%"
|
||||
@change="getProjectByYear"
|
||||
></el-date-picker>
|
||||
</search-item>
|
||||
<search-item label="事项名称">
|
||||
<el-select v-model="pageForm.projectId" placeholder="请选择事项名称" clearable style="width: 100%" @change="doSearch">
|
||||
<el-option v-for="item in projectList"
|
||||
:value="item.id"
|
||||
:key="item.id"
|
||||
:label="item.projectName"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
<search-item label="姓名">
|
||||
<el-input placeholder="请输入姓名" clearable v-model="pageForm.userName"></el-input>
|
||||
</search-item>
|
||||
<search-item label="性别">
|
||||
<el-select v-model="pageForm.sex" placeholder="请选择性别" clearable style="width: 100%">
|
||||
<el-option label="男" value="男"></el-option>
|
||||
<el-option label="女" value="女"></el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
<search-item label="工会名称">
|
||||
<el-select v-model="pageForm.unionId" @change="doSearch" style="width: 100%"
|
||||
placeholder="请选择工会名称" clearable>
|
||||
<el-option v-for="item in unionOptions"
|
||||
:value="item.id"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
<search-item label="单位名称">
|
||||
<el-select v-model="pageForm.unitId" @change="doSearch" style="width: 100%"
|
||||
placeholder="请选择单位名称" clearable>
|
||||
<el-option v-for="item in unitOptions"
|
||||
:value="item.id"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
</search>
|
||||
</el-card>
|
||||
<el-card shadow="never">
|
||||
<table-tool><el-radio-group v-model="pageForm.approval" size="small" @change="doSearch">
|
||||
<el-radio-button :label="true">已审核</el-radio-button>
|
||||
<el-radio-button :label="false">未审核</el-radio-button>
|
||||
</el-radio-group>
|
||||
</table-tool>
|
||||
<el-table :data="tableData" @sort-change="pageOrder" style="width: 100%">
|
||||
<el-table-column type="index" width="50px" label="序号" :index="indexMethod"></el-table-column>
|
||||
<el-table-column prop="userName" label="职工姓名"></el-table-column>
|
||||
<el-table-column prop="sex" label="性别"></el-table-column>
|
||||
<el-table-column prop="unionName" label="所属工会"></el-table-column>
|
||||
<el-table-column prop="unitName" label="所属单位"></el-table-column>
|
||||
<el-table-column prop="insuranceUserState" label="在职状态"></el-table-column>
|
||||
<el-table-column prop="medicalInsuranceState" label="医保状态"></el-table-column>
|
||||
<el-table-column prop="applyTime" label="申请时间"></el-table-column>
|
||||
<el-table-column prop="curTaskName" label="当前节点"></el-table-column>·
|
||||
<el-table-column prop="instanceState" label="流程状态">
|
||||
<template slot-scope="{row}">
|
||||
<enum-tag :value="row.instanceState" name="ProcessInstanceStateEnum" label_key="message"
|
||||
size="small"></enum-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" fixed="right" width="300px">
|
||||
<template slot-scope="{row}">
|
||||
<el-button @click="onView(row)" size="mini" type="primary">查看</el-button>
|
||||
<el-button v-if="row.taskState === 10" @click="openAudit(row)" size="mini" type="primary">审核
|
||||
</el-button>
|
||||
<el-button v-if="row.canRevoke" @click="onRevoke(row)" size="mini" type="danger">撤回
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<!--#include("/layouts/pagination.html"){}#-->
|
||||
</el-card>
|
||||
<template #view>
|
||||
<user-info ref="userInfoInfoRef">
|
||||
<div v-if="showApprovalForm">
|
||||
<div class="process-title">
|
||||
{{formData.taskName}}
|
||||
</div>
|
||||
<el-form :model="formData" ref="formRef" :rules="formRules" label-width="0" label-suffix=":"
|
||||
class="flow-task-form">
|
||||
<el-form-item label="审批意见" prop="tf_opinion"
|
||||
:rules="[{required:true,message:'必填',trigger:['change','blur']}]">
|
||||
<user-opinion-textarea v-model="formData.tf_opinion"></user-opinion-textarea>
|
||||
</el-form-item>
|
||||
<el-form-item label="电子签名" prop="tf_userSign" :rules="[{required:true,message:'必填',trigger:['change','blur']}]">
|
||||
<pc-signature v-model="formData.tf_userSign"></pc-signature>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-row type="flex" justify="end">
|
||||
<el-button @click="$refs.guava.index()" size="small">取消</el-button>
|
||||
<el-button @click="handleTaskAction(6)" size="small" type="info">退回到发起人</el-button>
|
||||
<el-button @click="handleTaskAction(2)" size="small" type="danger">拒绝申请</el-button>
|
||||
<el-button @click="handleTaskAction(1)" size="small" type="primary">同意申请</el-button>
|
||||
</el-row>
|
||||
</div>
|
||||
</user-info>
|
||||
</template>
|
||||
</guava>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
<!--#include('../common/userInfo.js'){}#-->
|
||||
new Vue({
|
||||
el: "#app",
|
||||
store,
|
||||
//分页数据
|
||||
mixins: [initTableMixins],
|
||||
components: {
|
||||
"user-info": userInfo
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
pageDataUrl: "/platform/mutualInsurance/secretaryAudit/pageData",
|
||||
pageForm: {
|
||||
approval: false
|
||||
},
|
||||
formData: {},
|
||||
showApprovalForm: false,
|
||||
unionOptions: [],
|
||||
unitOptions: [],
|
||||
userOptions: [],
|
||||
projectList: [],
|
||||
}
|
||||
}
|
||||
,
|
||||
methods: {
|
||||
onView(row) {
|
||||
this.$refs.guava.view(()=>{
|
||||
this.showApprovalForm = false;
|
||||
this.$refs.userInfoInfoRef.onOpen(row)
|
||||
})
|
||||
},
|
||||
openAudit(row) {
|
||||
this.$refs.guava.view(()=>{
|
||||
this.showApprovalForm = true
|
||||
this.formData = {
|
||||
processTaskId: row.taskId,
|
||||
taskName: row.curTaskName
|
||||
}
|
||||
this.$refs.userInfoInfoRef.onOpen(row)
|
||||
})
|
||||
},
|
||||
onRevoke(row) {
|
||||
this.$confirm("您确定要撤回吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(() => {
|
||||
this.$axios.post("/flow/common/revokeTask", {taskId: row.startTaskId}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$message.success(res.msg)
|
||||
this.pageData()
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
handleTaskAction(val) {
|
||||
this.$confirm("您确定要提交吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(() => {
|
||||
this.$axios.post("/flow/common/executeTask", {
|
||||
data: JSON.stringify({
|
||||
...this.formData,
|
||||
submitType: val
|
||||
})
|
||||
}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$refs.guava.index()
|
||||
this.$message.success(res.msg)
|
||||
this.doSearch()
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
// 根据年度获取项目列表
|
||||
async getProjectByYear() {
|
||||
if (!this.pageForm.year) {
|
||||
this.projectList = [];
|
||||
this.pageForm.projectId = "";
|
||||
return;
|
||||
}
|
||||
try {
|
||||
// 修改为互助保障项目的查询接口
|
||||
const res = await this.$axios.post("/platform/mutualInsurance/project/listProject", {
|
||||
year: this.pageForm.year
|
||||
});
|
||||
if (res.code === 0) {
|
||||
this.projectList = res.data;
|
||||
// 如果当前选中的项目不在新列表中,清空选择
|
||||
if (this.pageForm.projectId && !res.data.some(item => item.id === this.pageForm.projectId)) {
|
||||
this.pageForm.projectId = "";
|
||||
}
|
||||
}
|
||||
} catch (error) {
|
||||
console.error("获取项目列表失败:", error);
|
||||
this.projectList = [];
|
||||
this.pageForm.projectId = "";
|
||||
}
|
||||
},
|
||||
|
||||
},
|
||||
created() {
|
||||
this.pageData()
|
||||
//工会查询
|
||||
this.$businessTool.listUnion().then((res) => (this.unionOptions = res))
|
||||
//单位查询
|
||||
this.$businessTool.listUnit().then((res) => (this.unitOptions = res))
|
||||
// 设置默认年份为当前年份
|
||||
const currentYear = new Date().getFullYear().toString();
|
||||
this.$set(this.pageForm, 'year', currentYear);
|
||||
// 获取当前年份的项目列表
|
||||
this.getProjectByYear();
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
+240
@@ -0,0 +1,240 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
<div id="app">
|
||||
<guava ref="guava">
|
||||
<el-card shadow="never">
|
||||
<search @search="doSearch">
|
||||
<search-item label="年度">
|
||||
<el-date-picker v-model="pageForm.year"
|
||||
type="year"
|
||||
value-format="yyyy"
|
||||
placeholder="年度"
|
||||
style="width: 100%"
|
||||
@change="getProjectByYear"
|
||||
></el-date-picker>
|
||||
</search-item>
|
||||
<search-item label="事项名称">
|
||||
<el-select v-model="pageForm.projectId" placeholder="请选择事项名称" clearable style="width: 100%" @change="doSearch">
|
||||
<el-option v-for="item in projectList"
|
||||
:value="item.id"
|
||||
:key="item.id"
|
||||
:label="item.projectName"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
<search-item label="姓名">
|
||||
<el-input placeholder="请输入姓名" clearable v-model="pageForm.userName"></el-input>
|
||||
</search-item>
|
||||
<search-item label="性别">
|
||||
<el-select v-model="pageForm.sex" placeholder="请选择性别" clearable style="width: 100%">
|
||||
<el-option label="男" value="男"></el-option>
|
||||
<el-option label="女" value="女"></el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
<search-item label="工会名称">
|
||||
<el-select v-model="pageForm.unionId" @change="doSearch" style="width: 100%"
|
||||
placeholder="请选择工会名称" clearable>
|
||||
<el-option v-for="item in unionOptions"
|
||||
:value="item.id"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
<search-item label="单位名称">
|
||||
<el-select v-model="pageForm.unitId" @change="doSearch" style="width: 100%"
|
||||
placeholder="请选择单位名称" clearable>
|
||||
<el-option v-for="item in unitOptions"
|
||||
:value="item.id"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
</search>
|
||||
</el-card>
|
||||
<el-card shadow="never">
|
||||
<table-tool><el-radio-group v-model="pageForm.approval" size="small" @change="doSearch">
|
||||
<el-radio-button :label="true">已审核</el-radio-button>
|
||||
<el-radio-button :label="false">未审核</el-radio-button>
|
||||
</el-radio-group>
|
||||
</table-tool>
|
||||
<el-table :data="tableData" @sort-change="pageOrder" style="width: 100%">
|
||||
<el-table-column type="index" width="50px" label="序号" :index="indexMethod"></el-table-column>
|
||||
<el-table-column prop="userName" label="职工姓名"></el-table-column>
|
||||
<el-table-column prop="sex" label="性别"></el-table-column>
|
||||
<el-table-column prop="unionName" label="所属工会"></el-table-column>
|
||||
<el-table-column prop="unitName" label="所属单位"></el-table-column>
|
||||
<el-table-column prop="insuranceUserState" label="在职状态"></el-table-column>
|
||||
<el-table-column prop="medicalInsuranceState" label="医保状态"></el-table-column>
|
||||
<el-table-column prop="applyTime" label="申请时间"></el-table-column>
|
||||
<el-table-column prop="curTaskName" label="当前节点"></el-table-column>·
|
||||
<el-table-column prop="instanceState" label="流程状态">
|
||||
<template slot-scope="{row}">
|
||||
<enum-tag :value="row.instanceState" name="ProcessInstanceStateEnum" label_key="message"
|
||||
size="small"></enum-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" fixed="right" width="300px">
|
||||
<template slot-scope="{row}">
|
||||
<el-button @click="onView(row)" size="mini" type="primary">查看</el-button>
|
||||
<el-button v-if="row.taskState === 10" @click="openAudit(row)" size="mini" type="primary">审核
|
||||
</el-button>
|
||||
<el-button v-if="row.canRevoke" @click="onRevoke(row)" size="mini" type="danger">撤回
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<!--#include("/layouts/pagination.html"){}#-->
|
||||
</el-card>
|
||||
<template #view>
|
||||
<user-info ref="userInfoInfoRef">
|
||||
<div v-if="showApprovalForm">
|
||||
<div class="process-title">
|
||||
{{formData.taskName}}
|
||||
</div>
|
||||
<el-form :model="formData" ref="formRef" :rules="formRules" label-width="0" label-suffix=":"
|
||||
class="flow-task-form">
|
||||
<el-form-item label="审批意见" prop="tf_opinion"
|
||||
:rules="[{required:true,message:'必填',trigger:['change','blur']}]">
|
||||
<user-opinion-textarea v-model="formData.tf_opinion"></user-opinion-textarea>
|
||||
</el-form-item>
|
||||
<el-form-item label="电子签名" prop="tf_userSign" :rules="[{required:true,message:'必填',trigger:['change','blur']}]">
|
||||
<pc-signature v-model="formData.tf_userSign"></pc-signature>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-row type="flex" justify="end">
|
||||
<el-button @click="$refs.guava.index()" size="small">取消</el-button>
|
||||
<el-button @click="handleTaskAction(6)" size="small" type="info">退回到发起人</el-button>
|
||||
<el-button @click="handleTaskAction(2)" size="small" type="danger">拒绝申请</el-button>
|
||||
<el-button @click="handleTaskAction(1)" size="small" type="primary">同意申请</el-button>
|
||||
</el-row>
|
||||
</div>
|
||||
</user-info>
|
||||
</template>
|
||||
</guava>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
<!--#include('../common/userInfo.js'){}#-->
|
||||
new Vue({
|
||||
el: "#app",
|
||||
store,
|
||||
//分页数据
|
||||
mixins: [initTableMixins],
|
||||
components: {
|
||||
"user-info": userInfo
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
pageDataUrl: "/platform/mutualInsurance/unionAudit/pageData",
|
||||
pageForm: {
|
||||
approval: false
|
||||
},
|
||||
formData: {},
|
||||
showApprovalForm: false,
|
||||
unionOptions: [],
|
||||
unitOptions: [],
|
||||
userOptions: [],
|
||||
projectList: [],
|
||||
}
|
||||
}
|
||||
,
|
||||
methods: {
|
||||
onView(row) {
|
||||
this.$refs.guava.view(()=>{
|
||||
this.showApprovalForm = false;
|
||||
this.$refs.userInfoInfoRef.onOpen(row)
|
||||
})
|
||||
},
|
||||
openAudit(row) {
|
||||
this.$refs.guava.view(()=>{
|
||||
this.showApprovalForm = true
|
||||
this.formData = {
|
||||
processTaskId: row.taskId,
|
||||
taskName: row.curTaskName
|
||||
}
|
||||
this.$refs.userInfoInfoRef.onOpen(row)
|
||||
})
|
||||
},
|
||||
onRevoke(row) {
|
||||
this.$confirm("您确定要撤回吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(() => {
|
||||
this.$axios.post("/flow/common/revokeTask", {taskId: row.startTaskId}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$message.success(res.msg)
|
||||
this.pageData()
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
handleTaskAction(val) {
|
||||
this.$confirm("您确定要提交吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(() => {
|
||||
this.$axios.post("/flow/common/executeTask", {
|
||||
data: JSON.stringify({
|
||||
...this.formData,
|
||||
submitType: val
|
||||
})
|
||||
}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$refs.guava.index()
|
||||
this.$message.success(res.msg)
|
||||
this.doSearch()
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
// 根据年度获取项目列表
|
||||
async getProjectByYear() {
|
||||
if (!this.pageForm.year) {
|
||||
this.projectList = [];
|
||||
this.pageForm.projectId = "";
|
||||
return;
|
||||
}
|
||||
try {
|
||||
// 修改为互助保障项目的查询接口
|
||||
const res = await this.$axios.post("/platform/mutualInsurance/project/listProject", {
|
||||
year: this.pageForm.year
|
||||
});
|
||||
if (res.code === 0) {
|
||||
this.projectList = res.data;
|
||||
// 如果当前选中的项目不在新列表中,清空选择
|
||||
if (this.pageForm.projectId && !res.data.some(item => item.id === this.pageForm.projectId)) {
|
||||
this.pageForm.projectId = "";
|
||||
}
|
||||
}
|
||||
} catch (error) {
|
||||
console.error("获取项目列表失败:", error);
|
||||
this.projectList = [];
|
||||
this.pageForm.projectId = "";
|
||||
}
|
||||
},
|
||||
|
||||
},
|
||||
created() {
|
||||
this.pageData()
|
||||
//工会查询
|
||||
this.$businessTool.listUnion().then((res) => (this.unionOptions = res))
|
||||
//单位查询
|
||||
this.$businessTool.listUnit().then((res) => (this.unitOptions = res))
|
||||
// 设置默认年份为当前年份
|
||||
const currentYear = new Date().getFullYear().toString();
|
||||
this.$set(this.pageForm, 'year', currentYear);
|
||||
// 获取当前年份的项目列表
|
||||
this.getProjectByYear();
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -18,7 +18,7 @@ layout("/layouts/platform_h5.html"){
|
||||
<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="从信息中心获取"
|
||||
<van-field label="出生年月" v-model="formattedBirthday" placeholder="从信息中心获取"
|
||||
readonly></van-field>
|
||||
<van-field label="原工作单位" v-model="formData.unitName" placeholder="从信息中心获取"
|
||||
readonly></van-field>
|
||||
@@ -155,8 +155,8 @@ layout("/layouts/platform_h5.html"){
|
||||
// 性别选择器
|
||||
showLoverSexPicker: false,
|
||||
loverSexColumns: [
|
||||
{ value: '男性', text: '男性' },
|
||||
{ value: '女性', text: '女性' }
|
||||
{ value: '男', text: '男' },
|
||||
{ value: '女', text: '女' }
|
||||
],
|
||||
// 日期选择器
|
||||
showDatePopup: false,
|
||||
@@ -165,8 +165,39 @@ layout("/layouts/platform_h5.html"){
|
||||
maxDate: new Date(2040, 11, 31)
|
||||
}
|
||||
},
|
||||
|
||||
computed: {
|
||||
// 格式化出生年月显示
|
||||
formattedBirthday() {
|
||||
return this.formatDate(this.formData.birthday);
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 添加日期格式化方法
|
||||
formatDate(date) {
|
||||
if (!date) return '';
|
||||
// 如果已经是 yyyy-MM-dd 格式,直接返回
|
||||
if (typeof date === 'string' && /^\d{4}-\d{2}-\d{2}/.test(date)) {
|
||||
// 如果包含时间,只取日期部分
|
||||
if (date.length > 10) {
|
||||
return date.substring(0, 10);
|
||||
}
|
||||
return date;
|
||||
}
|
||||
// 否则转换为 yyyy-MM-dd 格式
|
||||
try {
|
||||
const d = new Date(date);
|
||||
if (isNaN(d.getTime())) {
|
||||
return date;
|
||||
}
|
||||
const year = d.getFullYear();
|
||||
const month = String(d.getMonth() + 1).padStart(2, '0');
|
||||
const day = String(d.getDate()).padStart(2, '0');
|
||||
return year + '-' + month + '-' + day;
|
||||
} catch (e) {
|
||||
return date;
|
||||
}
|
||||
},
|
||||
|
||||
// 显示日期选择器
|
||||
showDatePicker(fieldName) {
|
||||
this.currentDatePickerField = fieldName;
|
||||
@@ -175,7 +206,7 @@ layout("/layouts/platform_h5.html"){
|
||||
|
||||
// 日期确认事件
|
||||
onDateConfirm(value) {
|
||||
const formattedDate = this.$moment(value).format("YYYY-MM-DD");
|
||||
const formattedDate = this.formatDate(value);
|
||||
this.$set(this.formData, this.currentDatePickerField, formattedDate);
|
||||
this.showDatePopup = false;
|
||||
},
|
||||
@@ -351,6 +382,13 @@ layout("/layouts/platform_h5.html"){
|
||||
this.$axios.post("/platform/dsznfmtx/apply/findOne", {id: this.bizId}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.formData = res.data;
|
||||
// 格式化所有日期字段
|
||||
const dateFields = ['birthday', 'retireTime', 'marryTime', 'childrenBirthday', 'getCertificateTime'];
|
||||
dateFields.forEach(field => {
|
||||
if (this.formData[field]) {
|
||||
this.$set(this.formData, field, this.formatDate(this.formData[field]));
|
||||
}
|
||||
});
|
||||
}
|
||||
})
|
||||
} else {
|
||||
@@ -363,7 +401,7 @@ layout("/layouts/platform_h5.html"){
|
||||
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)
|
||||
this.$set(this.formData, "birthday", this.formatDate(user.birthday))
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
@@ -6,15 +6,15 @@ const DSZNFMTX_INFO = {
|
||||
<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="出生年月">{{ formatDate(viewData.birthday) }}</van-cell>
|
||||
<van-cell title="原工作单位">{{ viewData.unitName }}</van-cell>
|
||||
<van-cell title="退休时间">{{ viewData.retireTime }}</van-cell>
|
||||
<van-cell title="退休时间">{{ formatDate(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="结婚日期">{{ formatDate(viewData.marryTime) }}</van-cell>
|
||||
<van-cell title="子女出生日">{{ formatDate(viewData.childrenBirthday) }}</van-cell>
|
||||
<van-cell title="领独生子女光时间">{{ formatDate(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>
|
||||
@@ -39,7 +39,7 @@ const DSZNFMTX_INFO = {
|
||||
{{ task.ext.initiatorName}}({{task.ext.initiatorAccount}})
|
||||
</van-cell>
|
||||
<van-cell title="申请时间">
|
||||
{{ task.finishTime}}
|
||||
{{ formatDate(task.finishTime) }}
|
||||
</van-cell>
|
||||
<van-cell title="办理结果">
|
||||
<dict-tag :options="dict.type.PROCESS_TASK_SUBMIT_TYPE"
|
||||
@@ -51,7 +51,7 @@ const DSZNFMTX_INFO = {
|
||||
{{ task.taskFormData.userName}}({{task.taskFormData.loginName}})
|
||||
</van-cell>
|
||||
<van-cell title="办理时间">
|
||||
{{ task.finishTime}}
|
||||
{{ formatDate(task.finishTime) }}
|
||||
</van-cell>
|
||||
<van-cell title="办理结果">
|
||||
<dict-tag :options="dict.type.PROCESS_TASK_SUBMIT_TYPE"
|
||||
@@ -86,6 +86,32 @@ const DSZNFMTX_INFO = {
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 添加日期格式化方法
|
||||
formatDate(date) {
|
||||
if (!date) return '';
|
||||
// 如果已经是 yyyy-MM-dd 格式,直接返回
|
||||
if (typeof date === 'string' && /^\d{4}-\d{2}-\d{2}/.test(date)) {
|
||||
// 如果包含时间,只取日期部分
|
||||
if (date.length > 10) {
|
||||
return date.substring(0, 10);
|
||||
}
|
||||
return date;
|
||||
}
|
||||
// 否则转换为 yyyy-MM-dd 格式
|
||||
try {
|
||||
const d = new Date(date);
|
||||
if (isNaN(d.getTime())) {
|
||||
return date;
|
||||
}
|
||||
const year = d.getFullYear();
|
||||
const month = String(d.getMonth() + 1).padStart(2, '0');
|
||||
const day = String(d.getDate()).padStart(2, '0');
|
||||
return year + '-' + month + '-' + day;
|
||||
} catch (e) {
|
||||
return date;
|
||||
}
|
||||
},
|
||||
|
||||
onOpen(row) {
|
||||
this.row = row
|
||||
this.visible = true
|
||||
|
||||
+6
-6
@@ -173,8 +173,8 @@ layout("/layouts/platform_h5.html"){
|
||||
// 性别
|
||||
showLoverSexPicker: false,
|
||||
loverSexColumns: [
|
||||
{ value: '男性', text: '男性' },
|
||||
{ value: '女性', text: '女性' }
|
||||
{ value: '男', text: '男' },
|
||||
{ value: '女', text: '女' }
|
||||
],
|
||||
showLoverBirthdayPicker: false,
|
||||
showStartTimePicker: false,
|
||||
@@ -249,7 +249,7 @@ layout("/layouts/platform_h5.html"){
|
||||
isMale(newVal) {
|
||||
if (newVal) {
|
||||
// 男性默认设置
|
||||
this.$set(this.formData, 'loverSex', '女性');
|
||||
this.$set(this.formData, 'loverSex', '女');
|
||||
this.$set(this.formData, 'withLeave', 15);
|
||||
this.$set(this.formData, 'parentalLeave', 10);
|
||||
}
|
||||
@@ -257,7 +257,7 @@ layout("/layouts/platform_h5.html"){
|
||||
isFemale(newVal) {
|
||||
if (newVal) {
|
||||
// 女性默认设置
|
||||
this.$set(this.formData, 'loverSex', '男性');
|
||||
this.$set(this.formData, 'loverSex', '男');
|
||||
this.$set(this.formData, 'maternityLeave', 98);
|
||||
this.$set(this.formData, 'extendLeave', 60);
|
||||
}
|
||||
@@ -561,7 +561,7 @@ layout("/layouts/platform_h5.html"){
|
||||
// 根据性别设置默认值
|
||||
if (this.isMale) {
|
||||
// 男性默认设置
|
||||
this.$set(this.formData, 'loverSex', '女性');
|
||||
this.$set(this.formData, 'loverSex', '女');
|
||||
this.$set(this.formData, 'withLeave', 15);
|
||||
this.$set(this.formData, 'parentalLeave', 10);
|
||||
// 男性默认产假和延长假为0
|
||||
@@ -569,7 +569,7 @@ layout("/layouts/platform_h5.html"){
|
||||
this.$set(this.formData, 'extendLeave', 0);
|
||||
} else if (this.isFemale) {
|
||||
// 女性默认设置
|
||||
this.$set(this.formData, 'loverSex', '男性');
|
||||
this.$set(this.formData, 'loverSex', '男');
|
||||
this.$set(this.formData, 'maternityLeave', 98);
|
||||
this.$set(this.formData, 'extendLeave', 60);
|
||||
// 女性默认陪产假和育儿假为0
|
||||
|
||||
Reference in New Issue
Block a user