first commit
This commit is contained in:
@@ -0,0 +1,431 @@
|
||||
<!--#
|
||||
layout("/layouts/platform_h5.html"){
|
||||
#-->
|
||||
|
||||
<style>
|
||||
.signature-image {
|
||||
max-width: 200px;
|
||||
max-height: 100px;
|
||||
}
|
||||
</style>
|
||||
<div id="app" v-cloak>
|
||||
<van-nav-bar title="独生子女父母退休申请" left-text="返回" left-arrow @click-left="historyBack" placeholder fixed z-index="999"
|
||||
class="custom-nav"></van-nav-bar>
|
||||
|
||||
<div class="form-container">
|
||||
<van-form ref="formRef">
|
||||
<van-cell-group title="人员信息" class="form-section">
|
||||
<van-field label="职工姓名" v-model="formData.userName" placeholder="从信息中心获取"
|
||||
readonly></van-field>
|
||||
<van-field label="性别" v-model="formData.sex" placeholder="从信息中心获取" readonly></van-field>
|
||||
<van-field label="出生年月" v-model="formattedBirthday" placeholder="从信息中心获取"
|
||||
readonly></van-field>
|
||||
<van-field label="原工作单位" v-model="formData.unitName" placeholder="从信息中心获取"
|
||||
readonly></van-field>
|
||||
<van-field label="退休时间"
|
||||
v-model="formData.retireTime"
|
||||
placeholder="请选择退休时间"
|
||||
readonly
|
||||
@click="showDatePicker('retireTime')"
|
||||
clickable
|
||||
required
|
||||
></van-field>
|
||||
<van-field label="爱人姓名" v-model="formData.loverName" placeholder="请输入爱人姓名" required></van-field>
|
||||
<van-field
|
||||
v-model="formData.loverSex"
|
||||
name="loverSex"
|
||||
label="性别"
|
||||
readonly
|
||||
placeholder="请选择性别"
|
||||
@click="showLoverSexPicker = true"
|
||||
clickable
|
||||
required
|
||||
></van-field>
|
||||
<van-popup position="bottom" round v-model:show="showLoverSexPicker">
|
||||
<van-picker :columns="loverSexColumns" @cancel="showLoverSexPicker = false"
|
||||
@confirm="onLoverSexConfirm" show-toolbar ></van-picker>
|
||||
</van-popup>
|
||||
<van-field label="工作单位" v-model="formData.loverUnitName" placeholder="请输入工作单位" required></van-field>
|
||||
|
||||
<van-field label="结婚日期"
|
||||
v-model="formData.marryTime"
|
||||
placeholder="请选择结婚日期"
|
||||
readonly
|
||||
@click="showDatePicker('marryTime')"
|
||||
clickable
|
||||
required
|
||||
></van-field>
|
||||
<van-field label="子女出生日"
|
||||
v-model="formData.childrenBirthday"
|
||||
placeholder="请选择子女出生日"
|
||||
readonly
|
||||
@click="showDatePicker('childrenBirthday')"
|
||||
clickable
|
||||
required
|
||||
></van-field>
|
||||
<van-field label="领独生子女证日"
|
||||
v-model="formData.getCertificateTime"
|
||||
placeholder="请选择日期"
|
||||
readonly
|
||||
@click="showDatePicker('getCertificateTime')"
|
||||
clickable
|
||||
required
|
||||
></van-field>
|
||||
<van-field label="独生子女光荣证号" v-model="formData.childrenGraceNumber" placeholder="请输入独生子女光荣证号" required></van-field>
|
||||
<van-field label="办证机关" v-model="formData.office" placeholder="请输入办证机关" required></van-field>
|
||||
<van-field class="more-text" name="honorFiles"
|
||||
label="独生子女父母光荣证" required>
|
||||
<template #input>
|
||||
<h5-file-upload
|
||||
slot="input"
|
||||
:value.sync="formData.honorFiles"
|
||||
:upload_number="10"
|
||||
upload_mode="file"
|
||||
upload_result_category="array"
|
||||
upload_result_type="url"
|
||||
complete_result
|
||||
></h5-file-upload>
|
||||
</template>
|
||||
</van-field>
|
||||
<van-field class="more-text" name="retireFiles"
|
||||
label="退休证" required>
|
||||
<template #input>
|
||||
<h5-file-upload
|
||||
slot="input"
|
||||
:value.sync="formData.retireFiles"
|
||||
:upload_number="10"
|
||||
upload_mode="file"
|
||||
upload_result_category="array"
|
||||
upload_result_type="url"
|
||||
complete_result
|
||||
></h5-file-upload>
|
||||
</template>
|
||||
</van-field>
|
||||
<van-field class="more-text" name="sign" label="">
|
||||
<template #input>
|
||||
<h5-signature v-model="formData.sign" slot="input"></h5-signature>
|
||||
</template>
|
||||
</van-field>
|
||||
</van-cell-group>
|
||||
|
||||
<van-field name="declarationAgreed" class="declaration-checkbox">
|
||||
<template #input>
|
||||
<van-checkbox v-model="formData.declarationAgreed" checked-color="#ee0a24">
|
||||
我已阅读并同意以下声明
|
||||
</van-checkbox>
|
||||
</template>
|
||||
</van-field>
|
||||
<van-cell class="declaration-text">
|
||||
根据《河北省人口与计划生育条例》第四章第三十四条第四款"独生子女父母是国家工作人员、企事业单位员工的,退休时分别给予不低于三千元一次性奖励"的规定。<br/>
|
||||
说明:1. 本人应如实填写各项情况。2. 申报时需持《独生子女父母光荣证》、《退休证》原件及其复印件各一份。
|
||||
</van-cell>
|
||||
</van-cell-group>
|
||||
|
||||
<!-- 日期选择器弹窗 -->
|
||||
<van-popup position="bottom" round v-model:show="showDatePopup">
|
||||
<van-datetime-picker
|
||||
type="date"
|
||||
:min-date="minDate"
|
||||
:max-date="maxDate"
|
||||
@confirm="onDateConfirm"
|
||||
@cancel="showDatePopup = false"
|
||||
show-toolbar
|
||||
/>
|
||||
</van-popup>
|
||||
|
||||
<!-- 提交按钮 -->
|
||||
<div class="form-actions">
|
||||
<van-button plain @click="onSave" type="info">保存</van-button>
|
||||
<van-button @click="onSubmit" type="primary" v-if="!taskId">提交</van-button>
|
||||
<van-button @click="onSubmitAgain" type="primary" v-else>提交</van-button>
|
||||
</div>
|
||||
</van-form>
|
||||
</div>
|
||||
</div>
|
||||
<script nonce="${cspNonce!}">
|
||||
new Vue({
|
||||
store,
|
||||
el: '#app',
|
||||
dicts: ["USER_NATION"],
|
||||
data() {
|
||||
return {
|
||||
bizId: GetQueryString("bizId"),
|
||||
taskId: GetQueryString("taskId"),
|
||||
formData: {},
|
||||
// 性别选择器
|
||||
showLoverSexPicker: false,
|
||||
loverSexColumns: [
|
||||
{ value: '男', text: '男' },
|
||||
{ value: '女', text: '女' }
|
||||
],
|
||||
// 日期选择器
|
||||
showDatePopup: false,
|
||||
currentDatePickerField: '', // 当前正在选择日期的字段名
|
||||
minDate: new Date(1950, 0, 1),
|
||||
maxDate: new Date(2040, 11, 31)
|
||||
}
|
||||
},
|
||||
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;
|
||||
this.showDatePopup = true;
|
||||
},
|
||||
|
||||
// 日期确认事件
|
||||
onDateConfirm(value) {
|
||||
const formattedDate = this.formatDate(value);
|
||||
this.$set(this.formData, this.currentDatePickerField, formattedDate);
|
||||
this.showDatePopup = false;
|
||||
},
|
||||
|
||||
async onSave() {
|
||||
// 保存时不需要验证,直接提交数据
|
||||
this.$axios.post("/platform/dsznfmtx/apply/save", {data: JSON.stringify(this.formData)})
|
||||
.then((res) => {
|
||||
this.$toast.clear();
|
||||
if (res.code === 0) {
|
||||
this.$toast.success(res.msg);
|
||||
pjaxReplace('/platform/dsznfmtx/mine/h5')
|
||||
} else {
|
||||
this.$toast.fail(res.msg || '保存失败');
|
||||
}
|
||||
})
|
||||
.catch(err => {
|
||||
this.$toast.clear();
|
||||
this.$toast.fail('网络错误,请稍后重试');
|
||||
});
|
||||
},
|
||||
|
||||
// 提交前进行表单验证
|
||||
async validateForm() {
|
||||
const errors = [];
|
||||
|
||||
// 必填字段验证
|
||||
if (!this.formData.retireTime) {
|
||||
errors.push('请选择退休时间');
|
||||
}
|
||||
if (!this.formData.loverName) {
|
||||
errors.push('请输入爱人姓名');
|
||||
}
|
||||
if (!this.formData.loverSex) {
|
||||
errors.push('请选择爱人性别');
|
||||
}
|
||||
if (!this.formData.loverUnitName) {
|
||||
errors.push('请输入爱人工作单位');
|
||||
}
|
||||
if (!this.formData.marryTime) {
|
||||
errors.push('请选择结婚日期');
|
||||
}
|
||||
if (!this.formData.childrenBirthday) {
|
||||
errors.push('请选择子女出生日');
|
||||
}
|
||||
if (!this.formData.getCertificateTime) {
|
||||
errors.push('请选择领独生子女证日');
|
||||
}
|
||||
if (!this.formData.childrenGraceNumber) {
|
||||
errors.push('请输入独生子女光荣证号');
|
||||
}
|
||||
if (!this.formData.office) {
|
||||
errors.push('请输入办证机关');
|
||||
}
|
||||
if (!this.formData.honorFiles || this.formData.honorFiles.length === 0) {
|
||||
errors.push('请上传独生子女父母光荣证');
|
||||
}
|
||||
if (!this.formData.retireFiles || this.formData.retireFiles.length === 0) {
|
||||
errors.push('请上传退休证');
|
||||
}
|
||||
// if (!this.formData.sign) {
|
||||
// errors.push('请签字');
|
||||
// }
|
||||
if (!this.formData.declarationAgreed) {
|
||||
errors.push('请阅读并同意声明');
|
||||
}
|
||||
|
||||
return errors;
|
||||
},
|
||||
// 添加检查是否为退休人员的方法
|
||||
async checkRetirementStatus() {
|
||||
try {
|
||||
const resp = await this.$axios.post('/platform/dsznfmtx/apply/checkRetirementStatus');
|
||||
// 如果返回code为0且data为true,表示用户是退休人员
|
||||
if (resp.code === 0 && resp.data === true) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
} catch (error) {
|
||||
console.error('检查退休状态失败:', error);
|
||||
return false;
|
||||
}
|
||||
},
|
||||
// 检查用户是否已申请过
|
||||
async checkUserApplication() {
|
||||
try {
|
||||
const resp = await this.$axios.post('/platform/dsznfmtx/apply/checkUserApplied');
|
||||
// 如果返回code为0且data为true,表示用户已申请过
|
||||
if (resp.code === 0 && resp.data === true) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
} catch (error) {
|
||||
console.error('检查用户申请状态失败:', error);
|
||||
return false;
|
||||
}
|
||||
},
|
||||
// 提交
|
||||
async onSubmit() {
|
||||
// 检查是否为退休人员
|
||||
const isRetired = await this.checkRetirementStatus();
|
||||
if (!isRetired) {
|
||||
this.$message.warning('您不是退休人员,无法申请此项福利');
|
||||
return;
|
||||
}
|
||||
if (!this.bizId) {
|
||||
const isApplied = await this.checkUserApplication();
|
||||
if (isApplied) {
|
||||
this.$message.warning('您已经提交过申请,不能重复申请');
|
||||
return;
|
||||
}
|
||||
}
|
||||
// 提交时进行表单验证
|
||||
const errors = await this.validateForm();
|
||||
if (errors.length > 0) {
|
||||
this.$toast.fail(errors[0]); // 显示第一条错误信息
|
||||
return;
|
||||
}
|
||||
|
||||
this.$axios.post('/platform/dsznfmtx/apply/submit', {data: JSON.stringify(this.formData)})
|
||||
.then(res => {
|
||||
this.$toast.clear();
|
||||
if (res.code === 0) {
|
||||
this.$toast.success("提交成功");
|
||||
pjaxReplace('/platform/dsznfmtx/mine/h5')
|
||||
} else {
|
||||
this.$toast.fail(res.msg || '提交失败');
|
||||
}
|
||||
})
|
||||
.catch(err => {
|
||||
this.$toast.clear();
|
||||
this.$toast.fail('网络错误,请稍后重试');
|
||||
});
|
||||
},
|
||||
|
||||
// 再次提交
|
||||
async onSubmitAgain() {
|
||||
// 提交时进行表单验证
|
||||
const errors = await this.validateForm();
|
||||
if (errors.length > 0) {
|
||||
this.$toast.fail(errors[0]); // 显示第一条错误信息
|
||||
return;
|
||||
}
|
||||
|
||||
this.$axios.post('/platform/dsznfmtx/apply/submitAgain', {
|
||||
data: JSON.stringify(this.formData),
|
||||
taskId: GetQueryString("taskId")
|
||||
}).then(res => {
|
||||
this.$toast.clear();
|
||||
if (res.code === 0) {
|
||||
this.$toast.success("提交成功");
|
||||
setTimeout(() => {
|
||||
pjaxReplace('/platform/dsznfmtx/mine/h5')
|
||||
}, 1500);
|
||||
} else {
|
||||
this.$toast.fail(res.msg || '提交失败');
|
||||
}
|
||||
}).catch(err => {
|
||||
this.$toast.clear();
|
||||
this.$toast.fail('网络错误,请稍后重试');
|
||||
});
|
||||
},
|
||||
|
||||
// 添加性别确认方法
|
||||
onLoverSexConfirm(o) {
|
||||
this.$set(this.formData, "loverSex", o.text);
|
||||
this.showLoverSexPicker = false;
|
||||
},
|
||||
|
||||
init() {
|
||||
this.bizId = GetQueryString("bizId")
|
||||
if (this.bizId) {
|
||||
this.$axios.post("/platform/dsznfmtx/apply/findOne", {id: this.bizId}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.formData = res.data;
|
||||
// 格式化所有日期字段
|
||||
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 {
|
||||
const user = this.$store.state.user
|
||||
this.$set(this.formData, "userId", user.id)
|
||||
this.$set(this.formData, "userName", user.username)
|
||||
this.$set(this.formData, "loginName", user.loginname)
|
||||
this.$set(this.formData, "unitId", user.unitId)
|
||||
this.$set(this.formData, "unitName", user.unit.name)
|
||||
this.$set(this.formData, "unionId", user.union.id)
|
||||
this.$set(this.formData, "unionName", user.union.name)
|
||||
this.$set(this.formData, "sex", user.sex)
|
||||
this.$set(this.formData, "birthday", this.formatDate(user.birthday))
|
||||
}
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
await this.init();
|
||||
|
||||
// 页面初始化完成后立即检查退休状态和申请状态
|
||||
const isRetired = await this.checkRetirementStatus();
|
||||
if (!isRetired) {
|
||||
this.$toast.fail('您不是退休人员,无法申请此项福利');
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!this.bizId) { // 如果不是编辑已有记录,则检查是否已申请
|
||||
const isApplied = await this.checkUserApplication();
|
||||
if (isApplied) {
|
||||
this.$toast.fail('您已经提交过申请,不能重复申请');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,127 @@
|
||||
<!--#
|
||||
layout("/layouts/platform_h5.html"){
|
||||
#-->
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<van-nav-bar @click-left="historyBack" left-arrow left-text="返回" title="查询统计" placeholder fixed></van-nav-bar>
|
||||
<van-sticky offset-top="46px">
|
||||
<van-dropdown-menu :close-on-click-outside="false" :close-on-click-overlay="false">
|
||||
<van-dropdown-item :options="yearList" @change="doSearch" v-model="pageForm.year"></van-dropdown-item>
|
||||
</van-dropdown-menu>
|
||||
<van-search
|
||||
:reverse-color="false"
|
||||
:show-action="false"
|
||||
@search="doSearch"
|
||||
input-align="left"
|
||||
placeholder="请输入职工姓名搜索"
|
||||
v-model="pageForm.userName"
|
||||
></van-search>
|
||||
</van-sticky>
|
||||
|
||||
|
||||
<table-list api="/platform/dsznfmtx/collect/pageData" :page_form.sync="pageForm" ref="tableListRef"
|
||||
@ready="doSearch" >
|
||||
<template v-slot="{index,row}">
|
||||
<table-column label="职工姓名">{{row.userName}}</table-column>
|
||||
<table-column label="性别">{{row.sex}}</table-column>
|
||||
<table-column label="工会">{{row.unionName}}</table-column>
|
||||
<table-column label="所属单位">{{row.unitName}}</table-column>
|
||||
<table-column label="退休时间">{{row.retireTime}}</table-column>
|
||||
<table-column label="申请时间">{{row.applyTime}}</table-column>
|
||||
<table-column label="当前节点">{{row.taskName}}</table-column>
|
||||
</template>
|
||||
<template #actions="{index,row}">
|
||||
<div class="action-btn" @click="onView(row)">
|
||||
<i class="fa fa-eye"></i>
|
||||
<span>查看</span>
|
||||
</div>
|
||||
<div class="action-btn delete" @click="onDelete(row)" v-if="$auth.hasRole('SYSADMIN')">
|
||||
<i class="fa fa-trash"></i>
|
||||
<span>删除</span>
|
||||
</div>
|
||||
</template>
|
||||
</table-list>
|
||||
|
||||
<dsznfmtx-info ref="dsznfmtxInfoRef"></dsznfmtx-info>
|
||||
|
||||
</div>
|
||||
<script nonce="${cspNonce!}">
|
||||
<!--#include('../common/info.js'){}#-->
|
||||
const vue = new Vue({
|
||||
el: "#app",
|
||||
store,
|
||||
dicts: [],
|
||||
components: {
|
||||
"dsznfmtx-info":DSZNFMTX_INFO
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
viewShow: false,
|
||||
yearList: [],
|
||||
pageForm: {
|
||||
pageNumber: 1,
|
||||
pageSize: 10,
|
||||
totalCount: 0,
|
||||
searchKeyword: "",
|
||||
year: "",
|
||||
},
|
||||
infoShow: false
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
onView(row) {
|
||||
this.showApprovalForm = false
|
||||
this.$refs.dsznfmtxInfoRef.onOpen(row)
|
||||
},
|
||||
onRevoke(row){
|
||||
this.$dialog
|
||||
.confirm({
|
||||
title: "提示",
|
||||
message: "您确定要撤销申请吗?"
|
||||
})
|
||||
.then(() => {
|
||||
this.$axios.post("/flow/common/revokeTask", {taskId: row.startTaskId}).then((resp) => {
|
||||
this.$toast.success(resp.msg)
|
||||
this.doSearch()
|
||||
})
|
||||
})
|
||||
},
|
||||
onDelete(row) {
|
||||
this.$dialog
|
||||
.confirm({
|
||||
title: "提示",
|
||||
message: "您确定要删除吗?"
|
||||
})
|
||||
.then(() => {
|
||||
this.$axios.post("/platform/dsznfmtx/mine/delete", {id: row.id}).then((resp) => {
|
||||
if (resp.code === 0) {
|
||||
this.$toast.success(resp.msg)
|
||||
this.doSearch()
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
doSearch() {
|
||||
this.$nextTick(() => {
|
||||
this.pageForm.pageNumber = 1
|
||||
this.pageForm.totalCount = 0
|
||||
this.$refs.tableListRef.doSearch()
|
||||
})
|
||||
},
|
||||
initData() {
|
||||
for (let i = new Date().getFullYear() - 10; i <= new Date().getFullYear(); i++) {
|
||||
this.yearList.unshift({value: i, text: i + "年"})
|
||||
}
|
||||
this.$set(this.pageForm, "year", this.yearList[0].value)
|
||||
},
|
||||
},
|
||||
created() {
|
||||
this.initData()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,124 @@
|
||||
const DSZNFMTX_INFO = {
|
||||
template:
|
||||
/*language=HTML*/`
|
||||
<van-action-sheet v-model="visible" title="查看详情">
|
||||
<div class="detail-container">
|
||||
<van-cell-group title="基本信息">
|
||||
<van-cell title="职工姓名">{{ viewData.userName }}</van-cell>
|
||||
<van-cell title="性别">{{ viewData.sex }}</van-cell>
|
||||
<van-cell title="出生年月">{{$moment(viewData.birthday).format('YYYY-MM-DD')}}</van-cell>
|
||||
<van-cell title="原工作单位">{{ viewData.unitName }}</van-cell>
|
||||
<van-cell title="退休时间">{{$moment(viewData.retireTime).format('YYYY-MM-DD')}}</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="结婚日期">{{$moment(viewData.marryTime).format('YYYY-MM-DD')}}</van-cell>
|
||||
<van-cell title="子女出生日">{{$moment(viewData.childrenBirthday).format('YYYY-MM-DD')}}</van-cell>
|
||||
<van-cell title="领独生子女光时间">{{$moment(viewData.getCertificateTime).format('YYYY-MM-DD')}}</van-cell>
|
||||
<van-cell title="独生子女光荣证号">{{ viewData.childrenGraceNumber }}</van-cell>
|
||||
<van-cell title="办证机关">{{ viewData.office }}</van-cell>
|
||||
<van-cell title="奖励金额">{{ viewData.bonus }}</van-cell>
|
||||
<van-cell title="独生子女父母光荣证">
|
||||
<file-preview :files="viewData.honorFiles" complete_result></file-preview>
|
||||
</van-cell>
|
||||
<van-cell title="退休证">
|
||||
<file-preview :files="viewData.retireFiles" complete_result></file-preview>
|
||||
</van-cell>
|
||||
<van-cell title="签字" >
|
||||
<van-image :src="viewData.sign"
|
||||
v-if="viewData.sign"
|
||||
class="signature-image"></van-image>
|
||||
</van-cell>
|
||||
</van-cell-group>
|
||||
<template v-for="(task,index) in doneTasks">
|
||||
<div class="process-title">
|
||||
{{ task.displayName }}
|
||||
</div>
|
||||
<van-cell-group v-if="task.ext.isFirstTaskNode">
|
||||
<van-cell title="申请用户">
|
||||
{{ task.ext.initiatorName}}({{task.ext.initiatorAccount}})
|
||||
</van-cell>
|
||||
<van-cell title="申请时间">
|
||||
{{task.finishTime}}
|
||||
</van-cell>
|
||||
<van-cell title="办理结果">
|
||||
<dict-tag :options="dict.type.PROCESS_TASK_SUBMIT_TYPE"
|
||||
:value="task.ext.submitType"></dict-tag>
|
||||
</van-cell>
|
||||
</van-cell-group>
|
||||
<van-cell-group v-else>
|
||||
<van-cell title="办理用户">
|
||||
{{ task.taskFormData.userName}}({{task.taskFormData.loginName}})
|
||||
</van-cell>
|
||||
<van-cell title="办理时间">
|
||||
{{task.finishTime}}
|
||||
</van-cell>
|
||||
<van-cell title="办理结果">
|
||||
<dict-tag :options="dict.type.PROCESS_TASK_SUBMIT_TYPE"
|
||||
:value="task.ext.submitType"></dict-tag>
|
||||
</van-cell>
|
||||
<van-cell title="办理意见" v-if="!task.ext.isFirstTaskNode">
|
||||
<template #label>
|
||||
{{
|
||||
task.taskFormData.opinion
|
||||
}}
|
||||
</template>
|
||||
</van-cell>
|
||||
<van-cell title="签字" v-if="!task.ext.isFirstTaskNode">
|
||||
<van-image :src="task.ext.tf_userSign"
|
||||
v-if="task.ext.tf_userSign"
|
||||
class="signature-image"></van-image>
|
||||
</van-cell>
|
||||
</van-cell-group>
|
||||
</template>
|
||||
|
||||
</div>
|
||||
<slot></slot>
|
||||
</van-action-sheet>
|
||||
`,
|
||||
dicts: ["PROCESS_TASK_SUBMIT_TYPE"],
|
||||
data() {
|
||||
return {
|
||||
visible:false,
|
||||
viewData: {},
|
||||
doneTasks: [],
|
||||
row: null,
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
||||
onOpen(row) {
|
||||
this.row = row
|
||||
this.visible = true
|
||||
this.getInfo()
|
||||
this.getDoneTasks()
|
||||
},
|
||||
// 关闭
|
||||
onClose(){
|
||||
this.visible = false
|
||||
},
|
||||
// 获取申请信息
|
||||
getInfo() {
|
||||
this.$axios.post("/platform/dsznfmtx/apply/findOne", {id: this.row.id}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.viewData = res.data
|
||||
}
|
||||
})
|
||||
},
|
||||
// 查看
|
||||
openView(id) {
|
||||
this.$nextTick(() => {
|
||||
this.$refs.infoDialogRef.onOpen(id)
|
||||
})
|
||||
},
|
||||
// 获取已办任务审批记录
|
||||
getDoneTasks() {
|
||||
this.$axios.post("/flow/common/doneTasks", {bizId: this.row.id}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.doneTasks = res.data
|
||||
}
|
||||
})
|
||||
},
|
||||
},
|
||||
|
||||
}
|
||||
@@ -0,0 +1,134 @@
|
||||
<!--#
|
||||
layout("/layouts/platform_h5.html"){
|
||||
#-->
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<van-nav-bar @click-left="historyBack" left-arrow left-text="返回" title="我的申请" placeholder fixed></van-nav-bar>
|
||||
<van-sticky offset-top="46px">
|
||||
<van-dropdown-menu :close-on-click-outside="false" :close-on-click-overlay="false">
|
||||
<van-dropdown-item :options="yearList" @change="doSearch" v-model="pageForm.year"></van-dropdown-item>
|
||||
</van-dropdown-menu>
|
||||
</van-sticky>
|
||||
|
||||
|
||||
<table-list api="/platform/dsznfmtx/mine/pageData" :page_form.sync="pageForm" ref="tableListRef"
|
||||
@ready="doSearch" >
|
||||
<template v-slot="{index,row}">
|
||||
<table-column label="职工姓名">{{row.userName}}</table-column>
|
||||
<table-column label="性别">{{row.sex}}</table-column>
|
||||
<table-column label="工会">{{row.unionName}}</table-column>
|
||||
<table-column label="所属单位">{{row.unitName}}</table-column>
|
||||
<table-column label="退休时间">{{row.retireTime}}</table-column>
|
||||
<table-column label="申请时间">{{row.applyTime}}</table-column>
|
||||
<table-column label="当前节点">{{row.taskName}}</table-column>
|
||||
</template>
|
||||
<template #actions="{index,row}">
|
||||
<div class="action-btn" @click="onView(row)">
|
||||
<i class="fa fa-eye"></i>
|
||||
<span>查看</span>
|
||||
</div>
|
||||
<div class="action-btn" @click="onEdit(row)" v-if="row.taskKey === 'startTask' || !row.instanceId">
|
||||
<i class="fa fa-edit"></i>
|
||||
<span>编辑</span>
|
||||
</div>
|
||||
<div class="action-btn delete" v-if="row.canRevoke" @click="onRevoke(row)">
|
||||
<i class="fa fa-undo"></i>
|
||||
<span>撤回</span>
|
||||
</div>
|
||||
<div class="action-btn delete" @click="onDelete(row)" v-if="row.taskKey === 'startTask' || !row.instanceId">
|
||||
<i class="fa fa-trash"></i>
|
||||
<span>删除</span>
|
||||
</div>
|
||||
</template>
|
||||
</table-list>
|
||||
|
||||
<dsznfmtx-info ref="dsznfmtxInfoRef"></dsznfmtx-info>
|
||||
|
||||
</div>
|
||||
<script nonce="${cspNonce!}">
|
||||
<!--#include('../common/info.js'){}#-->
|
||||
const vue = new Vue({
|
||||
el: "#app",
|
||||
store,
|
||||
dicts: [],
|
||||
components: {
|
||||
"dsznfmtx-info":DSZNFMTX_INFO
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
viewShow: false,
|
||||
yearList: [],
|
||||
pageForm: {
|
||||
pageNumber: 1,
|
||||
pageSize: 10,
|
||||
totalCount: 0,
|
||||
searchKeyword: "",
|
||||
year: "",
|
||||
},
|
||||
infoShow: false
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
onView(row) {
|
||||
this.showApprovalForm = false
|
||||
this.$refs.dsznfmtxInfoRef.onOpen(row)
|
||||
|
||||
},
|
||||
onEdit(row) {
|
||||
this.$pjaxReplace('/platform/dsznfmtx/apply/h5?taskId=' + (row.startTaskId || '') + "&bizId=" + row.id)
|
||||
},
|
||||
|
||||
onRevoke(row){
|
||||
this.$dialog
|
||||
.confirm({
|
||||
title: "提示",
|
||||
message: "您确定要撤销申请吗?"
|
||||
})
|
||||
.then(() => {
|
||||
this.$axios.post("/flow/common/revokeTask", {taskId: row.startTaskId}).then((resp) => {
|
||||
this.$toast.success(resp.msg)
|
||||
this.doSearch()
|
||||
})
|
||||
})
|
||||
},
|
||||
onDelete(row) {
|
||||
this.$dialog
|
||||
.confirm({
|
||||
title: "提示",
|
||||
message: "您确定要删除吗?"
|
||||
})
|
||||
.then(() => {
|
||||
this.$axios.post("/platform/dsznfmtx/mine/delete", {id: row.id}).then((resp) => {
|
||||
if (resp.code === 0) {
|
||||
this.$toast.success(resp.msg)
|
||||
this.doSearch()
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
doSearch() {
|
||||
this.$nextTick(() => {
|
||||
this.pageForm.pageNumber = 1
|
||||
this.pageForm.totalCount = 0
|
||||
this.$refs.tableListRef.doSearch()
|
||||
})
|
||||
},
|
||||
initData() {
|
||||
for (let i = new Date().getFullYear() - 10; i <= new Date().getFullYear(); i++) {
|
||||
this.yearList.unshift({value: i, text: i + "年"})
|
||||
}
|
||||
this.$set(this.pageForm, "year", this.yearList[0].value)
|
||||
},
|
||||
|
||||
},
|
||||
created() {
|
||||
this.initData()
|
||||
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,277 @@
|
||||
<!--#
|
||||
layout("/layouts/platform_h5.html"){
|
||||
#-->
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<van-nav-bar @click-left="historyBack" left-arrow left-text="返回" title="校工会审核" placeholder fixed></van-nav-bar>
|
||||
<van-sticky offset-top="46px">
|
||||
<van-search
|
||||
:reverse-color="false"
|
||||
:show-action="false"
|
||||
@search="doSearch"
|
||||
input-align="left"
|
||||
placeholder="请输入职工姓名搜索"
|
||||
v-model="pageForm.userName"
|
||||
></van-search>
|
||||
<van-tabs v-model="pageForm.approvalText"
|
||||
@change="(val)=>{this.pageForm.approval = val==='1';this.doSearch();}">
|
||||
<van-tab title="已审核" name="1"></van-tab>
|
||||
<van-tab title="未审核" name="0"></van-tab>
|
||||
</van-tabs>
|
||||
</van-sticky>
|
||||
|
||||
|
||||
<table-list api="/platform/dsznfmtx/schoolAudit/pageData" :page_form.sync="pageForm" ref="tableListRef"
|
||||
@ready="doSearch" >
|
||||
<template v-slot="{index,row}">
|
||||
<table-column label="职工姓名">{{row.userName}}</table-column>
|
||||
<table-column label="性别">{{row.sex}}</table-column>
|
||||
<table-column label="工会">{{row.unionName}}</table-column>
|
||||
<table-column label="所属单位">{{row.unitName}}</table-column>
|
||||
<table-column label="奖励金额">{{row.bonus}}</table-column>
|
||||
<table-column label="申请时间">{{row.applyTime}}</table-column>
|
||||
<table-column label="当前节点">{{row.curTaskName}}</table-column>
|
||||
</template>
|
||||
<template #actions="{index,row}">
|
||||
<div class="action-btn" @click="onView(row)">
|
||||
<i class="fa fa-eye"></i>
|
||||
<span>查看</span>
|
||||
</div>
|
||||
<div class="action-btn" v-if="row.taskState === 10" @click="onAudit(row)">
|
||||
<i class="fa fa-edit"></i>
|
||||
<span>审核</span>
|
||||
</div>
|
||||
<div class="action-btn delete" v-if="row.canRevoke" @click="onRevoke(row)">
|
||||
<i class="fa fa-undo"></i>
|
||||
<span>撤回</span>
|
||||
</div>
|
||||
</template>
|
||||
</table-list>
|
||||
|
||||
<dsznfmtx-info ref="dsznfmtxInfoRef">
|
||||
<div v-if="showApprovalForm">
|
||||
<div class="process-title">
|
||||
校工会审核
|
||||
</div>
|
||||
<div class="form-container">
|
||||
<van-form ref="formRef">
|
||||
<van-cell-group title="审批意见">
|
||||
<van-field label=""
|
||||
:rules="[{ required: true,message:'请填审批意见' }]"
|
||||
v-model="formData.tf_opinion"
|
||||
required
|
||||
type="textarea"
|
||||
name="tf_opinion"
|
||||
rows="4"
|
||||
autosize
|
||||
class="more-text"
|
||||
placeholder="请填审批意见"></van-field>
|
||||
</van-cell-group>
|
||||
<van-cell-group title="电子签名" class="form-section">
|
||||
<van-field class="more-text" name="tf_userSign" label="">
|
||||
<template #input>
|
||||
<h5-signature v-model="formData.tf_userSign" slot="input"></h5-signature>
|
||||
</template>
|
||||
</van-field>
|
||||
</van-cell-group>
|
||||
<!-- 按钮区域 -->
|
||||
<div class="form-actions">
|
||||
<van-button type="danger" @click="handleTaskAction(6)">退回到发起人</van-button>
|
||||
<van-button type="danger" @click="handleTaskAction(2)">拒绝申请</van-button>
|
||||
<van-button type="primary" @click="handleTaskAction(1)">同意申请</van-button>
|
||||
</div>
|
||||
</van-form>
|
||||
</div>
|
||||
</div>
|
||||
</dsznfmtx-info>
|
||||
<!-- 奖励金额输入弹窗 -->
|
||||
<van-dialog v-model="bonusDialogVisible" title="输入奖励金额" show-cancel-button
|
||||
@confirm="confirmBonusInput" @cancel="cancelBonusInput">
|
||||
<van-field v-model="bonusFormData.bonus" placeholder="请输入奖励金额" type="number">
|
||||
<template #right-icon>
|
||||
<span>元</span>
|
||||
</template>
|
||||
</van-field>
|
||||
</van-dialog>
|
||||
</div>
|
||||
<script nonce="${cspNonce!}">
|
||||
<!--#include('../common/info.js'){}#-->
|
||||
const vue = new Vue({
|
||||
el: "#app",
|
||||
store,
|
||||
dicts: [],
|
||||
components: {
|
||||
"dsznfmtx-info":DSZNFMTX_INFO
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
pageForm: {
|
||||
pageNumber: 1,
|
||||
pageSize: 10,
|
||||
totalCount: 0,
|
||||
searchKeyword: "",
|
||||
approvalText: "0",
|
||||
approval: false,
|
||||
year: new Date().getFullYear(),
|
||||
},
|
||||
formData: {},
|
||||
showApprovalForm: false,
|
||||
infoShow: false,
|
||||
// 奖励金额输入弹窗相关数据
|
||||
bonusDialogVisible: false,
|
||||
bonusFormData: {
|
||||
bonus: ''
|
||||
},
|
||||
currentRow: null,
|
||||
currentSubmitType: null
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 显示奖励金额输入弹窗
|
||||
showBonusInputDialog(submitType) {
|
||||
this.currentSubmitType = submitType;
|
||||
this.bonusFormData.bonus = '';
|
||||
this.bonusDialogVisible = true;
|
||||
},
|
||||
|
||||
// 确认奖励金额输入
|
||||
confirmBonusInput() {
|
||||
if (!this.bonusFormData.bonus) {
|
||||
this.$toast.fail('请输入奖励金额');
|
||||
return false; // 阻止弹窗关闭
|
||||
}
|
||||
|
||||
// 验证金额格式
|
||||
const bonusPattern = /^([0-9]*[.]{0,1}[0-9]{0,2})$/;
|
||||
if (!bonusPattern.test(this.bonusFormData.bonus)) {
|
||||
this.$toast.fail('请输入有效的金额格式');
|
||||
return false; // 阻止弹窗关闭
|
||||
}
|
||||
|
||||
this.bonusDialogVisible = false;
|
||||
|
||||
// 保存奖励金额并执行审批操作
|
||||
this.saveBonusAndApprove();
|
||||
return true; // 允许弹窗关闭
|
||||
},
|
||||
|
||||
// 取消奖励金额输入
|
||||
cancelBonusInput() {
|
||||
this.bonusDialogVisible = false;
|
||||
},
|
||||
|
||||
// 保存奖励金额并执行审批
|
||||
saveBonusAndApprove() {
|
||||
// 先获取完整的申请数据
|
||||
this.$axios.post('/platform/dsznfmtx/apply/findOne', {id: this.currentRow.id}).then(res => {
|
||||
if (res.code === 0) {
|
||||
// 获取完整的数据后,更新奖励金额
|
||||
const fullData = res.data;
|
||||
fullData.bonus = this.bonusFormData.bonus;
|
||||
|
||||
// 调用申请页面的保存方法,传递完整数据
|
||||
this.$axios.post('/platform/dsznfmtx/apply/save', {data: JSON.stringify(fullData)}).then(saveRes => {
|
||||
if (saveRes.code === 0) {
|
||||
// 保存成功后执行审批操作
|
||||
this.executeTaskAction(this.currentSubmitType);
|
||||
} else {
|
||||
this.$toast.fail(saveRes.msg || '保存奖励金额失败');
|
||||
}
|
||||
}).catch(error => {
|
||||
this.$toast.fail('保存奖励金额失败');
|
||||
console.error('保存奖励金额失败:', error);
|
||||
});
|
||||
} else {
|
||||
this.$toast.fail(res.msg || '获取申请数据失败');
|
||||
}
|
||||
}).catch(error => {
|
||||
this.$toast.fail('获取申请数据失败');
|
||||
console.error('获取申请数据失败:', error);
|
||||
});
|
||||
},
|
||||
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("提交成功")
|
||||
this.doSearch()
|
||||
this.infoShow = false
|
||||
}
|
||||
})
|
||||
}).catch(() => {
|
||||
// on cancel
|
||||
});
|
||||
},
|
||||
|
||||
// 执行任务操作
|
||||
executeTaskAction(val) {
|
||||
this.$refs.formRef.validate().then(() => {
|
||||
this.$dialog.confirm({
|
||||
title: '温馨提示',
|
||||
message: '您确定要提交吗?',
|
||||
}).then(() => {
|
||||
this.$axios.post('/flow/common/executeTask', {
|
||||
data: JSON.stringify({
|
||||
...this.formData,
|
||||
submitType: val
|
||||
})
|
||||
}).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.$toast.success("提交成功")
|
||||
this.doSearch()
|
||||
this.$refs.dsznfmtxInfoRef.onClose()
|
||||
}
|
||||
})
|
||||
}).catch(() => {
|
||||
// on cancel
|
||||
});
|
||||
}).catch();
|
||||
},
|
||||
|
||||
handleTaskAction(val) {
|
||||
// 如果是同意申请操作(val=1),需要先输入奖励金额
|
||||
if (val === 1) {
|
||||
this.showBonusInputDialog(val);
|
||||
return;
|
||||
}
|
||||
// 其他操作直接执行
|
||||
this.executeTaskAction(val);
|
||||
},
|
||||
onView(row) {
|
||||
this.showApprovalForm = false
|
||||
this.$refs.dsznfmtxInfoRef.onOpen(row)
|
||||
},
|
||||
onAudit(row) {
|
||||
this.showApprovalForm = true
|
||||
this.currentRow = row;
|
||||
this.formData = {
|
||||
tf_opinion: null,
|
||||
tf_userSign: null,
|
||||
processTaskId: row.taskId,
|
||||
taskName: row.curTaskName
|
||||
}
|
||||
this.$refs.dsznfmtxInfoRef.onOpen(row)
|
||||
},
|
||||
|
||||
doSearch() {
|
||||
this.$nextTick(() => {
|
||||
this.pageForm.pageNumber = 1
|
||||
this.pageForm.totalCount = 0
|
||||
this.$refs.tableListRef.doSearch()
|
||||
})
|
||||
},
|
||||
|
||||
},
|
||||
created() {
|
||||
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,187 @@
|
||||
<!--#
|
||||
layout("/layouts/platform_h5.html"){
|
||||
#-->
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<van-nav-bar @click-left="historyBack" left-arrow left-text="返回" title="分工会审核" placeholder fixed></van-nav-bar>
|
||||
<van-sticky offset-top="46px">
|
||||
<van-search
|
||||
:reverse-color="false"
|
||||
:show-action="false"
|
||||
@search="doSearch"
|
||||
input-align="left"
|
||||
placeholder="请输入职工姓名搜索"
|
||||
v-model="pageForm.userName"
|
||||
></van-search>
|
||||
<van-tabs v-model="pageForm.approvalText"
|
||||
@change="(val)=>{this.pageForm.approval = val==='1';this.doSearch();}">
|
||||
<van-tab title="已审核" name="1"></van-tab>
|
||||
<van-tab title="未审核" name="0"></van-tab>
|
||||
</van-tabs>
|
||||
</van-sticky>
|
||||
|
||||
|
||||
<table-list api="/platform/dsznfmtx/unionAudit/pageData" :page_form.sync="pageForm" ref="tableListRef"
|
||||
@ready="doSearch" >
|
||||
<template v-slot="{index,row}">
|
||||
<table-column label="职工姓名">{{row.userName}}</table-column>
|
||||
<table-column label="性别">{{row.sex}}</table-column>
|
||||
<table-column label="工会">{{row.unionName}}</table-column>
|
||||
<table-column label="所属单位">{{row.unitName}}</table-column>
|
||||
<table-column label="退休时间">{{row.retireTime}}</table-column>
|
||||
<table-column label="申请时间">{{row.applyTime}}</table-column>
|
||||
<table-column label="当前节点">{{row.curTaskName}}</table-column>
|
||||
</template>
|
||||
<template #actions="{index,row}">
|
||||
<div class="action-btn" @click="onView(row)">
|
||||
<i class="fa fa-eye"></i>
|
||||
<span>查看</span>
|
||||
</div>
|
||||
<div class="action-btn" v-if="row.taskState === 10" @click="onAudit(row)">
|
||||
<i class="fa fa-edit"></i>
|
||||
<span>审核</span>
|
||||
</div>
|
||||
<div class="action-btn delete" v-if="row.canRevoke" @click="onRevoke(row)">
|
||||
<i class="fa fa-undo"></i>
|
||||
<span>撤回</span>
|
||||
</div>
|
||||
</template>
|
||||
</table-list>
|
||||
|
||||
<dsznfmtx-info ref="dsznfmtxInfoRef">
|
||||
<div v-if="showApprovalForm">
|
||||
<div class="process-title">
|
||||
分工会审核
|
||||
</div>
|
||||
<div class="form-container">
|
||||
<van-form ref="formRef">
|
||||
<van-cell-group title="审批意见">
|
||||
<van-field label=""
|
||||
:rules="[{ required: true,message:'请填审批意见' }]"
|
||||
v-model="formData.tf_opinion"
|
||||
required
|
||||
type="textarea"
|
||||
name="tf_opinion"
|
||||
rows="4"
|
||||
autosize
|
||||
class="more-text"
|
||||
placeholder="请填审批意见"></van-field>
|
||||
</van-cell-group>
|
||||
<van-cell-group title="电子签名" class="form-section">
|
||||
<van-field class="more-text" name="tf_userSign" label="">
|
||||
<template #input>
|
||||
<h5-signature v-model="formData.tf_userSign" slot="input"></h5-signature>
|
||||
</template>
|
||||
</van-field>
|
||||
</van-cell-group>
|
||||
<!-- 按钮区域 -->
|
||||
<div class="form-actions">
|
||||
<van-button type="danger" @click="handleTaskAction(6)">退回到发起人</van-button>
|
||||
<van-button type="danger" @click="handleTaskAction(2)">拒绝申请</van-button>
|
||||
<van-button type="primary" @click="handleTaskAction(1)">同意申请</van-button>
|
||||
</div>
|
||||
</van-form>
|
||||
</div>
|
||||
</div>
|
||||
</dsznfmtx-info>
|
||||
|
||||
</div>
|
||||
<script nonce="${cspNonce!}">
|
||||
<!--#include('../common/info.js'){}#-->
|
||||
const vue = new Vue({
|
||||
el: "#app",
|
||||
store,
|
||||
dicts: [],
|
||||
components: {
|
||||
"dsznfmtx-info":DSZNFMTX_INFO
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
pageForm: {
|
||||
pageNumber: 1,
|
||||
pageSize: 10,
|
||||
totalCount: 0,
|
||||
searchKeyword: "",
|
||||
approvalText: "0",
|
||||
approval: false,
|
||||
year: new Date().getFullYear(),
|
||||
},
|
||||
formData: {},
|
||||
showApprovalForm: false,
|
||||
infoShow: false
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
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("提交成功")
|
||||
this.doSearch()
|
||||
this.infoShow = false
|
||||
}
|
||||
})
|
||||
}).catch(() => {
|
||||
// on cancel
|
||||
});
|
||||
},
|
||||
handleTaskAction(val) {
|
||||
this.$refs.formRef.validate().then(() => {
|
||||
this.$dialog.confirm({
|
||||
title: '温馨提示',
|
||||
message: '您确定要提交吗?',
|
||||
}).then(() => {
|
||||
this.$axios.post('/flow/common/executeTask', {
|
||||
data: JSON.stringify({
|
||||
...this.formData,
|
||||
submitType: val
|
||||
})
|
||||
}).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.$toast.success("提交成功")
|
||||
this.doSearch()
|
||||
this.$refs.dsznfmtxInfoRef.onClose()
|
||||
}
|
||||
})
|
||||
}).catch(() => {
|
||||
// on cancel
|
||||
});
|
||||
}).catch();
|
||||
},
|
||||
onView(row) {
|
||||
this.showApprovalForm = false
|
||||
this.$refs.dsznfmtxInfoRef.onOpen(row)
|
||||
},
|
||||
onAudit(row) {
|
||||
this.showApprovalForm = true
|
||||
this.formData = {
|
||||
tf_opinion: null,
|
||||
tf_userSign: null,
|
||||
processTaskId: row.taskId,
|
||||
taskName: row.curTaskName
|
||||
}
|
||||
this.$refs.dsznfmtxInfoRef.onOpen(row)
|
||||
},
|
||||
|
||||
doSearch() {
|
||||
this.$nextTick(() => {
|
||||
this.pageForm.pageNumber = 1
|
||||
this.pageForm.totalCount = 0
|
||||
this.$refs.tableListRef.doSearch()
|
||||
})
|
||||
},
|
||||
|
||||
},
|
||||
created() {
|
||||
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
Reference in New Issue
Block a user