Merge remote-tracking branch 'origin/main'

This commit is contained in:
@jyuhsin
2025-12-09 17:14:53 +08:00
10 changed files with 1509 additions and 675 deletions
@@ -143,6 +143,7 @@ public class ActivityReimbursementApplyController {
args.set(FlowConst.SUBMIT_TYPE, ProcessSubmitTypeEnum.APPLY.getCode()); args.set(FlowConst.SUBMIT_TYPE, ProcessSubmitTypeEnum.APPLY.getCode());
args.set(FlowConst.FORM_DATA, activityReimbursementInfo); args.set(FlowConst.FORM_DATA, activityReimbursementInfo);
args.set("outlayManageSource", activityReimbursementInfo.getOutlayManageSource()); args.set("outlayManageSource", activityReimbursementInfo.getOutlayManageSource());
args.set("actualMoney", activityReimbursementInfo.getActualMoney());
ProcessInstance instance = flowEngine.startProcessInstanceByKey("HDBX", activityReimbursementInfo.getId(), SecurityUtil.getUserId(), args); ProcessInstance instance = flowEngine.startProcessInstanceByKey("HDBX", activityReimbursementInfo.getId(), SecurityUtil.getUserId(), args);
// 自动完成第一个申请任务 // 自动完成第一个申请任务
@@ -0,0 +1,123 @@
package com.budwk.app.zhgh.activity.declarereimbursement.reimbursement.controller;
import cn.dev33.satoken.annotation.SaCheckPermission;
import cn.hutool.core.util.StrUtil;
import com.budwk.app.base.page.Pagination;
import com.budwk.app.base.result.Result;
import com.budwk.app.base.utils.PageUtil;
import com.budwk.app.flow.enums.ProcessTaskStateEnum;
import com.budwk.app.web.commons.auth.utils.SecurityUtil;
import com.budwk.app.zhgh.activity.declarereimbursement.reimbursement.service.ActivityReimbursementService;
import com.budwk.app.zhgh.activity.declarereimbursement.vo.CommonPageParam;
import io.swagger.annotations.ApiOperation;
import org.nutz.dao.Cnd;
import org.nutz.dao.Sqls;
import org.nutz.dao.sql.Sql;
import org.nutz.ioc.loader.annotation.Inject;
import org.nutz.ioc.loader.annotation.IocBean;
import org.nutz.lang.util.NutMap;
import org.nutz.mvc.annotation.At;
import org.nutz.mvc.annotation.Ok;
import java.util.List;
/**
* @author zhf
* @date 2025/12/9 15:06
* @description 校工会副主席审核
*/
@IocBean
@Ok("json")
@ApiOperation("活动报销,校工会副主席审核")
@At("/platform/activityReimbursement/deputySchoolUnion")
public class ActivityReimbursementDeputySchoolUnionController {
@Inject
private ActivityReimbursementService activityReimbursementService;
@At("")
@SaCheckPermission("activityReimbursement.deputySchoolUnion")
@Ok("beetl:/platform/zhgh/activity/declarereimbursement/reimbursement/deputySchoolUnion/index.html")
public void index() {
}
@At
@ApiOperation("活动报销,校工会副主席审核")
@SaCheckPermission("activityReimbursement.deputySchoolUnion")
public Result pageData(CommonPageParam pageParam) {
Sql sql = Sqls.create("""
SELECT
info.id,
info.userName,
info.mobile,
info.loginName,
info.applyTime,
info.activityName,
info.activityAddress,
info.planStartTime,
info.planEndTime,
info.declareUnitName,
info.activityType,
info.activityContent,
info.activityNumber,
info.activityReimbursementMode,
info.outlayManageSource,
info.deductionBudgetId,
info.actualMoney,
outlay.budgetReimburseType,
ins.id AS instanceId,
ins.businessNo,
ins.state instanceState,
ins.variable instanceVariable,
ins.processDefineId instanceProcessDefineId,
t.id taskId,
t.taskName AS taskKey,
t.displayName taskName,
t.taskType,
t.performType taskPerformType,
t.taskState,
t.finishTime,
t.taskParentId,
t.variable taskVariable,
IFNULL(GROUP_CONCAT(DISTINCT nt.displayName),'结束') curTaskName,
IF(rt.id IS NOT NULL, 1, 0) AS canRevoke
FROM
wf_process_task t
LEFT JOIN wf_process_instance ins ON ins.id = t.processInstanceId
LEFT JOIN activity_reimbursement_info info ON info.id = ins.businessNo
LEFT JOIN activity_budget outlay on info.deductionBudgetId=outlay.id
LEFT JOIN wf_process_task_actor ta ON ta.processTaskId = t.id
LEFT JOIN wf_process_task nt ON nt.processInstanceId = ins.id AND nt.taskState = 10
LEFT JOIN wf_process_task rt ON rt.processInstanceId = ins.id AND rt.taskParentId = t.id AND rt.taskState = 10
$condition
""");
Cnd cnd = Cnd.NEW();
pageParam.buildSearch(cnd, "info.");
cnd.and("t.taskName", "=", "f9b8379f-f348-4985-ba58-b6ba28deb9af");
cnd.and("ta.actorId", "in", List.of(SecurityUtil.getUserId()));
cnd.andEX("outlay.budgetReimburseType", "=" , pageParam.getBudgetReimburseType());
cnd.andEX("info.outlayManageSource", "=", pageParam.getOutlayManageSource());
cnd.andEX("info.activityReimbursementMode", "=", pageParam.getActivityReimbursementMode());
if (pageParam.getAudit()) {
cnd.and("t.taskState", "in", List.of(ProcessTaskStateEnum.FINISHED.getCode(), ProcessTaskStateEnum.WITHDRAW.getCode(), ProcessTaskStateEnum.INTERRUPT.getCode()));
} else {
cnd.and("t.taskState", "=", ProcessTaskStateEnum.DOING.getCode());
}
if (StrUtil.isAllBlank(pageParam.getPageOrderName(), pageParam.getPageOrderBy())) {
cnd.desc("info.applyTime");
} else {
cnd.orderBy("info." + pageParam.getPageOrderName(), PageUtil.getOrder(pageParam.getPageOrderBy()));
}
cnd.groupBy("t.id");
sql.setCondition(cnd);
Pagination<NutMap> pagination = activityReimbursementService.listPageMap(pageParam.getPageNumber(), pageParam.getPageSize(), sql);
return Result.success().addData(pagination);
}
}
@@ -0,0 +1,121 @@
package com.budwk.app.zhgh.activity.declarereimbursement.reimbursement.controller;
import cn.dev33.satoken.annotation.SaCheckPermission;
import cn.hutool.core.util.StrUtil;
import com.budwk.app.base.page.Pagination;
import com.budwk.app.base.result.Result;
import com.budwk.app.base.utils.PageUtil;
import com.budwk.app.flow.enums.ProcessTaskStateEnum;
import com.budwk.app.web.commons.auth.utils.SecurityUtil;
import com.budwk.app.zhgh.activity.declarereimbursement.reimbursement.service.ActivityReimbursementService;
import com.budwk.app.zhgh.activity.declarereimbursement.vo.CommonPageParam;
import io.swagger.annotations.ApiOperation;
import org.nutz.dao.Cnd;
import org.nutz.dao.Sqls;
import org.nutz.dao.sql.Sql;
import org.nutz.ioc.loader.annotation.Inject;
import org.nutz.ioc.loader.annotation.IocBean;
import org.nutz.lang.util.NutMap;
import org.nutz.mvc.annotation.At;
import org.nutz.mvc.annotation.Ok;
import java.util.List;
/**
* @author zhf
* @date 2025/12/9 14:27
* @description 校工会财务
*/
@IocBean
@Ok("json")
@ApiOperation("活动报销,校工会财务审核")
@At("/platform/activityReimbursement/schoolFinance")
public class ActivityReimbursementSchoolFinanceController {
@Inject
private ActivityReimbursementService activityReimbursementService;
@At("")
@SaCheckPermission("activityReimbursement.schoolFinance")
@Ok("beetl:/platform/zhgh/activity/declarereimbursement/reimbursement/schoolFinance/index.html")
public void index() {
}
@At
@ApiOperation("活动报销,校工会财务审核")
@SaCheckPermission("activityReimbursement.schoolFinance")
public Result pageData(CommonPageParam pageParam) {
Sql sql = Sqls.create("""
SELECT
info.id,
info.userName,
info.mobile,
info.loginName,
info.applyTime,
info.activityName,
info.activityAddress,
info.planStartTime,
info.planEndTime,
info.declareUnitName,
info.activityType,
info.activityContent,
info.activityNumber,
info.activityReimbursementMode,
info.outlayManageSource,
info.deductionBudgetId,
info.actualMoney,
outlay.budgetReimburseType,
ins.id AS instanceId,
ins.businessNo,
ins.state instanceState,
ins.variable instanceVariable,
ins.processDefineId instanceProcessDefineId,
t.id taskId,
t.taskName AS taskKey,
t.displayName taskName,
t.taskType,
t.performType taskPerformType,
t.taskState,
t.finishTime,
t.taskParentId,
t.variable taskVariable,
IFNULL(GROUP_CONCAT(DISTINCT nt.displayName),'结束') curTaskName,
IF(rt.id IS NOT NULL, 1, 0) AS canRevoke
FROM
wf_process_task t
LEFT JOIN wf_process_instance ins ON ins.id = t.processInstanceId
LEFT JOIN activity_reimbursement_info info ON info.id = ins.businessNo
LEFT JOIN activity_budget outlay on info.deductionBudgetId=outlay.id
LEFT JOIN wf_process_task_actor ta ON ta.processTaskId = t.id
LEFT JOIN wf_process_task nt ON nt.processInstanceId = ins.id AND nt.taskState = 10
LEFT JOIN wf_process_task rt ON rt.processInstanceId = ins.id AND rt.taskParentId = t.id AND rt.taskState = 10
$condition
""");
Cnd cnd = Cnd.NEW();
pageParam.buildSearch(cnd, "info.");
cnd.and("t.taskName", "=", "ba496ac7-abb3-4e6d-8c8e-212863a0d6ee");
cnd.and("ta.actorId", "in", List.of(SecurityUtil.getUserId()));
cnd.andEX("outlay.budgetReimburseType", "=" , pageParam.getBudgetReimburseType());
cnd.andEX("info.outlayManageSource", "=", pageParam.getOutlayManageSource());
cnd.andEX("info.activityReimbursementMode", "=", pageParam.getActivityReimbursementMode());
if (pageParam.getAudit()) {
cnd.and("t.taskState", "in", List.of(ProcessTaskStateEnum.FINISHED.getCode(), ProcessTaskStateEnum.WITHDRAW.getCode(), ProcessTaskStateEnum.INTERRUPT.getCode()));
} else {
cnd.and("t.taskState", "=", ProcessTaskStateEnum.DOING.getCode());
}
if (StrUtil.isAllBlank(pageParam.getPageOrderName(), pageParam.getPageOrderBy())) {
cnd.desc("info.applyTime");
} else {
cnd.orderBy("info." + pageParam.getPageOrderName(), PageUtil.getOrder(pageParam.getPageOrderBy()));
}
cnd.groupBy("t.id");
sql.setCondition(cnd);
Pagination<NutMap> pagination = activityReimbursementService.listPageMap(pageParam.getPageNumber(), pageParam.getPageSize(), sql);
return Result.success().addData(pagination);
}
}
@@ -23,6 +23,8 @@ import org.nutz.ioc.loader.annotation.Inject;
import org.nutz.ioc.loader.annotation.IocBean; import org.nutz.ioc.loader.annotation.IocBean;
import org.nutz.json.Json; import org.nutz.json.Json;
import java.util.Objects;
/** /**
* @author zhf * @author zhf
* @date 2025/12/4 18:06 * @date 2025/12/4 18:06
@@ -55,7 +57,9 @@ public class ActivityReimbursementSchoolUnionServiceImpl extends BaseServiceImpl
detail.setActivityTime(String.valueOf(info.getStartTime())); detail.setActivityTime(String.valueOf(info.getStartTime()));
// 更新校工会经费表 // 更新校工会经费表
if (info.getOutlayManageSource().equals("ACTIVITY_BUDGET_TYPE_ONE")) { if (info.getOutlayManageSource().equals("ACTIVITY_BUDGET_TYPE_ONE")) {
detail.setActivityTime(String.valueOf(info.getApplyTime())); if (Objects.equals(info.getActivityReimbursementMode(),"daily")){
detail.setActivityTime(String.valueOf(info.getApplyTime()));
}
OutlayManageSchool school = dao().fetch(OutlayManageSchool.class, Cnd.where("year", "=", DateUtil.thisYear())); OutlayManageSchool school = dao().fetch(OutlayManageSchool.class, Cnd.where("year", "=", DateUtil.thisYear()));
if (ObjectUtil.isEmpty(school)) { if (ObjectUtil.isEmpty(school)) {
throw new BaseException("该年份没有设置金额!"); throw new BaseException("该年份没有设置金额!");
@@ -70,6 +74,9 @@ public class ActivityReimbursementSchoolUnionServiceImpl extends BaseServiceImpl
detail.setOutlayManageId(school.getId()); detail.setOutlayManageId(school.getId());
dao().insert(detail); dao().insert(detail);
} else if (info.getOutlayManageSource().equals("ACTIVITY_BUDGET_TYPE_TWO")) { } else if (info.getOutlayManageSource().equals("ACTIVITY_BUDGET_TYPE_TWO")) {
if (Objects.equals(info.getActivityReimbursementMode(),"daily")){
detail.setActivityTime(String.valueOf(info.getApplyTime()));
}
ActivityBudget budget = dao().fetch(ActivityBudget.class, Cnd.where("id", "=", info.getDeductionBudgetId())); ActivityBudget budget = dao().fetch(ActivityBudget.class, Cnd.where("id", "=", info.getDeductionBudgetId()));
if (ObjectUtil.isNotEmpty(budget)&&budget.getIsSchoolBudget()){ if (ObjectUtil.isNotEmpty(budget)&&budget.getIsSchoolBudget()){
@@ -88,6 +95,9 @@ public class ActivityReimbursementSchoolUnionServiceImpl extends BaseServiceImpl
detail.setOutlayManageId(school.getId()); detail.setOutlayManageId(school.getId());
dao().insert(detail); dao().insert(detail);
}else{ }else{
if (Objects.equals(info.getActivityReimbursementMode(),"daily")){
detail.setActivityTime(String.valueOf(info.getApplyTime()));
}
// 更新分工会活动经费表 // 更新分工会活动经费表
OutlayManageUnion manageUnion = dao().fetch(OutlayManageUnion.class, OutlayManageUnion manageUnion = dao().fetch(OutlayManageUnion.class,
Cnd.where("year", "=", DateUtil.thisYear()) Cnd.where("year", "=", DateUtil.thisYear())
@@ -106,6 +116,9 @@ public class ActivityReimbursementSchoolUnionServiceImpl extends BaseServiceImpl
dao().insert(detail); dao().insert(detail);
} }
}else if (info.getOutlayManageSource().equals("ACTIVITY_BUDGET_TYPE_THREE")){ }else if (info.getOutlayManageSource().equals("ACTIVITY_BUDGET_TYPE_THREE")){
if (Objects.equals(info.getActivityReimbursementMode(),"daily")){
detail.setActivityTime(String.valueOf(info.getApplyTime()));
}
// 更新分工会活动经费表 // 更新分工会活动经费表
OutlayManageClub manageClub = dao().fetch(OutlayManageClub.class, OutlayManageClub manageClub = dao().fetch(OutlayManageClub.class,
Cnd.where("year", "=", DateUtil.thisYear()) Cnd.where("year", "=", DateUtil.thisYear())
@@ -2,231 +2,243 @@
layout("/layouts/platform.html"){ layout("/layouts/platform.html"){
#--> #-->
<div id="app"> <div id="app">
<guava ref="guava"> <guava ref="guava">
<el-card shadow="never"> <el-card shadow="never">
<search @search="doSearch"> <search @search="doSearch">
<search-item label="年度"> <search-item label="年度">
<el-date-picker <el-date-picker
placeholder="请选择年度" placeholder="请选择年度"
type="year" type="year"
style="width: 100%" style="width: 100%"
v-model="pageForm.year" v-model="pageForm.year"
value-format="yyyy"> value-format="yyyy">
</el-date-picker> </el-date-picker>
</search-item> </search-item>
<search-item label="申请人"> <search-item label="申请人">
<el-input placeholder="请输入申请人工号或姓名" clearable v-model="pageForm.searchKeyword"></el-input> <el-input placeholder="请输入申请人工号或姓名" clearable
</search-item> v-model="pageForm.searchKeyword"></el-input>
<search-item label="报销模式"> </search-item>
<el-select clearable filterable placeholder="请选择报销模式" <search-item label="报销模式">
style="width: 100%;" v-model="pageForm.activityReimbursementMode"> <el-select clearable filterable placeholder="请选择报销模式"
<el-option label="活动报销" value="activity"></el-option> style="width: 100%;" v-model="pageForm.activityReimbursementMode">
<el-option label="日常报销" value="daily"></el-option> <el-option label="活动报销" value="activity"></el-option>
</el-select> <el-option label="日常报销" value="daily"></el-option>
</search-item> </el-select>
<search-item label="经费类型"> </search-item>
<dict-select code="ACTIVITY_BUDGET_TYPE" v-model="pageForm.outlayManageSource" placeholder="请选择经费类型"></dict-select> <search-item label="经费类型">
</search-item> <dict-select code="ACTIVITY_BUDGET_TYPE" v-model="pageForm.outlayManageSource"
<search-item label="预算条目"> placeholder="请选择经费类型"></dict-select>
<dict-select code="ACTIVITY_BUDGET_REIMBURSE_TYPE" v-model="pageForm.budgetReimburseType" placeholder="请选择预算条目"></dict-select> </search-item>
</search-item> <search-item label="预算条目">
<dict-select code="ACTIVITY_BUDGET_REIMBURSE_TYPE" v-model="pageForm.budgetReimburseType"
placeholder="请选择预算条目"></dict-select>
</search-item>
<search-item label="所属协会"> <search-item label="所属协会">
<el-select clearable filterable placeholder="所属协会" <el-select clearable filterable placeholder="所属协会"
style="width: 100%;" v-model="pageForm.clubId"> style="width: 100%;" v-model="pageForm.clubId">
<el-option :label="item.clubName" :value="item.id" <el-option :label="item.clubName" :value="item.id"
v-for="item in clubs"></el-option> v-for="item in clubs"></el-option>
</el-select> </el-select>
</search-item> </search-item>
</search> </search>
</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="审批列表">
<el-radio-group @change="doSearch" class="mr5" size="small" v-model="pageForm.audit"> <el-radio-group @change="doSearch" class="mr5" size="small" v-model="pageForm.audit">
<el-radio-button label="true">已审核</el-radio-button> <el-radio-button label="true">已审核</el-radio-button>
<el-radio-button label="false">未审核</el-radio-button> <el-radio-button label="false">未审核</el-radio-button>
</el-radio-group> </el-radio-group>
</table-tool> </table-tool>
<el-table :data="tableData" :size="tableSize" @sort-change="pageOrder" <el-table :data="tableData" :size="tableSize" @sort-change="pageOrder"
ref="table" row-key="id" style="width: 100%"> ref="table" row-key="id" style="width: 100%">
<el-table-column :index="indexMethod" header-align="center" label="序号" <el-table-column :index="indexMethod" header-align="center" label="序号"
type="index" width="60px"></el-table-column> type="index" width="60px"></el-table-column>
<el-table-column <el-table-column
:label="column.label" :label="column.label"
:prop="column.prop" :prop="column.prop"
:sortable="column.sortable" :sortable="column.sortable"
:width="column.width" :width="column.width"
header-align="center" header-align="center"
min-width="100px" min-width="100px"
show-overflow-tooltip show-overflow-tooltip
v-for="column in tableColumns" v-for="column in tableColumns"
> >
<template scope="{row}" v-if="column.prop=='loginName'"> <template scope="{row}" v-if="column.prop=='loginName'">
<span>{{row.userName + '(' + row.loginName + ')' }}</span> <span>{{row.userName + '(' + row.loginName + ')' }}</span>
</template> </template>
<template scope="{row}" v-else-if="column.prop=='outlayManageSource'"> <template scope="{row}" v-else-if="column.prop=='outlayManageSource'">
<dict-tag :options="dict.type.ACTIVITY_BUDGET_TYPE" :value="row.outlayManageSource"></dict-tag> <dict-tag :options="dict.type.ACTIVITY_BUDGET_TYPE" :value="row.outlayManageSource"></dict-tag>
</template> </template>
<template scope="{row}" v-else-if="column.prop=='budgetReimburseType'"> <template scope="{row}" v-else-if="column.prop=='budgetReimburseType'">
<dict-tag :options="dict.type.ACTIVITY_BUDGET_REIMBURSE_TYPE" :value="row.budgetReimburseType"></dict-tag> <dict-tag :options="dict.type.ACTIVITY_BUDGET_REIMBURSE_TYPE"
</template> :value="row.budgetReimburseType"></dict-tag>
<template scope="{row}" v-else-if="column.prop=='activityReimbursementMode'"> </template>
<span>{{ row.activityReimbursementMode==='activity'?'活动报销' : '日常报销' }}</span> <template scope="{row}" v-else-if="column.prop=='activityReimbursementMode'">
</template> <span>{{ row.activityReimbursementMode==='activity'?'活动报销' : '日常报销' }}</span>
<template scope="{row}" v-else-if="column.prop=='instanceState'"> </template>
<enum-tag :value="row.instanceState" name="ProcessInstanceStateEnum" label_key="message" <template scope="{row}" v-else-if="column.prop=='instanceState'">
size="small"></enum-tag> <enum-tag :value="row.instanceState" name="ProcessInstanceStateEnum" label_key="message"
</template> size="small"></enum-tag>
</el-table-column> </template>
<el-table-column label="操作" fixed="right" width="200px"> </el-table-column>
<template slot-scope="{row}"> <el-table-column label="操作" fixed="right" width="200px">
<el-button @click="openView(row)" size="mini" type="primary">查看</el-button> <template slot-scope="{row}">
<el-button v-if="row.taskState === 10" @click="openAudit(row)" size="mini" type="primary">审核 <el-button @click="openView(row)" size="mini" type="primary">查看</el-button>
</el-button> <el-button v-if="row.taskState === 10" @click="openAudit(row)" size="mini" type="primary">审核
<el-button v-if="row.canRevoke" @click="onRevoke(row)" size="mini" type="danger">撤回 </el-button>
</el-button> <el-button v-if="row.canRevoke" @click="onRevoke(row)" size="mini" type="danger">撤回
</template> </el-button>
</el-table-column> </template>
</el-table> </el-table-column>
<!--#include("/layouts/pagination.html"){}#--> </el-table>
</el-card> <!--#include("/layouts/pagination.html"){}#-->
</el-card>
<template #edit> <template #edit>
<info ref="infoRef"> <info ref="infoRef">
<div v-if="showApprovalForm"> <div v-if="showApprovalForm">
<div class="process-title"> <div class="process-title">
{{formData.taskName}} {{formData.taskName}}
</div> </div>
<el-form :model="formData" ref="formRef" :rules="formRules" label-width="0" label-suffix="" <el-form :model="formData" ref="formRef" :rules="formRules" label-width="0" label-suffix=""
class="flow-task-form"> class="flow-task-form">
<el-form-item label="审批意见" prop="tf_opinion" <el-form-item label="审批意见" prop="tf_opinion"
:rules="[{required:true,message:'必填',trigger:['change','blur']}]"> :rules="[{required:true,message:'必填',trigger:['change','blur']}]">
<user-opinion-textarea v-model="formData.tf_opinion"></user-opinion-textarea> <user-opinion-textarea v-model="formData.tf_opinion"></user-opinion-textarea>
</el-form-item> </el-form-item>
</el-form> <el-form-item label="电子签名" prop="tf_userSign"
<el-row type="flex" justify="end"> :rules="[{required:true,message:'必填',trigger:['change','blur']}]">
<el-button @click="$refs.guava.index()" size="small">取消</el-button> <pc-signature v-model="formData.tf_userSign"></pc-signature>
<el-button @click="handleTaskAction(6)" size="small" type="info">退回到发起人</el-button> </el-form-item>
<el-button @click="handleTaskAction(2)" size="small" type="danger">拒绝申请</el-button> </el-form>
<el-button @click="handleTaskAction(1)" size="small" type="primary">同意申请</el-button> <el-row type="flex" justify="end">
</el-row> <el-button @click="$refs.guava.index()" size="small">取消</el-button>
</div> <el-button @click="handleTaskAction(6)" size="small" type="info">退回到发起人</el-button>
</info> <el-button @click="handleTaskAction(2)" size="small" type="danger">拒绝申请</el-button>
</template> <el-button @click="handleTaskAction(1)" size="small" type="primary">同意申请</el-button>
</guava> </el-row>
</div>
</info>
</template>
</guava>
</div> </div>
<script> <script>
<!--#include("../common/info.js"){}#--> <!--#include("../common/info.js"){}#-->
new Vue({ new Vue({
el: "#app", el: "#app",
mixins: [initTableMixins], mixins: [initTableMixins],
store, store,
dicts: ["ACTIVITY_BUDGET_TYPE","ACTIVITY_BUDGET_REIMBURSE_TYPE"], dicts: ["ACTIVITY_BUDGET_TYPE", "ACTIVITY_BUDGET_REIMBURSE_TYPE"],
data() { data() {
return { return {
pageForm: { pageForm: {
year: this.$moment().format("YYYY") year: this.$moment().format("YYYY")
}, },
tableColumns: [ tableColumns: [
{prop: "loginName", label: "申报人", sortable: true}, {prop: "loginName", label: "申报人", sortable: true},
{prop: "activityName", label: "项目名称"}, {prop: "activityName", label: "项目名称"},
{prop: "activityReimbursementMode", label: "报销模式"}, {prop: "activityReimbursementMode", label: "报销模式"},
{prop: "outlayManageSource", label: "经费类型"}, {prop: "outlayManageSource", label: "经费类型"},
{prop: "budgetReimburseType", label: "预算条目"}, {prop: "budgetReimburseType", label: "预算条目"},
{prop: "actualMoney", label: "报销金额(元)"}, {prop: "actualMoney", label: "报销金额(元)"},
{prop: "declareUnitName", label: "申报单位/协会", sortable: true}, {prop: "declareUnitName", label: "申报单位/协会", sortable: true},
{prop: "applyTime", label: "申报时间", sortable: true}, {prop: "applyTime", label: "申报时间", sortable: true},
{prop: "taskName", label: "当前节点"}, {prop: "taskName", label: "当前节点"},
{prop: "instanceState", label: "流程状态"} {prop: "instanceState", label: "流程状态"}
], ],
activityDeclareReimbursementList: [], activityDeclareReimbursementList: [],
unions: [], unions: [],
units: [], units: [],
clubs: [], clubs: [],
// 审核相关 // 审核相关
formData: {}, formData: {},
showApprovalForm: false showApprovalForm: false
} }
}, },
components: { components: {
'info': INFO, 'info': INFO,
}, },
methods: { methods: {
openView(row){ openView(row) {
this.$refs.guava.edit(() => { this.$refs.guava.edit(() => {
this.showApprovalForm = false this.showApprovalForm = false
this.$refs.infoRef.onOpen(row) this.$refs.infoRef.onOpen(row)
}) })
}, },
openAudit(row) { openAudit(row) {
this.$refs.guava.edit(()=>{ this.$refs.guava.edit(() => {
this.showApprovalForm = true this.showApprovalForm = true
this.formData = { this.formData = {
processTaskId: row.taskId, processTaskId: row.taskId,
taskName: row.curTaskName taskName: row.curTaskName
} }
this.$refs.infoRef.onOpen(row) this.$refs.infoRef.onOpen(row)
}) })
}, },
handleTaskAction(val) { handleTaskAction(val) {
this.$confirm("您确定要提交吗?", "提示", { this.$refs.formRef.validate((valid) => {
confirmButtonText: "确定", if (valid) {
cancelButtonText: "取消", this.$confirm("您确定要提交吗?", "提示", {
type: "warning" confirmButtonText: "确定",
}).then(() => { cancelButtonText: "取消",
this.$axios.post("/flow/common/executeTask", { type: "warning"
data: JSON.stringify({ }).then(() => {
...this.formData, this.$axios.post("/flow/common/executeTask", {
submitType: val data: JSON.stringify({
}) ...this.formData,
}).then((res) => { submitType: val
if (res.code === 0) { })
this.$refs.guava.index() }).then((res) => {
this.$message.success(res.msg) if (res.code === 0) {
this.doSearch() this.$refs.guava.index()
} this.$message.success(res.msg)
}) this.doSearch()
}) }
}, })
})
}
})
},
onRevoke(row) { onRevoke(row) {
this.$confirm("您确定要撤回吗?", "提示", { this.$confirm("您确定要撤回吗?", "提示", {
confirmButtonText: "确定", confirmButtonText: "确定",
cancelButtonText: "取消", cancelButtonText: "取消",
type: "info" type: "info"
}).then(() => { }).then(() => {
this.$axios.post("/flow/common/revokeTask", {taskId: row.taskId}).then((res) => { this.$axios.post("/flow/common/revokeTask", {taskId: row.taskId}).then((res) => {
if (res.code === 0) { if (res.code === 0) {
this.$message.success(res.msg) this.$message.success(res.msg)
this.doSearch() this.doSearch()
} }
}) })
}) })
}, },
getActivityTypeName(type) { getActivityTypeName(type) {
const data = this.activityDeclareReimbursementList.find(item => item.name === type) const data = this.activityDeclareReimbursementList.find(item => item.name === type)
return data ? data.typeName : "" return data ? data.typeName : ""
}, },
}, },
async created() { async created() {
this.pageData() this.pageData()
if (this.$auth.hasRoleOr('SYSADMIN, SCHOOL_UNION_ADMIN')) { if (this.$auth.hasRoleOr('SYSADMIN, SCHOOL_UNION_ADMIN')) {
this.clubs = await this.$businessTool.listClub() this.clubs = await this.$businessTool.listClub()
} else { } else {
this.clubs = await this.$businessTool.listClub() this.clubs = await this.$businessTool.listClub()
} }
this.activityDeclareReimbursementList = await this.$businessTool.getEnumOptions("ActivityDeclareReimbursement") this.activityDeclareReimbursementList = await this.$businessTool.getEnumOptions("ActivityDeclareReimbursement")
} }
}) })
</script> </script>
<!--# <!--#
} }
@@ -119,6 +119,12 @@ const INFO = {
<el-descriptions-item label="办理意见" :span="3" v-if="!task.ext.isFirstTaskNode">{{ <el-descriptions-item label="办理意见" :span="3" v-if="!task.ext.isFirstTaskNode">{{
task.taskFormData.opinion }} task.taskFormData.opinion }}
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item label="签字" :span="3">
<el-image v-if="task.ext.tf_userSign"
:src="task.ext.tf_userSign"
class="signature-image"></el-image>
<span v-else>暂无</span>
</el-descriptions-item>
</el-descriptions> </el-descriptions>
</div> </div>
</template> </template>
@@ -0,0 +1,267 @@
<!--#
layout("/layouts/platform.html"){
#-->
<div id="app">
<guava ref="guava">
<el-card shadow="never">
<search @search="doSearch">
<search-item label="年度">
<el-date-picker
placeholder="请选择年度"
type="year"
style="width: 100%"
v-model="pageForm.year"
value-format="yyyy">
</el-date-picker>
</search-item>
<search-item label="申请人">
<el-input placeholder="请输入申请人工号或姓名" clearable
v-model="pageForm.searchKeyword"></el-input>
</search-item>
<search-item label="报销模式">
<el-select clearable filterable placeholder="请选择报销模式"
style="width: 100%;" v-model="pageForm.activityReimbursementMode">
<el-option label="活动报销" value="activity"></el-option>
<el-option label="日常报销" value="daily"></el-option>
</el-select>
</search-item>
<search-item label="经费类型">
<dict-select code="ACTIVITY_BUDGET_TYPE" v-model="pageForm.outlayManageSource"
placeholder="请选择经费类型"></dict-select>
</search-item>
<search-item label="预算条目">
<dict-select code="ACTIVITY_BUDGET_REIMBURSE_TYPE" v-model="pageForm.budgetReimburseType"
placeholder="请选择预算条目"></dict-select>
</search-item>
<template v-if="$auth.hasRoleOr('SYSADMIN, SCHOOL_UNION_ADMIN, BRANCH_UNION_ADMIN')">
<search-item label="所属工会">
<el-select @change="flushUnits" @clear="flushUnits" clearable
filterable
placeholder="请选择所属工会"
style="width: 100%;"
v-model="pageForm.unionId">
<el-option :label="item.name" :value="item.id"
v-for="item in unions"></el-option>
</el-select>
</search-item>
<search-item label="所属单位">
<el-select clearable filterable placeholder="请选择所属单位"
style="width: 100%;" v-model="pageForm.unitId">
<el-option :label="item.name" :value="item.id"
v-for="item in units"></el-option>
</el-select>
</search-item>
</template>
</search>
</el-card>
<el-card shadow="never" class="mt10">
<table-tool :app="this" label="审批列表">
<el-radio-group @change="doSearch" class="mr5" size="small" v-model="pageForm.audit">
<el-radio-button label="true">已审核</el-radio-button>
<el-radio-button label="false">未审核</el-radio-button>
</el-radio-group>
</table-tool>
<el-table :data="tableData" :size="tableSize" @sort-change="pageOrder"
ref="table" row-key="id" style="width: 100%">
<el-table-column :index="indexMethod" header-align="center" label="序号"
type="index" width="60px"></el-table-column>
<el-table-column
:label="column.label"
:prop="column.prop"
:sortable="column.sortable"
:width="column.width"
header-align="center"
min-width="100px"
show-overflow-tooltip
v-for="column in tableColumns"
>
<template scope="{row}" v-if="column.prop=='loginName'">
<span>{{row.userName + '(' + row.loginName + ')' }}</span>
</template>
<template scope="{row}" v-else-if="column.prop=='outlayManageSource'">
<dict-tag :options="dict.type.ACTIVITY_BUDGET_TYPE" :value="row.outlayManageSource"></dict-tag>
</template>
<template scope="{row}" v-else-if="column.prop=='budgetReimburseType'">
<dict-tag :options="dict.type.ACTIVITY_BUDGET_REIMBURSE_TYPE"
:value="row.budgetReimburseType"></dict-tag>
</template>
<template scope="{row}" v-else-if="column.prop=='activityReimbursementMode'">
<span>{{ row.activityReimbursementMode==='activity'?'活动报销' : '日常报销' }}</span>
</template>
<template scope="{row}" v-else-if="column.prop=='instanceState'">
<enum-tag :value="row.instanceState" name="ProcessInstanceStateEnum" label_key="message"
size="small"></enum-tag>
</template>
</el-table-column>
<el-table-column label="操作" fixed="right" width="200px">
<template slot-scope="{row}">
<el-button @click="openView(row)" size="mini" type="primary">查看</el-button>
<el-button v-if="row.taskState === 10" @click="openAudit(row)" size="mini" type="primary">审核
</el-button>
<el-button v-if="row.canRevoke" @click="onRevoke(row)" size="mini" type="danger">撤回
</el-button>
</template>
</el-table-column>
</el-table>
<!--#include("/layouts/pagination.html"){}#-->
</el-card>
<template #edit>
<info ref="infoRef">
<div v-if="showApprovalForm">
<div class="process-title">
{{formData.taskName}}
</div>
<el-form :model="formData" ref="formRef" :rules="formRules" label-width="0" label-suffix=""
class="flow-task-form">
<el-form-item label="审批意见" prop="tf_opinion"
:rules="[{required:true,message:'必填',trigger:['change','blur']}]">
<user-opinion-textarea v-model="formData.tf_opinion"></user-opinion-textarea>
</el-form-item>
<el-form-item label="电子签名" prop="tf_userSign"
:rules="[{required:true,message:'必填',trigger:['change','blur']}]">
<pc-signature v-model="formData.tf_userSign"></pc-signature>
</el-form-item>
</el-form>
<el-row type="flex" justify="end">
<el-button @click="$refs.guava.index()" size="small">取消</el-button>
<el-button @click="handleTaskAction(6)" size="small" type="info">退回到发起人</el-button>
<el-button @click="handleTaskAction(2)" size="small" type="danger">拒绝申请</el-button>
<el-button @click="handleTaskAction(1)" size="small" type="primary">同意申请</el-button>
</el-row>
</div>
</info>
</template>
</guava>
</div>
<script>
<!--#include("../common/info.js"){}#-->
new Vue({
el: "#app",
mixins: [initTableMixins],
store,
dicts: ["ACTIVITY_BUDGET_TYPE", "ACTIVITY_BUDGET_REIMBURSE_TYPE"],
data() {
return {
pageForm: {
year: this.$moment().format("YYYY")
},
tableColumns: [
{prop: "loginName", label: "申报人", sortable: true},
{prop: "activityName", label: "项目名称"},
{prop: "activityReimbursementMode", label: "报销模式"},
{prop: "outlayManageSource", label: "经费类型"},
{prop: "budgetReimburseType", label: "预算条目"},
{prop: "actualMoney", label: "报销金额(元)"},
{prop: "declareUnitName", label: "申报单位/协会", sortable: true},
{prop: "applyTime", label: "申报时间", sortable: true},
{prop: "taskName", label: "当前节点"},
{prop: "instanceState", label: "流程状态"}
],
activityDeclareReimbursementList: [],
unions: [],
units: [],
clubs: [],
// 审核相关
formData: {},
showApprovalForm: false
}
},
components: {
'info': INFO,
},
methods: {
openView(row) {
this.$refs.guava.edit(() => {
this.showApprovalForm = false
this.$refs.infoRef.onOpen(row)
})
},
openAudit(row) {
this.$refs.guava.edit(() => {
this.showApprovalForm = true
this.formData = {
processTaskId: row.taskId,
taskName: row.curTaskName
}
this.$refs.infoRef.onOpen(row)
})
},
handleTaskAction(val) {
this.$refs.formRef.validate((valid) => {
if (valid) {
this.$confirm("您确定要提交吗?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(() => {
this.$axios.post("/flow/common/executeTask", {
data: JSON.stringify({
...this.formData,
submitType: val
})
}).then((res) => {
if (res.code === 0) {
this.$refs.guava.index()
this.$message.success(res.msg)
this.doSearch()
}
})
})
}
})
},
onRevoke(row) {
this.$confirm("您确定要撤回吗?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "info"
}).then(() => {
this.$axios.post("/flow/common/revokeTask", {taskId: row.taskId}).then((res) => {
if (res.code === 0) {
this.$message.success(res.msg)
this.doSearch()
}
})
})
},
async flushUnits() {
this.$set(this.pageForm, "unitId", null)
if (this.$auth.hasRoleOr('SYSADMIN, SCHOOL_UNION_ADMIN')) {
this.units = await this.$businessTool.listUnit(this.pageForm.unionId)
} else {
this.units = await this.$businessTool.listUnit(this.$store.state.user.union.id)
}
},
getActivityTypeName(type) {
const data = this.activityDeclareReimbursementList.find(item => item.name === type)
return data ? data.typeName : ""
},
},
async created() {
this.pageData()
if (this.$auth.hasRoleOr('SYSADMIN, SCHOOL_UNION_ADMIN')) {
this.unions = await this.$businessTool.listUnion()
} else {
this.unions = await this.$businessTool.listUnion(this.$store.state.user.union.id)
}
this.activityDeclareReimbursementList = await this.$businessTool.getEnumOptions("ActivityDeclareReimbursement")
}
})
</script>
<!--#
}
#-->
@@ -0,0 +1,267 @@
<!--#
layout("/layouts/platform.html"){
#-->
<div id="app">
<guava ref="guava">
<el-card shadow="never">
<search @search="doSearch">
<search-item label="年度">
<el-date-picker
placeholder="请选择年度"
type="year"
style="width: 100%"
v-model="pageForm.year"
value-format="yyyy">
</el-date-picker>
</search-item>
<search-item label="申请人">
<el-input placeholder="请输入申请人工号或姓名" clearable
v-model="pageForm.searchKeyword"></el-input>
</search-item>
<search-item label="报销模式">
<el-select clearable filterable placeholder="请选择报销模式"
style="width: 100%;" v-model="pageForm.activityReimbursementMode">
<el-option label="活动报销" value="activity"></el-option>
<el-option label="日常报销" value="daily"></el-option>
</el-select>
</search-item>
<search-item label="经费类型">
<dict-select code="ACTIVITY_BUDGET_TYPE" v-model="pageForm.outlayManageSource"
placeholder="请选择经费类型"></dict-select>
</search-item>
<search-item label="预算条目">
<dict-select code="ACTIVITY_BUDGET_REIMBURSE_TYPE" v-model="pageForm.budgetReimburseType"
placeholder="请选择预算条目"></dict-select>
</search-item>
<template v-if="$auth.hasRoleOr('SYSADMIN, SCHOOL_UNION_ADMIN, BRANCH_UNION_ADMIN')">
<search-item label="所属工会">
<el-select @change="flushUnits" @clear="flushUnits" clearable
filterable
placeholder="请选择所属工会"
style="width: 100%;"
v-model="pageForm.unionId">
<el-option :label="item.name" :value="item.id"
v-for="item in unions"></el-option>
</el-select>
</search-item>
<search-item label="所属单位">
<el-select clearable filterable placeholder="请选择所属单位"
style="width: 100%;" v-model="pageForm.unitId">
<el-option :label="item.name" :value="item.id"
v-for="item in units"></el-option>
</el-select>
</search-item>
</template>
</search>
</el-card>
<el-card shadow="never" class="mt10">
<table-tool :app="this" label="审批列表">
<el-radio-group @change="doSearch" class="mr5" size="small" v-model="pageForm.audit">
<el-radio-button label="true">已审核</el-radio-button>
<el-radio-button label="false">未审核</el-radio-button>
</el-radio-group>
</table-tool>
<el-table :data="tableData" :size="tableSize" @sort-change="pageOrder"
ref="table" row-key="id" style="width: 100%">
<el-table-column :index="indexMethod" header-align="center" label="序号"
type="index" width="60px"></el-table-column>
<el-table-column
:label="column.label"
:prop="column.prop"
:sortable="column.sortable"
:width="column.width"
header-align="center"
min-width="100px"
show-overflow-tooltip
v-for="column in tableColumns"
>
<template scope="{row}" v-if="column.prop=='loginName'">
<span>{{row.userName + '(' + row.loginName + ')' }}</span>
</template>
<template scope="{row}" v-else-if="column.prop=='outlayManageSource'">
<dict-tag :options="dict.type.ACTIVITY_BUDGET_TYPE" :value="row.outlayManageSource"></dict-tag>
</template>
<template scope="{row}" v-else-if="column.prop=='budgetReimburseType'">
<dict-tag :options="dict.type.ACTIVITY_BUDGET_REIMBURSE_TYPE"
:value="row.budgetReimburseType"></dict-tag>
</template>
<template scope="{row}" v-else-if="column.prop=='activityReimbursementMode'">
<span>{{ row.activityReimbursementMode==='activity'?'活动报销' : '日常报销' }}</span>
</template>
<template scope="{row}" v-else-if="column.prop=='instanceState'">
<enum-tag :value="row.instanceState" name="ProcessInstanceStateEnum" label_key="message"
size="small"></enum-tag>
</template>
</el-table-column>
<el-table-column label="操作" fixed="right" width="200px">
<template slot-scope="{row}">
<el-button @click="openView(row)" size="mini" type="primary">查看</el-button>
<el-button v-if="row.taskState === 10" @click="openAudit(row)" size="mini" type="primary">审核
</el-button>
<el-button v-if="row.canRevoke" @click="onRevoke(row)" size="mini" type="danger">撤回
</el-button>
</template>
</el-table-column>
</el-table>
<!--#include("/layouts/pagination.html"){}#-->
</el-card>
<template #edit>
<info ref="infoRef">
<div v-if="showApprovalForm">
<div class="process-title">
{{formData.taskName}}
</div>
<el-form :model="formData" ref="formRef" :rules="formRules" label-width="0" label-suffix=""
class="flow-task-form">
<el-form-item label="审批意见" prop="tf_opinion"
:rules="[{required:true,message:'必填',trigger:['change','blur']}]">
<user-opinion-textarea v-model="formData.tf_opinion"></user-opinion-textarea>
</el-form-item>
<el-form-item label="电子签名" prop="tf_userSign"
:rules="[{required:true,message:'必填',trigger:['change','blur']}]">
<pc-signature v-model="formData.tf_userSign"></pc-signature>
</el-form-item>
</el-form>
<el-row type="flex" justify="end">
<el-button @click="$refs.guava.index()" size="small">取消</el-button>
<el-button @click="handleTaskAction(6)" size="small" type="info">退回到发起人</el-button>
<el-button @click="handleTaskAction(2)" size="small" type="danger">拒绝申请</el-button>
<el-button @click="handleTaskAction(1)" size="small" type="primary">同意申请</el-button>
</el-row>
</div>
</info>
</template>
</guava>
</div>
<script>
<!--#include("../common/info.js"){}#-->
new Vue({
el: "#app",
mixins: [initTableMixins],
store,
dicts: ["ACTIVITY_BUDGET_TYPE", "ACTIVITY_BUDGET_REIMBURSE_TYPE"],
data() {
return {
pageForm: {
year: this.$moment().format("YYYY")
},
tableColumns: [
{prop: "loginName", label: "申报人", sortable: true},
{prop: "activityName", label: "项目名称"},
{prop: "activityReimbursementMode", label: "报销模式"},
{prop: "outlayManageSource", label: "经费类型"},
{prop: "budgetReimburseType", label: "预算条目"},
{prop: "actualMoney", label: "报销金额(元)"},
{prop: "declareUnitName", label: "申报单位/协会", sortable: true},
{prop: "applyTime", label: "申报时间", sortable: true},
{prop: "taskName", label: "当前节点"},
{prop: "instanceState", label: "流程状态"}
],
activityDeclareReimbursementList: [],
unions: [],
units: [],
clubs: [],
// 审核相关
formData: {},
showApprovalForm: false
}
},
components: {
'info': INFO,
},
methods: {
openView(row) {
this.$refs.guava.edit(() => {
this.showApprovalForm = false
this.$refs.infoRef.onOpen(row)
})
},
openAudit(row) {
this.$refs.guava.edit(() => {
this.showApprovalForm = true
this.formData = {
processTaskId: row.taskId,
taskName: row.curTaskName
}
this.$refs.infoRef.onOpen(row)
})
},
handleTaskAction(val) {
this.$refs.formRef.validate((valid) => {
if (valid) {
this.$confirm("您确定要提交吗?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(() => {
this.$axios.post("/flow/common/executeTask", {
data: JSON.stringify({
...this.formData,
submitType: val
})
}).then((res) => {
if (res.code === 0) {
this.$refs.guava.index()
this.$message.success(res.msg)
this.doSearch()
}
})
})
}
})
},
onRevoke(row) {
this.$confirm("您确定要撤回吗?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "info"
}).then(() => {
this.$axios.post("/flow/common/revokeTask", {taskId: row.taskId}).then((res) => {
if (res.code === 0) {
this.$message.success(res.msg)
this.doSearch()
}
})
})
},
async flushUnits() {
this.$set(this.pageForm, "unitId", null)
if (this.$auth.hasRoleOr('SYSADMIN, SCHOOL_UNION_ADMIN')) {
this.units = await this.$businessTool.listUnit(this.pageForm.unionId)
} else {
this.units = await this.$businessTool.listUnit(this.$store.state.user.union.id)
}
},
getActivityTypeName(type) {
const data = this.activityDeclareReimbursementList.find(item => item.name === type)
return data ? data.typeName : ""
},
},
async created() {
this.pageData()
if (this.$auth.hasRoleOr('SYSADMIN, SCHOOL_UNION_ADMIN')) {
this.unions = await this.$businessTool.listUnion()
} else {
this.unions = await this.$businessTool.listUnion(this.$store.state.user.union.id)
}
this.activityDeclareReimbursementList = await this.$businessTool.getEnumOptions("ActivityDeclareReimbursement")
}
})
</script>
<!--#
}
#-->
@@ -2,253 +2,265 @@
layout("/layouts/platform.html"){ layout("/layouts/platform.html"){
#--> #-->
<div id="app"> <div id="app">
<guava ref="guava"> <guava ref="guava">
<el-card shadow="never"> <el-card shadow="never">
<search @search="doSearch"> <search @search="doSearch">
<search-item label="年度"> <search-item label="年度">
<el-date-picker <el-date-picker
placeholder="请选择年度" placeholder="请选择年度"
type="year" type="year"
style="width: 100%" style="width: 100%"
v-model="pageForm.year" v-model="pageForm.year"
value-format="yyyy"> value-format="yyyy">
</el-date-picker> </el-date-picker>
</search-item> </search-item>
<search-item label="申请人"> <search-item label="申请人">
<el-input placeholder="请输入申请人工号或姓名" clearable v-model="pageForm.searchKeyword"></el-input> <el-input placeholder="请输入申请人工号或姓名" clearable
</search-item> v-model="pageForm.searchKeyword"></el-input>
</search-item>
<search-item label="报销模式"> <search-item label="报销模式">
<el-select clearable filterable placeholder="请选择报销模式" <el-select clearable filterable placeholder="请选择报销模式"
style="width: 100%;" v-model="pageForm.activityReimbursementMode"> style="width: 100%;" v-model="pageForm.activityReimbursementMode">
<el-option label="活动报销" value="activity"></el-option> <el-option label="活动报销" value="activity"></el-option>
<el-option label="日常报销" value="daily"></el-option> <el-option label="日常报销" value="daily"></el-option>
</el-select> </el-select>
</search-item> </search-item>
<search-item label="经费类型"> <search-item label="经费类型">
<dict-select code="ACTIVITY_BUDGET_TYPE" v-model="pageForm.outlayManageSource" placeholder="请选择经费类型"></dict-select> <dict-select code="ACTIVITY_BUDGET_TYPE" v-model="pageForm.outlayManageSource"
</search-item> placeholder="请选择经费类型"></dict-select>
<search-item label="预算条目"> </search-item>
<dict-select code="ACTIVITY_BUDGET_REIMBURSE_TYPE" v-model="pageForm.budgetReimburseType" placeholder="请选择预算条目"></dict-select> <search-item label="预算条目">
</search-item> <dict-select code="ACTIVITY_BUDGET_REIMBURSE_TYPE" v-model="pageForm.budgetReimburseType"
placeholder="请选择预算条目"></dict-select>
</search-item>
<template v-if="$auth.hasRoleOr('SYSADMIN, SCHOOL_UNION_ADMIN, BRANCH_UNION_ADMIN')"> <template v-if="$auth.hasRoleOr('SYSADMIN, SCHOOL_UNION_ADMIN, BRANCH_UNION_ADMIN')">
<search-item label="所属工会"> <search-item label="所属工会">
<el-select @change="flushUnits" @clear="flushUnits" clearable <el-select @change="flushUnits" @clear="flushUnits" clearable
filterable filterable
placeholder="请选择所属工会" placeholder="请选择所属工会"
style="width: 100%;" style="width: 100%;"
v-model="pageForm.unionId"> v-model="pageForm.unionId">
<el-option :label="item.name" :value="item.id" <el-option :label="item.name" :value="item.id"
v-for="item in unions"></el-option> v-for="item in unions"></el-option>
</el-select> </el-select>
</search-item> </search-item>
<search-item label="所属单位"> <search-item label="所属单位">
<el-select clearable filterable placeholder="请选择所属单位" <el-select clearable filterable placeholder="请选择所属单位"
style="width: 100%;" v-model="pageForm.unitId"> style="width: 100%;" v-model="pageForm.unitId">
<el-option :label="item.name" :value="item.id" <el-option :label="item.name" :value="item.id"
v-for="item in units"></el-option> v-for="item in units"></el-option>
</el-select> </el-select>
</search-item> </search-item>
</template> </template>
</search> </search>
</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="审批列表">
<el-radio-group @change="doSearch" class="mr5" size="small" v-model="pageForm.audit"> <el-radio-group @change="doSearch" class="mr5" size="small" v-model="pageForm.audit">
<el-radio-button label="true">已审核</el-radio-button> <el-radio-button label="true">已审核</el-radio-button>
<el-radio-button label="false">未审核</el-radio-button> <el-radio-button label="false">未审核</el-radio-button>
</el-radio-group> </el-radio-group>
</table-tool> </table-tool>
<el-table :data="tableData" :size="tableSize" @sort-change="pageOrder" <el-table :data="tableData" :size="tableSize" @sort-change="pageOrder"
ref="table" row-key="id" style="width: 100%"> ref="table" row-key="id" style="width: 100%">
<el-table-column :index="indexMethod" header-align="center" label="序号" <el-table-column :index="indexMethod" header-align="center" label="序号"
type="index" width="60px"></el-table-column> type="index" width="60px"></el-table-column>
<el-table-column <el-table-column
:label="column.label" :label="column.label"
:prop="column.prop" :prop="column.prop"
:sortable="column.sortable" :sortable="column.sortable"
:width="column.width" :width="column.width"
header-align="center" header-align="center"
min-width="100px" min-width="100px"
show-overflow-tooltip show-overflow-tooltip
v-for="column in tableColumns" v-for="column in tableColumns"
> >
<template scope="{row}" v-if="column.prop=='loginName'"> <template scope="{row}" v-if="column.prop=='loginName'">
<span>{{row.userName + '(' + row.loginName + ')' }}</span> <span>{{row.userName + '(' + row.loginName + ')' }}</span>
</template> </template>
<template scope="{row}" v-else-if="column.prop=='outlayManageSource'"> <template scope="{row}" v-else-if="column.prop=='outlayManageSource'">
<dict-tag :options="dict.type.ACTIVITY_BUDGET_TYPE" :value="row.outlayManageSource"></dict-tag> <dict-tag :options="dict.type.ACTIVITY_BUDGET_TYPE" :value="row.outlayManageSource"></dict-tag>
</template> </template>
<template scope="{row}" v-else-if="column.prop=='budgetReimburseType'"> <template scope="{row}" v-else-if="column.prop=='budgetReimburseType'">
<dict-tag :options="dict.type.ACTIVITY_BUDGET_REIMBURSE_TYPE" :value="row.budgetReimburseType"></dict-tag> <dict-tag :options="dict.type.ACTIVITY_BUDGET_REIMBURSE_TYPE"
</template> :value="row.budgetReimburseType"></dict-tag>
<template scope="{row}" v-else-if="column.prop=='activityReimbursementMode'"> </template>
<span>{{ row.activityReimbursementMode==='activity'?'活动报销' : '日常报销' }}</span> <template scope="{row}" v-else-if="column.prop=='activityReimbursementMode'">
</template> <span>{{ row.activityReimbursementMode==='activity'?'活动报销' : '日常报销' }}</span>
<template scope="{row}" v-else-if="column.prop=='instanceState'"> </template>
<enum-tag :value="row.instanceState" name="ProcessInstanceStateEnum" label_key="message" <template scope="{row}" v-else-if="column.prop=='instanceState'">
size="small"></enum-tag> <enum-tag :value="row.instanceState" name="ProcessInstanceStateEnum" label_key="message"
</template> size="small"></enum-tag>
</el-table-column> </template>
<el-table-column label="操作" fixed="right" width="200px"> </el-table-column>
<template slot-scope="{row}"> <el-table-column label="操作" fixed="right" width="200px">
<el-button @click="openView(row)" size="mini" type="primary">查看</el-button> <template slot-scope="{row}">
<el-button v-if="row.taskState === 10" @click="openAudit(row)" size="mini" type="primary">审核 <el-button @click="openView(row)" size="mini" type="primary">查看</el-button>
</el-button> <el-button v-if="row.taskState === 10" @click="openAudit(row)" size="mini" type="primary">审核
<el-button v-if="row.canRevoke" @click="onRevoke(row)" size="mini" type="danger">撤回 </el-button>
</el-button> <el-button v-if="row.canRevoke" @click="onRevoke(row)" size="mini" type="danger">撤回
</template> </el-button>
</el-table-column> </template>
</el-table> </el-table-column>
<!--#include("/layouts/pagination.html"){}#--> </el-table>
</el-card> <!--#include("/layouts/pagination.html"){}#-->
</el-card>
<template #edit> <template #edit>
<info ref="infoRef"> <info ref="infoRef">
<div v-if="showApprovalForm"> <div v-if="showApprovalForm">
<div class="process-title"> <div class="process-title">
{{formData.taskName}} {{formData.taskName}}
</div> </div>
<el-form :model="formData" ref="formRef" :rules="formRules" label-width="0" label-suffix="" <el-form :model="formData" ref="formRef" :rules="formRules" label-width="0" label-suffix=""
class="flow-task-form"> class="flow-task-form">
<el-form-item label="审批意见" prop="tf_opinion" <el-form-item label="审批意见" prop="tf_opinion"
:rules="[{required:true,message:'必填',trigger:['change','blur']}]"> :rules="[{required:true,message:'必填',trigger:['change','blur']}]">
<user-opinion-textarea v-model="formData.tf_opinion"></user-opinion-textarea> <user-opinion-textarea v-model="formData.tf_opinion"></user-opinion-textarea>
</el-form-item> </el-form-item>
</el-form> <el-form-item label="电子签名" prop="tf_userSign"
<el-row type="flex" justify="end"> :rules="[{required:true,message:'必填',trigger:['change','blur']}]">
<el-button @click="$refs.guava.index()" size="small">取消</el-button> <pc-signature v-model="formData.tf_userSign"></pc-signature>
<el-button @click="handleTaskAction(6)" size="small" type="info">退回到发起人</el-button> </el-form-item>
<el-button @click="handleTaskAction(2)" size="small" type="danger">拒绝申请</el-button> </el-form>
<el-button @click="handleTaskAction(1)" size="small" type="primary">同意申请</el-button> <el-row type="flex" justify="end">
</el-row> <el-button @click="$refs.guava.index()" size="small">取消</el-button>
</div> <el-button @click="handleTaskAction(6)" size="small" type="info">退回到发起人</el-button>
</info> <el-button @click="handleTaskAction(2)" size="small" type="danger">拒绝申请</el-button>
</template> <el-button @click="handleTaskAction(1)" size="small" type="primary">同意申请</el-button>
</guava> </el-row>
</div>
</info>
</template>
</guava>
</div> </div>
<script> <script>
<!--#include("../common/info.js"){}#--> <!--#include("../common/info.js"){}#-->
new Vue({ new Vue({
el: "#app", el: "#app",
mixins: [initTableMixins], mixins: [initTableMixins],
store, store,
dicts: ["ACTIVITY_BUDGET_TYPE","ACTIVITY_BUDGET_REIMBURSE_TYPE"], dicts: ["ACTIVITY_BUDGET_TYPE", "ACTIVITY_BUDGET_REIMBURSE_TYPE"],
data() { data() {
return { return {
pageForm: { pageForm: {
year: this.$moment().format("YYYY") year: this.$moment().format("YYYY")
}, },
tableColumns: [ tableColumns: [
{prop: "loginName", label: "申报人", sortable: true}, {prop: "loginName", label: "申报人", sortable: true},
{prop: "activityName", label: "项目名称"}, {prop: "activityName", label: "项目名称"},
{prop: "activityReimbursementMode", label: "报销模式"}, {prop: "activityReimbursementMode", label: "报销模式"},
{prop: "outlayManageSource", label: "经费类型"}, {prop: "outlayManageSource", label: "经费类型"},
{prop: "budgetReimburseType", label: "预算条目"}, {prop: "budgetReimburseType", label: "预算条目"},
{prop: "actualMoney", label: "报销金额(元)"}, {prop: "actualMoney", label: "报销金额(元)"},
{prop: "declareUnitName", label: "申报单位/协会", sortable: true}, {prop: "declareUnitName", label: "申报单位/协会", sortable: true},
{prop: "applyTime", label: "申报时间", sortable: true}, {prop: "applyTime", label: "申报时间", sortable: true},
{prop: "taskName", label: "当前节点"}, {prop: "taskName", label: "当前节点"},
{prop: "instanceState", label: "流程状态"} {prop: "instanceState", label: "流程状态"}
], ],
activityDeclareReimbursementList: [], activityDeclareReimbursementList: [],
unions: [], unions: [],
units: [], units: [],
clubs: [], clubs: [],
// 审核相关 // 审核相关
formData: {}, formData: {},
showApprovalForm: false showApprovalForm: false
} }
}, },
components: { components: {
'info': INFO, 'info': INFO,
}, },
methods: { methods: {
openView(row){ openView(row) {
this.$refs.guava.edit(() => { this.$refs.guava.edit(() => {
this.showApprovalForm = false this.showApprovalForm = false
this.$refs.infoRef.onOpen(row) this.$refs.infoRef.onOpen(row)
}) })
}, },
openAudit(row) { openAudit(row) {
this.$refs.guava.edit(()=>{ this.$refs.guava.edit(() => {
this.showApprovalForm = true this.showApprovalForm = true
this.formData = { this.formData = {
processTaskId: row.taskId, processTaskId: row.taskId,
taskName: row.curTaskName taskName: row.curTaskName
} }
this.$refs.infoRef.onOpen(row) this.$refs.infoRef.onOpen(row)
}) })
}, },
handleTaskAction(val) { handleTaskAction(val) {
this.$confirm("您确定要提交吗?", "提示", { this.$refs.formRef.validate((valid) => {
confirmButtonText: "确定", if (valid) {
cancelButtonText: "取消", this.$confirm("您确定要提交吗?", "提示", {
type: "warning" confirmButtonText: "确定",
}).then(() => { cancelButtonText: "取消",
this.$axios.post("/flow/common/executeTask", { type: "warning"
data: JSON.stringify({ }).then(() => {
...this.formData, this.$axios.post("/flow/common/executeTask", {
submitType: val data: JSON.stringify({
}) ...this.formData,
}).then((res) => { submitType: val
if (res.code === 0) { })
this.$refs.guava.index() }).then((res) => {
this.$message.success(res.msg) if (res.code === 0) {
this.doSearch() this.$refs.guava.index()
} this.$message.success(res.msg)
}) this.doSearch()
}) }
}, })
})
}
})
},
onRevoke(row) { onRevoke(row) {
this.$confirm("您确定要撤回吗?", "提示", { this.$confirm("您确定要撤回吗?", "提示", {
confirmButtonText: "确定", confirmButtonText: "确定",
cancelButtonText: "取消", cancelButtonText: "取消",
type: "info" type: "info"
}).then(() => { }).then(() => {
this.$axios.post("/flow/common/revokeTask", {taskId: row.taskId}).then((res) => { this.$axios.post("/flow/common/revokeTask", {taskId: row.taskId}).then((res) => {
if (res.code === 0) { if (res.code === 0) {
this.$message.success(res.msg) this.$message.success(res.msg)
this.doSearch() this.doSearch()
} }
}) })
}) })
}, },
async flushUnits(){ async flushUnits() {
this.$set(this.pageForm, "unitId", null) this.$set(this.pageForm, "unitId", null)
if (this.$auth.hasRoleOr('SYSADMIN, SCHOOL_UNION_ADMIN')) { if (this.$auth.hasRoleOr('SYSADMIN, SCHOOL_UNION_ADMIN')) {
this.units = await this.$businessTool.listUnit(this.pageForm.unionId) this.units = await this.$businessTool.listUnit(this.pageForm.unionId)
} else { } else {
this.units = await this.$businessTool.listUnit(this.$store.state.user.union.id) this.units = await this.$businessTool.listUnit(this.$store.state.user.union.id)
} }
}, },
getActivityTypeName(type) { getActivityTypeName(type) {
const data = this.activityDeclareReimbursementList.find(item => item.name === type) const data = this.activityDeclareReimbursementList.find(item => item.name === type)
return data ? data.typeName : "" return data ? data.typeName : ""
}, },
}, },
async created() { async created() {
this.pageData() this.pageData()
if (this.$auth.hasRoleOr('SYSADMIN, SCHOOL_UNION_ADMIN')) { if (this.$auth.hasRoleOr('SYSADMIN, SCHOOL_UNION_ADMIN')) {
this.unions = await this.$businessTool.listUnion() this.unions = await this.$businessTool.listUnion()
} else { } else {
this.unions = await this.$businessTool.listUnion(this.$store.state.user.union.id) this.unions = await this.$businessTool.listUnion(this.$store.state.user.union.id)
} }
this.activityDeclareReimbursementList = await this.$businessTool.getEnumOptions("ActivityDeclareReimbursement") this.activityDeclareReimbursementList = await this.$businessTool.getEnumOptions("ActivityDeclareReimbursement")
} }
}) })
</script> </script>
<!--# <!--#
} }
@@ -2,253 +2,265 @@
layout("/layouts/platform.html"){ layout("/layouts/platform.html"){
#--> #-->
<div id="app"> <div id="app">
<guava ref="guava"> <guava ref="guava">
<el-card shadow="never"> <el-card shadow="never">
<search @search="doSearch"> <search @search="doSearch">
<search-item label="年度"> <search-item label="年度">
<el-date-picker <el-date-picker
placeholder="请选择年度" placeholder="请选择年度"
type="year" type="year"
style="width: 100%" style="width: 100%"
v-model="pageForm.year" v-model="pageForm.year"
value-format="yyyy"> value-format="yyyy">
</el-date-picker> </el-date-picker>
</search-item> </search-item>
<search-item label="申请人"> <search-item label="申请人">
<el-input placeholder="请输入申请人工号或姓名" clearable v-model="pageForm.searchKeyword"></el-input> <el-input placeholder="请输入申请人工号或姓名" clearable
</search-item> v-model="pageForm.searchKeyword"></el-input>
<search-item label="报销模式"> </search-item>
<el-select clearable filterable placeholder="请选择报销模式" <search-item label="报销模式">
style="width: 100%;" v-model="pageForm.activityReimbursementMode"> <el-select clearable filterable placeholder="请选择报销模式"
<el-option label="活动报销" value="activity"></el-option> style="width: 100%;" v-model="pageForm.activityReimbursementMode">
<el-option label="日常报销" value="daily"></el-option> <el-option label="活动报销" value="activity"></el-option>
</el-select> <el-option label="日常报销" value="daily"></el-option>
</search-item> </el-select>
<search-item label="经费类型"> </search-item>
<dict-select code="ACTIVITY_BUDGET_TYPE" v-model="pageForm.outlayManageSource" placeholder="请选择经费类型"></dict-select> <search-item label="经费类型">
</search-item> <dict-select code="ACTIVITY_BUDGET_TYPE" v-model="pageForm.outlayManageSource"
<search-item label="预算条目"> placeholder="请选择经费类型"></dict-select>
<dict-select code="ACTIVITY_BUDGET_REIMBURSE_TYPE" v-model="pageForm.budgetReimburseType" placeholder="请选择预算条目"></dict-select> </search-item>
</search-item> <search-item label="预算条目">
<dict-select code="ACTIVITY_BUDGET_REIMBURSE_TYPE" v-model="pageForm.budgetReimburseType"
placeholder="请选择预算条目"></dict-select>
</search-item>
<template v-if="$auth.hasRoleOr('SYSADMIN, SCHOOL_UNION_ADMIN, BRANCH_UNION_ADMIN')"> <template v-if="$auth.hasRoleOr('SYSADMIN, SCHOOL_UNION_ADMIN, BRANCH_UNION_ADMIN')">
<search-item label="所属工会"> <search-item label="所属工会">
<el-select @change="flushUnits" @clear="flushUnits" clearable <el-select @change="flushUnits" @clear="flushUnits" clearable
filterable filterable
placeholder="请选择所属工会" placeholder="请选择所属工会"
style="width: 100%;" style="width: 100%;"
v-model="pageForm.unionId"> v-model="pageForm.unionId">
<el-option :label="item.name" :value="item.id" <el-option :label="item.name" :value="item.id"
v-for="item in unions"></el-option> v-for="item in unions"></el-option>
</el-select> </el-select>
</search-item> </search-item>
<search-item label="所属单位"> <search-item label="所属单位">
<el-select clearable filterable placeholder="请选择所属单位" <el-select clearable filterable placeholder="请选择所属单位"
style="width: 100%;" v-model="pageForm.unitId"> style="width: 100%;" v-model="pageForm.unitId">
<el-option :label="item.name" :value="item.id" <el-option :label="item.name" :value="item.id"
v-for="item in units"></el-option> v-for="item in units"></el-option>
</el-select> </el-select>
</search-item> </search-item>
</template> </template>
</search> </search>
</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="审批列表">
<el-radio-group @change="doSearch" class="mr5" size="small" v-model="pageForm.audit"> <el-radio-group @change="doSearch" class="mr5" size="small" v-model="pageForm.audit">
<el-radio-button label="true">已审核</el-radio-button> <el-radio-button label="true">已审核</el-radio-button>
<el-radio-button label="false">未审核</el-radio-button> <el-radio-button label="false">未审核</el-radio-button>
</el-radio-group> </el-radio-group>
</table-tool> </table-tool>
<el-table :data="tableData" :size="tableSize" @sort-change="pageOrder" <el-table :data="tableData" :size="tableSize" @sort-change="pageOrder"
ref="table" row-key="id" style="width: 100%"> ref="table" row-key="id" style="width: 100%">
<el-table-column :index="indexMethod" header-align="center" label="序号" <el-table-column :index="indexMethod" header-align="center" label="序号"
type="index" width="60px"></el-table-column> type="index" width="60px"></el-table-column>
<el-table-column <el-table-column
:label="column.label" :label="column.label"
:prop="column.prop" :prop="column.prop"
:sortable="column.sortable" :sortable="column.sortable"
:width="column.width" :width="column.width"
header-align="center" header-align="center"
min-width="100px" min-width="100px"
show-overflow-tooltip show-overflow-tooltip
v-for="column in tableColumns" v-for="column in tableColumns"
> >
<template scope="{row}" v-if="column.prop=='loginName'"> <template scope="{row}" v-if="column.prop=='loginName'">
<span>{{row.userName + '(' + row.loginName + ')' }}</span> <span>{{row.userName + '(' + row.loginName + ')' }}</span>
</template> </template>
<template scope="{row}" v-else-if="column.prop=='outlayManageSource'"> <template scope="{row}" v-else-if="column.prop=='outlayManageSource'">
<dict-tag :options="dict.type.ACTIVITY_BUDGET_TYPE" :value="row.outlayManageSource"></dict-tag> <dict-tag :options="dict.type.ACTIVITY_BUDGET_TYPE" :value="row.outlayManageSource"></dict-tag>
</template> </template>
<template scope="{row}" v-else-if="column.prop=='budgetReimburseType'"> <template scope="{row}" v-else-if="column.prop=='budgetReimburseType'">
<dict-tag :options="dict.type.ACTIVITY_BUDGET_REIMBURSE_TYPE" :value="row.budgetReimburseType"></dict-tag> <dict-tag :options="dict.type.ACTIVITY_BUDGET_REIMBURSE_TYPE"
</template> :value="row.budgetReimburseType"></dict-tag>
<template scope="{row}" v-else-if="column.prop=='activityReimbursementMode'"> </template>
<span>{{ row.activityReimbursementMode==='activity'?'活动报销' : '日常报销' }}</span> <template scope="{row}" v-else-if="column.prop=='activityReimbursementMode'">
</template> <span>{{ row.activityReimbursementMode==='activity'?'活动报销' : '日常报销' }}</span>
<template scope="{row}" v-else-if="column.prop=='instanceState'"> </template>
<enum-tag :value="row.instanceState" name="ProcessInstanceStateEnum" label_key="message" <template scope="{row}" v-else-if="column.prop=='instanceState'">
size="small"></enum-tag> <enum-tag :value="row.instanceState" name="ProcessInstanceStateEnum" label_key="message"
</template> size="small"></enum-tag>
</el-table-column> </template>
<el-table-column label="操作" fixed="right" width="200px"> </el-table-column>
<template slot-scope="{row}"> <el-table-column label="操作" fixed="right" width="200px">
<el-button @click="openView(row)" size="mini" type="primary">查看</el-button> <template slot-scope="{row}">
<el-button v-if="row.taskState === 10" @click="openAudit(row)" size="mini" type="primary">审核 <el-button @click="openView(row)" size="mini" type="primary">查看</el-button>
</el-button> <el-button v-if="row.taskState === 10" @click="openAudit(row)" size="mini" type="primary">审核
<el-button v-if="row.canRevoke" @click="onRevoke(row)" size="mini" type="danger">撤回 </el-button>
</el-button> <el-button v-if="row.canRevoke" @click="onRevoke(row)" size="mini" type="danger">撤回
</template> </el-button>
</el-table-column> </template>
</el-table> </el-table-column>
<!--#include("/layouts/pagination.html"){}#--> </el-table>
</el-card> <!--#include("/layouts/pagination.html"){}#-->
</el-card>
<template #edit> <template #edit>
<info ref="infoRef"> <info ref="infoRef">
<div v-if="showApprovalForm"> <div v-if="showApprovalForm">
<div class="process-title"> <div class="process-title">
{{formData.taskName}} {{formData.taskName}}
</div> </div>
<el-form :model="formData" ref="formRef" :rules="formRules" label-width="0" label-suffix="" <el-form :model="formData" ref="formRef" :rules="formRules" label-width="0" label-suffix=""
class="flow-task-form"> class="flow-task-form">
<el-form-item label="审批意见" prop="tf_opinion" <el-form-item label="审批意见" prop="tf_opinion"
:rules="[{required:true,message:'必填',trigger:['change','blur']}]"> :rules="[{required:true,message:'必填',trigger:['change','blur']}]">
<user-opinion-textarea v-model="formData.tf_opinion"></user-opinion-textarea> <user-opinion-textarea v-model="formData.tf_opinion"></user-opinion-textarea>
</el-form-item> </el-form-item>
</el-form> <el-form-item label="电子签名" prop="tf_userSign"
<el-row type="flex" justify="end"> :rules="[{required:true,message:'必填',trigger:['change','blur']}]">
<el-button @click="$refs.guava.index()" size="small">取消</el-button> <pc-signature v-model="formData.tf_userSign"></pc-signature>
<el-button @click="handleTaskAction(6)" size="small" type="info">退回到发起人</el-button> </el-form-item>
<el-button @click="handleTaskAction(2)" size="small" type="danger">拒绝申请</el-button> </el-form>
<el-button @click="handleTaskAction(1)" size="small" type="primary">同意申请</el-button> <el-row type="flex" justify="end">
</el-row> <el-button @click="$refs.guava.index()" size="small">取消</el-button>
</div> <el-button @click="handleTaskAction(6)" size="small" type="info">退回到发起人</el-button>
</info> <el-button @click="handleTaskAction(2)" size="small" type="danger">拒绝申请</el-button>
</template> <el-button @click="handleTaskAction(1)" size="small" type="primary">同意申请</el-button>
</guava> </el-row>
</div>
</info>
</template>
</guava>
</div> </div>
<script> <script>
<!--#include("../common/info.js"){}#--> <!--#include("../common/info.js"){}#-->
new Vue({ new Vue({
el: "#app", el: "#app",
mixins: [initTableMixins], mixins: [initTableMixins],
store, store,
dicts: ["ACTIVITY_BUDGET_TYPE","ACTIVITY_BUDGET_REIMBURSE_TYPE"], dicts: ["ACTIVITY_BUDGET_TYPE", "ACTIVITY_BUDGET_REIMBURSE_TYPE"],
data() { data() {
return { return {
pageForm: { pageForm: {
year: this.$moment().format("YYYY") year: this.$moment().format("YYYY")
}, },
tableColumns: [ tableColumns: [
{prop: "loginName", label: "申报人", sortable: true}, {prop: "loginName", label: "申报人", sortable: true},
{prop: "activityName", label: "项目名称"}, {prop: "activityName", label: "项目名称"},
{prop: "activityReimbursementMode", label: "报销模式"}, {prop: "activityReimbursementMode", label: "报销模式"},
{prop: "outlayManageSource", label: "经费类型"}, {prop: "outlayManageSource", label: "经费类型"},
{prop: "budgetReimburseType", label: "预算条目"}, {prop: "budgetReimburseType", label: "预算条目"},
{prop: "actualMoney", label: "报销金额(元)"}, {prop: "actualMoney", label: "报销金额(元)"},
{prop: "declareUnitName", label: "申报单位/协会", sortable: true}, {prop: "declareUnitName", label: "申报单位/协会", sortable: true},
{prop: "applyTime", label: "申报时间", sortable: true}, {prop: "applyTime", label: "申报时间", sortable: true},
{prop: "taskName", label: "当前节点"}, {prop: "taskName", label: "当前节点"},
{prop: "instanceState", label: "流程状态"} {prop: "instanceState", label: "流程状态"}
], ],
activityDeclareReimbursementList: [], activityDeclareReimbursementList: [],
unions: [], unions: [],
units: [], units: [],
clubs: [], clubs: [],
// 审核相关 // 审核相关
formData: {}, formData: {},
showApprovalForm: false showApprovalForm: false
} }
}, },
components: { components: {
'info': INFO, 'info': INFO,
}, },
methods: { methods: {
openView(row){ openView(row) {
this.$refs.guava.edit(() => { this.$refs.guava.edit(() => {
this.showApprovalForm = false this.showApprovalForm = false
this.$refs.infoRef.onOpen(row) this.$refs.infoRef.onOpen(row)
}) })
}, },
openAudit(row) { openAudit(row) {
this.$refs.guava.edit(()=>{ this.$refs.guava.edit(() => {
this.showApprovalForm = true this.showApprovalForm = true
this.formData = { this.formData = {
id: row.id, id: row.id,
processTaskId: row.taskId, processTaskId: row.taskId,
taskName: row.curTaskName taskName: row.curTaskName
} }
this.$refs.infoRef.onOpen(row) this.$refs.infoRef.onOpen(row)
}) })
}, },
handleTaskAction(val) { handleTaskAction(val) {
this.$confirm("您确定要提交吗?", "提示", { this.$refs.formRef.validate((valid) => {
confirmButtonText: "确定", if (valid) {
cancelButtonText: "取消", this.$confirm("您确定要提交吗?", "提示", {
type: "warning" confirmButtonText: "确定",
}).then(() => { cancelButtonText: "取消",
this.$axios.post("/platform/activityReimbursement/schoolUnion/doReview", { type: "warning"
data: JSON.stringify({ }).then(() => {
...this.formData, this.$axios.post("/platform/activityReimbursement/schoolUnion/doReview", {
submitType: val data: JSON.stringify({
}), id: this.formData.id ...this.formData,
}).then((res) => { submitType: val
if (res.code === 0) { }), id: this.formData.id
this.$refs.guava.index() }).then((res) => {
this.$message.success(res.msg) if (res.code === 0) {
this.doSearch() this.$refs.guava.index()
} this.$message.success(res.msg)
}) this.doSearch()
}) }
}, })
})
}
})
},
onRevoke(row) { onRevoke(row) {
this.$confirm("您确定要撤回吗?", "提示", { this.$confirm("您确定要撤回吗?", "提示", {
confirmButtonText: "确定", confirmButtonText: "确定",
cancelButtonText: "取消", cancelButtonText: "取消",
type: "info" type: "info"
}).then(() => { }).then(() => {
this.$axios.post("/flow/common/revokeTask", {taskId: row.taskId}).then((res) => { this.$axios.post("/flow/common/revokeTask", {taskId: row.taskId}).then((res) => {
if (res.code === 0) { if (res.code === 0) {
this.$message.success(res.msg) this.$message.success(res.msg)
this.doSearch() this.doSearch()
} }
}) })
}) })
}, },
async flushUnits(){ async flushUnits() {
this.$set(this.pageForm, "unitId", null) this.$set(this.pageForm, "unitId", null)
if (this.$auth.hasRoleOr('SYSADMIN, SCHOOL_UNION_ADMIN')) { if (this.$auth.hasRoleOr('SYSADMIN, SCHOOL_UNION_ADMIN')) {
this.units = await this.$businessTool.listUnit(this.pageForm.unionId) this.units = await this.$businessTool.listUnit(this.pageForm.unionId)
} else { } else {
this.units = await this.$businessTool.listUnit(this.$store.state.user.union.id) this.units = await this.$businessTool.listUnit(this.$store.state.user.union.id)
} }
}, },
getActivityTypeName(type) { getActivityTypeName(type) {
const data = this.activityDeclareReimbursementList.find(item => item.name === type) const data = this.activityDeclareReimbursementList.find(item => item.name === type)
return data ? data.typeName : "" return data ? data.typeName : ""
}, },
}, },
async created() { async created() {
this.pageData() this.pageData()
if (this.$auth.hasRoleOr('SYSADMIN, SCHOOL_UNION_ADMIN')) { if (this.$auth.hasRoleOr('SYSADMIN, SCHOOL_UNION_ADMIN')) {
this.unions = await this.$businessTool.listUnion() this.unions = await this.$businessTool.listUnion()
} else { } else {
this.unions = await this.$businessTool.listUnion(this.$store.state.user.union.id) this.unions = await this.$businessTool.listUnion(this.$store.state.user.union.id)
} }
this.activityDeclareReimbursementList = await this.$businessTool.getEnumOptions("ActivityDeclareReimbursement") this.activityDeclareReimbursementList = await this.$businessTool.getEnumOptions("ActivityDeclareReimbursement")
} }
}) })
</script> </script>
<!--# <!--#
} }