bug整改

This commit is contained in:
=
2025-09-13 17:06:18 +08:00
parent 613eb000f3
commit b21f51bea0
7 changed files with 475 additions and 474 deletions
@@ -356,7 +356,8 @@ public class SysUserController {
if (StrUtil.isBlank(pathname)) { if (StrUtil.isBlank(pathname)) {
} }
Sys_menu menu = sysMenuService.fetch(Cnd.where(Sys_menu::getHref, "like", pathname + "%")); // Sys_menu menu = sysMenuService.fetch(Cnd.where(Sys_menu::getHref, "like", pathname + "%"));
Sys_menu menu = sysMenuService.fetch(Cnd.where(Sys_menu::getHref, "=", pathname));
if (menu == null) { if (menu == null) {
return Result.success(); return Result.success();
} }
@@ -52,4 +52,8 @@ public class MemberInfoPageForm extends PageForm {
private String memberSearchName; private String memberSearchName;
private String memberSearchKeyWord; private String memberSearchKeyWord;
private Integer pageNumber = 1;
private Integer pageSize = 10;
} }
@@ -146,13 +146,14 @@ const INFO = {
// 打开 // 打开
onOpen(row) { onOpen(row) {
this.row = row this.row = row
console.log(row.id)
this.info() this.info()
this.getDoneTasks() this.getDoneTasks()
}, },
// 获取申请信息 // 获取申请信息
info() { info() {
this.$axios.post("/platform/member/change/view/findMemberChangeRecord", { id: this.row.id }).then((res) => { this.$axios.post("/platform/member/change/mine/findMemberChangeRecord", { id: this.row.id }).then((res) => {
if (res.code === 0) { if (res.code === 0) {
this.viewData = res.data this.viewData = res.data
} }
@@ -6,7 +6,7 @@ layout("/layouts/platform.html"){
<el-card shadow="never"> <el-card shadow="never">
<common-query ref="commonQueryRef" @search="search"></common-query> <common-query ref="commonQueryRef" @search="search"></common-query>
</el-card> </el-card>
<el-card shadow="never" class="mt10"> <el-card shadow="never" class="mt10">
<table-tool :app="this" label="申请列表"> <table-tool :app="this" label="申请列表">
</table-tool> </table-tool>
@@ -48,7 +48,7 @@ layout("/layouts/platform.html"){
</el-table> </el-table>
<!--#include("/layouts/pagination.html"){}#--> <!--#include("/layouts/pagination.html"){}#-->
</el-card> </el-card>
<template #view> <template #view>
<info ref="infoRef"></info> <info ref="infoRef"></info>
</template> </template>
@@ -57,7 +57,7 @@ layout("/layouts/platform.html"){
<script> <script>
<!--#include("../common/info.js"){}#--> <!--#include("../common/info.js"){}#-->
<!--#include("../common/commonQuery.js"){}#--> <!--#include("../common/commonQuery.js"){}#-->
new Vue({ new Vue({
el: '#app', el: '#app',
mixins: [initTableMixins], mixins: [initTableMixins],
@@ -106,7 +106,7 @@ layout("/layouts/platform.html"){
}) })
}) })
}, },
onDelete(id) { onDelete(id) {
this.$confirm("您确定要删除吗?", "提示", { this.$confirm("您确定要删除吗?", "提示", {
confirmButtonText: "确定", confirmButtonText: "确定",
@@ -121,7 +121,7 @@ layout("/layouts/platform.html"){
}) })
}) })
}, },
search(pageForm){ search(pageForm){
if (pageForm) { if (pageForm) {
this.pageForm = {...this.pageForm, ...pageForm} this.pageForm = {...this.pageForm, ...pageForm}
@@ -138,12 +138,16 @@ layout("/layouts/platform.html"){
data() { data() {
return { return {
pageForm: { pageForm: {
pageNumber: 1,
pageSize: 10,
searchKeyword: "", searchKeyword: "",
unionId: "", unionId: "",
unitId: "", unitId: "",
personTypes: [], personTypes: [],
preparedBys: [], preparedBys: [],
userStates: [], userStates: [],
sexTypes: [],
totalCount: 0,
cnd: "" cnd: ""
}, },
userId: "", userId: "",
@@ -2,7 +2,7 @@
layout("/layouts/platform_h5.html"){ layout("/layouts/platform_h5.html"){
#--> #-->
<style > <style>
</style> </style>
<div id="app" v-cloak> <div id="app" v-cloak>
@@ -10,158 +10,164 @@ layout("/layouts/platform_h5.html"){
class="custom-nav"></van-nav-bar> class="custom-nav"></van-nav-bar>
<div class="form-container"> <div class="form-container">
<van-form ref="formRef" > <van-form ref="formRef">
<van-cell-group title="信息填报" class="form-section"> <van-cell-group title="信息填报" class="form-section">
<van-field label="经办人" v-model="formData.userName" placeholder="从信息中心获取" readonly></van-field> <van-field label="经办人" v-model="formData.userName" placeholder="从信息中心获取" readonly></van-field>
<van-field label="工号" v-model="formData.loginName" placeholder="从信息中心获取" readonly></van-field> <van-field label="工号" v-model="formData.loginName" placeholder="从信息中心获取" readonly></van-field>
<!-- 报销类别 --> <!-- 报销类别 -->
<van-field <van-field
v-model="formData.reimburseTypeName" v-model="formData.reimburseTypeName"
name="reimburseTypeName" name="reimburseTypeName"
label="报销类别" label="报销类别"
readonly readonly
placeholder="请选择报销类别" placeholder="请选择报销类别"
@click="showReimburseTypePicker = true" @click="showReimburseTypePicker = true"
clickable clickable
:rules="[{ required: true }]" :rules="[{ required: true }]"
required required
></van-field> ></van-field>
<van-popup position="bottom" round v-model:show="showReimburseTypePicker"> <van-popup position="bottom" round v-model:show="showReimburseTypePicker">
<van-picker :columns="reimburseTypeColumns" @cancel="showReimburseTypePicker = false" @confirm="onReimburseTypeConfirm" show-toolbar></van-picker> <van-picker :columns="reimburseTypeColumns" @cancel="showReimburseTypePicker = false"
</van-popup> @confirm="onReimburseTypeConfirm" show-toolbar></van-picker>
</van-popup>
<!-- 支付方式 --> <!-- 支付方式 -->
<van-field <van-field
v-model="formData.paymentWayName" v-model="formData.paymentWayName"
name="paymentWayName" name="paymentWayName"
label="支付方式" label="支付方式"
readonly readonly
placeholder="请选择支付方式" placeholder="请选择支付方式"
@click="showPaymentWayPicker = true" @click="showPaymentWayPicker = true"
clickable clickable
:rules="[{ required: true }]" :rules="[{ required: true }]"
required required
></van-field> ></van-field>
<van-popup position="bottom" round v-model:show="showPaymentWayPicker"> <van-popup position="bottom" round v-model:show="showPaymentWayPicker">
<van-picker :columns="paymentWayColumns" @cancel="showPaymentWayPicker = false" @confirm="onPaymentWayConfirm" show-toolbar></van-picker> <van-picker :columns="paymentWayColumns" @cancel="showPaymentWayPicker = false"
</van-popup> @confirm="onPaymentWayConfirm" show-toolbar></van-picker>
</van-popup>
<!-- 报销项目 --> <!-- 报销项目 -->
<van-field <van-field
v-model="formData.reimburseProjectName" v-model="formData.reimburseProjectName"
name="reimburseProjectName" name="reimburseProjectName"
label="报销项目" label="报销项目"
readonly readonly
placeholder="请选择报销项目" placeholder="请选择报销项目"
@click="showReimburseProjectPicker = true" @click="showReimburseProjectPicker = true"
clickable clickable
:rules="[{ required: true }]" :rules="[{ required: true }]"
required required
></van-field> ></van-field>
<van-popup position="bottom" round v-model:show="showReimburseProjectPicker"> <van-popup position="bottom" round v-model:show="showReimburseProjectPicker">
<van-picker :columns="reimburseProjectColumns" @cancel="showReimburseProjectPicker = false" @confirm="onReimburseProjectConfirm" show-toolbar></van-picker> <van-picker :columns="reimburseProjectColumns" @cancel="showReimburseProjectPicker = false"
</van-popup> @confirm="onReimburseProjectConfirm" show-toolbar></van-picker>
</van-popup>
<!-- 报销经费来源 --> <!-- 报销经费来源 -->
<van-field <van-field
v-model="formData.reimburseFundSourceName" v-model="formData.reimburseFundSourceName"
name="reimburseFundSourceName" name="reimburseFundSourceName"
label="报销经费来源" label="报销经费来源"
readonly readonly
placeholder="请选择报销经费来源" placeholder="请选择报销经费来源"
@click="showReimburseFundSourcePicker = true" @click="showReimburseFundSourcePicker = true"
clickable clickable
:rules="[{ required: true }]" :rules="[{ required: true }]"
required required
></van-field> ></van-field>
<van-popup position="bottom" round v-model:show="showReimburseFundSourcePicker"> <van-popup position="bottom" round v-model:show="showReimburseFundSourcePicker">
<van-picker :columns="reimburseFundSourceColumns" @cancel="showReimburseFundSourcePicker = false" @confirm="onReimburseFundSourceConfirm" show-toolbar></van-picker> <van-picker :columns="reimburseFundSourceColumns" @cancel="showReimburseFundSourcePicker = false"
</van-popup> @confirm="onReimburseFundSourceConfirm" show-toolbar></van-picker>
</van-popup>
<!-- 联系方式 --> <!-- 联系方式 -->
<van-field label="联系方式" v-model="formData.mobile" placeholder="请输入联系方式"></van-field> <van-field label="联系方式" v-model="formData.mobile" placeholder="请输入联系方式"></van-field>
<!-- 所属社团 (当经费来源为社团时显示) --> <!-- 所属社团 (当经费来源为社团时显示) -->
<van-field <van-field
v-if="formData.reimburseFundSource === 'UNION_REIMBURSE_FUND_SOURCE_3'" v-if="formData.reimburseFundSource === 'UNION_REIMBURSE_FUND_SOURCE_3'"
label="所属社团" label="所属社团"
v-model="formData.clubName" v-model="formData.clubName"
placeholder="请选择所属社团" placeholder="请选择所属社团"
readonly readonly
@click="showClubPicker = true" @click="showClubPicker = true"
clickable clickable
></van-field> ></van-field>
<van-popup position="bottom" round v-model:show="showClubPicker"> <van-popup position="bottom" round v-model:show="showClubPicker">
<van-picker :columns="clubColumns" @cancel="showClubPicker = false" @confirm="onClubConfirm" show-toolbar></van-picker> <van-picker :columns="clubColumns" @cancel="showClubPicker = false" @confirm="onClubConfirm"
</van-popup> show-toolbar></van-picker>
</van-popup>
<!-- 经费余额 --> <!-- 经费余额 -->
<van-field label="经费余额" v-model="formData.fundBalance" readonly></van-field> <van-field label="经费余额" v-model="formData.fundBalance" readonly></van-field>
<!-- 银行信息 --> <!-- 银行信息 -->
<van-field label="户名" <van-field label="户名"
v-model="formData.bankUserName" v-model="formData.bankUserName"
placeholder="请输入户名" placeholder="请输入户名"
:rules="[{ required: true }]" :rules="[{ required: true }]"
required> required>
</van-field> </van-field>
<van-field label="银行账号" <van-field label="银行账号"
v-model="formData.bankCardNumber" v-model="formData.bankCardNumber"
placeholder="请输入银行账号" placeholder="请输入银行账号"
:rules="[{ required: true }]" :rules="[{ required: true }]"
required> required>
</van-field> </van-field>
<van-field label="开户行" <van-field label="开户行"
v-model="formData.bankOfDeposit" v-model="formData.bankOfDeposit"
placeholder="请输入开户行" placeholder="请输入开户行"
:rules="[{ required: true }]" :rules="[{ required: true }]"
required> required>
</van-field> </van-field>
<!-- 将原有的慰问对象字段替换为以下代码 --> <!-- 将原有的慰问对象字段替换为以下代码 -->
<van-field <van-field
v-if="formData.reimburseProject === 'UNION_REIMBURSE_PROJECT_1'" v-if="formData.reimburseProject === 'UNION_REIMBURSE_PROJECT_1'"
label="慰问对象" label="慰问对象"
v-model="formData.condolenceName" v-model="formData.condolenceName"
placeholder="请输入姓名或工号搜索" placeholder="请输入姓名或工号搜索"
readonly readonly
@click="showCondolenceSearch = true" @click="showCondolenceSearch = true"
clickable clickable
></van-field> ></van-field>
<!-- 添加搜索弹窗 --> <!-- 添加搜索弹窗 -->
<van-popup v-model:show="showCondolenceSearch" position="bottom" round style="height: 80%;"> <van-popup v-model:show="showCondolenceSearch" position="bottom" round style="height: 80%;">
<van-search <van-search
v-model="condolenceSearchKeyword" v-model="condolenceSearchKeyword"
placeholder="请输入姓名或工号" placeholder="请输入姓名或工号"
show-action show-action
@search="searchCondolence" @search="searchCondolence"
> >
<template #action> <template #action>
<div @click="searchCondolence">搜索</div> <div @click="searchCondolence">搜索</div>
</template> </template>
</van-search> </van-search>
<van-list finished-text="没有更多了"> <van-list finished-text="没有更多了">
<van-cell <van-cell
v-for="item in condolenceSearchResults" v-for="item in condolenceSearchResults"
:key="item.id" :key="item.id"
:title="item.userName+''+item.loginName+''" :title="item.userName+''+item.loginName+''"
:label="item.unitName+' '+item.sex" :label="item.unitName+' '+item.sex"
@click="selectCondolence(item)" @click="selectCondolence(item)"
/> />
</van-list> </van-list>
<div style="padding: 10px;"> <div style="padding: 10px;">
<van-button block @click="showCondolenceSearch = false">取消</van-button> <van-button block @click="showCondolenceSearch = false">取消</van-button>
</div> </div>
</van-popup> </van-popup>
<van-field label="联系方式" v-if="formData.reimburseProject === 'UNION_REIMBURSE_PROJECT_1'" v-model="formData.condolenceMobile" placeholder="请输入联系方式"></van-field> <van-field label="联系方式" v-if="formData.reimburseProject === 'UNION_REIMBURSE_PROJECT_1'"
v-model="formData.condolenceMobile" placeholder="请输入联系方式"></van-field>
<van-field <van-field
v-if="formData.reimburseProject === 'UNION_REIMBURSE_PROJECT_1'" v-if="formData.reimburseProject === 'UNION_REIMBURSE_PROJECT_1'"
@@ -174,114 +180,120 @@ layout("/layouts/platform_h5.html"){
clickable clickable
></van-field> ></van-field>
<van-popup position="bottom" round v-model:show="showCondolenceTypePicker"> <van-popup position="bottom" round v-model:show="showCondolenceTypePicker">
<van-picker :columns="condolenceTypeColumns" @cancel="showCondolenceTypePicker = false" @confirm="onCondolenceTypeConfirm" show-toolbar></van-picker> <van-picker :columns="condolenceTypeColumns" @cancel="showCondolenceTypePicker = false"
@confirm="onCondolenceTypeConfirm" show-toolbar></van-picker>
</van-popup> </van-popup>
<van-field label="慰问金额" v-if="formData.reimburseProject === 'UNION_REIMBURSE_PROJECT_1'" v-model="formData.money" readonly></van-field> <van-field label="慰问金额" v-if="formData.reimburseProject === 'UNION_REIMBURSE_PROJECT_1'"
<van-field v-model="formData.money" readonly></van-field>
label="慰问时间"
v-if="formData.reimburseProject === 'UNION_REIMBURSE_PROJECT_1'"
v-model="formData.condolenceTime"
placeholder="请选择慰问时间"
readonly
@click="showCondolenceTimePicker = true"
clickable
:rules="[{ required: true }]"
required
></van-field>
<van-popup position="bottom" round v-model:show="showCondolenceTimePicker">
<van-datetime-picker
type="date"
:min-date="minDate"
:max-date="maxDate"
@confirm="onCondolenceTimeConfirm"
@cancel="showCondolenceTimePicker = false"
show-toolbar
/>
</van-popup>
</template>
<!-- 活动相关字段 (当报销项目不为慰问时显示) -->
<template v-if="formData.reimburseProject !== 'UNION_REIMBURSE_PROJECT_1'">
<van-field label="活动名称" v-model="formData.activityName" placeholder="请输入活动名称"></van-field>
<!-- 活动类型 (当报销项目为活动时显示) -->
<van-field <van-field
v-if="formData.reimburseProject === 'UNION_REIMBURSE_PROJECT_2'" label="慰问时间"
label="活动类型" v-if="formData.reimburseProject === 'UNION_REIMBURSE_PROJECT_1'"
v-model="formData.activityType" v-model="formData.condolenceTime"
placeholder="请选择活动类型" placeholder="请选择慰问时间"
readonly readonly
@click="showActivityTypePicker = true" @click="showCondolenceTimePicker = true"
clickable clickable
:rules="[{ required: true }]"
required
></van-field> ></van-field>
<van-popup position="bottom" round v-model:show="showActivityTypePicker"> <van-popup position="bottom" round v-model:show="showCondolenceTimePicker">
<van-picker :columns="activityTypeColumns" @cancel="showActivityTypePicker = false" @confirm="onActivityTypeConfirm" show-toolbar></van-picker>
</van-popup>
<!-- 活动人数 (当报销项目为活动时显示) -->
<van-field
v-if="formData.reimburseProject === 'UNION_REIMBURSE_PROJECT_2'"
label="活动人数"
v-model="formData.activityNumber"
placeholder="请输入活动人数"
type="number"
></van-field>
<van-field label="活动地点" v-if="formData.reimburseProject !== 'UNION_REIMBURSE_PROJECT_1'" v-model="formData.activityPlace" placeholder="请输入活动地点"></van-field>
<van-field label="报销金额" v-if="formData.reimburseProject !== 'UNION_REIMBURSE_PROJECT_1'" v-model="formData.money" placeholder="请输入报销金额" type="number"></van-field>
<van-field
label="活动时间"
v-if="formData.reimburseProject !== 'UNION_REIMBURSE_PROJECT_1'"
v-model="formData.activityTime"
placeholder="请选择活动时间"
readonly
@click="showActivityTimePicker = true"
clickable
></van-field>
<van-popup position="bottom" round v-model:show="showActivityTimePicker">
<van-datetime-picker <van-datetime-picker
type="date" type="date"
:min-date="minDate" :min-date="minDate"
:max-date="maxDate" :max-date="maxDate"
@confirm="onActivityTimeConfirm" @confirm="onCondolenceTimeConfirm"
@cancel="showActivityTimePicker = false" @cancel="showCondolenceTimePicker = false"
show-toolbar show-toolbar
/> />
</van-popup> </van-popup>
</template> </template>
<!-- 活动相关字段 (当报销项目不为慰问时显示) -->
<template v-if="formData.reimburseProject !== 'UNION_REIMBURSE_PROJECT_1'">
<van-field label="活动名称" v-model="formData.activityName"
placeholder="请输入活动名称"></van-field>
<!-- 发票信息 (当报销类别为发票时显示) --> <!-- 活动类型 (当报销项目为活动时显示) -->
<template v-if="formData.reimburseType === 'UNION_REIMBURSE_TYPE_1'"> <van-field
<van-field label="发票张数" v-if="formData.reimburseProject === 'UNION_REIMBURSE_PROJECT_2'"
v-model="formData.invoiceNumber" label="活动类型"
placeholder="请输入发票张数" v-model="formData.activityType"
type="number" placeholder="请选择活动类型"
:rules="[{ required: true }]" readonly
required @click="showActivityTypePicker = true"
> clickable
</van-field> ></van-field>
<van-field label="发票号码" <van-popup position="bottom" round v-model:show="showActivityTypePicker">
v-model="formData.invoice" <van-picker :columns="activityTypeColumns" @cancel="showActivityTypePicker = false"
placeholder="请填写发票号码,如有多个请用逗号分隔" @confirm="onActivityTypeConfirm" show-toolbar></van-picker>
:rules="[{ required: true }]" </van-popup>
required>
</van-field> <!-- 活动人数 (当报销项目为活动时显示) -->
</template> <van-field
v-if="formData.reimburseProject === 'UNION_REIMBURSE_PROJECT_2'"
label="活动人数"
v-model="formData.activityNumber"
placeholder="请输入活动人数"
type="number"
></van-field>
<!-- 支付内容 --> <van-field label="活动地点" v-if="formData.reimburseProject !== 'UNION_REIMBURSE_PROJECT_1'"
<van-field v-model="formData.activityPlace" placeholder="请输入活动地点"></van-field>
label="支付内容" <van-field label="报销金额" v-if="formData.reimburseProject !== 'UNION_REIMBURSE_PROJECT_1'"
v-model="formData.paymentNotes" v-model="formData.money" placeholder="请输入报销金额" type="number"></van-field>
placeholder="请填写支付内容" <van-field
type="textarea" label="活动时间"
autosize v-if="formData.reimburseProject !== 'UNION_REIMBURSE_PROJECT_1'"
:rules="[{ required: true }]" v-model="formData.activityTime"
required placeholder="请选择活动时间"
></van-field> readonly
@click="showActivityTimePicker = true"
clickable
></van-field>
<van-popup position="bottom" round v-model:show="showActivityTimePicker">
<van-datetime-picker
type="date"
:min-date="minDate"
:max-date="maxDate"
@confirm="onActivityTimeConfirm"
@cancel="showActivityTimePicker = false"
show-toolbar
/>
</van-popup>
</template>
<van-field class="more-text" name="files" <!-- 发票信息 (当报销类别为发票时显示) -->
label="附件" > <template v-if="formData.reimburseType === 'UNION_REIMBURSE_TYPE_1'">
<van-field label="发票张数"
v-model="formData.invoiceNumber"
placeholder="请输入发票张数"
type="number"
:rules="[{ required: true }]"
required
>
</van-field>
<van-field label="发票号码"
v-model="formData.invoice"
placeholder="请填写发票号码,如有多个请用逗号分隔"
:rules="[{ required: true }]"
required>
</van-field>
</template>
<!-- 支付内容 -->
<van-field
label="支付内容"
v-model="formData.paymentNotes"
placeholder="请填写支付内容"
type="textarea"
autosize
:rules="[{ required: true }]"
required
></van-field>
<van-field class="more-text" name="files"
label="附件">
<template #input> <template #input>
<h5-file-upload <h5-file-upload
slot="input" slot="input"
@@ -295,112 +307,112 @@ layout("/layouts/platform_h5.html"){
</template> </template>
</van-field> </van-field>
</van-cell-group> </van-cell-group>
</van-cell-group> </van-cell-group>
<!-- 提交按钮 --> <!-- 提交按钮 -->
<div class="form-actions"> <div class="form-actions">
<van-button plain @click="onSave" type="info">保存</van-button> <van-button plain @click="onSave" type="info">保存</van-button>
<van-button @click="onSubmit" type="primary" v-if="!taskId">提交</van-button> <van-button @click="onSubmit" type="primary" v-if="!taskId">提交</van-button>
<van-button @click="onSubmitAgain" type="primary" v-else>提交</van-button> <van-button @click="onSubmitAgain" type="primary" v-else>提交</van-button>
</div> </div>
</van-form> </van-form>
</div> </div>
</div> </div>
<script> <script>
new Vue({ new Vue({
store, store,
el: '#app', el: '#app',
dicts: ["UNION_REIMBURSE_TYPE","UNION_REIMBURSE_PROJECT","UNION_REIMBURSE_PAYMENT_WAY","UNION_REIMBURSE_FUND_SOURCE"], dicts: ["UNION_REIMBURSE_TYPE", "UNION_REIMBURSE_PROJECT", "UNION_REIMBURSE_PAYMENT_WAY", "UNION_REIMBURSE_FUND_SOURCE"],
data() { data() {
return { return {
bizId: GetQueryString("bizId"), bizId: GetQueryString("bizId"),
taskId: GetQueryString("taskId"), taskId: GetQueryString("taskId"),
formData: { formData: {
username: '', username: '',
loginName: '', loginName: '',
userId: '', userId: '',
unitId: '', unitId: '',
unitName: '', unitName: '',
unionId: '', unionId: '',
unionName: '', unionName: '',
mobile: '', mobile: '',
reimburseType: '', // 存储字典值 reimburseType: '', // 存储字典值
reimburseTypeName: '', // 存储显示名称 reimburseTypeName: '', // 存储显示名称
paymentWay: '', // 存储字典值 paymentWay: '', // 存储字典值
paymentWayName: '', // 存储显示名称 paymentWayName: '', // 存储显示名称
reimburseProject: '', // 存储字典值 reimburseProject: '', // 存储字典值
reimburseProjectName: '',// 存储显示名称 reimburseProjectName: '',// 存储显示名称
reimburseFundSource: '', // 存储字典值 reimburseFundSource: '', // 存储字典值
reimburseFundSourceName: '',// 存储显示名称 reimburseFundSourceName: '',// 存储显示名称
clubName: '', clubName: '',
clubId: '', clubId: '',
fundBalance: '', fundBalance: '',
bankUserName: '', bankUserName: '',
bankCardNumber: '', bankCardNumber: '',
bankOfDeposit: '', bankOfDeposit: '',
condolenceName: '', condolenceName: '',
condolenceId: '', condolenceId: '',
condolenceMobile: '', condolenceMobile: '',
condolenceType: '', condolenceType: '',
condolenceTypeName: '', condolenceTypeName: '',
money: '', money: '',
condolenceTime: '', condolenceTime: '',
activityName: '', activityName: '',
activityType: '', activityType: '',
activityTypeText: '', activityTypeText: '',
activityNumber: '', activityNumber: '',
activityPlace: '', activityPlace: '',
activityTime: '', activityTime: '',
invoiceNumber: '', invoiceNumber: '',
invoice: '', invoice: '',
paymentNotes: '', paymentNotes: '',
files: '' files: ''
}, },
// 报销类别 // 报销类别
showReimburseTypePicker: false, showReimburseTypePicker: false,
reimburseTypeColumns: [], reimburseTypeColumns: [],
// 支付方式 // 支付方式
showPaymentWayPicker: false, showPaymentWayPicker: false,
paymentWayColumns: [], paymentWayColumns: [],
// 报销项目 // 报销项目
showReimburseProjectPicker: false, showReimburseProjectPicker: false,
reimburseProjectColumns: [], reimburseProjectColumns: [],
// 报销经费来源 // 报销经费来源
showReimburseFundSourcePicker: false, showReimburseFundSourcePicker: false,
reimburseFundSourceColumns: [], reimburseFundSourceColumns: [],
// 所属社团 // 所属社团
showClubPicker: false, showClubPicker: false,
clubColumns: [], clubColumns: [],
// 慰问对象 // 慰问对象
showCondolencePicker: false, showCondolencePicker: false,
condolenceColumns: [], condolenceColumns: [],
// 慰问对象搜索相关 // 慰问对象搜索相关
showCondolenceSearch: false, showCondolenceSearch: false,
condolenceSearchKeyword: '', condolenceSearchKeyword: '',
condolenceSearchResults: [], condolenceSearchResults: [],
// 慰问类型 // 慰问类型
showCondolenceTypePicker: false, showCondolenceTypePicker: false,
condolenceTypeColumns: [], condolenceTypeColumns: [],
// 活动类型 // 活动类型
showActivityTypePicker: false, showActivityTypePicker: false,
activityTypeColumns: [ activityTypeColumns: [
{ text: '分工会活动', value: '分工会活动' }, {text: '分工会活动', value: '分工会活动'},
{ text: '校工会活动', value: '校工会活动' }, {text: '校工会活动', value: '校工会活动'},
{ text: '协会(社团)活动', value: '协会(社团)活动' } {text: '协会(社团)活动', value: '协会(社团)活动'}
], ],
// 其他数据 // 其他数据
clubOptions: [], clubOptions: [],
condolenceOptions: [], condolenceOptions: [],
typeOptions: [], typeOptions: [],
// 添加报销项目原始数据列表 // 添加报销项目原始数据列表
reimburseProjectList: [], reimburseProjectList: [],
// 添加日期选择器相关变量 // 添加日期选择器相关变量
showCondolenceTimePicker: false, showCondolenceTimePicker: false,
showActivityTimePicker: false, showActivityTimePicker: false,
minDate: new Date(2020, 0, 1), // 设置最小日期为2000年1月1日 minDate: new Date(2020, 0, 1), // 设置最小日期为2000年1月1日
maxDate: new Date(2030, 11, 31) // 设置最大日期为2030年12月31日 maxDate: new Date(2030, 11, 31) // 设置最大日期为2030年12月31日
} }
}, },
// 监听报销类别发生变化,报销项目联动改变 // 监听报销类别发生变化,报销项目联动改变
// 修复 watch 中的监听器 // 修复 watch 中的监听器
watch: { watch: {
@@ -448,36 +460,23 @@ layout("/layouts/platform_h5.html"){
return; return;
} }
} }
// 表单验证 this.$axios.post("/platform/unionReimburse/apply/save", {data: JSON.stringify(this.formData)})
try { .then((res) => {
await this.$refs.formRef.validate(); this.$toast.clear();
if (res.code === 0) {
this.$toast.loading({ this.$toast.success(res.msg);
message: '保存中...', pjaxReplace('/platform/unionReimburse/mine/h5')
forbidClick: true, } else {
this.$toast.fail(res.msg || '保存失败');
}
})
.catch(err => {
this.$toast.clear();
this.$toast.fail('网络错误,请稍后重试');
}); });
this.$axios.post("/platform/unionReimburse/apply/save", {data: JSON.stringify(this.formData)})
.then((res) => {
this.$toast.clear();
if (res.code === 0) {
this.$toast.success(res.msg);
pjaxReplace('/platform/unionReimburse/mine/h5')
} else {
this.$toast.fail(res.msg || '保存失败');
}
})
.catch(err => {
this.$toast.clear();
this.$toast.fail('网络错误,请稍后重试');
});
} catch (error) {
// 表单验证失败
console.log('表单验证失败', error);
}
}, },
// 提交 // 提交
async onSubmit(){ async onSubmit() {
// 余额校验 // 余额校验
if (this.formData.money && this.formData.fundBalance) { if (this.formData.money && this.formData.fundBalance) {
const balance = parseFloat(this.formData.fundBalance); const balance = parseFloat(this.formData.fundBalance);
@@ -486,39 +485,20 @@ layout("/layouts/platform_h5.html"){
this.$message.warning("经费余额不足"); this.$message.warning("经费余额不足");
return; return;
} }
} this.$axios.post('/platform/unionReimburse/apply/submit', {data: JSON.stringify(this.formData)})
try { .then(res => {
await this.$refs.formRef.validate(); this.$toast.clear();
if (res.code === 0) {
this.$dialog.confirm({ this.$toast.success("提交成功");
title: '提示', pjaxReplace('/platform/unionReimburse/mine/h5')
message: '您确定要提交吗?', } else {
}).then(() => { this.$toast.fail(res.msg || '提交失败');
this.$toast.loading({ }
message: '提交中...', })
forbidClick: true, .catch(err => {
this.$toast.clear();
this.$toast.fail('网络错误,请稍后重试');
}); });
this.$axios.post('/platform/unionReimburse/apply/submit', {data: JSON.stringify(this.formData)})
.then(res => {
this.$toast.clear();
if (res.code === 0) {
this.$toast.success("提交成功");
pjaxReplace('/platform/unionReimburse/mine/h5')
} else {
this.$toast.fail(res.msg || '提交失败');
}
})
.catch(err => {
this.$toast.clear();
this.$toast.fail('网络错误,请稍后重试');
});
}).catch(() => {
// 取消提交
});
} catch (error) {
// 表单验证失败
console.log('表单验证失败', error);
} }
}, },
// 再次提交 // 再次提交
@@ -532,42 +512,23 @@ layout("/layouts/platform_h5.html"){
return; return;
} }
} }
try { this.$axios.post('/platform/unionReimburse/apply/submitAgain', {
await this.$refs.formRef.validate(); data: JSON.stringify(this.formData),
taskId: GetQueryString("taskId")
this.$dialog.confirm({ }).then(res => {
title: '提示', this.$toast.clear();
message: '您确定要提交吗?', if (res.code === 0) {
}).then(() => { this.$toast.success("提交成功");
this.$toast.loading({ setTimeout(() => {
message: '提交中...', pjaxReplace('/platform/unionReimburse/mine/h5')
forbidClick: true, }, 1500);
}); } else {
this.$toast.fail(res.msg || '提交失败');
this.$axios.post('/platform/unionReimburse/apply/submitAgain', { }
data: JSON.stringify(this.formData), }).catch(err => {
taskId: GetQueryString("taskId") this.$toast.clear();
}).then(res => { this.$toast.fail('网络错误,请稍后重试');
this.$toast.clear(); });
if (res.code === 0) {
this.$toast.success("提交成功");
setTimeout(() => {
pjaxReplace('/platform/unionReimburse/mine/h5')
}, 1500);
} else {
this.$toast.fail(res.msg || '提交失败');
}
}).catch(err => {
this.$toast.clear();
this.$toast.fail('网络错误,请稍后重试');
});
}).catch(() => {
// 取消提交
});
} catch (error) {
// 表单验证失败
console.log('表单验证失败', error);
}
}, },
onReimburseTypeConfirm(o) { onReimburseTypeConfirm(o) {
this.$set(this.formData, "reimburseTypeName", o.text); // 显示名称 this.$set(this.formData, "reimburseTypeName", o.text); // 显示名称
@@ -657,7 +618,7 @@ layout("/layouts/platform_h5.html"){
this.condolenceOptions = res.data; this.condolenceOptions = res.data;
this.condolenceColumns = res.data.map(item => { this.condolenceColumns = res.data.map(item => {
return { return {
text: item.userName+''+item.loginName+''+''+item.unitName+''+''+item.sex+'', text: item.userName + '' + item.loginName + '' + '' + item.unitName + '' + '' + item.sex + '',
value: item.id value: item.id
} }
}); });
@@ -825,14 +786,14 @@ layout("/layouts/platform_h5.html"){
init() { init() {
this.bizId = GetQueryString("bizId") this.bizId = GetQueryString("bizId")
if (this.bizId) { if (this.bizId) {
this.$axios.post("/platform/unionReimburse/apply/info", { id: this.bizId }).then((res) => { this.$axios.post("/platform/unionReimburse/apply/info", {id: this.bizId}).then((res) => {
if (res.code === 0) { if (res.code === 0) {
// 先保存原始数据 // 先保存原始数据
const originalData = {...res.data}; const originalData = {...res.data};
this.formData = res.data; this.formData = res.data;
// 处理报销类别显示 // 处理报销类别显示
if (this.reimburseTypeColumns.length > 0 ) { if (this.reimburseTypeColumns.length > 0) {
const matchedReimburseType = this.reimburseTypeColumns.find(item => const matchedReimburseType = this.reimburseTypeColumns.find(item =>
item.value === originalData.reimburseType item.value === originalData.reimburseType
) )
@@ -854,7 +815,7 @@ layout("/layouts/platform_h5.html"){
} }
// 处理报销项目显示 // 处理报销项目显示
if (this.reimburseProjectColumns.length > 0 ) { if (this.reimburseProjectColumns.length > 0) {
const matchedReimburseProject = this.reimburseProjectColumns.find(item => const matchedReimburseProject = this.reimburseProjectColumns.find(item =>
item.value === originalData.reimburseProject item.value === originalData.reimburseProject
) )
@@ -865,7 +826,7 @@ layout("/layouts/platform_h5.html"){
} }
// 处理报销经费来源显示 // 处理报销经费来源显示
if (this.reimburseFundSourceColumns.length > 0 ) { if (this.reimburseFundSourceColumns.length > 0) {
const matchedReimburseFundSource = this.reimburseFundSourceColumns.find(item => const matchedReimburseFundSource = this.reimburseFundSourceColumns.find(item =>
item.value === originalData.reimburseFundSource item.value === originalData.reimburseFundSource
) )
@@ -876,7 +837,7 @@ layout("/layouts/platform_h5.html"){
} }
// 处理活动类型显示 // 处理活动类型显示
if (this.activityTypeColumns.length > 0 ) { if (this.activityTypeColumns.length > 0) {
const matchedActivityType = this.activityTypeColumns.find(item => const matchedActivityType = this.activityTypeColumns.find(item =>
item.value === originalData.activityType item.value === originalData.activityType
) )
@@ -887,7 +848,7 @@ layout("/layouts/platform_h5.html"){
} }
// 处理社团显示 // 处理社团显示
if (this.clubColumns.length > 0 ) { if (this.clubColumns.length > 0) {
const matchedClub = this.clubColumns.find(item => const matchedClub = this.clubColumns.find(item =>
item.value === originalData.clubId item.value === originalData.clubId
) )
@@ -897,7 +858,7 @@ layout("/layouts/platform_h5.html"){
} }
// 处理慰问类型显示 // 处理慰问类型显示
if (this.condolenceTypeColumns.length > 0 ) { if (this.condolenceTypeColumns.length > 0) {
const matchedCondolenceType = this.condolenceTypeColumns.find(item => const matchedCondolenceType = this.condolenceTypeColumns.find(item =>
item.value === originalData.condolenceType item.value === originalData.condolenceType
) )
@@ -924,17 +885,15 @@ layout("/layouts/platform_h5.html"){
this.$set(this.formData, "unionName", user.union.name) this.$set(this.formData, "unionName", user.union.name)
} }
} }
}, },
async created(){
async created() {
await this.initDictOptions(); await this.initDictOptions();
await this.init(); await this.init();
this.queryCondolenceType(); this.queryCondolenceType();
this.queryClubs(); this.queryClubs();
} }
}); })
</script> </script>
<!--# <!--#
} }
@@ -5,18 +5,18 @@ layout("/layouts/platform_h5.html"){
.up_down > .van-cell { .up_down > .van-cell {
flex-flow: column; flex-flow: column;
} }
.up_down > .van-cell > .van-field__label { .up_down > .van-cell > .van-field__label {
width: 100%; width: 100%;
} }
.van-cell, .van-picker button, .submit .van-button--normal { .van-cell, .van-picker button, .submit .van-button--normal {
font-size: 16px; font-size: 16px;
} }
</style> </style>
<div id="app" v-cloak> <div id="app" v-cloak>
<van-nav-bar title="入会申请" left-text="返回" left-arrow @click-left="historyBack" placeholder fixed></van-nav-bar> <van-nav-bar title="入会申请" left-text="返回" left-arrow @click-left="historyBack" placeholder fixed></van-nav-bar>
<van-form ref="formRef" class="form-container" :show-error-message="false"> <van-form ref="formRef" class="form-container" :show-error-message="false">
<van-cell-group title="基础信息" class="form-section"> <van-cell-group title="基础信息" class="form-section">
<van-field v-model="formData.loginname" label="工号" readonly></van-field> <van-field v-model="formData.loginname" label="工号" readonly></van-field>
@@ -110,21 +110,23 @@ layout("/layouts/platform_h5.html"){
clearable clearable
maxlength="30" maxlength="30"
></van-field> ></van-field>
<van-field v-model="formData.unitName" label="工作单位" readonly></van-field> <van-field v-model="formData.unitName" label="工作单位" readonly></van-field>
<van-field v-model="formData.unionName" label="所属工会" readonly></van-field> <van-field v-model="formData.unionName" label="所属工会" readonly></van-field>
<van-field label="所属校区" v-model="formData.campus" readonly clickable
@click="showCampusPicker = true" placeholder="请选择所属校区"> <van-field
</van-field> v-model="formData.campusName"
<van-popup v-model="showCampusPicker" position="bottom"> name="campusName"
<van-picker label="所属校区"
show-toolbar readonly
:columns="campusColumns" placeholder="请选择所属校区"
@confirm="(v)=>{formData.campus = v;showCampusPicker = false}" @click="showCampusPicker = true"
@cancel="showCampusPicker = false" clickable
></van-picker> ></van-field>
<van-popup position="bottom" round v-model:show="showCampusPicker">
<van-picker :columns="campusColumns" @cancel="showCampusPicker = false" @confirm="onCampusColumns" show-toolbar></van-picker>
</van-popup> </van-popup>
<van-field <van-field
v-model="formData.userState" v-model="formData.userState"
name="userState" name="userState"
@@ -169,7 +171,7 @@ layout("/layouts/platform_h5.html"){
maxlength="25" maxlength="25"
></van-field> ></van-field>
</van-cell-group> </van-cell-group>
<van-cell-group title="家庭信息" class="form-section up_down"> <van-cell-group title="家庭信息" class="form-section up_down">
<div class="van-cell"> <div class="van-cell">
<div style="display: flex;justify-content: space-between"> <div style="display: flex;justify-content: space-between">
@@ -212,11 +214,11 @@ layout("/layouts/platform_h5.html"){
</template> </template>
</div> </div>
</van-cell-group> </van-cell-group>
<van-cell-group title="个人简况" class="form-section"> <van-cell-group title="个人简况" class="form-section">
<text-editor v-model="formData.personalData"></text-editor> <text-editor v-model="formData.personalData"></text-editor>
</van-cell-group> </van-cell-group>
<van-cell-group title="入会意愿" class="form-section"> <van-cell-group title="入会意愿" class="form-section">
<van-checkbox style="font-size: 17px;padding: 12px" icon-size="24px" <van-checkbox style="font-size: 17px;padding: 12px" icon-size="24px"
v-model="formData.isVoluntary" shape="square"> v-model="formData.isVoluntary" shape="square">
@@ -261,13 +263,14 @@ layout("/layouts/platform_h5.html"){
showAcademicDegreePicker: false, showAcademicDegreePicker: false,
// 校区 // 校区
showCampusPicker: false, showCampusPicker: false,
campusColumns: [],
// 生日 // 生日
showDatePicker: false, showDatePicker: false,
} }
}, },
methods: { methods: {
historyBack, historyBack,
onSave() { onSave() {
this.$dialog.confirm({ this.$dialog.confirm({
title: "提示", title: "提示",
@@ -278,7 +281,7 @@ layout("/layouts/platform_h5.html"){
this.$axios.post('/platform/member/apply/submit/save', {data: JSON.stringify(this.formData)}).then(res => { this.$axios.post('/platform/member/apply/submit/save', {data: JSON.stringify(this.formData)}).then(res => {
if (res.code === 0) { if (res.code === 0) {
this.$toast.success(res.msg) this.$toast.success(res.msg)
this.$pjaxReplace('/platform/h5/member/apply/mine') this.$pjaxReplace('/platform/member/apply/mine/h5')
} else { } else {
this.$toast.fail('操作失败') this.$toast.fail('操作失败')
console.log(res.msg) console.log(res.msg)
@@ -286,7 +289,7 @@ layout("/layouts/platform_h5.html"){
}) })
}) })
}, },
onSubmit() { onSubmit() {
this.$refs.formRef.validate().then(() => { this.$refs.formRef.validate().then(() => {
this.$dialog.confirm({ this.$dialog.confirm({
@@ -307,7 +310,7 @@ layout("/layouts/platform_h5.html"){
}) })
}) })
}, },
onFinishTask() { onFinishTask() {
this.$refs.formRef.validate().then(() => { this.$refs.formRef.validate().then(() => {
this.$dialog.confirm({ this.$dialog.confirm({
@@ -329,12 +332,12 @@ layout("/layouts/platform_h5.html"){
}) })
}) })
}, },
onDateConfirm(value) { onDateConfirm(value) {
this.formData.birthday = value; this.formData.birthday = value;
this.showDatePicker = false; this.showDatePicker = false;
}, },
async init() { async init() {
let user let user
const resp = await $.post('/platform/member/apply/submit/getSelfUserInfo') const resp = await $.post('/platform/member/apply/submit/getSelfUserInfo')
@@ -347,7 +350,7 @@ layout("/layouts/platform_h5.html"){
} else { } else {
user = this.$store.state.user user = this.$store.state.user
} }
if (this.id) { if (this.id) {
const res = await this.$axios.post("/platform/member/apply/submit/findApplyById", { id: this.id }) const res = await this.$axios.post("/platform/member/apply/submit/findApplyById", { id: this.id })
debugger debugger
@@ -381,7 +384,7 @@ layout("/layouts/platform_h5.html"){
families, families,
personalData personalData
} = user } = user
this.$set(this.formData, "userId", id) this.$set(this.formData, "userId", id)
this.$set(this.formData, "username", username) this.$set(this.formData, "username", username)
this.$set(this.formData, "loginname", loginname) this.$set(this.formData, "loginname", loginname)
@@ -400,11 +403,26 @@ layout("/layouts/platform_h5.html"){
this.$set(this.formData, "unitId", unit ? unit.id : unitId) this.$set(this.formData, "unitId", unit ? unit.id : unitId)
this.$set(this.formData, "unionName", union ? union.name : unionName) this.$set(this.formData, "unionName", union ? union.name : unionName)
this.$set(this.formData, "unionId", union ? union.id : unionId) this.$set(this.formData, "unionId", union ? union.id : unionId)
this.$set(this.formData, "mobile", mobile) this.$set(this.formData, "mobile", mobile)
this.$set(this.formData, "email", email) this.$set(this.formData, "email", email)
this.$set(this.formData, "families", families ? families : []) this.$set(this.formData, "families", families ? families : [])
this.$set(this.formData, "personalData", personalData) this.$set(this.formData, "personalData", personalData)
// 处理校区信息
if (campus) {
this.$set(this.formData, "campus", campus) // 保存校区代码值
// 根据校区代码值查找对应的名称
if (this.campusColumns && this.campusColumns.length > 0) {
const campusItem = this.campusColumns.find(item => item.value === campus)
if (campusItem) {
this.$set(this.formData, "campusName", campusItem.text)
}
}
} else {
this.$set(this.formData, "campus", "")
this.$set(this.formData, "campusName", "")
}
} }
}, },
toChinesNum(num){ toChinesNum(num){
@@ -425,7 +443,26 @@ layout("/layouts/platform_h5.html"){
noWan = "0" + noWan; noWan = "0" + noWan;
} }
return overWan ? getWan(overWan) + "万" + getWan(noWan) : getWan(num); return overWan ? getWan(overWan) + "万" + getWan(noWan) : getWan(num);
} },
onCampusColumns(o) {
this.$set(this.formData, "campusName", o.text); // 显示名称
this.$set(this.formData, "campus", o.value); // 字典值
this.showCampusPicker = false;
},
async initDictOptions() {
// 初始化校区字典数据
const campusData = await this.$businessTool.getDictOptions('USER_CAMPUS')
this.campusColumns = campusData.map(item => {
return {value: item.code, text: item.name}
})
// 初始化完成后,如果已经有用户数据,更新校区显示名称
if (this.formData.campus && this.campusColumns.length > 0) {
const campusItem = this.campusColumns.find(item => item.value === this.formData.campus)
if (campusItem) {
this.$set(this.formData, "campusName", campusItem.text)
}
}
}
}, },
computed: { computed: {
nationColumns(){ nationColumns(){
@@ -452,14 +489,9 @@ layout("/layouts/platform_h5.html"){
} }
return [] return []
}, },
campusColumns(){
if(this.dict && this.dict.type && this.dict.type.USER_CAMPUS){
return this.dict.type.USER_CAMPUS.map(v=>v.value)
}
return []
}
}, },
created() { created() {
this.initDictOptions();
this.init() this.init()
}, },
}) })