commit
This commit is contained in:
+17
-16
@@ -113,22 +113,23 @@ public class UnionReimburseApplyController {
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
// @At
|
||||
// @ApiOperation("重新提交申请")
|
||||
// @Aop(TransAop.READ_COMMITTED)
|
||||
// @SaCheckPermission(value = {"unionReimburse.apply", "h5.unionReimburse.apply"}, mode = SaMode.OR)
|
||||
// public Result submitAgain(@Param("data") UnionReimburse unionReimburse, @Param("taskId") Long taskId) {
|
||||
// if (StrUtil.isBlank(unionReimburse.getId())) unionReimburse.setCreateTime(new Date());
|
||||
//
|
||||
// dao.insertOrUpdate(unionReimburse);
|
||||
//
|
||||
// Dict dict = Dict.create();
|
||||
// dict.set(FlowConst.PROCESS_TASK_ID_KEY, taskId);
|
||||
// dict.set(FlowConst.SUBMIT_TYPE, ProcessSubmitTypeEnum.RE_APPLY.getCode());
|
||||
// dict.set("userId", unionReimburse.getCondolenceUserId());
|
||||
// flowCommonService.executeTask(dict);
|
||||
// return Result.success();
|
||||
// }
|
||||
@At
|
||||
@ApiOperation("重新提交申请")
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
@SaCheckPermission(value = {"unionReimburse.apply", "h5.unionReimburse.apply"}, mode = SaMode.OR)
|
||||
public Result submitAgain(@Param("data") UnionReimburse unionReimburse, @Param("taskId") Long taskId) {
|
||||
// 退回重提也必须复用当前提交保存逻辑,避免绕过发票明细落库和提交校验。
|
||||
Result result = unionReimburseService.saveApply(unionReimburse, 2);
|
||||
if (result.getCode() != 0) {
|
||||
return result;
|
||||
}
|
||||
|
||||
Dict dict = Dict.create();
|
||||
dict.set(FlowConst.PROCESS_TASK_ID_KEY, taskId);
|
||||
dict.set(FlowConst.SUBMIT_TYPE, ProcessSubmitTypeEnum.RE_APPLY.getCode());
|
||||
flowCommonService.executeTask(dict);
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
@At
|
||||
@SaCheckLogin
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
|
||||
<script>
|
||||
module.exports = {
|
||||
name: "h5",
|
||||
name: "h5-signature",
|
||||
components: {
|
||||
signature: httpVueLoader("/components/plugins/sysSignature/index.vue?v=" + new Date().getTime())
|
||||
},
|
||||
|
||||
+96
-15
@@ -69,6 +69,50 @@ layout("/layouts/platform_h5.html"){
|
||||
@confirm="onReimburseProjectConfirm" show-toolbar></van-picker>
|
||||
</van-popup>
|
||||
|
||||
<!-- 经费来源 -->
|
||||
<van-field
|
||||
v-model="formData.reimburseFundSourceName"
|
||||
name="reimburseFundSourceName"
|
||||
label="经费来源"
|
||||
readonly
|
||||
placeholder="请选择经费来源"
|
||||
@click="showReimburseFundSourcePicker = true"
|
||||
:rules="[{ required: true, message: '请选择经费来源' }]"
|
||||
clickable
|
||||
required
|
||||
is-link
|
||||
></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-if="formData.reimburseFundSource === 'UNION_REIMBURSE_FUND_SOURCE_3'"
|
||||
v-model="formData.clubName"
|
||||
name="clubName"
|
||||
label="所属社团"
|
||||
readonly
|
||||
placeholder="请选择所属社团"
|
||||
@click="showClubPicker = true"
|
||||
:rules="[{ required: true, message: '请选择所属社团' }]"
|
||||
clickable
|
||||
required
|
||||
is-link
|
||||
></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"
|
||||
label="余额"
|
||||
v-model="formData.fundBalance"
|
||||
readonly
|
||||
placeholder="自动查询"
|
||||
></van-field>
|
||||
|
||||
<!-- 联系方式 -->
|
||||
<van-field label="联系方式" v-model="formData.mobile" required placeholder="请输入联系方式"
|
||||
:rules="[{ required: true, message: '请输入联系方式' }]"></van-field>
|
||||
@@ -128,9 +172,8 @@ layout("/layouts/platform_h5.html"){
|
||||
required>
|
||||
</van-field>
|
||||
|
||||
</template>
|
||||
<!-- 活动相关字段 (当报销项目不为慰问时显示) -->
|
||||
<template>
|
||||
<template v-if="formData.reimburseProject !== 'UNION_REIMBURSE_PROJECT_1'">
|
||||
<van-field label="活动名称"
|
||||
v-model="formData.activityName"
|
||||
placeholder="请输入活动名称"
|
||||
@@ -455,6 +498,19 @@ layout("/layouts/platform_h5.html"){
|
||||
onReimburseFundSourceConfirm(o) {
|
||||
this.$set(this.formData, "reimburseFundSourceName", o.text) // 显示名称
|
||||
this.$set(this.formData, "reimburseFundSource", o.value) // 字典值
|
||||
if (o.value !== "UNION_REIMBURSE_FUND_SOURCE_3") {
|
||||
this.$set(this.formData, "clubId", "")
|
||||
this.$set(this.formData, "clubName", "")
|
||||
this.queryFundBalance()
|
||||
} else if (this.clubColumns.length === 1) {
|
||||
this.$set(this.formData, "clubId", this.clubColumns[0].value)
|
||||
this.$set(this.formData, "clubName", this.clubColumns[0].text)
|
||||
this.queryFundBalance()
|
||||
} else {
|
||||
this.$set(this.formData, "clubId", "")
|
||||
this.$set(this.formData, "clubName", "")
|
||||
this.$set(this.formData, "fundBalance", "")
|
||||
}
|
||||
this.showReimburseFundSourcePicker = false
|
||||
},
|
||||
onClubConfirm(o) {
|
||||
@@ -586,6 +642,11 @@ layout("/layouts/platform_h5.html"){
|
||||
this.clubColumns = res.map(item => {
|
||||
return { text: item.clubName, value: item.id }
|
||||
})
|
||||
if (res && res.length === 1 && this.formData.reimburseFundSource === "UNION_REIMBURSE_FUND_SOURCE_3" && !this.formData.clubId) {
|
||||
this.$set(this.formData, "clubId", res[0].id)
|
||||
this.$set(this.formData, "clubName", res[0].clubName)
|
||||
this.queryFundBalance()
|
||||
}
|
||||
})
|
||||
},
|
||||
// 查询经费余额
|
||||
@@ -654,33 +715,53 @@ layout("/layouts/platform_h5.html"){
|
||||
},
|
||||
// 添加经费来源区分
|
||||
async filterReimburseFundSources() {
|
||||
// 如果是系统管理员或校工会管理员,可以使用所有经费来源
|
||||
if (this.$auth.hasRoleOr(["SYSADMIN", "SCHOOL_UNION_ADMIN"])) {
|
||||
// 不需要过滤,使用所有选项
|
||||
return
|
||||
}
|
||||
|
||||
const filteredSources = []
|
||||
|
||||
// 根据用户角色过滤经费来源选项
|
||||
if (this.$auth.hasRoleOr(["SCHOOL_OUTLAY_ADMIN", "SCHOOL_UNION_ADMIN"])) {
|
||||
this.reimburseFundSourceColumns.map(item => {
|
||||
// 原角色过滤逻辑保留如下,手机端现统一改为按权限控制,与 PC 端保持一致
|
||||
// if (this.$auth.hasRoleOr(["SYSADMIN", "SCHOOL_UNION_ADMIN"])) {
|
||||
// return
|
||||
// }
|
||||
// if (this.$auth.hasRoleOr(["SCHOOL_OUTLAY_ADMIN", "SCHOOL_UNION_ADMIN"])) {
|
||||
// this.reimburseFundSourceColumns.map(item => {
|
||||
// if (item.value === "UNION_REIMBURSE_FUND_SOURCE_1") {
|
||||
// filteredSources.push(item)
|
||||
// }
|
||||
// })
|
||||
// }
|
||||
// if (this.$auth.hasRoleOr(["BRANCH_UNION_CHAIRMAN", "BRANCH_UNION_ADMIN"])) {
|
||||
// this.reimburseFundSourceColumns.map(item => {
|
||||
// if (item.value === "UNION_REIMBURSE_FUND_SOURCE_2") {
|
||||
// filteredSources.push(item)
|
||||
// }
|
||||
// })
|
||||
// }
|
||||
// if (this.$auth.hasRoleOr(["CLUB_MANAGER", "CLUB_PRESIDENT"])) {
|
||||
// this.reimburseFundSourceColumns.map(item => {
|
||||
// if (item.value === "UNION_REIMBURSE_FUND_SOURCE_3") {
|
||||
// filteredSources.push(item)
|
||||
// }
|
||||
// })
|
||||
// }
|
||||
|
||||
// 手机端经费来源权限必须使用 h5. 前缀,和 PC 端经费来源项保持一一对应
|
||||
if (this.$auth.hasPermission("h5.unionReimburse.xgh")) {
|
||||
this.reimburseFundSourceColumns.forEach(item => {
|
||||
if (item.value === "UNION_REIMBURSE_FUND_SOURCE_1") {
|
||||
filteredSources.push(item)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
if (this.$auth.hasRoleOr(["BRANCH_UNION_CHAIRMAN", "BRANCH_UNION_ADMIN"])) {
|
||||
this.reimburseFundSourceColumns.map(item => {
|
||||
if (this.$auth.hasPermission("h5.unionReimburse.fgh")) {
|
||||
this.reimburseFundSourceColumns.forEach(item => {
|
||||
if (item.value === "UNION_REIMBURSE_FUND_SOURCE_2") {
|
||||
filteredSources.push(item)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
if (this.$auth.hasRoleOr(["CLUB_MANAGER", "CLUB_PRESIDENT"])) {
|
||||
this.reimburseFundSourceColumns.map(item => {
|
||||
if (this.$auth.hasPermission("h5.unionReimburse.club")) {
|
||||
this.reimburseFundSourceColumns.forEach(item => {
|
||||
if (item.value === "UNION_REIMBURSE_FUND_SOURCE_3") {
|
||||
filteredSources.push(item)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user