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