feat: 修复困难帮扶申请表单校验及页面加载闪烁,调整办公室主任拒绝、退回审批时不校验级别和帮扶金额。
新增特殊慰问模块,支持分工会主席统一为多人申请、Excel 导入及人员校验;完善主从表存储、表单校验、审批展示和导出,移除分工会主席审批节点,使用独立流程节点标识。
This commit is contained in:
@@ -1,8 +1,9 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
<div id="app">
|
||||
<el-card shadow="never" v-if="isShow">
|
||||
<div id="app" v-cloak>
|
||||
<el-card shadow="never" v-if="pageLoading" v-loading="pageLoading" element-loading-text="正在加载申请信息" style="min-height: 300px"></el-card>
|
||||
<el-card shadow="never" v-else-if="isShow">
|
||||
<snaker-start slot="header" label="困难帮扶申请" define_key="KNBF"></snaker-start>
|
||||
<el-form :model="formData" ref="formRef" :rules="formRules" label-width="0" label-suffix=":" class="flow-task-form">
|
||||
<el-descriptions :column="3" border>
|
||||
@@ -318,6 +319,7 @@ layout("/layouts/platform.html"){
|
||||
bizId: GetQueryString("bizId"),
|
||||
taskId: GetQueryString("taskId"),
|
||||
isShow: false,
|
||||
pageLoading: true,
|
||||
time: '',
|
||||
blockMessage: '',
|
||||
formData: {
|
||||
@@ -453,10 +455,12 @@ layout("/layouts/platform.html"){
|
||||
})
|
||||
},
|
||||
findOne(id) {
|
||||
this.$axios.post('/platform/difficultHelp/mine/findOne', { id }).then(res => {
|
||||
return this.$axios.post('/platform/difficultHelp/mine/findOne', { id }).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.formData = res.data
|
||||
this.queryRecipients(res.data.loginName)
|
||||
} else {
|
||||
throw new Error(res.msg || '申请信息加载失败,请刷新页面重试')
|
||||
}
|
||||
})
|
||||
},
|
||||
@@ -617,7 +621,7 @@ layout("/layouts/platform.html"){
|
||||
return { status: 200, msg: "卡号有效。" };
|
||||
},
|
||||
async getIsCanPlay() {
|
||||
this.$axios.post('/platform/difficultHelp/apply/getIsCanPlay').then(res => {
|
||||
return this.$axios.post('/platform/difficultHelp/apply/getIsCanPlay').then(res => {
|
||||
if (res.code === 0) {
|
||||
// 新增申请进入页面时,优先校验当前登录人本年度是否已经申请过,已申请则直接拦截新增。
|
||||
if (!this.bizId && res.data.hasCurrentYearApply && !this.$auth.hasRoleOr('BRANCH_UNION_CHAIRMAN')) {
|
||||
@@ -631,16 +635,25 @@ layout("/layouts/platform.html"){
|
||||
if (res.data.applyCount !== null && res.data.applyCount !== undefined && res.data.applyCount !== 0) {
|
||||
this.$set(this.formData, 'applyCount', res.data.applyCount)
|
||||
}
|
||||
} else {
|
||||
throw new Error(res.msg || '申请资格加载失败,请刷新页面重试')
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
await this.getIsCanPlay();
|
||||
if (this.bizId) {
|
||||
this.findOne(this.bizId)
|
||||
} else {
|
||||
this.modeChange("1")
|
||||
try {
|
||||
await this.getIsCanPlay();
|
||||
if (this.bizId) {
|
||||
await this.findOne(this.bizId)
|
||||
} else {
|
||||
this.modeChange("1")
|
||||
}
|
||||
} catch (error) {
|
||||
this.isShow = false
|
||||
this.blockMessage = error.message || '申请信息加载失败,请刷新页面重试'
|
||||
} finally {
|
||||
this.pageLoading = false
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
+10
-1
@@ -305,7 +305,16 @@ layout("/layouts/platform.html"){
|
||||
|
||||
async handleTaskAction(val) {
|
||||
try {
|
||||
const valid = await this.$refs.formRef.validate()
|
||||
let valid
|
||||
if (val === 2 || val === 6) {
|
||||
this.$refs.formRef.clearValidate(['level', 'money'])
|
||||
const results = await Promise.all(['tf_opinion', 'tf_sign'].map(prop => new Promise(resolve => {
|
||||
this.$refs.formRef.validateField(prop, error => resolve(!error))
|
||||
})))
|
||||
valid = results.every(result => result)
|
||||
} else {
|
||||
valid = await this.$refs.formRef.validate()
|
||||
}
|
||||
if (!valid) return
|
||||
} catch (error) {
|
||||
return
|
||||
|
||||
+301
@@ -0,0 +1,301 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
|
||||
<style nonce="${cspNonce!}">
|
||||
<!--#include('recipients.css'){}#-->
|
||||
</style>
|
||||
<div id="app" class="special-condolence-apply" v-cloak>
|
||||
<el-card shadow="never">
|
||||
<snaker-start slot="header" label="特殊慰问" define_key="TSWW"></snaker-start>
|
||||
<el-form size="small" :model="formData" ref="formRef" :rules="formRules" label-width="0" label-suffix=":"
|
||||
class="flow-task-form">
|
||||
<div class="special-condolence-section-title">申请人信息</div>
|
||||
<el-descriptions :column="2" border size="small">
|
||||
<el-descriptions-item label="申请人姓名">{{formData.applyUserName}}</el-descriptions-item>
|
||||
<el-descriptions-item label="申请人工号">{{formData.applyLoginName}}</el-descriptions-item>
|
||||
<el-descriptions-item label="申请人单位">{{formData.applyUnitName}}</el-descriptions-item>
|
||||
<el-descriptions-item label="申请人工会">{{formData.applyUnionName}}</el-descriptions-item>
|
||||
|
||||
</el-descriptions>
|
||||
<!--#include('recipients.html'){}#-->
|
||||
<div class="special-condolence-section-title">申请说明与签字</div>
|
||||
<el-descriptions :column="3" border size="small">
|
||||
<el-descriptions-item label="申请事由" :span="3">
|
||||
<el-form-item prop="remark" label="申请事由">
|
||||
<el-input maxlength="500" v-model="formData.remark" placeholder="请填写申请事由"
|
||||
type="textarea" :rows="3" resize="none"></el-input>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item :span="3" v-if="chooseType.isUploadFile === true">
|
||||
<template slot="label">
|
||||
附件
|
||||
<el-tooltip class="item" effect="dark" :content="'上传附件说明:' + chooseType.uploadFileDesc"
|
||||
placement="top-start"
|
||||
v-if="chooseType.isUploadFile && chooseType.uploadFileDesc">
|
||||
<i class="el-icon-question"></i>
|
||||
</el-tooltip>
|
||||
</template>
|
||||
<el-form-item prop="files" label="附件">
|
||||
<file-upload
|
||||
:value.sync="formData.files"
|
||||
:upload_number="5"
|
||||
upload_result_category="array"
|
||||
complete_result
|
||||
upload_mode="drag"
|
||||
></file-upload>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item label="签字" :span="3">
|
||||
<el-form-item prop="signature" label="签字">
|
||||
<pc-signature v-model="formData.signature"></pc-signature>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</el-form>
|
||||
<el-row type="flex" justify="end" class="special-condolence-actions">
|
||||
<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>提交申请</el-button>
|
||||
</el-row>
|
||||
</el-card>
|
||||
</div>
|
||||
|
||||
<script nonce="${cspNonce!}">
|
||||
<!--#include('recipients.js'){}#-->
|
||||
new Vue({
|
||||
el: "#app",
|
||||
store,
|
||||
mixins: [specialCondolenceRecipients],
|
||||
components: {
|
||||
ElDatePicker: {
|
||||
extends: ELEMENT.DatePicker,
|
||||
mounted() {
|
||||
// 手动输入触发 change 前初始化日期面板,避免 picker 尚未创建。
|
||||
if (!this.picker) this.mountPicker()
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
bizId: GetQueryString("bizId"),
|
||||
taskId: GetQueryString("taskId"),
|
||||
formData: { recipients: [] },
|
||||
formRules: {
|
||||
recipients: [{ validator: (rule, value, callback) => callback(value && value.length ? undefined : new Error("请添加慰问对象")), trigger: "change" }],
|
||||
helpUserId: [{ required: true, message: "必填", trigger: ["change", "blur"] }],
|
||||
payUserId: [{ required: true, message: "必填", trigger: ["change", "blur"] }],
|
||||
type: [{ required: true, message: "必填", trigger: ["change", "blur"] }],
|
||||
way: [{ required: true, message: "必填", trigger: ["change", "blur"] }],
|
||||
money: [
|
||||
{ required: true, message: "请填写慰问金额", trigger: ["change", "blur"] },
|
||||
{ validator: (rule, value, callback) => callback(this.validateMoney(value) ? undefined : new Error("慰问金额须大于0且不超过10000元,最多两位小数")), trigger: ["change", "blur"] }
|
||||
],
|
||||
occurTime: [{ required: true, message: "必填", trigger: ["change", "blur"] }],
|
||||
child: [{ required: true, message: "必填", trigger: ["change", "blur"] }],
|
||||
hospital: [{ required: true, message: "必填", trigger: ["change", "blur"] }],
|
||||
hospitalHouseNum: [{ required: true, message: "必填", trigger: ["change", "blur"] }],
|
||||
hospitalHouseBedNum: [{ required: true, message: "必填", trigger: ["change", "blur"] }],
|
||||
hospitalBy: [{ required: true, message: "必填", trigger: ["change", "blur"] }],
|
||||
deadImmediateFamily: [{ required: true, message: "必填", trigger: ["change", "blur"] }],
|
||||
remark: [{ required: true, message: "必填", trigger: ["change", "blur"] }],
|
||||
files: [{ required: true, type: "array", min: 1, max: 5, message: "请上传1至5个附件", trigger: ["change", "blur"] }],
|
||||
signature: [{ required: true, message: "必填", trigger: ["change", "blur"] }],
|
||||
handlerUserId: [{ required: true, message: "必填", trigger: ["change", "blur"] }],
|
||||
// certifierUserId: [{ required: true, message: "必填", trigger: ["change", "blur"] }],
|
||||
bankCardNumber: [
|
||||
{ required: true, message: "请填写银行卡号或对公账户号", trigger: ["change", "blur"] },
|
||||
{ pattern: /^[0-9]{6,30}$/, message: "收款账户须为6至30位数字(银行卡号或对公账户号)", trigger: ["change", "blur"] }
|
||||
],
|
||||
bankUserName: [{ required: true, message: "必填", trigger: ["change", "blur"] }],
|
||||
bankOfDeposit: [{ required: true, message: "必填", trigger: ["change", "blur"] }],
|
||||
thisYearHospitalizationNum: [
|
||||
{ required: true, message: "必填", trigger: ["change", "blur"] },
|
||||
{ type: "integer", min: 0, max: 10000, message: "住院次数须为0至10000的整数", trigger: ["change", "blur"] }
|
||||
],
|
||||
leaveHospitalTime: [{ required: true, message: "必填", trigger: ["change", "blur"] }],
|
||||
hospitalizationTime: [{ required: true, message: "必填", trigger: ["change", "blur"] }],
|
||||
},
|
||||
chooseType: {},
|
||||
payUserOptions: [],
|
||||
helpUserOptions: [],
|
||||
typeOptions: [],
|
||||
|
||||
handlerUserOptions: [],
|
||||
certifierUserOptions: []
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
validateMoney(value) {
|
||||
return /^(0|[1-9][0-9]*)(\.[0-9]{1,2})?$/.test(String(value)) && Number(value) > 0 && Number(value) <= 10000
|
||||
},
|
||||
createRemoteMethod(options) {
|
||||
return (keyword) => {
|
||||
this.selectQueryUser(keyword, options)
|
||||
}
|
||||
},
|
||||
selectQueryUser(keyword, options) {
|
||||
options.length = 0
|
||||
this.$axios.post("/platform/special_condolence/apply/listUser", { keyword: keyword }).then((res) => {
|
||||
if (res.code === 0) {
|
||||
options.push(...res.data)
|
||||
}
|
||||
})
|
||||
},
|
||||
helpUserChange(val) {
|
||||
const user = this.helpUserOptions.find(o => o.id === val)
|
||||
if (user) {
|
||||
const { userName, loginName, unitId, unitName, unionId, unionName } = user
|
||||
this.$set(this.formData, "helpUserName", userName)
|
||||
this.$set(this.formData, "helpLoginName", loginName)
|
||||
this.$set(this.formData, "helpUnitId", unitId)
|
||||
this.$set(this.formData, "helpUnitName", unitName)
|
||||
this.$set(this.formData, "helpUnionId", unionId)
|
||||
this.$set(this.formData, "helpUnionName", unionName)
|
||||
}
|
||||
},
|
||||
handlerUserChange(val) {
|
||||
const user = this.handlerUserOptions.find(o => o.id === val)
|
||||
if (user) {
|
||||
const { userName, loginName, unitId, unitName, unionId, unionName } = user
|
||||
this.$set(this.formData, "handlerUserName", userName)
|
||||
this.$set(this.formData, "handlerLoginName", loginName)
|
||||
this.$set(this.formData, "handlerUnitId", unitId)
|
||||
this.$set(this.formData, "handlerUnitName", unitName)
|
||||
this.$set(this.formData, "handlerUnionId", unionId)
|
||||
this.$set(this.formData, "handlerUnionName", unionName)
|
||||
}
|
||||
},
|
||||
certifierUserChange(val) {
|
||||
const user = this.certifierUserOptions.find(o => o.id === val)
|
||||
if (user) {
|
||||
const { userName, loginName, unitId, unitName, unionId, unionName } = user
|
||||
this.$set(this.formData, "certifierUserName", userName)
|
||||
this.$set(this.formData, "certifierLoginName", loginName)
|
||||
this.$set(this.formData, "certifierUnitId", unitId)
|
||||
this.$set(this.formData, "certifierUnitName", unitName)
|
||||
this.$set(this.formData, "certifierUnionId", unionId)
|
||||
this.$set(this.formData, "certifierUnionName", unionName)
|
||||
}
|
||||
},
|
||||
payUserChange(val) {
|
||||
const user = this.payUserOptions.find(o => o.id === val)
|
||||
if (user) {
|
||||
const { userName, loginName } = user
|
||||
this.$set(this.formData, "payUserName", userName)
|
||||
this.$set(this.formData, "payLoginName", loginName)
|
||||
}
|
||||
},
|
||||
typeChange(id) {
|
||||
this.chooseType = this.typeOptions.find(o => o.id === id)
|
||||
if (this.chooseType) {
|
||||
this.$set(this.formData, "perMoney", this.chooseType.money)
|
||||
this.$set(this.formData, "way", this.chooseType.way)
|
||||
this.$set(this.formData, "typeCode", this.chooseType.code)
|
||||
}
|
||||
},
|
||||
onSave() {
|
||||
this.$refs.formRef.validate((valid) => {
|
||||
if (!valid) return
|
||||
this.$confirm("您确定保存吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(() => {
|
||||
this.$axios.post("/platform/special_condolence/apply/save", { data: JSON.stringify(this.formData) }).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.$message.success(res.msg)
|
||||
commonUtil.pjaxPush("/platform/special_condolence/mine")
|
||||
}
|
||||
})
|
||||
})
|
||||
})
|
||||
},
|
||||
onSubmit() {
|
||||
this.$refs.formRef.validate((valid) => {
|
||||
if (valid) {
|
||||
this.$confirm("您确定要提交吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(() => {
|
||||
this.$axios.post("/platform/special_condolence/apply/submit", {
|
||||
data: JSON.stringify(this.formData)
|
||||
}).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.$message.success(res.msg)
|
||||
commonUtil.pjaxPush("/platform/special_condolence/mine")
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
onFinishTask() {
|
||||
this.$refs.formRef.validate((valid) => {
|
||||
if (valid) {
|
||||
this.$confirm("您确定要提交吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(() => {
|
||||
this.$axios.post("/platform/special_condolence/apply/submitAgain", {
|
||||
data: JSON.stringify(this.formData),
|
||||
taskId: GetQueryString("taskId")
|
||||
}).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.$message.success(res.msg)
|
||||
commonUtil.pjaxPush("/platform/special_condolence/mine")
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
init() {
|
||||
if (this.bizId) {
|
||||
this.$axios.post("/platform/special_condolence/mine/info", { id: this.bizId }).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.formData = res.data
|
||||
this.initRecipients()
|
||||
this.selectQueryUser(this.formData.helpLoginName, this.helpUserOptions)
|
||||
this.selectQueryUser(this.formData.certifierLoginName, this.certifierUserOptions)
|
||||
this.selectQueryUser(this.formData.handlerLoginName, this.handlerUserOptions)
|
||||
this.chooseType = this.typeOptions.find(o => o.id === this.formData.type)
|
||||
}
|
||||
})
|
||||
} else {
|
||||
const { username, loginname, id, unit, union, mobile } = this.$store.state.user
|
||||
this.formData = {
|
||||
recipients: [this.newRecipient()],
|
||||
perMoney: undefined,
|
||||
occurTime: this.$moment().format('YYYY-MM-DD'),
|
||||
applyUserName: username,
|
||||
applyLoginName: loginname,
|
||||
applyUserId: id,
|
||||
applyUnitId: unit?.id,
|
||||
applyUnitName: unit?.name,
|
||||
applyUnionId: union?.id,
|
||||
applyUnionName: union?.name
|
||||
}
|
||||
}
|
||||
},
|
||||
querySpecialCondolenceType() {
|
||||
this.$axios.post("/platform/special_condolence/type/querySpecialCondolenceType")
|
||||
.then((resp) => {
|
||||
this.typeOptions = resp.data
|
||||
})
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.querySpecialCondolenceType()
|
||||
this.init()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
+63
@@ -0,0 +1,63 @@
|
||||
.special-condolence-apply .el-card__body { padding: 24px; }
|
||||
.special-condolence-apply .special-condolence-section-title { display: flex; align-items: center; gap: 10px; margin: 24px 0 14px; color: #303133; font-size: 15px; font-weight: 600; line-height: 24px; }
|
||||
.special-condolence-apply .el-descriptions__table { table-layout: fixed; }
|
||||
.special-condolence-apply .flow-task-form > .special-condolence-section-title:first-child { margin-top: 0; }
|
||||
.special-condolence-apply .el-descriptions { font-size: 14px; }
|
||||
.special-condolence-apply .el-descriptions .el-descriptions-item__cell { height: 50px; padding: 8px 12px; box-sizing: border-box; font-size: 14px; line-height: 32px; vertical-align: middle; }
|
||||
.special-condolence-apply .el-descriptions-item__label.is-bordered-label { width: 130px; min-width: 130px; max-width: 130px; font-weight: 400; }
|
||||
.special-condolence-apply .el-descriptions-item__content { font-weight: 400; }
|
||||
.special-condolence-apply .el-descriptions .el-form-item__content { line-height: 32px; }
|
||||
.special-condolence-apply .el-descriptions .el-input__inner { height: 32px; line-height: 32px; font-size: 14px; }
|
||||
.special-condolence-apply .el-descriptions .el-input__icon { line-height: 32px; }
|
||||
.special-condolence-apply .el-descriptions .el-textarea__inner { font-size: 14px; line-height: 22px; }
|
||||
|
||||
.special-condolence-apply .el-descriptions-item__label { width: 130px; color: #606266; background: #f7f9fc; }
|
||||
.special-condolence-apply .special-condolence-recipients { margin: 28px 0; border: 1px solid #e4e7ed; border-radius: 6px; overflow: hidden; }
|
||||
.special-condolence-apply .special-condolence-toolbar { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 14px; padding: 18px 20px; }
|
||||
.special-condolence-apply .special-condolence-toolbar .special-condolence-section-title { margin: 0 0 4px; }
|
||||
.special-condolence-hint { color: #606266; font-size: 12px; line-height: 20px; }
|
||||
.special-condolence-apply .special-condolence-toolbar-buttons { display: flex; flex-wrap: wrap; gap: 8px; }
|
||||
.special-condolence-apply .special-condolence-toolbar-buttons .el-button { margin: 0; }
|
||||
.special-condolence-apply .special-condolence-table-item { margin: 0; }
|
||||
.special-condolence-apply .special-condolence-table-item > .el-form-item__content { line-height: normal; }
|
||||
.special-condolence-apply .special-condolence-table-item .el-form-item__error { position: static; padding: 8px 20px; }
|
||||
.special-condolence-apply .special-condolence-table-item .el-table th { background: #f5f7fa; color: #606266; font-weight: 600; }
|
||||
.special-condolence-apply .special-condolence-table-item .el-table .cell { padding: 0 8px; }
|
||||
.special-condolence-apply .special-condolence-table-item .el-select,
|
||||
.special-condolence-apply .special-condolence-table-item .el-input-number,
|
||||
.special-condolence-apply .special-condolence-table-item .el-date-editor { width: 100%; }
|
||||
.special-condolence-apply .special-condolence-table-item .el-input-number .el-input__inner { text-align: right; }
|
||||
.special-condolence-apply .special-condolence-delete { color: #d64040; }
|
||||
.special-condolence-apply .special-condolence-table-footer { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; padding: 10px 20px; background: #fafbfd; }
|
||||
.special-condolence-apply .special-condolence-total { display: flex; align-items: baseline; gap: 6px; color: #606266; font-size: 13px; font-variant-numeric: tabular-nums; }
|
||||
.special-condolence-apply .special-condolence-total > span { margin-left: 18px; }
|
||||
.special-condolence-apply .special-condolence-total-amount { color: #303133; font-size: 20px; }
|
||||
.special-condolence-apply .special-condolence-actions { gap: 12px; margin-top: 24px; padding-top: 20px; border-top: 1px solid #ebeef5; }
|
||||
.special-condolence-apply .special-condolence-actions .el-button { margin: 0; min-width: 108px; }
|
||||
.special-condolence-dialog { max-width: calc(100vw - 32px); border-radius: 8px; }
|
||||
.special-condolence-dialog .el-dialog__header { padding: 22px 24px 16px; border-bottom: 1px solid #ebeef5; }
|
||||
.special-condolence-dialog .el-dialog__body { padding: 24px; }
|
||||
.special-condolence-dialog .el-dialog__footer { padding: 16px 24px; border-top: 1px solid #ebeef5; }
|
||||
.special-condolence-dialog .special-condolence-template { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; padding: 16px; border: 1px solid #dce6f3; border-radius: 6px; background: #f6f9fe; }
|
||||
.special-condolence-dialog .special-condolence-template > i { color: #409eff; font-size: 28px; }
|
||||
.special-condolence-dialog .special-condolence-template > div { flex: 1; min-width: 180px; }
|
||||
.special-condolence-dialog .special-condolence-template p { margin: 5px 0 0; color: #606266; font-size: 12px; line-height: 18px; }
|
||||
.special-condolence-dialog .special-condolence-upload-title { margin: 22px 0 12px; font-weight: 600; }
|
||||
.special-condolence-dialog .special-condolence-upload .el-upload,
|
||||
.special-condolence-dialog .special-condolence-upload .el-upload-dragger { width: 100%; }
|
||||
.special-condolence-dialog .special-condolence-upload .el-upload-dragger { height: auto; min-height: 150px; padding: 22px 12px; }
|
||||
.special-condolence-dialog .special-condolence-upload .el-icon-upload,
|
||||
.special-condolence-dialog .special-condolence-upload .el-icon-loading { display: block; margin: 0 0 16px; color: #909399; font-size: 44px; line-height: 48px; }
|
||||
.special-condolence-dialog .el-upload__tip { margin-bottom: 16px; line-height: 20px; }
|
||||
.special-condolence-dialog .special-condolence-batch-note { margin-bottom: 24px; padding: 12px 16px; background: #f5f7fa; border-radius: 4px; line-height: 22px; }
|
||||
.special-condolence-dialog .special-condolence-batch-form .el-select,
|
||||
.special-condolence-dialog .special-condolence-batch-form .el-input-number,
|
||||
.special-condolence-dialog .special-condolence-batch-form .el-date-editor { width: 100%; }
|
||||
@media (max-width: 768px) {
|
||||
.special-condolence-apply .el-card__body { padding: 16px; }
|
||||
.special-condolence-apply .special-condolence-toolbar { padding: 14px; }
|
||||
.special-condolence-apply .special-condolence-total > span { margin-left: 8px; }
|
||||
}
|
||||
|
||||
.special-condolence-apply .special-condolence-table-item .el-table .el-form-item { margin: 8px 0 20px; }
|
||||
.special-condolence-apply .special-condolence-table-item .el-table .el-form-item__error { position: absolute; padding: 4px 0 0; font-size: 11px; line-height: 14px; white-space: normal; }
|
||||
+63
@@ -0,0 +1,63 @@
|
||||
<div class="special-condolence-section-title">统一慰问配置</div>
|
||||
<el-descriptions :column="3" border size="small">
|
||||
<el-descriptions-item label="慰问类型">
|
||||
<el-form-item label="慰问类型" prop="type">
|
||||
<el-select v-model="formData.type" filterable @change="typeChange" style="width:100%" placeholder="请选择慰问类型">
|
||||
<el-option v-for="t in typeOptions" :key="t.id" :value="t.id" :label="t.name"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="慰问金额">
|
||||
<el-form-item label="慰问金额" prop="perMoney" :rules="recipientRules.money">
|
||||
<el-input-number v-model="formData.perMoney" :precision="2" :min="0" :max="10000" :controls="false" style="width:100%" placeholder="每人慰问金额(元)"></el-input-number>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="慰问时间">
|
||||
<el-form-item label="慰问时间" prop="occurTime" :rules="recipientRules.occurTime">
|
||||
<el-date-picker v-model="formData.occurTime" type="date" value-format="yyyy-MM-dd" style="width:100%" placeholder="请选择慰问时间"></el-date-picker>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
<section class="special-condolence-recipients">
|
||||
<div class="special-condolence-toolbar">
|
||||
<div>
|
||||
<div class="special-condolence-section-title">慰问对象明细 <el-tag size="small" effect="plain">{{ recipientCount }} 人</el-tag></div>
|
||||
<div class="special-condolence-hint">一行填写一位慰问对象,所有人员随本申请统一审批。</div>
|
||||
</div>
|
||||
<div class="special-condolence-toolbar-buttons">
|
||||
<el-button size="small" icon="el-icon-upload2" @click="importVisible = true">Excel 导入</el-button>
|
||||
<el-button size="small" type="primary" icon="el-icon-plus" @click="formData.recipients.push(newRecipient())">新增慰问对象</el-button>
|
||||
</div>
|
||||
</div>
|
||||
<el-form-item prop="recipients" label-width="0" class="special-condolence-table-item">
|
||||
<el-table :data="formData.recipients" border stripe size="small" max-height="520" empty-text="暂无慰问对象,点击新增或从 Excel 导入">
|
||||
<el-table-column type="index" label="序号" width="55" align="center" fixed="left"></el-table-column>
|
||||
<el-table-column label="慰问对象" width="200" fixed="left"><template slot-scope="s"><el-form-item :prop="'recipients.' + s.$index + '.helpUserId'" :rules="recipientRules.helpUserId"><user-select size="small" :ref="'recipientUser' + s.$index" v-model="s.row.helpUserId" api="/platform/special_condolence/apply/listUser" api_input_key_name="keyword" :option_list="recipientOptions(s.row)" :option_label_func="item => item.userName + '(' + (item.loginName || '') + ')'" @hook:mounted="seedRecipientOptions(s.row, s.$index)" @change="id => recipientUserChange(s.row, s.$index, id)"></user-select></el-form-item></template></el-table-column>
|
||||
<el-table-column label="工号" min-width="150"><template slot-scope="s"><el-form-item :prop="'recipients.' + s.$index + '.helpLoginName'" :rules="[{ validator: (rule, value, cb) => cb(s.row.personType === '劳务派遣人员' || value ? undefined : new Error('普通人员工号不能为空')), trigger: 'change' }]"><el-input size="small" v-model="s.row.helpLoginName" readonly placeholder="选人后带出,劳务派遣可空"></el-input></el-form-item></template></el-table-column>
|
||||
<el-table-column label="身份证号码" min-width="205"><template slot-scope="s"><el-form-item :prop="'recipients.' + s.$index + '.idCard'" :rules="recipientRules.idCard"><el-input size="small" v-model="s.row.idCard" maxlength="18" placeholder="请输入18位身份证号"></el-input></el-form-item></template></el-table-column>
|
||||
<el-table-column label="开户行" min-width="190"><template slot-scope="s"><el-form-item :prop="'recipients.' + s.$index + '.bankOfDeposit'" :rules="recipientRules.bankOfDeposit"><el-input size="small" v-model="s.row.bankOfDeposit" maxlength="100" placeholder="请输入开户银行及支行"></el-input></el-form-item></template></el-table-column>
|
||||
<el-table-column label="户名" min-width="140"><template slot-scope="s"><el-form-item :prop="'recipients.' + s.$index + '.bankUserName'" :rules="recipientRules.bankUserName"><el-input size="small" v-model="s.row.bankUserName" maxlength="100" placeholder="请输入账户户名"></el-input></el-form-item></template></el-table-column>
|
||||
<el-table-column label="收款账户" min-width="215"><template slot-scope="s"><el-form-item :prop="'recipients.' + s.$index + '.bankCardNumber'" :rules="recipientRules.bankCardNumber"><el-input size="small" v-model="s.row.bankCardNumber" maxlength="30" placeholder="银行卡号或对公账户号"></el-input></el-form-item></template></el-table-column>
|
||||
<el-table-column label="操作" fixed="right" width="75" align="center"><template slot-scope="s"><el-button size="small" type="text" class="special-condolence-delete" @click="formData.recipients.splice(s.$index, 1)">删除</el-button></template></el-table-column>
|
||||
</el-table>
|
||||
</el-form-item>
|
||||
<div class="special-condolence-table-footer">
|
||||
<el-button type="text" icon="el-icon-plus" @click="formData.recipients.push(newRecipient())">继续添加一行</el-button>
|
||||
<div class="special-condolence-total">共 <strong>{{ recipientCount }}</strong> 人<span>慰问金额合计</span><strong class="special-condolence-total-amount">¥ {{ recipientTotal }}</strong></div>
|
||||
</div>
|
||||
</section>
|
||||
<el-dialog title="Excel 导入慰问对象" :visible.sync="importVisible" width="560px" custom-class="special-condolence-dialog" :close-on-click-modal="!importLoading" :close-on-press-escape="!importLoading" :show-close="!importLoading" append-to-body>
|
||||
<div class="special-condolence-template">
|
||||
<i class="el-icon-document"></i>
|
||||
<div><strong>第一步:下载并填写模板</strong><p>按模板表头填写,一行对应一位慰问对象。</p></div>
|
||||
<el-button size="small" type="primary" plain icon="el-icon-download" @click="$downLoad('/platform/special_condolence/apply/importTemplate')">下载模板</el-button>
|
||||
</div>
|
||||
<div class="special-condolence-upload-title">第二步:上传填写好的文件</div>
|
||||
<el-upload class="special-condolence-upload" drag action="" accept=".xlsx,.xls" :http-request="importRecipients" :show-file-list="false" :disabled="importLoading">
|
||||
<i :class="importLoading ? 'el-icon-loading' : 'el-icon-upload'"></i>
|
||||
<div class="el-upload__text">{{ importLoading ? '正在导入,请稍候…' : '将 Excel 文件拖到此处,或点击选择文件' }}</div>
|
||||
<div slot="tip" class="el-upload__tip">支持 .xlsx、.xls 格式,单次最多 1000 行。导入的数据将追加到当前表格。</div>
|
||||
</el-upload>
|
||||
<el-alert title="工号、身份证号码和收款账户请保持文本格式。普通人员须填写正确工号;劳务派遣人员免校验工号,均须属于申请人本工会。" type="info" :closable="false" show-icon></el-alert>
|
||||
<span slot="footer"><el-button :disabled="importLoading" @click="importVisible = false">关闭</el-button></span>
|
||||
</el-dialog>
|
||||
+88
@@ -0,0 +1,88 @@
|
||||
const specialCondolenceRecipients = {
|
||||
data() {
|
||||
return { recipientRules: this.createRecipientRules(), importVisible: false, importLoading: false }
|
||||
},
|
||||
computed: {
|
||||
recipientCount() {
|
||||
return (this.formData.recipients || []).length
|
||||
},
|
||||
recipientTotal() {
|
||||
const money = Number(this.formData.perMoney)
|
||||
const cents = (Number.isFinite(money) && money > 0 ? Math.round(money * 100) : 0) * this.recipientCount
|
||||
return (cents / 100).toLocaleString('zh-CN', { minimumFractionDigits: 2, maximumFractionDigits: 2 })
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
typeOptions() { this.chooseType = this.typeOptions.find(t => t.id === this.formData.type) || {} },
|
||||
'formData.type'(value) { this.chooseType = this.typeOptions.find(t => t.id === value) || {} }
|
||||
},
|
||||
methods: {
|
||||
createRecipientRules() {
|
||||
const required = label => ({ required: true, whitespace: true, message: '请填写' + label, trigger: ['blur', 'change'] })
|
||||
return {
|
||||
helpUserId: [{ required: true, message: '请选择慰问对象', trigger: 'change' }],
|
||||
type: [{ required: true, message: '请选择慰问类型', trigger: 'change' }],
|
||||
idCard: [required('身份证号码'), { validator: (rule, value, cb) => cb(this.validRecipientIdCard(value) ? undefined : new Error('身份证号码不正确')), trigger: ['blur', 'change'] }],
|
||||
bankOfDeposit: [required('开户行'), { max: 100, message: '开户行最多100字', trigger: 'blur' }],
|
||||
bankUserName: [required('户名'), { max: 100, message: '户名最多100字', trigger: 'blur' }],
|
||||
bankCardNumber: [required('收款账户'), { pattern: /^[0-9]{6,30}$/, message: '请输入6至30位数字账户', trigger: ['blur', 'change'] }],
|
||||
money: [{ validator: (rule, value, cb) => cb(/^(0|[1-9][0-9]*)(\.[0-9]{1,2})?$/.test(String(value)) && Number(value) > 0 && Number(value) <= 10000 ? undefined : new Error('金额须大于0且不超过10000元,最多两位小数')), trigger: ['blur', 'change'] }],
|
||||
occurTime: [{ validator: (rule, value, cb) => cb(this.$moment(value, 'YYYY-MM-DD', true).isValid() ? undefined : new Error('请选择有效慰问时间')), trigger: ['blur', 'change'] }]
|
||||
}
|
||||
},
|
||||
validRecipientIdCard(value) {
|
||||
const card = String(value || '').toUpperCase()
|
||||
if (!/^[1-9][0-9]{16}[0-9X]$/.test(card) || !this.$moment(card.substring(6, 14), 'YYYYMMDD', true).isValid()) return false
|
||||
const weights = [7, 9, 10, 5, 8, 4, 2, 1, 6, 3, 7, 9, 10, 5, 8, 4, 2]
|
||||
return '10X98765432'[weights.reduce((sum, weight, index) => sum + weight * Number(card[index]), 0) % 11] === card[17]
|
||||
},
|
||||
recipientOptions(row) {
|
||||
return row.helpUserId ? [{ id: row.helpUserId, userName: row.helpUserName, loginName: row.helpLoginName }] : []
|
||||
},
|
||||
seedRecipientOptions(row, index) {
|
||||
const component = this.$refs['recipientUser' + index]
|
||||
if (component && row.helpUserId) component.options = this.recipientOptions(row)
|
||||
},
|
||||
recipientUserChange(row, index, id) {
|
||||
const component = this.$refs['recipientUser' + index]
|
||||
const user = component && component.options.find(item => item.id === id)
|
||||
this.$set(row, 'helpUserId', user ? user.id : '')
|
||||
this.$set(row, 'helpUserName', user ? user.userName : '')
|
||||
this.$set(row, 'helpLoginName', user ? user.loginName : '')
|
||||
this.$set(row, 'personType', user ? user.personType : '')
|
||||
this.$set(row, 'idCard', user ? user.idCard || '' : '')
|
||||
this.$set(row, 'bankOfDeposit', user ? user.bankOfDeposit || '' : '')
|
||||
this.$set(row, 'bankUserName', user ? user.bankUserName || user.userName : '')
|
||||
this.$set(row, 'bankCardNumber', user ? user.bankCardNumber || '' : '')
|
||||
this.$nextTick(() => this.$refs.formRef.validateField('recipients.' + index + '.helpUserId'))
|
||||
},
|
||||
|
||||
newRecipient() {
|
||||
return { helpUserId: '', helpLoginName: '', personType: '', helpUserName: '', idCard: '', bankOfDeposit: '', bankUserName: '', bankCardNumber: '' }
|
||||
},
|
||||
initRecipients() {
|
||||
if (this.formData.perMoney == null && this.formData.recipients && this.formData.recipients.length) this.$set(this.formData, 'perMoney', Number(this.formData.recipients[0].money))
|
||||
if (!this.formData.recipients || !this.formData.recipients.length) {
|
||||
this.$set(this.formData, 'recipients', this.formData.helpUserName ? [Object.assign(this.newRecipient(), this.formData, { recipients: undefined })] : [this.newRecipient()])
|
||||
}
|
||||
},
|
||||
async importRecipients(request) {
|
||||
this.importLoading = true
|
||||
try {
|
||||
const data = new FormData()
|
||||
data.append('file', request.file)
|
||||
const result = await this.$axios.post('/platform/special_condolence/apply/importRecipients', data)
|
||||
if (result.code === 0) {
|
||||
const rows = this.formData.recipients.filter(r => r.helpUserName || r.type || r.idCard || r.bankCardNumber || r.bankUserName || r.bankOfDeposit || r.money)
|
||||
this.$set(this.formData, 'recipients', rows.concat(result.data))
|
||||
this.importVisible = false
|
||||
this.$message.success('导入成功,共' + result.data.length + '人')
|
||||
} else this.$message.error(result.msg || '导入失败')
|
||||
} catch (error) {
|
||||
this.$message.error('导入失败,请检查文件内容后重试')
|
||||
} finally {
|
||||
this.importLoading = false
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,157 @@
|
||||
const specialcondolenceInfo = {
|
||||
template: /*language=HTML*/ `
|
||||
<div>
|
||||
<div class="process-title">
|
||||
申请信息
|
||||
<el-link type="primary" @click="openChart">点击查看流程图</el-link>
|
||||
</div>
|
||||
<el-descriptions :column="3" border>
|
||||
<el-descriptions-item label="申请人姓名">{{ viewData.applyUserName }}</el-descriptions-item>
|
||||
<el-descriptions-item label="申请人工号">{{ viewData.applyLoginName }}</el-descriptions-item>
|
||||
<el-descriptions-item label="申请人单位">{{ viewData.applyUnitName }}</el-descriptions-item>
|
||||
<el-descriptions-item label="申请人工会">{{ viewData.applyUnionName }}</el-descriptions-item>
|
||||
<template v-if="viewData.recipients && viewData.recipients.length">
|
||||
<el-descriptions-item label="慰问类型">{{ viewData.typeName }}</el-descriptions-item>
|
||||
<el-descriptions-item label="每人慰问金额">{{ viewData.perMoney }} 元</el-descriptions-item>
|
||||
<el-descriptions-item label="慰问时间">{{ viewData.occurTime }}</el-descriptions-item>
|
||||
</template>
|
||||
<template v-if="!viewData.recipients || !viewData.recipients.length">
|
||||
<el-descriptions-item label="慰问对象">{{ viewData.helpUserName }}</el-descriptions-item>
|
||||
<!-- <el-descriptions-item label="经办人">{{ viewData.handlerUserName }}</el-descriptions-item>-->
|
||||
<el-descriptions-item label="证明人">{{ viewData.certifierUserName }}</el-descriptions-item>
|
||||
<el-descriptions-item label="慰问类型">{{ viewData.typeName }}</el-descriptions-item>
|
||||
<el-descriptions-item label="慰问金额">{{ viewData.money }}</el-descriptions-item>
|
||||
<el-descriptions-item label="慰问时间">{{ viewData.occurTime }}</el-descriptions-item>
|
||||
<el-descriptions-item label="收款账户">{{ viewData.bankCardNumber }}</el-descriptions-item>
|
||||
<el-descriptions-item label="户名">{{ viewData.bankUserName }}</el-descriptions-item>
|
||||
<el-descriptions-item label="开户行">{{ viewData.bankOfDeposit }}</el-descriptions-item>
|
||||
<template v-if="['2'].includes(viewData.typeCode)">
|
||||
<el-descriptions-item label="入院时间">{{ viewData.hospitalizationTime }}</el-descriptions-item>
|
||||
<el-descriptions-item label="出院时间">{{ viewData.leaveHospitalTime }}</el-descriptions-item>
|
||||
<el-descriptions-item label="当年第几次住院">{{ viewData.thisYearHospitalizationNum }}
|
||||
</el-descriptions-item>
|
||||
</template>
|
||||
</template>
|
||||
<el-descriptions-item label="申请事由" :span="3">
|
||||
<div style="white-space: pre-line">{{ viewData.remark }}</div>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="附件" :span="3">
|
||||
<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-item label="签字" :span="3">
|
||||
<el-image :src="viewData.signature"
|
||||
v-if="viewData.signature"
|
||||
class="signature-image"></el-image>
|
||||
<span v-else>暂无签字</span>
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
|
||||
<div v-if="viewData.recipients && viewData.recipients.length" class="process-title" style="display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap;margin-top:20px">
|
||||
<span>慰问对象明细 <el-tag size="small" effect="plain">{{ viewData.recipients.length }} 人</el-tag></span>
|
||||
<span style="font-size:14px;font-weight:normal">慰问金额合计:<strong>¥ {{ detailTotal }}</strong></span>
|
||||
</div>
|
||||
<el-table v-if="viewData.recipients && viewData.recipients.length" :data="viewData.recipients" border stripe size="small" max-height="480" class="mt10" :header-cell-style="{ background: '#f5f7fa', color: '#606266' }">
|
||||
<el-table-column type="index" label="序号" width="55" align="center" fixed="left"></el-table-column>
|
||||
<el-table-column prop="helpUserName" label="慰问对象" width="130" fixed="left"></el-table-column>
|
||||
<el-table-column prop="helpLoginName" label="工号" min-width="130"></el-table-column>
|
||||
<el-table-column prop="idCard" label="身份证号码" min-width="190"></el-table-column>
|
||||
<el-table-column prop="bankOfDeposit" label="开户行" min-width="180" show-overflow-tooltip></el-table-column>
|
||||
<el-table-column prop="bankUserName" label="户名" min-width="150"></el-table-column>
|
||||
<el-table-column prop="bankCardNumber" label="收款账户" min-width="210"></el-table-column>
|
||||
</el-table>
|
||||
<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.taskFormData && task.taskFormData.sign">
|
||||
<el-image :src="task.taskFormData.sign" style="height: 80px" fit="contain"></el-image>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="办理意见" v-if="!task.ext.isFirstTaskNode">{{
|
||||
task.taskFormData.opinion }}
|
||||
</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
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
detailTotal() {
|
||||
const cents = (this.viewData.recipients || []).reduce((sum, row) => {
|
||||
const money = Number(row.money)
|
||||
return sum + (Number.isFinite(money) ? Math.round(money * 100) : 0)
|
||||
}, 0)
|
||||
return (cents / 100).toLocaleString('zh-CN', { minimumFractionDigits: 2, maximumFractionDigits: 2 })
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
onOpen(row) {
|
||||
this.row = row
|
||||
this.visible = true
|
||||
this.getInfo()
|
||||
this.getDoneTasks()
|
||||
},
|
||||
getInfo() {
|
||||
this.$axios.post('/platform/special_condolence/mine/info', {id: this.row.id}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.viewData = res.data
|
||||
}
|
||||
})
|
||||
},
|
||||
// 获取已办任务审批记录
|
||||
getDoneTasks() {
|
||||
this.$axios.post("/flow/common/doneTasks", {bizId: this.row.id}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.doneTasks = res.data
|
||||
}
|
||||
})
|
||||
},
|
||||
// 查看流程图
|
||||
openChart(){
|
||||
this.$refs.snakerChartRef.onOpenFull(this.row.instanceProcessDefineId, this.row.instanceId)
|
||||
}
|
||||
},
|
||||
style: /*language=CSS*/ `
|
||||
.el-descriptions-item__label {
|
||||
width: 200px;
|
||||
min-width: 200px;
|
||||
max-width: 200px;
|
||||
}
|
||||
.el-tabs__header {
|
||||
margin: 0;
|
||||
}
|
||||
`
|
||||
}
|
||||
+229
@@ -0,0 +1,229 @@
|
||||
<!--#
|
||||
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="doSearch"
|
||||
></el-date-picker>
|
||||
</search-item>
|
||||
<search-item label="姓名/工号">
|
||||
<el-input placeholder="请输入姓名或工号" clearable v-model="pageForm.searchKeyword"
|
||||
@keyup.enter.native="doSearch">
|
||||
</el-input>
|
||||
</search-item>
|
||||
<search-item label="慰问类型">
|
||||
<el-select v-model="pageForm.type" @change="doSearch" style="width: 100%"
|
||||
placeholder="请选择慰问类型" filterable clearable>
|
||||
<el-option v-for="item in typeOptions"
|
||||
:value="item.id"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
<search-item label="所属工会">
|
||||
<el-select v-model="pageForm.unionId" placeholder="请选择所属工会" filterable clearable
|
||||
@change="doSearch" style="width: 100%">
|
||||
<el-option
|
||||
v-for="item in unionList"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
<search-item label="所属单位">
|
||||
<el-select @change="doSearch"
|
||||
clearable
|
||||
filterable
|
||||
placeholder="请选择单位" style="width: 100%" v-model="pageForm.unitId">
|
||||
<el-option :key="item.id" :label="item.name" :value="item.id" v-for="item in unitList"></el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
</search>
|
||||
</el-card>
|
||||
|
||||
<el-card shadow="never">
|
||||
<table-tool label="申请列表">
|
||||
<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
|
||||
:label="column.label"
|
||||
:prop="column.prop"
|
||||
:key="column.prop"
|
||||
:width="column.width"
|
||||
:sortable="column.sortable"
|
||||
align="center"
|
||||
header-align="center"
|
||||
show-overflow-tooltip
|
||||
v-for="column in tableColumns"
|
||||
>
|
||||
<template v-slot="{ row }" v-if="column.prop === 'instanceState'">
|
||||
<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="onAudit(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 #edit>
|
||||
<specialcondolence-info ref="specialcondolenceInfoRef">
|
||||
<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_sign" :rules="[{required:true,message:'请完成审批签字',trigger:['change','blur']}]">
|
||||
<pc-signature v-model="formData.tf_sign" :key="formData.processTaskId"></pc-signature>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-row type="flex" justify="end">
|
||||
<el-button @click="handleTaskAction(1)" size="small" type="primary">同意申请</el-button>
|
||||
<el-button @click="handleTaskAction(2)" size="small" type="danger">拒绝申请</el-button>
|
||||
<el-button @click="handleTaskAction(6)" size="small" type="info">退回到发起人</el-button>
|
||||
<el-button @click="$refs.guava.index()" size="small">取消</el-button>
|
||||
</el-row>
|
||||
</div>
|
||||
</specialcondolence-info>
|
||||
</template>
|
||||
|
||||
</guava>
|
||||
</div>
|
||||
|
||||
<script nonce="${cspNonce!}">
|
||||
<!--#include('../common/info.js'){}#-->
|
||||
new Vue({
|
||||
el: "#app",
|
||||
store,
|
||||
mixins: [initTableMixins],
|
||||
components: {
|
||||
"specialcondolence-info": specialcondolenceInfo
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
pageForm: {
|
||||
approval: false
|
||||
},
|
||||
typeOptions: [],
|
||||
tableColumns: [
|
||||
{prop: 'helpUserName', label: '慰问对象'},
|
||||
{prop: 'helpLoginName', label: '慰问对象工号'},
|
||||
{prop: 'applyUserName', label: '申请人'},
|
||||
{prop: 'applyUnionName', label: '所属工会'},
|
||||
{prop: 'applyUnitName', label: '所属单位'},
|
||||
{prop: 'typeName', label: '慰问类型'},
|
||||
{prop: 'curTaskName', label: '当前节点'},
|
||||
{prop: 'instanceState', label: '流程状态'},
|
||||
],
|
||||
unionList: [],
|
||||
unitList: [],
|
||||
formData: {},
|
||||
showApprovalForm: false
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
onView(row) {
|
||||
this.$refs.guava.edit(()=>{
|
||||
this.showApprovalForm = false
|
||||
this.$refs.specialcondolenceInfoRef.onOpen(row)
|
||||
})
|
||||
},
|
||||
onAudit(row) {
|
||||
this.$refs.guava.edit(()=>{
|
||||
this.showApprovalForm = true
|
||||
this.formData = {
|
||||
processTaskId: row.taskId,
|
||||
taskName: row.curTaskName,
|
||||
tf_sign: "",
|
||||
tf_opinion: ""
|
||||
}
|
||||
this.$refs.specialcondolenceInfoRef.onOpen(row)
|
||||
})
|
||||
},
|
||||
async handleTaskAction(val) {
|
||||
try {
|
||||
const valid = await this.$refs.formRef.validate()
|
||||
if (!valid) return
|
||||
} catch (error) {
|
||||
return
|
||||
}
|
||||
this.$confirm("您确定要提交吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(() => {
|
||||
this.$axios.post("/platform/special_condolence/approval/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()
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
onRevoke(row) {
|
||||
this.$confirm("您确定要撤回吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "info"
|
||||
}).then(() => {
|
||||
this.$axios.post("/flow/common/revokeTask", {taskId: row.taskId}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$message.success(res.msg)
|
||||
this.doSearch()
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
querySpecialCondolenceType() {
|
||||
this.$axios.post('/platform/special_condolence/type/querySpecialCondolenceType')
|
||||
.then((resp) => {
|
||||
this.typeOptions = resp.data
|
||||
})
|
||||
},
|
||||
},
|
||||
async created() {
|
||||
this.unionList = await this.$businessTool.listUnion()
|
||||
this.unitList = await this.$businessTool.listUnit()
|
||||
this.querySpecialCondolenceType()
|
||||
this.pageData()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
+170
@@ -0,0 +1,170 @@
|
||||
<!--#
|
||||
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="doSearch"
|
||||
></el-date-picker>
|
||||
</search-item>
|
||||
<search-item label="姓名/工号">
|
||||
<el-input placeholder="请输入姓名或工号" clearable v-model="pageForm.searchKeyword"
|
||||
@keyup.enter.native="doSearch">
|
||||
</el-input>
|
||||
</search-item>
|
||||
<search-item label="慰问类型">
|
||||
<el-select v-model="pageForm.type" @change="doSearch" style="width: 100%"
|
||||
placeholder="请选择慰问类型" filterable clearable>
|
||||
<el-option v-for="item in typeOptions"
|
||||
:value="item.id"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
</search>
|
||||
</el-card>
|
||||
|
||||
<el-card shadow="never">
|
||||
<table-tool label="申请列表">
|
||||
<el-button type="primary" size="small" @click="onAdd">
|
||||
<i class="ti-plus"></i>
|
||||
新增申请
|
||||
</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
|
||||
:label="column.label"
|
||||
:prop="column.prop"
|
||||
:key="column.prop"
|
||||
:width="column.width"
|
||||
:sortable="column.sortable"
|
||||
align="center"
|
||||
header-align="center"
|
||||
show-overflow-tooltip
|
||||
v-for="column in tableColumns"
|
||||
>
|
||||
<template v-slot="{ row }" v-if="column.prop === 'instanceState'">
|
||||
<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="300">
|
||||
<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" size="mini" type="danger" @click="onRevoke(row)">撤回</el-button>
|
||||
<el-dropdown v-if="row.createdBy === $store.state.user.id && row.instanceState == 20" trigger="click" @command="format => doExportApply(row, format)">
|
||||
<el-button size="mini" type="primary">导出</el-button>
|
||||
<el-dropdown-menu slot="dropdown">
|
||||
<el-dropdown-item command="pdf">导出 PDF</el-dropdown-item>
|
||||
<el-dropdown-item command="word">导出 Word</el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
</el-dropdown>
|
||||
<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>
|
||||
<specialcondolence-info ref="specialcondolenceInfoRef"></specialcondolence-info>
|
||||
</template>
|
||||
</guava>
|
||||
</div>
|
||||
|
||||
<script nonce="${cspNonce!}">
|
||||
<!--#include('../common/info.js'){}#-->
|
||||
new Vue({
|
||||
el: "#app",
|
||||
store,
|
||||
mixins: [initTableMixins],
|
||||
components: {
|
||||
"specialcondolence-info": specialcondolenceInfo
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
typeOptions: [],
|
||||
tableColumns: [
|
||||
{prop: 'helpUserName', label: '慰问对象'},
|
||||
{prop: 'helpLoginName', label: '慰问对象工号'},
|
||||
{prop: 'applyUserName', label: '申请人'},
|
||||
{prop: 'applyUnionName', label: '所属工会'},
|
||||
{prop: 'applyUnitName', label: '所属单位'},
|
||||
{prop: 'typeName', label: '慰问类型'},
|
||||
{prop: 'taskName', label: '当前节点'},
|
||||
{prop: 'instanceState', label: '流程状态'},
|
||||
],
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
doExportApply(row, format) {
|
||||
this.$downLoad('/platform/special_condolence/mine/doExportApply?id=' + row.id + '&print=' + (format === 'pdf'))
|
||||
},
|
||||
onAdd() {
|
||||
commonUtil.pjaxPush('/platform/special_condolence/apply')
|
||||
},
|
||||
onView(row) {
|
||||
this.$refs.guava.view(()=>{
|
||||
this.$refs.specialcondolenceInfoRef.onOpen(row)
|
||||
})
|
||||
},
|
||||
onEdit(row) {
|
||||
commonUtil.pjaxPush('/platform/special_condolence/apply?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/special_condolence/mine/delete", { id }).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$message.success(res.msg)
|
||||
this.pageData()
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
querySpecialCondolenceType() {
|
||||
this.$axios.post('/platform/special_condolence/type/querySpecialCondolenceType')
|
||||
.then((resp) => {
|
||||
this.typeOptions = resp.data
|
||||
})
|
||||
},
|
||||
},
|
||||
created() {
|
||||
this.querySpecialCondolenceType()
|
||||
this.pageData()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
+162
@@ -0,0 +1,162 @@
|
||||
<!--#
|
||||
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="doSearch"
|
||||
></el-date-picker>
|
||||
</search-item>
|
||||
<search-item label="姓名/工号">
|
||||
<el-input placeholder="请输入姓名或工号" clearable v-model="pageForm.searchKeyword"
|
||||
@keyup.enter.native="doSearch">
|
||||
</el-input>
|
||||
</search-item>
|
||||
<search-item label="慰问类型">
|
||||
<el-select v-model="pageForm.type" @change="doSearch" style="width: 100%"
|
||||
placeholder="请选择慰问类型" filterable clearable>
|
||||
<el-option v-for="item in typeOptions"
|
||||
:value="item.id"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
<search-item label="所属工会">
|
||||
<el-select v-model="pageForm.unionId" placeholder="请选择所属工会" filterable clearable
|
||||
@change="doSearch" style="width: 100%">
|
||||
<el-option
|
||||
v-for="item in unionList"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
<search-item label="所属单位">
|
||||
<el-select @change="doSearch"
|
||||
clearable
|
||||
filterable
|
||||
placeholder="请选择单位" style="width: 100%" v-model="pageForm.unitId">
|
||||
<el-option :key="item.id" :label="item.name" :value="item.id" v-for="item in unitList"></el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
</search>
|
||||
</el-card>
|
||||
|
||||
<el-card shadow="never">
|
||||
<table-tool label="申请列表">
|
||||
<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
|
||||
:label="column.label"
|
||||
:prop="column.prop"
|
||||
:key="column.prop"
|
||||
:width="column.width"
|
||||
:sortable="column.sortable"
|
||||
align="center"
|
||||
header-align="center"
|
||||
show-overflow-tooltip
|
||||
v-for="column in tableColumns"
|
||||
>
|
||||
<template v-slot="{ row }" v-if="column.prop === 'instanceState'">
|
||||
<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="180">
|
||||
<template slot-scope="{row}">
|
||||
<el-button @click="onView(row)" size="mini" type="primary">查看</el-button>
|
||||
<el-button v-if="$auth.hasRoleOr('SYSADMIN, SCHOOL_UNION_ADMIN')" @click="onDelete(row.id)" size="mini" type="danger">
|
||||
删除
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!--#include("/layouts/pagination.html"){}#-->
|
||||
</el-card>
|
||||
|
||||
<template #edit>
|
||||
<specialcondolence-info ref="specialcondolenceInfoRef"></specialcondolence-info>
|
||||
</template>
|
||||
</guava>
|
||||
</div>
|
||||
|
||||
<script nonce="${cspNonce!}">
|
||||
<!--#include('../common/info.js'){}#-->
|
||||
new Vue({
|
||||
el: "#app",
|
||||
store,
|
||||
mixins: [initTableMixins],
|
||||
components: {
|
||||
"specialcondolence-info": specialcondolenceInfo
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
typeOptions: [],
|
||||
tableColumns: [
|
||||
{prop: 'helpUserName', label: '慰问对象'},
|
||||
{prop: 'helpLoginName', label: '慰问对象工号'},
|
||||
{prop: 'applyUserName', label: '申请人'},
|
||||
{prop: 'applyUnionName', label: '所属工会'},
|
||||
{prop: 'applyUnitName', label: '所属单位'},
|
||||
{prop: 'typeName', label: '慰问类型'},
|
||||
{prop: 'taskName', label: '当前节点'},
|
||||
{prop: 'instanceState', label: '流程状态'},
|
||||
],
|
||||
unionList: [],
|
||||
unitList: [],
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
onDelete(id) {
|
||||
this.$confirm("您确定要删除吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(() => {
|
||||
this.$axios.post("/platform/special_condolence/mine/delete", { id }).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$message.success(res.msg)
|
||||
this.pageData()
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
onExport() {
|
||||
this.$downLoad(loc() + '/onExport', this.pageForm)
|
||||
},
|
||||
onView(row) {
|
||||
this.$refs.guava.edit(()=>{
|
||||
this.$refs.specialcondolenceInfoRef.onOpen(row)
|
||||
})
|
||||
},
|
||||
querySpecialCondolenceType() {
|
||||
this.$axios.post('/platform/special_condolence/type/querySpecialCondolenceType')
|
||||
.then((resp) => {
|
||||
this.typeOptions = resp.data
|
||||
})
|
||||
},
|
||||
},
|
||||
async created() {
|
||||
this.unionList = await this.$businessTool.listUnion()
|
||||
this.unitList = await this.$businessTool.listUnit()
|
||||
this.querySpecialCondolenceType()
|
||||
this.pageData()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
+229
@@ -0,0 +1,229 @@
|
||||
<!--#
|
||||
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="doSearch"
|
||||
></el-date-picker>
|
||||
</search-item>
|
||||
<search-item label="姓名/工号">
|
||||
<el-input placeholder="请输入姓名或工号" clearable v-model="pageForm.searchKeyword"
|
||||
@keyup.enter.native="doSearch">
|
||||
</el-input>
|
||||
</search-item>
|
||||
<search-item label="慰问类型">
|
||||
<el-select v-model="pageForm.type" @change="doSearch" style="width: 100%"
|
||||
placeholder="请选择慰问类型" filterable clearable>
|
||||
<el-option v-for="item in typeOptions"
|
||||
:value="item.id"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
<search-item label="所属工会">
|
||||
<el-select v-model="pageForm.unionId" placeholder="请选择所属工会" filterable clearable
|
||||
@change="doSearch" style="width: 100%">
|
||||
<el-option
|
||||
v-for="item in unionList"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
<search-item label="所属单位">
|
||||
<el-select @change="doSearch"
|
||||
clearable
|
||||
filterable
|
||||
placeholder="请选择单位" style="width: 100%" v-model="pageForm.unitId">
|
||||
<el-option :key="item.id" :label="item.name" :value="item.id" v-for="item in unitList"></el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
</search>
|
||||
</el-card>
|
||||
|
||||
<el-card shadow="never">
|
||||
<table-tool label="申请列表">
|
||||
<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
|
||||
:label="column.label"
|
||||
:prop="column.prop"
|
||||
:key="column.prop"
|
||||
:width="column.width"
|
||||
:sortable="column.sortable"
|
||||
align="center"
|
||||
header-align="center"
|
||||
show-overflow-tooltip
|
||||
v-for="column in tableColumns"
|
||||
>
|
||||
<template v-slot="{ row }" v-if="column.prop === 'instanceState'">
|
||||
<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="onAudit(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 #edit>
|
||||
<specialcondolence-info ref="specialcondolenceInfoRef">
|
||||
<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_sign" :rules="[{required:true,message:'请完成审批签字',trigger:['change','blur']}]">
|
||||
<pc-signature v-model="formData.tf_sign" :key="formData.processTaskId"></pc-signature>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-row type="flex" justify="end">
|
||||
<el-button @click="handleTaskAction(1)" size="small" type="primary">同意申请</el-button>
|
||||
<el-button @click="handleTaskAction(2)" size="small" type="danger">拒绝申请</el-button>
|
||||
<el-button @click="handleTaskAction(6)" size="small" type="info">退回到发起人</el-button>
|
||||
<el-button @click="$refs.guava.index()" size="small">取消</el-button>
|
||||
</el-row>
|
||||
</div>
|
||||
</specialcondolence-info>
|
||||
</template>
|
||||
|
||||
</guava>
|
||||
</div>
|
||||
|
||||
<script nonce="${cspNonce!}">
|
||||
<!--#include('../common/info.js'){}#-->
|
||||
new Vue({
|
||||
el: "#app",
|
||||
store,
|
||||
mixins: [initTableMixins],
|
||||
components: {
|
||||
"specialcondolence-info": specialcondolenceInfo
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
pageForm: {
|
||||
approval: false
|
||||
},
|
||||
typeOptions: [],
|
||||
tableColumns: [
|
||||
{prop: 'helpUserName', label: '慰问对象'},
|
||||
{prop: 'helpLoginName', label: '慰问对象工号'},
|
||||
{prop: 'applyUserName', label: '申请人'},
|
||||
{prop: 'applyUnionName', label: '所属工会'},
|
||||
{prop: 'applyUnitName', label: '所属单位'},
|
||||
{prop: 'typeName', label: '慰问类型'},
|
||||
{prop: 'curTaskName', label: '当前节点'},
|
||||
{prop: 'instanceState', label: '流程状态'},
|
||||
],
|
||||
unionList: [],
|
||||
unitList: [],
|
||||
formData: {},
|
||||
showApprovalForm: false
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
onView(row) {
|
||||
this.$refs.guava.edit(()=>{
|
||||
this.showApprovalForm = false
|
||||
this.$refs.specialcondolenceInfoRef.onOpen(row)
|
||||
})
|
||||
},
|
||||
onAudit(row) {
|
||||
this.$refs.guava.edit(()=>{
|
||||
this.showApprovalForm = true
|
||||
this.formData = {
|
||||
processTaskId: row.taskId,
|
||||
taskName: row.curTaskName,
|
||||
tf_sign: "",
|
||||
tf_opinion: ""
|
||||
}
|
||||
this.$refs.specialcondolenceInfoRef.onOpen(row)
|
||||
})
|
||||
},
|
||||
async handleTaskAction(val) {
|
||||
try {
|
||||
const valid = await this.$refs.formRef.validate()
|
||||
if (!valid) return
|
||||
} catch (error) {
|
||||
return
|
||||
}
|
||||
this.$confirm("您确定要提交吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(() => {
|
||||
this.$axios.post("/platform/special_condolence/approval/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()
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
onRevoke(row) {
|
||||
this.$confirm("您确定要撤回吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "info"
|
||||
}).then(() => {
|
||||
this.$axios.post("/flow/common/revokeTask", {taskId: row.taskId}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$message.success(res.msg)
|
||||
this.doSearch()
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
querySpecialCondolenceType() {
|
||||
this.$axios.post('/platform/special_condolence/type/querySpecialCondolenceType')
|
||||
.then((resp) => {
|
||||
this.typeOptions = resp.data
|
||||
})
|
||||
},
|
||||
},
|
||||
async created() {
|
||||
this.unionList = await this.$businessTool.listUnion()
|
||||
this.unitList = await this.$businessTool.listUnit()
|
||||
this.querySpecialCondolenceType()
|
||||
this.pageData()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
+229
@@ -0,0 +1,229 @@
|
||||
<!--#
|
||||
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="doSearch"
|
||||
></el-date-picker>
|
||||
</search-item>
|
||||
<search-item label="姓名/工号">
|
||||
<el-input placeholder="请输入姓名或工号" clearable v-model="pageForm.searchKeyword"
|
||||
@keyup.enter.native="doSearch">
|
||||
</el-input>
|
||||
</search-item>
|
||||
<search-item label="慰问类型">
|
||||
<el-select v-model="pageForm.type" @change="doSearch" style="width: 100%"
|
||||
placeholder="请选择慰问类型" filterable clearable>
|
||||
<el-option v-for="item in typeOptions"
|
||||
:value="item.id"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
<search-item label="所属工会">
|
||||
<el-select v-model="pageForm.unionId" placeholder="请选择所属工会" filterable clearable
|
||||
@change="doSearch" style="width: 100%">
|
||||
<el-option
|
||||
v-for="item in unionList"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
<search-item label="所属单位">
|
||||
<el-select @change="doSearch"
|
||||
clearable
|
||||
filterable
|
||||
placeholder="请选择单位" style="width: 100%" v-model="pageForm.unitId">
|
||||
<el-option :key="item.id" :label="item.name" :value="item.id" v-for="item in unitList"></el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
</search>
|
||||
</el-card>
|
||||
|
||||
<el-card shadow="never">
|
||||
<table-tool label="申请列表">
|
||||
<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
|
||||
:label="column.label"
|
||||
:prop="column.prop"
|
||||
:key="column.prop"
|
||||
:width="column.width"
|
||||
:sortable="column.sortable"
|
||||
align="center"
|
||||
header-align="center"
|
||||
show-overflow-tooltip
|
||||
v-for="column in tableColumns"
|
||||
>
|
||||
<template v-slot="{ row }" v-if="column.prop === 'instanceState'">
|
||||
<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="onAudit(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 #edit>
|
||||
<specialcondolence-info ref="specialcondolenceInfoRef">
|
||||
<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_sign" :rules="[{required:true,message:'请完成审批签字',trigger:['change','blur']}]">
|
||||
<pc-signature v-model="formData.tf_sign" :key="formData.processTaskId"></pc-signature>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-row type="flex" justify="end">
|
||||
<el-button @click="handleTaskAction(1)" size="small" type="primary">同意申请</el-button>
|
||||
<el-button @click="handleTaskAction(2)" size="small" type="danger">拒绝申请</el-button>
|
||||
<el-button @click="handleTaskAction(6)" size="small" type="info">退回到发起人</el-button>
|
||||
<el-button @click="$refs.guava.index()" size="small">取消</el-button>
|
||||
</el-row>
|
||||
</div>
|
||||
</specialcondolence-info>
|
||||
</template>
|
||||
|
||||
</guava>
|
||||
</div>
|
||||
|
||||
<script nonce="${cspNonce!}">
|
||||
<!--#include('../common/info.js'){}#-->
|
||||
new Vue({
|
||||
el: "#app",
|
||||
store,
|
||||
mixins: [initTableMixins],
|
||||
components: {
|
||||
"specialcondolence-info": specialcondolenceInfo
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
pageForm: {
|
||||
approval: false
|
||||
},
|
||||
typeOptions: [],
|
||||
tableColumns: [
|
||||
{prop: 'helpUserName', label: '慰问对象'},
|
||||
{prop: 'helpLoginName', label: '慰问对象工号'},
|
||||
{prop: 'applyUserName', label: '申请人'},
|
||||
{prop: 'applyUnionName', label: '所属工会'},
|
||||
{prop: 'applyUnitName', label: '所属单位'},
|
||||
{prop: 'typeName', label: '慰问类型'},
|
||||
{prop: 'curTaskName', label: '当前节点'},
|
||||
{prop: 'instanceState', label: '流程状态'},
|
||||
],
|
||||
unionList: [],
|
||||
unitList: [],
|
||||
formData: {},
|
||||
showApprovalForm: false
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
onView(row) {
|
||||
this.$refs.guava.edit(()=>{
|
||||
this.showApprovalForm = false
|
||||
this.$refs.specialcondolenceInfoRef.onOpen(row)
|
||||
})
|
||||
},
|
||||
onAudit(row) {
|
||||
this.$refs.guava.edit(()=>{
|
||||
this.showApprovalForm = true
|
||||
this.formData = {
|
||||
processTaskId: row.taskId,
|
||||
taskName: row.curTaskName,
|
||||
tf_sign: "",
|
||||
tf_opinion: ""
|
||||
}
|
||||
this.$refs.specialcondolenceInfoRef.onOpen(row)
|
||||
})
|
||||
},
|
||||
async handleTaskAction(val) {
|
||||
try {
|
||||
const valid = await this.$refs.formRef.validate()
|
||||
if (!valid) return
|
||||
} catch (error) {
|
||||
return
|
||||
}
|
||||
this.$confirm("您确定要提交吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(() => {
|
||||
this.$axios.post("/platform/special_condolence/approval/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()
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
onRevoke(row) {
|
||||
this.$confirm("您确定要撤回吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "info"
|
||||
}).then(() => {
|
||||
this.$axios.post("/flow/common/revokeTask", {taskId: row.taskId}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$message.success(res.msg)
|
||||
this.doSearch()
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
querySpecialCondolenceType() {
|
||||
this.$axios.post('/platform/special_condolence/type/querySpecialCondolenceType')
|
||||
.then((resp) => {
|
||||
this.typeOptions = resp.data
|
||||
})
|
||||
},
|
||||
},
|
||||
async created() {
|
||||
this.unionList = await this.$businessTool.listUnion()
|
||||
this.unitList = await this.$businessTool.listUnit()
|
||||
this.querySpecialCondolenceType()
|
||||
this.pageData()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
+101
@@ -0,0 +1,101 @@
|
||||
const basicForm = {
|
||||
template: /*language=HTML*/ `
|
||||
<div>
|
||||
<el-form :model="formData" ref="formRef" :rules="formRules" label-width="110px" label-position="left">
|
||||
<el-form-item label="类型编码" prop="code">
|
||||
<el-input type="text" v-model="formData.code" maxlength="50"
|
||||
placeholder="请填写类型编码"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="类型名称" prop="name">
|
||||
<el-input type="text" v-model="formData.name" maxlength="50"
|
||||
placeholder="请填写类型名称"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="慰问费用" prop="money">
|
||||
<el-input-number style="width: 100%" v-model="formData.money"
|
||||
placeholder="请填写慰问费用" controls-position="right" :controls="false"
|
||||
precision="2"
|
||||
:min="0"
|
||||
:max="10000"></el-input-number>
|
||||
</el-form-item>
|
||||
<el-form-item label="慰问方式" prop="way">
|
||||
<el-radio-group v-model="formData.way">
|
||||
<el-radio-button label="慰问金 (A)" border>慰问金 (A)</el-radio-button>
|
||||
<el-radio-button label="提货券 (B)" border>提货券 (B)</el-radio-button>
|
||||
<el-radio-button label="慰问品 (C)" border>慰问品 (C)</el-radio-button>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="是否启用" prop="enable">
|
||||
<el-switch
|
||||
v-model="formData.enable"
|
||||
active-color="#13ce66"
|
||||
inactive-color="#ff4949">
|
||||
</el-switch>
|
||||
</el-form-item>
|
||||
<!--<el-form-item label="上传会议纪要" prop="uploadMeetingRecord">
|
||||
<el-radio-group v-model="formData.uploadMeetingRecord">
|
||||
<el-radio-button :label="true">上传</el-radio-button>
|
||||
<el-radio-button :label="false">不上传</el-radio-button>
|
||||
</el-radio-group>
|
||||
</el-form-item>-->
|
||||
<el-form-item label="是否上传附件" prop="isUploadFile">
|
||||
<el-radio-group v-model="formData.isUploadFile">
|
||||
<el-radio-button :label="true">是</el-radio-button>
|
||||
<el-radio-button :label="false">否</el-radio-button>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="上传附件说明" prop="uploadFileDesc" v-if="formData.isUploadFile">
|
||||
<el-input v-model="formData.uploadFileDesc" maxlength="50" clearable placeholder="请填写上传附件说明"></el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-row class="mt10" justify="end" type="flex">
|
||||
<el-button @click="$emit('refresh')">取消</el-button>
|
||||
<el-button @click="onSubmit" type="primary">提交</el-button>
|
||||
</el-row>
|
||||
</div>
|
||||
`,
|
||||
data() {
|
||||
return {
|
||||
formData: { isUploadFile: false },
|
||||
formRules: {
|
||||
name: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
money: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
way: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
code: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
isUploadFile: [{required: true, message: '必填', trigger: ['blur', 'change']}],
|
||||
},
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
onOpen(row) {
|
||||
if(row && row.id) {
|
||||
this.formData = clone(row)
|
||||
} else {
|
||||
this.formData = { isUploadFile: false }
|
||||
}
|
||||
},
|
||||
onSubmit() {
|
||||
this.$refs.formRef.validate((valid) => {
|
||||
if (valid) {
|
||||
this.$confirm("您确定要提交吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(async () => {
|
||||
const resp = await this.$axios.post("/platform/special_condolence/type/onSubmit", this.formData)
|
||||
if (resp.code === 0) {
|
||||
this.$message.success(resp.msg)
|
||||
this.$emit('refresh')
|
||||
} else {
|
||||
this.$message.warning(resp.msg)
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
},
|
||||
style: /*language=CSS*/ `
|
||||
.el-input-number .el-input__inner {
|
||||
text-align: left;
|
||||
}
|
||||
`
|
||||
}
|
||||
+148
@@ -0,0 +1,148 @@
|
||||
<!--#
|
||||
layout("/layouts/platform.html"){
|
||||
#-->
|
||||
|
||||
<style>
|
||||
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<guava ref="guava">
|
||||
<template>
|
||||
<el-card shadow="never">
|
||||
<search @search="doSearch">
|
||||
<search-item label="名称/编码">
|
||||
<el-input placeholder="请输入名称或编码" clearable v-model="pageForm.searchKeyword"
|
||||
@keyup.enter.native="doSearch">
|
||||
</el-input>
|
||||
</search-item>
|
||||
</search>
|
||||
</el-card>
|
||||
|
||||
<el-card shadow="never" class="mt20">
|
||||
<table-tool label="类型列表">
|
||||
<el-button type="primary" size="small" @click="onAdd">
|
||||
<i class="ti-plus"></i>
|
||||
新增类型
|
||||
</el-button>
|
||||
</table-tool>
|
||||
<el-table :data="tableData" @sort-change="pageOrder" :size="tableSize">
|
||||
<el-table-column label="序号" type="index" :index="indexMethod" width="60"></el-table-column>
|
||||
<el-table-column
|
||||
:label="column.label"
|
||||
:prop="column.prop"
|
||||
:key="column.prop"
|
||||
:width="column.width"
|
||||
:sortable="column.sortable"
|
||||
align="center"
|
||||
header-align="center"
|
||||
show-overflow-tooltip
|
||||
v-for="column in tableColumns"
|
||||
>
|
||||
<template v-slot="{ row }" v-if="column.prop === 'isUploadFile'">
|
||||
<span v-if="row.isUploadFile" class="text-success">是</span>
|
||||
<span v-else class="text-danger">否</span>
|
||||
</template>
|
||||
<template v-slot="{ row }" v-else-if="column.prop === 'enable'">
|
||||
<el-switch
|
||||
@change="switchChange(row)"
|
||||
v-model="row.enable"
|
||||
active-color="#13ce66"
|
||||
inactive-color="#ff4949">
|
||||
</el-switch>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="230">
|
||||
<template v-slot="{ row }">
|
||||
<el-button @click="onEdit(row)" size="mini" type="primary">编辑</el-button>
|
||||
<el-button @click="onDelete(row)" size="mini" type="danger">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!--#include("/layouts/pagination.html"){}#-->
|
||||
</el-card>
|
||||
</template>
|
||||
|
||||
<template #edit>
|
||||
<basic-form ref="basicFormRef" @refresh="refresh"></basic-form>
|
||||
</template>
|
||||
|
||||
</guava>
|
||||
|
||||
</div>
|
||||
<script nonce="${cspNonce!}">
|
||||
<!--#include('basicForm.js'){}#-->
|
||||
const vue = new Vue({
|
||||
el: "#app",
|
||||
mixins: [initTableMixins],
|
||||
components: {
|
||||
"basic-form": basicForm,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
tableColumns: [
|
||||
{prop: 'code', label: '类型编码'},
|
||||
{prop: 'name', label: '类型名称'},
|
||||
{prop: 'money', label: '金额'},
|
||||
{prop: 'way', label: '慰问方式'},
|
||||
// {prop: 'isUploadFile', label: '是否上传附件'},
|
||||
{prop: 'enable', label: '是否启用'},
|
||||
],
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
refresh() {
|
||||
this.doSearch()
|
||||
this.$refs.guava.index()
|
||||
},
|
||||
onAdd() {
|
||||
this.$refs.guava.edit(() => {
|
||||
this.$refs.basicFormRef.onOpen()
|
||||
})
|
||||
},
|
||||
onEdit(row) {
|
||||
this.$refs.guava.edit(() => {
|
||||
this.$refs.basicFormRef.onOpen(row)
|
||||
})
|
||||
},
|
||||
onDelete(row) {
|
||||
this.$confirm("您确定要删除吗, 是否继续?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
})
|
||||
.then(() => {
|
||||
this.$axios.post("/platform/special_condolence/type/onDelete", { id: row.id }).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$message.success(res.msg)
|
||||
this.pageData()
|
||||
}
|
||||
})
|
||||
})
|
||||
.catch(() => {})
|
||||
},
|
||||
switchChange(row) {
|
||||
this.$axios.post("/platform/special_condolence/type/onSubmit", row).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$message.success(res.msg)
|
||||
this.pageData()
|
||||
}
|
||||
})
|
||||
},
|
||||
pageData() {
|
||||
this.$axios.post(loc() + "/pageData", this.pageForm).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.tableData = res.data.list
|
||||
this.pageForm.totalCount = res.data.totalCount
|
||||
}
|
||||
})
|
||||
},
|
||||
},
|
||||
async created() {
|
||||
this.pageData()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
+513
@@ -0,0 +1,513 @@
|
||||
<!--#
|
||||
layout("/layouts/platform_h5.html"){
|
||||
#-->
|
||||
|
||||
<style scoped>
|
||||
#app {
|
||||
--color-primary: #1989fa;
|
||||
}
|
||||
|
||||
#app > .van-nav-bar .van-icon,
|
||||
#app > .van-nav-bar .van-nav-bar__text {
|
||||
color: #1989fa;
|
||||
}
|
||||
|
||||
#app > .van-nav-bar .van-nav-bar__title,
|
||||
#app > .van-nav-bar .van-nav-bar__text,
|
||||
#app > .van-nav-bar .van-nav-bar__arrow {
|
||||
font-size: 18px;
|
||||
}
|
||||
|
||||
.search-dialog {
|
||||
height: 80%;
|
||||
}
|
||||
|
||||
/* 慰问申请页复用提案撰写页的 Card 层级,仅覆盖当前表单分组和底部操作栏。 */
|
||||
.specialcondolence-apply-form.form-container {
|
||||
min-height: 100%;
|
||||
padding: 12px 15px calc(84px + env(safe-area-inset-bottom));
|
||||
box-sizing: border-box;
|
||||
background: #f3f7fc;
|
||||
}
|
||||
|
||||
.specialcondolence-apply-form .form-section {
|
||||
margin-bottom: 11px;
|
||||
overflow: hidden;
|
||||
border: 1px solid #e9eff7;
|
||||
border-radius: 10px;
|
||||
background: #fff;
|
||||
box-shadow: 0 3px 11px rgba(51, 87, 126, 0.08);
|
||||
}
|
||||
|
||||
.specialcondolence-apply-form .specialcondolence-card__title {
|
||||
position: relative;
|
||||
margin: 0;
|
||||
padding: 12px 14px 8px 21px;
|
||||
color: #354255;
|
||||
font-size: 15px;
|
||||
line-height: 20px;
|
||||
font-weight: 600;
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
.specialcondolence-apply-form .specialcondolence-card__title::before {
|
||||
position: absolute;
|
||||
top: 15px;
|
||||
bottom: 11px;
|
||||
left: 12px;
|
||||
width: 2px;
|
||||
border-radius: 2px;
|
||||
background: #1989fa;
|
||||
content: "";
|
||||
}
|
||||
|
||||
.specialcondolence-apply-form .form-section .van-cell-group {
|
||||
margin: 0;
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
.specialcondolence-card__desc {
|
||||
padding: 0 14px 8px 21px;
|
||||
color: orangered;
|
||||
font-size: 14px;
|
||||
line-height: 18px;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
.specialcondolence-apply-form .form-section .van-cell {
|
||||
min-height: 44px;
|
||||
padding: 10px 14px;
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
.specialcondolence-apply-form .form-section .van-cell:not(:last-child)::after {
|
||||
right: 14px;
|
||||
left: 14px;
|
||||
border-color: #eef2f7;
|
||||
}
|
||||
|
||||
.specialcondolence-apply-form .form-section .van-field__label {
|
||||
width: 84px;
|
||||
color: #596779;
|
||||
font-size: 14px;
|
||||
line-height: 24px;
|
||||
}
|
||||
|
||||
.specialcondolence-apply-form .form-section .van-field__value,
|
||||
.specialcondolence-apply-form .form-section .van-field__control {
|
||||
color: #4f5d70;
|
||||
font-size: 14px;
|
||||
line-height: 24px;
|
||||
}
|
||||
|
||||
.specialcondolence-apply-form .form-section .van-field__control::placeholder {
|
||||
color: #b1bac6;
|
||||
}
|
||||
|
||||
.specialcondolence-apply-form .form-section .van-cell--required::before {
|
||||
left: 6px;
|
||||
color: #f06464;
|
||||
}
|
||||
|
||||
.specialcondolence-apply-actions {
|
||||
position: fixed;
|
||||
z-index: 100;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
display: flex;
|
||||
gap: 9px;
|
||||
padding: 10px 18px calc(10px + env(safe-area-inset-bottom));
|
||||
border-top: 1px solid #edf1f6;
|
||||
background: rgba(255, 255, 255, 0.98);
|
||||
box-shadow: 0 -4px 14px rgba(50, 78, 112, 0.06);
|
||||
}
|
||||
|
||||
.specialcondolence-apply-actions .van-button {
|
||||
height: 40px;
|
||||
margin: 0;
|
||||
border-radius: 14px !important;
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
.specialcondolence-apply-actions .van-button:first-child {
|
||||
flex: 1;
|
||||
color: #1989fa;
|
||||
border-color: #1989fa;
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
.specialcondolence-apply-actions .van-button:last-child {
|
||||
flex: 1.08;
|
||||
border-color: #1989fa;
|
||||
background: #1989fa;
|
||||
}
|
||||
|
||||
#app .van-action-sheet__header,
|
||||
#app .van-picker__title,
|
||||
.van-dialog__header {
|
||||
font-size: 18px;
|
||||
}
|
||||
|
||||
#app .van-action-sheet__name,
|
||||
#app .van-action-sheet__cancel,
|
||||
#app .van-empty__description,
|
||||
#app .van-search__field,
|
||||
#app .van-picker__cancel,
|
||||
#app .van-picker__confirm,
|
||||
.van-dialog__message {
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
#app .van-picker-column__item {
|
||||
font-size: 18px;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div id="app">
|
||||
<!-- 导航栏 -->
|
||||
<van-nav-bar title="特殊慰问申请" left-text="返回" left-arrow @click-left="historyBack" fixed
|
||||
placeholder></van-nav-bar>
|
||||
|
||||
<!-- 表单容器 -->
|
||||
<van-form ref="formRef" class="form-container specialcondolence-apply-form">
|
||||
|
||||
<!-- 基本信息 -->
|
||||
<section class="form-section">
|
||||
<h2 class="specialcondolence-card__title">基本信息</h2>
|
||||
<van-cell-group :border="false">
|
||||
<van-field label="申请人姓名" :rules="[{ required: true }]" v-model="formData.applyUserName" readonly
|
||||
required name="applyUserName"></van-field>
|
||||
<van-field label="申请人工号" :rules="[{ required: true }]" v-model="formData.applyLoginName" readonly
|
||||
required name="applyLoginName"></van-field>
|
||||
<van-field label="申请人单位" :rules="[{ required: true }]" v-model="formData.applyUnitName" readonly
|
||||
required name="applyUnitName"></van-field>
|
||||
<van-field label="申请人工会" :rules="[{ required: true }]" v-model="formData.applyUnionName" readonly
|
||||
required name="applyUnionName"></van-field>
|
||||
|
||||
<van-field label="慰问类型" required><template #input><select v-model="formData.type" @change="typeChange(formData.type)"><option value="">请选择</option><option v-for="t in typeOptions" :key="t.id" :value="t.id">{{t.name}}</option></select></template></van-field>
|
||||
<van-field v-model="formData.perMoney" label="每人金额" type="number" required :rules="[{ validator: validateMoney, message: '金额须大于0且不超过10000元,最多两位小数' }]"></van-field>
|
||||
<van-field v-model="formData.occurTime" label="慰问时间" placeholder="yyyy-MM-dd" required :rules="[{required:true}]"></van-field>
|
||||
<div v-for="(person, index) in formData.recipients" :key="index">
|
||||
<van-cell :title="'慰问对象 ' + (index + 1)"><van-button native-type="button" size="mini" @click="formData.recipients.splice(index, 1)">删除</van-button></van-cell>
|
||||
<van-field v-model="person.helpUserName" label="慰问对象" required :rules="[{required:true}]"></van-field>
|
||||
<van-field v-model="person.helpLoginName" label="工号" placeholder="普通人员必填,劳务派遣可空"></van-field>
|
||||
<van-field v-model="person.idCard" label="身份证号码" maxlength="18" required :rules="[{required:true}]"></van-field>
|
||||
<van-field v-model="person.bankOfDeposit" label="开户行" maxlength="100" required :rules="[{required:true}]"></van-field>
|
||||
<van-field v-model="person.bankUserName" label="户名" maxlength="100" required :rules="[{required:true}]"></van-field>
|
||||
<van-field v-model="person.bankCardNumber" label="收款账户" maxlength="30" required :rules="[{required:true}]"></van-field>
|
||||
</div>
|
||||
<van-button native-type="button" @click="formData.recipients.push(newRecipient())">增加一行</van-button>
|
||||
<van-field
|
||||
v-model="formData.remark"
|
||||
name="remark"
|
||||
maxlength="500"
|
||||
label="申请事由"
|
||||
type="textarea"
|
||||
rows="4"
|
||||
autosize
|
||||
placeholder="请输入申请事由"
|
||||
:rules="[{ required: true }]"
|
||||
required
|
||||
></van-field>
|
||||
</van-cell-group>
|
||||
</section>
|
||||
|
||||
<section class="form-section" v-if="chooseType.isUploadFile === true">
|
||||
<h2 class="specialcondolence-card__title">附件材料</h2>
|
||||
<div v-if="chooseType.isUploadFile && chooseType.uploadFileDesc" class="specialcondolence-card__desc">
|
||||
{{ '附件说明:' + chooseType.uploadFileDesc }}
|
||||
</div>
|
||||
<van-cell-group :border="false">
|
||||
<van-field class="direction-column-field" name="files" label="附件" required
|
||||
:rules="[{ validator: () => Array.isArray(formData.files) && formData.files.length > 0 && formData.files.length <= 5, message: '请上传1至5个附件' }]">
|
||||
<template #input>
|
||||
<h5-file-upload
|
||||
slot="input"
|
||||
:value.sync="formData.files"
|
||||
:upload_number="5"
|
||||
upload_text="上传附件"
|
||||
upload_result_category="array"
|
||||
complete_result
|
||||
></h5-file-upload>
|
||||
<div class="specialcondolence-card__desc">最多上传 5 个文件</div>
|
||||
</template>
|
||||
</van-field>
|
||||
</van-cell-group>
|
||||
</section>
|
||||
|
||||
<section class="form-section">
|
||||
<h2 class="specialcondolence-card__title">签字确认</h2>
|
||||
<van-cell-group :border="false">
|
||||
<van-field class="direction-column-field" name="signature" label="" :value="formData.signature"
|
||||
:rules="[{ required: true, message: '请填写签字' }]">
|
||||
<template #input>
|
||||
<h5-signature v-model="formData.signature" slot="input"></h5-signature>
|
||||
</template>
|
||||
</van-field>
|
||||
</van-cell-group>
|
||||
</section>
|
||||
|
||||
<!-- 提交按钮 -->
|
||||
<div class="form-actions specialcondolence-apply-actions">
|
||||
<van-button native-type="button" @click="onSave" round type="info" plain>保存申请</van-button>
|
||||
<van-button @click="onSubmit" round type="info" v-if="!taskId">提交申请</van-button>
|
||||
<van-button @click="onFinishTask" round type="info" v-else>提交申请</van-button>
|
||||
</div>
|
||||
</van-form>
|
||||
</div>
|
||||
|
||||
<script nonce="${cspNonce!}">
|
||||
<!--#include("/platform/zhgh/staffbenefit/specialcondolence/apply/recipients.js"){}#-->
|
||||
const vue = new Vue({
|
||||
el: "#app",
|
||||
store,
|
||||
mixins: [specialCondolenceRecipients],
|
||||
components: {},
|
||||
data() {
|
||||
return {
|
||||
bizId: GetQueryString("bizId"),
|
||||
taskId: GetQueryString("taskId"),
|
||||
formData: { recipients: [] },
|
||||
|
||||
chooseType: {},
|
||||
userOptions: [],
|
||||
typeOptions: [],
|
||||
|
||||
helpUserSelectShow: false,
|
||||
payUserSelectShow: false,
|
||||
showTypePicker: false,
|
||||
typeColumns: [],
|
||||
searchKeyword: "",
|
||||
|
||||
showTimePicker: false,
|
||||
showChildPicker: false,
|
||||
showFamilyPicker: false,
|
||||
|
||||
certifierUserSelectShow: false,
|
||||
handlerUserSelectShow: false,
|
||||
|
||||
showHospitalizationTimePicker: false,
|
||||
showLeaveHospitalTimePicker: false,
|
||||
minDate: new Date(2024, 0, 1),
|
||||
maxDate: new Date(),
|
||||
|
||||
typeDefaultIndex: 0
|
||||
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
validateMoney(value) {
|
||||
return /^(0|[1-9][0-9]*)(\.[0-9]{1,2})?$/.test(String(value)) && Number(value) > 0 && Number(value) <= 10000
|
||||
},
|
||||
// 选择出院时间
|
||||
showLeaveHospitalTimePickerClick() {
|
||||
if (this.formData.leaveHospitalTime) {
|
||||
this.formData.leaveHospitalDate = new Date(this.formData.leaveHospitalTime)
|
||||
}
|
||||
this.showLeaveHospitalTimePicker = true
|
||||
},
|
||||
// 选择住院时间
|
||||
showHospitalizationTimePickerClick() {
|
||||
if (this.formData.hospitalizationTime) {
|
||||
this.formData.hospitalizationDate = new Date(this.formData.hospitalizationTime)
|
||||
}
|
||||
this.showHospitalizationTimePicker = true
|
||||
},
|
||||
// 选择慰问时间
|
||||
showTimePickerClick() {
|
||||
if (this.formData.occurTime) {
|
||||
this.formData.occurDate = new Date(this.formData.occurTime)
|
||||
}else{
|
||||
this.formData.occurDate = new Date()
|
||||
}
|
||||
this.showTimePicker = true
|
||||
},
|
||||
// 选择慰问类型
|
||||
showTypePickerClick() {
|
||||
if (this.formData.type) {
|
||||
this.typeDefaultIndex = this.typeOptions.findIndex(item => item.id === this.formData.type)
|
||||
}
|
||||
this.showTypePicker = true
|
||||
},
|
||||
//经办人
|
||||
handlerUserChange(user) {
|
||||
const { id, userName, loginName, unitId, unitName, unionId, unionName } = user
|
||||
this.$set(this.formData, "handlerUserId", id)
|
||||
this.$set(this.formData, "handlerUserName", userName)
|
||||
this.$set(this.formData, "handlerLoginName", loginName)
|
||||
this.$set(this.formData, "handlerUnitId", unitId)
|
||||
this.$set(this.formData, "handlerUnitName", unitName)
|
||||
this.$set(this.formData, "handlerUnionId", unionId)
|
||||
this.$set(this.formData, "handlerUnionName", unionName)
|
||||
this.handlerUserSelectShow = false
|
||||
this.searchKeyword = ""
|
||||
this.userOptions = []
|
||||
},
|
||||
//证明人
|
||||
certifierUserChange(user) {
|
||||
const { id, userName, loginName, unitId, unitName, unionId, unionName } = user
|
||||
this.$set(this.formData, "certifierUserId", id)
|
||||
this.$set(this.formData, "certifierUserName", userName)
|
||||
this.$set(this.formData, "certifierLoginName", loginName)
|
||||
this.$set(this.formData, "certifierUnitId", unitId)
|
||||
this.$set(this.formData, "certifierUnitName", unitName)
|
||||
this.$set(this.formData, "certifierUnionId", unionId)
|
||||
this.$set(this.formData, "certifierUnionName", unionName)
|
||||
this.certifierUserSelectShow = false
|
||||
this.searchKeyword = ""
|
||||
this.userOptions = []
|
||||
},
|
||||
async userRemoteMethod(event, type) {
|
||||
if (event) {
|
||||
this.userOptions = await this.selectQueryUser(event)
|
||||
if (type === "help") {
|
||||
this.helpUserSelectShow = true
|
||||
} else if (type === "certifier") {
|
||||
this.certifierUserSelectShow = true
|
||||
} else if (type === "handler") {
|
||||
this.handlerUserSelectShow = true
|
||||
}
|
||||
}
|
||||
},
|
||||
async selectQueryUser(keyword) {
|
||||
const res = await this.$axios.post("/platform/special_condolence/apply/listUser", { keyword: keyword })
|
||||
return res.data
|
||||
},
|
||||
helpUserChange(user) {
|
||||
const { id, userName, loginName, unitId, unitName, unionId, unionName } = user
|
||||
this.$set(this.formData, "helpUserId", id)
|
||||
this.$set(this.formData, "helpUserName", userName)
|
||||
this.$set(this.formData, "helpLoginName", loginName)
|
||||
this.$set(this.formData, "helpUnitId", unitId)
|
||||
this.$set(this.formData, "helpUnitName", unitName)
|
||||
this.$set(this.formData, "helpUnionId", unionId)
|
||||
this.$set(this.formData, "helpUnionName", unionName)
|
||||
this.helpUserSelectShow = false
|
||||
this.searchKeyword = ""
|
||||
this.userOptions = []
|
||||
},
|
||||
payUserChange(user) {
|
||||
const { id, userName, loginName } = user
|
||||
this.$set(this.formData, "payUserId", id)
|
||||
this.$set(this.formData, "payUserName", userName)
|
||||
this.$set(this.formData, "payLoginName", loginName)
|
||||
this.payUserSelectShow = false
|
||||
this.searchKeyword = ""
|
||||
this.userOptions = []
|
||||
},
|
||||
typeChange(id) {
|
||||
this.chooseType = this.typeOptions.find(o => o.id === id)
|
||||
if (this.chooseType) {
|
||||
this.$set(this.formData, "perMoney", this.chooseType.money)
|
||||
this.$set(this.formData, "way", this.chooseType.way)
|
||||
this.$set(this.formData, "typeCode", this.chooseType.code)
|
||||
}
|
||||
},
|
||||
onTypeConfirm(o) {
|
||||
this.$set(this.formData, "typeName", o.text)
|
||||
this.$set(this.formData, "type", o.value)
|
||||
this.typeChange(o.value)
|
||||
this.showTypePicker = false
|
||||
},
|
||||
onSave() {
|
||||
this.$dialog.confirm({
|
||||
title: "提示",
|
||||
message: "您确定保存吗?"
|
||||
}).then(() => {
|
||||
this.$axios.post("/platform/special_condolence/apply/save", { data: JSON.stringify(this.formData) }).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.$toast(res.msg)
|
||||
this.$pjaxReplace("/platform/special_condolence/mine/h5")
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
async onSubmit() {
|
||||
this.$refs.formRef.validate().then(() => {
|
||||
if (!this.formData.signature){
|
||||
this.$toast.fail("请填写签字")
|
||||
return
|
||||
}
|
||||
this.$dialog.confirm({
|
||||
title: "提示",
|
||||
message: "您确定要提交申请吗?"
|
||||
}).then(() => {
|
||||
this.$axios.post("/platform/special_condolence/apply/submit", { data: JSON.stringify(this.formData) }).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.$toast(res.msg)
|
||||
this.$pjaxReplace("/platform/special_condolence/mine/h5")
|
||||
}
|
||||
})
|
||||
})
|
||||
})
|
||||
},
|
||||
async onFinishTask() {
|
||||
this.$refs.formRef.validate().then(() => {
|
||||
if (!this.formData.signature){
|
||||
this.$toast.fail("请填写签字")
|
||||
return
|
||||
}
|
||||
this.$dialog.confirm({
|
||||
title: "提示",
|
||||
message: "您确定要提交申请吗?"
|
||||
}).then(() => {
|
||||
this.$axios.post("/platform/special_condolence/apply/submitAgain", {
|
||||
data: JSON.stringify(this.formData),
|
||||
taskId: GetQueryString("taskId")
|
||||
}).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.$toast(res.msg)
|
||||
this.$pjaxReplace("/platform/special_condolence/mine/h5")
|
||||
}
|
||||
})
|
||||
})
|
||||
})
|
||||
},
|
||||
init() {
|
||||
if (this.bizId) {
|
||||
this.$axios.post("/platform/special_condolence/mine/info", { id: this.bizId }).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.formData = res.data
|
||||
this.initRecipients()
|
||||
this.selectQueryUser(this.formData.helpLoginName, this.helpUserOptions)
|
||||
this.selectQueryUser(this.formData.payLoginName, this.payUserOptions)
|
||||
this.chooseType = this.typeOptions.find(o => o.id === this.formData.type)
|
||||
}
|
||||
})
|
||||
} else {
|
||||
const { username, loginname, id, unit, union, mobile } = this.$store.state.user
|
||||
this.formData = {
|
||||
recipients: [this.newRecipient()],
|
||||
perMoney: undefined,
|
||||
occurTime: this.$moment().format('YYYY-MM-DD'),
|
||||
applyUserName: username,
|
||||
applyLoginName: loginname,
|
||||
applyUserId: id,
|
||||
applyUnitId: unit?.id,
|
||||
applyUnitName: unit?.name,
|
||||
applyUnionId: union?.id,
|
||||
applyUnionName: union?.name
|
||||
}
|
||||
}
|
||||
},
|
||||
querySpecialCondolenceType() {
|
||||
this.$axios.post("/platform/special_condolence/type/querySpecialCondolenceType")
|
||||
.then((res) => {
|
||||
this.typeOptions = JSON.parse(JSON.stringify(res.data))
|
||||
res.data.forEach((v) => {
|
||||
this.typeColumns.push({ value: v.id, text: v.name })
|
||||
})
|
||||
})
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.querySpecialCondolenceType()
|
||||
this.init()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
+201
@@ -0,0 +1,201 @@
|
||||
.specialcondolence-full-popup {
|
||||
--color-primary: #1989fa;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
overflow: hidden;
|
||||
background: #f3f7fc;
|
||||
}
|
||||
|
||||
.specialcondolence-full-popup__page {
|
||||
display: flex;
|
||||
height: 100%;
|
||||
padding-top: 46px;
|
||||
overflow: hidden;
|
||||
box-sizing: border-box;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.specialcondolence-full-popup__page > .van-nav-bar {
|
||||
z-index: 20;
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
.specialcondolence-full-popup__page > .van-nav-bar .van-icon,
|
||||
.specialcondolence-full-popup__page > .van-nav-bar .van-nav-bar__text {
|
||||
color: #1989fa;
|
||||
}
|
||||
|
||||
.specialcondolence-full-popup__scroll {
|
||||
min-height: 0;
|
||||
overflow-y: auto;
|
||||
flex: 1;
|
||||
-webkit-overflow-scrolling: touch;
|
||||
}
|
||||
|
||||
.specialcondolence-info-main {
|
||||
padding: 12px 15px calc(18px + env(safe-area-inset-bottom));
|
||||
}
|
||||
|
||||
.specialcondolence-info-card {
|
||||
margin-bottom: 11px;
|
||||
overflow: hidden;
|
||||
border: 1px solid #e9eff7;
|
||||
border-radius: 10px;
|
||||
background: #fff;
|
||||
box-shadow: 0 3px 11px rgba(51, 87, 126, .08);
|
||||
}
|
||||
|
||||
.specialcondolence-info-card__title {
|
||||
position: relative;
|
||||
margin: 0;
|
||||
padding: 12px 14px 8px 21px;
|
||||
color: #354255;
|
||||
font-size: 15px;
|
||||
font-weight: 600;
|
||||
line-height: 22px;
|
||||
}
|
||||
|
||||
.specialcondolence-info-card__title::before {
|
||||
position: absolute;
|
||||
top: 15px;
|
||||
bottom: 11px;
|
||||
left: 12px;
|
||||
width: 2px;
|
||||
border-radius: 2px;
|
||||
background: #1989fa;
|
||||
content: "";
|
||||
}
|
||||
|
||||
/* 审核意见复用详情 Card 标题,并与提案 delegation 审核输入区保持一致。 */
|
||||
.specialcondolence-audit-card__required {
|
||||
margin-left: 4px;
|
||||
color: #ee0a24;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.specialcondolence-info-card .van-field.specialcondolence-audit-field {
|
||||
width: calc(100% - 28px);
|
||||
margin: 0 14px 14px;
|
||||
padding: 12px;
|
||||
box-sizing: border-box;
|
||||
border: 1px solid #c9d5e5;
|
||||
border-radius: 10px;
|
||||
background: #f7f9fd;
|
||||
}
|
||||
|
||||
.specialcondolence-info-card .van-field.specialcondolence-audit-field .van-field__control {
|
||||
min-height: 150px;
|
||||
color: #253247;
|
||||
line-height: 22px;
|
||||
}
|
||||
|
||||
.specialcondolence-info-card .van-field.specialcondolence-audit-field .van-field__control::placeholder {
|
||||
color: #9aa7b8;
|
||||
}
|
||||
|
||||
.specialcondolence-info-card .van-field.specialcondolence-audit-field .van-field__word-limit {
|
||||
color: #718096;
|
||||
}
|
||||
|
||||
.specialcondolence-info-card .van-field.specialcondolence-audit-field::after {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.specialcondolence-popup-actions {
|
||||
display: flex;
|
||||
padding: 10px 12px calc(12px + env(safe-area-inset-bottom));
|
||||
justify-content: space-between;
|
||||
column-gap: 10px;
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
.specialcondolence-popup-actions .van-button {
|
||||
border-radius: 14px;
|
||||
}
|
||||
|
||||
.specialcondolence-popup-actions .specialcondolence-action-primary {
|
||||
border-color: #1989fa;
|
||||
background: #1989fa;
|
||||
}
|
||||
|
||||
.specialcondolence-popup-actions .specialcondolence-action-danger {
|
||||
border-color: #ff4d4f;
|
||||
background: #ff4d4f;
|
||||
}
|
||||
|
||||
.specialcondolence-info-card .van-cell-group {
|
||||
margin: 0;
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
.specialcondolence-info-card .van-cell {
|
||||
min-height: 44px;
|
||||
padding: 10px 14px;
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
.specialcondolence-info-card .van-cell:not(:last-child)::after {
|
||||
right: 14px;
|
||||
left: 14px;
|
||||
border-color: #eef2f7;
|
||||
}
|
||||
|
||||
.specialcondolence-info-card .van-cell__title {
|
||||
width: 102px;
|
||||
color: #596779;
|
||||
font-size: 12px;
|
||||
line-height: 24px;
|
||||
flex: 0 0 102px;
|
||||
}
|
||||
|
||||
.specialcondolence-info-card .van-cell__value {
|
||||
min-width: 0;
|
||||
color: #4f5d70;
|
||||
font-size: 12px;
|
||||
line-height: 24px;
|
||||
text-align: left;
|
||||
overflow-wrap: anywhere;
|
||||
}
|
||||
|
||||
.specialcondolence-info-long-cell {
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
}
|
||||
|
||||
.specialcondolence-info-card .specialcondolence-attachments .empty-container {
|
||||
height: auto;
|
||||
justify-content: flex-start;
|
||||
color: inherit;
|
||||
}
|
||||
|
||||
.specialcondolence-info-card .specialcondolence-attachments .empty-text {
|
||||
font-size: inherit;
|
||||
line-height: inherit;
|
||||
}
|
||||
|
||||
.specialcondolence-info-opinion > :first-child {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
.specialcondolence-info-opinion > :last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.specialcondolence-signature-image,
|
||||
.specialcondolence-approval-signature-image {
|
||||
display: block;
|
||||
width: 100%;
|
||||
max-width: 100%;
|
||||
height: 80px;
|
||||
}
|
||||
|
||||
.specialcondolence-signature-image .van-image__img,
|
||||
.specialcondolence-approval-signature-image {
|
||||
object-fit: contain;
|
||||
object-position: left center;
|
||||
}
|
||||
|
||||
.specialcondolence-info-opinion img {
|
||||
max-width: 100%;
|
||||
height: auto;
|
||||
}
|
||||
+193
@@ -0,0 +1,193 @@
|
||||
const specialcondolenceInfo = {
|
||||
template: /*language=HTML*/ `
|
||||
<van-popup
|
||||
v-model="visible"
|
||||
position="right"
|
||||
class="specialcondolence-full-popup"
|
||||
:close-on-click-overlay="false"
|
||||
get-container="#app"
|
||||
>
|
||||
<div class="specialcondolence-full-popup__page">
|
||||
<van-nav-bar
|
||||
:title="popupTitle"
|
||||
left-arrow
|
||||
left-text="返回"
|
||||
fixed
|
||||
@click-left="onClose()"
|
||||
></van-nav-bar>
|
||||
<div class="specialcondolence-full-popup__scroll">
|
||||
<main class="specialcondolence-info-main">
|
||||
<section class="specialcondolence-info-card">
|
||||
<h2 class="specialcondolence-info-card__title">基本信息</h2>
|
||||
<van-cell-group :border="false">
|
||||
<van-cell title="申请人姓名">{{ viewData.applyUserName || '--' }}</van-cell>
|
||||
<van-cell title="申请人工号">{{ viewData.applyLoginName || '--' }}</van-cell>
|
||||
<van-cell title="申请人单位">{{ viewData.applyUnitName || '--' }}</van-cell>
|
||||
<van-cell title="申请人工会">{{ viewData.applyUnionName || '--' }}</van-cell>
|
||||
<template v-if="viewData.recipients && viewData.recipients.length">
|
||||
<van-cell title="慰问类型" :value="viewData.typeName"></van-cell>
|
||||
<van-cell title="每人慰问金额" :value="viewData.perMoney"></van-cell>
|
||||
<van-cell title="慰问时间" :value="viewData.occurTime"></van-cell>
|
||||
</template>
|
||||
<template v-for="(person, index) in viewData.recipients">
|
||||
<van-cell :title="'慰问对象 ' + (index + 1)" :value="person.helpUserName"></van-cell>
|
||||
<van-cell title="工号" :value="person.helpLoginName || '--'"></van-cell>
|
||||
<van-cell title="身份证号码" :value="person.idCard"></van-cell>
|
||||
<van-cell title="开户行" :value="person.bankOfDeposit"></van-cell>
|
||||
<van-cell title="户名" :value="person.bankUserName"></van-cell>
|
||||
<van-cell title="收款账户" :value="person.bankCardNumber"></van-cell>
|
||||
</template>
|
||||
<template v-if="!viewData.recipients || !viewData.recipients.length">
|
||||
<van-cell title="慰问对象">{{ viewData.helpUserName || '--' }}</van-cell>
|
||||
<!-- <van-cell title="证明人">{{ viewData.certifierUserName || '--' }}</van-cell> -->
|
||||
<van-cell title="慰问类型">{{ viewData.typeName || '--' }}</van-cell>
|
||||
<van-cell title="慰问金额">{{ viewData.money || '--' }}</van-cell>
|
||||
<van-cell title="慰问时间">{{ viewData.occurTime || '--' }}</van-cell>
|
||||
<van-cell title="收款账户">{{ viewData.bankCardNumber || '--' }}</van-cell>
|
||||
<van-cell title="户名">{{ viewData.bankUserName || '--' }}</van-cell>
|
||||
<van-cell title="开户行">
|
||||
{{ viewData.bankOfDeposit || '暂无' }}
|
||||
</van-cell>
|
||||
<template v-if="['2'].includes(viewData.typeCode)">
|
||||
<van-cell title="入院时间">{{ viewData.hospitalizationTime || '--' }}</van-cell>
|
||||
<van-cell title="出院时间">{{ viewData.leaveHospitalTime || '--' }}</van-cell>
|
||||
<van-cell title="当年第几次住院(次)">{{ viewData.thisYearHospitalizationNum || '--' }}</van-cell>
|
||||
</template>
|
||||
<van-cell title="申请事由">
|
||||
{{ viewData.remark || '暂无' }}
|
||||
</van-cell>
|
||||
</template>
|
||||
<van-cell class="specialcondolence-info-long-cell" title="附件">
|
||||
<file-preview class="specialcondolence-attachments" :files="viewData.files" complete_result></file-preview>
|
||||
</van-cell>
|
||||
<van-cell class="specialcondolence-info-long-cell" title="签字">
|
||||
<van-image
|
||||
v-if="viewData.signature"
|
||||
:src="viewData.signature"
|
||||
class="specialcondolence-signature-image"
|
||||
fit="contain"
|
||||
></van-image>
|
||||
<span v-else>暂无签字</span>
|
||||
</van-cell>
|
||||
</van-cell-group>
|
||||
</section>
|
||||
|
||||
<section
|
||||
v-for="(task, index) in doneTasks"
|
||||
:key="task.id || index"
|
||||
class="specialcondolence-info-card"
|
||||
>
|
||||
<h2 class="specialcondolence-info-card__title">{{ task.displayName || '办理记录' }}</h2>
|
||||
<van-cell-group :border="false" v-if="task.ext && 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 :border="false" v-else>
|
||||
<van-cell title="办理用户">
|
||||
{{ task.taskFormData && task.taskFormData.userName || '--' }}({{ task.taskFormData && 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 && task.ext.submitType"
|
||||
></dict-tag>
|
||||
</van-cell>
|
||||
<van-cell v-if="task.taskFormData && task.taskFormData.sign" title="审批签字">
|
||||
<img :src="task.taskFormData.sign" class="specialcondolence-approval-signature-image">
|
||||
</van-cell>
|
||||
<van-cell title="办理意见">
|
||||
<div class="specialcondolence-info-opinion" v-html="task.taskFormData && task.taskFormData.tf_opinion || '暂无'"></div>
|
||||
</van-cell>
|
||||
</van-cell-group>
|
||||
</section>
|
||||
|
||||
<slot></slot>
|
||||
</main>
|
||||
</div>
|
||||
</div>
|
||||
</van-popup>
|
||||
`,
|
||||
dicts: ["PROCESS_TASK_SUBMIT_TYPE"],
|
||||
props: {
|
||||
pageKey: {
|
||||
type: String,
|
||||
required: true
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
visible: false,
|
||||
popupTitle: "慰问详情",
|
||||
viewData: {},
|
||||
doneTasks: [],
|
||||
row: null,
|
||||
historyLayerUnsubscribe: null
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 浏览器历史变化时,只同步当前慰问详情弹框的显示状态。
|
||||
syncHistoryLayerStack(stack) {
|
||||
this.$set(this, "visible", stack.includes("specialcondolence-detail"))
|
||||
},
|
||||
|
||||
/**
|
||||
* 打开慰问详情或审核弹框。
|
||||
* row 传列表当前行,title 传顶部导航标题;无返回值。
|
||||
*/
|
||||
onOpen(row, title = "慰问详情") {
|
||||
this.$set(this, "row", row)
|
||||
this.$set(this, "popupTitle", title)
|
||||
this.$set(this, "viewData", {})
|
||||
this.$set(this, "doneTasks", [])
|
||||
this.getInfo()
|
||||
this.getDoneTasks()
|
||||
if (window.h5HistoryLayerManager && window.h5HistoryLayerManager.open("specialcondolence-detail")) return
|
||||
this.$set(this, "visible", true)
|
||||
},
|
||||
|
||||
// 顶部返回按钮与业务主动关闭统一回退弹框对应的浏览器历史。
|
||||
onClose(afterClose = null) {
|
||||
if (window.h5HistoryLayerManager && window.h5HistoryLayerManager.close("specialcondolence-detail", afterClose)) return
|
||||
this.$set(this, "visible", false)
|
||||
if (typeof afterClose === "function") afterClose()
|
||||
},
|
||||
|
||||
getInfo() {
|
||||
this.$axios.post("/platform/special_condolence/mine/info", {id: this.row.id}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$set(this, "viewData", res.data || {})
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
getDoneTasks() {
|
||||
this.$axios.post("/flow/common/doneTasks", {bizId: this.row.id}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$set(this, "doneTasks", res.data || [])
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
created() {
|
||||
if (!window.h5HistoryLayerManager) return
|
||||
window.h5HistoryLayerManager.ensureRegistered(this.pageKey)
|
||||
this.$set(this, "historyLayerUnsubscribe", window.h5HistoryLayerManager.subscribe((stack) => {
|
||||
this.syncHistoryLayerStack(stack)
|
||||
}))
|
||||
},
|
||||
beforeDestroy() {
|
||||
if (typeof this.historyLayerUnsubscribe === "function") this.historyLayerUnsubscribe()
|
||||
if (window.h5HistoryLayerManager && window.h5HistoryLayerManager.pageKey === this.pageKey) {
|
||||
window.h5HistoryLayerManager.unregister(this.pageKey)
|
||||
}
|
||||
}
|
||||
}
|
||||
+367
@@ -0,0 +1,367 @@
|
||||
<!--#
|
||||
layout("/layouts/platform_h5.html"){
|
||||
#-->
|
||||
|
||||
<style>
|
||||
#app { --color-primary: #1989fa; }
|
||||
.specialcondolence-list-page { min-height: 100vh; padding-bottom: calc(24px + env(safe-area-inset-bottom)); box-sizing: border-box; background: #f3f7fd; }
|
||||
.specialcondolence-list-page .van-nav-bar, .specialcondolence-list-page .van-sticky--fixed { background: #fff; }
|
||||
.specialcondolence-list-page .van-nav-bar__title { color: #172033; font-size: 16px; font-weight: 600; }
|
||||
.specialcondolence-list-page .van-nav-bar .van-icon, .specialcondolence-list-page .van-nav-bar__text { color: #1989fa; }
|
||||
.specialcondolence-list-sticky { padding: 22px 12px 1px; box-sizing: border-box; background: #f3f7fd; }
|
||||
.specialcondolence-list-search { margin: 0 0 8px; padding: 0; overflow: hidden; border-radius: 12px; background: #fff; box-shadow: 0 5px 16px rgba(43, 73, 112, .1); }
|
||||
.specialcondolence-list-search .van-search__content { height: 42px; padding-left: 12px; align-items: center; border-radius: 12px; background: #fff; }
|
||||
.specialcondolence-list-search .van-field__control { color: #263548; font-size: 14px; }
|
||||
.specialcondolence-list-search .van-field__control::placeholder { color: #a7b0bf; }
|
||||
.specialcondolence-list-filter { margin-bottom: 8px; overflow: hidden; border-radius: 10px; box-shadow: 0 5px 16px rgba(43, 73, 112, .08); }
|
||||
.specialcondolence-list-filter .van-dropdown-menu__bar { height: 44px; box-shadow: none; }
|
||||
.specialcondolence-list-filter .van-dropdown-menu__item, .specialcondolence-list-filter .van-dropdown-menu__title { height: 44px; }
|
||||
.specialcondolence-list-filter .van-dropdown-menu__item { align-items: center; justify-content: center; }
|
||||
.specialcondolence-list-filter .van-dropdown-menu__title { display: inline-flex; align-items: center; line-height: 20px; color: #66758a; font-size: 14px; }
|
||||
.specialcondolence-list-filter .van-dropdown-menu__title--active, .specialcondolence-list-filter .van-dropdown-item__option--active, .specialcondolence-list-filter .van-dropdown-item__option--active .van-dropdown-item__icon { color: #1989fa; }
|
||||
.specialcondolence-list-filter .van-dropdown-item__content { width: calc(100% - 24px); margin: 0 12px; overflow: hidden; box-sizing: border-box; border-radius: 0 0 12px 12px; box-shadow: 0 10px 24px rgba(31, 65, 108, .14); }
|
||||
.specialcondolence-list-filter .van-dropdown-item__option { display: flex; min-height: 48px; padding: 0 16px; align-items: center; color: #46566c; font-size: 14px; }
|
||||
.specialcondolence-list-filter .van-dropdown-item__option .van-cell__title { display: flex; min-height: 20px; align-items: center; line-height: 20px; }
|
||||
.specialcondolence-list-content { padding: 0 12px; }
|
||||
.specialcondolence-list-skeleton { padding-top: 2px; }
|
||||
.specialcondolence-list-skeleton__card { margin-bottom: 12px; padding: 18px 14px 14px; border: 1px solid #e9eff7; border-radius: 12px; background: #fff; box-shadow: 0 5px 16px rgba(43, 73, 112, .08); }
|
||||
.specialcondolence-list-skeleton__card .van-skeleton { padding: 0; }
|
||||
.specialcondolence-list-skeleton__card .van-skeleton__title { width: 42%; height: 18px; margin-bottom: 18px; }
|
||||
.specialcondolence-list-skeleton__card .van-skeleton__row { height: 14px; margin-top: 12px; }
|
||||
.specialcondolence-list-skeleton__card .van-skeleton__row:nth-child(2n) { width: 72% !important; }
|
||||
.specialcondolence-list-skeleton__card .van-skeleton__row:last-child { width: 34% !important; margin-top: 18px; margin-left: auto; }
|
||||
.specialcondolence-list-page .table-list-container { margin-top: 0; padding-bottom: 2px; }
|
||||
.specialcondolence-list-page .table-list-container .table-list-item { margin-bottom: 12px; padding: 14px; border: 1px solid #e9eff7; border-radius: 12px; box-shadow: 0 5px 16px rgba(43, 73, 112, .08); }
|
||||
.specialcondolence-card-header { display: flex; margin-bottom: 8px; align-items: flex-start; justify-content: space-between; }
|
||||
.specialcondolence-card-heading { min-width: 0; padding-right: 10px; flex: 1; }
|
||||
.specialcondolence-card-title { overflow: hidden; color: #253247; font-size: 15px; font-weight: 600; line-height: 22px; text-overflow: ellipsis; white-space: nowrap; }
|
||||
.specialcondolence-card-code { margin-top: 1px; color: #9ba6b6; font-size: 12px; line-height: 18px; }
|
||||
.specialcondolence-card-status { display: inline-flex; flex: none; }
|
||||
.specialcondolence-card-status .van-tag { min-height: 24px; padding: 3px 9px; border: 0; border-radius: 12px; box-sizing: border-box; font-size: 12px; line-height: 18px; }
|
||||
.specialcondolence-list-page .table-list-container .table-list-item .item-actions { margin-top: 10px; padding-top: 10px; border-top-color: #edf1f6; }
|
||||
.specialcondolence-list-page .table-list-container .table-list-item .action-btn { min-height: 28px; padding: 4px 11px; border-radius: 14px; color: #1989fa; background: #eaf4ff; font-size: 12px; line-height: 18px; }
|
||||
.specialcondolence-list-page .table-list-container .table-list-item .action-btn.delete { color: #f04444; background: #fff0f0; }
|
||||
.specialcondolence-list-page .table-list-container .table-list-item .action-btn i { margin-right: 5px; font-size: 13px; }
|
||||
.specialcondolence-list-page .empty-state { padding: 0; }
|
||||
.specialcondolence-list-empty { display: flex; min-height: 280px; padding: 46px 18px 36px; align-items: center; justify-content: center; box-sizing: border-box; flex-direction: column; text-align: center; }
|
||||
.specialcondolence-list-empty img { display: block; width: 86%; max-width: 290px; height: auto; object-fit: contain; }
|
||||
.specialcondolence-list-empty__title { margin-top: 14px; color: #50627a; font-size: 15px; font-weight: 600; line-height: 22px; }
|
||||
.specialcondolence-list-empty__hint { margin-top: 5px; color: #9aa7b8; font-size: 12px; line-height: 18px; }
|
||||
</style>
|
||||
|
||||
<style id="style-specialcondolence-info-h5">
|
||||
<!--#include("../common/info.css"){}#-->
|
||||
</style>
|
||||
|
||||
<div id="app">
|
||||
<div class="specialcondolence-list-page">
|
||||
<van-nav-bar title="分管校领导审批" left-text="返回" left-arrow @click-left="historyBack" fixed placeholder></van-nav-bar>
|
||||
|
||||
<van-sticky offset-top="46px">
|
||||
<div class="specialcondolence-list-sticky">
|
||||
<van-search
|
||||
v-model="pageForm.searchKeyword"
|
||||
class="specialcondolence-list-search"
|
||||
placeholder="请输入姓名或者工号搜索"
|
||||
shape="round"
|
||||
clearable
|
||||
@search="doSearch"
|
||||
@clear="doSearch"
|
||||
></van-search>
|
||||
<van-dropdown-menu class="specialcondolence-list-filter" :close-on-click-outside="false" :close-on-click-overlay="false">
|
||||
<year-van-dropdown-item :num="5" @change="doSearch" v-model="pageForm.year"></year-van-dropdown-item>
|
||||
<van-dropdown-item v-model="pageForm.type" :options="typeOptions" :multiple="false"
|
||||
@change="doSearch"></van-dropdown-item>
|
||||
<van-dropdown-item v-model="pageForm.approvalText" :options="approvalOptions" :multiple="false"
|
||||
@change="onApprovalFilterChange"></van-dropdown-item>
|
||||
</van-dropdown-menu>
|
||||
</div>
|
||||
</van-sticky>
|
||||
|
||||
<main class="specialcondolence-list-content">
|
||||
<div class="specialcondolence-list-skeleton" v-if="skeletonLoading">
|
||||
<div class="specialcondolence-list-skeleton__card" v-for="index in 3" :key="'fourth-approval-skeleton-' + index">
|
||||
<van-skeleton title :row="5" animated></van-skeleton>
|
||||
</div>
|
||||
</div>
|
||||
<table-list api="/platform/special_condolence/fourthApproval/pageData" :page_form.sync="pageForm" ref="tableListRef"
|
||||
v-show="!skeletonLoading" :show_loading_overlay="false" @ready="onReady"
|
||||
@loading-change="handleListLoadingChange">
|
||||
<template #header="{index,row}">
|
||||
<div class="specialcondolence-card-header">
|
||||
<div class="specialcondolence-card-heading">
|
||||
<div class="specialcondolence-card-title">{{row.helpUserName || '--'}}</div>
|
||||
<div class="specialcondolence-card-code">工号:{{row.helpLoginName || '--'}}</div>
|
||||
</div>
|
||||
<enum-tag class="specialcondolence-card-status" v-if="row.instanceState" :value="row.instanceState"
|
||||
name="ProcessInstanceStateEnum" label_key="message" size="small"></enum-tag>
|
||||
</div>
|
||||
</template>
|
||||
<template v-slot="{index,row}">
|
||||
<table-column label="慰问对象">{{row.helpUserName}}</table-column>
|
||||
<table-column label="慰问对象工号">{{row.helpLoginName}}</table-column>
|
||||
<table-column label="申请人">{{row.applyUserName}}</table-column>
|
||||
<table-column label="所属工会">{{row.applyUnionName}}</table-column>
|
||||
<table-column label="所属单位">{{row.applyUnitName}}</table-column>
|
||||
<table-column label="慰问类型">{{row.typeName}}</table-column>
|
||||
<table-column label="当前节点">{{row.curTaskName}}</table-column>
|
||||
</template>
|
||||
<template #actions="{index,row}">
|
||||
<div class="action-btn" @click="onView(row)">
|
||||
<van-icon name="eye-o"></van-icon>
|
||||
<span>查看</span>
|
||||
</div>
|
||||
<div class="action-btn" v-if="row.taskState === 10" @click="onApproval(row)">
|
||||
<van-icon name="edit"></van-icon>
|
||||
<span>审核</span>
|
||||
</div>
|
||||
<div class="action-btn delete" v-if="row.canRevoke" @click="onRevoke(row)">
|
||||
<van-icon name="revoke"></van-icon>
|
||||
<span>撤回</span>
|
||||
</div>
|
||||
</template>
|
||||
<template #empty>
|
||||
<div class="specialcondolence-list-empty">
|
||||
<img src="/assets/mobile/img/condolence/condolence-empty.png" alt="暂无慰问审核记录插画">
|
||||
<div class="specialcondolence-list-empty__title">暂无慰问审核记录</div>
|
||||
<div class="specialcondolence-list-empty__hint">当前筛选条件下暂时没有慰问申请</div>
|
||||
</div>
|
||||
</template>
|
||||
</table-list>
|
||||
</main>
|
||||
|
||||
<info ref="infoRef" page-key="specialcondolence-fourth-detail">
|
||||
<div v-if="showApprovalForm">
|
||||
<section class="specialcondolence-info-card">
|
||||
<h2 class="specialcondolence-info-card__title">
|
||||
审批意见<span class="specialcondolence-audit-card__required">*</span>
|
||||
</h2>
|
||||
<van-form ref="formRef">
|
||||
<van-field
|
||||
v-model="formData.tf_opinion"
|
||||
class="specialcondolence-audit-field"
|
||||
name="tf_opinion"
|
||||
type="textarea"
|
||||
rows="6"
|
||||
placeholder="请输入审批意见"
|
||||
:rules="[{ required: true, message: '请填写审批意见' }]"
|
||||
maxlength="100"
|
||||
show-word-limit
|
||||
></van-field>
|
||||
<h2 class="specialcondolence-info-card__title">
|
||||
审批签字<span class="specialcondolence-audit-card__required">*</span>
|
||||
</h2>
|
||||
<van-field name="tf_sign" :value="formData.tf_sign" :rules="[{required:true,message:'请完成审批签字'}]">
|
||||
<template #input><h5-signature v-model="formData.tf_sign" :key="formData.processTaskId"></h5-signature></template>
|
||||
</van-field>
|
||||
</van-form>
|
||||
</section>
|
||||
<div class="specialcondolence-popup-actions">
|
||||
<van-button class="specialcondolence-action-danger" type="danger" block :loading="formLoading" @click="handleTaskAction(6)">退回</van-button>
|
||||
<van-button class="specialcondolence-action-danger" type="danger" block :loading="formLoading" @click="handleTaskAction(2)">不同意</van-button>
|
||||
<van-button class="specialcondolence-action-primary" type="primary" block :loading="formLoading" @click="handleTaskAction(1)">同意</van-button>
|
||||
</div>
|
||||
</div>
|
||||
</info>
|
||||
<van-dialog
|
||||
:value="confirmVisible"
|
||||
title="提示"
|
||||
:message="confirmActionType === 'revoke' ? '您确定要撤回吗?' : '您确定要提交吗?'"
|
||||
show-cancel-button
|
||||
confirm-button-color="#1989fa"
|
||||
@confirm="confirmPendingAction"
|
||||
@cancel="closeActionConfirm"
|
||||
></van-dialog>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script nonce="${cspNonce!}">
|
||||
<!--#include('../common/info.js'){}#-->
|
||||
new Vue({
|
||||
el: "#app",
|
||||
store,
|
||||
components: {
|
||||
info: specialcondolenceInfo
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
pageForm: {
|
||||
pageNumber: 1,
|
||||
pageSize: 10,
|
||||
totalCount: 0,
|
||||
searchKeyword: '',
|
||||
approvalText: "0",
|
||||
approval: false,
|
||||
year: new Date().getFullYear(),
|
||||
type: null,
|
||||
},
|
||||
typeOptions: [],
|
||||
approvalOptions: [
|
||||
{text: "未审核", value: "0"},
|
||||
{text: "已审核", value: "1"}
|
||||
],
|
||||
skeletonLoading: true,
|
||||
formData: {},
|
||||
showApprovalForm: false,
|
||||
formLoading: false,
|
||||
confirmVisible: false,
|
||||
confirmActionType: "task",
|
||||
pendingSubmitType: null,
|
||||
pendingRevokeRow: null,
|
||||
historyLayerUnsubscribe: null
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// state.initial 表示当前查询前列表为空,仅此阶段使用整组卡片骨架屏。
|
||||
handleListLoadingChange(state) {
|
||||
if (state.initial) this.$set(this, "skeletonLoading", state.loading)
|
||||
},
|
||||
// 审核状态下拉值为字符串,接口参数 approval 继续使用布尔值。
|
||||
onApprovalFilterChange(val) {
|
||||
this.$set(this.pageForm, "approval", val === "1")
|
||||
this.doSearch()
|
||||
},
|
||||
onReady() {
|
||||
this.querySpecialCondolenceType()
|
||||
this.openTodoTask()
|
||||
},
|
||||
openTodoTask() {
|
||||
const taskId = GetQueryString("taskId")
|
||||
const bizId = GetQueryString("bizId")
|
||||
if (!taskId || !bizId) return
|
||||
this.$axios.post("/flow/common/taskInfo", {taskId}).then((res) => {
|
||||
if (res.code !== 0 || !res.data) return
|
||||
const task = res.data
|
||||
if (task.taskName !== "af363a4e-fc56-42a0-9906-8c7a2814006b") return
|
||||
const row = {id: bizId, taskId: task.id, curTaskName: task.displayName}
|
||||
if (task.taskState === 10 && task.executable && GetQueryString("tab") === "todo") {
|
||||
this.onApproval(row)
|
||||
} else {
|
||||
this.onView(row)
|
||||
}
|
||||
})
|
||||
},
|
||||
onView(row) {
|
||||
this.$set(this, "showApprovalForm", false)
|
||||
this.$refs.infoRef.onOpen(row, "慰问详情")
|
||||
},
|
||||
onApproval(row) {
|
||||
this.$set(this, "showApprovalForm", true)
|
||||
this.$set(this, "formData", {
|
||||
processTaskId: row.taskId,
|
||||
taskName: row.curTaskName,
|
||||
tf_sign: "",
|
||||
tf_opinion: ""
|
||||
})
|
||||
this.$refs.infoRef.onOpen(row, row.curTaskName || "慰问审核")
|
||||
},
|
||||
// val 为流程提交类型:1 同意、20 不同意、6 退回;校验通过后打开历史栈确认框。
|
||||
handleTaskAction(val) {
|
||||
this.$refs.formRef.validate()
|
||||
.then(() => {
|
||||
this.$set(this, "confirmActionType", "task")
|
||||
this.$set(this, "pendingSubmitType", val)
|
||||
if (window.h5HistoryLayerManager && window.h5HistoryLayerManager.open("specialcondolence-action-confirm")) return
|
||||
this.$set(this, "confirmVisible", true)
|
||||
})
|
||||
.catch(() => {})
|
||||
},
|
||||
// 确认操作时先回退确认框历史,再根据操作类型调用办理或撤回接口。
|
||||
confirmPendingAction() {
|
||||
this.closeActionConfirm(() => {
|
||||
if (this.confirmActionType === "revoke") {
|
||||
this.revokeTask()
|
||||
return
|
||||
}
|
||||
this.submitTaskAction()
|
||||
})
|
||||
},
|
||||
// 提交 processTaskId、taskName、tf_opinion、tf_sign 和 submitType,接口返回统一响应对象。
|
||||
submitTaskAction() {
|
||||
this.$set(this, "formLoading", true)
|
||||
this.$axios.post("/platform/special_condolence/approval/executeTask", {
|
||||
data: JSON.stringify({
|
||||
...this.formData,
|
||||
submitType: this.pendingSubmitType
|
||||
})
|
||||
})
|
||||
.then((res) => {
|
||||
if (res && res.code === 0) {
|
||||
const afterClose = () => {
|
||||
this.$toast.success(res.msg)
|
||||
this.doSearch()
|
||||
}
|
||||
if (window.h5HistoryLayerManager && window.h5HistoryLayerManager.closeAll(afterClose)) return
|
||||
this.$refs.infoRef.onClose(afterClose)
|
||||
}
|
||||
})
|
||||
.finally(() => {
|
||||
this.$set(this, "formLoading", false)
|
||||
})
|
||||
},
|
||||
closeActionConfirm(afterClose = null) {
|
||||
if (window.h5HistoryLayerManager && window.h5HistoryLayerManager.close("specialcondolence-action-confirm", afterClose)) return
|
||||
this.$set(this, "confirmVisible", false)
|
||||
if (typeof afterClose === "function") afterClose()
|
||||
},
|
||||
// row 提供待撤回任务 taskId,确认后保存当前行并由统一确认框执行撤回。
|
||||
onRevoke(row){
|
||||
this.$set(this, "confirmActionType", "revoke")
|
||||
this.$set(this, "pendingRevokeRow", row)
|
||||
if (window.h5HistoryLayerManager && window.h5HistoryLayerManager.open("specialcondolence-action-confirm")) return
|
||||
this.$set(this, "confirmVisible", true)
|
||||
},
|
||||
// 使用 pendingRevokeRow.taskId 撤回任务,接口返回统一响应对象。
|
||||
revokeTask() {
|
||||
if (!this.pendingRevokeRow) return
|
||||
this.$set(this, "formLoading", true)
|
||||
this.$axios.post("/flow/common/revokeTask", {taskId: this.pendingRevokeRow.taskId})
|
||||
.then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$toast.success(res.msg)
|
||||
this.doSearch()
|
||||
}
|
||||
})
|
||||
.finally(() => {
|
||||
this.$set(this, "formLoading", false)
|
||||
})
|
||||
},
|
||||
querySpecialCondolenceType() {
|
||||
this.$axios.post('/platform/special_condolence/type/querySpecialCondolenceType', {}, {h5SkeletonLoading: true})
|
||||
.then((res) => {
|
||||
const typeList = res.data || []
|
||||
this.$set(this, "typeOptions", [
|
||||
{
|
||||
text: "全部慰问类型",
|
||||
value: null
|
||||
}
|
||||
].concat(typeList.map((v) => ({ text: v.name, value: v.id }))))
|
||||
if (this.typeOptions.length > 0) {
|
||||
this.$set(this.pageForm, "type", this.typeOptions[0].value)
|
||||
this.doSearch()
|
||||
}
|
||||
})
|
||||
},
|
||||
doSearch() {
|
||||
this.$nextTick(() => {
|
||||
this.pageForm.pageNumber = 1
|
||||
this.pageForm.totalCount = 0
|
||||
this.$refs.tableListRef.doSearch()
|
||||
})
|
||||
}
|
||||
},
|
||||
created() {
|
||||
if (!window.h5HistoryLayerManager) return
|
||||
this.$set(this, "historyLayerUnsubscribe", window.h5HistoryLayerManager.subscribe((stack) => {
|
||||
this.$set(this, "confirmVisible", stack.includes("specialcondolence-action-confirm"))
|
||||
}))
|
||||
},
|
||||
beforeDestroy() {
|
||||
if (typeof this.historyLayerUnsubscribe === "function") this.historyLayerUnsubscribe()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
+475
@@ -0,0 +1,475 @@
|
||||
<!--#
|
||||
layout("/layouts/platform_h5.html"){
|
||||
#-->
|
||||
|
||||
<style>
|
||||
#app {
|
||||
--color-primary: #1989fa;
|
||||
}
|
||||
|
||||
.specialcondolence-list-page {
|
||||
min-height: 100vh;
|
||||
padding-bottom: calc(24px + env(safe-area-inset-bottom));
|
||||
box-sizing: border-box;
|
||||
background: #f3f7fd;
|
||||
}
|
||||
|
||||
.specialcondolence-list-page .van-nav-bar,
|
||||
.specialcondolence-list-page .van-sticky--fixed {
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
.specialcondolence-list-page .van-nav-bar__title {
|
||||
color: #172033;
|
||||
font-size: 16px;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.specialcondolence-list-page .van-nav-bar .van-icon,
|
||||
.specialcondolence-list-page .van-nav-bar__text {
|
||||
color: #1989fa;
|
||||
}
|
||||
|
||||
.specialcondolence-list-sticky {
|
||||
padding: 22px 12px 1px;
|
||||
box-sizing: border-box;
|
||||
background: #f3f7fd;
|
||||
}
|
||||
|
||||
.specialcondolence-list-search {
|
||||
margin: 0 0 8px;
|
||||
padding: 0;
|
||||
overflow: hidden;
|
||||
border-radius: 12px;
|
||||
background: #fff;
|
||||
box-shadow: 0 5px 16px rgba(43, 73, 112, .1);
|
||||
}
|
||||
|
||||
.specialcondolence-list-search .van-search__content {
|
||||
height: 42px;
|
||||
padding-left: 12px;
|
||||
align-items: center;
|
||||
border-radius: 12px;
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
.specialcondolence-list-search .van-field__control {
|
||||
color: #263548;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.specialcondolence-list-search .van-field__control::placeholder {
|
||||
color: #a7b0bf;
|
||||
}
|
||||
|
||||
.specialcondolence-list-filter {
|
||||
margin-bottom: 10px;
|
||||
overflow: hidden;
|
||||
border-radius: 10px;
|
||||
box-shadow: 0 5px 16px rgba(43, 73, 112, .08);
|
||||
}
|
||||
|
||||
.specialcondolence-list-filter .van-dropdown-menu__bar {
|
||||
height: 44px;
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
.specialcondolence-list-filter .van-dropdown-menu__item,
|
||||
.specialcondolence-list-filter .van-dropdown-menu__title {
|
||||
height: 44px;
|
||||
}
|
||||
|
||||
.specialcondolence-list-filter .van-dropdown-menu__item {
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.specialcondolence-list-filter .van-dropdown-menu__title {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
line-height: 20px;
|
||||
color: #66758a;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.specialcondolence-list-filter .van-dropdown-menu__title--active,
|
||||
.specialcondolence-list-filter .van-dropdown-item__option--active,
|
||||
.specialcondolence-list-filter .van-dropdown-item__option--active .van-dropdown-item__icon {
|
||||
color: #1989fa;
|
||||
}
|
||||
|
||||
.specialcondolence-list-filter .van-dropdown-item__content {
|
||||
width: calc(100% - 24px);
|
||||
margin: 0 12px;
|
||||
overflow: hidden;
|
||||
box-sizing: border-box;
|
||||
border-radius: 0 0 12px 12px;
|
||||
box-shadow: 0 10px 24px rgba(31, 65, 108, .14);
|
||||
}
|
||||
|
||||
.specialcondolence-list-filter .van-dropdown-item__option {
|
||||
display: flex;
|
||||
min-height: 48px;
|
||||
padding: 0 16px;
|
||||
align-items: center;
|
||||
color: #46566c;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.specialcondolence-list-filter .van-dropdown-item__option .van-cell__title {
|
||||
display: flex;
|
||||
min-height: 20px;
|
||||
align-items: center;
|
||||
line-height: 20px;
|
||||
}
|
||||
|
||||
.specialcondolence-list-content {
|
||||
padding: 0 12px;
|
||||
}
|
||||
|
||||
.specialcondolence-list-skeleton {
|
||||
padding-top: 2px;
|
||||
}
|
||||
|
||||
.specialcondolence-list-skeleton__card {
|
||||
margin-bottom: 12px;
|
||||
padding: 18px 14px 14px;
|
||||
border: 1px solid #e9eff7;
|
||||
border-radius: 12px;
|
||||
background: #fff;
|
||||
box-shadow: 0 5px 16px rgba(43, 73, 112, .08);
|
||||
}
|
||||
|
||||
.specialcondolence-list-skeleton__card .van-skeleton {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.specialcondolence-list-skeleton__card .van-skeleton__title {
|
||||
width: 42%;
|
||||
height: 18px;
|
||||
margin-bottom: 18px;
|
||||
}
|
||||
|
||||
.specialcondolence-list-skeleton__card .van-skeleton__row {
|
||||
height: 14px;
|
||||
margin-top: 12px;
|
||||
}
|
||||
|
||||
.specialcondolence-list-skeleton__card .van-skeleton__row:nth-child(2n) {
|
||||
width: 72% !important;
|
||||
}
|
||||
|
||||
.specialcondolence-list-skeleton__card .van-skeleton__row:last-child {
|
||||
width: 34% !important;
|
||||
margin-top: 18px;
|
||||
margin-left: auto;
|
||||
}
|
||||
|
||||
.specialcondolence-list-page .table-list-container {
|
||||
margin-top: 0;
|
||||
padding-bottom: 2px;
|
||||
}
|
||||
|
||||
.specialcondolence-list-page .table-list-container .table-list-item {
|
||||
margin-bottom: 12px;
|
||||
padding: 14px;
|
||||
border: 1px solid #e9eff7;
|
||||
border-radius: 12px;
|
||||
box-shadow: 0 5px 16px rgba(43, 73, 112, .08);
|
||||
}
|
||||
|
||||
.specialcondolence-card-header {
|
||||
display: flex;
|
||||
margin-bottom: 8px;
|
||||
align-items: flex-start;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.specialcondolence-card-heading {
|
||||
min-width: 0;
|
||||
padding-right: 10px;
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.specialcondolence-card-title {
|
||||
overflow: hidden;
|
||||
color: #253247;
|
||||
font-size: 15px;
|
||||
font-weight: 600;
|
||||
line-height: 22px;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.specialcondolence-card-code {
|
||||
margin-top: 1px;
|
||||
color: #9ba6b6;
|
||||
font-size: 12px;
|
||||
line-height: 18px;
|
||||
}
|
||||
|
||||
.specialcondolence-card-status {
|
||||
display: inline-flex;
|
||||
flex: none;
|
||||
}
|
||||
|
||||
.specialcondolence-card-status .van-tag {
|
||||
min-height: 24px;
|
||||
padding: 3px 9px;
|
||||
border: 0;
|
||||
border-radius: 12px;
|
||||
box-sizing: border-box;
|
||||
font-size: 12px;
|
||||
line-height: 18px;
|
||||
}
|
||||
|
||||
.specialcondolence-list-page .table-list-container .table-list-item .item-actions {
|
||||
margin-top: 10px;
|
||||
padding-top: 10px;
|
||||
border-top-color: #edf1f6;
|
||||
}
|
||||
|
||||
.specialcondolence-list-page .table-list-container .table-list-item .action-btn {
|
||||
min-height: 28px;
|
||||
padding: 4px 11px;
|
||||
border-radius: 14px;
|
||||
color: #1989fa;
|
||||
background: #eaf4ff;
|
||||
font-size: 12px;
|
||||
line-height: 18px;
|
||||
}
|
||||
|
||||
.specialcondolence-list-page .table-list-container .table-list-item .action-btn.delete {
|
||||
color: #f04444;
|
||||
background: #fff0f0;
|
||||
}
|
||||
|
||||
.specialcondolence-list-page .table-list-container .table-list-item .action-btn i {
|
||||
margin-right: 5px;
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
.specialcondolence-list-page .empty-state {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.specialcondolence-list-empty {
|
||||
display: flex;
|
||||
min-height: 280px;
|
||||
padding: 46px 18px 36px;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
box-sizing: border-box;
|
||||
flex-direction: column;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.specialcondolence-list-empty img {
|
||||
display: block;
|
||||
width: 86%;
|
||||
max-width: 290px;
|
||||
height: auto;
|
||||
object-fit: contain;
|
||||
}
|
||||
|
||||
.specialcondolence-list-empty__title {
|
||||
margin-top: 14px;
|
||||
color: #50627a;
|
||||
font-size: 15px;
|
||||
font-weight: 600;
|
||||
line-height: 22px;
|
||||
}
|
||||
|
||||
.specialcondolence-list-empty__hint {
|
||||
margin-top: 5px;
|
||||
color: #9aa7b8;
|
||||
font-size: 12px;
|
||||
line-height: 18px;
|
||||
}
|
||||
</style>
|
||||
|
||||
<style id="style-specialcondolence-info-h5">
|
||||
<!--#include("../common/info.css"){}#-->
|
||||
</style>
|
||||
|
||||
<div id="app">
|
||||
<div class="specialcondolence-list-page">
|
||||
<van-nav-bar title="我的申请" left-text="返回" left-arrow @click-left="historyBack" fixed placeholder></van-nav-bar>
|
||||
|
||||
<van-sticky offset-top="46px">
|
||||
<div class="specialcondolence-list-sticky">
|
||||
<van-search
|
||||
v-model="pageForm.searchKeyword"
|
||||
class="specialcondolence-list-search"
|
||||
placeholder="请输入姓名或者工号搜索"
|
||||
shape="round"
|
||||
clearable
|
||||
@search="doSearch"
|
||||
@clear="doSearch"
|
||||
></van-search>
|
||||
<van-dropdown-menu class="specialcondolence-list-filter" :close-on-click-outside="false" :close-on-click-overlay="false">
|
||||
<year-van-dropdown-item :num="5" @change="doSearch" v-model="pageForm.year"></year-van-dropdown-item>
|
||||
<van-dropdown-item v-model="pageForm.type" :options="typeOptions" :multiple="false"
|
||||
@change="doSearch"></van-dropdown-item>
|
||||
</van-dropdown-menu>
|
||||
</div>
|
||||
</van-sticky>
|
||||
|
||||
<main class="specialcondolence-list-content">
|
||||
<div class="specialcondolence-list-skeleton" v-if="skeletonLoading">
|
||||
<div class="specialcondolence-list-skeleton__card" v-for="index in 3" :key="'mine-skeleton-' + index">
|
||||
<van-skeleton title :row="5" animated></van-skeleton>
|
||||
</div>
|
||||
</div>
|
||||
<table-list api="/platform/special_condolence/mine/pageData" :page_form.sync="pageForm" ref="tableListRef"
|
||||
v-show="!skeletonLoading" :show_loading_overlay="false" @ready="onReady"
|
||||
@loading-change="handleListLoadingChange">
|
||||
<template #header="{index,row}">
|
||||
<div class="specialcondolence-card-header">
|
||||
<div class="specialcondolence-card-heading">
|
||||
<div class="specialcondolence-card-title">{{row.helpUserName || '--'}}</div>
|
||||
<div class="specialcondolence-card-code">工号:{{row.helpLoginName || '--'}}</div>
|
||||
</div>
|
||||
<enum-tag class="specialcondolence-card-status" v-if="row.instanceState" :value="row.instanceState"
|
||||
name="ProcessInstanceStateEnum" label_key="message" size="small"></enum-tag>
|
||||
</div>
|
||||
</template>
|
||||
<template v-slot="{index,row}">
|
||||
<table-column label="慰问对象">{{row.helpUserName}}</table-column>
|
||||
<table-column label="慰问对象工号">{{row.helpLoginName}}</table-column>
|
||||
<table-column label="申请人">{{row.applyUserName}}</table-column>
|
||||
<table-column label="所属工会">{{row.applyUnionName}}</table-column>
|
||||
<table-column label="所属单位">{{row.applyUnitName}}</table-column>
|
||||
<table-column label="慰问类型">{{row.typeName}}</table-column>
|
||||
<table-column label="当前节点">{{row.taskName}}</table-column>
|
||||
</template>
|
||||
<template #actions="{index,row}">
|
||||
<div class="action-btn" @click="onView(row)">
|
||||
<van-icon name="eye-o"></van-icon>
|
||||
<span>查看</span>
|
||||
</div>
|
||||
<div class="action-btn" @click="onEdit(row)"
|
||||
v-if="row.taskKey === 'startTask' || !row.instanceId">
|
||||
<van-icon name="edit"></van-icon>
|
||||
<span>编辑</span>
|
||||
</div>
|
||||
<div class="action-btn delete" @click="onRevoke(row)"
|
||||
v-if="row.canRevoke">
|
||||
<van-icon name="revoke"></van-icon>
|
||||
<span>撤回</span>
|
||||
</div>
|
||||
<div class="action-btn delete" @click="onDelete(row)"
|
||||
v-if="row.taskKey === 'startTask' || !row.instanceId">
|
||||
<van-icon name="delete-o"></van-icon>
|
||||
<span>删除</span>
|
||||
</div>
|
||||
</template>
|
||||
<template #empty>
|
||||
<div class="specialcondolence-list-empty">
|
||||
<img src="/assets/mobile/img/condolence/condolence-empty.png" alt="暂无慰问申请记录插画">
|
||||
<div class="specialcondolence-list-empty__title">暂无慰问申请记录</div>
|
||||
<div class="specialcondolence-list-empty__hint">当前筛选条件下暂时没有慰问申请</div>
|
||||
</div>
|
||||
</template>
|
||||
</table-list>
|
||||
</main>
|
||||
|
||||
<info ref="infoRef" page-key="specialcondolence-mine-detail"></info>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script nonce="${cspNonce!}">
|
||||
<!--#include('../common/info.js'){}#-->
|
||||
new Vue({
|
||||
el: "#app",
|
||||
store,
|
||||
components: {
|
||||
info: specialcondolenceInfo
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
pageForm: {
|
||||
pageNumber: 1,
|
||||
pageSize: 10,
|
||||
totalCount: 0,
|
||||
year: new Date().getFullYear(),
|
||||
type: null
|
||||
},
|
||||
typeOptions: [],
|
||||
skeletonLoading: true,
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// state.initial 表示当前查询前列表为空,仅此阶段使用整组卡片骨架屏。
|
||||
handleListLoadingChange(state) {
|
||||
if (state.initial) this.$set(this, "skeletonLoading", state.loading)
|
||||
},
|
||||
onReady() {
|
||||
this.querySpecialCondolenceType()
|
||||
.then((typeList) => {
|
||||
this.$set(this, "typeOptions", [
|
||||
{
|
||||
text: "全部慰问类型",
|
||||
value: null
|
||||
}
|
||||
].concat(typeList.map((v) => ({ text: v.name, value: v.id }))))
|
||||
if (this.typeOptions.length > 0) {
|
||||
this.$set(this.pageForm, "type", this.typeOptions[0].value)
|
||||
this.doSearch()
|
||||
}
|
||||
})
|
||||
},
|
||||
onRevoke(row) {
|
||||
this.$dialog.confirm({
|
||||
title: "提示",
|
||||
message: "您确定要撤回吗?"
|
||||
}).then(() => {
|
||||
this.$axios.post("/flow/common/revokeTask", { taskId: row.startTaskId }).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$toast(res.msg)
|
||||
this.doSearch()
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
onView(row) {
|
||||
this.$refs.infoRef.onOpen(row, "慰问详情")
|
||||
},
|
||||
onEdit(row) {
|
||||
this.$pjaxReplace("/platform/special_condolence/apply/h5?taskId=" + (row.startTaskId || "") + "&bizId=" + row.id)
|
||||
},
|
||||
onDelete(row) {
|
||||
this.$dialog.confirm({
|
||||
title: "提示",
|
||||
message: "您确定要删除吗?"
|
||||
})
|
||||
.then(() => {
|
||||
this.$axios.post("/platform/special_condolence/mine/delete", { id: row.id }).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$toast.success(res.msg)
|
||||
this.doSearch()
|
||||
} else {
|
||||
this.$toast.fail(res.msg)
|
||||
}
|
||||
})
|
||||
})
|
||||
.catch(() => {})
|
||||
},
|
||||
querySpecialCondolenceType() {
|
||||
return this.$axios.post('/platform/special_condolence/type/querySpecialCondolenceType', {}, {h5SkeletonLoading: true})
|
||||
.then((res) => res.data || [])
|
||||
},
|
||||
doSearch() {
|
||||
this.$nextTick(() => {
|
||||
this.pageForm.pageNumber = 1
|
||||
this.pageForm.totalCount = 0
|
||||
this.$refs.tableListRef.doSearch()
|
||||
})
|
||||
}
|
||||
},
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
+350
@@ -0,0 +1,350 @@
|
||||
<!--#
|
||||
layout("/layouts/platform_h5.html"){
|
||||
#-->
|
||||
|
||||
<style>
|
||||
#app { --color-primary: #1989fa; }
|
||||
.specialcondolence-list-page { min-height: 100vh; padding-bottom: calc(24px + env(safe-area-inset-bottom)); box-sizing: border-box; background: #f3f7fd; }
|
||||
.specialcondolence-list-page .van-nav-bar, .specialcondolence-list-page .van-sticky--fixed { background: #fff; }
|
||||
.specialcondolence-list-page .van-nav-bar__title { color: #172033; font-size: 16px; font-weight: 600; }
|
||||
.specialcondolence-list-page .van-nav-bar .van-icon, .specialcondolence-list-page .van-nav-bar__text { color: #1989fa; }
|
||||
.specialcondolence-list-sticky { padding: 22px 12px 1px; box-sizing: border-box; background: #f3f7fd; }
|
||||
.specialcondolence-list-search { margin: 0 0 8px; padding: 0; overflow: hidden; border-radius: 12px; background: #fff; box-shadow: 0 5px 16px rgba(43, 73, 112, .1); }
|
||||
.specialcondolence-list-search .van-search__content { height: 42px; padding-left: 12px; align-items: center; border-radius: 12px; background: #fff; }
|
||||
.specialcondolence-list-search .van-field__control { color: #263548; font-size: 14px; }
|
||||
.specialcondolence-list-search .van-field__control::placeholder { color: #a7b0bf; }
|
||||
.specialcondolence-list-filter { margin-bottom: 8px; overflow: hidden; border-radius: 10px; box-shadow: 0 5px 16px rgba(43, 73, 112, .08); }
|
||||
.specialcondolence-list-filter .van-dropdown-menu__bar { height: 44px; box-shadow: none; }
|
||||
.specialcondolence-list-filter .van-dropdown-menu__item, .specialcondolence-list-filter .van-dropdown-menu__title { height: 44px; }
|
||||
.specialcondolence-list-filter .van-dropdown-menu__item { align-items: center; justify-content: center; }
|
||||
.specialcondolence-list-filter .van-dropdown-menu__title { display: inline-flex; align-items: center; line-height: 20px; color: #66758a; font-size: 14px; }
|
||||
.specialcondolence-list-filter .van-dropdown-menu__title--active, .specialcondolence-list-filter .van-dropdown-item__option--active, .specialcondolence-list-filter .van-dropdown-item__option--active .van-dropdown-item__icon { color: #1989fa; }
|
||||
.specialcondolence-list-filter .van-dropdown-item__content { width: calc(100% - 24px); margin: 0 12px; overflow: hidden; box-sizing: border-box; border-radius: 0 0 12px 12px; box-shadow: 0 10px 24px rgba(31, 65, 108, .14); }
|
||||
.specialcondolence-list-filter .van-dropdown-item__option { display: flex; min-height: 48px; padding: 0 16px; align-items: center; color: #46566c; font-size: 14px; }
|
||||
.specialcondolence-list-filter .van-dropdown-item__option .van-cell__title { display: flex; min-height: 20px; align-items: center; line-height: 20px; }
|
||||
.specialcondolence-list-content { padding: 0 12px; }
|
||||
.specialcondolence-list-skeleton { padding-top: 2px; }
|
||||
.specialcondolence-list-skeleton__card { margin-bottom: 12px; padding: 18px 14px 14px; border: 1px solid #e9eff7; border-radius: 12px; background: #fff; box-shadow: 0 5px 16px rgba(43, 73, 112, .08); }
|
||||
.specialcondolence-list-skeleton__card .van-skeleton { padding: 0; }
|
||||
.specialcondolence-list-skeleton__card .van-skeleton__title { width: 42%; height: 18px; margin-bottom: 18px; }
|
||||
.specialcondolence-list-skeleton__card .van-skeleton__row { height: 14px; margin-top: 12px; }
|
||||
.specialcondolence-list-skeleton__card .van-skeleton__row:nth-child(2n) { width: 72% !important; }
|
||||
.specialcondolence-list-skeleton__card .van-skeleton__row:last-child { width: 34% !important; margin-top: 18px; margin-left: auto; }
|
||||
.specialcondolence-list-page .table-list-container { margin-top: 0; padding-bottom: 2px; }
|
||||
.specialcondolence-list-page .table-list-container .table-list-item { margin-bottom: 12px; padding: 14px; border: 1px solid #e9eff7; border-radius: 12px; box-shadow: 0 5px 16px rgba(43, 73, 112, .08); }
|
||||
.specialcondolence-card-header { display: flex; margin-bottom: 8px; align-items: flex-start; justify-content: space-between; }
|
||||
.specialcondolence-card-heading { min-width: 0; padding-right: 10px; flex: 1; }
|
||||
.specialcondolence-card-title { overflow: hidden; color: #253247; font-size: 15px; font-weight: 600; line-height: 22px; text-overflow: ellipsis; white-space: nowrap; }
|
||||
.specialcondolence-card-code { margin-top: 1px; color: #9ba6b6; font-size: 12px; line-height: 18px; }
|
||||
.specialcondolence-card-status { display: inline-flex; flex: none; }
|
||||
.specialcondolence-card-status .van-tag { min-height: 24px; padding: 3px 9px; border: 0; border-radius: 12px; box-sizing: border-box; font-size: 12px; line-height: 18px; }
|
||||
.specialcondolence-list-page .table-list-container .table-list-item .item-actions { margin-top: 10px; padding-top: 10px; border-top-color: #edf1f6; }
|
||||
.specialcondolence-list-page .table-list-container .table-list-item .action-btn { min-height: 28px; padding: 4px 11px; border-radius: 14px; color: #1989fa; background: #eaf4ff; font-size: 12px; line-height: 18px; }
|
||||
.specialcondolence-list-page .table-list-container .table-list-item .action-btn.delete { color: #f04444; background: #fff0f0; }
|
||||
.specialcondolence-list-page .table-list-container .table-list-item .action-btn i { margin-right: 5px; font-size: 13px; }
|
||||
.specialcondolence-list-page .empty-state { padding: 0; }
|
||||
.specialcondolence-list-empty { display: flex; min-height: 280px; padding: 46px 18px 36px; align-items: center; justify-content: center; box-sizing: border-box; flex-direction: column; text-align: center; }
|
||||
.specialcondolence-list-empty img { display: block; width: 86%; max-width: 290px; height: auto; object-fit: contain; }
|
||||
.specialcondolence-list-empty__title { margin-top: 14px; color: #50627a; font-size: 15px; font-weight: 600; line-height: 22px; }
|
||||
.specialcondolence-list-empty__hint { margin-top: 5px; color: #9aa7b8; font-size: 12px; line-height: 18px; }
|
||||
</style>
|
||||
|
||||
<style id="style-specialcondolence-info-h5">
|
||||
<!--#include("../common/info.css"){}#-->
|
||||
</style>
|
||||
|
||||
<div id="app">
|
||||
<div class="specialcondolence-list-page">
|
||||
<van-nav-bar title="校工会办公室主任审批" left-text="返回" left-arrow @click-left="historyBack" fixed placeholder></van-nav-bar>
|
||||
|
||||
<van-sticky offset-top="46px">
|
||||
<div class="specialcondolence-list-sticky">
|
||||
<van-search
|
||||
v-model="pageForm.searchKeyword"
|
||||
class="specialcondolence-list-search"
|
||||
placeholder="请输入姓名或者工号搜索"
|
||||
shape="round"
|
||||
clearable
|
||||
@search="doSearch"
|
||||
@clear="doSearch"
|
||||
></van-search>
|
||||
<van-dropdown-menu class="specialcondolence-list-filter" :close-on-click-outside="false" :close-on-click-overlay="false">
|
||||
<year-van-dropdown-item :num="5" @change="doSearch" v-model="pageForm.year"></year-van-dropdown-item>
|
||||
<van-dropdown-item v-model="pageForm.type" :options="typeOptions" :multiple="false"
|
||||
@change="doSearch"></van-dropdown-item>
|
||||
<van-dropdown-item v-model="pageForm.approvalText" :options="approvalOptions" :multiple="false"
|
||||
@change="onApprovalFilterChange"></van-dropdown-item>
|
||||
</van-dropdown-menu>
|
||||
</div>
|
||||
</van-sticky>
|
||||
|
||||
<main class="specialcondolence-list-content">
|
||||
<div class="specialcondolence-list-skeleton" v-if="skeletonLoading">
|
||||
<div class="specialcondolence-list-skeleton__card" v-for="index in 3" :key="'school-principal-approval-skeleton-' + index">
|
||||
<van-skeleton title :row="5" animated></van-skeleton>
|
||||
</div>
|
||||
</div>
|
||||
<table-list api="/platform/special_condolence/schoolPrincipalApproval/pageData" :page_form.sync="pageForm" ref="tableListRef"
|
||||
v-show="!skeletonLoading" :show_loading_overlay="false" @ready="onReady"
|
||||
@loading-change="handleListLoadingChange">
|
||||
<template #header="{index,row}">
|
||||
<div class="specialcondolence-card-header">
|
||||
<div class="specialcondolence-card-heading">
|
||||
<div class="specialcondolence-card-title">{{row.helpUserName || '--'}}</div>
|
||||
<div class="specialcondolence-card-code">工号:{{row.helpLoginName || '--'}}</div>
|
||||
</div>
|
||||
<enum-tag class="specialcondolence-card-status" v-if="row.instanceState" :value="row.instanceState"
|
||||
name="ProcessInstanceStateEnum" label_key="message" size="small"></enum-tag>
|
||||
</div>
|
||||
</template>
|
||||
<template v-slot="{index,row}">
|
||||
<table-column label="慰问对象">{{row.helpUserName}}</table-column>
|
||||
<table-column label="慰问对象工号">{{row.helpLoginName}}</table-column>
|
||||
<table-column label="申请人">{{row.applyUserName}}</table-column>
|
||||
<table-column label="所属工会">{{row.applyUnionName}}</table-column>
|
||||
<table-column label="所属单位">{{row.applyUnitName}}</table-column>
|
||||
<table-column label="慰问类型">{{row.typeName}}</table-column>
|
||||
<table-column label="当前节点">{{row.curTaskName}}</table-column>
|
||||
</template>
|
||||
<template #actions="{index,row}">
|
||||
<div class="action-btn" @click="onView(row)">
|
||||
<van-icon name="eye-o"></van-icon>
|
||||
<span>查看</span>
|
||||
</div>
|
||||
<div class="action-btn" v-if="row.taskState === 10" @click="onApproval(row)">
|
||||
<van-icon name="edit"></van-icon>
|
||||
<span>审核</span>
|
||||
</div>
|
||||
<div class="action-btn delete" v-if="row.canRevoke" @click="onRevoke(row)">
|
||||
<van-icon name="revoke"></van-icon>
|
||||
<span>撤回</span>
|
||||
</div>
|
||||
</template>
|
||||
<template #empty>
|
||||
<div class="specialcondolence-list-empty">
|
||||
<img src="/assets/mobile/img/condolence/condolence-empty.png" alt="暂无慰问审核记录插画">
|
||||
<div class="specialcondolence-list-empty__title">暂无慰问审核记录</div>
|
||||
<div class="specialcondolence-list-empty__hint">当前筛选条件下暂时没有慰问申请</div>
|
||||
</div>
|
||||
</template>
|
||||
</table-list>
|
||||
</main>
|
||||
|
||||
<info ref="infoRef" page-key="specialcondolence-school-principal-detail">
|
||||
<div v-if="showApprovalForm">
|
||||
<section class="specialcondolence-info-card">
|
||||
<h2 class="specialcondolence-info-card__title">
|
||||
审批意见<span class="specialcondolence-audit-card__required">*</span>
|
||||
</h2>
|
||||
<van-form ref="formRef">
|
||||
<van-field
|
||||
v-model="formData.tf_opinion"
|
||||
class="specialcondolence-audit-field"
|
||||
name="tf_opinion"
|
||||
type="textarea"
|
||||
rows="6"
|
||||
placeholder="请输入审批意见"
|
||||
:rules="[{ required: true, message: '请填写审批意见' }]"
|
||||
maxlength="100"
|
||||
show-word-limit
|
||||
></van-field>
|
||||
<h2 class="specialcondolence-info-card__title">
|
||||
审批签字<span class="specialcondolence-audit-card__required">*</span>
|
||||
</h2>
|
||||
<van-field name="tf_sign" :value="formData.tf_sign" :rules="[{required:true,message:'请完成审批签字'}]">
|
||||
<template #input><h5-signature v-model="formData.tf_sign" :key="formData.processTaskId"></h5-signature></template>
|
||||
</van-field>
|
||||
</van-form>
|
||||
</section>
|
||||
<div class="specialcondolence-popup-actions">
|
||||
<van-button class="specialcondolence-action-danger" type="danger" block :loading="formLoading" @click="handleTaskAction(6)">退回</van-button>
|
||||
<van-button class="specialcondolence-action-danger" type="danger" block :loading="formLoading" @click="handleTaskAction(2)">不同意</van-button>
|
||||
<van-button class="specialcondolence-action-primary" type="primary" block :loading="formLoading" @click="handleTaskAction(1)">同意</van-button>
|
||||
</div>
|
||||
</div>
|
||||
</info>
|
||||
<van-dialog
|
||||
:value="confirmVisible"
|
||||
title="提示"
|
||||
:message="confirmActionType === 'revoke' ? '您确定要撤回吗?' : '您确定要提交吗?'"
|
||||
show-cancel-button
|
||||
confirm-button-color="#1989fa"
|
||||
@confirm="confirmPendingAction"
|
||||
@cancel="closeActionConfirm"
|
||||
></van-dialog>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script nonce="${cspNonce!}">
|
||||
<!--#include('../common/info.js'){}#-->
|
||||
new Vue({
|
||||
el: "#app",
|
||||
store,
|
||||
components: {
|
||||
info: specialcondolenceInfo
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
pageForm: {
|
||||
pageNumber: 1,
|
||||
pageSize: 10,
|
||||
totalCount: 0,
|
||||
searchKeyword: '',
|
||||
approvalText: "0",
|
||||
approval: false,
|
||||
year: new Date().getFullYear(),
|
||||
type: null,
|
||||
},
|
||||
typeOptions: [],
|
||||
approvalOptions: [
|
||||
{text: "未审核", value: "0"},
|
||||
{text: "已审核", value: "1"}
|
||||
],
|
||||
skeletonLoading: true,
|
||||
formData: {},
|
||||
showApprovalForm: false,
|
||||
formLoading: false,
|
||||
confirmVisible: false,
|
||||
confirmActionType: "task",
|
||||
pendingSubmitType: null,
|
||||
pendingRevokeRow: null,
|
||||
historyLayerUnsubscribe: null
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// state.initial 表示当前查询前列表为空,仅此阶段使用整组卡片骨架屏。
|
||||
handleListLoadingChange(state) {
|
||||
if (state.initial) this.$set(this, "skeletonLoading", state.loading)
|
||||
},
|
||||
// 审核状态下拉值为字符串,接口参数 approval 继续使用布尔值。
|
||||
onApprovalFilterChange(val) {
|
||||
this.$set(this.pageForm, "approval", val === "1")
|
||||
this.doSearch()
|
||||
},
|
||||
onReady() {
|
||||
this.querySpecialCondolenceType()
|
||||
},
|
||||
onView(row) {
|
||||
this.$set(this, "showApprovalForm", false)
|
||||
this.$refs.infoRef.onOpen(row, "慰问详情")
|
||||
},
|
||||
onApproval(row) {
|
||||
this.$set(this, "showApprovalForm", true)
|
||||
this.$set(this, "formData", {
|
||||
processTaskId: row.taskId,
|
||||
taskName: row.curTaskName,
|
||||
tf_sign: "",
|
||||
tf_opinion: ""
|
||||
})
|
||||
this.$refs.infoRef.onOpen(row, row.curTaskName || "慰问审核")
|
||||
},
|
||||
// val 为流程提交类型:1 同意、20 不同意、6 退回;校验通过后打开历史栈确认框。
|
||||
handleTaskAction(val) {
|
||||
this.$refs.formRef.validate()
|
||||
.then(() => {
|
||||
this.$set(this, "confirmActionType", "task")
|
||||
this.$set(this, "pendingSubmitType", val)
|
||||
if (window.h5HistoryLayerManager && window.h5HistoryLayerManager.open("specialcondolence-action-confirm")) return
|
||||
this.$set(this, "confirmVisible", true)
|
||||
})
|
||||
.catch(() => {})
|
||||
},
|
||||
// 确认操作时先回退确认框历史,再根据操作类型调用办理或撤回接口。
|
||||
confirmPendingAction() {
|
||||
this.closeActionConfirm(() => {
|
||||
if (this.confirmActionType === "revoke") {
|
||||
this.revokeTask()
|
||||
return
|
||||
}
|
||||
this.submitTaskAction()
|
||||
})
|
||||
},
|
||||
// 提交 processTaskId、taskName、tf_opinion、tf_sign 和 submitType,接口返回统一响应对象。
|
||||
submitTaskAction() {
|
||||
this.$set(this, "formLoading", true)
|
||||
this.$axios.post("/platform/special_condolence/approval/executeTask", {
|
||||
data: JSON.stringify({
|
||||
...this.formData,
|
||||
submitType: this.pendingSubmitType
|
||||
})
|
||||
})
|
||||
.then((res) => {
|
||||
if (res && res.code === 0) {
|
||||
const afterClose = () => {
|
||||
this.$toast.success(res.msg)
|
||||
this.doSearch()
|
||||
}
|
||||
if (window.h5HistoryLayerManager && window.h5HistoryLayerManager.closeAll(afterClose)) return
|
||||
this.$refs.infoRef.onClose(afterClose)
|
||||
}
|
||||
})
|
||||
.finally(() => {
|
||||
this.$set(this, "formLoading", false)
|
||||
})
|
||||
},
|
||||
closeActionConfirm(afterClose = null) {
|
||||
if (window.h5HistoryLayerManager && window.h5HistoryLayerManager.close("specialcondolence-action-confirm", afterClose)) return
|
||||
this.$set(this, "confirmVisible", false)
|
||||
if (typeof afterClose === "function") afterClose()
|
||||
},
|
||||
// row 提供待撤回任务 taskId,确认后保存当前行并由统一确认框执行撤回。
|
||||
onRevoke(row){
|
||||
this.$set(this, "confirmActionType", "revoke")
|
||||
this.$set(this, "pendingRevokeRow", row)
|
||||
if (window.h5HistoryLayerManager && window.h5HistoryLayerManager.open("specialcondolence-action-confirm")) return
|
||||
this.$set(this, "confirmVisible", true)
|
||||
},
|
||||
// 使用 pendingRevokeRow.taskId 撤回任务,接口返回统一响应对象。
|
||||
revokeTask() {
|
||||
if (!this.pendingRevokeRow) return
|
||||
this.$set(this, "formLoading", true)
|
||||
this.$axios.post("/flow/common/revokeTask", {taskId: this.pendingRevokeRow.taskId})
|
||||
.then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$toast.success(res.msg)
|
||||
this.doSearch()
|
||||
}
|
||||
})
|
||||
.finally(() => {
|
||||
this.$set(this, "formLoading", false)
|
||||
})
|
||||
},
|
||||
querySpecialCondolenceType() {
|
||||
this.$axios.post('/platform/special_condolence/type/querySpecialCondolenceType', {}, {h5SkeletonLoading: true})
|
||||
.then((res) => {
|
||||
const typeList = res.data || []
|
||||
this.$set(this, "typeOptions", [
|
||||
{
|
||||
text: "全部慰问类型",
|
||||
value: null
|
||||
}
|
||||
].concat(typeList.map((v) => ({ text: v.name, value: v.id }))))
|
||||
if (this.typeOptions.length > 0) {
|
||||
this.$set(this.pageForm, "type", this.typeOptions[0].value)
|
||||
this.doSearch()
|
||||
}
|
||||
})
|
||||
},
|
||||
doSearch() {
|
||||
this.$nextTick(() => {
|
||||
this.pageForm.pageNumber = 1
|
||||
this.pageForm.totalCount = 0
|
||||
this.$refs.tableListRef.doSearch()
|
||||
})
|
||||
}
|
||||
},
|
||||
created() {
|
||||
if (!window.h5HistoryLayerManager) return
|
||||
this.$set(this, "historyLayerUnsubscribe", window.h5HistoryLayerManager.subscribe((stack) => {
|
||||
this.$set(this, "confirmVisible", stack.includes("specialcondolence-action-confirm"))
|
||||
}))
|
||||
},
|
||||
beforeDestroy() {
|
||||
if (typeof this.historyLayerUnsubscribe === "function") this.historyLayerUnsubscribe()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
+350
@@ -0,0 +1,350 @@
|
||||
<!--#
|
||||
layout("/layouts/platform_h5.html"){
|
||||
#-->
|
||||
|
||||
<style>
|
||||
#app { --color-primary: #1989fa; }
|
||||
.specialcondolence-list-page { min-height: 100vh; padding-bottom: calc(24px + env(safe-area-inset-bottom)); box-sizing: border-box; background: #f3f7fd; }
|
||||
.specialcondolence-list-page .van-nav-bar, .specialcondolence-list-page .van-sticky--fixed { background: #fff; }
|
||||
.specialcondolence-list-page .van-nav-bar__title { color: #172033; font-size: 16px; font-weight: 600; }
|
||||
.specialcondolence-list-page .van-nav-bar .van-icon, .specialcondolence-list-page .van-nav-bar__text { color: #1989fa; }
|
||||
.specialcondolence-list-sticky { padding: 22px 12px 1px; box-sizing: border-box; background: #f3f7fd; }
|
||||
.specialcondolence-list-search { margin: 0 0 8px; padding: 0; overflow: hidden; border-radius: 12px; background: #fff; box-shadow: 0 5px 16px rgba(43, 73, 112, .1); }
|
||||
.specialcondolence-list-search .van-search__content { height: 42px; padding-left: 12px; align-items: center; border-radius: 12px; background: #fff; }
|
||||
.specialcondolence-list-search .van-field__control { color: #263548; font-size: 14px; }
|
||||
.specialcondolence-list-search .van-field__control::placeholder { color: #a7b0bf; }
|
||||
.specialcondolence-list-filter { margin-bottom: 8px; overflow: hidden; border-radius: 10px; box-shadow: 0 5px 16px rgba(43, 73, 112, .08); }
|
||||
.specialcondolence-list-filter .van-dropdown-menu__bar { height: 44px; box-shadow: none; }
|
||||
.specialcondolence-list-filter .van-dropdown-menu__item, .specialcondolence-list-filter .van-dropdown-menu__title { height: 44px; }
|
||||
.specialcondolence-list-filter .van-dropdown-menu__item { align-items: center; justify-content: center; }
|
||||
.specialcondolence-list-filter .van-dropdown-menu__title { display: inline-flex; align-items: center; line-height: 20px; color: #66758a; font-size: 14px; }
|
||||
.specialcondolence-list-filter .van-dropdown-menu__title--active, .specialcondolence-list-filter .van-dropdown-item__option--active, .specialcondolence-list-filter .van-dropdown-item__option--active .van-dropdown-item__icon { color: #1989fa; }
|
||||
.specialcondolence-list-filter .van-dropdown-item__content { width: calc(100% - 24px); margin: 0 12px; overflow: hidden; box-sizing: border-box; border-radius: 0 0 12px 12px; box-shadow: 0 10px 24px rgba(31, 65, 108, .14); }
|
||||
.specialcondolence-list-filter .van-dropdown-item__option { display: flex; min-height: 48px; padding: 0 16px; align-items: center; color: #46566c; font-size: 14px; }
|
||||
.specialcondolence-list-filter .van-dropdown-item__option .van-cell__title { display: flex; min-height: 20px; align-items: center; line-height: 20px; }
|
||||
.specialcondolence-list-content { padding: 0 12px; }
|
||||
.specialcondolence-list-skeleton { padding-top: 2px; }
|
||||
.specialcondolence-list-skeleton__card { margin-bottom: 12px; padding: 18px 14px 14px; border: 1px solid #e9eff7; border-radius: 12px; background: #fff; box-shadow: 0 5px 16px rgba(43, 73, 112, .08); }
|
||||
.specialcondolence-list-skeleton__card .van-skeleton { padding: 0; }
|
||||
.specialcondolence-list-skeleton__card .van-skeleton__title { width: 42%; height: 18px; margin-bottom: 18px; }
|
||||
.specialcondolence-list-skeleton__card .van-skeleton__row { height: 14px; margin-top: 12px; }
|
||||
.specialcondolence-list-skeleton__card .van-skeleton__row:nth-child(2n) { width: 72% !important; }
|
||||
.specialcondolence-list-skeleton__card .van-skeleton__row:last-child { width: 34% !important; margin-top: 18px; margin-left: auto; }
|
||||
.specialcondolence-list-page .table-list-container { margin-top: 0; padding-bottom: 2px; }
|
||||
.specialcondolence-list-page .table-list-container .table-list-item { margin-bottom: 12px; padding: 14px; border: 1px solid #e9eff7; border-radius: 12px; box-shadow: 0 5px 16px rgba(43, 73, 112, .08); }
|
||||
.specialcondolence-card-header { display: flex; margin-bottom: 8px; align-items: flex-start; justify-content: space-between; }
|
||||
.specialcondolence-card-heading { min-width: 0; padding-right: 10px; flex: 1; }
|
||||
.specialcondolence-card-title { overflow: hidden; color: #253247; font-size: 15px; font-weight: 600; line-height: 22px; text-overflow: ellipsis; white-space: nowrap; }
|
||||
.specialcondolence-card-code { margin-top: 1px; color: #9ba6b6; font-size: 12px; line-height: 18px; }
|
||||
.specialcondolence-card-status { display: inline-flex; flex: none; }
|
||||
.specialcondolence-card-status .van-tag { min-height: 24px; padding: 3px 9px; border: 0; border-radius: 12px; box-sizing: border-box; font-size: 12px; line-height: 18px; }
|
||||
.specialcondolence-list-page .table-list-container .table-list-item .item-actions { margin-top: 10px; padding-top: 10px; border-top-color: #edf1f6; }
|
||||
.specialcondolence-list-page .table-list-container .table-list-item .action-btn { min-height: 28px; padding: 4px 11px; border-radius: 14px; color: #1989fa; background: #eaf4ff; font-size: 12px; line-height: 18px; }
|
||||
.specialcondolence-list-page .table-list-container .table-list-item .action-btn.delete { color: #f04444; background: #fff0f0; }
|
||||
.specialcondolence-list-page .table-list-container .table-list-item .action-btn i { margin-right: 5px; font-size: 13px; }
|
||||
.specialcondolence-list-page .empty-state { padding: 0; }
|
||||
.specialcondolence-list-empty { display: flex; min-height: 280px; padding: 46px 18px 36px; align-items: center; justify-content: center; box-sizing: border-box; flex-direction: column; text-align: center; }
|
||||
.specialcondolence-list-empty img { display: block; width: 86%; max-width: 290px; height: auto; object-fit: contain; }
|
||||
.specialcondolence-list-empty__title { margin-top: 14px; color: #50627a; font-size: 15px; font-weight: 600; line-height: 22px; }
|
||||
.specialcondolence-list-empty__hint { margin-top: 5px; color: #9aa7b8; font-size: 12px; line-height: 18px; }
|
||||
</style>
|
||||
|
||||
<style id="style-specialcondolence-info-h5">
|
||||
<!--#include("../common/info.css"){}#-->
|
||||
</style>
|
||||
|
||||
<div id="app">
|
||||
<div class="specialcondolence-list-page">
|
||||
<van-nav-bar title="校工会主席审批" left-text="返回" left-arrow @click-left="historyBack" fixed placeholder></van-nav-bar>
|
||||
|
||||
<van-sticky offset-top="46px">
|
||||
<div class="specialcondolence-list-sticky">
|
||||
<van-search
|
||||
v-model="pageForm.searchKeyword"
|
||||
class="specialcondolence-list-search"
|
||||
placeholder="请输入姓名或者工号搜索"
|
||||
shape="round"
|
||||
clearable
|
||||
@search="doSearch"
|
||||
@clear="doSearch"
|
||||
></van-search>
|
||||
<van-dropdown-menu class="specialcondolence-list-filter" :close-on-click-outside="false" :close-on-click-overlay="false">
|
||||
<year-van-dropdown-item :num="5" @change="doSearch" v-model="pageForm.year"></year-van-dropdown-item>
|
||||
<van-dropdown-item v-model="pageForm.type" :options="typeOptions" :multiple="false"
|
||||
@change="doSearch"></van-dropdown-item>
|
||||
<van-dropdown-item v-model="pageForm.approvalText" :options="approvalOptions" :multiple="false"
|
||||
@change="onApprovalFilterChange"></van-dropdown-item>
|
||||
</van-dropdown-menu>
|
||||
</div>
|
||||
</van-sticky>
|
||||
|
||||
<main class="specialcondolence-list-content">
|
||||
<div class="specialcondolence-list-skeleton" v-if="skeletonLoading">
|
||||
<div class="specialcondolence-list-skeleton__card" v-for="index in 3" :key="'school-union-approval-skeleton-' + index">
|
||||
<van-skeleton title :row="5" animated></van-skeleton>
|
||||
</div>
|
||||
</div>
|
||||
<table-list api="/platform/special_condolence/schoolUnionApproval/pageData" :page_form.sync="pageForm" ref="tableListRef"
|
||||
v-show="!skeletonLoading" :show_loading_overlay="false" @ready="onReady"
|
||||
@loading-change="handleListLoadingChange">
|
||||
<template #header="{index,row}">
|
||||
<div class="specialcondolence-card-header">
|
||||
<div class="specialcondolence-card-heading">
|
||||
<div class="specialcondolence-card-title">{{row.helpUserName || '--'}}</div>
|
||||
<div class="specialcondolence-card-code">工号:{{row.helpLoginName || '--'}}</div>
|
||||
</div>
|
||||
<enum-tag class="specialcondolence-card-status" v-if="row.instanceState" :value="row.instanceState"
|
||||
name="ProcessInstanceStateEnum" label_key="message" size="small"></enum-tag>
|
||||
</div>
|
||||
</template>
|
||||
<template v-slot="{index,row}">
|
||||
<table-column label="慰问对象">{{row.helpUserName}}</table-column>
|
||||
<table-column label="慰问对象工号">{{row.helpLoginName}}</table-column>
|
||||
<table-column label="申请人">{{row.applyUserName}}</table-column>
|
||||
<table-column label="所属工会">{{row.applyUnionName}}</table-column>
|
||||
<table-column label="所属单位">{{row.applyUnitName}}</table-column>
|
||||
<table-column label="慰问类型">{{row.typeName}}</table-column>
|
||||
<table-column label="当前节点">{{row.curTaskName}}</table-column>
|
||||
</template>
|
||||
<template #actions="{index,row}">
|
||||
<div class="action-btn" @click="onView(row)">
|
||||
<van-icon name="eye-o"></van-icon>
|
||||
<span>查看</span>
|
||||
</div>
|
||||
<div class="action-btn" v-if="row.taskState === 10" @click="onApproval(row)">
|
||||
<van-icon name="edit"></van-icon>
|
||||
<span>审核</span>
|
||||
</div>
|
||||
<div class="action-btn delete" v-if="row.canRevoke" @click="onRevoke(row)">
|
||||
<van-icon name="revoke"></van-icon>
|
||||
<span>撤回</span>
|
||||
</div>
|
||||
</template>
|
||||
<template #empty>
|
||||
<div class="specialcondolence-list-empty">
|
||||
<img src="/assets/mobile/img/condolence/condolence-empty.png" alt="暂无慰问审核记录插画">
|
||||
<div class="specialcondolence-list-empty__title">暂无慰问审核记录</div>
|
||||
<div class="specialcondolence-list-empty__hint">当前筛选条件下暂时没有慰问申请</div>
|
||||
</div>
|
||||
</template>
|
||||
</table-list>
|
||||
</main>
|
||||
|
||||
<info ref="infoRef" page-key="specialcondolence-school-union-detail">
|
||||
<div v-if="showApprovalForm">
|
||||
<section class="specialcondolence-info-card">
|
||||
<h2 class="specialcondolence-info-card__title">
|
||||
审批意见<span class="specialcondolence-audit-card__required">*</span>
|
||||
</h2>
|
||||
<van-form ref="formRef">
|
||||
<van-field
|
||||
v-model="formData.tf_opinion"
|
||||
class="specialcondolence-audit-field"
|
||||
name="tf_opinion"
|
||||
type="textarea"
|
||||
rows="6"
|
||||
placeholder="请输入审批意见"
|
||||
:rules="[{ required: true, message: '请填写审批意见' }]"
|
||||
maxlength="100"
|
||||
show-word-limit
|
||||
></van-field>
|
||||
<h2 class="specialcondolence-info-card__title">
|
||||
审批签字<span class="specialcondolence-audit-card__required">*</span>
|
||||
</h2>
|
||||
<van-field name="tf_sign" :value="formData.tf_sign" :rules="[{required:true,message:'请完成审批签字'}]">
|
||||
<template #input><h5-signature v-model="formData.tf_sign" :key="formData.processTaskId"></h5-signature></template>
|
||||
</van-field>
|
||||
</van-form>
|
||||
</section>
|
||||
<div class="specialcondolence-popup-actions">
|
||||
<van-button class="specialcondolence-action-danger" type="danger" block :loading="formLoading" @click="handleTaskAction(6)">退回</van-button>
|
||||
<van-button class="specialcondolence-action-danger" type="danger" block :loading="formLoading" @click="handleTaskAction(2)">不同意</van-button>
|
||||
<van-button class="specialcondolence-action-primary" type="primary" block :loading="formLoading" @click="handleTaskAction(1)">同意</van-button>
|
||||
</div>
|
||||
</div>
|
||||
</info>
|
||||
<van-dialog
|
||||
:value="confirmVisible"
|
||||
title="提示"
|
||||
:message="confirmActionType === 'revoke' ? '您确定要撤回吗?' : '您确定要提交吗?'"
|
||||
show-cancel-button
|
||||
confirm-button-color="#1989fa"
|
||||
@confirm="confirmPendingAction"
|
||||
@cancel="closeActionConfirm"
|
||||
></van-dialog>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script nonce="${cspNonce!}">
|
||||
<!--#include('../common/info.js'){}#-->
|
||||
new Vue({
|
||||
el: "#app",
|
||||
store,
|
||||
components: {
|
||||
info: specialcondolenceInfo
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
pageForm: {
|
||||
pageNumber: 1,
|
||||
pageSize: 10,
|
||||
totalCount: 0,
|
||||
searchKeyword: '',
|
||||
approvalText: "0",
|
||||
approval: false,
|
||||
year: new Date().getFullYear(),
|
||||
type: null,
|
||||
},
|
||||
typeOptions: [],
|
||||
approvalOptions: [
|
||||
{text: "未审核", value: "0"},
|
||||
{text: "已审核", value: "1"}
|
||||
],
|
||||
skeletonLoading: true,
|
||||
formData: {},
|
||||
showApprovalForm: false,
|
||||
formLoading: false,
|
||||
confirmVisible: false,
|
||||
confirmActionType: "task",
|
||||
pendingSubmitType: null,
|
||||
pendingRevokeRow: null,
|
||||
historyLayerUnsubscribe: null
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// state.initial 表示当前查询前列表为空,仅此阶段使用整组卡片骨架屏。
|
||||
handleListLoadingChange(state) {
|
||||
if (state.initial) this.$set(this, "skeletonLoading", state.loading)
|
||||
},
|
||||
// 审核状态下拉值为字符串,接口参数 approval 继续使用布尔值。
|
||||
onApprovalFilterChange(val) {
|
||||
this.$set(this.pageForm, "approval", val === "1")
|
||||
this.doSearch()
|
||||
},
|
||||
onReady() {
|
||||
this.querySpecialCondolenceType()
|
||||
},
|
||||
onView(row) {
|
||||
this.$set(this, "showApprovalForm", false)
|
||||
this.$refs.infoRef.onOpen(row, "慰问详情")
|
||||
},
|
||||
onApproval(row) {
|
||||
this.$set(this, "showApprovalForm", true)
|
||||
this.$set(this, "formData", {
|
||||
processTaskId: row.taskId,
|
||||
taskName: row.curTaskName,
|
||||
tf_sign: "",
|
||||
tf_opinion: ""
|
||||
})
|
||||
this.$refs.infoRef.onOpen(row, row.curTaskName || "慰问审核")
|
||||
},
|
||||
// val 为流程提交类型:1 同意、20 不同意、6 退回;校验通过后打开历史栈确认框。
|
||||
handleTaskAction(val) {
|
||||
this.$refs.formRef.validate()
|
||||
.then(() => {
|
||||
this.$set(this, "confirmActionType", "task")
|
||||
this.$set(this, "pendingSubmitType", val)
|
||||
if (window.h5HistoryLayerManager && window.h5HistoryLayerManager.open("specialcondolence-action-confirm")) return
|
||||
this.$set(this, "confirmVisible", true)
|
||||
})
|
||||
.catch(() => {})
|
||||
},
|
||||
// 确认操作时先回退确认框历史,再根据操作类型调用办理或撤回接口。
|
||||
confirmPendingAction() {
|
||||
this.closeActionConfirm(() => {
|
||||
if (this.confirmActionType === "revoke") {
|
||||
this.revokeTask()
|
||||
return
|
||||
}
|
||||
this.submitTaskAction()
|
||||
})
|
||||
},
|
||||
// 提交 processTaskId、taskName、tf_opinion、tf_sign 和 submitType,接口返回统一响应对象。
|
||||
submitTaskAction() {
|
||||
this.$set(this, "formLoading", true)
|
||||
this.$axios.post("/platform/special_condolence/approval/executeTask", {
|
||||
data: JSON.stringify({
|
||||
...this.formData,
|
||||
submitType: this.pendingSubmitType
|
||||
})
|
||||
})
|
||||
.then((res) => {
|
||||
if (res && res.code === 0) {
|
||||
const afterClose = () => {
|
||||
this.$toast.success(res.msg)
|
||||
this.doSearch()
|
||||
}
|
||||
if (window.h5HistoryLayerManager && window.h5HistoryLayerManager.closeAll(afterClose)) return
|
||||
this.$refs.infoRef.onClose(afterClose)
|
||||
}
|
||||
})
|
||||
.finally(() => {
|
||||
this.$set(this, "formLoading", false)
|
||||
})
|
||||
},
|
||||
closeActionConfirm(afterClose = null) {
|
||||
if (window.h5HistoryLayerManager && window.h5HistoryLayerManager.close("specialcondolence-action-confirm", afterClose)) return
|
||||
this.$set(this, "confirmVisible", false)
|
||||
if (typeof afterClose === "function") afterClose()
|
||||
},
|
||||
// row 提供待撤回任务 taskId,确认后保存当前行并由统一确认框执行撤回。
|
||||
onRevoke(row){
|
||||
this.$set(this, "confirmActionType", "revoke")
|
||||
this.$set(this, "pendingRevokeRow", row)
|
||||
if (window.h5HistoryLayerManager && window.h5HistoryLayerManager.open("specialcondolence-action-confirm")) return
|
||||
this.$set(this, "confirmVisible", true)
|
||||
},
|
||||
// 使用 pendingRevokeRow.taskId 撤回任务,接口返回统一响应对象。
|
||||
revokeTask() {
|
||||
if (!this.pendingRevokeRow) return
|
||||
this.$set(this, "formLoading", true)
|
||||
this.$axios.post("/flow/common/revokeTask", {taskId: this.pendingRevokeRow.taskId})
|
||||
.then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$toast.success(res.msg)
|
||||
this.doSearch()
|
||||
}
|
||||
})
|
||||
.finally(() => {
|
||||
this.$set(this, "formLoading", false)
|
||||
})
|
||||
},
|
||||
querySpecialCondolenceType() {
|
||||
this.$axios.post('/platform/special_condolence/type/querySpecialCondolenceType', {}, {h5SkeletonLoading: true})
|
||||
.then((res) => {
|
||||
const typeList = res.data || []
|
||||
this.$set(this, "typeOptions", [
|
||||
{
|
||||
text: "全部慰问类型",
|
||||
value: null
|
||||
}
|
||||
].concat(typeList.map((v) => ({ text: v.name, value: v.id }))))
|
||||
if (this.typeOptions.length > 0) {
|
||||
this.$set(this.pageForm, "type", this.typeOptions[0].value)
|
||||
this.doSearch()
|
||||
}
|
||||
})
|
||||
},
|
||||
doSearch() {
|
||||
this.$nextTick(() => {
|
||||
this.pageForm.pageNumber = 1
|
||||
this.pageForm.totalCount = 0
|
||||
this.$refs.tableListRef.doSearch()
|
||||
})
|
||||
}
|
||||
},
|
||||
created() {
|
||||
if (!window.h5HistoryLayerManager) return
|
||||
this.$set(this, "historyLayerUnsubscribe", window.h5HistoryLayerManager.subscribe((stack) => {
|
||||
this.$set(this, "confirmVisible", stack.includes("specialcondolence-action-confirm"))
|
||||
}))
|
||||
},
|
||||
beforeDestroy() {
|
||||
if (typeof this.historyLayerUnsubscribe === "function") this.historyLayerUnsubscribe()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
Reference in New Issue
Block a user