first commit
This commit is contained in:
@@ -0,0 +1,523 @@
|
||||
<!--#
|
||||
layout("/layouts/platform_h5.html"){
|
||||
#-->
|
||||
|
||||
<style scoped>
|
||||
.search-dialog {
|
||||
height: 80%;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div id="app">
|
||||
<!-- 导航栏 -->
|
||||
<van-nav-bar title="职工慰问申请" left-text="返回" left-arrow @click-left="historyBack" fixed placeholder></van-nav-bar>
|
||||
|
||||
<!-- 表单容器 -->
|
||||
<van-form ref="formRef" class="form-container">
|
||||
|
||||
<!-- 基本信息 -->
|
||||
<van-cell-group title="基本信息" class="form-section">
|
||||
<van-field label="申请人姓名" :rules="[{ required: true }]" v-model="formData.applyUserName" readonly
|
||||
required name="applyUserName"></van-field>
|
||||
<van-field label="申请人工号" :rules="[{ required: true }]" v-model="formData.applyLoginName" readonly
|
||||
required name="applyLoginName"></van-field>
|
||||
<van-field label="申请人单位" :rules="[{ required: true }]" v-model="formData.applyUnitName" readonly
|
||||
required name="applyUnitName"></van-field>
|
||||
<van-field label="申请人工会" :rules="[{ required: true }]" v-model="formData.applyUnionName" readonly
|
||||
required name="applyUnionName"></van-field>
|
||||
|
||||
<van-field
|
||||
v-model="formData.helpUserName"
|
||||
name="helpUserName"
|
||||
label="慰问对象"
|
||||
required
|
||||
readonly
|
||||
:rules="[{ required: true }]"
|
||||
placeholder="请点击选择慰问对象"
|
||||
@click="helpUserSelectShow = true"
|
||||
is-link
|
||||
></van-field>
|
||||
<van-action-sheet v-model="helpUserSelectShow" title="慰问对象" class="height100">
|
||||
<van-search
|
||||
v-model="searchKeyword"
|
||||
:show-action="false"
|
||||
:reverse-color="false"
|
||||
input-align="left"
|
||||
placeholder="请输入工号或姓名选择慰问对象"
|
||||
@input="(val) => {userRemoteMethod(val, 'help')}"
|
||||
@clear="(val) => {userRemoteMethod(val, 'help')}"
|
||||
shape="round"
|
||||
></van-search>
|
||||
<div class="van-action-sheet__content mt5" v-if="userOptions && userOptions.length>0">
|
||||
<template>
|
||||
<template v-for="item in userOptions">
|
||||
<van-button native-type="button" @click="helpUserChange(item)" class="van-action-sheet__item van-hairline--bottom">
|
||||
<span class="van-action-sheet__name">{{item.userName}}({{item.loginName}})</span>
|
||||
</van-button>
|
||||
</template>
|
||||
</template>
|
||||
</div>
|
||||
<van-empty description="暂无数据" v-else></van-empty>
|
||||
</van-action-sheet>
|
||||
|
||||
<van-field
|
||||
v-model="formData.handlerUserName"
|
||||
name="handlerUserName"
|
||||
label="经办人"
|
||||
required
|
||||
readonly
|
||||
:rules="[{ required: true }]"
|
||||
placeholder="请点击选择经办人"
|
||||
@click="handlerUserSelectShow = true"
|
||||
is-link
|
||||
></van-field>
|
||||
<van-action-sheet v-model="handlerUserSelectShow" title="经办人" class="height100">
|
||||
<van-search
|
||||
v-model="searchKeyword"
|
||||
:show-action="false"
|
||||
:reverse-color="false"
|
||||
input-align="left"
|
||||
placeholder="请输入工号或姓名选择经办人"
|
||||
@input="(val) => {userRemoteMethod(val, 'handler')}"
|
||||
@clear="(val) => {userRemoteMethod(val, 'handler')}"
|
||||
shape="round"
|
||||
></van-search>
|
||||
<div class="van-action-sheet__content mt5" v-if="userOptions && userOptions.length>0">
|
||||
<template>
|
||||
<template v-for="item in userOptions">
|
||||
<van-button native-type="button" @click="handlerUserChange(item)" class="van-action-sheet__item van-hairline--bottom">
|
||||
<span class="van-action-sheet__name">{{item.userName}}({{item.loginName}})</span>
|
||||
</van-button>
|
||||
</template>
|
||||
</template>
|
||||
</div>
|
||||
<van-empty description="暂无数据" v-else></van-empty>
|
||||
</van-action-sheet>
|
||||
|
||||
<van-field
|
||||
v-model="formData.certifierUserName"
|
||||
name="certifierUserName"
|
||||
label="证明人"
|
||||
required
|
||||
readonly
|
||||
:rules="[{ required: true }]"
|
||||
placeholder="请点击选择证明人"
|
||||
@click="certifierUserSelectShow = true"
|
||||
is-link
|
||||
></van-field>
|
||||
<van-action-sheet v-model="certifierUserSelectShow" title="证明人" class="height100">
|
||||
<van-search
|
||||
v-model="searchKeyword"
|
||||
:show-action="false"
|
||||
:reverse-color="false"
|
||||
input-align="left"
|
||||
placeholder="请输入工号或姓名选择证明人"
|
||||
@input="(val) => {userRemoteMethod(val, 'certifier')}"
|
||||
@clear="(val) => {userRemoteMethod(val, 'certifier')}"
|
||||
shape="round"
|
||||
></van-search>
|
||||
<div class="van-action-sheet__content mt5" v-if="userOptions && userOptions.length>0">
|
||||
<template>
|
||||
<template v-for="item in userOptions">
|
||||
<van-button native-type="button" @click="certifierUserChange(item)" class="van-action-sheet__item van-hairline--bottom">
|
||||
<span class="van-action-sheet__name">{{item.userName}}({{item.loginName}})</span>
|
||||
</van-button>
|
||||
</template>
|
||||
</template>
|
||||
</div>
|
||||
<van-empty description="暂无数据" v-else></van-empty>
|
||||
</van-action-sheet>
|
||||
|
||||
<van-field
|
||||
v-model="formData.typeName"
|
||||
name="typeName"
|
||||
label="慰问类型"
|
||||
required
|
||||
readonly
|
||||
:rules="[{ required: true }]"
|
||||
placeholder="请点击选择慰问类型"
|
||||
@click="showTypePicker = true"
|
||||
clickable
|
||||
is-link
|
||||
></van-field>
|
||||
<van-popup position="bottom" round v-model:show="showTypePicker">
|
||||
<van-picker :columns="typeColumns" @cancel="showTypePicker = false" @confirm="onTypeConfirm" show-toolbar></van-picker>
|
||||
</van-popup>
|
||||
|
||||
<!--<van-field
|
||||
v-model="formData.way"
|
||||
name="way"
|
||||
label="慰问方式"
|
||||
required
|
||||
readonly
|
||||
:rules="[{ required: true }]"
|
||||
placeholder="请选择慰问类型"
|
||||
clickable
|
||||
></van-field>-->
|
||||
<van-field
|
||||
v-model="formData.money"
|
||||
name="money"
|
||||
label="慰问金额"
|
||||
required
|
||||
:rules="[{ required: true }]"
|
||||
placeholder="选择慰问类型自动匹配金额"
|
||||
clickable
|
||||
type="number"
|
||||
></van-field>
|
||||
|
||||
<van-field
|
||||
v-model="formData.occurTime"
|
||||
name="occurTime"
|
||||
label="慰问时间"
|
||||
required
|
||||
:rules="[{ required: true }]"
|
||||
placeholder="请点击选择慰问时间"
|
||||
clickable
|
||||
is-link
|
||||
readonly
|
||||
@click="showTimePicker = true"
|
||||
></van-field>
|
||||
<van-popup position="bottom" round v-model:show="showTimePicker">
|
||||
<van-datetime-picker
|
||||
v-model="formData.occurTime"
|
||||
type="date"
|
||||
title="请选择慰问时间"
|
||||
@confirm="(val) => {formData.occurTime = $moment(val).format('YYYY-MM-DD'); showTimePicker = false}"
|
||||
@cancel="showTimePicker = false"
|
||||
></van-datetime-picker>
|
||||
</van-popup>
|
||||
|
||||
<van-field
|
||||
v-model="formData.bankCardNum"
|
||||
label="收款账户"
|
||||
maxlength="20"
|
||||
clearable
|
||||
name="bankCardNum"
|
||||
placeholder="请填写收款账户"
|
||||
:rules="[{ required: true }]"
|
||||
required
|
||||
></van-field>
|
||||
|
||||
<van-field
|
||||
v-model="formData.bankUserName"
|
||||
label="户名"
|
||||
type="number"
|
||||
placeholder="请填写户名"
|
||||
:rules="[{ required: true }]"
|
||||
required
|
||||
name="bankUserName"
|
||||
></van-field>
|
||||
<van-field
|
||||
v-model="formData.bankOfDeposit"
|
||||
label="开户行"
|
||||
type="number"
|
||||
placeholder="请填写开户行"
|
||||
:rules="[{ required: true }]"
|
||||
required
|
||||
name="bankOfDeposit"
|
||||
></van-field>
|
||||
|
||||
|
||||
<!-- <van-field
|
||||
v-if="['2'].includes(formData.typeCode)"
|
||||
v-model="formData.child"
|
||||
name="child"
|
||||
label="孩次"
|
||||
required
|
||||
:rules="[{ required: true }]"
|
||||
placeholder="请点击选择孩次"
|
||||
clickable
|
||||
is-link
|
||||
readonly
|
||||
@click="showChildPicker = true"
|
||||
></van-field>
|
||||
<van-popup position="bottom" round v-model:show="showChildPicker">
|
||||
<van-picker
|
||||
title="请选择孩次"
|
||||
show-toolbar
|
||||
:columns="['一孩', '二孩', '三孩']"
|
||||
@confirm="(val) => {formData.child = val; showChildPicker = false}"
|
||||
@cancel="showChildPicker = false"
|
||||
></van-picker>
|
||||
</van-popup>-->
|
||||
|
||||
<template v-if="['2'].includes(formData.typeCode)">
|
||||
<van-field
|
||||
v-model="formData.hospitalizationTime"
|
||||
name="hospitalizationTime"
|
||||
label="入院时间"
|
||||
required
|
||||
:rules="[{ required: true }]"
|
||||
placeholder="请点击选择入院时间"
|
||||
clickable
|
||||
is-link
|
||||
readonly
|
||||
@click="showHospitalizationTimePicker = true"
|
||||
></van-field>
|
||||
<van-popup position="bottom" round v-model:show="showHospitalizationTimePicker">
|
||||
<van-datetime-picker
|
||||
v-model="formData.hospitalizationTime"
|
||||
type="date"
|
||||
:min-date="minDate"
|
||||
:max-date="maxDate"
|
||||
title="请选择入院时间"
|
||||
@confirm="(val) => {formData.hospitalizationTime = $moment(val).format('YYYY-MM-DD'); showHospitalizationTimePicker = false}"
|
||||
@cancel="showHospitalizationTimePicker = false"
|
||||
></van-datetime-picker>
|
||||
</van-popup>
|
||||
</template>
|
||||
|
||||
<van-field
|
||||
v-model="formData.remark"
|
||||
name="remark"
|
||||
label="申请事由"
|
||||
type="textarea"
|
||||
rows="4"
|
||||
autosize
|
||||
placeholder="请输入申请事由"
|
||||
:rules="[{ required: true }]"
|
||||
required
|
||||
></van-field>
|
||||
</van-cell-group>
|
||||
|
||||
<van-cell-group class="form-section" v-if="chooseType.isUploadFile === true">
|
||||
<template #title>
|
||||
<span>附件</span>
|
||||
<span v-if="chooseType.isUploadFile && chooseType.uploadFileDesc" style="color: orangered">
|
||||
{{ '(附件说明:' + chooseType.uploadFileDesc + ')' }}
|
||||
</span>
|
||||
</template>
|
||||
<van-field class="direction-column-field" name="avatar" label="">
|
||||
<template #input>
|
||||
<h5-file-upload
|
||||
slot="input"
|
||||
:value.sync="formData.files"
|
||||
:upload_number="5"
|
||||
upload_result_category="array"
|
||||
complete_result
|
||||
></h5-file-upload>
|
||||
</template>
|
||||
</van-field>
|
||||
</van-cell-group>
|
||||
|
||||
<van-cell-group title="签字" class="form-section">
|
||||
<van-field class="direction-column-field" name="signature" label="">
|
||||
<template #input>
|
||||
<h5-signature v-model="formData.signature" slot="input"></h5-signature>
|
||||
</template>
|
||||
</van-field>
|
||||
</van-cell-group>
|
||||
|
||||
<!-- 提交按钮 -->
|
||||
<div class="form-actions">
|
||||
<van-button native-type="button" @click="onSave" round type="info" plain>保存申请</van-button>
|
||||
<van-button @click="onSubmit" round type="info" v-if="!taskId">提交申请</van-button>
|
||||
<van-button @click="onFinishTask" round type="info" v-else>提交申请</van-button>
|
||||
</div>
|
||||
</van-form>
|
||||
</div>
|
||||
|
||||
<script nonce="${cspNonce!}">
|
||||
const vue = new Vue({
|
||||
el: "#app",
|
||||
store,
|
||||
components: {},
|
||||
data() {
|
||||
return {
|
||||
bizId: GetQueryString("bizId"),
|
||||
taskId: GetQueryString("taskId"),
|
||||
formData: {},
|
||||
|
||||
chooseType: {},
|
||||
userOptions: [],
|
||||
typeOptions: [],
|
||||
|
||||
helpUserSelectShow: false,
|
||||
payUserSelectShow: false,
|
||||
showTypePicker: false,
|
||||
typeColumns: [],
|
||||
searchKeyword: '',
|
||||
|
||||
showTimePicker: false,
|
||||
showChildPicker: false,
|
||||
showFamilyPicker: false,
|
||||
|
||||
certifierUserSelectShow:false,
|
||||
handlerUserSelectShow:false,
|
||||
|
||||
showHospitalizationTimePicker:false,
|
||||
minDate: new Date(2024, 0, 1),
|
||||
maxDate: new Date(),
|
||||
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
//经办人
|
||||
handlerUserChange(user){
|
||||
const { id, userName, loginName, unitId, unitName, unionId, unionName } = user
|
||||
this.$set(this.formData, "handlerUserId", id)
|
||||
this.$set(this.formData, "handlerUserName", userName)
|
||||
this.$set(this.formData, "handlerLoginName", loginName)
|
||||
this.$set(this.formData, "handlerUnitId", unitId)
|
||||
this.$set(this.formData, "handlerUnitName", unitName)
|
||||
this.$set(this.formData, "handlerUnionId", unionId)
|
||||
this.$set(this.formData, "handlerUnionName", unionName)
|
||||
this.handlerUserSelectShow = false
|
||||
this.searchKeyword = ''
|
||||
this.userOptions = []
|
||||
},
|
||||
//证明人
|
||||
certifierUserChange(user){
|
||||
const { id, userName, loginName, unitId, unitName, unionId, unionName } = user
|
||||
this.$set(this.formData, "certifierUserId", id)
|
||||
this.$set(this.formData, "certifierUserName", userName)
|
||||
this.$set(this.formData, "certifierLoginName", loginName)
|
||||
this.$set(this.formData, "certifierUnitId", unitId)
|
||||
this.$set(this.formData, "certifierUnitName", unitName)
|
||||
this.$set(this.formData, "certifierUnionId", unionId)
|
||||
this.$set(this.formData, "certifierUnionName", unionName)
|
||||
this.certifierUserSelectShow = false
|
||||
this.searchKeyword = ''
|
||||
this.userOptions = []
|
||||
},
|
||||
async userRemoteMethod(event, type) {
|
||||
if (event) {
|
||||
this.userOptions = await this.selectQueryUser(event)
|
||||
if (type === 'help'){
|
||||
this.helpUserSelectShow = true
|
||||
}else if (type === 'certifier'){
|
||||
this.certifierUserSelectShow = true
|
||||
}else if (type === 'handler'){
|
||||
this.handlerUserSelectShow = true
|
||||
}
|
||||
}
|
||||
},
|
||||
async selectQueryUser(keyword) {
|
||||
const res = await this.$axios.post("/platform/condolence/apply/listUser", { keyword: keyword })
|
||||
return res.data
|
||||
},
|
||||
helpUserChange(user) {
|
||||
const { id, userName, loginName, unitId, unitName, unionId, unionName } = user
|
||||
this.$set(this.formData, "helpUserId", id)
|
||||
this.$set(this.formData, "helpUserName", userName)
|
||||
this.$set(this.formData, "helpLoginName", loginName)
|
||||
this.$set(this.formData, "helpUnitId", unitId)
|
||||
this.$set(this.formData, "helpUnitName", unitName)
|
||||
this.$set(this.formData, "helpUnionId", unionId)
|
||||
this.$set(this.formData, "helpUnionName", unionName)
|
||||
this.helpUserSelectShow = false
|
||||
this.searchKeyword = ''
|
||||
this.userOptions = []
|
||||
},
|
||||
payUserChange(user) {
|
||||
const { id, userName, loginName } = user
|
||||
this.$set(this.formData, "payUserId", id)
|
||||
this.$set(this.formData, "payUserName", userName)
|
||||
this.$set(this.formData, "payLoginName", loginName)
|
||||
this.payUserSelectShow = false
|
||||
this.searchKeyword = ''
|
||||
this.userOptions = []
|
||||
},
|
||||
typeChange(id) {
|
||||
this.chooseType = this.typeOptions.find(o => o.id === id)
|
||||
if (this.chooseType) {
|
||||
this.$set(this.formData, "money", this.chooseType.money)
|
||||
this.$set(this.formData, "way", this.chooseType.way)
|
||||
this.$set(this.formData, "typeCode", this.chooseType.code)
|
||||
}
|
||||
},
|
||||
onTypeConfirm(o) {
|
||||
this.$set(this.formData, "typeName", o.text)
|
||||
this.$set(this.formData, "type", o.value)
|
||||
this.typeChange(o.value)
|
||||
this.showTypePicker = false
|
||||
},
|
||||
onSave() {
|
||||
this.$dialog.confirm({
|
||||
title: "提示",
|
||||
message: "您确定保存吗?"
|
||||
}).then(() => {
|
||||
this.$axios.post("/platform/condolence/apply/save", { data: JSON.stringify(this.formData) }).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.$toast(res.msg)
|
||||
this.$pjaxReplace("/platform/condolence/mine/h5")
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
async onSubmit() {
|
||||
this.$refs.formRef.validate().then(() => {
|
||||
this.$dialog.confirm({
|
||||
title: "提示",
|
||||
message: "您确定要提交申请吗?"
|
||||
}).then(() => {
|
||||
this.$axios.post("/platform/condolence/apply/submit", { data: JSON.stringify(this.formData) }).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.$toast(res.msg)
|
||||
this.$pjaxReplace("/platform/condolence/mine/h5")
|
||||
}
|
||||
})
|
||||
})
|
||||
})
|
||||
},
|
||||
async onFinishTask() {
|
||||
this.$refs.formRef.validate().then(() => {
|
||||
this.$dialog.confirm({
|
||||
title: "提示",
|
||||
message: "您确定要提交申请吗?"
|
||||
}).then(() => {
|
||||
this.$axios.post("/platform/condolence/apply/submitAgain", {
|
||||
data: JSON.stringify(this.formData),
|
||||
taskId: GetQueryString("taskId")
|
||||
}).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.$toast(res.msg)
|
||||
this.$pjaxReplace("/platform/condolence/mine/h5")
|
||||
}
|
||||
})
|
||||
})
|
||||
})
|
||||
},
|
||||
init() {
|
||||
if (this.bizId) {
|
||||
this.$axios.post("/platform/condolence/mine/info", { id: this.bizId }).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.formData = res.data
|
||||
this.selectQueryUser(this.formData.helpLoginName, this.helpUserOptions)
|
||||
this.selectQueryUser(this.formData.payLoginName, this.payUserOptions)
|
||||
this.chooseType = this.typeOptions.find(o => o.id === this.formData.type)
|
||||
}
|
||||
})
|
||||
} else {
|
||||
const { username, loginname, id, unit, union, mobile } = this.$store.state.user
|
||||
this.formData = {
|
||||
applyUserName: username,
|
||||
applyLoginName: loginname,
|
||||
applyUserId: id,
|
||||
applyUnitId: unit?.id,
|
||||
applyUnitName: unit?.name,
|
||||
applyUnionId: union?.id,
|
||||
applyUnionName: union?.name,
|
||||
}
|
||||
}
|
||||
},
|
||||
queryCondolenceType() {
|
||||
this.$axios.post('/platform/condolence/type/queryCondolenceType')
|
||||
.then((res) => {
|
||||
this.typeOptions = JSON.parse(JSON.stringify(res.data))
|
||||
res.data.forEach((v) => {
|
||||
this.typeColumns.push({ value: v.id, text: v.name + "(" + v.code + ")" })
|
||||
})
|
||||
})
|
||||
},
|
||||
},
|
||||
created() {
|
||||
this.queryCondolenceType()
|
||||
this.init()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
+190
@@ -0,0 +1,190 @@
|
||||
<!--#
|
||||
layout("/layouts/platform_h5.html"){
|
||||
#-->
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
|
||||
<div id="app">
|
||||
<van-nav-bar title="分工会审核" left-text="返回" left-arrow @click-left="historyBack" fixed placeholder></van-nav-bar>
|
||||
|
||||
<van-sticky offset-top="46px">
|
||||
<van-search
|
||||
v-model="pageForm.searchKeyword"
|
||||
:show-action="false"
|
||||
:reverse-color="false"
|
||||
input-align="left"
|
||||
placeholder="请输入姓名或者工号搜索"
|
||||
@search="doSearch"
|
||||
></van-search>
|
||||
<van-dropdown-menu :close-on-click-outside="false" :close-on-click-overlay="false">
|
||||
<year-van-dropdown-item :num="5" @change="doSearch" v-model="pageForm.year"></year-van-dropdown-item>
|
||||
<van-dropdown-item v-model="pageForm.type" :options="typeOptions" :multiple="false"
|
||||
@change="doSearch"></van-dropdown-item>
|
||||
</van-dropdown-menu>
|
||||
<van-tabs v-model="pageForm.approvalText"
|
||||
@change="(val)=>{this.pageForm.approval = val==='1';this.doSearch();}">
|
||||
<van-tab title="已审核" name="1"></van-tab>
|
||||
<van-tab title="未审核" name="0"></van-tab>
|
||||
</van-tabs>
|
||||
</van-sticky>
|
||||
|
||||
<table-list api="/platform/condolence/branchUnionApproval/pageData" :page_form.sync="pageForm" ref="tableListRef" @ready="onReady">
|
||||
<template v-slot="{index,row}">
|
||||
<table-column label="慰问对象">{{row.helpUserName}}</table-column>
|
||||
<table-column label="慰问对象工号">{{row.helpLoginName}}</table-column>
|
||||
<table-column label="申请人">{{row.applyUserName}}</table-column>
|
||||
<table-column label="所属工会">{{row.applyUnionName}}</table-column>
|
||||
<table-column label="所属单位">{{row.applyUnitName}}</table-column>
|
||||
<table-column label="慰问类型">{{row.typeName}}</table-column>
|
||||
<table-column label="当前节点">{{row.curTaskName}}</table-column>
|
||||
</template>
|
||||
<template #actions="{index,row}">
|
||||
<div class="action-btn" @click="onView(row)">
|
||||
<i class="fa fa-eye"></i>
|
||||
<span>查看</span>
|
||||
</div>
|
||||
<div class="action-btn" v-if="row.taskState === 10" @click="onApproval(row)">
|
||||
<i class="fa fa-edit"></i>
|
||||
<span>审核</span>
|
||||
</div>
|
||||
<div class="action-btn delete" v-if="row.canRevoke" @click="onRevoke(row)">
|
||||
<i class="fa fa-reply"></i>
|
||||
<span>撤回</span>
|
||||
</div>
|
||||
</template>
|
||||
</table-list>
|
||||
|
||||
<info ref="infoRef">
|
||||
<div v-if="showApprovalForm">
|
||||
<div class="process-title">{{formData.taskName}}</div>
|
||||
<van-form ref="formRef">
|
||||
<van-field
|
||||
v-model="formData.tf_opinion"
|
||||
name="tf_opinion"
|
||||
label="审批意见"
|
||||
placeholder="请输入审批意见"
|
||||
:rules="[{ required: true, message: '请填写审批意见' }]"
|
||||
required
|
||||
maxlength="100"
|
||||
show-word-limit
|
||||
></van-field>
|
||||
</van-form>
|
||||
<div style="display: flex; justify-content: space-between; column-gap: 10px; padding: 10px">
|
||||
<van-button type="danger" block @click="handleTaskAction(6)">退回</van-button>
|
||||
<van-button type="danger" block @click="handleTaskAction(20)">不同意</van-button>
|
||||
<van-button type="primary" block @click="handleTaskAction(1)">同意</van-button>
|
||||
</div>
|
||||
</div>
|
||||
</info>
|
||||
</div>
|
||||
|
||||
<script nonce="${cspNonce!}">
|
||||
<!--#include('../common/info.js'){}#-->
|
||||
new Vue({
|
||||
el: "#app",
|
||||
store,
|
||||
components: {
|
||||
info: condolenceInfo
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
pageForm: {
|
||||
pageNumber: 1,
|
||||
pageSize: 10,
|
||||
totalCount: 0,
|
||||
searchKeyword: '',
|
||||
approvalText: "0",
|
||||
approval: false,
|
||||
year: new Date().getFullYear(),
|
||||
type: null,
|
||||
},
|
||||
typeOptions: [],
|
||||
formData: {},
|
||||
showApprovalForm: false
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async onReady() {
|
||||
const typeList = await this.queryCondolenceType()
|
||||
this.typeOptions = [
|
||||
{
|
||||
text: "全部慰问类型",
|
||||
value: null
|
||||
}
|
||||
].concat(typeList.map((v) => ({ text: v.name, value: v.id })))
|
||||
if (this.typeOptions.length > 0) {
|
||||
this.pageForm.type = this.typeOptions[0].value
|
||||
this.doSearch()
|
||||
}
|
||||
},
|
||||
onView(row) {
|
||||
this.showApprovalForm = false
|
||||
this.$refs.infoRef.onOpen(row)
|
||||
},
|
||||
onApproval(row) {
|
||||
this.showApprovalForm = true
|
||||
this.$refs.infoRef.onOpen(row)
|
||||
this.formData = {
|
||||
processTaskId: row.taskId,
|
||||
taskName: row.curTaskName
|
||||
}
|
||||
},
|
||||
async handleTaskAction(val) {
|
||||
try {
|
||||
await this.$refs.formRef.validate();
|
||||
this.$dialog.confirm({
|
||||
title: "提示",
|
||||
message: "您确定要提交吗?"
|
||||
}).then(() => {
|
||||
this.$axios.post("/flow/common/executeTask", {
|
||||
data: JSON.stringify({
|
||||
...this.formData,
|
||||
submitType: val
|
||||
})
|
||||
}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$refs.infoRef.onClose()
|
||||
this.$toast.success(res.msg)
|
||||
this.doSearch()
|
||||
}
|
||||
})
|
||||
}).catch(() => {
|
||||
|
||||
})
|
||||
} catch (error) {
|
||||
|
||||
}
|
||||
},
|
||||
onRevoke(row){
|
||||
this.$dialog.confirm({
|
||||
title: "提示",
|
||||
message: "您确定要撤回吗?"
|
||||
}).then(() => {
|
||||
this.$axios.post("/flow/common/revokeTask", {taskId: row.taskId}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$toast.success(res.msg)
|
||||
this.doSearch()
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
async queryCondolenceType() {
|
||||
const res = await this.$axios.post('/platform/condolence/type/queryCondolenceType')
|
||||
return res.data
|
||||
},
|
||||
doSearch() {
|
||||
this.$nextTick(() => {
|
||||
this.pageForm.pageNumber = 1
|
||||
this.pageForm.totalCount = 0
|
||||
this.$refs.tableListRef.doSearch()
|
||||
})
|
||||
}
|
||||
},
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,99 @@
|
||||
const condolenceInfo = {
|
||||
template:
|
||||
/*language=HTML*/
|
||||
`
|
||||
<van-action-sheet v-model="visible" title="查看详情">
|
||||
<div class="detail-container">
|
||||
<van-cell-group title="基本信息">
|
||||
<van-cell title="申请人姓名">{{ viewData.applyUserName }}</van-cell>
|
||||
<van-cell title="申请人工号">{{ viewData.applyLoginName }}</van-cell>
|
||||
<van-cell title="申请人单位">{{ viewData.applyUnitName }}</van-cell>
|
||||
<van-cell title="申请人工会">{{ viewData.applyUnionName }}</van-cell>
|
||||
<van-cell title="慰问对象">{{ viewData.helpUserName }}</van-cell>
|
||||
<van-cell title="收款人">{{ viewData.payUserName }}</van-cell>
|
||||
<van-cell title="慰问类型">{{ viewData.typeName }}</van-cell>
|
||||
<van-cell title="慰问方式">{{ viewData.way }}</van-cell>
|
||||
<van-cell title="慰问金额">{{ viewData.money }}</van-cell>
|
||||
<van-cell title="慰问时间">{{ viewData.occurTime }}</van-cell>
|
||||
<van-cell v-if="['2'].includes(viewData.type)" title="孩次">{{ viewData.child }}</van-cell>
|
||||
<van-cell v-if="['3','4'].includes(viewData.type)" title="治疗医院">{{ viewData.hospital }}</van-cell>
|
||||
<van-cell v-if="['3','4'].includes(viewData.type)" title="病房号">{{ viewData.hospitalHouseNum }}</van-cell>
|
||||
<van-cell v-if="['3','4'].includes(viewData.type)" title="床号">{{ viewData.hospitalHouseBedNum }}</van-cell>
|
||||
<van-cell v-if="['4'].includes(viewData.type)" title="患病病种">{{ viewData.hospitalBy }}</van-cell>
|
||||
<van-cell v-if="['6'].includes(viewData.type)" title="直系亲属">{{ viewData.deadImmediateFamily }}</van-cell>
|
||||
<van-cell class="direction-column-cell" title="申请事由">
|
||||
{{ viewData.remark || '暂无' }}
|
||||
</van-cell>
|
||||
<van-cell class="direction-column-cell" title="附件">
|
||||
<file-preview :files="viewData.files" complete_result></file-preview>
|
||||
</van-cell>
|
||||
<van-cell class="direction-column-cell" title="签字">
|
||||
<van-image :src="viewData.signature" v-if="viewData.signature" class="signature-image"></van-image>
|
||||
<span v-else>暂无签字</span>
|
||||
</van-cell>
|
||||
</van-cell-group>
|
||||
<template v-for="task in doneTasks">
|
||||
<van-cell-group :title="task.displayName" v-if="task.ext.isFirstTaskNode">
|
||||
<van-cell title="申请用户">{{ task.ext.initiatorName }}({{task.ext.initiatorAccount}})
|
||||
</van-cell>
|
||||
<van-cell title="申请时间">{{ task.finishTime }}</van-cell>
|
||||
<van-cell title="办理结果">
|
||||
<dict-tag :options="dict.type.PROCESS_TASK_SUBMIT_TYPE"
|
||||
:value="task.ext.submitType"></dict-tag>
|
||||
</van-cell>
|
||||
</van-cell-group>
|
||||
<van-cell-group :title="task.displayName" v-else>
|
||||
<van-cell title="办理用户">{{ task.taskFormData.userName }}({{task.taskFormData.loginName}})
|
||||
</van-cell>
|
||||
<van-cell title="办理时间">{{ task.finishTime }}</van-cell>
|
||||
<van-cell title="办理结果">
|
||||
<dict-tag :options="dict.type.PROCESS_TASK_SUBMIT_TYPE"
|
||||
:value="task.ext.submitType"></dict-tag>
|
||||
</van-cell>
|
||||
<van-cell title="办理意见" v-if="!task.ext.isFirstTaskNode" class="direction-column-cell">
|
||||
<div v-html="task.taskFormData.tf_opinion"></div>
|
||||
</van-cell>
|
||||
</van-cell-group>
|
||||
</template>
|
||||
</div>
|
||||
<slot></slot>
|
||||
</van-action-sheet>
|
||||
`,
|
||||
dicts: ["PROCESS_TASK_SUBMIT_TYPE"],
|
||||
data() {
|
||||
return {
|
||||
visible:false,
|
||||
viewData: {},
|
||||
doneTasks: [],
|
||||
row: null,
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
onOpen(row) {
|
||||
this.row = row
|
||||
this.visible = true
|
||||
this.getInfo()
|
||||
this.getDoneTasks()
|
||||
},
|
||||
onClose(){
|
||||
this.visible = false
|
||||
},
|
||||
getInfo() {
|
||||
this.$axios.post("/platform/condolence/mine/info", { id: this.row.id }).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.viewData = res.data
|
||||
}
|
||||
})
|
||||
},
|
||||
getDoneTasks() {
|
||||
this.$axios.post("/flow/common/doneTasks", {bizId: this.row.id}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.doneTasks = res.data
|
||||
}
|
||||
})
|
||||
},
|
||||
},
|
||||
style: /*language=CSS*/ `
|
||||
|
||||
`
|
||||
}
|
||||
@@ -0,0 +1,151 @@
|
||||
<!--#
|
||||
layout("/layouts/platform_h5.html"){
|
||||
#-->
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
|
||||
<div id="app">
|
||||
<van-nav-bar title="我的申请" left-text="返回" left-arrow @click-left="historyBack" fixed placeholder></van-nav-bar>
|
||||
|
||||
<van-sticky offset-top="46px">
|
||||
<van-search
|
||||
v-model="pageForm.searchKeyword"
|
||||
:show-action="false"
|
||||
:reverse-color="false"
|
||||
input-align="left"
|
||||
placeholder="请输入姓名或者工号搜索"
|
||||
@search="doSearch"
|
||||
></van-search>
|
||||
<van-dropdown-menu :close-on-click-outside="false" :close-on-click-overlay="false">
|
||||
<year-van-dropdown-item :num="5" @change="doSearch" v-model="pageForm.year"></year-van-dropdown-item>
|
||||
<van-dropdown-item v-model="pageForm.type" :options="typeOptions" :multiple="false"
|
||||
@change="doSearch"></van-dropdown-item>
|
||||
</van-dropdown-menu>
|
||||
</van-sticky>
|
||||
|
||||
<table-list api="/platform/condolence/mine/pageData" :page_form.sync="pageForm" ref="tableListRef" @ready="onReady">
|
||||
<template v-slot="{index,row}">
|
||||
<table-column label="慰问对象">{{row.helpUserName}}</table-column>
|
||||
<table-column label="慰问对象工号">{{row.helpLoginName}}</table-column>
|
||||
<table-column label="申请人">{{row.applyUserName}}</table-column>
|
||||
<table-column label="所属工会">{{row.applyUnionName}}</table-column>
|
||||
<table-column label="所属单位">{{row.applyUnitName}}</table-column>
|
||||
<table-column label="慰问类型">{{row.typeName}}</table-column>
|
||||
<table-column label="当前节点">{{row.taskName}}</table-column>
|
||||
</template>
|
||||
<template #actions="{index,row}">
|
||||
<div class="action-btn" @click="onView(row)">
|
||||
<i class="fa fa-eye"></i>
|
||||
<span>查看</span>
|
||||
</div>
|
||||
<div class="action-btn" @click="onEdit(row)"
|
||||
v-if="row.taskKey === 'startTask' || !row.instanceId">
|
||||
<i class="fa fa-edit"></i>
|
||||
<span>编辑</span>
|
||||
</div>
|
||||
<div class="action-btn delete" @click="onRevoke(row)"
|
||||
v-if="row.canRevoke">
|
||||
<i class="fa fa-undo"></i>
|
||||
<span>撤回</span>
|
||||
</div>
|
||||
<div class="action-btn delete" @click="onDelete(row)"
|
||||
v-if="row.taskKey === 'startTask' || !row.instanceId">
|
||||
<i class="fa fa-trash"></i>
|
||||
<span>删除</span>
|
||||
</div>
|
||||
</template>
|
||||
</table-list>
|
||||
|
||||
<info ref="infoRef"></info>
|
||||
</div>
|
||||
|
||||
<script nonce="${cspNonce!}">
|
||||
<!--#include('../common/info.js'){}#-->
|
||||
new Vue({
|
||||
el: "#app",
|
||||
store,
|
||||
components: {
|
||||
info: condolenceInfo
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
pageForm: {
|
||||
pageNumber: 1,
|
||||
pageSize: 10,
|
||||
totalCount: 0,
|
||||
year: new Date().getFullYear(),
|
||||
type: null
|
||||
},
|
||||
typeOptions: [],
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async onReady() {
|
||||
const typeList = await this.queryCondolenceType()
|
||||
this.typeOptions = [
|
||||
{
|
||||
text: "全部慰问类型",
|
||||
value: null
|
||||
}
|
||||
].concat(typeList.map((v) => ({ text: v.name, value: v.id })))
|
||||
if (this.typeOptions.length > 0) {
|
||||
this.pageForm.type = this.typeOptions[0].value
|
||||
this.doSearch()
|
||||
}
|
||||
},
|
||||
onRevoke(row) {
|
||||
this.$dialog.confirm({
|
||||
title: "提示",
|
||||
message: "您确定要撤回吗?"
|
||||
}).then(() => {
|
||||
this.$axios.post("/flow/common/revokeTask", { taskId: row.startTaskId }).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$toast(res.msg)
|
||||
this.doSearch()
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
onView(row) {
|
||||
this.$refs.infoRef.onOpen(row)
|
||||
},
|
||||
onEdit(row) {
|
||||
this.$pjaxReplace("/platform/condolence/apply/h5?taskId=" + (row.startTaskId || "") + "&bizId=" + row.id)
|
||||
},
|
||||
onDelete(row) {
|
||||
this.$dialog.confirm({
|
||||
title: "提示",
|
||||
message: "您确定要删除吗?"
|
||||
})
|
||||
.then(() => {
|
||||
this.$axios.post("/platform/condolence/mine/delete", { id: row.id }).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$toast.success(res.msg)
|
||||
this.doSearch()
|
||||
} else {
|
||||
this.$toast.fail(res.msg)
|
||||
}
|
||||
})
|
||||
})
|
||||
.catch(() => {})
|
||||
},
|
||||
async queryCondolenceType() {
|
||||
const res = await this.$axios.post('/platform/condolence/type/queryCondolenceType')
|
||||
return res.data
|
||||
},
|
||||
doSearch() {
|
||||
this.$nextTick(() => {
|
||||
this.pageForm.pageNumber = 1
|
||||
this.pageForm.totalCount = 0
|
||||
this.$refs.tableListRef.doSearch()
|
||||
})
|
||||
}
|
||||
},
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
+190
@@ -0,0 +1,190 @@
|
||||
<!--#
|
||||
layout("/layouts/platform_h5.html"){
|
||||
#-->
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
|
||||
<div id="app">
|
||||
<van-nav-bar title="校工会预审" left-text="返回" left-arrow @click-left="historyBack" fixed placeholder></van-nav-bar>
|
||||
|
||||
<van-sticky offset-top="46px">
|
||||
<van-search
|
||||
v-model="pageForm.searchKeyword"
|
||||
:show-action="false"
|
||||
:reverse-color="false"
|
||||
input-align="left"
|
||||
placeholder="请输入姓名或者工号搜索"
|
||||
@search="doSearch"
|
||||
></van-search>
|
||||
<van-dropdown-menu :close-on-click-outside="false" :close-on-click-overlay="false">
|
||||
<year-van-dropdown-item :num="5" @change="doSearch" v-model="pageForm.year"></year-van-dropdown-item>
|
||||
<van-dropdown-item v-model="pageForm.type" :options="typeOptions" :multiple="false"
|
||||
@change="doSearch"></van-dropdown-item>
|
||||
</van-dropdown-menu>
|
||||
<van-tabs v-model="pageForm.approvalText"
|
||||
@change="(val)=>{this.pageForm.approval = val==='1';this.doSearch();}">
|
||||
<van-tab title="已审核" name="1"></van-tab>
|
||||
<van-tab title="未审核" name="0"></van-tab>
|
||||
</van-tabs>
|
||||
</van-sticky>
|
||||
|
||||
<table-list api="/platform/condolence/schoolPrincipalApproval/pageData" :page_form.sync="pageForm" ref="tableListRef" @ready="onReady">
|
||||
<template v-slot="{index,row}">
|
||||
<table-column label="慰问对象">{{row.helpUserName}}</table-column>
|
||||
<table-column label="慰问对象工号">{{row.helpLoginName}}</table-column>
|
||||
<table-column label="申请人">{{row.applyUserName}}</table-column>
|
||||
<table-column label="所属工会">{{row.applyUnionName}}</table-column>
|
||||
<table-column label="所属单位">{{row.applyUnitName}}</table-column>
|
||||
<table-column label="慰问类型">{{row.typeName}}</table-column>
|
||||
<table-column label="当前节点">{{row.curTaskName}}</table-column>
|
||||
</template>
|
||||
<template #actions="{index,row}">
|
||||
<div class="action-btn" @click="onView(row)">
|
||||
<i class="fa fa-eye"></i>
|
||||
<span>查看</span>
|
||||
</div>
|
||||
<div class="action-btn" v-if="row.taskState === 10" @click="onApproval(row)">
|
||||
<i class="fa fa-edit"></i>
|
||||
<span>审核</span>
|
||||
</div>
|
||||
<div class="action-btn delete" v-if="row.canRevoke" @click="onRevoke(row)">
|
||||
<i class="fa fa-reply"></i>
|
||||
<span>撤回</span>
|
||||
</div>
|
||||
</template>
|
||||
</table-list>
|
||||
|
||||
<info ref="infoRef">
|
||||
<div v-if="showApprovalForm">
|
||||
<div class="process-title">{{formData.taskName}}</div>
|
||||
<van-form ref="formRef">
|
||||
<van-field
|
||||
v-model="formData.tf_opinion"
|
||||
name="tf_opinion"
|
||||
label="审批意见"
|
||||
placeholder="请输入审批意见"
|
||||
:rules="[{ required: true, message: '请填写审批意见' }]"
|
||||
required
|
||||
maxlength="100"
|
||||
show-word-limit
|
||||
></van-field>
|
||||
</van-form>
|
||||
<div style="display: flex; justify-content: space-between; column-gap: 10px; padding: 10px">
|
||||
<van-button type="danger" block @click="handleTaskAction(6)">退回</van-button>
|
||||
<van-button type="danger" block @click="handleTaskAction(20)">不同意</van-button>
|
||||
<van-button type="primary" block @click="handleTaskAction(1)">同意</van-button>
|
||||
</div>
|
||||
</div>
|
||||
</info>
|
||||
</div>
|
||||
|
||||
<script nonce="${cspNonce!}">
|
||||
<!--#include('../common/info.js'){}#-->
|
||||
new Vue({
|
||||
el: "#app",
|
||||
store,
|
||||
components: {
|
||||
info: condolenceInfo
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
pageForm: {
|
||||
pageNumber: 1,
|
||||
pageSize: 10,
|
||||
totalCount: 0,
|
||||
searchKeyword: '',
|
||||
approvalText: "0",
|
||||
approval: false,
|
||||
year: new Date().getFullYear(),
|
||||
type: null,
|
||||
},
|
||||
typeOptions: [],
|
||||
formData: {},
|
||||
showApprovalForm: false
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async onReady() {
|
||||
const typeList = await this.queryCondolenceType()
|
||||
this.typeOptions = [
|
||||
{
|
||||
text: "全部慰问类型",
|
||||
value: null
|
||||
}
|
||||
].concat(typeList.map((v) => ({ text: v.name, value: v.id })))
|
||||
if (this.typeOptions.length > 0) {
|
||||
this.pageForm.type = this.typeOptions[0].value
|
||||
this.doSearch()
|
||||
}
|
||||
},
|
||||
onView(row) {
|
||||
this.showApprovalForm = false
|
||||
this.$refs.infoRef.onOpen(row)
|
||||
},
|
||||
onApproval(row) {
|
||||
this.showApprovalForm = true
|
||||
this.$refs.infoRef.onOpen(row)
|
||||
this.formData = {
|
||||
processTaskId: row.taskId,
|
||||
taskName: row.curTaskName
|
||||
}
|
||||
},
|
||||
async handleTaskAction(val) {
|
||||
try {
|
||||
await this.$refs.formRef.validate();
|
||||
this.$dialog.confirm({
|
||||
title: "提示",
|
||||
message: "您确定要提交吗?"
|
||||
}).then(() => {
|
||||
this.$axios.post("/flow/common/executeTask", {
|
||||
data: JSON.stringify({
|
||||
...this.formData,
|
||||
submitType: val
|
||||
})
|
||||
}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$refs.infoRef.onClose()
|
||||
this.$toast.success(res.msg)
|
||||
this.doSearch()
|
||||
}
|
||||
})
|
||||
}).catch(() => {
|
||||
|
||||
})
|
||||
} catch (error) {
|
||||
|
||||
}
|
||||
},
|
||||
onRevoke(row){
|
||||
this.$dialog.confirm({
|
||||
title: "提示",
|
||||
message: "您确定要撤回吗?"
|
||||
}).then(() => {
|
||||
this.$axios.post("/flow/common/revokeTask", {taskId: row.taskId}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$toast.success(res.msg)
|
||||
this.doSearch()
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
async queryCondolenceType() {
|
||||
const res = await this.$axios.post('/platform/condolence/type/queryCondolenceType')
|
||||
return res.data
|
||||
},
|
||||
doSearch() {
|
||||
this.$nextTick(() => {
|
||||
this.pageForm.pageNumber = 1
|
||||
this.pageForm.totalCount = 0
|
||||
this.$refs.tableListRef.doSearch()
|
||||
})
|
||||
}
|
||||
},
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
+190
@@ -0,0 +1,190 @@
|
||||
<!--#
|
||||
layout("/layouts/platform_h5.html"){
|
||||
#-->
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
|
||||
<div id="app">
|
||||
<van-nav-bar title="校工会审核" left-text="返回" left-arrow @click-left="historyBack" fixed placeholder></van-nav-bar>
|
||||
|
||||
<van-sticky offset-top="46px">
|
||||
<van-search
|
||||
v-model="pageForm.searchKeyword"
|
||||
:show-action="false"
|
||||
:reverse-color="false"
|
||||
input-align="left"
|
||||
placeholder="请输入姓名或者工号搜索"
|
||||
@search="doSearch"
|
||||
></van-search>
|
||||
<van-dropdown-menu :close-on-click-outside="false" :close-on-click-overlay="false">
|
||||
<year-van-dropdown-item :num="5" @change="doSearch" v-model="pageForm.year"></year-van-dropdown-item>
|
||||
<van-dropdown-item v-model="pageForm.type" :options="typeOptions" :multiple="false"
|
||||
@change="doSearch"></van-dropdown-item>
|
||||
</van-dropdown-menu>
|
||||
<van-tabs v-model="pageForm.approvalText"
|
||||
@change="(val)=>{this.pageForm.approval = val==='1';this.doSearch();}">
|
||||
<van-tab title="已审核" name="1"></van-tab>
|
||||
<van-tab title="未审核" name="0"></van-tab>
|
||||
</van-tabs>
|
||||
</van-sticky>
|
||||
|
||||
<table-list api="/platform/condolence/schoolUnionApproval/pageData" :page_form.sync="pageForm" ref="tableListRef" @ready="onReady">
|
||||
<template v-slot="{index,row}">
|
||||
<table-column label="慰问对象">{{row.helpUserName}}</table-column>
|
||||
<table-column label="慰问对象工号">{{row.helpLoginName}}</table-column>
|
||||
<table-column label="申请人">{{row.applyUserName}}</table-column>
|
||||
<table-column label="所属工会">{{row.applyUnionName}}</table-column>
|
||||
<table-column label="所属单位">{{row.applyUnitName}}</table-column>
|
||||
<table-column label="慰问类型">{{row.typeName}}</table-column>
|
||||
<table-column label="当前节点">{{row.curTaskName}}</table-column>
|
||||
</template>
|
||||
<template #actions="{index,row}">
|
||||
<div class="action-btn" @click="onView(row)">
|
||||
<i class="fa fa-eye"></i>
|
||||
<span>查看</span>
|
||||
</div>
|
||||
<div class="action-btn" v-if="row.taskState === 10" @click="onApproval(row)">
|
||||
<i class="fa fa-edit"></i>
|
||||
<span>审核</span>
|
||||
</div>
|
||||
<div class="action-btn delete" v-if="row.canRevoke" @click="onRevoke(row)">
|
||||
<i class="fa fa-reply"></i>
|
||||
<span>撤回</span>
|
||||
</div>
|
||||
</template>
|
||||
</table-list>
|
||||
|
||||
<info ref="infoRef">
|
||||
<div v-if="showApprovalForm">
|
||||
<div class="process-title">{{formData.taskName}}</div>
|
||||
<van-form ref="formRef">
|
||||
<van-field
|
||||
v-model="formData.tf_opinion"
|
||||
name="tf_opinion"
|
||||
label="审批意见"
|
||||
placeholder="请输入审批意见"
|
||||
:rules="[{ required: true, message: '请填写审批意见' }]"
|
||||
required
|
||||
maxlength="100"
|
||||
show-word-limit
|
||||
></van-field>
|
||||
</van-form>
|
||||
<div style="display: flex; justify-content: space-between; column-gap: 10px; padding: 10px">
|
||||
<van-button type="danger" block @click="handleTaskAction(6)">退回</van-button>
|
||||
<van-button type="danger" block @click="handleTaskAction(20)">不同意</van-button>
|
||||
<van-button type="primary" block @click="handleTaskAction(1)">同意</van-button>
|
||||
</div>
|
||||
</div>
|
||||
</info>
|
||||
</div>
|
||||
|
||||
<script nonce="${cspNonce!}">
|
||||
<!--#include('../common/info.js'){}#-->
|
||||
new Vue({
|
||||
el: "#app",
|
||||
store,
|
||||
components: {
|
||||
info: condolenceInfo
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
pageForm: {
|
||||
pageNumber: 1,
|
||||
pageSize: 10,
|
||||
totalCount: 0,
|
||||
searchKeyword: '',
|
||||
approvalText: "0",
|
||||
approval: false,
|
||||
year: new Date().getFullYear(),
|
||||
type: null,
|
||||
},
|
||||
typeOptions: [],
|
||||
formData: {},
|
||||
showApprovalForm: false
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async onReady() {
|
||||
const typeList = await this.queryCondolenceType()
|
||||
this.typeOptions = [
|
||||
{
|
||||
text: "全部慰问类型",
|
||||
value: null
|
||||
}
|
||||
].concat(typeList.map((v) => ({ text: v.name, value: v.id })))
|
||||
if (this.typeOptions.length > 0) {
|
||||
this.pageForm.type = this.typeOptions[0].value
|
||||
this.doSearch()
|
||||
}
|
||||
},
|
||||
onView(row) {
|
||||
this.showApprovalForm = false
|
||||
this.$refs.infoRef.onOpen(row)
|
||||
},
|
||||
onApproval(row) {
|
||||
this.showApprovalForm = true
|
||||
this.$refs.infoRef.onOpen(row)
|
||||
this.formData = {
|
||||
processTaskId: row.taskId,
|
||||
taskName: row.curTaskName
|
||||
}
|
||||
},
|
||||
async handleTaskAction(val) {
|
||||
try {
|
||||
await this.$refs.formRef.validate();
|
||||
this.$dialog.confirm({
|
||||
title: "提示",
|
||||
message: "您确定要提交吗?"
|
||||
}).then(() => {
|
||||
this.$axios.post("/flow/common/executeTask", {
|
||||
data: JSON.stringify({
|
||||
...this.formData,
|
||||
submitType: val
|
||||
})
|
||||
}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$refs.infoRef.onClose()
|
||||
this.$toast.success(res.msg)
|
||||
this.doSearch()
|
||||
}
|
||||
})
|
||||
}).catch(() => {
|
||||
|
||||
})
|
||||
} catch (error) {
|
||||
|
||||
}
|
||||
},
|
||||
onRevoke(row){
|
||||
this.$dialog.confirm({
|
||||
title: "提示",
|
||||
message: "您确定要撤回吗?"
|
||||
}).then(() => {
|
||||
this.$axios.post("/flow/common/revokeTask", {taskId: row.taskId}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$toast.success(res.msg)
|
||||
this.doSearch()
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
async queryCondolenceType() {
|
||||
const res = await this.$axios.post('/platform/condolence/type/queryCondolenceType')
|
||||
return res.data
|
||||
},
|
||||
doSearch() {
|
||||
this.$nextTick(() => {
|
||||
this.pageForm.pageNumber = 1
|
||||
this.pageForm.totalCount = 0
|
||||
this.$refs.tableListRef.doSearch()
|
||||
})
|
||||
}
|
||||
},
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,115 @@
|
||||
const applyForm = {
|
||||
template: /*language=HTML*/ `
|
||||
<div>
|
||||
<van-action-sheet :close-on-click-overlay="false" title="捐助信息" v-model="visible">
|
||||
<van-form ref="formRef" class="form-container">
|
||||
<van-cell-group title="基本信息" class="form-section">
|
||||
<van-field label="姓名" readonly v-model="formData.userName"></van-field>
|
||||
<van-field label="单位" readonly v-model="formData.unitName"></van-field>
|
||||
<van-field label="工会" readonly v-model="formData.unionName"></van-field>
|
||||
<van-field label="电话" v-model="formData.mobile" placeholder="请输入电话" type="number"
|
||||
required :rules="[{ required: true }]" name="digit">
|
||||
</van-field>
|
||||
</van-cell-group>
|
||||
|
||||
<van-cell-group title="支付信息" class="form-section">
|
||||
<van-field v-model="formData.money" label="捐助金额" type="number" placeholder="请输入捐助金额"
|
||||
required :rules="[{ required: true }]" name="money">
|
||||
<template #button>
|
||||
元
|
||||
</template>
|
||||
</van-field>
|
||||
<van-field label="捐助方式" required :rules="[{ required: true }]" name="payMode" >
|
||||
<template #input>
|
||||
<van-radio-group v-model="formData.payMode" direction="horizontal">
|
||||
<van-radio name="WeChat">
|
||||
<van-icon size="18" name="wechat-pay"></van-icon>
|
||||
微信
|
||||
</van-radio>
|
||||
<van-radio name="Alipay">
|
||||
<van-icon size="18" name="alipay"></van-icon>
|
||||
支付宝
|
||||
</van-radio>
|
||||
</van-radio-group>
|
||||
</template>
|
||||
</van-field>
|
||||
</van-cell-group>
|
||||
|
||||
<van-cell-group title="捐助凭证" class="form-section">
|
||||
<van-field name="contributionFiles" label="捐助凭证" required :rules="[{ required: true }]">
|
||||
<template #input>
|
||||
<h5-file-upload
|
||||
slot="input"
|
||||
:value.sync="formData.contributionFiles"
|
||||
:upload_number="5"
|
||||
upload_result_category="array"
|
||||
complete_result
|
||||
></h5-file-upload>
|
||||
</template>
|
||||
</van-field>
|
||||
</van-cell-group>
|
||||
|
||||
<div class="form-actions">
|
||||
<van-button @click="onSubmit" round type="info">提交</van-button>
|
||||
</div>
|
||||
</van-form>
|
||||
</van-action-sheet>
|
||||
</div>
|
||||
`,
|
||||
store,
|
||||
data() {
|
||||
return {
|
||||
visible:false,
|
||||
row: {},
|
||||
formData: {},
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
onOpen(row) {
|
||||
this.row = row
|
||||
if(row && row.applyId) {
|
||||
this.formData = clone(row)
|
||||
} else {
|
||||
this.init()
|
||||
}
|
||||
this.visible = true
|
||||
},
|
||||
init() {
|
||||
this.$set(this.formData, 'contributionId', this.row.id)
|
||||
this.$set(this.formData, 'contributionName', this.row.contributionName)
|
||||
this.$set(this.formData, 'userId', this.$store.state.user.id)
|
||||
this.$set(this.formData, 'sex', this.$store.state.user.sex)
|
||||
this.$set(this.formData, 'userName', this.$store.state.user.username)
|
||||
this.$set(this.formData, 'loginName', this.$store.state.user.loginname)
|
||||
this.$set(this.formData, 'unitId', this.$store.state.user?.unit?.id)
|
||||
this.$set(this.formData, 'unitName', this.$store.state.user?.unit?.name)
|
||||
this.$set(this.formData, "unionId", this.$store.state.user?.union?.id)
|
||||
this.$set(this.formData, "unionName", this.$store.state.user?.union?.name)
|
||||
this.$set(this.formData, 'mobile', this.$store.state.user.mobile)
|
||||
},
|
||||
onSubmit() {
|
||||
this.$refs.formRef.validate().then(() => {
|
||||
this.$dialog.confirm({
|
||||
title: "提示",
|
||||
message: "您确定要提交吗?"
|
||||
}).then(() => {
|
||||
const formData = clone(this.formData)
|
||||
formData.contributionFiles = JSON.stringify(formData.contributionFiles)
|
||||
this.$axios.post("/platform/contribution/list/h5/submit", formData).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.$toast(res.msg)
|
||||
this.visible = false
|
||||
this.$pjaxReplace("/platform/contribution/mine/h5")
|
||||
}
|
||||
})
|
||||
})
|
||||
})
|
||||
},
|
||||
},
|
||||
style: /*language=CSS*/ `
|
||||
/deep/ .van-radio__label {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
`
|
||||
}
|
||||
@@ -0,0 +1,58 @@
|
||||
const projectInfo = {
|
||||
template: /*language=HTML*/ `
|
||||
<div>
|
||||
<van-action-sheet v-model="visible" title="项目信息" cancel-text="取消">
|
||||
<div class="detail-container">
|
||||
<van-image class="info-img" height="186" width="100%" :src="viewData.contributionFiles"></van-image>
|
||||
|
||||
<div class="info-middle">
|
||||
<div>已筹总额:{{ viewData.totalMoney || 0 }}元</div>
|
||||
<div>捐助人次:{{ viewData.peopleCount || 0 }}人</div>
|
||||
</div>
|
||||
|
||||
<div class="info-title">{{viewData.contributionName}}</div>
|
||||
<div class="info-content" v-html="viewData.contributionIntroduce"></div>
|
||||
</div>
|
||||
</van-action-sheet>
|
||||
</div>
|
||||
`,
|
||||
data() {
|
||||
return {
|
||||
visible:false,
|
||||
viewData: {},
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
onOpen(row) {
|
||||
this.$axios.post('/platform/contribution/list/h5/fetchOne', {id: row.contributionId})
|
||||
.then((res) => {
|
||||
this.viewData = res.data
|
||||
})
|
||||
this.visible = true
|
||||
},
|
||||
},
|
||||
style: /*language=CSS*/ `
|
||||
/deep/ .info-middle {
|
||||
background-color: #F5F7FA;
|
||||
width: 80%;
|
||||
margin: 0 auto;
|
||||
padding: 20px;
|
||||
border-radius: 8px;
|
||||
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
|
||||
color: #666666;
|
||||
font-size: 14px;
|
||||
}
|
||||
/deep/ .info-title {
|
||||
font-weight: bold;
|
||||
background-color: white;
|
||||
padding: 13px;
|
||||
box-shadow: 0 8px 12px #ebedf0;
|
||||
text-align: center !important;
|
||||
margin-top: 10px;
|
||||
}
|
||||
/deep/ .info-content {
|
||||
padding: 10px;
|
||||
background-color: white;
|
||||
}
|
||||
`
|
||||
}
|
||||
@@ -0,0 +1,59 @@
|
||||
const typeInfo = {
|
||||
template: /*language=HTML*/ `
|
||||
<div>
|
||||
<van-action-sheet v-model="visible" title="专题信息" cancel-text="取消">
|
||||
<div class="detail-container">
|
||||
<van-image class="info-img" height="186" width="100%" :src="viewData.contributionTypeFiles"></van-image>
|
||||
|
||||
<div class="info-middle">
|
||||
<div>子项目数:{{ viewData.projectCount || 0 }}个</div>
|
||||
<div>已筹总额:{{ viewData.totalMoney || 0 }}元</div>
|
||||
<div>捐助人次:{{ viewData.peopleCount || 0 }}人</div>
|
||||
</div>
|
||||
|
||||
<div class="info-title">{{viewData.typeName}}</div>
|
||||
<div class="info-content">{{viewData.contributionTypeIntroduce}}</div>
|
||||
</div>
|
||||
</van-action-sheet>
|
||||
</div>
|
||||
`,
|
||||
data() {
|
||||
return {
|
||||
visible:false,
|
||||
viewData: {},
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
onOpen(row) {
|
||||
this.$axios.post('/platform/contribution/type/fetchOne', {id: row.typeId})
|
||||
.then((res) => {
|
||||
this.viewData = res.data
|
||||
})
|
||||
this.visible = true
|
||||
},
|
||||
},
|
||||
style: /*language=CSS*/ `
|
||||
/deep/ .info-middle {
|
||||
background-color: #F5F7FA;
|
||||
width: 80%;
|
||||
margin: 0 auto;
|
||||
padding: 20px;
|
||||
border-radius: 8px;
|
||||
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
|
||||
color: #666666;
|
||||
font-size: 14px;
|
||||
}
|
||||
/deep/ .info-title {
|
||||
font-weight: bold;
|
||||
background-color: white;
|
||||
padding: 13px;
|
||||
box-shadow: 0 8px 12px #ebedf0;
|
||||
text-align: center !important;
|
||||
margin-top: 10px;
|
||||
}
|
||||
/deep/ .info-content {
|
||||
padding: 10px;
|
||||
background-color: white;
|
||||
}
|
||||
`
|
||||
}
|
||||
@@ -0,0 +1,132 @@
|
||||
<!--#
|
||||
layout("/layouts/platform_h5.html"){
|
||||
#-->
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
|
||||
<div id="app">
|
||||
<van-nav-bar title="慈善捐助项目" left-text="返回" left-arrow @click-left="historyBack" fixed
|
||||
placeholder></van-nav-bar>
|
||||
|
||||
<van-sticky offset-top="46px">
|
||||
<van-dropdown-menu :close-on-click-outside="false" :close-on-click-overlay="false">
|
||||
<year-van-dropdown-item :num="5" @change="doSearch" v-model="pageForm.year"></year-van-dropdown-item>
|
||||
<van-dropdown-item v-model="pageForm.type" :options="typeOptions" :multiple="false"
|
||||
@change="doSearch"></van-dropdown-item>
|
||||
</van-dropdown-menu>
|
||||
</van-sticky>
|
||||
|
||||
<table-list api="/platform/contribution/list/h5/pageData"
|
||||
:page_form.sync="pageForm"
|
||||
ref="tableListRef"
|
||||
img="contributionFiles"
|
||||
@ready="onReady">
|
||||
<template #header="{index,row}">
|
||||
<div class="item-header">
|
||||
<div class="item-title">{{ row.contributionName }}</div>
|
||||
<van-tag type="primary">{{ row.contributionTypeCode ? '专题' : '' }}</van-tag>
|
||||
</div>
|
||||
</template>
|
||||
<template v-slot="{index,row}">
|
||||
<table-column label="捐助模式">{{ row.contributionMode === 1 ? '水滴筹' : '一日捐' }}</table-column>
|
||||
<table-column label="开始时间">{{row.contributionStartTime}}</table-column>
|
||||
<table-column label="结束时间">{{row.contributionEndTime}}</table-column>
|
||||
</template>
|
||||
<template #actions="{index,row}">
|
||||
<div v-if="row.contributionTypeCode" class="action-btn" @click="onTypeView(row)">
|
||||
<i class="fa fa-eye"></i>
|
||||
<span>专题介绍</span>
|
||||
</div>
|
||||
<div class="action-btn" @click="onView(row)">
|
||||
<i class="fa fa-eye"></i>
|
||||
<span>项目介绍</span>
|
||||
</div>
|
||||
<div class="action-btn" @click="onApply(row)">
|
||||
<i class="fa fa-cny"></i>
|
||||
<span>捐助</span>
|
||||
</div>
|
||||
</template>
|
||||
</table-list>
|
||||
|
||||
<type-info ref="typeInfoRef"></type-info>
|
||||
<project-info ref="projectInfoRef"></project-info>
|
||||
<apply-form ref="applyFormRef"></apply-form>
|
||||
</div>
|
||||
|
||||
<script nonce="${cspNonce!}">
|
||||
<!--#include("../common/typeInfo.js"){}#-->
|
||||
<!--#include("../common/projectInfo.js"){}#-->
|
||||
<!--#include('../common/applyForm.js'){}#-->
|
||||
new Vue({
|
||||
el: "#app",
|
||||
store,
|
||||
components: {
|
||||
"type-info": typeInfo,
|
||||
"project-info": projectInfo,
|
||||
"apply-form": applyForm
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
pageForm: {
|
||||
pageNumber: 1,
|
||||
pageSize: 10,
|
||||
totalCount: 0,
|
||||
year: new Date().getFullYear(),
|
||||
type: null
|
||||
},
|
||||
typeOptions: []
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async onReady() {
|
||||
const typeList = await this.queryType()
|
||||
this.typeOptions = [
|
||||
{
|
||||
text: "全部类型",
|
||||
value: null
|
||||
}
|
||||
].concat(typeList.map((v) => ({ text: v.typeName, value: v.typeCode })))
|
||||
if (this.typeOptions.length > 0) {
|
||||
this.pageForm.type = this.typeOptions[0].value
|
||||
}
|
||||
this.doSearch()
|
||||
},
|
||||
onApply(row) {
|
||||
if (!(this.$moment().isAfter(this.$moment(row.contributionStartTime))
|
||||
&& this.$moment().isBefore(this.$moment(row.contributionEndTime)))) {
|
||||
this.$toast("不在规定时间范围内")
|
||||
return
|
||||
}
|
||||
if (row.contributionMode === 1) {
|
||||
location.href = row.contributionUrl
|
||||
} else {
|
||||
delete row.contributionFiles
|
||||
this.$refs.applyFormRef.onOpen(row)
|
||||
}
|
||||
},
|
||||
onTypeView(row) {
|
||||
this.$refs.typeInfoRef.onOpen(row)
|
||||
},
|
||||
onView(row) {
|
||||
this.$refs.projectInfoRef.onOpen(row)
|
||||
},
|
||||
async queryType() {
|
||||
const res = await this.$axios.post("/platform/contribution/type/queryContributionType")
|
||||
return res.data
|
||||
},
|
||||
doSearch() {
|
||||
this.$nextTick(() => {
|
||||
this.pageForm.pageNumber = 1
|
||||
this.pageForm.totalCount = 0
|
||||
this.$refs.tableListRef.doSearch()
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,143 @@
|
||||
<!--#
|
||||
layout("/layouts/platform_h5.html"){
|
||||
#-->
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
|
||||
<div id="app">
|
||||
<van-nav-bar title="我的慈善捐助" left-text="返回" left-arrow @click-left="historyBack" fixed placeholder></van-nav-bar>
|
||||
|
||||
<van-sticky offset-top="46px">
|
||||
<van-dropdown-menu :close-on-click-outside="false" :close-on-click-overlay="false">
|
||||
<year-van-dropdown-item :num="5" @change="doSearch" v-model="pageForm.year"></year-van-dropdown-item>
|
||||
<van-dropdown-item v-model="pageForm.type" :options="typeOptions" :multiple="false"
|
||||
@change="doSearch"></van-dropdown-item>
|
||||
</van-dropdown-menu>
|
||||
</van-sticky>
|
||||
|
||||
<table-list api="/platform/contribution/mine/h5/pageData"
|
||||
:page_form.sync="pageForm"
|
||||
ref="tableListRef"
|
||||
@ready="onReady">
|
||||
<template #header="{index,row}">
|
||||
<div class="item-header">
|
||||
<div class="item-title">{{ row.projectName }}</div>
|
||||
<van-tag type="primary">{{ row.contributionTypeCode ? '专题' : '' }}</van-tag>
|
||||
</div>
|
||||
</template>
|
||||
<template v-slot="{index,row}">
|
||||
<table-column label="捐助方式">{{ row.payMode === 'WeChat' ? '微信' : '支付宝' }}</table-column>
|
||||
<table-column label="捐助金额">{{row.money}}</table-column>
|
||||
<table-column label="捐助时间">{{row.contributionTime}}</table-column>
|
||||
</template>
|
||||
<template #actions="{index,row}">
|
||||
<div v-if="row.contributionTypeCode" class="action-btn" @click="onTypeView(row)">
|
||||
<i class="fa fa-eye"></i>
|
||||
<span>专题介绍</span>
|
||||
</div>
|
||||
<div class="action-btn" @click="onView(row)">
|
||||
<i class="fa fa-eye"></i>
|
||||
<span>项目介绍</span>
|
||||
</div>
|
||||
<div v-if="$moment().isBefore($moment(row.contributionStartTime))"
|
||||
class="action-btn" @click="onEdit(row)">
|
||||
<i class="fa fa-edit"></i>
|
||||
<span>编辑</span>
|
||||
</div>
|
||||
<div v-if="$moment().isBefore($moment(row.contributionStartTime))"
|
||||
class="action-btn delete" @click="onDelete(row)">
|
||||
<i class="fa fa-trash"></i>
|
||||
<span>删除</span>
|
||||
</div>
|
||||
</template>
|
||||
</table-list>
|
||||
|
||||
<type-info ref="typeInfoRef"></type-info>
|
||||
<project-info ref="projectInfoRef"></project-info>
|
||||
<apply-form ref="applyFormRef"></apply-form>
|
||||
</div>
|
||||
|
||||
<script nonce="${cspNonce!}">
|
||||
<!--#include('../common/typeInfo.js'){}#-->
|
||||
<!--#include('../common/projectInfo.js'){}#-->
|
||||
<!--#include('../common/applyForm.js'){}#-->
|
||||
new Vue({
|
||||
el: "#app",
|
||||
store,
|
||||
components: {
|
||||
'type-info': typeInfo,
|
||||
'project-info': projectInfo,
|
||||
'apply-form': applyForm,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
pageForm: {
|
||||
pageNumber: 1,
|
||||
pageSize: 10,
|
||||
totalCount: 0,
|
||||
year: new Date().getFullYear(),
|
||||
type: null,
|
||||
},
|
||||
typeOptions: [],
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async onReady() {
|
||||
const typeList = await this.queryType()
|
||||
this.typeOptions = [
|
||||
{
|
||||
text: "全部类型",
|
||||
value: null
|
||||
}
|
||||
].concat(typeList.map((v) => ({ text: v.typeName, value: v.typeCode })))
|
||||
if (this.typeOptions.length > 0) {
|
||||
this.pageForm.type = this.typeOptions[0].value
|
||||
}
|
||||
this.doSearch()
|
||||
},
|
||||
onEdit(row) {
|
||||
this.$refs.applyFormRef.onOpen(row)
|
||||
},
|
||||
onTypeView(row) {
|
||||
this.$refs.typeInfoRef.onOpen(row)
|
||||
},
|
||||
onView(row) {
|
||||
this.$refs.projectInfoRef.onOpen(row)
|
||||
},
|
||||
onDelete(row) {
|
||||
this.$dialog.confirm({
|
||||
title: "提示",
|
||||
message: "您确定要删除吗?"
|
||||
})
|
||||
.then(() => {
|
||||
this.$axios.post("/platform/contribution/mine/h5/delete", { id: row.id }).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$toast.success(res.msg)
|
||||
this.doSearch()
|
||||
} else {
|
||||
this.$toast.fail(res.msg)
|
||||
}
|
||||
})
|
||||
})
|
||||
.catch(() => {})
|
||||
},
|
||||
async queryType() {
|
||||
const res = await this.$axios.post('/platform/contribution/type/queryContributionType')
|
||||
return res.data
|
||||
},
|
||||
doSearch() {
|
||||
this.$nextTick(() => {
|
||||
this.pageForm.pageNumber = 1
|
||||
this.pageForm.totalCount = 0
|
||||
this.$refs.tableListRef.doSearch()
|
||||
})
|
||||
}
|
||||
},
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,652 @@
|
||||
<!--#
|
||||
layout("/layouts/platform_h5.html"){
|
||||
#-->
|
||||
<div id="app">
|
||||
<van-nav-bar title="帮扶申请" left-text="返回" left-arrow @click-left="historyBack" placeholder fixed></van-nav-bar>
|
||||
|
||||
<div class="form-container">
|
||||
<van-form ref="formRef">
|
||||
<van-cell-group title="申请人信息" class="form-section">
|
||||
<van-field label="填写人姓名" :rules="[{ required: true }]" v-model="formData.proxyUserName" readonly
|
||||
required name="proxyUserName"></van-field>
|
||||
<van-field label="填写人工号" :rules="[{ required: true }]" v-model="formData.proxyLoginName" readonly
|
||||
required name="proxyLoginName"></van-field>
|
||||
<van-field label="申请模式" name="mode" required :rules="[{ required: true }]">
|
||||
<template #input>
|
||||
<van-radio-group v-model="formData.mode" @change="modeChange" direction="horizontal">
|
||||
<van-radio name="1" shape="square">本人申请</van-radio>
|
||||
<van-radio
|
||||
v-if="$auth.hasRoleOr('SYSADMIN, SCHOOL_UNION_ADMIN, BRANCH_UNION_CHAIRMAN, BRANCH_UNION_OPERATOR')"
|
||||
name="2" shape="square">替他人申请
|
||||
</van-radio>
|
||||
</van-radio-group>
|
||||
</template>
|
||||
</van-field>
|
||||
</van-cell-group>
|
||||
|
||||
<van-cell-group title="受助人信息" class="form-section">
|
||||
<template v-if="formData.mode == 2">
|
||||
<van-field label="受助人" :rules="[{ required: true }]" v-model="formData.userName"
|
||||
required name="userName" placeholder="请输入受补助人姓名后点击查询">
|
||||
<template #button>
|
||||
<van-button :disabled="formData.id" @click="queryRecipients(formData.userName)"
|
||||
size="small" type="primary">查询
|
||||
</van-button>
|
||||
</template>
|
||||
</van-field>
|
||||
|
||||
<van-action-sheet
|
||||
:actions="subsidizedList"
|
||||
:close-on-click-overlay="false"
|
||||
@cancel="userCancel"
|
||||
@select="onUserSelect"
|
||||
cancel-text="重新输入姓名或工号查询"
|
||||
v-model="userSheetShow">
|
||||
</van-action-sheet>
|
||||
|
||||
</template>
|
||||
<template v-else>
|
||||
<van-field label="受助人" :rules="[{ required: true }]" v-model="formData.userName" readonly
|
||||
required name="userName"></van-field>
|
||||
</template>
|
||||
|
||||
<van-field
|
||||
v-model="formData.sex"
|
||||
label="性别"
|
||||
required
|
||||
is-link
|
||||
placeholder="请选择性别"
|
||||
readonly
|
||||
name="sex"
|
||||
:rules="[{ required: true }]"
|
||||
@click="showSexPicker = true"
|
||||
></van-field>
|
||||
<van-popup v-model="showSexPicker" position="bottom">
|
||||
<van-picker
|
||||
show-toolbar
|
||||
:columns="['男性', '女性']"
|
||||
@confirm="onSexConfirm"
|
||||
@cancel="showSexPicker=false"
|
||||
></van-picker>
|
||||
</van-popup>
|
||||
<van-field
|
||||
v-model="formData.birthday"
|
||||
label="出生年月"
|
||||
is-link
|
||||
placeholder="请填写出生年月"
|
||||
@click="showBirthday"
|
||||
required
|
||||
readonly
|
||||
name="birthday"
|
||||
:rules="[{ required: true }]"
|
||||
></van-field>
|
||||
<van-popup v-model="showDatePicker" position="bottom">
|
||||
<van-datetime-picker
|
||||
type="date"
|
||||
:min-date="new Date(1900, 0, 1)"
|
||||
:max-date="maxDate"
|
||||
@confirm="onDateConfirm"
|
||||
@cancel="showDatePicker=false"
|
||||
></van-datetime-picker>
|
||||
</van-popup>
|
||||
|
||||
<van-field
|
||||
v-model="formData.unionName"
|
||||
label="所在工会"
|
||||
placeholder="请选择所在工会"
|
||||
readonly
|
||||
name="unionName"
|
||||
:rules="[{ required: true }]"
|
||||
required
|
||||
></van-field>
|
||||
<van-field
|
||||
v-model="formData.unitName"
|
||||
label="所在单位"
|
||||
placeholder="请选择所在单位"
|
||||
readonly
|
||||
name="unitName"
|
||||
:rules="[{ required: true }]"
|
||||
required
|
||||
></van-field>
|
||||
<van-field
|
||||
v-model="formData.officialCapacity"
|
||||
label="职务职称"
|
||||
placeholder="请填写职务职称"
|
||||
maxlength="50"
|
||||
clearable
|
||||
required
|
||||
name="officialCapacity"
|
||||
:rules="[{ required: true }]"
|
||||
></van-field>
|
||||
|
||||
<van-field
|
||||
v-model="formData.mobile"
|
||||
label="手机号码"
|
||||
placeholder="请填写手机号码"
|
||||
maxlength="11"
|
||||
clearable
|
||||
required
|
||||
name="mobile"
|
||||
:rules="[{ required: true }]"
|
||||
></van-field>
|
||||
<van-field
|
||||
v-model="formData.idCard"
|
||||
label="身份证号"
|
||||
placeholder="请填写身份证号"
|
||||
maxlength="18"
|
||||
clearable
|
||||
required
|
||||
name="idCard"
|
||||
:rules="[{ required: true }]"
|
||||
></van-field>
|
||||
<van-field
|
||||
v-model="formData.homeAddress"
|
||||
label="家庭住址"
|
||||
type="textarea"
|
||||
placeholder="请填写家庭住址"
|
||||
maxlength="50"
|
||||
required
|
||||
name="homeAddress"
|
||||
:rules="[{ required: true }]"
|
||||
></van-field>
|
||||
|
||||
|
||||
</van-cell-group>
|
||||
|
||||
<van-cell-group title="困难类型及材料" class="form-section">
|
||||
<van-field
|
||||
v-model="formData.subsidyStandards"
|
||||
label="困难类型"
|
||||
placeholder="请选择款项"
|
||||
is-link
|
||||
@click="showSubsidyPicker = true"
|
||||
required
|
||||
name="subsidyStandards"
|
||||
:rules="[{ required: true, message: '请选择款项' }]"
|
||||
></van-field>
|
||||
<van-popup v-model="showSubsidyPicker" position="bottom">
|
||||
<van-picker
|
||||
show-toolbar
|
||||
:columns="subsidyStandards"
|
||||
@confirm="onSubsidyConfirm"
|
||||
@cancel="showSubsidyPicker=false"
|
||||
></van-picker>
|
||||
</van-popup>
|
||||
|
||||
<van-field
|
||||
v-model="formData.bankCardNum"
|
||||
label="收款账户"
|
||||
maxlength="20"
|
||||
clearable
|
||||
name="bankCardNum"
|
||||
placeholder="请填写收款账户"
|
||||
:rules="[{ required: true }]"
|
||||
required
|
||||
></van-field>
|
||||
|
||||
<van-field
|
||||
v-model="formData.bankUserName"
|
||||
label="户名"
|
||||
type="number"
|
||||
placeholder="请填写户名"
|
||||
:rules="[{ required: true }]"
|
||||
required
|
||||
name="bankUserName"
|
||||
></van-field>
|
||||
<van-field
|
||||
v-model="formData.bankOfDeposit"
|
||||
label="开户行"
|
||||
type="number"
|
||||
placeholder="请填写开户行"
|
||||
:rules="[{ required: true }]"
|
||||
required
|
||||
name="bankOfDeposit"
|
||||
></van-field>
|
||||
|
||||
<van-field
|
||||
v-model="formData.reason"
|
||||
label="申请原因"
|
||||
type="textarea"
|
||||
placeholder="请简述申请原因"
|
||||
maxlength="500"
|
||||
required
|
||||
name="reason"
|
||||
:rules="[{ required: true }]"
|
||||
></van-field>
|
||||
</van-cell-group>
|
||||
|
||||
<van-cell-group title="附件信息" class="form-section">
|
||||
<van-field class="more-text" name="files" label="">
|
||||
<template #input>
|
||||
<h5-file-upload
|
||||
slot="input"
|
||||
:value.sync="formData.files"
|
||||
:upload_number="10"
|
||||
upload_mode="file"
|
||||
upload_result_category="array"
|
||||
upload_result_type="url"
|
||||
complete_result
|
||||
></h5-file-upload>
|
||||
</template>
|
||||
</van-field>
|
||||
</van-cell-group>
|
||||
|
||||
<van-cell-group title="签字" class="form-section">
|
||||
<van-field class="more-text" name="sign" label="">
|
||||
<template #input>
|
||||
<h5-signature v-model="formData.sign" slot="input"></h5-signature>
|
||||
</template>
|
||||
</van-field>
|
||||
</van-cell-group>
|
||||
|
||||
<div class="form-actions">
|
||||
<van-button native-type="button" plain type="info" @click="onSave">保存</van-button>
|
||||
<van-button type="primary" @click="onSubmit" v-if="!taskId">提交</van-button>
|
||||
<van-button type="primary" @click="onFinishTask" v-else>提交</van-button>
|
||||
</div>
|
||||
</van-form>
|
||||
</div>
|
||||
|
||||
<van-dialog v-model="showDialog" class="family-dialog" title="添加家庭成员" show-cancel-button
|
||||
:before-close="handleBeforeClose">
|
||||
<van-cell-group>
|
||||
<van-field
|
||||
v-model="newMember.name"
|
||||
label="姓名"
|
||||
placeholder="请输入姓名"
|
||||
required
|
||||
></van-field>
|
||||
<van-field
|
||||
v-model="newMember.age"
|
||||
label="年龄(岁)"
|
||||
type="number"
|
||||
placeholder="请输入年龄"
|
||||
required
|
||||
></van-field>
|
||||
<van-field
|
||||
v-model="newMember.relation"
|
||||
label="关系"
|
||||
placeholder="请输入关系"
|
||||
required
|
||||
></van-field>
|
||||
<van-field
|
||||
v-model="newMember.monthlyIncome"
|
||||
label="月收入(元)"
|
||||
type="number"
|
||||
placeholder="请输入月收入"
|
||||
required
|
||||
></van-field>
|
||||
</van-cell-group>
|
||||
</van-dialog>
|
||||
</div>
|
||||
|
||||
<script nonce="${cspNonce!}">
|
||||
new Vue({
|
||||
el: "#app",
|
||||
store,
|
||||
data() {
|
||||
return {
|
||||
bizId: GetQueryString("bizId"),
|
||||
taskId: GetQueryString("taskId"),
|
||||
showSexPicker: false,
|
||||
showDatePicker: false,
|
||||
showSubsidyPicker: false,
|
||||
formData: {
|
||||
id: GetQueryString("bizId"),
|
||||
mode: "1"
|
||||
},
|
||||
subsidyStandards: [
|
||||
"患重大疾病",
|
||||
"低收入家庭",
|
||||
"因突发变故致困",
|
||||
"长期病休",
|
||||
"其他情况"
|
||||
],
|
||||
newMember: {
|
||||
name: "",
|
||||
age: "",
|
||||
relation: "",
|
||||
monthlyIncome: ""
|
||||
},
|
||||
showDialog: false,
|
||||
isEditing: false,
|
||||
editingIndex: null,
|
||||
|
||||
// 替他人申请相关
|
||||
userSheetShow: false,
|
||||
subsidizedList: [],
|
||||
maxDate: new Date(),
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
historyBack,
|
||||
showBirthday() {
|
||||
if (this.formData.birthday) {
|
||||
this.$set(this.formData, "currentDate", new Date(this.formData.birthday))
|
||||
}
|
||||
this.showDatePicker = true
|
||||
},
|
||||
userCancel() {
|
||||
if (!this.formData.userId) {
|
||||
this.$set(this.formData, "userName", null)
|
||||
}
|
||||
this.subsidizedList = []
|
||||
},
|
||||
// 保存
|
||||
onSave() {
|
||||
this.$dialog.confirm({
|
||||
title: "提示",
|
||||
message: "您确定要保存吗?"
|
||||
}).then(() => {
|
||||
this.$axios.post("/platform/difficultHelp/apply/save", { data: JSON.stringify(this.formData) }).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.$toast("保存成功")
|
||||
this.$pjaxReplace("/platform/difficultHelp/mine/h5")
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
|
||||
// 提交
|
||||
onSubmit() {
|
||||
this.$refs.formRef.validate().then(() => {
|
||||
this.$dialog.confirm({
|
||||
title: "提示",
|
||||
message: "您确定要提交吗?"
|
||||
}).then(() => {
|
||||
const result = this.isValidIdCard(this.formData.idCard)
|
||||
if (result.status === 0) {
|
||||
this.$toast(result.msg)
|
||||
return
|
||||
}
|
||||
const bankRes = this.validateCard(this.formData.bankCardNum)
|
||||
if (bankRes.status === 0) {
|
||||
this.$toast(bankRes.msg)
|
||||
return
|
||||
}
|
||||
|
||||
this.$axios.post("/platform/difficultHelp/apply/submit", {
|
||||
data: JSON.stringify(this.formData)
|
||||
}).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.$toast("提交成功")
|
||||
this.$pjaxReplace("/platform/difficultHelp/mine/h5")
|
||||
}
|
||||
})
|
||||
})
|
||||
})
|
||||
},
|
||||
|
||||
onFinishTask() {
|
||||
this.$refs.formRef.validate().then(() => {
|
||||
this.$dialog.confirm({
|
||||
title: "提示",
|
||||
message: "您确定要提交吗?"
|
||||
}).then(() => {
|
||||
const result = this.isValidIdCard(this.formData.idCard)
|
||||
if (result.status === 0) {
|
||||
this.$toast(result.msg)
|
||||
return
|
||||
}
|
||||
const bankRes = this.validateCard(this.formData.bankCardNum)
|
||||
if (bankRes.status === 0) {
|
||||
this.$toast(bankRes.msg)
|
||||
return
|
||||
}
|
||||
|
||||
this.$axios.post("/platform/difficultHelp/apply/submitAgain", {
|
||||
data: JSON.stringify(this.formData),
|
||||
taskId: GetQueryString("taskId")
|
||||
}).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.$toast("提交成功")
|
||||
this.$pjaxReplace("/platform/difficultHelp/mine/h5")
|
||||
}
|
||||
})
|
||||
})
|
||||
})
|
||||
},
|
||||
|
||||
// 查询受助人
|
||||
async queryRecipients(key) {
|
||||
if (this.formData.mode !== "2") {
|
||||
return
|
||||
}
|
||||
const res = await this.$axios.post("/platform/difficultHelp/apply/queryRecipients", { key })
|
||||
if (res.code === 0) {
|
||||
res.data.forEach((v) => {
|
||||
v.name = v.username
|
||||
return v
|
||||
})
|
||||
this.subsidizedList = res.data
|
||||
this.userSheetShow = true
|
||||
}
|
||||
},
|
||||
|
||||
onUserSelect(val) {
|
||||
const user = this.subsidizedList.find((item) => item.id === val.id)
|
||||
if (user) {
|
||||
this.$set(this.formData, "userId", user.id)
|
||||
this.$set(this.formData, "userName", user.username)
|
||||
this.$set(this.formData, "loginName", user.loginname)
|
||||
this.$set(this.formData, "sex", user.sex)
|
||||
this.$set(this.formData, "unitId", user.unitid)
|
||||
this.$set(this.formData, "unitName", user.unitName)
|
||||
this.$set(this.formData, "unionId", user.unionid)
|
||||
this.$set(this.formData, "unionName", user.unionName)
|
||||
this.$set(this.formData, "birthday", this.$moment(user.birthday).format("YYYY-MM-DD"))
|
||||
this.$set(this.formData, "mobile", user.mobile)
|
||||
} else {
|
||||
this.$set(this.formData, "userId", null)
|
||||
this.$set(this.formData, "userName", null)
|
||||
this.$set(this.formData, "loginName", null)
|
||||
this.$set(this.formData, "sex", null)
|
||||
this.$set(this.formData, "unitId", null)
|
||||
this.$set(this.formData, "unitName", null)
|
||||
this.$set(this.formData, "unionId", null)
|
||||
this.$set(this.formData, "unionName", null)
|
||||
this.$set(this.formData, "birthday", null)
|
||||
this.$set(this.formData, "mobile", null)
|
||||
}
|
||||
this.userSheetShow = false
|
||||
},
|
||||
|
||||
onSexConfirm(value) {
|
||||
this.formData.sex = value
|
||||
this.showSexPicker = false
|
||||
},
|
||||
onDateConfirm(value) {
|
||||
this.formData.birthday = moment(value).format("YYYY-MM-DD")
|
||||
this.showDatePicker = false
|
||||
},
|
||||
onSubsidyConfirm(value) {
|
||||
this.formData.subsidyStandards = value
|
||||
this.showSubsidyPicker = false
|
||||
},
|
||||
handleBeforeClose(action, done) {
|
||||
if (action === "confirm") {
|
||||
if (!this.newMember.name || !this.newMember.age || !this.newMember.relation || !this.newMember.monthlyIncome) {
|
||||
this.$toast("请填写完整信息")
|
||||
done(false)
|
||||
} else {
|
||||
done()
|
||||
if (this.bizId) {
|
||||
this.updateMember()
|
||||
} else {
|
||||
this.addMember()
|
||||
}
|
||||
done()
|
||||
}
|
||||
} else {
|
||||
done()
|
||||
}
|
||||
},
|
||||
|
||||
addMember() {
|
||||
this.formData.familyList.push({ ...this.newMember })
|
||||
this.resetNewMember()
|
||||
},
|
||||
|
||||
editMember(index) {
|
||||
this.newMember = { ...this.formData.familyList[index] }
|
||||
this.editingIndex = index
|
||||
this.isEditing = true
|
||||
this.showDialog = true
|
||||
},
|
||||
updateMember() {
|
||||
this.formData.familyList.splice(this.editingIndex, 1, { ...this.newMember })
|
||||
this.resetNewMember()
|
||||
},
|
||||
removeMember(index) {
|
||||
this.formData.familyList.splice(index, 1)
|
||||
},
|
||||
resetNewMember() {
|
||||
this.newMember = { name: "", age: "", relation: "", monthlyIncome: "" }
|
||||
this.isEditing = false
|
||||
this.editingIndex = null
|
||||
},
|
||||
|
||||
findOne(id) {
|
||||
this.$axios.post("/platform/difficultHelp/mine/findOne", { id }).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.formData = res.data
|
||||
}
|
||||
})
|
||||
},
|
||||
// 申请模式
|
||||
modeChange(val) {
|
||||
const user = this.$store.state.user
|
||||
if (val === "1") {
|
||||
this.$set(this.formData, "userId", user.id)
|
||||
this.$set(this.formData, "userName", user.username)
|
||||
this.$set(this.formData, "loginName", user.loginname)
|
||||
this.$set(this.formData, "proxyUserId", user.id)
|
||||
this.$set(this.formData, "proxyUserName", user.username)
|
||||
this.$set(this.formData, "proxyLoginName", user.loginname)
|
||||
this.$set(this.formData, "mode", "1")
|
||||
this.$set(this.formData, "sex", user.sex)
|
||||
this.$set(this.formData, "unitId", user.unit.id)
|
||||
this.$set(this.formData, "unitName", user.unit.name)
|
||||
this.$set(this.formData, "unionId", user.union.id)
|
||||
this.$set(this.formData, "unionName", user.union.name)
|
||||
this.$set(this.formData, "monthlyIncome", null)
|
||||
this.$set(this.formData, "birthday", this.$moment(user.birthday).format("YYYY-MM-DD"))
|
||||
this.$set(this.formData, "mobile", user.mobile)
|
||||
this.$set(this.formData, "homeAddress", user.homeAddress)
|
||||
this.$set(this.formData, "subsidyStandards", null)
|
||||
this.$set(this.formData, "reason", null)
|
||||
this.$set(this.formData, "remarks", null)
|
||||
this.$set(this.formData, "familyList", [])
|
||||
this.$set(this.formData, "files", [])
|
||||
this.queryRecipients(user.loginname)
|
||||
} else {
|
||||
this.formData = {}
|
||||
this.$set(this.formData, "proxyUserId", user.id)
|
||||
this.$set(this.formData, "proxyUserName", user.username)
|
||||
this.$set(this.formData, "proxyLoginName", user.loginname)
|
||||
this.$set(this.formData, "mode", "2")
|
||||
this.$set(this.formData, "familyList", [])
|
||||
this.$set(this.formData, "files", [])
|
||||
}
|
||||
},
|
||||
/**
|
||||
* 检验身份证号
|
||||
* @param idCard
|
||||
* @returns {{status: number, msg: string}}
|
||||
*/
|
||||
isValidIdCard(idCard) {
|
||||
// 校验18位身份证号
|
||||
const format18 = /^(((([1][1-5])|([2][1-3])|([3][1-7])|([4][1-6])|([5][0-4])|([6][1-5])|([7][1])|([8][1-2]))\d{4})|(([9](([1][1-5])|([2][1-3])|([3][1-7])|([4][1-6])|([5][0-4])|([6][1-5])|([7][1])|([8][1-2])))\d{3}))(([1][9]\d{2})|([2]\d{3}))(([0][1-9])|([1][0-2]))(([0][1-9])|([1-2][0-9])|([3][0-1]))\d{3}[0-9xX]$/
|
||||
// 校验15位身份证号
|
||||
const format15 = /^\d{15}$/
|
||||
// 校验外国人永久居留身份证号
|
||||
const format15Foreign = /^[a-zA-Z]{3}[0-9]{4}[0-9]{2}((01|03|05|07|08|10|12)(0[1-9]|[1-2][0-9]|3[0-1])|(04|06|09|11)(0[1-9]|[1-2][0-9]|30)|02(0[1-9]|[1-2][0-9]))[0-9]{2}$/
|
||||
|
||||
// 校验格式
|
||||
if (!(format18.test(idCard) || format15.test(idCard) || format15Foreign.test(idCard))) {
|
||||
return { status: 0, msg: "身份证号码格式不正确" }
|
||||
}
|
||||
|
||||
// 校验出生日期
|
||||
let year, month, day
|
||||
if (idCard.length === 18) {
|
||||
year = idCard.substr(6, 4)
|
||||
month = idCard.substr(10, 2)
|
||||
day = idCard.substr(12, 2)
|
||||
} else if (idCard.length === 15) {
|
||||
year = "19" + idCard.substr(6, 2)
|
||||
month = idCard.substr(8, 2)
|
||||
day = idCard.substr(10, 2)
|
||||
} else {
|
||||
return { status: 0, msg: "身份证号码格式不正确" }
|
||||
}
|
||||
|
||||
const date = new Date(year, month - 1, day)
|
||||
if (date.getFullYear() !== parseInt(year, 10) || date.getMonth() + 1 !== parseInt(month, 10) || date.getDate() !== parseInt(day, 10)) {
|
||||
return { status: 0, msg: "身份证出生日期不正确" }
|
||||
}
|
||||
|
||||
// 校验18位身份证号的校验码
|
||||
if (idCard.length === 18) {
|
||||
const coefficients = [7, 9, 10, 5, 8, 4, 2, 1, 6, 3, 7, 9, 10, 5, 8, 4, 2]
|
||||
const checkCodeMap = ["1", "0", "X", "9", "8", "7", "6", "5", "4", "3", "2"]
|
||||
let sum = 0
|
||||
for (let i = 0; i < 17; i++) {
|
||||
sum += parseInt(idCard.charAt(i), 10) * coefficients[i]
|
||||
}
|
||||
const checkCode = checkCodeMap[sum % 11]
|
||||
if (checkCode.toUpperCase() !== idCard.charAt(17).toUpperCase()) {
|
||||
return { status: 0, msg: "身份证校验码不正确" }
|
||||
}
|
||||
}
|
||||
|
||||
return { status: 1, msg: "校验通过" }
|
||||
},
|
||||
/**
|
||||
* 校验银行卡号
|
||||
* @param bankCardNum
|
||||
* @returns {{status: number, msg: string}}
|
||||
*/
|
||||
validateCard(bankCardNum) {
|
||||
// 移除所有空格
|
||||
bankCardNum = bankCardNum.replace(/\s+/g, "")
|
||||
// 检查格式
|
||||
const cardRegex = /^\d{13,19}$/
|
||||
if (!cardRegex.test(bankCardNum)) {
|
||||
return { status: 0, msg: "卡号格式不正确,请输入13到19位数字。" }
|
||||
}
|
||||
// 检查Luhn算法
|
||||
if (!/^\d+$/.test(bankCardNum)) {
|
||||
return { status: 0, msg: "无效的卡号,请检查后再试。" }
|
||||
}
|
||||
let sum = 0
|
||||
let shouldDouble = false
|
||||
for (let i = bankCardNum.length - 1; i >= 0; i--) {
|
||||
let digit = parseInt(bankCardNum.charAt(i))
|
||||
if (shouldDouble) {
|
||||
digit *= 2
|
||||
if (digit > 9) {
|
||||
digit -= 9
|
||||
}
|
||||
}
|
||||
sum += digit
|
||||
shouldDouble = !shouldDouble
|
||||
}
|
||||
if ((sum % 10) !== 0) {
|
||||
return { status: 0, msg: "无效的卡号,请检查后再试。" }
|
||||
}
|
||||
return { status: 200, msg: "卡号有效。" }
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
if (this.bizId) {
|
||||
this.findOne(this.bizId)
|
||||
} else {
|
||||
this.modeChange("1")
|
||||
}
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
+224
@@ -0,0 +1,224 @@
|
||||
<!--#
|
||||
layout("/layouts/platform_h5.html"){
|
||||
#-->
|
||||
<div id="app">
|
||||
<van-sticky>
|
||||
<van-nav-bar title="帮扶分工会审核" left-text="返回" left-arrow @click-left="historyBack" placeholder fixed></van-nav-bar>
|
||||
<van-search
|
||||
v-model="pageForm.searchKeyword"
|
||||
placeholder="请输入工号或者姓名进行查询"
|
||||
show-action
|
||||
:reverse-color="false"
|
||||
input-align="left"
|
||||
@search="doSearch">
|
||||
<template #action>
|
||||
<div @click="doSearch">搜索</div>
|
||||
</template>
|
||||
</van-search>
|
||||
<van-dropdown-menu
|
||||
v-if="$auth.hasRoleOr('SYSADMIN,SCHOOL_UNION_ADMIN,BRANCH_UNION_CHAIRMAN')"
|
||||
:close-on-click-outside="false"
|
||||
:close-on-click-overlay="false"
|
||||
>
|
||||
<van-dropdown-item :options="unionList" @change="unionChange" v-model="pageForm.unionId"></van-dropdown-item>
|
||||
<van-dropdown-item :options="unitList" @change="doSearch" v-model="pageForm.unitId"></van-dropdown-item>
|
||||
</van-dropdown-menu>
|
||||
<van-tabs v-model="pageForm.approvalText"
|
||||
@change="(val)=>{this.pageForm.audit = val==='1';this.doSearch();}">
|
||||
<van-tab title="已审核" name="1"></van-tab>
|
||||
<van-tab title="未审核" name="0"></van-tab>
|
||||
</van-tabs>
|
||||
</van-sticky>
|
||||
|
||||
<table-list api="/platform/difficultHelp/branchUnionApproval/pageData" :page_form.sync="pageForm" ref="tableListRef" title="userName" @ready="onReady">
|
||||
<template v-slot="{index,row}">
|
||||
<table-column label="受助人">{{row.userName + '(' + row.loginName + ')'}}</table-column>
|
||||
<table-column label="所属工会">{{row.unionName}}</table-column>
|
||||
<table-column label="工作单位">{{row.unitName}}</table-column>
|
||||
<table-column label="困难类型">{{row.subsidyStandards}}</table-column>
|
||||
<table-column label="填报时间">{{row.applyTime}}</table-column>
|
||||
<table-column label="当前节点">{{row.curTaskName}}</table-column>
|
||||
</template>
|
||||
<template #actions="{index,row}">
|
||||
<div class="action-btn" @click="onView(row)">
|
||||
<i class="fa fa-eye"></i>
|
||||
<span>查看</span>
|
||||
</div>
|
||||
<div class="action-btn" v-if="row.taskState === 10" @click="onApproval(row)">
|
||||
<i class="fa fa-check"></i>
|
||||
<span>审核</span>
|
||||
</div>
|
||||
<div class="action-btn delete" v-if="row.canRevoke" @click="onRevoke(row)">
|
||||
<i class="fa fa-undo"></i>
|
||||
<span>撤回</span>
|
||||
</div>
|
||||
</template>
|
||||
</table-list>
|
||||
|
||||
|
||||
<info ref="infoRef">
|
||||
<div v-if="showApprovalForm">
|
||||
<div class="process-title">{{formData.taskName}}</div>
|
||||
<van-form ref="formRef">
|
||||
<van-field
|
||||
v-model="formData.tf_opinion"
|
||||
name="tf_opinion"
|
||||
label="审批意见"
|
||||
placeholder="请输入审批意见"
|
||||
:rules="[{ required: true, message: '请填写审批意见' }]"
|
||||
required
|
||||
maxlength="100"
|
||||
show-word-limit
|
||||
></van-field>
|
||||
</van-form>
|
||||
<div style="display: flex; justify-content: space-between; column-gap: 10px; padding: 10px">
|
||||
<van-button type="danger" block @click="handleTaskAction(6)">退回</van-button>
|
||||
<van-button type="danger" block @click="handleTaskAction(2)">拒绝</van-button>
|
||||
<van-button type="primary" block @click="handleTaskAction(1)">同意</van-button>
|
||||
</div>
|
||||
</div>
|
||||
</info>
|
||||
</div>
|
||||
<script nonce="${cspNonce!}">
|
||||
<!--#include("../common/info.js"){}#-->
|
||||
|
||||
new Vue({
|
||||
el: '#app',
|
||||
store,
|
||||
data() {
|
||||
return {
|
||||
pageForm: {
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
searchKeyword: '',
|
||||
unionId: '',
|
||||
unitId: '',
|
||||
approvalText: "0",
|
||||
audit: false
|
||||
},
|
||||
unionList: [],
|
||||
unitList: [],
|
||||
|
||||
formData: {},
|
||||
showApprovalForm: false
|
||||
}
|
||||
},
|
||||
components: {
|
||||
"info": INFO
|
||||
},
|
||||
methods: {
|
||||
historyBack,
|
||||
|
||||
onReady() {
|
||||
this.doSearch()
|
||||
},
|
||||
|
||||
doSearch() {
|
||||
this.$nextTick(() => {
|
||||
this.pageForm.pageNumber = 1
|
||||
this.pageForm.totalCount = 0
|
||||
this.$refs.tableListRef.doSearch()
|
||||
})
|
||||
},
|
||||
|
||||
// 查看详情
|
||||
onView(row) {
|
||||
this.showApprovalForm = false
|
||||
this.$refs.infoRef.onOpen(row)
|
||||
},
|
||||
|
||||
onApproval(row) {
|
||||
this.showApprovalForm = true
|
||||
this.$refs.infoRef.onOpen(row)
|
||||
this.formData = {
|
||||
processTaskId: row.taskId,
|
||||
taskName: row.curTaskName
|
||||
}
|
||||
},
|
||||
|
||||
async handleTaskAction(val) {
|
||||
try {
|
||||
await this.$refs.formRef.validate();
|
||||
this.$dialog.confirm({
|
||||
title: "提示",
|
||||
message: "您确定要提交吗?"
|
||||
}).then(() => {
|
||||
this.$axios.post("/flow/common/executeTask", {
|
||||
data: JSON.stringify({
|
||||
...this.formData,
|
||||
submitType: val
|
||||
})
|
||||
}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$refs.infoRef.onClose()
|
||||
this.$toast.success(res.msg)
|
||||
this.doSearch()
|
||||
}
|
||||
})
|
||||
}).catch(() => {
|
||||
|
||||
})
|
||||
} catch (error) {
|
||||
|
||||
}
|
||||
},
|
||||
|
||||
// 撤回
|
||||
onRevoke(row) {
|
||||
debugger
|
||||
this.$dialog.confirm({
|
||||
title: '提示',
|
||||
message: '您确定要撤回吗?',
|
||||
}).then(() => {
|
||||
this.$axios.post('/flow/common/revokeTask', {taskId: row.taskId}).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.$toast.success('撤回成功');
|
||||
this.doSearch();
|
||||
}
|
||||
})
|
||||
}).catch(() => {
|
||||
});
|
||||
},
|
||||
unionChange() {
|
||||
this.$set(this.pageForm, "unitId", null)
|
||||
this.flushUnits()
|
||||
this.doSearch()
|
||||
},
|
||||
async initUnion() {
|
||||
const hasAdmin = this.$auth.hasRoleOr(["SYSADMIN", "SCHOOL_UNION_ADMIN"])
|
||||
const unionId = hasAdmin ? null : this.$store.state.user.union.id
|
||||
this.unionList = await this.$businessTool.listUnion(unionId)
|
||||
this.unionList.forEach((v) => {
|
||||
v.text = v.name
|
||||
v.value = v.id
|
||||
})
|
||||
if (hasAdmin) {
|
||||
this.unionList.unshift({ text: "全部工会", value: null })
|
||||
}
|
||||
if (this.unionList && this.unionList.length > 0) {
|
||||
this.$set(this.pageForm, "unionId", this.unionList[0].value)
|
||||
}
|
||||
},
|
||||
async flushUnits() {
|
||||
const hasAdmin = this.$auth.hasRoleOr(["SYSADMIN", "SCHOOL_UNION_ADMIN"])
|
||||
const unionId = hasAdmin ? this.pageForm.unionId : this.$store.state.user.union.id
|
||||
this.unitList = await this.$businessTool.listUnit(unionId)
|
||||
this.unitList.forEach((v) => {
|
||||
v.text = v.name
|
||||
v.value = v.id
|
||||
})
|
||||
this.unitList.unshift({ text: "全部单位", value: null })
|
||||
if (this.unitList && this.unitList.length > 0) {
|
||||
this.$set(this.pageForm, "unitId", this.unitList[0].value)
|
||||
}
|
||||
},
|
||||
},
|
||||
async created() {
|
||||
await this.initUnion()
|
||||
await this.flushUnits()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,153 @@
|
||||
const INFO = {
|
||||
template: /*language=HTML*/ `
|
||||
<van-action-sheet v-model="visible" title="查看详情">
|
||||
<div class="detail-container">
|
||||
<van-cell-group title="基本信息">
|
||||
<van-cell title="填写人姓名">{{viewData.proxyUserName}}</van-cell>
|
||||
<van-cell title="填写人工号">{{viewData.proxyLoginName}}</van-cell>
|
||||
<van-cell title="申请模式">{{viewData.mode == 1 ? '本人申请' : '替他人申请'}}</van-cell>
|
||||
|
||||
<van-cell title="受助人">{{ viewData.userName + '(' + viewData.loginName + ')' }}</van-cell>
|
||||
<van-cell title="性别">{{viewData.sex}}</van-cell>
|
||||
<van-cell title="出生年月">{{viewData.birthday}}</van-cell>
|
||||
|
||||
<van-cell title="所属工会">{{viewData.unionName}}</van-cell>
|
||||
<van-cell title="所属单位">{{viewData.unitName}}</van-cell>
|
||||
<van-cell title="职务职称">{{viewData.officialCapacity}}</van-cell>
|
||||
|
||||
<van-cell title="手机号码">{{viewData.mobile}}</van-cell>
|
||||
<van-cell title="身份证号">{{viewData.idCard}}</van-cell>
|
||||
<van-cell title="家庭住址">{{viewData.homeAddress}}</van-cell>
|
||||
<van-cell title="收款账户">{{viewData.bankCardNum}}</van-cell>
|
||||
<van-cell title="户名">{{viewData.bankUserName}}</van-cell>
|
||||
<van-cell title="开户行">{{viewData.bankOfDeposit}}</van-cell>
|
||||
|
||||
|
||||
<van-cell title="困难类型">{{viewData.subsidyStandards}}</van-cell>
|
||||
<van-cell title="申请原因">{{viewData.reason}}</van-cell>
|
||||
|
||||
<van-cell class="direction-column-cell" title="附件">
|
||||
<file-preview :files="viewData.files" complete_result></file-preview>
|
||||
</van-cell>
|
||||
<van-cell title="签字">
|
||||
<van-image v-if="viewData.sign" :src="viewData.sign"
|
||||
class="signature-image"></van-image>
|
||||
<span v-else>暂无</span>
|
||||
</van-cell>
|
||||
</van-cell-group>
|
||||
|
||||
<!-- <van-cell-group title="家庭成员经济收入" v-if="viewData.familyList && viewData.familyList.length > 0">
|
||||
<table class="table-class">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>序号</th>
|
||||
<th>姓名</th>
|
||||
<th>年龄</th>
|
||||
<th>关系</th>
|
||||
<th>月收入(元)</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="(item,index) in viewData.familyList" :key="index">
|
||||
<td>{{ index + 1 }}</td>
|
||||
<td>{{ item.name }}</td>
|
||||
<td>{{ item.age }}</td>
|
||||
<td>{{ item.relation }}</td>
|
||||
<td>{{ item.monthlyIncome }}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</van-cell-group>-->
|
||||
|
||||
<template v-for="task in doneTasks">
|
||||
<van-cell-group :title="task.displayName" v-if="task.ext.isFirstTaskNode">
|
||||
<van-cell title="申请用户">{{ task.ext.initiatorName }}({{task.ext.initiatorAccount}})
|
||||
</van-cell>
|
||||
<van-cell title="申请时间">{{ task.finishTime }}</van-cell>
|
||||
<van-cell title="办理结果">
|
||||
<dict-tag :options="dict.type.PROCESS_TASK_SUBMIT_TYPE"
|
||||
:value="task.ext.submitType"></dict-tag>
|
||||
</van-cell>
|
||||
</van-cell-group>
|
||||
|
||||
<van-cell-group :title="task.displayName" v-else>
|
||||
<van-cell title="办理用户">{{ task.taskFormData.userName }}({{task.taskFormData.loginName}})
|
||||
</van-cell>
|
||||
<van-cell title="办理时间">{{ task.finishTime }}</van-cell>
|
||||
<van-cell title="办理结果">
|
||||
<dict-tag :options="dict.type.PROPOSAL_CASE_FILING_RESULT"
|
||||
:value="task.ext.caseFilingResult"></dict-tag>
|
||||
</van-cell>
|
||||
<van-cell title="办理意见" v-if="!task.ext.isFirstTaskNode" class="direction-column-cell">
|
||||
<div v-html="task.taskFormData.tf_opinion"></div>
|
||||
</van-cell>
|
||||
</van-cell-group>
|
||||
</template>
|
||||
</div>
|
||||
<slot></slot>
|
||||
</van-action-sheet>
|
||||
`,
|
||||
dicts: ["PROCESS_TASK_SUBMIT_TYPE"],
|
||||
data() {
|
||||
return {
|
||||
visible: false,
|
||||
row: {},
|
||||
viewData: {},
|
||||
doneTasks: [],
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 打开
|
||||
onOpen(row) {
|
||||
this.row = row
|
||||
this.visible = true
|
||||
this.info()
|
||||
this.getDoneTasks()
|
||||
},
|
||||
|
||||
// 关闭
|
||||
onClose(){
|
||||
this.visible = false
|
||||
},
|
||||
|
||||
// 获取申请信息
|
||||
info() {
|
||||
this.$axios.post("/platform/difficultHelp/mine/findOne", { id: this.row.id }).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.viewData = res.data
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
// 获取已办任务审批记录
|
||||
getDoneTasks() {
|
||||
this.$axios.post("/flow/common/doneTasks", { bizId: this.row.id }).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.doneTasks = res.data
|
||||
}
|
||||
})
|
||||
},
|
||||
},
|
||||
style: /*language=CSS*/ `
|
||||
/deep/ .table-class{
|
||||
width: 100%;
|
||||
border-radius: 5px;
|
||||
overflow: hidden;
|
||||
line-height: 1.5rem;
|
||||
font-size: 13px;
|
||||
table-layout: fixed;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
/deep/ .table-class th {
|
||||
background-color: #f2f2f2;
|
||||
border: 1px solid #dddddd;
|
||||
}
|
||||
/deep/ .table-class tr {
|
||||
text-align: center;
|
||||
border-bottom: 1px solid #dddddd;
|
||||
}
|
||||
/deep/ .table-class td {
|
||||
border: 1px solid #dddddd;
|
||||
}
|
||||
`
|
||||
}
|
||||
@@ -0,0 +1,175 @@
|
||||
<!--#
|
||||
layout("/layouts/platform_h5.html"){
|
||||
#-->
|
||||
<div id="app">
|
||||
<van-sticky>
|
||||
<van-nav-bar title="帮扶申请记录" left-text="返回" left-arrow @click-left="historyBack" placeholder fixed></van-nav-bar>
|
||||
<van-search
|
||||
v-model="pageForm.searchKeyword"
|
||||
placeholder="请输入工号或者姓名进行查询"
|
||||
show-action
|
||||
:reverse-color="false"
|
||||
input-align="left"
|
||||
@search="doSearch">
|
||||
<template #action>
|
||||
<div @click="doSearch">搜索</div>
|
||||
</template>
|
||||
</van-search>
|
||||
<van-dropdown-menu
|
||||
v-if="$auth.hasRoleOr('SYSADMIN,SCHOOL_UNION_ADMIN,BRANCH_UNION_CHAIRMAN')"
|
||||
:close-on-click-outside="false"
|
||||
:close-on-click-overlay="false"
|
||||
>
|
||||
<van-dropdown-item :options="unionList" @change="unionChange" v-model="pageForm.unionId"></van-dropdown-item>
|
||||
<van-dropdown-item :options="unitList" @change="doSearch" v-model="pageForm.unitId"></van-dropdown-item>
|
||||
</van-dropdown-menu>
|
||||
</van-sticky>
|
||||
|
||||
<table-list api="/platform/difficultHelp/mine/pageData" :page_form.sync="pageForm" ref="tableListRef" title="userName" @ready="doSearch">
|
||||
<template v-slot="{index,row}">
|
||||
<table-column label="受助人">{{row.userName + '(' + row.loginName + ')'}}</table-column>
|
||||
<table-column label="所属工会">{{row.unionName}}</table-column>
|
||||
<table-column label="工作单位">{{row.unitName}}</table-column>
|
||||
<table-column label="困难类型">{{row.subsidyStandards}}</table-column>
|
||||
<table-column label="填报时间">{{row.applyTime}}</table-column>
|
||||
<table-column label="当前节点">{{row.taskName}}</table-column>
|
||||
</template>
|
||||
<template #actions="{index,row}">
|
||||
<div class="action-btn" @click="onView(row)">
|
||||
<i class="fa fa-eye"></i>
|
||||
<span>查看</span>
|
||||
</div>
|
||||
<div class="action-btn" v-if="row.taskKey === 'startTask' || !row.instanceId"
|
||||
@click="onEdit(row)">
|
||||
<i class="fa fa-edit"></i>
|
||||
<span>编辑</span>
|
||||
</div>
|
||||
<div class="action-btn delete" v-if="row.canRevoke" @click="onRevoke(row)">
|
||||
<i class="fa fa-undo"></i>
|
||||
<span>撤回</span>
|
||||
</div>
|
||||
<div class="action-btn delete" v-if="row.taskKey === 'startTask' || !row.instanceId"
|
||||
@click="onDelete(row.id)">
|
||||
<i class="fa fa-trash"></i>
|
||||
<span>删除</span>
|
||||
</div>
|
||||
</template>
|
||||
</table-list>
|
||||
|
||||
<info ref="infoRef"></info>
|
||||
</div>
|
||||
<script nonce="${cspNonce!}">
|
||||
<!--#include("../common/info.js"){}#-->
|
||||
new Vue({
|
||||
el: '#app',
|
||||
store,
|
||||
data() {
|
||||
return {
|
||||
pageForm: {
|
||||
pageNumber: 1,
|
||||
pageSize: 10,
|
||||
totalCount: 0,
|
||||
searchKeyword: "",
|
||||
unionId: "",
|
||||
unitId: ""
|
||||
},
|
||||
unionList: [],
|
||||
unitList: [],
|
||||
}
|
||||
},
|
||||
components: {
|
||||
"info": INFO
|
||||
},
|
||||
methods: {
|
||||
historyBack,
|
||||
|
||||
onView(row) {
|
||||
this.$refs.infoRef.onOpen(row)
|
||||
},
|
||||
|
||||
onEdit(row) {
|
||||
this.$pjaxReplace('/platform/difficultHelp/apply/h5?taskId=' + (row.startTaskId || '') + "&bizId=" + row.id)
|
||||
},
|
||||
|
||||
onRevoke(row) {
|
||||
this.$dialog.confirm({
|
||||
title: "提示",
|
||||
message: "您确定要撤销吗?",
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消"
|
||||
}).then(() => {
|
||||
this.$axios.post("/flow/common/revokeTask", { taskId: row.startTaskId }).then((resp) => {
|
||||
this.$toast.success(resp.msg)
|
||||
this.doSearch()
|
||||
})
|
||||
})
|
||||
},
|
||||
|
||||
onDelete(id) {
|
||||
this.$dialog.confirm({
|
||||
title: "提示",
|
||||
message: "您确定要删除吗?",
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消"
|
||||
}).then(() => {
|
||||
this.$axios.post("/platform/difficultHelp/mine/onDelete", { id }).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.doSearch()
|
||||
this.$toast.success(res.msg)
|
||||
} else {
|
||||
this.$toast.fail(res.msg)
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
|
||||
doSearch() {
|
||||
this.pageForm.pageNumber = 1
|
||||
this.pageForm.totalCount = 0
|
||||
this.$refs.tableListRef.doSearch()
|
||||
},
|
||||
unionChange() {
|
||||
this.$set(this.pageForm, "unitId", null)
|
||||
this.flushUnits()
|
||||
this.doSearch()
|
||||
},
|
||||
async initUnion() {
|
||||
const hasAdmin = this.$auth.hasRoleOr(["SYSADMIN", "SCHOOL_UNION_ADMIN"])
|
||||
const unionId = hasAdmin ? null : this.$store.state.user.union.id
|
||||
this.unionList = await this.$businessTool.listUnion(unionId)
|
||||
this.unionList.forEach((v) => {
|
||||
v.text = v.name
|
||||
v.value = v.id
|
||||
})
|
||||
if (hasAdmin) {
|
||||
this.unionList.unshift({ text: "全部工会", value: null })
|
||||
}
|
||||
if (this.unionList && this.unionList.length > 0) {
|
||||
this.$set(this.pageForm, "unionId", this.unionList[0].value)
|
||||
}
|
||||
},
|
||||
async flushUnits() {
|
||||
const hasAdmin = this.$auth.hasRoleOr(["SYSADMIN", "SCHOOL_UNION_ADMIN"])
|
||||
const unionId = hasAdmin ? this.pageForm.unionId : this.$store.state.user.union.id
|
||||
this.unitList = await this.$businessTool.listUnit(unionId)
|
||||
this.unitList.forEach((v) => {
|
||||
v.text = v.name
|
||||
v.value = v.id
|
||||
})
|
||||
if (hasAdmin && !this.pageForm.unionId) {
|
||||
this.unitList.unshift({ text: "全部单位", value: null })
|
||||
}
|
||||
if (this.unitList && this.unitList.length > 0) {
|
||||
this.$set(this.pageForm, "unitId", this.unitList[0].value)
|
||||
}
|
||||
},
|
||||
},
|
||||
async created() {
|
||||
await this.initUnion()
|
||||
await this.flushUnits()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
+225
@@ -0,0 +1,225 @@
|
||||
<!--#
|
||||
layout("/layouts/platform_h5.html"){
|
||||
#-->
|
||||
<div id="app">
|
||||
<van-sticky>
|
||||
<van-nav-bar title="帮扶校工会审核" left-text="返回" left-arrow @click-left="historyBack" placeholder fixed></van-nav-bar>
|
||||
<van-search
|
||||
v-model="pageForm.searchKeyword"
|
||||
placeholder="请输入工号或者姓名进行查询"
|
||||
show-action
|
||||
:reverse-color="false"
|
||||
input-align="left"
|
||||
@search="doSearch">
|
||||
<template #action>
|
||||
<div @click="doSearch">搜索</div>
|
||||
</template>
|
||||
</van-search>
|
||||
<van-dropdown-menu
|
||||
v-if="$auth.hasRoleOr('SYSADMIN,SCHOOL_UNION_ADMIN,BRANCH_UNION_CHAIRMAN')"
|
||||
:close-on-click-outside="false"
|
||||
:close-on-click-overlay="false"
|
||||
>
|
||||
<van-dropdown-item :options="unionList" @change="unionChange" v-model="pageForm.unionId"></van-dropdown-item>
|
||||
<van-dropdown-item :options="unitList" @change="doSearch" v-model="pageForm.unitId"></van-dropdown-item>
|
||||
</van-dropdown-menu>
|
||||
<van-tabs v-model="pageForm.approvalText"
|
||||
@change="(val)=>{this.pageForm.audit = val==='1';this.doSearch();}">
|
||||
<van-tab title="已审核" name="1"></van-tab>
|
||||
<van-tab title="未审核" name="0"></van-tab>
|
||||
</van-tabs>
|
||||
</van-sticky>
|
||||
|
||||
<table-list api="/platform/difficultHelp/schoolUnionApproval/pageData" :page_form.sync="pageForm" ref="tableListRef" title="userName" @ready="onReady">
|
||||
<template v-slot="{index,row}">
|
||||
<table-column label="受助人">{{row.userName + '(' + row.loginName + ')'}}</table-column>
|
||||
<table-column label="所属工会">{{row.unionName}}</table-column>
|
||||
<table-column label="工作单位">{{row.unitName}}</table-column>
|
||||
<table-column label="困难类型">{{row.subsidyStandards}}</table-column>
|
||||
<table-column label="填报时间">{{row.applyTime}}</table-column>
|
||||
<table-column label="当前节点">{{row.curTaskName}}</table-column>
|
||||
</template>
|
||||
<template #actions="{index,row}">
|
||||
<div class="action-btn" @click="onView(row)">
|
||||
<i class="fa fa-eye"></i>
|
||||
<span>查看</span>
|
||||
</div>
|
||||
<div class="action-btn" v-if="row.taskState === 10" @click="onApproval(row)">
|
||||
<i class="fa fa-check"></i>
|
||||
<span>审核</span>
|
||||
</div>
|
||||
<div class="action-btn delete" v-if="row.canRevoke" @click="onRevoke(row)">
|
||||
<i class="fa fa-undo"></i>
|
||||
<span>撤回</span>
|
||||
</div>
|
||||
</template>
|
||||
</table-list>
|
||||
|
||||
|
||||
<info ref="infoRef">
|
||||
<div v-if="showApprovalForm">
|
||||
<div class="process-title">{{formData.taskName}}</div>
|
||||
<van-form ref="formRef">
|
||||
<van-field
|
||||
v-model="formData.tf_opinion"
|
||||
name="tf_opinion"
|
||||
label="审批意见"
|
||||
placeholder="请输入审批意见"
|
||||
:rules="[{ required: true, message: '请填写审批意见' }]"
|
||||
required
|
||||
maxlength="100"
|
||||
show-word-limit
|
||||
></van-field>
|
||||
</van-form>
|
||||
<div style="display: flex; justify-content: space-between; column-gap: 10px; padding: 10px">
|
||||
<van-button type="danger" block @click="handleTaskAction(6)">退回</van-button>
|
||||
<van-button type="danger" block @click="handleTaskAction(2)">拒绝</van-button>
|
||||
<van-button type="primary" block @click="handleTaskAction(1)">同意</van-button>
|
||||
</div>
|
||||
</div>
|
||||
</info>
|
||||
</div>
|
||||
<script nonce="${cspNonce!}">
|
||||
<!--#include("../common/info.js"){}#-->
|
||||
|
||||
new Vue({
|
||||
el: '#app',
|
||||
store,
|
||||
data() {
|
||||
return {
|
||||
pageForm: {
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
searchKeyword: '',
|
||||
unionId: '',
|
||||
unitId: '',
|
||||
approvalText: "0",
|
||||
audit: false
|
||||
},
|
||||
unionList: [],
|
||||
unitList: [],
|
||||
|
||||
formData: {},
|
||||
showApprovalForm: false
|
||||
}
|
||||
},
|
||||
components: {
|
||||
"info": INFO
|
||||
},
|
||||
methods: {
|
||||
historyBack,
|
||||
|
||||
onReady() {
|
||||
this.doSearch()
|
||||
},
|
||||
|
||||
doSearch() {
|
||||
this.$nextTick(() => {
|
||||
this.pageForm.pageNumber = 1
|
||||
this.pageForm.totalCount = 0
|
||||
this.$refs.tableListRef.doSearch()
|
||||
})
|
||||
},
|
||||
|
||||
// 查看详情
|
||||
onView(row) {
|
||||
this.showApprovalForm = false
|
||||
this.$refs.infoRef.onOpen(row)
|
||||
},
|
||||
|
||||
onApproval(row) {
|
||||
this.showApprovalForm = true
|
||||
this.$refs.infoRef.onOpen(row)
|
||||
this.formData = {
|
||||
processTaskId: row.taskId,
|
||||
taskName: row.curTaskName
|
||||
}
|
||||
},
|
||||
|
||||
async handleTaskAction(val) {
|
||||
try {
|
||||
await this.$refs.formRef.validate();
|
||||
this.$dialog.confirm({
|
||||
title: "提示",
|
||||
message: "您确定要提交吗?"
|
||||
}).then(() => {
|
||||
this.$axios.post("/flow/common/executeTask", {
|
||||
data: JSON.stringify({
|
||||
...this.formData,
|
||||
submitType: val
|
||||
})
|
||||
}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$refs.infoRef.onClose()
|
||||
this.$toast.success(res.msg)
|
||||
this.doSearch()
|
||||
}
|
||||
})
|
||||
}).catch(() => {
|
||||
|
||||
})
|
||||
} catch (error) {
|
||||
|
||||
}
|
||||
},
|
||||
|
||||
// 撤回
|
||||
onRevoke(row) {
|
||||
this.$dialog.confirm({
|
||||
title: '提示',
|
||||
message: '您确定要撤回吗?',
|
||||
}).then(() => {
|
||||
this.$axios.post('/flow/common/revokeTask', {taskId: row.taskId}).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.$toast.success('撤回成功');
|
||||
this.doSearch();
|
||||
}
|
||||
})
|
||||
}).catch(() => {
|
||||
});
|
||||
},
|
||||
unionChange() {
|
||||
this.$set(this.pageForm, "unitId", null)
|
||||
this.flushUnits()
|
||||
this.doSearch()
|
||||
},
|
||||
async initUnion() {
|
||||
const hasAdmin = this.$auth.hasRoleOr(["SYSADMIN", "SCHOOL_UNION_ADMIN"])
|
||||
const unionId = hasAdmin ? null : this.$store.state.user.union.id
|
||||
this.unionList = await this.$businessTool.listUnion(unionId)
|
||||
this.unionList.forEach((v) => {
|
||||
v.text = v.name
|
||||
v.value = v.id
|
||||
})
|
||||
if (hasAdmin) {
|
||||
this.unionList.unshift({ text: "全部工会", value: null })
|
||||
}
|
||||
if (this.unionList && this.unionList.length > 0) {
|
||||
this.$set(this.pageForm, "unionId", this.unionList[0].value)
|
||||
}
|
||||
},
|
||||
async flushUnits() {
|
||||
const hasAdmin = this.$auth.hasRoleOr(["SYSADMIN", "SCHOOL_UNION_ADMIN"])
|
||||
const unionId = hasAdmin ? this.pageForm.unionId : this.$store.state.user.union.id
|
||||
this.unitList = await this.$businessTool.listUnit(unionId)
|
||||
this.unitList.forEach((v) => {
|
||||
v.text = v.name
|
||||
v.value = v.id
|
||||
})
|
||||
if (hasAdmin && !this.pageForm.unionId) {
|
||||
this.unitList.unshift({ text: "全部单位", value: null })
|
||||
}
|
||||
if (this.unitList && this.unitList.length > 0) {
|
||||
this.$set(this.pageForm, "unitId", this.unitList[0].value)
|
||||
}
|
||||
},
|
||||
},
|
||||
async created() {
|
||||
await this.initUnion()
|
||||
await this.flushUnits()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,431 @@
|
||||
<!--#
|
||||
layout("/layouts/platform_h5.html"){
|
||||
#-->
|
||||
|
||||
<style>
|
||||
.signature-image {
|
||||
max-width: 200px;
|
||||
max-height: 100px;
|
||||
}
|
||||
</style>
|
||||
<div id="app" v-cloak>
|
||||
<van-nav-bar title="独生子女父母退休申请" left-text="返回" left-arrow @click-left="historyBack" placeholder fixed z-index="999"
|
||||
class="custom-nav"></van-nav-bar>
|
||||
|
||||
<div class="form-container">
|
||||
<van-form ref="formRef">
|
||||
<van-cell-group title="人员信息" class="form-section">
|
||||
<van-field label="职工姓名" v-model="formData.userName" placeholder="从信息中心获取"
|
||||
readonly></van-field>
|
||||
<van-field label="性别" v-model="formData.sex" placeholder="从信息中心获取" readonly></van-field>
|
||||
<van-field label="出生年月" v-model="formattedBirthday" placeholder="从信息中心获取"
|
||||
readonly></van-field>
|
||||
<van-field label="原工作单位" v-model="formData.unitName" placeholder="从信息中心获取"
|
||||
readonly></van-field>
|
||||
<van-field label="退休时间"
|
||||
v-model="formData.retireTime"
|
||||
placeholder="请选择退休时间"
|
||||
readonly
|
||||
@click="showDatePicker('retireTime')"
|
||||
clickable
|
||||
required
|
||||
></van-field>
|
||||
<van-field label="爱人姓名" v-model="formData.loverName" placeholder="请输入爱人姓名" required></van-field>
|
||||
<van-field
|
||||
v-model="formData.loverSex"
|
||||
name="loverSex"
|
||||
label="性别"
|
||||
readonly
|
||||
placeholder="请选择性别"
|
||||
@click="showLoverSexPicker = true"
|
||||
clickable
|
||||
required
|
||||
></van-field>
|
||||
<van-popup position="bottom" round v-model:show="showLoverSexPicker">
|
||||
<van-picker :columns="loverSexColumns" @cancel="showLoverSexPicker = false"
|
||||
@confirm="onLoverSexConfirm" show-toolbar ></van-picker>
|
||||
</van-popup>
|
||||
<van-field label="工作单位" v-model="formData.loverUnitName" placeholder="请输入工作单位" required></van-field>
|
||||
|
||||
<van-field label="结婚日期"
|
||||
v-model="formData.marryTime"
|
||||
placeholder="请选择结婚日期"
|
||||
readonly
|
||||
@click="showDatePicker('marryTime')"
|
||||
clickable
|
||||
required
|
||||
></van-field>
|
||||
<van-field label="子女出生日"
|
||||
v-model="formData.childrenBirthday"
|
||||
placeholder="请选择子女出生日"
|
||||
readonly
|
||||
@click="showDatePicker('childrenBirthday')"
|
||||
clickable
|
||||
required
|
||||
></van-field>
|
||||
<van-field label="领独生子女证日"
|
||||
v-model="formData.getCertificateTime"
|
||||
placeholder="请选择日期"
|
||||
readonly
|
||||
@click="showDatePicker('getCertificateTime')"
|
||||
clickable
|
||||
required
|
||||
></van-field>
|
||||
<van-field label="独生子女光荣证号" v-model="formData.childrenGraceNumber" placeholder="请输入独生子女光荣证号" required></van-field>
|
||||
<van-field label="办证机关" v-model="formData.office" placeholder="请输入办证机关" required></van-field>
|
||||
<van-field class="more-text" name="honorFiles"
|
||||
label="独生子女父母光荣证" required>
|
||||
<template #input>
|
||||
<h5-file-upload
|
||||
slot="input"
|
||||
:value.sync="formData.honorFiles"
|
||||
:upload_number="10"
|
||||
upload_mode="file"
|
||||
upload_result_category="array"
|
||||
upload_result_type="url"
|
||||
complete_result
|
||||
></h5-file-upload>
|
||||
</template>
|
||||
</van-field>
|
||||
<van-field class="more-text" name="retireFiles"
|
||||
label="退休证" required>
|
||||
<template #input>
|
||||
<h5-file-upload
|
||||
slot="input"
|
||||
:value.sync="formData.retireFiles"
|
||||
:upload_number="10"
|
||||
upload_mode="file"
|
||||
upload_result_category="array"
|
||||
upload_result_type="url"
|
||||
complete_result
|
||||
></h5-file-upload>
|
||||
</template>
|
||||
</van-field>
|
||||
<van-field class="more-text" name="sign" label="">
|
||||
<template #input>
|
||||
<h5-signature v-model="formData.sign" slot="input"></h5-signature>
|
||||
</template>
|
||||
</van-field>
|
||||
</van-cell-group>
|
||||
|
||||
<van-field name="declarationAgreed" class="declaration-checkbox">
|
||||
<template #input>
|
||||
<van-checkbox v-model="formData.declarationAgreed" checked-color="#ee0a24">
|
||||
我已阅读并同意以下声明
|
||||
</van-checkbox>
|
||||
</template>
|
||||
</van-field>
|
||||
<van-cell class="declaration-text">
|
||||
根据《河北省人口与计划生育条例》第四章第三十四条第四款"独生子女父母是国家工作人员、企事业单位员工的,退休时分别给予不低于三千元一次性奖励"的规定。<br/>
|
||||
说明:1. 本人应如实填写各项情况。2. 申报时需持《独生子女父母光荣证》、《退休证》原件及其复印件各一份。
|
||||
</van-cell>
|
||||
</van-cell-group>
|
||||
|
||||
<!-- 日期选择器弹窗 -->
|
||||
<van-popup position="bottom" round v-model:show="showDatePopup">
|
||||
<van-datetime-picker
|
||||
type="date"
|
||||
:min-date="minDate"
|
||||
:max-date="maxDate"
|
||||
@confirm="onDateConfirm"
|
||||
@cancel="showDatePopup = false"
|
||||
show-toolbar
|
||||
/>
|
||||
</van-popup>
|
||||
|
||||
<!-- 提交按钮 -->
|
||||
<div class="form-actions">
|
||||
<van-button plain @click="onSave" type="info">保存</van-button>
|
||||
<van-button @click="onSubmit" type="primary" v-if="!taskId">提交</van-button>
|
||||
<van-button @click="onSubmitAgain" type="primary" v-else>提交</van-button>
|
||||
</div>
|
||||
</van-form>
|
||||
</div>
|
||||
</div>
|
||||
<script nonce="${cspNonce!}">
|
||||
new Vue({
|
||||
store,
|
||||
el: '#app',
|
||||
dicts: ["USER_NATION"],
|
||||
data() {
|
||||
return {
|
||||
bizId: GetQueryString("bizId"),
|
||||
taskId: GetQueryString("taskId"),
|
||||
formData: {},
|
||||
// 性别选择器
|
||||
showLoverSexPicker: false,
|
||||
loverSexColumns: [
|
||||
{ value: '男', text: '男' },
|
||||
{ value: '女', text: '女' }
|
||||
],
|
||||
// 日期选择器
|
||||
showDatePopup: false,
|
||||
currentDatePickerField: '', // 当前正在选择日期的字段名
|
||||
minDate: new Date(1950, 0, 1),
|
||||
maxDate: new Date(2040, 11, 31)
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
// 格式化出生年月显示
|
||||
formattedBirthday() {
|
||||
return this.formatDate(this.formData.birthday);
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 添加日期格式化方法
|
||||
formatDate(date) {
|
||||
if (!date) return '';
|
||||
// 如果已经是 yyyy-MM-dd 格式,直接返回
|
||||
if (typeof date === 'string' && /^\d{4}-\d{2}-\d{2}/.test(date)) {
|
||||
// 如果包含时间,只取日期部分
|
||||
if (date.length > 10) {
|
||||
return date.substring(0, 10);
|
||||
}
|
||||
return date;
|
||||
}
|
||||
// 否则转换为 yyyy-MM-dd 格式
|
||||
try {
|
||||
const d = new Date(date);
|
||||
if (isNaN(d.getTime())) {
|
||||
return date;
|
||||
}
|
||||
const year = d.getFullYear();
|
||||
const month = String(d.getMonth() + 1).padStart(2, '0');
|
||||
const day = String(d.getDate()).padStart(2, '0');
|
||||
return year + '-' + month + '-' + day;
|
||||
} catch (e) {
|
||||
return date;
|
||||
}
|
||||
},
|
||||
|
||||
// 显示日期选择器
|
||||
showDatePicker(fieldName) {
|
||||
this.currentDatePickerField = fieldName;
|
||||
this.showDatePopup = true;
|
||||
},
|
||||
|
||||
// 日期确认事件
|
||||
onDateConfirm(value) {
|
||||
const formattedDate = this.formatDate(value);
|
||||
this.$set(this.formData, this.currentDatePickerField, formattedDate);
|
||||
this.showDatePopup = false;
|
||||
},
|
||||
|
||||
async onSave() {
|
||||
// 保存时不需要验证,直接提交数据
|
||||
this.$axios.post("/platform/dsznfmtx/apply/save", {data: JSON.stringify(this.formData)})
|
||||
.then((res) => {
|
||||
this.$toast.clear();
|
||||
if (res.code === 0) {
|
||||
this.$toast.success(res.msg);
|
||||
pjaxReplace('/platform/dsznfmtx/mine/h5')
|
||||
} else {
|
||||
this.$toast.fail(res.msg || '保存失败');
|
||||
}
|
||||
})
|
||||
.catch(err => {
|
||||
this.$toast.clear();
|
||||
this.$toast.fail('网络错误,请稍后重试');
|
||||
});
|
||||
},
|
||||
|
||||
// 提交前进行表单验证
|
||||
async validateForm() {
|
||||
const errors = [];
|
||||
|
||||
// 必填字段验证
|
||||
if (!this.formData.retireTime) {
|
||||
errors.push('请选择退休时间');
|
||||
}
|
||||
if (!this.formData.loverName) {
|
||||
errors.push('请输入爱人姓名');
|
||||
}
|
||||
if (!this.formData.loverSex) {
|
||||
errors.push('请选择爱人性别');
|
||||
}
|
||||
if (!this.formData.loverUnitName) {
|
||||
errors.push('请输入爱人工作单位');
|
||||
}
|
||||
if (!this.formData.marryTime) {
|
||||
errors.push('请选择结婚日期');
|
||||
}
|
||||
if (!this.formData.childrenBirthday) {
|
||||
errors.push('请选择子女出生日');
|
||||
}
|
||||
if (!this.formData.getCertificateTime) {
|
||||
errors.push('请选择领独生子女证日');
|
||||
}
|
||||
if (!this.formData.childrenGraceNumber) {
|
||||
errors.push('请输入独生子女光荣证号');
|
||||
}
|
||||
if (!this.formData.office) {
|
||||
errors.push('请输入办证机关');
|
||||
}
|
||||
if (!this.formData.honorFiles || this.formData.honorFiles.length === 0) {
|
||||
errors.push('请上传独生子女父母光荣证');
|
||||
}
|
||||
if (!this.formData.retireFiles || this.formData.retireFiles.length === 0) {
|
||||
errors.push('请上传退休证');
|
||||
}
|
||||
// if (!this.formData.sign) {
|
||||
// errors.push('请签字');
|
||||
// }
|
||||
if (!this.formData.declarationAgreed) {
|
||||
errors.push('请阅读并同意声明');
|
||||
}
|
||||
|
||||
return errors;
|
||||
},
|
||||
// 添加检查是否为退休人员的方法
|
||||
async checkRetirementStatus() {
|
||||
try {
|
||||
const resp = await this.$axios.post('/platform/dsznfmtx/apply/checkRetirementStatus');
|
||||
// 如果返回code为0且data为true,表示用户是退休人员
|
||||
if (resp.code === 0 && resp.data === true) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
} catch (error) {
|
||||
console.error('检查退休状态失败:', error);
|
||||
return false;
|
||||
}
|
||||
},
|
||||
// 检查用户是否已申请过
|
||||
async checkUserApplication() {
|
||||
try {
|
||||
const resp = await this.$axios.post('/platform/dsznfmtx/apply/checkUserApplied');
|
||||
// 如果返回code为0且data为true,表示用户已申请过
|
||||
if (resp.code === 0 && resp.data === true) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
} catch (error) {
|
||||
console.error('检查用户申请状态失败:', error);
|
||||
return false;
|
||||
}
|
||||
},
|
||||
// 提交
|
||||
async onSubmit() {
|
||||
// 检查是否为退休人员
|
||||
const isRetired = await this.checkRetirementStatus();
|
||||
if (!isRetired) {
|
||||
this.$message.warning('您不是退休人员,无法申请此项福利');
|
||||
return;
|
||||
}
|
||||
if (!this.bizId) {
|
||||
const isApplied = await this.checkUserApplication();
|
||||
if (isApplied) {
|
||||
this.$message.warning('您已经提交过申请,不能重复申请');
|
||||
return;
|
||||
}
|
||||
}
|
||||
// 提交时进行表单验证
|
||||
const errors = await this.validateForm();
|
||||
if (errors.length > 0) {
|
||||
this.$toast.fail(errors[0]); // 显示第一条错误信息
|
||||
return;
|
||||
}
|
||||
|
||||
this.$axios.post('/platform/dsznfmtx/apply/submit', {data: JSON.stringify(this.formData)})
|
||||
.then(res => {
|
||||
this.$toast.clear();
|
||||
if (res.code === 0) {
|
||||
this.$toast.success("提交成功");
|
||||
pjaxReplace('/platform/dsznfmtx/mine/h5')
|
||||
} else {
|
||||
this.$toast.fail(res.msg || '提交失败');
|
||||
}
|
||||
})
|
||||
.catch(err => {
|
||||
this.$toast.clear();
|
||||
this.$toast.fail('网络错误,请稍后重试');
|
||||
});
|
||||
},
|
||||
|
||||
// 再次提交
|
||||
async onSubmitAgain() {
|
||||
// 提交时进行表单验证
|
||||
const errors = await this.validateForm();
|
||||
if (errors.length > 0) {
|
||||
this.$toast.fail(errors[0]); // 显示第一条错误信息
|
||||
return;
|
||||
}
|
||||
|
||||
this.$axios.post('/platform/dsznfmtx/apply/submitAgain', {
|
||||
data: JSON.stringify(this.formData),
|
||||
taskId: GetQueryString("taskId")
|
||||
}).then(res => {
|
||||
this.$toast.clear();
|
||||
if (res.code === 0) {
|
||||
this.$toast.success("提交成功");
|
||||
setTimeout(() => {
|
||||
pjaxReplace('/platform/dsznfmtx/mine/h5')
|
||||
}, 1500);
|
||||
} else {
|
||||
this.$toast.fail(res.msg || '提交失败');
|
||||
}
|
||||
}).catch(err => {
|
||||
this.$toast.clear();
|
||||
this.$toast.fail('网络错误,请稍后重试');
|
||||
});
|
||||
},
|
||||
|
||||
// 添加性别确认方法
|
||||
onLoverSexConfirm(o) {
|
||||
this.$set(this.formData, "loverSex", o.text);
|
||||
this.showLoverSexPicker = false;
|
||||
},
|
||||
|
||||
init() {
|
||||
this.bizId = GetQueryString("bizId")
|
||||
if (this.bizId) {
|
||||
this.$axios.post("/platform/dsznfmtx/apply/findOne", {id: this.bizId}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.formData = res.data;
|
||||
// 格式化所有日期字段
|
||||
const dateFields = ['birthday', 'retireTime', 'marryTime', 'childrenBirthday', 'getCertificateTime'];
|
||||
dateFields.forEach(field => {
|
||||
if (this.formData[field]) {
|
||||
this.$set(this.formData, field, this.formatDate(this.formData[field]));
|
||||
}
|
||||
});
|
||||
}
|
||||
})
|
||||
} else {
|
||||
const user = this.$store.state.user
|
||||
this.$set(this.formData, "userId", user.id)
|
||||
this.$set(this.formData, "userName", user.username)
|
||||
this.$set(this.formData, "loginName", user.loginname)
|
||||
this.$set(this.formData, "unitId", user.unitId)
|
||||
this.$set(this.formData, "unitName", user.unit.name)
|
||||
this.$set(this.formData, "unionId", user.union.id)
|
||||
this.$set(this.formData, "unionName", user.union.name)
|
||||
this.$set(this.formData, "sex", user.sex)
|
||||
this.$set(this.formData, "birthday", this.formatDate(user.birthday))
|
||||
}
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
await this.init();
|
||||
|
||||
// 页面初始化完成后立即检查退休状态和申请状态
|
||||
const isRetired = await this.checkRetirementStatus();
|
||||
if (!isRetired) {
|
||||
this.$toast.fail('您不是退休人员,无法申请此项福利');
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!this.bizId) { // 如果不是编辑已有记录,则检查是否已申请
|
||||
const isApplied = await this.checkUserApplication();
|
||||
if (isApplied) {
|
||||
this.$toast.fail('您已经提交过申请,不能重复申请');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,127 @@
|
||||
<!--#
|
||||
layout("/layouts/platform_h5.html"){
|
||||
#-->
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<van-nav-bar @click-left="historyBack" left-arrow left-text="返回" title="查询统计" placeholder fixed></van-nav-bar>
|
||||
<van-sticky offset-top="46px">
|
||||
<van-dropdown-menu :close-on-click-outside="false" :close-on-click-overlay="false">
|
||||
<van-dropdown-item :options="yearList" @change="doSearch" v-model="pageForm.year"></van-dropdown-item>
|
||||
</van-dropdown-menu>
|
||||
<van-search
|
||||
:reverse-color="false"
|
||||
:show-action="false"
|
||||
@search="doSearch"
|
||||
input-align="left"
|
||||
placeholder="请输入职工姓名搜索"
|
||||
v-model="pageForm.userName"
|
||||
></van-search>
|
||||
</van-sticky>
|
||||
|
||||
|
||||
<table-list api="/platform/dsznfmtx/collect/pageData" :page_form.sync="pageForm" ref="tableListRef"
|
||||
@ready="doSearch" >
|
||||
<template v-slot="{index,row}">
|
||||
<table-column label="职工姓名">{{row.userName}}</table-column>
|
||||
<table-column label="性别">{{row.sex}}</table-column>
|
||||
<table-column label="工会">{{row.unionName}}</table-column>
|
||||
<table-column label="所属单位">{{row.unitName}}</table-column>
|
||||
<table-column label="退休时间">{{row.retireTime}}</table-column>
|
||||
<table-column label="申请时间">{{row.applyTime}}</table-column>
|
||||
<table-column label="当前节点">{{row.taskName}}</table-column>
|
||||
</template>
|
||||
<template #actions="{index,row}">
|
||||
<div class="action-btn" @click="onView(row)">
|
||||
<i class="fa fa-eye"></i>
|
||||
<span>查看</span>
|
||||
</div>
|
||||
<div class="action-btn delete" @click="onDelete(row)" v-if="$auth.hasRole('SYSADMIN')">
|
||||
<i class="fa fa-trash"></i>
|
||||
<span>删除</span>
|
||||
</div>
|
||||
</template>
|
||||
</table-list>
|
||||
|
||||
<dsznfmtx-info ref="dsznfmtxInfoRef"></dsznfmtx-info>
|
||||
|
||||
</div>
|
||||
<script nonce="${cspNonce!}">
|
||||
<!--#include('../common/info.js'){}#-->
|
||||
const vue = new Vue({
|
||||
el: "#app",
|
||||
store,
|
||||
dicts: [],
|
||||
components: {
|
||||
"dsznfmtx-info":DSZNFMTX_INFO
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
viewShow: false,
|
||||
yearList: [],
|
||||
pageForm: {
|
||||
pageNumber: 1,
|
||||
pageSize: 10,
|
||||
totalCount: 0,
|
||||
searchKeyword: "",
|
||||
year: "",
|
||||
},
|
||||
infoShow: false
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
onView(row) {
|
||||
this.showApprovalForm = false
|
||||
this.$refs.dsznfmtxInfoRef.onOpen(row)
|
||||
},
|
||||
onRevoke(row){
|
||||
this.$dialog
|
||||
.confirm({
|
||||
title: "提示",
|
||||
message: "您确定要撤销申请吗?"
|
||||
})
|
||||
.then(() => {
|
||||
this.$axios.post("/flow/common/revokeTask", {taskId: row.startTaskId}).then((resp) => {
|
||||
this.$toast.success(resp.msg)
|
||||
this.doSearch()
|
||||
})
|
||||
})
|
||||
},
|
||||
onDelete(row) {
|
||||
this.$dialog
|
||||
.confirm({
|
||||
title: "提示",
|
||||
message: "您确定要删除吗?"
|
||||
})
|
||||
.then(() => {
|
||||
this.$axios.post("/platform/dsznfmtx/mine/delete", {id: row.id}).then((resp) => {
|
||||
if (resp.code === 0) {
|
||||
this.$toast.success(resp.msg)
|
||||
this.doSearch()
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
doSearch() {
|
||||
this.$nextTick(() => {
|
||||
this.pageForm.pageNumber = 1
|
||||
this.pageForm.totalCount = 0
|
||||
this.$refs.tableListRef.doSearch()
|
||||
})
|
||||
},
|
||||
initData() {
|
||||
for (let i = new Date().getFullYear() - 10; i <= new Date().getFullYear(); i++) {
|
||||
this.yearList.unshift({value: i, text: i + "年"})
|
||||
}
|
||||
this.$set(this.pageForm, "year", this.yearList[0].value)
|
||||
},
|
||||
},
|
||||
created() {
|
||||
this.initData()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,124 @@
|
||||
const DSZNFMTX_INFO = {
|
||||
template:
|
||||
/*language=HTML*/`
|
||||
<van-action-sheet v-model="visible" title="查看详情">
|
||||
<div class="detail-container">
|
||||
<van-cell-group title="基本信息">
|
||||
<van-cell title="职工姓名">{{ viewData.userName }}</van-cell>
|
||||
<van-cell title="性别">{{ viewData.sex }}</van-cell>
|
||||
<van-cell title="出生年月">{{$moment(viewData.birthday).format('YYYY-MM-DD')}}</van-cell>
|
||||
<van-cell title="原工作单位">{{ viewData.unitName }}</van-cell>
|
||||
<van-cell title="退休时间">{{$moment(viewData.retireTime).format('YYYY-MM-DD')}}</van-cell>
|
||||
<van-cell title="爱人姓名">{{ viewData.loverName }}</van-cell>
|
||||
<van-cell title="性别">{{ viewData.loverSex }}</van-cell>
|
||||
<van-cell title="工作单位">{{ viewData.loverUnitName }}</van-cell>
|
||||
<van-cell title="结婚日期">{{$moment(viewData.marryTime).format('YYYY-MM-DD')}}</van-cell>
|
||||
<van-cell title="子女出生日">{{$moment(viewData.childrenBirthday).format('YYYY-MM-DD')}}</van-cell>
|
||||
<van-cell title="领独生子女光时间">{{$moment(viewData.getCertificateTime).format('YYYY-MM-DD')}}</van-cell>
|
||||
<van-cell title="独生子女光荣证号">{{ viewData.childrenGraceNumber }}</van-cell>
|
||||
<van-cell title="办证机关">{{ viewData.office }}</van-cell>
|
||||
<van-cell title="奖励金额">{{ viewData.bonus }}</van-cell>
|
||||
<van-cell title="独生子女父母光荣证">
|
||||
<file-preview :files="viewData.honorFiles" complete_result></file-preview>
|
||||
</van-cell>
|
||||
<van-cell title="退休证">
|
||||
<file-preview :files="viewData.retireFiles" complete_result></file-preview>
|
||||
</van-cell>
|
||||
<van-cell title="签字" >
|
||||
<van-image :src="viewData.sign"
|
||||
v-if="viewData.sign"
|
||||
class="signature-image"></van-image>
|
||||
</van-cell>
|
||||
</van-cell-group>
|
||||
<template v-for="(task,index) in doneTasks">
|
||||
<div class="process-title">
|
||||
{{ task.displayName }}
|
||||
</div>
|
||||
<van-cell-group v-if="task.ext.isFirstTaskNode">
|
||||
<van-cell title="申请用户">
|
||||
{{ task.ext.initiatorName}}({{task.ext.initiatorAccount}})
|
||||
</van-cell>
|
||||
<van-cell title="申请时间">
|
||||
{{task.finishTime}}
|
||||
</van-cell>
|
||||
<van-cell title="办理结果">
|
||||
<dict-tag :options="dict.type.PROCESS_TASK_SUBMIT_TYPE"
|
||||
:value="task.ext.submitType"></dict-tag>
|
||||
</van-cell>
|
||||
</van-cell-group>
|
||||
<van-cell-group v-else>
|
||||
<van-cell title="办理用户">
|
||||
{{ task.taskFormData.userName}}({{task.taskFormData.loginName}})
|
||||
</van-cell>
|
||||
<van-cell title="办理时间">
|
||||
{{task.finishTime}}
|
||||
</van-cell>
|
||||
<van-cell title="办理结果">
|
||||
<dict-tag :options="dict.type.PROCESS_TASK_SUBMIT_TYPE"
|
||||
:value="task.ext.submitType"></dict-tag>
|
||||
</van-cell>
|
||||
<van-cell title="办理意见" v-if="!task.ext.isFirstTaskNode">
|
||||
<template #label>
|
||||
{{
|
||||
task.taskFormData.opinion
|
||||
}}
|
||||
</template>
|
||||
</van-cell>
|
||||
<van-cell title="签字" v-if="!task.ext.isFirstTaskNode">
|
||||
<van-image :src="task.ext.tf_userSign"
|
||||
v-if="task.ext.tf_userSign"
|
||||
class="signature-image"></van-image>
|
||||
</van-cell>
|
||||
</van-cell-group>
|
||||
</template>
|
||||
|
||||
</div>
|
||||
<slot></slot>
|
||||
</van-action-sheet>
|
||||
`,
|
||||
dicts: ["PROCESS_TASK_SUBMIT_TYPE"],
|
||||
data() {
|
||||
return {
|
||||
visible:false,
|
||||
viewData: {},
|
||||
doneTasks: [],
|
||||
row: null,
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
||||
onOpen(row) {
|
||||
this.row = row
|
||||
this.visible = true
|
||||
this.getInfo()
|
||||
this.getDoneTasks()
|
||||
},
|
||||
// 关闭
|
||||
onClose(){
|
||||
this.visible = false
|
||||
},
|
||||
// 获取申请信息
|
||||
getInfo() {
|
||||
this.$axios.post("/platform/dsznfmtx/apply/findOne", {id: this.row.id}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.viewData = res.data
|
||||
}
|
||||
})
|
||||
},
|
||||
// 查看
|
||||
openView(id) {
|
||||
this.$nextTick(() => {
|
||||
this.$refs.infoDialogRef.onOpen(id)
|
||||
})
|
||||
},
|
||||
// 获取已办任务审批记录
|
||||
getDoneTasks() {
|
||||
this.$axios.post("/flow/common/doneTasks", {bizId: this.row.id}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.doneTasks = res.data
|
||||
}
|
||||
})
|
||||
},
|
||||
},
|
||||
|
||||
}
|
||||
@@ -0,0 +1,134 @@
|
||||
<!--#
|
||||
layout("/layouts/platform_h5.html"){
|
||||
#-->
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<van-nav-bar @click-left="historyBack" left-arrow left-text="返回" title="我的申请" placeholder fixed></van-nav-bar>
|
||||
<van-sticky offset-top="46px">
|
||||
<van-dropdown-menu :close-on-click-outside="false" :close-on-click-overlay="false">
|
||||
<van-dropdown-item :options="yearList" @change="doSearch" v-model="pageForm.year"></van-dropdown-item>
|
||||
</van-dropdown-menu>
|
||||
</van-sticky>
|
||||
|
||||
|
||||
<table-list api="/platform/dsznfmtx/mine/pageData" :page_form.sync="pageForm" ref="tableListRef"
|
||||
@ready="doSearch" >
|
||||
<template v-slot="{index,row}">
|
||||
<table-column label="职工姓名">{{row.userName}}</table-column>
|
||||
<table-column label="性别">{{row.sex}}</table-column>
|
||||
<table-column label="工会">{{row.unionName}}</table-column>
|
||||
<table-column label="所属单位">{{row.unitName}}</table-column>
|
||||
<table-column label="退休时间">{{row.retireTime}}</table-column>
|
||||
<table-column label="申请时间">{{row.applyTime}}</table-column>
|
||||
<table-column label="当前节点">{{row.taskName}}</table-column>
|
||||
</template>
|
||||
<template #actions="{index,row}">
|
||||
<div class="action-btn" @click="onView(row)">
|
||||
<i class="fa fa-eye"></i>
|
||||
<span>查看</span>
|
||||
</div>
|
||||
<div class="action-btn" @click="onEdit(row)" v-if="row.taskKey === 'startTask' || !row.instanceId">
|
||||
<i class="fa fa-edit"></i>
|
||||
<span>编辑</span>
|
||||
</div>
|
||||
<div class="action-btn delete" v-if="row.canRevoke" @click="onRevoke(row)">
|
||||
<i class="fa fa-undo"></i>
|
||||
<span>撤回</span>
|
||||
</div>
|
||||
<div class="action-btn delete" @click="onDelete(row)" v-if="row.taskKey === 'startTask' || !row.instanceId">
|
||||
<i class="fa fa-trash"></i>
|
||||
<span>删除</span>
|
||||
</div>
|
||||
</template>
|
||||
</table-list>
|
||||
|
||||
<dsznfmtx-info ref="dsznfmtxInfoRef"></dsznfmtx-info>
|
||||
|
||||
</div>
|
||||
<script nonce="${cspNonce!}">
|
||||
<!--#include('../common/info.js'){}#-->
|
||||
const vue = new Vue({
|
||||
el: "#app",
|
||||
store,
|
||||
dicts: [],
|
||||
components: {
|
||||
"dsznfmtx-info":DSZNFMTX_INFO
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
viewShow: false,
|
||||
yearList: [],
|
||||
pageForm: {
|
||||
pageNumber: 1,
|
||||
pageSize: 10,
|
||||
totalCount: 0,
|
||||
searchKeyword: "",
|
||||
year: "",
|
||||
},
|
||||
infoShow: false
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
onView(row) {
|
||||
this.showApprovalForm = false
|
||||
this.$refs.dsznfmtxInfoRef.onOpen(row)
|
||||
|
||||
},
|
||||
onEdit(row) {
|
||||
this.$pjaxReplace('/platform/dsznfmtx/apply/h5?taskId=' + (row.startTaskId || '') + "&bizId=" + row.id)
|
||||
},
|
||||
|
||||
onRevoke(row){
|
||||
this.$dialog
|
||||
.confirm({
|
||||
title: "提示",
|
||||
message: "您确定要撤销申请吗?"
|
||||
})
|
||||
.then(() => {
|
||||
this.$axios.post("/flow/common/revokeTask", {taskId: row.startTaskId}).then((resp) => {
|
||||
this.$toast.success(resp.msg)
|
||||
this.doSearch()
|
||||
})
|
||||
})
|
||||
},
|
||||
onDelete(row) {
|
||||
this.$dialog
|
||||
.confirm({
|
||||
title: "提示",
|
||||
message: "您确定要删除吗?"
|
||||
})
|
||||
.then(() => {
|
||||
this.$axios.post("/platform/dsznfmtx/mine/delete", {id: row.id}).then((resp) => {
|
||||
if (resp.code === 0) {
|
||||
this.$toast.success(resp.msg)
|
||||
this.doSearch()
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
doSearch() {
|
||||
this.$nextTick(() => {
|
||||
this.pageForm.pageNumber = 1
|
||||
this.pageForm.totalCount = 0
|
||||
this.$refs.tableListRef.doSearch()
|
||||
})
|
||||
},
|
||||
initData() {
|
||||
for (let i = new Date().getFullYear() - 10; i <= new Date().getFullYear(); i++) {
|
||||
this.yearList.unshift({value: i, text: i + "年"})
|
||||
}
|
||||
this.$set(this.pageForm, "year", this.yearList[0].value)
|
||||
},
|
||||
|
||||
},
|
||||
created() {
|
||||
this.initData()
|
||||
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,277 @@
|
||||
<!--#
|
||||
layout("/layouts/platform_h5.html"){
|
||||
#-->
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<van-nav-bar @click-left="historyBack" left-arrow left-text="返回" title="校工会审核" placeholder fixed></van-nav-bar>
|
||||
<van-sticky offset-top="46px">
|
||||
<van-search
|
||||
:reverse-color="false"
|
||||
:show-action="false"
|
||||
@search="doSearch"
|
||||
input-align="left"
|
||||
placeholder="请输入职工姓名搜索"
|
||||
v-model="pageForm.userName"
|
||||
></van-search>
|
||||
<van-tabs v-model="pageForm.approvalText"
|
||||
@change="(val)=>{this.pageForm.approval = val==='1';this.doSearch();}">
|
||||
<van-tab title="已审核" name="1"></van-tab>
|
||||
<van-tab title="未审核" name="0"></van-tab>
|
||||
</van-tabs>
|
||||
</van-sticky>
|
||||
|
||||
|
||||
<table-list api="/platform/dsznfmtx/schoolAudit/pageData" :page_form.sync="pageForm" ref="tableListRef"
|
||||
@ready="doSearch" >
|
||||
<template v-slot="{index,row}">
|
||||
<table-column label="职工姓名">{{row.userName}}</table-column>
|
||||
<table-column label="性别">{{row.sex}}</table-column>
|
||||
<table-column label="工会">{{row.unionName}}</table-column>
|
||||
<table-column label="所属单位">{{row.unitName}}</table-column>
|
||||
<table-column label="奖励金额">{{row.bonus}}</table-column>
|
||||
<table-column label="申请时间">{{row.applyTime}}</table-column>
|
||||
<table-column label="当前节点">{{row.curTaskName}}</table-column>
|
||||
</template>
|
||||
<template #actions="{index,row}">
|
||||
<div class="action-btn" @click="onView(row)">
|
||||
<i class="fa fa-eye"></i>
|
||||
<span>查看</span>
|
||||
</div>
|
||||
<div class="action-btn" v-if="row.taskState === 10" @click="onAudit(row)">
|
||||
<i class="fa fa-edit"></i>
|
||||
<span>审核</span>
|
||||
</div>
|
||||
<div class="action-btn delete" v-if="row.canRevoke" @click="onRevoke(row)">
|
||||
<i class="fa fa-undo"></i>
|
||||
<span>撤回</span>
|
||||
</div>
|
||||
</template>
|
||||
</table-list>
|
||||
|
||||
<dsznfmtx-info ref="dsznfmtxInfoRef">
|
||||
<div v-if="showApprovalForm">
|
||||
<div class="process-title">
|
||||
校工会审核
|
||||
</div>
|
||||
<div class="form-container">
|
||||
<van-form ref="formRef">
|
||||
<van-cell-group title="审批意见">
|
||||
<van-field label=""
|
||||
:rules="[{ required: true,message:'请填审批意见' }]"
|
||||
v-model="formData.tf_opinion"
|
||||
required
|
||||
type="textarea"
|
||||
name="tf_opinion"
|
||||
rows="4"
|
||||
autosize
|
||||
class="more-text"
|
||||
placeholder="请填审批意见"></van-field>
|
||||
</van-cell-group>
|
||||
<van-cell-group title="电子签名" class="form-section">
|
||||
<van-field class="more-text" name="tf_userSign" label="">
|
||||
<template #input>
|
||||
<h5-signature v-model="formData.tf_userSign" slot="input"></h5-signature>
|
||||
</template>
|
||||
</van-field>
|
||||
</van-cell-group>
|
||||
<!-- 按钮区域 -->
|
||||
<div class="form-actions">
|
||||
<van-button type="danger" @click="handleTaskAction(6)">退回到发起人</van-button>
|
||||
<van-button type="danger" @click="handleTaskAction(2)">拒绝申请</van-button>
|
||||
<van-button type="primary" @click="handleTaskAction(1)">同意申请</van-button>
|
||||
</div>
|
||||
</van-form>
|
||||
</div>
|
||||
</div>
|
||||
</dsznfmtx-info>
|
||||
<!-- 奖励金额输入弹窗 -->
|
||||
<van-dialog v-model="bonusDialogVisible" title="输入奖励金额" show-cancel-button
|
||||
@confirm="confirmBonusInput" @cancel="cancelBonusInput">
|
||||
<van-field v-model="bonusFormData.bonus" placeholder="请输入奖励金额" type="number">
|
||||
<template #right-icon>
|
||||
<span>元</span>
|
||||
</template>
|
||||
</van-field>
|
||||
</van-dialog>
|
||||
</div>
|
||||
<script nonce="${cspNonce!}">
|
||||
<!--#include('../common/info.js'){}#-->
|
||||
const vue = new Vue({
|
||||
el: "#app",
|
||||
store,
|
||||
dicts: [],
|
||||
components: {
|
||||
"dsznfmtx-info":DSZNFMTX_INFO
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
pageForm: {
|
||||
pageNumber: 1,
|
||||
pageSize: 10,
|
||||
totalCount: 0,
|
||||
searchKeyword: "",
|
||||
approvalText: "0",
|
||||
approval: false,
|
||||
year: new Date().getFullYear(),
|
||||
},
|
||||
formData: {},
|
||||
showApprovalForm: false,
|
||||
infoShow: false,
|
||||
// 奖励金额输入弹窗相关数据
|
||||
bonusDialogVisible: false,
|
||||
bonusFormData: {
|
||||
bonus: ''
|
||||
},
|
||||
currentRow: null,
|
||||
currentSubmitType: null
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 显示奖励金额输入弹窗
|
||||
showBonusInputDialog(submitType) {
|
||||
this.currentSubmitType = submitType;
|
||||
this.bonusFormData.bonus = '';
|
||||
this.bonusDialogVisible = true;
|
||||
},
|
||||
|
||||
// 确认奖励金额输入
|
||||
confirmBonusInput() {
|
||||
if (!this.bonusFormData.bonus) {
|
||||
this.$toast.fail('请输入奖励金额');
|
||||
return false; // 阻止弹窗关闭
|
||||
}
|
||||
|
||||
// 验证金额格式
|
||||
const bonusPattern = /^([0-9]*[.]{0,1}[0-9]{0,2})$/;
|
||||
if (!bonusPattern.test(this.bonusFormData.bonus)) {
|
||||
this.$toast.fail('请输入有效的金额格式');
|
||||
return false; // 阻止弹窗关闭
|
||||
}
|
||||
|
||||
this.bonusDialogVisible = false;
|
||||
|
||||
// 保存奖励金额并执行审批操作
|
||||
this.saveBonusAndApprove();
|
||||
return true; // 允许弹窗关闭
|
||||
},
|
||||
|
||||
// 取消奖励金额输入
|
||||
cancelBonusInput() {
|
||||
this.bonusDialogVisible = false;
|
||||
},
|
||||
|
||||
// 保存奖励金额并执行审批
|
||||
saveBonusAndApprove() {
|
||||
// 先获取完整的申请数据
|
||||
this.$axios.post('/platform/dsznfmtx/apply/findOne', {id: this.currentRow.id}).then(res => {
|
||||
if (res.code === 0) {
|
||||
// 获取完整的数据后,更新奖励金额
|
||||
const fullData = res.data;
|
||||
fullData.bonus = this.bonusFormData.bonus;
|
||||
|
||||
// 调用申请页面的保存方法,传递完整数据
|
||||
this.$axios.post('/platform/dsznfmtx/apply/save', {data: JSON.stringify(fullData)}).then(saveRes => {
|
||||
if (saveRes.code === 0) {
|
||||
// 保存成功后执行审批操作
|
||||
this.executeTaskAction(this.currentSubmitType);
|
||||
} else {
|
||||
this.$toast.fail(saveRes.msg || '保存奖励金额失败');
|
||||
}
|
||||
}).catch(error => {
|
||||
this.$toast.fail('保存奖励金额失败');
|
||||
console.error('保存奖励金额失败:', error);
|
||||
});
|
||||
} else {
|
||||
this.$toast.fail(res.msg || '获取申请数据失败');
|
||||
}
|
||||
}).catch(error => {
|
||||
this.$toast.fail('获取申请数据失败');
|
||||
console.error('获取申请数据失败:', error);
|
||||
});
|
||||
},
|
||||
onRevoke(row) {
|
||||
this.$dialog.confirm({
|
||||
title: '温馨提示',
|
||||
message: '您确定要撤回吗?',
|
||||
}).then(() => {
|
||||
this.$axios.post("/flow/common/revokeTask", {taskId: row.taskId}).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.$toast.success("提交成功")
|
||||
this.doSearch()
|
||||
this.infoShow = false
|
||||
}
|
||||
})
|
||||
}).catch(() => {
|
||||
// on cancel
|
||||
});
|
||||
},
|
||||
|
||||
// 执行任务操作
|
||||
executeTaskAction(val) {
|
||||
this.$refs.formRef.validate().then(() => {
|
||||
this.$dialog.confirm({
|
||||
title: '温馨提示',
|
||||
message: '您确定要提交吗?',
|
||||
}).then(() => {
|
||||
this.$axios.post('/flow/common/executeTask', {
|
||||
data: JSON.stringify({
|
||||
...this.formData,
|
||||
submitType: val
|
||||
})
|
||||
}).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.$toast.success("提交成功")
|
||||
this.doSearch()
|
||||
this.$refs.dsznfmtxInfoRef.onClose()
|
||||
}
|
||||
})
|
||||
}).catch(() => {
|
||||
// on cancel
|
||||
});
|
||||
}).catch();
|
||||
},
|
||||
|
||||
handleTaskAction(val) {
|
||||
// 如果是同意申请操作(val=1),需要先输入奖励金额
|
||||
if (val === 1) {
|
||||
this.showBonusInputDialog(val);
|
||||
return;
|
||||
}
|
||||
// 其他操作直接执行
|
||||
this.executeTaskAction(val);
|
||||
},
|
||||
onView(row) {
|
||||
this.showApprovalForm = false
|
||||
this.$refs.dsznfmtxInfoRef.onOpen(row)
|
||||
},
|
||||
onAudit(row) {
|
||||
this.showApprovalForm = true
|
||||
this.currentRow = row;
|
||||
this.formData = {
|
||||
tf_opinion: null,
|
||||
tf_userSign: null,
|
||||
processTaskId: row.taskId,
|
||||
taskName: row.curTaskName
|
||||
}
|
||||
this.$refs.dsznfmtxInfoRef.onOpen(row)
|
||||
},
|
||||
|
||||
doSearch() {
|
||||
this.$nextTick(() => {
|
||||
this.pageForm.pageNumber = 1
|
||||
this.pageForm.totalCount = 0
|
||||
this.$refs.tableListRef.doSearch()
|
||||
})
|
||||
},
|
||||
|
||||
},
|
||||
created() {
|
||||
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,187 @@
|
||||
<!--#
|
||||
layout("/layouts/platform_h5.html"){
|
||||
#-->
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<van-nav-bar @click-left="historyBack" left-arrow left-text="返回" title="分工会审核" placeholder fixed></van-nav-bar>
|
||||
<van-sticky offset-top="46px">
|
||||
<van-search
|
||||
:reverse-color="false"
|
||||
:show-action="false"
|
||||
@search="doSearch"
|
||||
input-align="left"
|
||||
placeholder="请输入职工姓名搜索"
|
||||
v-model="pageForm.userName"
|
||||
></van-search>
|
||||
<van-tabs v-model="pageForm.approvalText"
|
||||
@change="(val)=>{this.pageForm.approval = val==='1';this.doSearch();}">
|
||||
<van-tab title="已审核" name="1"></van-tab>
|
||||
<van-tab title="未审核" name="0"></van-tab>
|
||||
</van-tabs>
|
||||
</van-sticky>
|
||||
|
||||
|
||||
<table-list api="/platform/dsznfmtx/unionAudit/pageData" :page_form.sync="pageForm" ref="tableListRef"
|
||||
@ready="doSearch" >
|
||||
<template v-slot="{index,row}">
|
||||
<table-column label="职工姓名">{{row.userName}}</table-column>
|
||||
<table-column label="性别">{{row.sex}}</table-column>
|
||||
<table-column label="工会">{{row.unionName}}</table-column>
|
||||
<table-column label="所属单位">{{row.unitName}}</table-column>
|
||||
<table-column label="退休时间">{{row.retireTime}}</table-column>
|
||||
<table-column label="申请时间">{{row.applyTime}}</table-column>
|
||||
<table-column label="当前节点">{{row.curTaskName}}</table-column>
|
||||
</template>
|
||||
<template #actions="{index,row}">
|
||||
<div class="action-btn" @click="onView(row)">
|
||||
<i class="fa fa-eye"></i>
|
||||
<span>查看</span>
|
||||
</div>
|
||||
<div class="action-btn" v-if="row.taskState === 10" @click="onAudit(row)">
|
||||
<i class="fa fa-edit"></i>
|
||||
<span>审核</span>
|
||||
</div>
|
||||
<div class="action-btn delete" v-if="row.canRevoke" @click="onRevoke(row)">
|
||||
<i class="fa fa-undo"></i>
|
||||
<span>撤回</span>
|
||||
</div>
|
||||
</template>
|
||||
</table-list>
|
||||
|
||||
<dsznfmtx-info ref="dsznfmtxInfoRef">
|
||||
<div v-if="showApprovalForm">
|
||||
<div class="process-title">
|
||||
分工会审核
|
||||
</div>
|
||||
<div class="form-container">
|
||||
<van-form ref="formRef">
|
||||
<van-cell-group title="审批意见">
|
||||
<van-field label=""
|
||||
:rules="[{ required: true,message:'请填审批意见' }]"
|
||||
v-model="formData.tf_opinion"
|
||||
required
|
||||
type="textarea"
|
||||
name="tf_opinion"
|
||||
rows="4"
|
||||
autosize
|
||||
class="more-text"
|
||||
placeholder="请填审批意见"></van-field>
|
||||
</van-cell-group>
|
||||
<van-cell-group title="电子签名" class="form-section">
|
||||
<van-field class="more-text" name="tf_userSign" label="">
|
||||
<template #input>
|
||||
<h5-signature v-model="formData.tf_userSign" slot="input"></h5-signature>
|
||||
</template>
|
||||
</van-field>
|
||||
</van-cell-group>
|
||||
<!-- 按钮区域 -->
|
||||
<div class="form-actions">
|
||||
<van-button type="danger" @click="handleTaskAction(6)">退回到发起人</van-button>
|
||||
<van-button type="danger" @click="handleTaskAction(2)">拒绝申请</van-button>
|
||||
<van-button type="primary" @click="handleTaskAction(1)">同意申请</van-button>
|
||||
</div>
|
||||
</van-form>
|
||||
</div>
|
||||
</div>
|
||||
</dsznfmtx-info>
|
||||
|
||||
</div>
|
||||
<script nonce="${cspNonce!}">
|
||||
<!--#include('../common/info.js'){}#-->
|
||||
const vue = new Vue({
|
||||
el: "#app",
|
||||
store,
|
||||
dicts: [],
|
||||
components: {
|
||||
"dsznfmtx-info":DSZNFMTX_INFO
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
pageForm: {
|
||||
pageNumber: 1,
|
||||
pageSize: 10,
|
||||
totalCount: 0,
|
||||
searchKeyword: "",
|
||||
approvalText: "0",
|
||||
approval: false,
|
||||
year: new Date().getFullYear(),
|
||||
},
|
||||
formData: {},
|
||||
showApprovalForm: false,
|
||||
infoShow: false
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
onRevoke(row) {
|
||||
this.$dialog.confirm({
|
||||
title: '温馨提示',
|
||||
message: '您确定要撤回吗?',
|
||||
}).then(() => {
|
||||
this.$axios.post("/flow/common/revokeTask", {taskId: row.taskId}).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.$toast.success("提交成功")
|
||||
this.doSearch()
|
||||
this.infoShow = false
|
||||
}
|
||||
})
|
||||
}).catch(() => {
|
||||
// on cancel
|
||||
});
|
||||
},
|
||||
handleTaskAction(val) {
|
||||
this.$refs.formRef.validate().then(() => {
|
||||
this.$dialog.confirm({
|
||||
title: '温馨提示',
|
||||
message: '您确定要提交吗?',
|
||||
}).then(() => {
|
||||
this.$axios.post('/flow/common/executeTask', {
|
||||
data: JSON.stringify({
|
||||
...this.formData,
|
||||
submitType: val
|
||||
})
|
||||
}).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.$toast.success("提交成功")
|
||||
this.doSearch()
|
||||
this.$refs.dsznfmtxInfoRef.onClose()
|
||||
}
|
||||
})
|
||||
}).catch(() => {
|
||||
// on cancel
|
||||
});
|
||||
}).catch();
|
||||
},
|
||||
onView(row) {
|
||||
this.showApprovalForm = false
|
||||
this.$refs.dsznfmtxInfoRef.onOpen(row)
|
||||
},
|
||||
onAudit(row) {
|
||||
this.showApprovalForm = true
|
||||
this.formData = {
|
||||
tf_opinion: null,
|
||||
tf_userSign: null,
|
||||
processTaskId: row.taskId,
|
||||
taskName: row.curTaskName
|
||||
}
|
||||
this.$refs.dsznfmtxInfoRef.onOpen(row)
|
||||
},
|
||||
|
||||
doSearch() {
|
||||
this.$nextTick(() => {
|
||||
this.pageForm.pageNumber = 1
|
||||
this.pageForm.totalCount = 0
|
||||
this.$refs.tableListRef.doSearch()
|
||||
})
|
||||
},
|
||||
|
||||
},
|
||||
created() {
|
||||
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,177 @@
|
||||
<!--#
|
||||
layout("/layouts/platform_h5.html"){
|
||||
#-->
|
||||
|
||||
<style>
|
||||
.detail-content {
|
||||
padding: 16px;
|
||||
max-height: 70vh;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.detail-cover {
|
||||
margin-bottom: 16px;
|
||||
border-radius: 8px;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.detail-text {
|
||||
margin-bottom: 16px;
|
||||
}
|
||||
|
||||
.content-label {
|
||||
font-size: 14px;
|
||||
font-weight: 500;
|
||||
color: #323233;
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
|
||||
.content-html {
|
||||
font-size: 14px;
|
||||
line-height: 1.6;
|
||||
color: #646566;
|
||||
word-break: break-all;
|
||||
}
|
||||
|
||||
.content-html p {
|
||||
margin: 8px 0;
|
||||
}
|
||||
|
||||
.detail-link {
|
||||
margin-bottom: 16px;
|
||||
}
|
||||
|
||||
.detail-info {
|
||||
border-top: 1px solid #ebedf0;
|
||||
padding-top: 12px;
|
||||
}
|
||||
|
||||
.info-item {
|
||||
font-size: 12px;
|
||||
color: #969799;
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
|
||||
.info-item:last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<van-nav-bar title="惠民服务" left-text="返回" left-arrow @click-left="historyBack" placeholder fixed></van-nav-bar>
|
||||
<van-sticky offset-top="46px">
|
||||
<van-search
|
||||
v-model="pageForm.searchKeyword"
|
||||
:show-action="false"
|
||||
:reverse-color="false"
|
||||
input-align="left"
|
||||
placeholder="请输入关键字搜索"
|
||||
@search="doSearch"
|
||||
></van-search>
|
||||
</van-sticky>
|
||||
|
||||
<table-list api="/platform/huimin/mine/pageData"
|
||||
:page_form.sync="pageForm"
|
||||
@ready="onReady"
|
||||
img="cover"
|
||||
ref="tableListRef">
|
||||
<template v-slot="{index,row}">
|
||||
<table-column label="标题">{{row.title}}</table-column>
|
||||
</template>
|
||||
<template #actions="{index,row}">
|
||||
<div class="action-btn" @click="onView(row)">
|
||||
<i class="fa fa-eye"></i>
|
||||
<span>查看</span>
|
||||
</div>
|
||||
</template>
|
||||
</table-list>
|
||||
|
||||
<!-- 详情弹出层 -->
|
||||
<van-action-sheet v-model="showDetail" :title="currentItem.title">
|
||||
<div class="detail-content">
|
||||
<!-- 封面图片 -->
|
||||
<div class="detail-cover" v-if="currentItem.cover">
|
||||
<van-image :src="currentItem.cover" fit="cover" width="100%" height="200px"></van-image>
|
||||
</div>
|
||||
|
||||
<!-- 内容 -->
|
||||
<div class="detail-text" v-if="currentItem.content">
|
||||
<div class="content-label">详细内容:</div>
|
||||
<div class="content-html" v-html="currentItem.content"></div>
|
||||
</div>
|
||||
|
||||
<!-- 外部链接 -->
|
||||
<div class="detail-link" v-if="currentItem.link">
|
||||
<van-button type="primary" block @click="openLink(currentItem.link)">
|
||||
<van-icon name="link"></van-icon>
|
||||
访问链接
|
||||
</van-button>
|
||||
</div>
|
||||
|
||||
<!-- 创建时间 -->
|
||||
<div class="detail-info">
|
||||
<div class="info-item">创建时间:{{ formatTime(currentItem.createdAt) }}</div>
|
||||
<div class="info-item" v-if="currentItem.updatedAt !== currentItem.createdAt">更新时间:{{ formatTime(currentItem.updatedAt) }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</van-action-sheet>
|
||||
|
||||
</div>
|
||||
|
||||
<script nonce="${cspNonce!}">
|
||||
new Vue({
|
||||
el: '#app',
|
||||
data() {
|
||||
return {
|
||||
pageForm: {
|
||||
pageNumber: 1,
|
||||
pageSize: 10,
|
||||
totalCount: 0,
|
||||
searchKeyword: null,
|
||||
sessionId: null,
|
||||
delegationId: null,
|
||||
roleId: null
|
||||
},
|
||||
showDetail: false,
|
||||
currentItem: {}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
historyBack,
|
||||
onReady(){
|
||||
this.doSearch()
|
||||
},
|
||||
doSearch() {
|
||||
this.$nextTick(() => {
|
||||
this.pageForm.pageNumber = 1
|
||||
this.pageForm.totalCount = 0
|
||||
this.$refs.tableListRef.doSearch()
|
||||
})
|
||||
},
|
||||
onView(row){
|
||||
this.currentItem = row
|
||||
this.showDetail = true
|
||||
},
|
||||
openLink(url) {
|
||||
if (url) {
|
||||
window.open(url, '_blank')
|
||||
}
|
||||
},
|
||||
formatTime(timestamp) {
|
||||
if (!timestamp) return ''
|
||||
const date = new Date(timestamp)
|
||||
return date.toLocaleString('zh-CN', {
|
||||
year: 'numeric',
|
||||
month: '2-digit',
|
||||
day: '2-digit',
|
||||
hour: '2-digit',
|
||||
minute: '2-digit'
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,105 @@
|
||||
<!--#
|
||||
layout("/layouts/platform_h5.html"){
|
||||
#-->
|
||||
|
||||
<style scoped>
|
||||
img {
|
||||
object-fit: contain !important;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div id="app">
|
||||
<van-nav-bar title="法律援助预约" left-text="返回" left-arrow @click-left="historyBack" fixed placeholder></van-nav-bar>
|
||||
|
||||
<van-sticky offset-top="46px">
|
||||
<van-search
|
||||
v-model="pageForm.searchKeyword"
|
||||
:show-action="false"
|
||||
:reverse-color="false"
|
||||
input-align="left"
|
||||
placeholder="请输入姓名或者工号搜索"
|
||||
@search="doSearch"
|
||||
></van-search>
|
||||
<van-dropdown-menu :close-on-click-outside="false" :close-on-click-overlay="false">
|
||||
<van-dropdown-item v-model="pageForm.sex" :options="sexOptions" :multiple="false"
|
||||
@change="doSearch"></van-dropdown-item>
|
||||
</van-dropdown-menu>
|
||||
</van-sticky>
|
||||
|
||||
<table-list api="/platform/legal/apply/h5PageData"
|
||||
:page_form.sync="pageForm"
|
||||
ref="tableListRef"
|
||||
title="userName"
|
||||
img="avatar"
|
||||
@ready="doSearch">
|
||||
<template v-slot="{index,row}">
|
||||
<table-column label="性别">{{row.sex}}</table-column>
|
||||
<table-column label="擅长方向">{{row.specialty}}</table-column>
|
||||
<table-column label="简介">{{row.introduce}}</table-column>
|
||||
</template>
|
||||
<template #actions="{index,row}">
|
||||
<div class="action-btn" @click="onView(row)">
|
||||
<i class="fa fa-eye"></i>
|
||||
<span>详细信息</span>
|
||||
</div>
|
||||
<div class="action-btn" @click="onApply(row)">
|
||||
<i class="fa fa-edit"></i>
|
||||
<span>预约</span>
|
||||
</div>
|
||||
</template>
|
||||
</table-list>
|
||||
|
||||
<doctor-info ref="doctorInfoRef"></doctor-info>
|
||||
<apply-form ref="applyFormRef"></apply-form>
|
||||
</div>
|
||||
|
||||
<script nonce="${cspNonce!}">
|
||||
<!--#include('../common/doctorInfo.js'){}#-->
|
||||
<!--#include('../common/applyForm.js'){}#-->
|
||||
new Vue({
|
||||
el: "#app",
|
||||
store,
|
||||
components: {
|
||||
"doctor-info": doctorInfo,
|
||||
"apply-form": applyForm
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
pageForm: {
|
||||
pageNumber: 1,
|
||||
pageSize: 10,
|
||||
totalCount: 0,
|
||||
sex: null,
|
||||
},
|
||||
sexOptions: [
|
||||
{text: '全部', value: null},
|
||||
{text: '男', value: '男'},
|
||||
{text: '女', value: '女'},
|
||||
],
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
onView(row) {
|
||||
this.$refs.doctorInfoRef.onOpen(row)
|
||||
},
|
||||
onApply(row) {
|
||||
if(!row.times || row.times.length === 0) {
|
||||
this.$toast(row.userName + '暂无可预约时间段')
|
||||
return
|
||||
}
|
||||
this.$refs.applyFormRef.onOpen(row)
|
||||
},
|
||||
doSearch() {
|
||||
this.$nextTick(() => {
|
||||
this.pageForm.pageNumber = 1
|
||||
this.pageForm.totalCount = 0
|
||||
this.$refs.tableListRef.doSearch()
|
||||
})
|
||||
}
|
||||
},
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,139 @@
|
||||
const applyForm = {
|
||||
template: /*language=HTML*/ `
|
||||
<div>
|
||||
<van-action-sheet :close-on-click-overlay="false" title="预约信息" v-model="visible">
|
||||
<van-form ref="formRef" class="form-container">
|
||||
<van-cell-group title="咨询师信息" class="form-section">
|
||||
<van-field label="姓名" readonly v-model="row.userName"></van-field>
|
||||
<van-field label="性别" readonly v-model="row.sex"></van-field>
|
||||
<van-field label="单位" readonly v-model="row.unitName"></van-field>
|
||||
<van-field label="电话" readonly v-model="row.mobile"></van-field>
|
||||
</van-cell-group>
|
||||
|
||||
<van-cell-group title="预约时间段" class="form-section">
|
||||
<van-field required :rules="[{ required: true }]"
|
||||
label="时间段"
|
||||
placeholder="请点击时间段"
|
||||
v-model="formData.time"
|
||||
readonly
|
||||
is-link
|
||||
@click="timePicker = true"
|
||||
></van-field>
|
||||
<van-popup position="bottom" round v-model:show="timePicker">
|
||||
<van-picker
|
||||
title="请选择预约时间段"
|
||||
show-toolbar
|
||||
:columns="row.times"
|
||||
@confirm="timeConfirm"
|
||||
@cancel="timePicker = false"
|
||||
value-key="time"
|
||||
></van-picker>
|
||||
</van-popup>
|
||||
</van-cell-group>
|
||||
|
||||
<van-cell-group title="基本信息" class="form-section">
|
||||
<van-field label="姓名" readonly v-model="formData.userName"></van-field>
|
||||
<van-field label="工号" readonly v-model="formData.loginName"></van-field>
|
||||
<van-field label="单位" readonly v-model="formData.unitName"></van-field>
|
||||
<van-field required :rules="[{ required: true }]"
|
||||
label="联系方式"
|
||||
v-model="formData.mobile"
|
||||
placeholder="请输入联系方式"
|
||||
></van-field>
|
||||
|
||||
<van-field required :rules="[{ required: true }]"
|
||||
label="咨询方式"
|
||||
placeholder="请点击选择联系方式"
|
||||
v-model="formData.askTypeName"
|
||||
readonly
|
||||
is-link
|
||||
@click="askTypePicker = true"
|
||||
></van-field>
|
||||
<van-popup position="bottom" round v-model:show="askTypePicker">
|
||||
<van-picker
|
||||
title="请选择咨询方式"
|
||||
show-toolbar
|
||||
:columns="askTypeColumns"
|
||||
@confirm="(val) => {formData.askTypeName = val.name; formData.askTypeValue = val.code; askTypePicker = false}"
|
||||
@cancel="askTypePicker = false"
|
||||
value-key="name"
|
||||
></van-picker>
|
||||
</van-popup>
|
||||
|
||||
<van-field
|
||||
v-model="formData.remark"
|
||||
name="remark"
|
||||
label="预约备注"
|
||||
type="textarea"
|
||||
rows="4"
|
||||
autosize
|
||||
placeholder="请输入预约备注"
|
||||
></van-field>
|
||||
</van-cell-group>
|
||||
|
||||
<div class="form-actions">
|
||||
<van-button @click="onSubmit" round type="info">提交申请</van-button>
|
||||
</div>
|
||||
</van-form>
|
||||
</van-action-sheet>
|
||||
</div>
|
||||
`,
|
||||
store,
|
||||
dicts: ["LEGAL_ASK_TYPE"],
|
||||
data() {
|
||||
return {
|
||||
visible:false,
|
||||
row: {},
|
||||
formData: {},
|
||||
sourceAskTypes: [],
|
||||
|
||||
askTypePicker: false,
|
||||
askTypeColumns: [],
|
||||
|
||||
timePicker: false,
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
onOpen(row) {
|
||||
row.times.forEach(item => {
|
||||
this.$set(item, 'time', this.$moment(item.startTime).format('YYYY-MM-DD HH:mm') + ' ~ ' + this.$moment(item.endTime).format('HH:mm'))
|
||||
})
|
||||
this.row = row
|
||||
this.visible = true
|
||||
|
||||
this.init()
|
||||
},
|
||||
init() {
|
||||
this.$set(this.formData, 'userId', this.$store.state.user.id)
|
||||
this.$set(this.formData, 'userName', this.$store.state.user.username)
|
||||
this.$set(this.formData, 'loginName', this.$store.state.user.loginname)
|
||||
this.$set(this.formData, 'unitName', this.$store.state.user?.unit?.name)
|
||||
this.$set(this.formData, 'mobile', this.$store.state.user.mobile)
|
||||
},
|
||||
timeConfirm(val, index) {
|
||||
this.askTypeColumns = this.dict.type.LEGAL_ASK_TYPE.filter(o => val.askType.includes(o.code))
|
||||
this.$set(this.formData, 'time', val.time)
|
||||
this.$set(this.formData, 'id', val.id)
|
||||
this.timePicker = false
|
||||
},
|
||||
onSubmit() {
|
||||
this.$refs.formRef.validate().then(() => {
|
||||
this.$dialog.confirm({
|
||||
title: "提示",
|
||||
message: "您确定要提交吗?"
|
||||
}).then(() => {
|
||||
this.$axios.post("/platform/legal/apply/submit", this.formData).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.$toast(res.msg)
|
||||
this.visible = false
|
||||
this.$pjaxReplace("/platform/legal/list/h5")
|
||||
}
|
||||
})
|
||||
})
|
||||
})
|
||||
},
|
||||
},
|
||||
style: /*language=CSS*/ `
|
||||
|
||||
`
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
const applyInfo = {
|
||||
template: /*language=HTML*/ `
|
||||
<div>
|
||||
<van-action-sheet v-model="visible" title="详细信息" cancel-text="取消">
|
||||
<div class="detail-container">
|
||||
<van-cell-group title="咨询师信息">
|
||||
<van-cell title="姓名">{{ row.doctorUserName }}</van-cell>
|
||||
<van-cell title="工号">{{ row.doctorUnitName }}</van-cell>
|
||||
<van-cell title="联系方式">{{ row.doctorMobile }}</van-cell>
|
||||
<van-cell title="职称">{{ row.doctorJobTitle }}</van-cell>
|
||||
<van-cell title="个人简介" class="direction-column-cell">
|
||||
{{ row.doctorIntroduce }}
|
||||
</van-cell>
|
||||
</van-cell-group>
|
||||
<van-cell-group title="预约时间段">
|
||||
<van-cell title="开始时间">{{ row.startTime }}</van-cell>
|
||||
<van-cell title="结束时间">{{ row.endTime }}</van-cell>
|
||||
</van-cell-group>
|
||||
<van-cell-group title="预约人信息">
|
||||
<van-cell title="姓名">{{ row.appointmentUserName }}</van-cell>
|
||||
<van-cell title="工号">{{ row.appointmentLoginName }}</van-cell>
|
||||
<van-cell title="单位">{{ row.appointmentUnitName }}</van-cell>
|
||||
<van-cell title="联系方式">{{ row.appointmentMobile }}</van-cell>
|
||||
<van-cell title="预约咨询方式">
|
||||
<dict-tag :options="dict.type.PSYCHOLOGY_ASK_TYPE" :value="row.askTypeValue"></dict-tag>
|
||||
</van-cell>
|
||||
<van-cell title="预约人备注" class="direction-column-cell">{{ row.remark }}</van-cell>
|
||||
</van-cell-group>
|
||||
</div>
|
||||
</van-action-sheet>
|
||||
</div>
|
||||
`,
|
||||
dicts:["LEGAL_ASK_TYPE"],
|
||||
data() {
|
||||
return {
|
||||
visible:false,
|
||||
row: {},
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
onOpen(row) {
|
||||
this.row = row
|
||||
this.visible = true
|
||||
},
|
||||
},
|
||||
style: /*language=CSS*/ `
|
||||
|
||||
`
|
||||
}
|
||||
@@ -0,0 +1,77 @@
|
||||
const doctorInfo = {
|
||||
template: /*language=HTML*/ `
|
||||
<div>
|
||||
<van-action-sheet v-model="visible" title="详细信息" cancel-text="取消">
|
||||
<div class="detail-container">
|
||||
<van-cell-group title="基本信息">
|
||||
<van-cell title="姓名">{{ row?.userName }}</van-cell>
|
||||
<van-cell title="性别">{{ row?.sex }}</van-cell>
|
||||
<van-cell title="职称">{{ row?.jobTitle }}</van-cell>
|
||||
<van-cell title="单位">{{ row?.unitName }}</van-cell>
|
||||
<van-cell title="联系方式">{{ row?.mobile }}</van-cell>
|
||||
<van-cell title="擅长方向" class="direction-column-cell">{{ row?.specialty }}</van-cell>
|
||||
<van-cell title="个人简介" class="direction-column-cell">{{ row?.introduce }}</van-cell>
|
||||
</van-cell-group>
|
||||
<van-cell-group title="可预约时段">
|
||||
<table v-if="row?.times && row?.times.length > 0" class="table-class">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>日期</th>
|
||||
<th>开始时间</th>
|
||||
<th>结束时间</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="(item,index) in row?.times" :key="index">
|
||||
<td>{{ $moment(item.startTime).format('YYYY-MM-DD') }}</td>
|
||||
<td>{{ $moment(item.startTime).format('HH:mm') }}</td>
|
||||
<td>{{ $moment(item.endTime).format('HH:mm') }}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<div v-else class="empty-text">暂无可预约时段</div>
|
||||
</van-cell-group>
|
||||
</div>
|
||||
</van-action-sheet>
|
||||
</div>
|
||||
`,
|
||||
data() {
|
||||
return {
|
||||
visible:false,
|
||||
row: null,
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
onOpen(row) {
|
||||
this.row = row
|
||||
this.visible = true
|
||||
},
|
||||
},
|
||||
style: /*language=CSS*/ `
|
||||
/deep/ .table-class{
|
||||
width: 100%;
|
||||
border-radius: 5px;
|
||||
overflow: hidden;
|
||||
line-height: 1.5rem;
|
||||
font-size: 13px;
|
||||
table-layout: fixed;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
/deep/ .table-class th {
|
||||
background-color: #f2f2f2;
|
||||
border: 1px solid #dddddd;
|
||||
}
|
||||
/deep/ .table-class tr {
|
||||
text-align: center;
|
||||
border-bottom: 1px solid #dddddd;
|
||||
}
|
||||
/deep/ .table-class td {
|
||||
border: 1px solid #dddddd;
|
||||
}
|
||||
/deep/ .empty-text {
|
||||
font-size: 14px;
|
||||
text-align: center;
|
||||
padding: 10px 0;
|
||||
}
|
||||
`
|
||||
}
|
||||
@@ -0,0 +1,98 @@
|
||||
<!--#
|
||||
layout("/layouts/platform_h5.html"){
|
||||
#-->
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
|
||||
<div id="app">
|
||||
<van-nav-bar title="预约记录" left-text="返回" left-arrow @click-left="historyBack" fixed placeholder></van-nav-bar>
|
||||
|
||||
<van-sticky offset-top="46px">
|
||||
<van-dropdown-menu :close-on-click-outside="false" :close-on-click-overlay="false">
|
||||
<year-van-dropdown-item :num="5" @change="doSearch" v-model="pageForm.year"></year-van-dropdown-item>
|
||||
</van-dropdown-menu>
|
||||
</van-sticky>
|
||||
|
||||
<table-list api="/platform/legal/list/pageData"
|
||||
:page_form.sync="pageForm"
|
||||
ref="tableListRef"
|
||||
title="doctorUserName"
|
||||
@ready="doSearch">
|
||||
<template v-slot="{index,row}">
|
||||
<table-column label="姓名">{{row.appointmentUserName}}</table-column>
|
||||
<table-column label="工号">{{row.appointmentLoginName}}</table-column>
|
||||
<table-column label="单位">{{row.appointmentUnitName}}</table-column>
|
||||
<table-column label="开始时间">{{row.startTime}}</table-column>
|
||||
<table-column label="结束时间">{{row.endTime}}</table-column>
|
||||
</template>
|
||||
<template #actions="{index,row}">
|
||||
<div class="action-btn" @click="onView(row)">
|
||||
<i class="fa fa-eye"></i>
|
||||
<span>查看</span>
|
||||
</div>
|
||||
<div v-if="$moment().unix() < $moment(row.startTime).unix()"
|
||||
class="action-btn delete" @click="onDelete(row)">
|
||||
<i class="fa fa-trash"></i>
|
||||
<span>删除</span>
|
||||
</div>
|
||||
</template>
|
||||
</table-list>
|
||||
|
||||
<info ref="infoRef"></info>
|
||||
</div>
|
||||
|
||||
<script nonce="${cspNonce!}">
|
||||
<!--#include('../common/applyInfo.js'){}#-->
|
||||
new Vue({
|
||||
el: "#app",
|
||||
store,
|
||||
components: {
|
||||
"info": applyInfo,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
pageForm: {
|
||||
pageNumber: 1,
|
||||
pageSize: 10,
|
||||
totalCount: 0,
|
||||
year: new Date().getFullYear(),
|
||||
},
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
onView(row) {
|
||||
this.$refs.infoRef.onOpen(row)
|
||||
},
|
||||
onDelete(row) {
|
||||
this.$dialog.confirm({
|
||||
title: "提示",
|
||||
message: "您确定要删除吗?"
|
||||
})
|
||||
.then(() => {
|
||||
this.$axios.post("/platform/legal/list/delete", { id: row.id }).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$toast.success(res.msg)
|
||||
this.doSearch()
|
||||
} else {
|
||||
this.$toast.fail(res.msg)
|
||||
}
|
||||
})
|
||||
})
|
||||
.catch(() => {})
|
||||
},
|
||||
doSearch() {
|
||||
this.$nextTick(() => {
|
||||
this.pageForm.pageNumber = 1
|
||||
this.pageForm.totalCount = 0
|
||||
this.$refs.tableListRef.doSearch()
|
||||
})
|
||||
}
|
||||
},
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,87 @@
|
||||
const applyForm = {
|
||||
template: /*language=HTML*/ `
|
||||
<div>
|
||||
<van-action-sheet :close-on-click-overlay="false" title="咨询信息" v-model="visible">
|
||||
<van-notice-bar
|
||||
left-icon="volume-o"
|
||||
text="温馨提示:不会发布您的个人隐私信息,您咨询的内容只有咨询师可查看并回复。"
|
||||
></van-notice-bar>
|
||||
<van-form ref="formRef" class="form-container">
|
||||
<van-cell-group title="基本信息" class="form-section">
|
||||
<van-field label="咨询人姓名" :rules="[{ required: true }]"
|
||||
:value="$store.state.user.username"
|
||||
readonly
|
||||
required
|
||||
name="username"></van-field>
|
||||
<van-field label="咨询人工号" :rules="[{ required: true }]"
|
||||
:value="$store.state.user.loginname"
|
||||
readonly
|
||||
required
|
||||
name="loginname"></van-field>
|
||||
<van-field
|
||||
v-model="formData.postTitle"
|
||||
name="postTitle"
|
||||
label="咨询主题"
|
||||
type="textarea"
|
||||
rows="4"
|
||||
autosize
|
||||
placeholder="请简约填写咨询主题,不超过20个字"
|
||||
:rules="[{ required: true }]"
|
||||
required
|
||||
></van-field>
|
||||
<van-field
|
||||
v-model="formData.postContent"
|
||||
name="postContent"
|
||||
label="主要内容"
|
||||
type="textarea"
|
||||
rows="4"
|
||||
autosize
|
||||
placeholder="请输入主要内容"
|
||||
:rules="[{ required: true }]"
|
||||
required
|
||||
></van-field>
|
||||
</van-cell-group>
|
||||
|
||||
<div class="form-actions">
|
||||
<van-button @click="onSubmit" round type="info">提交申请</van-button>
|
||||
</div>
|
||||
</van-form>
|
||||
</van-action-sheet>
|
||||
</div>
|
||||
`,
|
||||
store,
|
||||
data() {
|
||||
return {
|
||||
visible:false,
|
||||
formData: {},
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
onOpen(row) {
|
||||
if(row && row.id) {
|
||||
this.formData = clone(row)
|
||||
}
|
||||
this.visible = true
|
||||
},
|
||||
onSubmit() {
|
||||
this.$refs.formRef.validate().then(() => {
|
||||
this.$dialog.confirm({
|
||||
title: "提示",
|
||||
message: "您确定要提交吗?"
|
||||
}).then(() => {
|
||||
this.$axios.post("/platform/legal/onlinePost/submit", this.formData).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.$toast(res.msg)
|
||||
this.visible = false
|
||||
this.$emit('refresh')
|
||||
}
|
||||
})
|
||||
})
|
||||
})
|
||||
},
|
||||
},
|
||||
style: /*language=CSS*/ `
|
||||
|
||||
`
|
||||
}
|
||||
|
||||
@@ -0,0 +1,123 @@
|
||||
<!--#
|
||||
layout("/layouts/platform_h5.html"){
|
||||
#-->
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
|
||||
<div id="app">
|
||||
<van-nav-bar title="发帖咨询" left-text="返回" left-arrow @click-left="historyBack" fixed placeholder
|
||||
right-text="我要咨询" @click-right="onAdd"></van-nav-bar>
|
||||
|
||||
<van-sticky offset-top="46px">
|
||||
<van-dropdown-menu :close-on-click-outside="false" :close-on-click-overlay="false">
|
||||
<year-van-dropdown-item :num="5" @change="doSearch" v-model="pageForm.year"></year-van-dropdown-item>
|
||||
<van-dropdown-item v-model="pageForm.isReply" :options="replyOptions" :multiple="false"
|
||||
@change="doSearch"></van-dropdown-item>
|
||||
</van-dropdown-menu>
|
||||
</van-sticky>
|
||||
|
||||
<table-list api="/platform/legal/onlinePost/pageData"
|
||||
:page_form.sync="pageForm"
|
||||
ref="tableListRef"
|
||||
title="postTitle"
|
||||
@ready="doSearch">
|
||||
<template v-slot="{index,row}">
|
||||
<table-column label="工号">{{row.loginName}}</table-column>
|
||||
<table-column label="姓名">{{row.userName}}</table-column>
|
||||
<table-column label="咨询时间">{{row.postingTime}}</table-column>
|
||||
<table-column label="回复情况">
|
||||
<van-tag color="#67c23a" v-if="row.isReply">已回复</van-tag>
|
||||
<van-tag type="primary" v-else>未回复</van-tag>
|
||||
</table-column>
|
||||
</template>
|
||||
<template #actions="{index,row}">
|
||||
<div class="action-btn" @click="onView(row)">
|
||||
<i class="fa fa-eye"></i>
|
||||
<span>查看</span>
|
||||
</div>
|
||||
<div class="action-btn" @click="onEdit(row)">
|
||||
<i class="fa fa-edit"></i>
|
||||
<span>编辑</span>
|
||||
</div>
|
||||
<div v-if="!row.isReply"
|
||||
class="action-btn delete" @click="onDelete(row)">
|
||||
<i class="fa fa-trash"></i>
|
||||
<span>删除</span>
|
||||
</div>
|
||||
</template>
|
||||
</table-list>
|
||||
|
||||
<info ref="infoRef"></info>
|
||||
<apply-form ref="applyFormRef" @refresh="doSearch"></apply-form>
|
||||
</div>
|
||||
|
||||
<script nonce="${cspNonce!}">
|
||||
<!--#include('applyForm.js'){}#-->
|
||||
<!--#include('info.js'){}#-->
|
||||
new Vue({
|
||||
el: "#app",
|
||||
store,
|
||||
components: {
|
||||
"apply-form": applyForm,
|
||||
"info": info,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
pageForm: {
|
||||
pageNumber: 1,
|
||||
pageSize: 10,
|
||||
totalCount: 0,
|
||||
year: new Date().getFullYear(),
|
||||
isReply: null,
|
||||
},
|
||||
replyOptions: [
|
||||
{text: '全部', value: null},
|
||||
{text: '已回复', value: true},
|
||||
{text: '未回复', value: false},
|
||||
],
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
onView(row) {
|
||||
const url = '/platform/legal/onlinePost/fetchOne'
|
||||
this.$refs.infoRef.onOpen(row, url)
|
||||
},
|
||||
onAdd() {
|
||||
this.$refs.applyFormRef.onOpen()
|
||||
},
|
||||
onEdit(row) {
|
||||
this.$refs.applyFormRef.onOpen(row)
|
||||
},
|
||||
onDelete(row) {
|
||||
this.$dialog.confirm({
|
||||
title: "提示",
|
||||
message: "您确定要删除吗?"
|
||||
})
|
||||
.then(() => {
|
||||
this.$axios.post("/platform/legal/onlinePost/delete", { id: row.id }).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$toast.success(res.msg)
|
||||
this.doSearch()
|
||||
} else {
|
||||
this.$toast.fail(res.msg)
|
||||
}
|
||||
})
|
||||
})
|
||||
.catch(() => {})
|
||||
},
|
||||
doSearch() {
|
||||
this.$nextTick(() => {
|
||||
this.pageForm.pageNumber = 1
|
||||
this.pageForm.totalCount = 0
|
||||
this.$refs.tableListRef.doSearch()
|
||||
})
|
||||
}
|
||||
},
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,73 @@
|
||||
const info = {
|
||||
template: /*language=HTML*/ `
|
||||
<div>
|
||||
<van-action-sheet v-model="visible" title="详细信息" cancel-text="取消">
|
||||
<div class="detail-container">
|
||||
<van-cell-group title="基础信息">
|
||||
<van-cell title="咨询人">{{ viewData.userName }}</van-cell>
|
||||
<van-cell title="咨询时间">{{ viewData.postingTime }}</van-cell>
|
||||
<van-cell title="咨询主题">{{ viewData.postTitle }}</van-cell>
|
||||
<van-cell title="主要内容" class="direction-column-cell">
|
||||
{{ viewData.postContent }}
|
||||
</van-cell>
|
||||
</van-cell-group>
|
||||
<van-cell-group title="回复信息">
|
||||
<van-steps v-if="viewData.replyList && viewData.replyList.length > 0" direction="vertical" active-icon="setting">
|
||||
<van-step v-for="(item, index) in viewData.replyList">
|
||||
<div class="user-face">
|
||||
<svg t="1639966214107" class="icon" viewBox="0 0 3208 1024" version="1.1"
|
||||
xmlns="http://www.w3.org/2000/svg" p-id="6251" width="80" height="30">
|
||||
<path d="M343.496334 367.185736m-225.049322 0a225.049322 225.049322 0 1 0 450.098644 0 225.049322 225.049322 0 1 0-450.098644 0Z"
|
||||
fill="#FFFFFF" p-id="6252"></path>
|
||||
<path d="M1879.043392 0H355.341035c-3.079622 0-20.846674 23.689402-23.689402 23.689402 14.687429 3.079622 23.689402-11.370913 33.638951 0C400.350899 58.512824 450.098644 99.49549 497.477449 94.757609h23.689402c37.903044 0 58.512824 5.685457 57.565248 41.693348a155.639373 155.639373 0 0 0 71.068207 118.447012 76.51677 76.51677 0 0 1 10.186443 6.869927 64.19828 64.19828 0 0 1 9.001973 93.573139 152.796645 152.796645 0 0 0-23.689403 134.318911 58.27593 58.27593 0 0 1 3.553411 12.555383A66.567221 66.567221 0 0 1 592.235058 578.495205a161.087936 161.087936 0 0 0-108.260569 87.650788 77.227452 77.227452 0 0 1-6.159244 12.555384c-14.924323 23.689402-19.42531 11.370913-47.378805 6.869926L426.409242 686.992667h9.001973l11.370913 23.689403h1432.261264C2071.164445 710.68207 2226.803818 562.149517 2226.803818 379.030437v-47.378804c0-183.11908-155.639373-331.651633-347.760426-331.651633z"
|
||||
fill="#EDF5FE" p-id="6253"></path>
|
||||
<path d="M688.650926 261.767896a74.147829 74.147829 0 0 0-9.949549-6.869927 156.586949 156.586949 0 0 1-67.514797-118.447012 65.619644 65.619644 0 0 0-63.961386-66.804114 61.355552 61.355552 0 0 0-13.266066 1.18447 154.218009 154.218009 0 0 1-126.975196-47.378805 65.145856 65.145856 0 0 0-36.718574-21.557356 21.320462 21.320462 0 0 0-12.318489 12.081595 324.544812 324.544812 0 0 0-58.039036 23.689403 334.020573 334.020573 0 0 1 58.27593-23.689403 21.79425 21.79425 0 0 1 12.555383-12.081595 64.19828 64.19828 0 0 0-54.722519 12.318489 78.88571 78.88571 0 0 0-10.423337 9.475761 154.691797 154.691797 0 0 1-126.975196 47.378805 65.619644 65.619644 0 0 0-76.51677 52.116685 61.355552 61.355552 0 0 0 0 13.266065 157.060737 157.060737 0 0 1-67.514797 118.447012 66.567221 66.567221 0 0 0-23.689402 90.967305 55.433201 55.433201 0 0 0 4.974775 9.475761 158.95589 158.95589 0 0 1 23.689402 134.555805 65.856538 65.856538 0 0 0 37.903044 85.281848 56.617672 56.617672 0 0 0 12.792277 3.553411 156.586949 156.586949 0 0 1 103.522688 87.650788 65.145856 65.145856 0 0 0 82.43912 40.982666 86.466318 86.466318 0 0 0 12.555383-5.92235 154.218009 154.218009 0 0 1 135.266488 0 66.567221 66.567221 0 0 0 22.268038 8.054397 64.672068 64.672068 0 0 0 66.330326-30.559329 59.934188 59.934188 0 0 0 5.685457-12.555384 156.586949 156.586949 0 0 1 103.522688-87.650788 66.330327 66.330327 0 0 0 54.248731-76.279876 58.27593 58.27593 0 0 0-3.55341-12.555383 158.482102 158.482102 0 0 1 23.689402-134.318911 66.330327 66.330327 0 0 0-7.580608-93.810033zM355.341035 564.281563v17.530158a129.107243 129.107243 0 0 0 99.258596 125.316938A129.107243 129.107243 0 0 1 355.341035 581.811721v-17.530158L194.016205 240.684328h81.017756L355.341035 416.933481V25.110766 416.933481l81.017756-176.486047h81.017756zM921.51775 298.249575a584.891343 584.891343 0 0 1-98.074125 96.415868l-20.60978-22.504932a501.978435 501.978435 0 0 0 94.757609-92.151776z m-86.703212-120.10527a415.275223 415.275223 0 0 1 71.068207 54.959414l-21.79425 21.320462a450.098644 450.098644 0 0 0-70.594419-55.433201z m295.643741 227.181369v154.691797h-29.848647v-20.846674h-218.890078v20.846674H852.818484v-154.691797z m-248.738725 104.944052h218.890078v-76.042981h-218.890078z m101.153748-275.507749a260.583426 260.583426 0 0 1-47.378804 62.303128l-19.188416-23.689402a225.996898 225.996898 0 0 0 60.171082-108.260569l30.559329 3.790305c-3.079622 11.607807-6.869927 23.689402-11.370913 36.718573H1160.780714v24.400085a351.55073 351.55073 0 0 1-41.930242 71.068207l-22.504932-18.003946a268.874716 268.874716 0 0 0 30.559329-47.378805h-68.462373c0 16.819476-2.36894 29.374859-3.553411 37.429256 18.003946 47.378805 61.118658 78.648816 129.581031 94.757609l-12.792277 29.137965c-65.619644-18.003946-108.023675-47.378805-127.448985-91.441093-20.372886 40.745772-62.540022 71.068207-126.264514 89.309047l-13.029171-27.716601c68.699267-18.003946 108.734357-48.800169 118.447011-92.151775a298.486469 298.486469 0 0 0 4.027199-38.85062zM1221.18869 299.197151h92.151775v189.515219c11.370913-9.949549 26.058343-23.689402 43.825394-41.693348l8.528185 32.454481A544.856253 544.856253 0 0 1 1286.334546 544.856253l-11.844701-27.242812a25.821449 25.821449 0 0 0 9.475761-18.951522v-170.089909h-62.776916z m51.169109-126.264514a502.926011 502.926011 0 0 1 71.068207 65.619644l-20.846674 21.320462a458.153041 458.153041 0 0 0-72.489571-66.093432z m170.089908 0a395.139231 395.139231 0 0 1-13.502959 42.640924h167.957863q0 231.445461-5.922351 288.53692a54.485625 54.485625 0 0 1-60.64487 53.301156l-40.508878-1.18447-7.343715-27.716601c23.689402 0 37.429256 1.658258 44.062289 1.658258 19.662204 0 31.033117-12.555383 34.586527-37.903044s4.500986-108.260569 5.448563-247.791148h-150.901493a310.33117 310.33117 0 0 1-56.617672 76.279875l-19.42531-23.689402a260.583426 260.583426 0 0 0 72.252677-129.581031z m-58.749717 121.526634h130.528607v195.200675h-130.528607z m29.848647 83.860484h71.068207v-58.749718h-71.068207z m71.068207 84.80806V402.71984h-71.068207v59.223505zM1741.881753 170.800591h29.848647v203.018178q-1.895152 126.975196-86.940107 185.961808l-23.689402-20.135992c52.827367-34.586527 79.359498-90.019729 80.307074-165.825816z m-75.095405 55.906989h29.848646V450.098644h-29.848646z m131.002394-40.508878H2037.2886v29.848647h-104.707158v52.353579h87.650788v208.940529c0 23.689402-10.660231 35.534103-32.217587 35.534103h-29.137965l-8.054397-29.848647 27.242813 1.658259c8.528185 0 12.792277-4.500986 12.792277-13.739854v-173.880213h-58.275929v260.583426h-30.085541v-260.583426h-58.27593v218.653184h-29.374859V268.400928h87.650789V216.047349h-104.707159z"
|
||||
fill="#4492F4" p-id="6254"></path>
|
||||
</svg>
|
||||
<span style="position: relative; top: 2px">{{ item.userName }}</span>
|
||||
</div>
|
||||
<div>回复时间:{{ item.replyTime }}</div>
|
||||
<div>回复内容:{{ item.replyContent }}</div>
|
||||
</van-step>
|
||||
</van-steps>
|
||||
<div v-else class="empty-text">暂无回复信息</div>
|
||||
</van-cell-group>
|
||||
</div>
|
||||
</van-action-sheet>
|
||||
</div>
|
||||
`,
|
||||
data() {
|
||||
return {
|
||||
visible:false,
|
||||
row: {},
|
||||
viewData: {},
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
onOpen(row, url) {
|
||||
this.row = row
|
||||
this.visible = true
|
||||
this.fetchOne(url)
|
||||
},
|
||||
fetchOne(url) {
|
||||
this.$axios.post(url, {id: this.row.id})
|
||||
.then((resp) => {
|
||||
this.viewData = resp.data
|
||||
this.visible = true
|
||||
})
|
||||
}
|
||||
},
|
||||
style: /*language=CSS*/ `
|
||||
/deep/ .empty-text {
|
||||
font-size: 14px;
|
||||
text-align: center;
|
||||
padding: 10px 0;
|
||||
}
|
||||
/deep/ .user-face{
|
||||
display: flex;
|
||||
}
|
||||
/deep/ .van-step__title {
|
||||
font-size: 13px;
|
||||
}
|
||||
`
|
||||
}
|
||||
@@ -0,0 +1,68 @@
|
||||
const applyForm = {
|
||||
template: /*language=HTML*/ `
|
||||
<div>
|
||||
<van-action-sheet :close-on-click-overlay="false" title="回复信息" v-model="visible">
|
||||
<van-form ref="formRef" class="form-container">
|
||||
<van-cell-group title="基本情况" class="form-section">
|
||||
<van-field label="咨询人" readonly :value="viewData.posterUserName"></van-field>
|
||||
<van-field label="咨询时间" readonly :value="viewData.postingTime"></van-field>
|
||||
<van-field label="咨询主题" readonly :value="viewData.postTitle"></van-field>
|
||||
<van-field label="主要内容" readonly :value="viewData.postContent"></van-field>
|
||||
</van-cell-group>
|
||||
<van-cell-group title="我来回复" class="form-section">
|
||||
<van-field
|
||||
v-model="formData.replyContent"
|
||||
name="replyContent"
|
||||
label="回复内容"
|
||||
type="textarea"
|
||||
rows="4"
|
||||
autosize
|
||||
placeholder="请输入回复内容"
|
||||
:rules="[{ required: true }]"
|
||||
required
|
||||
></van-field>
|
||||
</van-cell-group>
|
||||
|
||||
<div class="form-actions">
|
||||
<van-button @click="onSubmit" round type="info">提交</van-button>
|
||||
</div>
|
||||
</van-form>
|
||||
</van-action-sheet>
|
||||
</div>
|
||||
`,
|
||||
store,
|
||||
data() {
|
||||
return {
|
||||
visible:false,
|
||||
formData: {},
|
||||
viewData: {},
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
onOpen(row) {
|
||||
this.viewData = clone({ ...row })
|
||||
this.$set(this.formData, 'postId', row.id)
|
||||
this.visible = true
|
||||
},
|
||||
onSubmit() {
|
||||
this.$refs.formRef.validate().then(() => {
|
||||
this.$dialog.confirm({
|
||||
title: "提示",
|
||||
message: "您确定要提交吗?"
|
||||
}).then(() => {
|
||||
this.$axios.post("/platform/legal/onlineReply/submit", this.formData).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.$toast(res.msg)
|
||||
this.visible = false
|
||||
this.$emit('refresh')
|
||||
}
|
||||
})
|
||||
})
|
||||
})
|
||||
},
|
||||
},
|
||||
style: /*language=CSS*/ `
|
||||
|
||||
`
|
||||
}
|
||||
|
||||
@@ -0,0 +1,96 @@
|
||||
<!--#
|
||||
layout("/layouts/platform_h5.html"){
|
||||
#-->
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
|
||||
<div id="app">
|
||||
<van-nav-bar title="咨询回复" left-text="返回" left-arrow @click-left="historyBack" fixed placeholder></van-nav-bar>
|
||||
|
||||
<van-sticky offset-top="46px">
|
||||
<van-dropdown-menu :close-on-click-outside="false" :close-on-click-overlay="false">
|
||||
<year-van-dropdown-item :num="5" @change="doSearch" v-model="pageForm.year"></year-van-dropdown-item>
|
||||
<van-dropdown-item v-model="pageForm.isReply" :options="replyOptions" :multiple="false"
|
||||
@change="doSearch"></van-dropdown-item>
|
||||
</van-dropdown-menu>
|
||||
</van-sticky>
|
||||
|
||||
<table-list api="/platform/legal/onlineReply/pageData"
|
||||
:page_form.sync="pageForm"
|
||||
ref="tableListRef"
|
||||
title="postTitle"
|
||||
@ready="doSearch">
|
||||
<template v-slot="{index,row}">
|
||||
<table-column label="姓名">{{row.posterUserName}}</table-column>
|
||||
<table-column label="咨询时间">{{row.postingTime}}</table-column>
|
||||
<table-column label="回复情况">
|
||||
<van-tag color="#67c23a" v-if="row.replyCount > 0">已回复</van-tag>
|
||||
<van-tag type="primary" v-else>未回复</van-tag>
|
||||
</table-column>
|
||||
</template>
|
||||
<template #actions="{index,row}">
|
||||
<div class="action-btn" @click="onView(row)">
|
||||
<i class="fa fa-eye"></i>
|
||||
<span>查看</span>
|
||||
</div>
|
||||
<div class="action-btn" @click="onReply(row)">
|
||||
<i class="fa fa-edit"></i>
|
||||
<span>回复</span>
|
||||
</div>
|
||||
</template>
|
||||
</table-list>
|
||||
|
||||
<info ref="infoRef"></info>
|
||||
<apply-form ref="applyFormRef" @refresh="doSearch"></apply-form>
|
||||
</div>
|
||||
|
||||
<script nonce="${cspNonce!}">
|
||||
<!--#include('applyForm.js'){}#-->
|
||||
<!--#include('../onlinePost/info.js'){}#-->
|
||||
new Vue({
|
||||
el: "#app",
|
||||
store,
|
||||
components: {
|
||||
"apply-form": applyForm,
|
||||
"info": info,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
pageForm: {
|
||||
pageNumber: 1,
|
||||
pageSize: 10,
|
||||
totalCount: 0,
|
||||
year: new Date().getFullYear(),
|
||||
isReply: null,
|
||||
},
|
||||
replyOptions: [
|
||||
{text: '全部', value: null},
|
||||
{text: '已回复', value: true},
|
||||
{text: '未回复', value: false},
|
||||
],
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
onView(row) {
|
||||
const url = '/platform/legal/onlineReply/fetchOne'
|
||||
this.$refs.infoRef.onOpen(row, url)
|
||||
},
|
||||
onReply(row) {
|
||||
this.$refs.applyFormRef.onOpen(row)
|
||||
},
|
||||
doSearch() {
|
||||
this.$nextTick(() => {
|
||||
this.pageForm.pageNumber = 1
|
||||
this.pageForm.totalCount = 0
|
||||
this.$refs.tableListRef.doSearch()
|
||||
})
|
||||
}
|
||||
},
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,625 @@
|
||||
<!--#
|
||||
layout("/layouts/platform_h5.html"){
|
||||
#-->
|
||||
|
||||
<style>
|
||||
|
||||
</style>
|
||||
<div id="app" v-cloak>
|
||||
<van-nav-bar title="生育休假申请" left-text="返回" left-arrow @click-left="historyBack" placeholder fixed z-index="999"
|
||||
class="custom-nav"></van-nav-bar>
|
||||
|
||||
<div class="form-container">
|
||||
<van-form ref="formRef">
|
||||
<van-cell-group title="人员信息" class="form-section">
|
||||
<van-field label="职工姓名" v-model="formData.userName" placeholder="从信息中心获取"
|
||||
readonly></van-field>
|
||||
<van-field label="性别" v-model="formData.sex" placeholder="从信息中心获取" readonly></van-field>
|
||||
<van-field label="民族" v-model="formData.nation" placeholder="从信息中心获取" readonly></van-field>
|
||||
<van-field label="出生年月" v-model="formData.birthday" placeholder="从信息中心获取"
|
||||
readonly></van-field>
|
||||
<van-field label="工作单位" v-model="formData.unitName" placeholder="从信息中心获取"
|
||||
readonly></van-field>
|
||||
<van-field label="电话" v-model="formData.mobile" placeholder="从信息中心获取" readonly></van-field>
|
||||
<van-field label="爱人姓名" v-model="formData.loverName" placeholder="请输入爱人姓名" required></van-field>
|
||||
<van-field
|
||||
v-model="formData.loverSex"
|
||||
name="loverSex"
|
||||
label="性别"
|
||||
readonly
|
||||
placeholder="请选择性别"
|
||||
@click="showLoverSexPicker = true"
|
||||
clickable
|
||||
required
|
||||
></van-field>
|
||||
<van-popup position="bottom" round v-model:show="showLoverSexPicker">
|
||||
<van-picker :columns="loverSexColumns" @cancel="showLoverSexPicker = false"
|
||||
@confirm="onLoverSexConfirm" show-toolbar></van-picker>
|
||||
</van-popup>
|
||||
<van-field
|
||||
v-model="formData.loverNationName"
|
||||
name="loverNationName"
|
||||
label="民族"
|
||||
readonly
|
||||
placeholder="请选择民族"
|
||||
@click="showLoverNationPicker = true"
|
||||
clickable
|
||||
required
|
||||
></van-field>
|
||||
<van-popup position="bottom" round v-model:show="showLoverNationPicker">
|
||||
<van-picker :columns="loverNationColumns" @cancel="showLoverNationPicker = false"
|
||||
@confirm="onLoverNationConfirm" show-toolbar></van-picker>
|
||||
</van-popup>
|
||||
|
||||
<van-field label="出生年月"
|
||||
v-model="formData.loverBirthday"
|
||||
placeholder="请选择出生年月"
|
||||
readonly
|
||||
@click="showLoverBirthdayPicker = true"
|
||||
clickable
|
||||
required
|
||||
></van-field>
|
||||
<van-popup position="bottom" round v-model:show="showLoverBirthdayPicker">
|
||||
<van-datetime-picker
|
||||
type="date"
|
||||
:min-date="minDate"
|
||||
:max-date="maxDate"
|
||||
@confirm="onLoverBirthdayConfirm"
|
||||
@cancel="showLoverBirthdayPicker = false"
|
||||
show-toolbar
|
||||
/>
|
||||
</van-popup>
|
||||
<van-field label="工作单位" v-model="formData.loverUnitName" placeholder="请输入工作单位" required></van-field>
|
||||
</van-cell-group>
|
||||
|
||||
<van-cell-group title="假期类型" class="form-section">
|
||||
<van-field label="陪产假" v-model="formData.withLeave" readonly type="number"
|
||||
v-if="isMale" required></van-field>
|
||||
<van-field label="育儿假" v-model="formData.parentalLeave" readonly type="number"
|
||||
v-if="isMale" required></van-field>
|
||||
<van-field label="产假" v-model="formData.maternityLeave" placeholder="请输入天数" type="number"
|
||||
v-if="isFemale" required></van-field>
|
||||
<van-field label="延长假" v-model="formData.extendLeave" placeholder="请输入天数" type="number"
|
||||
v-if="isFemale" required></van-field>
|
||||
<!-- 替换原有的多胞胎和难产假输入框 -->
|
||||
<van-field
|
||||
v-if="isFemale"
|
||||
label="多胞胎"
|
||||
v-model="formData.birthsLeave"
|
||||
readonly
|
||||
placeholder="请选择天数"
|
||||
@click="showBirthsLeavePicker = true"
|
||||
clickable
|
||||
></van-field>
|
||||
<van-popup position="bottom" round v-model:show="showBirthsLeavePicker">
|
||||
<van-picker
|
||||
:columns="[{value: 15, text: '15天'}]"
|
||||
@cancel="showBirthsLeavePicker = false"
|
||||
@confirm="onBirthsLeaveConfirm"
|
||||
show-toolbar
|
||||
></van-picker>
|
||||
</van-popup>
|
||||
|
||||
<van-field
|
||||
v-if="isFemale"
|
||||
label="难产假"
|
||||
v-model="formData.difficultLeave"
|
||||
readonly
|
||||
placeholder="请选择天数"
|
||||
@click="showDifficultLeavePicker = true"
|
||||
clickable
|
||||
></van-field>
|
||||
<van-popup position="bottom" round v-model:show="showDifficultLeavePicker">
|
||||
<van-picker
|
||||
:columns="[{value: 15, text: '15天'}]"
|
||||
@cancel="showDifficultLeavePicker = false"
|
||||
@confirm="onDifficultLeaveConfirm"
|
||||
show-toolbar
|
||||
></van-picker>
|
||||
</van-popup>
|
||||
|
||||
<van-field label="寒假" v-model="formData.winterLeave" placeholder="请输入天数"
|
||||
type="number" ></van-field>
|
||||
<van-field label="暑假" v-model="formData.summerLeave" placeholder="请输入天数"
|
||||
type="number" ></van-field>
|
||||
<van-field label="合计天数" :value="totalLeaveDays" readonly></van-field>
|
||||
|
||||
<van-field label="休假时间起"
|
||||
v-model="formData.startTime"
|
||||
placeholder="请选择休假开始时间"
|
||||
readonly
|
||||
@click="showStartTimePicker = true"
|
||||
clickable
|
||||
required
|
||||
></van-field>
|
||||
<van-popup position="bottom" round v-model:show="showStartTimePicker">
|
||||
<van-datetime-picker
|
||||
type="date"
|
||||
:min-date="minDate"
|
||||
:max-date="maxDate"
|
||||
@confirm="onStartTimeConfirm"
|
||||
@cancel="showStartTimePicker = false"
|
||||
show-toolbar
|
||||
/>
|
||||
</van-popup>
|
||||
<van-field label="休假时间止"
|
||||
v-model="formData.endTime"
|
||||
placeholder="请选择休假结束时间"
|
||||
readonly
|
||||
@click="showEndTimePicker = true"
|
||||
clickable
|
||||
required
|
||||
></van-field>
|
||||
<van-popup position="bottom" round v-model:show="showEndTimePicker">
|
||||
<van-datetime-picker
|
||||
type="date"
|
||||
:min-date="minDate"
|
||||
:max-date="maxDate"
|
||||
@confirm="onEndTimeConfirm"
|
||||
@cancel="showEndTimePicker = false"
|
||||
show-toolbar
|
||||
/>
|
||||
</van-popup>
|
||||
<van-field label="子女出生日"
|
||||
v-model="formData.childrenBirthday"
|
||||
placeholder="请选择子女出生日期"
|
||||
readonly
|
||||
@click="showChildrenBirthdayPicker = true"
|
||||
clickable
|
||||
required
|
||||
></van-field>
|
||||
<van-popup position="bottom" round v-model:show="showChildrenBirthdayPicker">
|
||||
<van-datetime-picker
|
||||
type="date"
|
||||
:min-date="minDate"
|
||||
:max-date="maxDate"
|
||||
@confirm="onChildrenBirthdayConfirm"
|
||||
@cancel="showChildrenBirthdayPicker = false"
|
||||
show-toolbar
|
||||
/>
|
||||
</van-popup>
|
||||
|
||||
|
||||
</van-cell-group>
|
||||
<!-- 提交按钮 -->
|
||||
<div class="form-actions">
|
||||
<van-button plain @click="onSave" type="info">保存</van-button>
|
||||
<van-button @click="onSubmit" type="primary" v-if="!taskId">提交</van-button>
|
||||
<van-button @click="onSubmitAgain" type="primary" v-else>提交</van-button>
|
||||
</div>
|
||||
</van-form>
|
||||
</div>
|
||||
</div>
|
||||
<script nonce="${cspNonce!}">
|
||||
new Vue({
|
||||
store,
|
||||
el: '#app',
|
||||
dicts: ["USER_NATION"],
|
||||
data() {
|
||||
return {
|
||||
bizId: GetQueryString("bizId"),
|
||||
taskId: GetQueryString("taskId"),
|
||||
formData: {},
|
||||
// 民族
|
||||
showLoverNationPicker: false,
|
||||
loverNationColumns: [],
|
||||
// 性别
|
||||
showLoverSexPicker: false,
|
||||
loverSexColumns: [
|
||||
{ value: '男', text: '男' },
|
||||
{ value: '女', text: '女' }
|
||||
],
|
||||
showLoverBirthdayPicker: false,
|
||||
showStartTimePicker: false,
|
||||
showEndTimePicker: false,
|
||||
showChildrenBirthdayPicker: false,
|
||||
showBirthsLeavePicker: false,
|
||||
showDifficultLeavePicker: false,
|
||||
minDate: new Date(1950, 0, 1), // 设置最小日期为1950年1月1日
|
||||
maxDate: new Date(2040, 12, 31), // 设置最大日期为2040年12月31日
|
||||
// 表单验证规则
|
||||
formRules: {
|
||||
loverName: [{ required: true, message: '请输入爱人姓名' }],
|
||||
loverSex: [{ required: true, message: '请选择爱人性别' }],
|
||||
loverNationName: [{ required: true, message: '请选择爱人民族' }],
|
||||
loverBirthday: [{ required: true, message: '请选择爱人出生年月' }],
|
||||
loverUnitName: [{ required: true, message: '请输入爱人工作单位' }],
|
||||
withLeave: [{ required: true, message: '请输入陪产假天数' }],
|
||||
parentalLeave: [{ required: true, message: '请输入育儿假天数' }],
|
||||
maternityLeave: [{ required: true, message: '请输入产假天数' }],
|
||||
extendLeave: [{ required: true, message: '请输入延长假天数' }],
|
||||
startTime: [{ required: true, message: '请选择休假开始时间' }],
|
||||
endTime: [{ required: true, message: '请选择休假结束时间' }],
|
||||
childrenBirthday: [{ required: true, message: '请选择子女出生日期' }]
|
||||
}
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
totalLeaveDays() {
|
||||
const fields = [
|
||||
'withLeave', // 陪产假
|
||||
'parentalLeave', // 育儿假
|
||||
'maternityLeave', // 产假
|
||||
'extendLeave', // 延长假
|
||||
'birthsLeave', // 多胞胎
|
||||
'difficultLeave', // 难产假
|
||||
'winterLeave', // 寒假
|
||||
'summerLeave' // 暑假
|
||||
];
|
||||
|
||||
let total = 0;
|
||||
fields.forEach(field => {
|
||||
const value = parseFloat(this.formData[field]) || 0;
|
||||
total += value;
|
||||
});
|
||||
|
||||
// 同时更新 formData.leaveDays,以便保存到后端
|
||||
this.$set(this.formData, 'leaveDays', total);
|
||||
return total;
|
||||
},
|
||||
// 是否为男性
|
||||
isMale() {
|
||||
return this.formData.sex === '男性' || this.formData.sex === '男';
|
||||
},
|
||||
// 是否为女性
|
||||
isFemale() {
|
||||
return this.formData.sex === '女性' || this.formData.sex === '女';
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
totalLeaveDays(newVal) {
|
||||
this.$set(this.formData, 'leaveDays', newVal);
|
||||
// 当合计天数或开始时间变化时,自动计算结束时间
|
||||
this.calculateEndTime();
|
||||
},
|
||||
'formData.startTime'() {
|
||||
// 当开始时间变化时,自动计算结束时间
|
||||
this.calculateEndTime();
|
||||
},
|
||||
// 监听性别变化,设置默认值
|
||||
isMale(newVal) {
|
||||
if (newVal) {
|
||||
// 男性默认设置
|
||||
this.$set(this.formData, 'loverSex', '女');
|
||||
this.$set(this.formData, 'withLeave', 15);
|
||||
this.$set(this.formData, 'parentalLeave', 10);
|
||||
}
|
||||
},
|
||||
isFemale(newVal) {
|
||||
if (newVal) {
|
||||
// 女性默认设置
|
||||
this.$set(this.formData, 'loverSex', '男');
|
||||
this.$set(this.formData, 'maternityLeave', 98);
|
||||
this.$set(this.formData, 'extendLeave', 60);
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 格式化日期为 yyyy-MM-dd 格式
|
||||
formatDate(date) {
|
||||
if (!date) return '';
|
||||
// 如果已经是 yyyy-MM-dd 格式,直接返回
|
||||
if (typeof date === 'string' && /^\d{4}-\d{2}-\d{2}/.test(date)) {
|
||||
// 如果包含时间,只取日期部分
|
||||
if (date.length > 10) {
|
||||
return date.substring(0, 10);
|
||||
}
|
||||
return date;
|
||||
}
|
||||
// 否则转换为 yyyy-MM-dd 格式
|
||||
try {
|
||||
const d = new Date(date);
|
||||
if (isNaN(d.getTime())) {
|
||||
return date;
|
||||
}
|
||||
const year = d.getFullYear();
|
||||
const month = String(d.getMonth() + 1).padStart(2, '0');
|
||||
const day = String(d.getDate()).padStart(2, '0');
|
||||
return year + '-' + month + '-' + day;
|
||||
} catch (e) {
|
||||
return date;
|
||||
}
|
||||
},
|
||||
// 计算休假时间止
|
||||
calculateEndTime() {
|
||||
// 如果是男性,则不自动计算结束时间
|
||||
if (this.isMale) {
|
||||
return;
|
||||
}
|
||||
if (this.formData.startTime && this.formData.leaveDays) {
|
||||
const startDate = new Date(this.formData.startTime);
|
||||
if (!isNaN(startDate.getTime())) {
|
||||
// 创建新的日期对象,避免修改原始日期
|
||||
const endDate = new Date(startDate);
|
||||
// 添加天数(leaveDays - 1,因为包含开始日期)
|
||||
endDate.setDate(endDate.getDate() + this.formData.leaveDays - 1);
|
||||
// 格式化为 yyyy-MM-dd
|
||||
const year = endDate.getFullYear();
|
||||
const month = String(endDate.getMonth() + 1).padStart(2, '0');
|
||||
const day = String(endDate.getDate()).padStart(2, '0');
|
||||
this.$set(this.formData, 'endTime', year + '-' + month + '-' + day);
|
||||
}
|
||||
}
|
||||
},
|
||||
async onSave() {
|
||||
// 保存时不需要验证,直接提交数据
|
||||
this.$axios.post("/platform/maternityLeave/apply/save", {data: JSON.stringify(this.formData)})
|
||||
.then((res) => {
|
||||
this.$toast.clear();
|
||||
if (res.code === 0) {
|
||||
this.$toast.success(res.msg);
|
||||
pjaxReplace('/platform/maternityLeave/mine/h5')
|
||||
} else {
|
||||
this.$toast.fail(res.msg || '保存失败');
|
||||
}
|
||||
})
|
||||
.catch(err => {
|
||||
this.$toast.clear();
|
||||
this.$toast.fail('网络错误,请稍后重试');
|
||||
});
|
||||
},
|
||||
// 提交前进行表单验证
|
||||
async validateForm() {
|
||||
const errors = [];
|
||||
|
||||
// 根据性别确定需要验证的字段
|
||||
const isMale = this.formData.sex === '男性' || this.formData.sex === '男';
|
||||
const isFemale = this.formData.sex === '女性' || this.formData.sex === '女';
|
||||
|
||||
// 必填字段验证
|
||||
if (!this.formData.loverName) {
|
||||
errors.push('请输入爱人姓名');
|
||||
}
|
||||
|
||||
if (!this.formData.loverSex) {
|
||||
errors.push('请选择爱人性别');
|
||||
}
|
||||
|
||||
if (!this.formData.loverNationName) {
|
||||
errors.push('请选择爱人民族');
|
||||
}
|
||||
|
||||
if (!this.formData.loverBirthday) {
|
||||
errors.push('请选择爱人出生年月');
|
||||
}
|
||||
|
||||
if (!this.formData.loverUnitName) {
|
||||
errors.push('请输入爱人工作单位');
|
||||
}
|
||||
|
||||
// 根据性别验证假期字段
|
||||
if (isMale) {
|
||||
if (!this.formData.withLeave && this.formData.withLeave !== 0) {
|
||||
errors.push('请输入陪产假天数');
|
||||
}
|
||||
if (!this.formData.parentalLeave && this.formData.parentalLeave !== 0) {
|
||||
errors.push('请输入育儿假天数');
|
||||
}
|
||||
}
|
||||
if (isFemale) {
|
||||
if (!this.formData.maternityLeave && this.formData.maternityLeave !== 0) {
|
||||
errors.push('请输入产假天数');
|
||||
}
|
||||
if (!this.formData.extendLeave && this.formData.extendLeave !== 0) {
|
||||
errors.push('请输入延长假天数');
|
||||
}
|
||||
}
|
||||
|
||||
if (!this.formData.startTime) {
|
||||
errors.push('请选择休假开始时间');
|
||||
}
|
||||
|
||||
if (!this.formData.endTime) {
|
||||
errors.push('请选择休假结束时间');
|
||||
}
|
||||
|
||||
if (!this.formData.childrenBirthday) {
|
||||
errors.push('请选择子女出生日期');
|
||||
}
|
||||
// 添加时间顺序验证
|
||||
if (this.formData.startTime && this.formData.endTime) {
|
||||
const startDate = new Date(this.formData.startTime);
|
||||
const endDate = new Date(this.formData.endTime);
|
||||
if (endDate < startDate) {
|
||||
errors.push('休假结束时间不能早于开始时间');
|
||||
}
|
||||
}
|
||||
|
||||
return errors;
|
||||
},
|
||||
// 提交
|
||||
async onSubmit() {
|
||||
// 提交时进行表单验证
|
||||
const errors = await this.validateForm();
|
||||
if (errors.length > 0) {
|
||||
this.$toast.fail(errors[0]); // 显示第一条错误信息
|
||||
return;
|
||||
}
|
||||
|
||||
this.$axios.post('/platform/maternityLeave/apply/submit', {data: JSON.stringify(this.formData)})
|
||||
.then(res => {
|
||||
this.$toast.clear();
|
||||
if (res.code === 0) {
|
||||
this.$toast.success("提交成功");
|
||||
pjaxReplace('/platform/maternityLeave/mine/h5')
|
||||
} else {
|
||||
this.$toast.fail(res.msg || '提交失败');
|
||||
}
|
||||
})
|
||||
.catch(err => {
|
||||
this.$toast.clear();
|
||||
this.$toast.fail('网络错误,请稍后重试');
|
||||
});
|
||||
},
|
||||
// 再次提交
|
||||
async onSubmitAgain() {
|
||||
// 提交时进行表单验证
|
||||
const errors = await this.validateForm();
|
||||
if (errors.length > 0) {
|
||||
this.$toast.fail(errors[0]); // 显示第一条错误信息
|
||||
return;
|
||||
}
|
||||
|
||||
this.$axios.post('/platform/maternityLeave/apply/submitAgain', {
|
||||
data: JSON.stringify(this.formData),
|
||||
taskId: GetQueryString("taskId")
|
||||
}).then(res => {
|
||||
this.$toast.clear();
|
||||
if (res.code === 0) {
|
||||
this.$toast.success("提交成功");
|
||||
setTimeout(() => {
|
||||
pjaxReplace('/platform/maternityLeave/mine/h5')
|
||||
}, 1500);
|
||||
} else {
|
||||
this.$toast.fail(res.msg || '提交失败');
|
||||
}
|
||||
}).catch(err => {
|
||||
this.$toast.clear();
|
||||
this.$toast.fail('网络错误,请稍后重试');
|
||||
});
|
||||
},
|
||||
|
||||
// 出生日期确认事件 - 格式化为 yyyy-MM-dd
|
||||
onLoverBirthdayConfirm(value) {
|
||||
this.$set(this.formData, "loverBirthday", this.formatDate(value));
|
||||
this.showLoverBirthdayPicker = false;
|
||||
},
|
||||
// 休假开始时间确认事件 - 格式化为 yyyy-MM-dd
|
||||
onStartTimeConfirm(value) {
|
||||
this.$set(this.formData, "startTime", this.formatDate(value));
|
||||
this.showStartTimePicker = false;
|
||||
},
|
||||
|
||||
// 休假结束时间确认事件 - 格式化为 yyyy-MM-dd
|
||||
onEndTimeConfirm(value) {
|
||||
this.$set(this.formData, "endTime", this.formatDate(value));
|
||||
this.showEndTimePicker = false;
|
||||
},
|
||||
|
||||
// 子女出生日期确认事件 - 格式化为 yyyy-MM-dd
|
||||
onChildrenBirthdayConfirm(value) {
|
||||
this.$set(this.formData, "childrenBirthday", this.formatDate(value));
|
||||
this.showChildrenBirthdayPicker = false;
|
||||
},
|
||||
|
||||
onBirthsLeaveConfirm(value) {
|
||||
this.$set(this.formData, "birthsLeave", value.value);
|
||||
this.showBirthsLeavePicker = false;
|
||||
},
|
||||
|
||||
onDifficultLeaveConfirm(value) {
|
||||
this.$set(this.formData, "difficultLeave", value.value);
|
||||
this.showDifficultLeavePicker = false;
|
||||
},
|
||||
|
||||
onLoverNationConfirm(o) {
|
||||
this.$set(this.formData, "loverNationName", o.text); // 显示名称
|
||||
this.$set(this.formData, "loverNation", o.value); // 字典值
|
||||
this.showLoverNationPicker = false;
|
||||
},
|
||||
|
||||
// 添加性别确认方法
|
||||
onLoverSexConfirm(o) {
|
||||
this.$set(this.formData, "loverSex", o.text);
|
||||
this.showLoverSexPicker = false;
|
||||
},
|
||||
|
||||
async initDictOptions() {
|
||||
// 民族
|
||||
const loverNationData = await this.$businessTool.getDictOptions('USER_NATION')
|
||||
this.loverNationColumns = loverNationData.map(item => {
|
||||
return {value: item.code, text: item.name}
|
||||
})
|
||||
},
|
||||
|
||||
init() {
|
||||
this.bizId = GetQueryString("bizId")
|
||||
if (this.bizId) {
|
||||
this.$axios.post("/platform/maternityLeave/apply/findOne", {id: this.bizId}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
// 先保存原始数据
|
||||
const originalData = {...res.data};
|
||||
this.formData = res.data;
|
||||
|
||||
// 处理支付方式显示
|
||||
if (this.loverNationColumns.length > 0) {
|
||||
const matched = this.loverNationColumns.find(item =>
|
||||
item.value === originalData.loverNation
|
||||
)
|
||||
if (matched) {
|
||||
this.$set(this.formData, "loverNationName", matched.text)
|
||||
this.$set(this.formData, "loverNation", matched.value)
|
||||
}
|
||||
}
|
||||
|
||||
// 格式化所有日期字段,确保不包含时分秒
|
||||
const dateFields = ['birthday', 'loverBirthday', 'startTime', 'endTime', 'childrenBirthday'];
|
||||
dateFields.forEach(field => {
|
||||
if (this.formData[field]) {
|
||||
this.$set(this.formData, field, this.formatDate(this.formData[field]));
|
||||
}
|
||||
});
|
||||
|
||||
// 根据性别设置默认值
|
||||
if (this.isMale) {
|
||||
// 男性默认设置
|
||||
if (!this.formData.withLeave) this.$set(this.formData, 'withLeave', 15);
|
||||
if (!this.formData.parentalLeave) this.$set(this.formData, 'parentalLeave', 10);
|
||||
// 男性默认产假和延长假为0
|
||||
if (!this.formData.maternityLeave) this.$set(this.formData, 'maternityLeave', 0);
|
||||
if (!this.formData.extendLeave) this.$set(this.formData, 'extendLeave', 0);
|
||||
} else if (this.isFemale) {
|
||||
// 女性默认设置
|
||||
if (!this.formData.maternityLeave) this.$set(this.formData, 'maternityLeave', 98);
|
||||
if (!this.formData.extendLeave) this.$set(this.formData, 'extendLeave', 60);
|
||||
// 女性默认陪产假和育儿假为0
|
||||
if (!this.formData.withLeave) this.$set(this.formData, 'withLeave', 0);
|
||||
if (!this.formData.parentalLeave) this.$set(this.formData, 'parentalLeave', 0);
|
||||
}
|
||||
}
|
||||
})
|
||||
} else {
|
||||
const user = this.$store.state.user
|
||||
this.$set(this.formData, "userId", user.id)
|
||||
this.$set(this.formData, "userName", user.username)
|
||||
this.$set(this.formData, "loginName", user.loginname)
|
||||
this.$set(this.formData, "unitId", user.unitId)
|
||||
this.$set(this.formData, "unitName", user.unit.name)
|
||||
this.$set(this.formData, "unionId", user.union.id)
|
||||
this.$set(this.formData, "unionName", user.union.name)
|
||||
this.$set(this.formData, "sex", user.sex)
|
||||
this.$set(this.formData, "nation", user.nation)
|
||||
this.$set(this.formData, "birthday", this.formatDate(user.birthday)) // 格式化日期
|
||||
this.$set(this.formData, "mobile", user.mobile)
|
||||
|
||||
// 根据性别设置默认值
|
||||
if (this.isMale) {
|
||||
// 男性默认设置
|
||||
this.$set(this.formData, 'loverSex', '女');
|
||||
this.$set(this.formData, 'withLeave', 15);
|
||||
this.$set(this.formData, 'parentalLeave', 10);
|
||||
// 男性默认产假和延长假为0
|
||||
this.$set(this.formData, 'maternityLeave', 0);
|
||||
this.$set(this.formData, 'extendLeave', 0);
|
||||
} else if (this.isFemale) {
|
||||
// 女性默认设置
|
||||
this.$set(this.formData, 'loverSex', '男');
|
||||
this.$set(this.formData, 'maternityLeave', 98);
|
||||
this.$set(this.formData, 'extendLeave', 60);
|
||||
// 女性默认陪产假和育儿假为0
|
||||
this.$set(this.formData, 'withLeave', 0);
|
||||
this.$set(this.formData, 'parentalLeave', 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
await this.initDictOptions();
|
||||
await this.init();
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,127 @@
|
||||
<!--#
|
||||
layout("/layouts/platform_h5.html"){
|
||||
#-->
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<van-nav-bar @click-left="historyBack" left-arrow left-text="返回" title="查询统计" placeholder fixed></van-nav-bar>
|
||||
<van-sticky offset-top="46px">
|
||||
<van-dropdown-menu :close-on-click-outside="false" :close-on-click-overlay="false">
|
||||
<van-dropdown-item :options="yearList" @change="doSearch" v-model="pageForm.year"></van-dropdown-item>
|
||||
</van-dropdown-menu>
|
||||
<van-search
|
||||
:reverse-color="false"
|
||||
:show-action="false"
|
||||
@search="doSearch"
|
||||
input-align="left"
|
||||
placeholder="请输入职工姓名搜索"
|
||||
v-model="pageForm.userName"
|
||||
></van-search>
|
||||
</van-sticky>
|
||||
|
||||
|
||||
<table-list api="/platform/maternityLeave/collect/pageData" :page_form.sync="pageForm" ref="tableListRef"
|
||||
@ready="doSearch" >
|
||||
<template v-slot="{index,row}">
|
||||
<table-column label="职工姓名">{{row.userName}}</table-column>
|
||||
<table-column label="性别">{{row.sex}}</table-column>
|
||||
<table-column label="工会">{{row.unionName}}</table-column>
|
||||
<table-column label="所属单位">{{row.unitName}}</table-column>
|
||||
<table-column label="休假天数">{{row.leaveDays}}</table-column>
|
||||
<table-column label="申请时间">{{row.applyTime}}</table-column>
|
||||
<table-column label="当前节点">{{row.taskName}}</table-column>
|
||||
</template>
|
||||
<template #actions="{index,row}">
|
||||
<div class="action-btn" @click="onView(row)">
|
||||
<i class="fa fa-eye"></i>
|
||||
<span>查看</span>
|
||||
</div>
|
||||
<div class="action-btn delete" @click="onDelete(row)" v-if="$auth.hasRole('SYSADMIN')">
|
||||
<i class="fa fa-trash"></i>
|
||||
<span>删除</span>
|
||||
</div>
|
||||
</template>
|
||||
</table-list>
|
||||
|
||||
<maternity-leave-info ref="maternityLeaveInfoRef"></maternity-leave-info>
|
||||
|
||||
</div>
|
||||
<script nonce="${cspNonce!}">
|
||||
<!--#include('../common/info.js'){}#-->
|
||||
const vue = new Vue({
|
||||
el: "#app",
|
||||
store,
|
||||
dicts: [],
|
||||
components: {
|
||||
"maternity-leave-info":MATERNITY_LEAVE_INFO
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
viewShow: false,
|
||||
yearList: [],
|
||||
pageForm: {
|
||||
pageNumber: 1,
|
||||
pageSize: 10,
|
||||
totalCount: 0,
|
||||
searchKeyword: "",
|
||||
year: "",
|
||||
},
|
||||
infoShow: false
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
onView(row) {
|
||||
this.showApprovalForm = false
|
||||
this.$refs.maternityLeaveInfoRef.onOpen(row)
|
||||
},
|
||||
onRevoke(row){
|
||||
this.$dialog
|
||||
.confirm({
|
||||
title: "提示",
|
||||
message: "您确定要撤销申请吗?"
|
||||
})
|
||||
.then(() => {
|
||||
this.$axios.post("/flow/common/revokeTask", {taskId: row.startTaskId}).then((resp) => {
|
||||
this.$toast.success(resp.msg)
|
||||
this.doSearch()
|
||||
})
|
||||
})
|
||||
},
|
||||
onDelete(row) {
|
||||
this.$dialog
|
||||
.confirm({
|
||||
title: "提示",
|
||||
message: "您确定要删除吗?"
|
||||
})
|
||||
.then(() => {
|
||||
this.$axios.post("/platform/maternityLeave/mine/delete", {id: row.id}).then((resp) => {
|
||||
if (resp.code === 0) {
|
||||
this.$toast.success(resp.msg)
|
||||
this.doSearch()
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
doSearch() {
|
||||
this.$nextTick(() => {
|
||||
this.pageForm.pageNumber = 1
|
||||
this.pageForm.totalCount = 0
|
||||
this.$refs.tableListRef.doSearch()
|
||||
})
|
||||
},
|
||||
initData() {
|
||||
for (let i = new Date().getFullYear() - 10; i <= new Date().getFullYear(); i++) {
|
||||
this.yearList.unshift({value: i, text: i + "年"})
|
||||
}
|
||||
this.$set(this.pageForm, "year", this.yearList[0].value)
|
||||
},
|
||||
},
|
||||
created() {
|
||||
this.initData()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,126 @@
|
||||
const MATERNITY_LEAVE_INFO = {
|
||||
template:
|
||||
/*language=HTML*/`
|
||||
<van-action-sheet v-model="visible" title="查看详情">
|
||||
<div class="detail-container">
|
||||
<van-cell-group title="人员信息">
|
||||
<van-cell title="职工姓名">{{ viewData.userName }}</van-cell>
|
||||
<van-cell title="性别">{{ viewData.sex }}</van-cell>
|
||||
<van-cell title="民族">{{ viewData.nation }}</van-cell>
|
||||
<van-cell title="出生年月">{{$moment(viewData.birthday).format('YYYY-MM-DD')}}</van-cell>
|
||||
<van-cell title="单位">{{ viewData.unitName }}</van-cell>
|
||||
<van-cell title="电话">{{ viewData.mobile }}</van-cell>
|
||||
<van-cell title="爱人姓名">{{ viewData.loverName }}</van-cell>
|
||||
<van-cell title="性别">{{ viewData.loverSex }}</van-cell>
|
||||
<van-cell title="民族">{{ viewData.loverNation }}</van-cell>
|
||||
<van-cell title="出生年月">{{$moment(viewData.loverBirthday).format('YYYY-MM-DD')}}</van-cell>
|
||||
<van-cell title="单位">{{ viewData.loverUnitName }}</van-cell>
|
||||
</van-cell-group>
|
||||
|
||||
<van-cell-group title="假期类型">
|
||||
<van-cell title="陪产假" v-if="viewData.sex === '男性' || viewData.sex === '男'">{{ viewData.withLeave }}</van-cell>
|
||||
<van-cell title="育儿假" v-if="viewData.sex === '男性' || viewData.sex === '男'">{{ viewData.parentalLeave }}</van-cell>
|
||||
<van-cell title="产假" v-if="viewData.sex === '女性' || viewData.sex === '女'">{{ viewData.maternityLeave }}</van-cell>
|
||||
<van-cell title="延长假" v-if="viewData.sex === '女性' || viewData.sex === '女'">{{ viewData.extendLeave }}</van-cell>
|
||||
<van-cell title="多胞胎" v-if="viewData.sex === '女性' || viewData.sex === '女'">{{ viewData.birthsLeave }}</van-cell>
|
||||
<van-cell title="难产假" v-if="viewData.sex === '女性' || viewData.sex === '女'">{{ viewData.difficultLeave }}</van-cell>
|
||||
<van-cell title="寒假">{{ viewData.winterLeave }}</van-cell>
|
||||
<van-cell title="暑假">{{ viewData.summerLeave }}</van-cell>
|
||||
<van-cell title="合计">{{ viewData.leaveDays }}</van-cell>
|
||||
<van-cell title="休假时间起">{{$moment(viewData.startTime).format('YYYY-MM-DD')}}</van-cell>
|
||||
<van-cell title="休假时间止">{{$moment(viewData.endTime).format('YYYY-MM-DD')}}</van-cell>
|
||||
<van-cell title="子女出生日">{{$moment(viewData.childrenBirthday).format('YYYY-MM-DD')}}</van-cell>
|
||||
</van-cell-group>
|
||||
|
||||
|
||||
<template v-for="(task,index) in doneTasks">
|
||||
<div class="process-title">
|
||||
{{ task.displayName }}
|
||||
</div>
|
||||
<van-cell-group v-if="task.ext.isFirstTaskNode">
|
||||
<van-cell title="申请用户">
|
||||
{{ task.ext.initiatorName}}({{task.ext.initiatorAccount}})
|
||||
</van-cell>
|
||||
<van-cell title="申请时间">
|
||||
{{ task.finishTime}}
|
||||
</van-cell>
|
||||
<van-cell title="办理结果">
|
||||
<dict-tag :options="dict.type.PROCESS_TASK_SUBMIT_TYPE"
|
||||
:value="task.ext.submitType"></dict-tag>
|
||||
</van-cell>
|
||||
</van-cell-group>
|
||||
<van-cell-group v-else>
|
||||
<van-cell title="办理用户">
|
||||
{{ task.taskFormData.userName}}({{task.taskFormData.loginName}})
|
||||
</van-cell>
|
||||
<van-cell title="办理时间">
|
||||
{{ task.finishTime}}
|
||||
</van-cell>
|
||||
<van-cell title="办理结果">
|
||||
<dict-tag :options="dict.type.PROCESS_TASK_SUBMIT_TYPE"
|
||||
:value="task.ext.submitType"></dict-tag>
|
||||
</van-cell>
|
||||
<van-cell title="办理意见" v-if="!task.ext.isFirstTaskNode">
|
||||
<template #label>
|
||||
{{
|
||||
task.taskFormData.opinion
|
||||
}}
|
||||
</template>
|
||||
</van-cell>
|
||||
<van-cell title="签字" v-if="!task.ext.isFirstTaskNode">
|
||||
<van-image :src="task.ext.tf_userSign"
|
||||
v-if="task.ext.tf_userSign"
|
||||
class="signature-image"></van-image>
|
||||
</van-cell>
|
||||
</van-cell-group>
|
||||
</template>
|
||||
|
||||
</div>
|
||||
<slot></slot>
|
||||
</van-action-sheet>
|
||||
`,
|
||||
dicts: ["PROCESS_TASK_SUBMIT_TYPE"],
|
||||
data() {
|
||||
return {
|
||||
visible:false,
|
||||
viewData: {},
|
||||
doneTasks: [],
|
||||
row: null,
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
onOpen(row) {
|
||||
this.row = row
|
||||
this.visible = true
|
||||
this.getInfo()
|
||||
this.getDoneTasks()
|
||||
},
|
||||
// 关闭
|
||||
onClose(){
|
||||
this.visible = false
|
||||
},
|
||||
// 获取申请信息
|
||||
getInfo() {
|
||||
this.$axios.post("/platform/maternityLeave/apply/findOne", {id: this.row.id}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.viewData = res.data
|
||||
}
|
||||
})
|
||||
},
|
||||
// 查看
|
||||
openView(id) {
|
||||
this.$nextTick(() => {
|
||||
this.$refs.infoDialogRef.onOpen(id)
|
||||
})
|
||||
},
|
||||
// 获取已办任务审批记录
|
||||
getDoneTasks() {
|
||||
this.$axios.post("/flow/common/doneTasks", {bizId: this.row.id}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.doneTasks = res.data
|
||||
}
|
||||
})
|
||||
},
|
||||
},
|
||||
|
||||
}
|
||||
@@ -0,0 +1,133 @@
|
||||
<!--#
|
||||
layout("/layouts/platform_h5.html"){
|
||||
#-->
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<van-nav-bar @click-left="historyBack" left-arrow left-text="返回" title="我的申请" placeholder fixed></van-nav-bar>
|
||||
<van-sticky offset-top="46px">
|
||||
<van-dropdown-menu :close-on-click-outside="false" :close-on-click-overlay="false">
|
||||
<van-dropdown-item :options="yearList" @change="doSearch" v-model="pageForm.year"></van-dropdown-item>
|
||||
</van-dropdown-menu>
|
||||
</van-sticky>
|
||||
|
||||
|
||||
<table-list api="/platform/maternityLeave/mine/pageData" :page_form.sync="pageForm" ref="tableListRef"
|
||||
@ready="doSearch" >
|
||||
<template v-slot="{index,row}">
|
||||
<table-column label="职工姓名">{{row.userName}}</table-column>
|
||||
<table-column label="性别">{{row.sex}}</table-column>
|
||||
<table-column label="工会">{{row.unionName}}</table-column>
|
||||
<table-column label="所属单位">{{row.unitName}}</table-column>
|
||||
<table-column label="休假天数">{{row.leaveDays}}</table-column>
|
||||
<table-column label="申请时间">{{row.applyTime}}</table-column>
|
||||
<table-column label="当前节点">{{row.taskName}}</table-column>
|
||||
</template>
|
||||
<template #actions="{index,row}">
|
||||
<div class="action-btn" @click="onView(row)">
|
||||
<i class="fa fa-eye"></i>
|
||||
<span>查看</span>
|
||||
</div>
|
||||
<div class="action-btn" @click="onEdit(row)" v-if="row.taskKey === 'startTask' || !row.instanceId">
|
||||
<i class="fa fa-edit"></i>
|
||||
<span>编辑</span>
|
||||
</div>
|
||||
<div class="action-btn delete" v-if="row.canRevoke" @click="onRevoke(row)">
|
||||
<i class="fa fa-undo"></i>
|
||||
<span>撤回</span>
|
||||
</div>
|
||||
<div class="action-btn delete" @click="onDelete(row)" v-if="row.taskKey === 'startTask' || !row.instanceId">
|
||||
<i class="fa fa-trash"></i>
|
||||
<span>删除</span>
|
||||
</div>
|
||||
</template>
|
||||
</table-list>
|
||||
|
||||
<maternity-leave-info ref="maternityLeaveInfoRef"></maternity-leave-info>
|
||||
|
||||
</div>
|
||||
<script nonce="${cspNonce!}">
|
||||
<!--#include('../common/info.js'){}#-->
|
||||
const vue = new Vue({
|
||||
el: "#app",
|
||||
store,
|
||||
dicts: [],
|
||||
components: {
|
||||
"maternity-leave-info":MATERNITY_LEAVE_INFO
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
viewShow: false,
|
||||
yearList: [],
|
||||
pageForm: {
|
||||
pageNumber: 1,
|
||||
pageSize: 10,
|
||||
totalCount: 0,
|
||||
searchKeyword: "",
|
||||
year: "",
|
||||
},
|
||||
infoShow: false
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
onView(row) {
|
||||
this.showApprovalForm = false
|
||||
this.$refs.maternityLeaveInfoRef.onOpen(row)
|
||||
},
|
||||
onEdit(row) {
|
||||
this.$pjaxReplace('/platform/maternityLeave/apply/h5?taskId=' + (row.startTaskId || '') + "&bizId=" + row.id)
|
||||
},
|
||||
|
||||
onRevoke(row){
|
||||
this.$dialog
|
||||
.confirm({
|
||||
title: "提示",
|
||||
message: "您确定要撤销申请吗?"
|
||||
})
|
||||
.then(() => {
|
||||
this.$axios.post("/flow/common/revokeTask", {taskId: row.startTaskId}).then((resp) => {
|
||||
this.$toast.success(resp.msg)
|
||||
this.doSearch()
|
||||
})
|
||||
})
|
||||
},
|
||||
onDelete(row) {
|
||||
this.$dialog
|
||||
.confirm({
|
||||
title: "提示",
|
||||
message: "您确定要删除吗?"
|
||||
})
|
||||
.then(() => {
|
||||
this.$axios.post("/platform/maternityLeave/mine/delete", {id: row.id}).then((resp) => {
|
||||
if (resp.code === 0) {
|
||||
this.$toast.success(resp.msg)
|
||||
this.doSearch()
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
doSearch() {
|
||||
this.$nextTick(() => {
|
||||
this.pageForm.pageNumber = 1
|
||||
this.pageForm.totalCount = 0
|
||||
this.$refs.tableListRef.doSearch()
|
||||
})
|
||||
},
|
||||
initData() {
|
||||
for (let i = new Date().getFullYear() - 10; i <= new Date().getFullYear(); i++) {
|
||||
this.yearList.unshift({value: i, text: i + "年"})
|
||||
}
|
||||
this.$set(this.pageForm, "year", this.yearList[0].value)
|
||||
},
|
||||
|
||||
},
|
||||
created() {
|
||||
this.initData()
|
||||
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
+187
@@ -0,0 +1,187 @@
|
||||
<!--#
|
||||
layout("/layouts/platform_h5.html"){
|
||||
#-->
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<van-nav-bar @click-left="historyBack" left-arrow left-text="返回" title="校工会审核" placeholder fixed></van-nav-bar>
|
||||
<van-sticky offset-top="46px">
|
||||
<van-search
|
||||
:reverse-color="false"
|
||||
:show-action="false"
|
||||
@search="doSearch"
|
||||
input-align="left"
|
||||
placeholder="请输入职工姓名搜索"
|
||||
v-model="pageForm.userName"
|
||||
></van-search>
|
||||
<van-tabs v-model="pageForm.approvalText"
|
||||
@change="(val)=>{this.pageForm.approval = val==='1';this.doSearch();}">
|
||||
<van-tab title="已审核" name="1"></van-tab>
|
||||
<van-tab title="未审核" name="0"></van-tab>
|
||||
</van-tabs>
|
||||
</van-sticky>
|
||||
|
||||
|
||||
<table-list api="/platform/maternityLeave/schoolAudit/pageData" :page_form.sync="pageForm" ref="tableListRef"
|
||||
@ready="doSearch" >
|
||||
<template v-slot="{index,row}">
|
||||
<table-column label="职工姓名">{{row.userName}}</table-column>
|
||||
<table-column label="性别">{{row.sex}}</table-column>
|
||||
<table-column label="工会">{{row.unionName}}</table-column>
|
||||
<table-column label="所属单位">{{row.unitName}}</table-column>
|
||||
<table-column label="休假天数">{{row.leaveDays}}</table-column>
|
||||
<table-column label="申请时间">{{row.applyTime}}</table-column>
|
||||
<table-column label="当前节点">{{row.curTaskName}}</table-column>
|
||||
</template>
|
||||
<template #actions="{index,row}">
|
||||
<div class="action-btn" @click="onView(row)">
|
||||
<i class="fa fa-eye"></i>
|
||||
<span>查看</span>
|
||||
</div>
|
||||
<div class="action-btn" v-if="row.taskState === 10" @click="onAudit(row)">
|
||||
<i class="fa fa-edit"></i>
|
||||
<span>审核</span>
|
||||
</div>
|
||||
<div class="action-btn delete" v-if="row.canRevoke" @click="onRevoke(row)">
|
||||
<i class="fa fa-undo"></i>
|
||||
<span>撤回</span>
|
||||
</div>
|
||||
</template>
|
||||
</table-list>
|
||||
|
||||
<maternity-leave-info ref="maternityLeaveInfoRef">
|
||||
<div v-if="showApprovalForm">
|
||||
<div class="process-title">
|
||||
校工会审核
|
||||
</div>
|
||||
<div class="form-container">
|
||||
<van-form ref="formRef">
|
||||
<van-cell-group title="审批意见">
|
||||
<van-field label=""
|
||||
:rules="[{ required: true,message:'请填审批意见' }]"
|
||||
v-model="formData.tf_opinion"
|
||||
required
|
||||
type="textarea"
|
||||
name="tf_opinion"
|
||||
rows="4"
|
||||
autosize
|
||||
class="more-text"
|
||||
placeholder="请填审批意见"></van-field>
|
||||
</van-cell-group>
|
||||
<van-cell-group title="电子签名" class="form-section">
|
||||
<van-field class="more-text" name="tf_userSign" label="">
|
||||
<template #input>
|
||||
<h5-signature v-model="formData.tf_userSign" slot="input"></h5-signature>
|
||||
</template>
|
||||
</van-field>
|
||||
</van-cell-group>
|
||||
<!-- 按钮区域 -->
|
||||
<div class="form-actions">
|
||||
<van-button type="danger" @click="handleTaskAction(6)">退回到发起人</van-button>
|
||||
<van-button type="danger" @click="handleTaskAction(2)">拒绝申请</van-button>
|
||||
<van-button type="primary" @click="handleTaskAction(1)">同意申请</van-button>
|
||||
</div>
|
||||
</van-form>
|
||||
</div>
|
||||
</div>
|
||||
</maternity-leave-info>
|
||||
|
||||
</div>
|
||||
<script nonce="${cspNonce!}">
|
||||
<!--#include('../common/info.js'){}#-->
|
||||
const vue = new Vue({
|
||||
el: "#app",
|
||||
store,
|
||||
dicts: [],
|
||||
components: {
|
||||
"maternity-leave-info":MATERNITY_LEAVE_INFO
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
pageForm: {
|
||||
pageNumber: 1,
|
||||
pageSize: 10,
|
||||
totalCount: 0,
|
||||
searchKeyword: "",
|
||||
approvalText: "0",
|
||||
approval: false,
|
||||
year: new Date().getFullYear(),
|
||||
},
|
||||
formData: {},
|
||||
showApprovalForm: false,
|
||||
infoShow: false
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
onRevoke(row) {
|
||||
this.$dialog.confirm({
|
||||
title: '温馨提示',
|
||||
message: '您确定要撤回吗?',
|
||||
}).then(() => {
|
||||
this.$axios.post("/flow/common/revokeTask", {taskId: row.taskId}).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.$toast.success("提交成功")
|
||||
this.doSearch()
|
||||
this.infoShow = false
|
||||
}
|
||||
})
|
||||
}).catch(() => {
|
||||
// on cancel
|
||||
});
|
||||
},
|
||||
handleTaskAction(val) {
|
||||
this.$refs.formRef.validate().then(() => {
|
||||
this.$dialog.confirm({
|
||||
title: '温馨提示',
|
||||
message: '您确定要提交吗?',
|
||||
}).then(() => {
|
||||
this.$axios.post('/flow/common/executeTask', {
|
||||
data: JSON.stringify({
|
||||
...this.formData,
|
||||
submitType: val
|
||||
})
|
||||
}).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.$toast.success("提交成功")
|
||||
this.doSearch()
|
||||
this.$refs.maternityLeaveInfoRef.onClose()
|
||||
}
|
||||
})
|
||||
}).catch(() => {
|
||||
// on cancel
|
||||
});
|
||||
}).catch();
|
||||
},
|
||||
onView(row) {
|
||||
this.showApprovalForm = false
|
||||
this.$refs.maternityLeaveInfoRef.onOpen(row)
|
||||
},
|
||||
onAudit(row) {
|
||||
this.showApprovalForm = true
|
||||
this.formData = {
|
||||
tf_opinion: null,
|
||||
tf_userSign: null,
|
||||
processTaskId: row.taskId,
|
||||
taskName: row.curTaskName
|
||||
}
|
||||
this.$refs.maternityLeaveInfoRef.onOpen(row)
|
||||
},
|
||||
|
||||
doSearch() {
|
||||
this.$nextTick(() => {
|
||||
this.pageForm.pageNumber = 1
|
||||
this.pageForm.totalCount = 0
|
||||
this.$refs.tableListRef.doSearch()
|
||||
})
|
||||
},
|
||||
|
||||
},
|
||||
created() {
|
||||
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
+187
@@ -0,0 +1,187 @@
|
||||
<!--#
|
||||
layout("/layouts/platform_h5.html"){
|
||||
#-->
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<van-nav-bar @click-left="historyBack" left-arrow left-text="返回" title="分工会审核" placeholder fixed></van-nav-bar>
|
||||
<van-sticky offset-top="46px">
|
||||
<van-search
|
||||
:reverse-color="false"
|
||||
:show-action="false"
|
||||
@search="doSearch"
|
||||
input-align="left"
|
||||
placeholder="请输入职工姓名搜索"
|
||||
v-model="pageForm.userName"
|
||||
></van-search>
|
||||
<van-tabs v-model="pageForm.approvalText"
|
||||
@change="(val)=>{this.pageForm.approval = val==='1';this.doSearch();}">
|
||||
<van-tab title="已审核" name="1"></van-tab>
|
||||
<van-tab title="未审核" name="0"></van-tab>
|
||||
</van-tabs>
|
||||
</van-sticky>
|
||||
|
||||
|
||||
<table-list api="/platform/maternityLeave/unionAudit/pageData" :page_form.sync="pageForm" ref="tableListRef"
|
||||
@ready="doSearch" >
|
||||
<template v-slot="{index,row}">
|
||||
<table-column label="职工姓名">{{row.userName}}</table-column>
|
||||
<table-column label="性别">{{row.sex}}</table-column>
|
||||
<table-column label="工会">{{row.unionName}}</table-column>
|
||||
<table-column label="所属单位">{{row.unitName}}</table-column>
|
||||
<table-column label="休假天数">{{row.leaveDays}}</table-column>
|
||||
<table-column label="申请时间">{{row.applyTime}}</table-column>
|
||||
<table-column label="当前节点">{{row.curTaskName}}</table-column>
|
||||
</template>
|
||||
<template #actions="{index,row}">
|
||||
<div class="action-btn" @click="onView(row)">
|
||||
<i class="fa fa-eye"></i>
|
||||
<span>查看</span>
|
||||
</div>
|
||||
<div class="action-btn" v-if="row.taskState === 10" @click="onAudit(row)">
|
||||
<i class="fa fa-edit"></i>
|
||||
<span>审核</span>
|
||||
</div>
|
||||
<div class="action-btn delete" v-if="row.canRevoke" @click="onRevoke(row)">
|
||||
<i class="fa fa-undo"></i>
|
||||
<span>撤回</span>
|
||||
</div>
|
||||
</template>
|
||||
</table-list>
|
||||
|
||||
<maternity-leave-info ref="maternityLeaveInfoRef">
|
||||
<div v-if="showApprovalForm">
|
||||
<div class="process-title">
|
||||
分工会审核
|
||||
</div>
|
||||
<div class="form-container">
|
||||
<van-form ref="formRef">
|
||||
<van-cell-group title="审批意见">
|
||||
<van-field label=""
|
||||
:rules="[{ required: true,message:'请填审批意见' }]"
|
||||
v-model="formData.tf_opinion"
|
||||
required
|
||||
type="textarea"
|
||||
name="tf_opinion"
|
||||
rows="4"
|
||||
autosize
|
||||
class="more-text"
|
||||
placeholder="请填审批意见"></van-field>
|
||||
</van-cell-group>
|
||||
<van-cell-group title="电子签名" class="form-section">
|
||||
<van-field class="more-text" name="tf_userSign" label="">
|
||||
<template #input>
|
||||
<h5-signature v-model="formData.tf_userSign" slot="input"></h5-signature>
|
||||
</template>
|
||||
</van-field>
|
||||
</van-cell-group>
|
||||
<!-- 按钮区域 -->
|
||||
<div class="form-actions">
|
||||
<van-button type="danger" @click="handleTaskAction(6)">退回到发起人</van-button>
|
||||
<van-button type="danger" @click="handleTaskAction(2)">拒绝申请</van-button>
|
||||
<van-button type="primary" @click="handleTaskAction(1)">同意申请</van-button>
|
||||
</div>
|
||||
</van-form>
|
||||
</div>
|
||||
</div>
|
||||
</maternity-leave-info>
|
||||
|
||||
</div>
|
||||
<script nonce="${cspNonce!}">
|
||||
<!--#include('../common/info.js'){}#-->
|
||||
const vue = new Vue({
|
||||
el: "#app",
|
||||
store,
|
||||
dicts: [],
|
||||
components: {
|
||||
"maternity-leave-info":MATERNITY_LEAVE_INFO
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
pageForm: {
|
||||
pageNumber: 1,
|
||||
pageSize: 10,
|
||||
totalCount: 0,
|
||||
searchKeyword: "",
|
||||
approvalText: "0",
|
||||
approval: false,
|
||||
year: new Date().getFullYear(),
|
||||
},
|
||||
formData: {},
|
||||
showApprovalForm: false,
|
||||
infoShow: false
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
onRevoke(row) {
|
||||
this.$dialog.confirm({
|
||||
title: '温馨提示',
|
||||
message: '您确定要撤回吗?',
|
||||
}).then(() => {
|
||||
this.$axios.post("/flow/common/revokeTask", {taskId: row.taskId}).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.$toast.success("提交成功")
|
||||
this.doSearch()
|
||||
this.infoShow = false
|
||||
}
|
||||
})
|
||||
}).catch(() => {
|
||||
// on cancel
|
||||
});
|
||||
},
|
||||
handleTaskAction(val) {
|
||||
this.$refs.formRef.validate().then(() => {
|
||||
this.$dialog.confirm({
|
||||
title: '温馨提示',
|
||||
message: '您确定要提交吗?',
|
||||
}).then(() => {
|
||||
this.$axios.post('/flow/common/executeTask', {
|
||||
data: JSON.stringify({
|
||||
...this.formData,
|
||||
submitType: val
|
||||
})
|
||||
}).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.$toast.success("提交成功")
|
||||
this.doSearch()
|
||||
this.$refs.maternityLeaveInfoRef.onClose()
|
||||
}
|
||||
})
|
||||
}).catch(() => {
|
||||
// on cancel
|
||||
});
|
||||
}).catch();
|
||||
},
|
||||
onView(row) {
|
||||
this.showApprovalForm = false
|
||||
this.$refs.maternityLeaveInfoRef.onOpen(row)
|
||||
},
|
||||
onAudit(row) {
|
||||
this.showApprovalForm = true
|
||||
this.formData = {
|
||||
tf_opinion: null,
|
||||
tf_userSign: null,
|
||||
processTaskId: row.taskId,
|
||||
taskName: row.curTaskName
|
||||
}
|
||||
this.$refs.maternityLeaveInfoRef.onOpen(row)
|
||||
},
|
||||
|
||||
doSearch() {
|
||||
this.$nextTick(() => {
|
||||
this.pageForm.pageNumber = 1
|
||||
this.pageForm.totalCount = 0
|
||||
this.$refs.tableListRef.doSearch()
|
||||
})
|
||||
},
|
||||
|
||||
},
|
||||
created() {
|
||||
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,105 @@
|
||||
<!--#
|
||||
layout("/layouts/platform_h5.html"){
|
||||
#-->
|
||||
|
||||
<style scoped>
|
||||
img {
|
||||
object-fit: contain !important;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div id="app">
|
||||
<van-nav-bar title="心理咨询预约" left-text="返回" left-arrow @click-left="historyBack" fixed placeholder></van-nav-bar>
|
||||
|
||||
<van-sticky offset-top="46px">
|
||||
<van-search
|
||||
v-model="pageForm.searchKeyword"
|
||||
:show-action="false"
|
||||
:reverse-color="false"
|
||||
input-align="left"
|
||||
placeholder="请输入姓名或者工号搜索"
|
||||
@search="doSearch"
|
||||
></van-search>
|
||||
<van-dropdown-menu :close-on-click-outside="false" :close-on-click-overlay="false">
|
||||
<van-dropdown-item v-model="pageForm.sex" :options="sexOptions" :multiple="false"
|
||||
@change="doSearch"></van-dropdown-item>
|
||||
</van-dropdown-menu>
|
||||
</van-sticky>
|
||||
|
||||
<table-list api="/platform/psychology/apply/h5PageData"
|
||||
:page_form.sync="pageForm"
|
||||
ref="tableListRef"
|
||||
title="userName"
|
||||
img="avatar"
|
||||
@ready="doSearch">
|
||||
<template v-slot="{index,row}">
|
||||
<table-column label="性别">{{row.sex}}</table-column>
|
||||
<table-column label="擅长方向">{{row.specialty}}</table-column>
|
||||
<table-column label="简介">{{row.introduce}}</table-column>
|
||||
</template>
|
||||
<template #actions="{index,row}">
|
||||
<div class="action-btn" @click="onView(row)">
|
||||
<i class="fa fa-eye"></i>
|
||||
<span>详细信息</span>
|
||||
</div>
|
||||
<div class="action-btn" @click="onApply(row)">
|
||||
<i class="fa fa-edit"></i>
|
||||
<span>预约</span>
|
||||
</div>
|
||||
</template>
|
||||
</table-list>
|
||||
|
||||
<doctor-info ref="doctorInfoRef"></doctor-info>
|
||||
<apply-form ref="applyFormRef"></apply-form>
|
||||
</div>
|
||||
|
||||
<script nonce="${cspNonce!}">
|
||||
<!--#include('../common/doctorInfo.js'){}#-->
|
||||
<!--#include('../common/applyForm.js'){}#-->
|
||||
new Vue({
|
||||
el: "#app",
|
||||
store,
|
||||
components: {
|
||||
"doctor-info": doctorInfo,
|
||||
"apply-form": applyForm
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
pageForm: {
|
||||
pageNumber: 1,
|
||||
pageSize: 10,
|
||||
totalCount: 0,
|
||||
sex: null,
|
||||
},
|
||||
sexOptions: [
|
||||
{text: '全部', value: null},
|
||||
{text: '男', value: '男'},
|
||||
{text: '女', value: '女'},
|
||||
],
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
onView(row) {
|
||||
this.$refs.doctorInfoRef.onOpen(row)
|
||||
},
|
||||
onApply(row) {
|
||||
if(!row.times || row.times.length === 0) {
|
||||
this.$toast(row.userName + '暂无可预约时间段')
|
||||
return
|
||||
}
|
||||
this.$refs.applyFormRef.onOpen(row)
|
||||
},
|
||||
doSearch() {
|
||||
this.$nextTick(() => {
|
||||
this.pageForm.pageNumber = 1
|
||||
this.pageForm.totalCount = 0
|
||||
this.$refs.tableListRef.doSearch()
|
||||
})
|
||||
}
|
||||
},
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,139 @@
|
||||
const applyForm = {
|
||||
template: /*language=HTML*/ `
|
||||
<div>
|
||||
<van-action-sheet :close-on-click-overlay="false" title="预约信息" v-model="visible">
|
||||
<van-form ref="formRef" class="form-container">
|
||||
<van-cell-group title="咨询师信息" class="form-section">
|
||||
<van-field label="姓名" readonly v-model="row.userName"></van-field>
|
||||
<van-field label="性别" readonly v-model="row.sex"></van-field>
|
||||
<van-field label="单位" readonly v-model="row.unitName"></van-field>
|
||||
<van-field label="电话" readonly v-model="row.mobile"></van-field>
|
||||
</van-cell-group>
|
||||
|
||||
<van-cell-group title="预约时间段" class="form-section">
|
||||
<van-field required :rules="[{ required: true }]"
|
||||
label="时间段"
|
||||
placeholder="请点击时间段"
|
||||
v-model="formData.time"
|
||||
readonly
|
||||
is-link
|
||||
@click="timePicker = true"
|
||||
></van-field>
|
||||
<van-popup position="bottom" round v-model:show="timePicker">
|
||||
<van-picker
|
||||
title="请选择预约时间段"
|
||||
show-toolbar
|
||||
:columns="row.times"
|
||||
@confirm="timeConfirm"
|
||||
@cancel="timePicker = false"
|
||||
value-key="time"
|
||||
></van-picker>
|
||||
</van-popup>
|
||||
</van-cell-group>
|
||||
|
||||
<van-cell-group title="基本信息" class="form-section">
|
||||
<van-field label="姓名" readonly v-model="formData.userName"></van-field>
|
||||
<van-field label="工号" readonly v-model="formData.loginName"></van-field>
|
||||
<van-field label="单位" readonly v-model="formData.unitName"></van-field>
|
||||
<van-field required :rules="[{ required: true }]"
|
||||
label="联系方式"
|
||||
v-model="formData.mobile"
|
||||
placeholder="请输入联系方式"
|
||||
></van-field>
|
||||
|
||||
<van-field required :rules="[{ required: true }]"
|
||||
label="咨询方式"
|
||||
placeholder="请点击选择联系方式"
|
||||
v-model="formData.askTypeName"
|
||||
readonly
|
||||
is-link
|
||||
@click="askTypePicker = true"
|
||||
></van-field>
|
||||
<van-popup position="bottom" round v-model:show="askTypePicker">
|
||||
<van-picker
|
||||
title="请选择咨询方式"
|
||||
show-toolbar
|
||||
:columns="askTypeColumns"
|
||||
@confirm="(val) => {formData.askTypeName = val.name; formData.askTypeValue = val.code; askTypePicker = false}"
|
||||
@cancel="askTypePicker = false"
|
||||
value-key="name"
|
||||
></van-picker>
|
||||
</van-popup>
|
||||
|
||||
<van-field
|
||||
v-model="formData.remark"
|
||||
name="remark"
|
||||
label="预约备注"
|
||||
type="textarea"
|
||||
rows="4"
|
||||
autosize
|
||||
placeholder="请输入预约备注"
|
||||
></van-field>
|
||||
</van-cell-group>
|
||||
|
||||
<div class="form-actions">
|
||||
<van-button @click="onSubmit" round type="info">提交申请</van-button>
|
||||
</div>
|
||||
</van-form>
|
||||
</van-action-sheet>
|
||||
</div>
|
||||
`,
|
||||
store,
|
||||
dicts: ["PSYCHOLOGY_ASK_TYPE"],
|
||||
data() {
|
||||
return {
|
||||
visible:false,
|
||||
row: {},
|
||||
formData: {},
|
||||
sourceAskTypes: [],
|
||||
|
||||
askTypePicker: false,
|
||||
askTypeColumns: [],
|
||||
|
||||
timePicker: false,
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
onOpen(row) {
|
||||
row.times.forEach(item => {
|
||||
this.$set(item, 'time', this.$moment(item.startTime).format('YYYY-MM-DD HH:mm') + ' ~ ' + this.$moment(item.endTime).format('HH:mm'))
|
||||
})
|
||||
this.row = row
|
||||
this.visible = true
|
||||
|
||||
this.init()
|
||||
},
|
||||
init() {
|
||||
this.$set(this.formData, 'userId', this.$store.state.user.id)
|
||||
this.$set(this.formData, 'userName', this.$store.state.user.username)
|
||||
this.$set(this.formData, 'loginName', this.$store.state.user.loginname)
|
||||
this.$set(this.formData, 'unitName', this.$store.state.user?.unit?.name)
|
||||
this.$set(this.formData, 'mobile', this.$store.state.user.mobile)
|
||||
},
|
||||
timeConfirm(val, index) {
|
||||
this.askTypeColumns = this.dict.type.PSYCHOLOGY_ASK_TYPE.filter(o => val.askType.includes(o.code))
|
||||
this.$set(this.formData, 'time', val.time)
|
||||
this.$set(this.formData, 'id', val.id)
|
||||
this.timePicker = false
|
||||
},
|
||||
onSubmit() {
|
||||
this.$refs.formRef.validate().then(() => {
|
||||
this.$dialog.confirm({
|
||||
title: "提示",
|
||||
message: "您确定要提交吗?"
|
||||
}).then(() => {
|
||||
this.$axios.post("/platform/psychology/apply/submit", this.formData).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.$toast(res.msg)
|
||||
this.visible = false
|
||||
this.$pjaxReplace("/platform/psychology/list/h5")
|
||||
}
|
||||
})
|
||||
})
|
||||
})
|
||||
},
|
||||
},
|
||||
style: /*language=CSS*/ `
|
||||
|
||||
`
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
const applyInfo = {
|
||||
template: /*language=HTML*/ `
|
||||
<div>
|
||||
<van-action-sheet v-model="visible" title="详细信息" cancel-text="取消">
|
||||
<div class="detail-container">
|
||||
<van-cell-group title="咨询师信息">
|
||||
<van-cell title="姓名">{{ row.doctorUserName }}</van-cell>
|
||||
<van-cell title="工号">{{ row.doctorUnitName }}</van-cell>
|
||||
<van-cell title="联系方式">{{ row.doctorMobile }}</van-cell>
|
||||
<van-cell title="职称">{{ row.doctorJobTitle }}</van-cell>
|
||||
<van-cell title="个人简介" class="direction-column-cell">
|
||||
{{ row.doctorIntroduce }}
|
||||
</van-cell>
|
||||
</van-cell-group>
|
||||
<van-cell-group title="预约时间段">
|
||||
<van-cell title="开始时间">{{ row.startTime }}</van-cell>
|
||||
<van-cell title="结束时间">{{ row.endTime }}</van-cell>
|
||||
</van-cell-group>
|
||||
<van-cell-group title="预约人信息">
|
||||
<van-cell title="姓名">{{ row.appointmentUserName }}</van-cell>
|
||||
<van-cell title="工号">{{ row.appointmentLoginName }}</van-cell>
|
||||
<van-cell title="单位">{{ row.appointmentUnitName }}</van-cell>
|
||||
<van-cell title="联系方式">{{ row.appointmentMobile }}</van-cell>
|
||||
<van-cell title="预约咨询方式">
|
||||
<dict-tag :options="dict.type.PSYCHOLOGY_ASK_TYPE" :value="row.askTypeValue"></dict-tag>
|
||||
</van-cell>
|
||||
<van-cell title="预约人备注" class="direction-column-cell">{{ row.remark }}</van-cell>
|
||||
</van-cell-group>
|
||||
</div>
|
||||
</van-action-sheet>
|
||||
</div>
|
||||
`,
|
||||
dicts:["PSYCHOLOGY_ASK_TYPE"],
|
||||
data() {
|
||||
return {
|
||||
visible:false,
|
||||
row: {},
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
onOpen(row) {
|
||||
this.row = row
|
||||
this.visible = true
|
||||
},
|
||||
},
|
||||
style: /*language=CSS*/ `
|
||||
|
||||
`
|
||||
}
|
||||
@@ -0,0 +1,77 @@
|
||||
const doctorInfo = {
|
||||
template: /*language=HTML*/ `
|
||||
<div>
|
||||
<van-action-sheet v-model="visible" title="详细信息" cancel-text="取消">
|
||||
<div class="detail-container">
|
||||
<van-cell-group title="基本信息">
|
||||
<van-cell title="姓名">{{ row?.userName }}</van-cell>
|
||||
<van-cell title="性别">{{ row?.sex }}</van-cell>
|
||||
<van-cell title="职称">{{ row?.jobTitle }}</van-cell>
|
||||
<van-cell title="单位">{{ row?.unitName }}</van-cell>
|
||||
<van-cell title="联系方式">{{ row?.mobile }}</van-cell>
|
||||
<van-cell title="擅长方向" class="direction-column-cell">{{ row?.specialty }}</van-cell>
|
||||
<van-cell title="个人简介" class="direction-column-cell">{{ row?.introduce }}</van-cell>
|
||||
</van-cell-group>
|
||||
<van-cell-group title="可预约时段">
|
||||
<table v-if="row?.times && row?.times.length > 0" class="table-class">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>日期</th>
|
||||
<th>开始时间</th>
|
||||
<th>结束时间</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="(item,index) in row?.times" :key="index">
|
||||
<td>{{ $moment(item.startTime).format('YYYY-MM-DD') }}</td>
|
||||
<td>{{ $moment(item.startTime).format('HH:mm') }}</td>
|
||||
<td>{{ $moment(item.endTime).format('HH:mm') }}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<div v-else class="empty-text">暂无可预约时段</div>
|
||||
</van-cell-group>
|
||||
</div>
|
||||
</van-action-sheet>
|
||||
</div>
|
||||
`,
|
||||
data() {
|
||||
return {
|
||||
visible:false,
|
||||
row: null,
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
onOpen(row) {
|
||||
this.row = row
|
||||
this.visible = true
|
||||
},
|
||||
},
|
||||
style: /*language=CSS*/ `
|
||||
/deep/ .table-class{
|
||||
width: 100%;
|
||||
border-radius: 5px;
|
||||
overflow: hidden;
|
||||
line-height: 1.5rem;
|
||||
font-size: 13px;
|
||||
table-layout: fixed;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
/deep/ .table-class th {
|
||||
background-color: #f2f2f2;
|
||||
border: 1px solid #dddddd;
|
||||
}
|
||||
/deep/ .table-class tr {
|
||||
text-align: center;
|
||||
border-bottom: 1px solid #dddddd;
|
||||
}
|
||||
/deep/ .table-class td {
|
||||
border: 1px solid #dddddd;
|
||||
}
|
||||
/deep/ .empty-text {
|
||||
font-size: 14px;
|
||||
text-align: center;
|
||||
padding: 10px 0;
|
||||
}
|
||||
`
|
||||
}
|
||||
@@ -0,0 +1,98 @@
|
||||
<!--#
|
||||
layout("/layouts/platform_h5.html"){
|
||||
#-->
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
|
||||
<div id="app">
|
||||
<van-nav-bar title="预约记录" left-text="返回" left-arrow @click-left="historyBack" fixed placeholder></van-nav-bar>
|
||||
|
||||
<van-sticky offset-top="46px">
|
||||
<van-dropdown-menu :close-on-click-outside="false" :close-on-click-overlay="false">
|
||||
<year-van-dropdown-item :num="5" @change="doSearch" v-model="pageForm.year"></year-van-dropdown-item>
|
||||
</van-dropdown-menu>
|
||||
</van-sticky>
|
||||
|
||||
<table-list api="/platform/psychology/list/pageData"
|
||||
:page_form.sync="pageForm"
|
||||
ref="tableListRef"
|
||||
title="doctorUserName"
|
||||
@ready="doSearch">
|
||||
<template v-slot="{index,row}">
|
||||
<table-column label="姓名">{{row.appointmentUserName}}</table-column>
|
||||
<table-column label="工号">{{row.appointmentLoginName}}</table-column>
|
||||
<table-column label="单位">{{row.appointmentUnitName}}</table-column>
|
||||
<table-column label="开始时间">{{row.startTime}}</table-column>
|
||||
<table-column label="结束时间">{{row.endTime}}</table-column>
|
||||
</template>
|
||||
<template #actions="{index,row}">
|
||||
<div class="action-btn" @click="onView(row)">
|
||||
<i class="fa fa-eye"></i>
|
||||
<span>查看</span>
|
||||
</div>
|
||||
<div v-if="$moment().unix() < $moment(row.startTime).unix()"
|
||||
class="action-btn delete" @click="onDelete(row)">
|
||||
<i class="fa fa-trash"></i>
|
||||
<span>删除</span>
|
||||
</div>
|
||||
</template>
|
||||
</table-list>
|
||||
|
||||
<info ref="infoRef"></info>
|
||||
</div>
|
||||
|
||||
<script nonce="${cspNonce!}">
|
||||
<!--#include('../common/applyInfo.js'){}#-->
|
||||
new Vue({
|
||||
el: "#app",
|
||||
store,
|
||||
components: {
|
||||
"info": applyInfo,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
pageForm: {
|
||||
pageNumber: 1,
|
||||
pageSize: 10,
|
||||
totalCount: 0,
|
||||
year: new Date().getFullYear(),
|
||||
},
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
onView(row) {
|
||||
this.$refs.infoRef.onOpen(row)
|
||||
},
|
||||
onDelete(row) {
|
||||
this.$dialog.confirm({
|
||||
title: "提示",
|
||||
message: "您确定要删除吗?"
|
||||
})
|
||||
.then(() => {
|
||||
this.$axios.post("/platform/psychology/list/delete", { id: row.id }).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$toast.success(res.msg)
|
||||
this.doSearch()
|
||||
} else {
|
||||
this.$toast.fail(res.msg)
|
||||
}
|
||||
})
|
||||
})
|
||||
.catch(() => {})
|
||||
},
|
||||
doSearch() {
|
||||
this.$nextTick(() => {
|
||||
this.pageForm.pageNumber = 1
|
||||
this.pageForm.totalCount = 0
|
||||
this.$refs.tableListRef.doSearch()
|
||||
})
|
||||
}
|
||||
},
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,87 @@
|
||||
const applyForm = {
|
||||
template: /*language=HTML*/ `
|
||||
<div>
|
||||
<van-action-sheet :close-on-click-overlay="false" title="咨询信息" v-model="visible">
|
||||
<van-notice-bar
|
||||
left-icon="volume-o"
|
||||
text="温馨提示:不会发布您的个人隐私信息,您咨询的内容只有咨询师可查看并回复。"
|
||||
></van-notice-bar>
|
||||
<van-form ref="formRef" class="form-container">
|
||||
<van-cell-group title="基本信息" class="form-section">
|
||||
<van-field label="咨询人姓名" :rules="[{ required: true }]"
|
||||
:value="$store.state.user.username"
|
||||
readonly
|
||||
required
|
||||
name="username"></van-field>
|
||||
<van-field label="咨询人工号" :rules="[{ required: true }]"
|
||||
:value="$store.state.user.loginname"
|
||||
readonly
|
||||
required
|
||||
name="loginname"></van-field>
|
||||
<van-field
|
||||
v-model="formData.postTitle"
|
||||
name="postTitle"
|
||||
label="咨询主题"
|
||||
type="textarea"
|
||||
rows="4"
|
||||
autosize
|
||||
placeholder="请简约填写咨询主题,不超过20个字"
|
||||
:rules="[{ required: true }]"
|
||||
required
|
||||
></van-field>
|
||||
<van-field
|
||||
v-model="formData.postContent"
|
||||
name="postContent"
|
||||
label="主要内容"
|
||||
type="textarea"
|
||||
rows="4"
|
||||
autosize
|
||||
placeholder="请输入主要内容"
|
||||
:rules="[{ required: true }]"
|
||||
required
|
||||
></van-field>
|
||||
</van-cell-group>
|
||||
|
||||
<div class="form-actions">
|
||||
<van-button @click="onSubmit" round type="info">提交申请</van-button>
|
||||
</div>
|
||||
</van-form>
|
||||
</van-action-sheet>
|
||||
</div>
|
||||
`,
|
||||
store,
|
||||
data() {
|
||||
return {
|
||||
visible:false,
|
||||
formData: {},
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
onOpen(row) {
|
||||
if(row && row.id) {
|
||||
this.formData = clone(row)
|
||||
}
|
||||
this.visible = true
|
||||
},
|
||||
onSubmit() {
|
||||
this.$refs.formRef.validate().then(() => {
|
||||
this.$dialog.confirm({
|
||||
title: "提示",
|
||||
message: "您确定要提交吗?"
|
||||
}).then(() => {
|
||||
this.$axios.post("/platform/psychology/onlinePost/submit", this.formData).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.$toast(res.msg)
|
||||
this.visible = false
|
||||
this.$emit('refresh')
|
||||
}
|
||||
})
|
||||
})
|
||||
})
|
||||
},
|
||||
},
|
||||
style: /*language=CSS*/ `
|
||||
|
||||
`
|
||||
}
|
||||
|
||||
@@ -0,0 +1,123 @@
|
||||
<!--#
|
||||
layout("/layouts/platform_h5.html"){
|
||||
#-->
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
|
||||
<div id="app">
|
||||
<van-nav-bar title="发帖咨询" left-text="返回" left-arrow @click-left="historyBack" fixed placeholder
|
||||
right-text="我要咨询" @click-right="onAdd"></van-nav-bar>
|
||||
|
||||
<van-sticky offset-top="46px">
|
||||
<van-dropdown-menu :close-on-click-outside="false" :close-on-click-overlay="false">
|
||||
<year-van-dropdown-item :num="5" @change="doSearch" v-model="pageForm.year"></year-van-dropdown-item>
|
||||
<van-dropdown-item v-model="pageForm.isReply" :options="replyOptions" :multiple="false"
|
||||
@change="doSearch"></van-dropdown-item>
|
||||
</van-dropdown-menu>
|
||||
</van-sticky>
|
||||
|
||||
<table-list api="/platform/psychology/onlinePost/pageData"
|
||||
:page_form.sync="pageForm"
|
||||
ref="tableListRef"
|
||||
title="postTitle"
|
||||
@ready="doSearch">
|
||||
<template v-slot="{index,row}">
|
||||
<table-column label="工号">{{row.loginName}}</table-column>
|
||||
<table-column label="姓名">{{row.userName}}</table-column>
|
||||
<table-column label="咨询时间">{{row.postingTime}}</table-column>
|
||||
<table-column label="回复情况">
|
||||
<van-tag color="#67c23a" v-if="row.isReply">已回复</van-tag>
|
||||
<van-tag type="primary" v-else>未回复</van-tag>
|
||||
</table-column>
|
||||
</template>
|
||||
<template #actions="{index,row}">
|
||||
<div class="action-btn" @click="onView(row)">
|
||||
<i class="fa fa-eye"></i>
|
||||
<span>查看</span>
|
||||
</div>
|
||||
<div class="action-btn" @click="onEdit(row)">
|
||||
<i class="fa fa-edit"></i>
|
||||
<span>编辑</span>
|
||||
</div>
|
||||
<div v-if="!row.isReply"
|
||||
class="action-btn delete" @click="onDelete(row)">
|
||||
<i class="fa fa-trash"></i>
|
||||
<span>删除</span>
|
||||
</div>
|
||||
</template>
|
||||
</table-list>
|
||||
|
||||
<info ref="infoRef"></info>
|
||||
<apply-form ref="applyFormRef" @refresh="doSearch"></apply-form>
|
||||
</div>
|
||||
|
||||
<script nonce="${cspNonce!}">
|
||||
<!--#include('applyForm.js'){}#-->
|
||||
<!--#include('info.js'){}#-->
|
||||
new Vue({
|
||||
el: "#app",
|
||||
store,
|
||||
components: {
|
||||
"apply-form": applyForm,
|
||||
"info": info,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
pageForm: {
|
||||
pageNumber: 1,
|
||||
pageSize: 10,
|
||||
totalCount: 0,
|
||||
year: new Date().getFullYear(),
|
||||
isReply: null,
|
||||
},
|
||||
replyOptions: [
|
||||
{text: '全部', value: null},
|
||||
{text: '已回复', value: true},
|
||||
{text: '未回复', value: false},
|
||||
],
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
onView(row) {
|
||||
const url = '/platform/psychology/onlinePost/fetchOne'
|
||||
this.$refs.infoRef.onOpen(row, url)
|
||||
},
|
||||
onAdd() {
|
||||
this.$refs.applyFormRef.onOpen()
|
||||
},
|
||||
onEdit(row) {
|
||||
this.$refs.applyFormRef.onOpen(row)
|
||||
},
|
||||
onDelete(row) {
|
||||
this.$dialog.confirm({
|
||||
title: "提示",
|
||||
message: "您确定要删除吗?"
|
||||
})
|
||||
.then(() => {
|
||||
this.$axios.post("/platform/psychology/onlinePost/delete", { id: row.id }).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$toast.success(res.msg)
|
||||
this.doSearch()
|
||||
} else {
|
||||
this.$toast.fail(res.msg)
|
||||
}
|
||||
})
|
||||
})
|
||||
.catch(() => {})
|
||||
},
|
||||
doSearch() {
|
||||
this.$nextTick(() => {
|
||||
this.pageForm.pageNumber = 1
|
||||
this.pageForm.totalCount = 0
|
||||
this.$refs.tableListRef.doSearch()
|
||||
})
|
||||
}
|
||||
},
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,73 @@
|
||||
const info = {
|
||||
template: /*language=HTML*/ `
|
||||
<div>
|
||||
<van-action-sheet v-model="visible" title="详细信息" cancel-text="取消">
|
||||
<div class="detail-container">
|
||||
<van-cell-group title="基础信息">
|
||||
<van-cell title="咨询人">{{ viewData.userName }}</van-cell>
|
||||
<van-cell title="咨询时间">{{ viewData.postingTime }}</van-cell>
|
||||
<van-cell title="咨询主题">{{ viewData.postTitle }}</van-cell>
|
||||
<van-cell title="主要内容" class="direction-column-cell">
|
||||
{{ viewData.postContent }}
|
||||
</van-cell>
|
||||
</van-cell-group>
|
||||
<van-cell-group title="回复信息">
|
||||
<van-steps v-if="viewData.replyList && viewData.replyList.length > 0" direction="vertical" active-icon="setting">
|
||||
<van-step v-for="(item, index) in viewData.replyList">
|
||||
<div class="user-face">
|
||||
<svg t="1639966214107" class="icon" viewBox="0 0 3208 1024" version="1.1"
|
||||
xmlns="http://www.w3.org/2000/svg" p-id="6251" width="80" height="30">
|
||||
<path d="M343.496334 367.185736m-225.049322 0a225.049322 225.049322 0 1 0 450.098644 0 225.049322 225.049322 0 1 0-450.098644 0Z"
|
||||
fill="#FFFFFF" p-id="6252"></path>
|
||||
<path d="M1879.043392 0H355.341035c-3.079622 0-20.846674 23.689402-23.689402 23.689402 14.687429 3.079622 23.689402-11.370913 33.638951 0C400.350899 58.512824 450.098644 99.49549 497.477449 94.757609h23.689402c37.903044 0 58.512824 5.685457 57.565248 41.693348a155.639373 155.639373 0 0 0 71.068207 118.447012 76.51677 76.51677 0 0 1 10.186443 6.869927 64.19828 64.19828 0 0 1 9.001973 93.573139 152.796645 152.796645 0 0 0-23.689403 134.318911 58.27593 58.27593 0 0 1 3.553411 12.555383A66.567221 66.567221 0 0 1 592.235058 578.495205a161.087936 161.087936 0 0 0-108.260569 87.650788 77.227452 77.227452 0 0 1-6.159244 12.555384c-14.924323 23.689402-19.42531 11.370913-47.378805 6.869926L426.409242 686.992667h9.001973l11.370913 23.689403h1432.261264C2071.164445 710.68207 2226.803818 562.149517 2226.803818 379.030437v-47.378804c0-183.11908-155.639373-331.651633-347.760426-331.651633z"
|
||||
fill="#EDF5FE" p-id="6253"></path>
|
||||
<path d="M688.650926 261.767896a74.147829 74.147829 0 0 0-9.949549-6.869927 156.586949 156.586949 0 0 1-67.514797-118.447012 65.619644 65.619644 0 0 0-63.961386-66.804114 61.355552 61.355552 0 0 0-13.266066 1.18447 154.218009 154.218009 0 0 1-126.975196-47.378805 65.145856 65.145856 0 0 0-36.718574-21.557356 21.320462 21.320462 0 0 0-12.318489 12.081595 324.544812 324.544812 0 0 0-58.039036 23.689403 334.020573 334.020573 0 0 1 58.27593-23.689403 21.79425 21.79425 0 0 1 12.555383-12.081595 64.19828 64.19828 0 0 0-54.722519 12.318489 78.88571 78.88571 0 0 0-10.423337 9.475761 154.691797 154.691797 0 0 1-126.975196 47.378805 65.619644 65.619644 0 0 0-76.51677 52.116685 61.355552 61.355552 0 0 0 0 13.266065 157.060737 157.060737 0 0 1-67.514797 118.447012 66.567221 66.567221 0 0 0-23.689402 90.967305 55.433201 55.433201 0 0 0 4.974775 9.475761 158.95589 158.95589 0 0 1 23.689402 134.555805 65.856538 65.856538 0 0 0 37.903044 85.281848 56.617672 56.617672 0 0 0 12.792277 3.553411 156.586949 156.586949 0 0 1 103.522688 87.650788 65.145856 65.145856 0 0 0 82.43912 40.982666 86.466318 86.466318 0 0 0 12.555383-5.92235 154.218009 154.218009 0 0 1 135.266488 0 66.567221 66.567221 0 0 0 22.268038 8.054397 64.672068 64.672068 0 0 0 66.330326-30.559329 59.934188 59.934188 0 0 0 5.685457-12.555384 156.586949 156.586949 0 0 1 103.522688-87.650788 66.330327 66.330327 0 0 0 54.248731-76.279876 58.27593 58.27593 0 0 0-3.55341-12.555383 158.482102 158.482102 0 0 1 23.689402-134.318911 66.330327 66.330327 0 0 0-7.580608-93.810033zM355.341035 564.281563v17.530158a129.107243 129.107243 0 0 0 99.258596 125.316938A129.107243 129.107243 0 0 1 355.341035 581.811721v-17.530158L194.016205 240.684328h81.017756L355.341035 416.933481V25.110766 416.933481l81.017756-176.486047h81.017756zM921.51775 298.249575a584.891343 584.891343 0 0 1-98.074125 96.415868l-20.60978-22.504932a501.978435 501.978435 0 0 0 94.757609-92.151776z m-86.703212-120.10527a415.275223 415.275223 0 0 1 71.068207 54.959414l-21.79425 21.320462a450.098644 450.098644 0 0 0-70.594419-55.433201z m295.643741 227.181369v154.691797h-29.848647v-20.846674h-218.890078v20.846674H852.818484v-154.691797z m-248.738725 104.944052h218.890078v-76.042981h-218.890078z m101.153748-275.507749a260.583426 260.583426 0 0 1-47.378804 62.303128l-19.188416-23.689402a225.996898 225.996898 0 0 0 60.171082-108.260569l30.559329 3.790305c-3.079622 11.607807-6.869927 23.689402-11.370913 36.718573H1160.780714v24.400085a351.55073 351.55073 0 0 1-41.930242 71.068207l-22.504932-18.003946a268.874716 268.874716 0 0 0 30.559329-47.378805h-68.462373c0 16.819476-2.36894 29.374859-3.553411 37.429256 18.003946 47.378805 61.118658 78.648816 129.581031 94.757609l-12.792277 29.137965c-65.619644-18.003946-108.023675-47.378805-127.448985-91.441093-20.372886 40.745772-62.540022 71.068207-126.264514 89.309047l-13.029171-27.716601c68.699267-18.003946 108.734357-48.800169 118.447011-92.151775a298.486469 298.486469 0 0 0 4.027199-38.85062zM1221.18869 299.197151h92.151775v189.515219c11.370913-9.949549 26.058343-23.689402 43.825394-41.693348l8.528185 32.454481A544.856253 544.856253 0 0 1 1286.334546 544.856253l-11.844701-27.242812a25.821449 25.821449 0 0 0 9.475761-18.951522v-170.089909h-62.776916z m51.169109-126.264514a502.926011 502.926011 0 0 1 71.068207 65.619644l-20.846674 21.320462a458.153041 458.153041 0 0 0-72.489571-66.093432z m170.089908 0a395.139231 395.139231 0 0 1-13.502959 42.640924h167.957863q0 231.445461-5.922351 288.53692a54.485625 54.485625 0 0 1-60.64487 53.301156l-40.508878-1.18447-7.343715-27.716601c23.689402 0 37.429256 1.658258 44.062289 1.658258 19.662204 0 31.033117-12.555383 34.586527-37.903044s4.500986-108.260569 5.448563-247.791148h-150.901493a310.33117 310.33117 0 0 1-56.617672 76.279875l-19.42531-23.689402a260.583426 260.583426 0 0 0 72.252677-129.581031z m-58.749717 121.526634h130.528607v195.200675h-130.528607z m29.848647 83.860484h71.068207v-58.749718h-71.068207z m71.068207 84.80806V402.71984h-71.068207v59.223505zM1741.881753 170.800591h29.848647v203.018178q-1.895152 126.975196-86.940107 185.961808l-23.689402-20.135992c52.827367-34.586527 79.359498-90.019729 80.307074-165.825816z m-75.095405 55.906989h29.848646V450.098644h-29.848646z m131.002394-40.508878H2037.2886v29.848647h-104.707158v52.353579h87.650788v208.940529c0 23.689402-10.660231 35.534103-32.217587 35.534103h-29.137965l-8.054397-29.848647 27.242813 1.658259c8.528185 0 12.792277-4.500986 12.792277-13.739854v-173.880213h-58.275929v260.583426h-30.085541v-260.583426h-58.27593v218.653184h-29.374859V268.400928h87.650789V216.047349h-104.707159z"
|
||||
fill="#4492F4" p-id="6254"></path>
|
||||
</svg>
|
||||
<span style="position: relative; top: 2px">{{ item.userName }}</span>
|
||||
</div>
|
||||
<div>回复时间:{{ item.replyTime }}</div>
|
||||
<div>回复内容:{{ item.replyContent }}</div>
|
||||
</van-step>
|
||||
</van-steps>
|
||||
<div v-else class="empty-text">暂无回复信息</div>
|
||||
</van-cell-group>
|
||||
</div>
|
||||
</van-action-sheet>
|
||||
</div>
|
||||
`,
|
||||
data() {
|
||||
return {
|
||||
visible:false,
|
||||
row: {},
|
||||
viewData: {},
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
onOpen(row, url) {
|
||||
this.row = row
|
||||
this.visible = true
|
||||
this.fetchOne(url)
|
||||
},
|
||||
fetchOne(url) {
|
||||
this.$axios.post(url, {id: this.row.id})
|
||||
.then((resp) => {
|
||||
this.viewData = resp.data
|
||||
this.visible = true
|
||||
})
|
||||
}
|
||||
},
|
||||
style: /*language=CSS*/ `
|
||||
/deep/ .empty-text {
|
||||
font-size: 14px;
|
||||
text-align: center;
|
||||
padding: 10px 0;
|
||||
}
|
||||
/deep/ .user-face{
|
||||
display: flex;
|
||||
}
|
||||
/deep/ .van-step__title {
|
||||
font-size: 13px;
|
||||
}
|
||||
`
|
||||
}
|
||||
@@ -0,0 +1,68 @@
|
||||
const applyForm = {
|
||||
template: /*language=HTML*/ `
|
||||
<div>
|
||||
<van-action-sheet :close-on-click-overlay="false" title="回复信息" v-model="visible">
|
||||
<van-form ref="formRef" class="form-container">
|
||||
<van-cell-group title="基本情况" class="form-section">
|
||||
<van-field label="咨询人" readonly :value="viewData.posterUserName"></van-field>
|
||||
<van-field label="咨询时间" readonly :value="viewData.postingTime"></van-field>
|
||||
<van-field label="咨询主题" readonly :value="viewData.postTitle"></van-field>
|
||||
<van-field label="主要内容" readonly :value="viewData.postContent"></van-field>
|
||||
</van-cell-group>
|
||||
<van-cell-group title="我来回复" class="form-section">
|
||||
<van-field
|
||||
v-model="formData.replyContent"
|
||||
name="replyContent"
|
||||
label="回复内容"
|
||||
type="textarea"
|
||||
rows="4"
|
||||
autosize
|
||||
placeholder="请输入回复内容"
|
||||
:rules="[{ required: true }]"
|
||||
required
|
||||
></van-field>
|
||||
</van-cell-group>
|
||||
|
||||
<div class="form-actions">
|
||||
<van-button @click="onSubmit" round type="info">提交</van-button>
|
||||
</div>
|
||||
</van-form>
|
||||
</van-action-sheet>
|
||||
</div>
|
||||
`,
|
||||
store,
|
||||
data() {
|
||||
return {
|
||||
visible:false,
|
||||
formData: {},
|
||||
viewData: {},
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
onOpen(row) {
|
||||
this.viewData = clone({ ...row })
|
||||
this.$set(this.formData, 'postId', row.id)
|
||||
this.visible = true
|
||||
},
|
||||
onSubmit() {
|
||||
this.$refs.formRef.validate().then(() => {
|
||||
this.$dialog.confirm({
|
||||
title: "提示",
|
||||
message: "您确定要提交吗?"
|
||||
}).then(() => {
|
||||
this.$axios.post("/platform/psychology/onlineReply/submit", this.formData).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.$toast(res.msg)
|
||||
this.visible = false
|
||||
this.$emit('refresh')
|
||||
}
|
||||
})
|
||||
})
|
||||
})
|
||||
},
|
||||
},
|
||||
style: /*language=CSS*/ `
|
||||
|
||||
`
|
||||
}
|
||||
|
||||
@@ -0,0 +1,96 @@
|
||||
<!--#
|
||||
layout("/layouts/platform_h5.html"){
|
||||
#-->
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
|
||||
<div id="app">
|
||||
<van-nav-bar title="咨询回复" left-text="返回" left-arrow @click-left="historyBack" fixed placeholder></van-nav-bar>
|
||||
|
||||
<van-sticky offset-top="46px">
|
||||
<van-dropdown-menu :close-on-click-outside="false" :close-on-click-overlay="false">
|
||||
<year-van-dropdown-item :num="5" @change="doSearch" v-model="pageForm.year"></year-van-dropdown-item>
|
||||
<van-dropdown-item v-model="pageForm.isReply" :options="replyOptions" :multiple="false"
|
||||
@change="doSearch"></van-dropdown-item>
|
||||
</van-dropdown-menu>
|
||||
</van-sticky>
|
||||
|
||||
<table-list api="/platform/psychology/onlineReply/pageData"
|
||||
:page_form.sync="pageForm"
|
||||
ref="tableListRef"
|
||||
title="postTitle"
|
||||
@ready="doSearch">
|
||||
<template v-slot="{index,row}">
|
||||
<table-column label="姓名">{{row.posterUserName}}</table-column>
|
||||
<table-column label="咨询时间">{{row.postingTime}}</table-column>
|
||||
<table-column label="回复情况">
|
||||
<van-tag color="#67c23a" v-if="row.replyCount > 0">已回复</van-tag>
|
||||
<van-tag type="primary" v-else>未回复</van-tag>
|
||||
</table-column>
|
||||
</template>
|
||||
<template #actions="{index,row}">
|
||||
<div class="action-btn" @click="onView(row)">
|
||||
<i class="fa fa-eye"></i>
|
||||
<span>查看</span>
|
||||
</div>
|
||||
<div class="action-btn" @click="onReply(row)">
|
||||
<i class="fa fa-edit"></i>
|
||||
<span>回复</span>
|
||||
</div>
|
||||
</template>
|
||||
</table-list>
|
||||
|
||||
<info ref="infoRef"></info>
|
||||
<apply-form ref="applyFormRef" @refresh="doSearch"></apply-form>
|
||||
</div>
|
||||
|
||||
<script nonce="${cspNonce!}">
|
||||
<!--#include('applyForm.js'){}#-->
|
||||
<!--#include('../onlinePost/info.js'){}#-->
|
||||
new Vue({
|
||||
el: "#app",
|
||||
store,
|
||||
components: {
|
||||
"apply-form": applyForm,
|
||||
"info": info,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
pageForm: {
|
||||
pageNumber: 1,
|
||||
pageSize: 10,
|
||||
totalCount: 0,
|
||||
year: new Date().getFullYear(),
|
||||
isReply: null,
|
||||
},
|
||||
replyOptions: [
|
||||
{text: '全部', value: null},
|
||||
{text: '已回复', value: true},
|
||||
{text: '未回复', value: false},
|
||||
],
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
onView(row) {
|
||||
const url = '/platform/psychology/onlineReply/fetchOne'
|
||||
this.$refs.infoRef.onOpen(row, url)
|
||||
},
|
||||
onReply(row) {
|
||||
this.$refs.applyFormRef.onOpen(row)
|
||||
},
|
||||
doSearch() {
|
||||
this.$nextTick(() => {
|
||||
this.pageForm.pageNumber = 1
|
||||
this.pageForm.totalCount = 0
|
||||
this.$refs.tableListRef.doSearch()
|
||||
})
|
||||
}
|
||||
},
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
Reference in New Issue
Block a user