Merge branch 'main' of https://dd3skj.picp.vip/zhaoxinyu/v4
This commit is contained in:
@@ -3,7 +3,6 @@ package com.budwk.app.zhgh.activity.basic.models;
|
||||
import com.budwk.app.base.model.BaseModel;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
import org.nutz.dao.entity.annotation.*;
|
||||
|
||||
import java.io.Serial;
|
||||
@@ -16,9 +15,13 @@ import java.io.Serializable;
|
||||
*/
|
||||
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Table
|
||||
@Table("activity_user_scope")
|
||||
@Data
|
||||
@Comment("活动人员范围设置")
|
||||
@TableIndexes({
|
||||
@Index(name = "INDEX_ACTIVITY_USER_SCOPE_GROUPID", fields = {"groupId"}, unique = false),
|
||||
@Index(name = "INDEX_ACTIVITY_USER_SCOPE_USERID", fields = {"userId"}, unique = false)
|
||||
})
|
||||
public class ActivityUserScope extends BaseModel implements Serializable {
|
||||
|
||||
@Serial
|
||||
|
||||
-2
@@ -5,7 +5,6 @@ import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import cn.dev33.satoken.annotation.SaMode;
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.lang.Dict;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.budwk.app.base.annotation.SLog;
|
||||
import com.budwk.app.base.constant.RoleConstant;
|
||||
import com.budwk.app.base.result.Result;
|
||||
@@ -22,7 +21,6 @@ import com.budwk.app.zhgh.activity.culture.models.ActivityTissue;
|
||||
import com.budwk.app.zhgh.activity.culture.service.ActivityCultureService;
|
||||
import com.budwk.app.zhgh.club.model.SysClub;
|
||||
import com.budwk.app.zhgh.club.service.SysClubService;
|
||||
import com.budwk.app.zhgh.unionReimburse.model.UnionReimburse;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.nutz.aop.interceptor.ioc.TransAop;
|
||||
import org.nutz.dao.Cnd;
|
||||
|
||||
+3
-2
@@ -6,7 +6,6 @@ import cn.afterturn.easypoi.excel.entity.enmus.ExcelType;
|
||||
import cn.afterturn.easypoi.excel.entity.params.ExcelExportEntity;
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import cn.dev33.satoken.annotation.SaMode;
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.budwk.app.base.constant.RoleConstant;
|
||||
@@ -161,7 +160,9 @@ public class ActivityCultureUserStatisticsController {
|
||||
}
|
||||
}
|
||||
// 只查询流程实例状态为20的数据(已完成状态)
|
||||
cnd.and("ins.state", "=", 20);
|
||||
if (!List.of(40001).contains(activity_type)) {
|
||||
cnd.and("ins.state", "=", 20);
|
||||
}
|
||||
cnd.andEX("YEAR(tissue.startTime)", "=", year).desc("tissue.startTime");
|
||||
sql.setCondition(cnd);
|
||||
return Result.success(activityCultureApplyUserService.list(sql));
|
||||
|
||||
+9
-3
@@ -1,6 +1,7 @@
|
||||
package com.budwk.app.zhgh.dayofficework.asset.controller;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import cn.dev33.satoken.annotation.SaMode;
|
||||
import com.budwk.app.base.annotation.SLog;
|
||||
import com.budwk.app.base.page.Pagination;
|
||||
import com.budwk.app.base.result.Result;
|
||||
@@ -39,11 +40,16 @@ public class AssetStocktakingController {
|
||||
@SaCheckPermission("asset.stocktaking")
|
||||
public void index() {
|
||||
}
|
||||
@At("/h5")
|
||||
@Ok("beetl:/platform/zhghh5/dayofficework/asset/stocktaking/index.html")
|
||||
@SaCheckPermission("h5.asset.stocktaking")
|
||||
public void h5Index() {
|
||||
}
|
||||
|
||||
|
||||
@At
|
||||
@ApiOperation("分页查询")
|
||||
@SaCheckPermission("asset.stocktaking")
|
||||
@SaCheckPermission(value = {"asset.stocktaking","h5.asset.stocktaking"}, mode = SaMode.OR)
|
||||
public Result pageData(AssetPageForm pageForm) {
|
||||
Sql sql = assetStocktakingService.getSql(pageForm);
|
||||
Pagination pagination = assetStocktakingService.listPageMap(pageForm.getPageNumber(), pageForm.getPageSize(), sql);
|
||||
@@ -54,7 +60,7 @@ public class AssetStocktakingController {
|
||||
@ApiOperation("资产盘点提交")
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
@SLog(type = "AssetStocktaking", tag = "资产盘点", msg = "提交了一条资产盘点信息")
|
||||
@SaCheckPermission("asset.stocktaking")
|
||||
@SaCheckPermission(value = {"asset.stocktaking","h5.asset.stocktaking"}, mode = SaMode.OR)
|
||||
public Result doSubmit(AssetStocktaking assetStocktaking) {
|
||||
|
||||
assetStocktakingService.doSubmit(assetStocktaking);
|
||||
@@ -66,7 +72,7 @@ public class AssetStocktakingController {
|
||||
@ApiOperation("删除资产盘点")
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
@SLog(type = "AssetStocktaking", tag = "资产盘点", msg = "删除了一条资产盘点信息")
|
||||
@SaCheckPermission("asset.stocktaking")
|
||||
@SaCheckPermission(value = {"asset.stocktaking","h5.asset.stocktaking"}, mode = SaMode.OR)
|
||||
public Result doDelete(String id,String assetStocktakingPlanId) {
|
||||
assetStocktakingService.doDelete(id,assetStocktakingPlanId);
|
||||
return Result.success();
|
||||
|
||||
+1
-1
@@ -170,7 +170,7 @@ public class SiteApplyController {
|
||||
@At
|
||||
@ApiOperation("查询可以预约的日期")
|
||||
@SaCheckPermission(value = {"site.apply", "h5.site.apply"}, mode = SaMode.OR)
|
||||
public Result queryAllowTime(String siteId, String startTime, String endTime) {
|
||||
public Result queryAllowDay(String siteId, String startTime, String endTime) {
|
||||
if(StrUtil.isBlank(siteId)) {
|
||||
return Result.success(new ArrayList<>());
|
||||
}
|
||||
|
||||
+1
-1
@@ -58,7 +58,7 @@ public class SiteMineController {
|
||||
public void index() {}
|
||||
|
||||
@At("/h5")
|
||||
@Ok("beetl:/platform/zhgh/dayofficework/site/mine/index.html")
|
||||
@Ok("beetl:/platform/zhghh5/dayofficework/site/mine/index.html")
|
||||
@SaCheckPermission("h5.site.mine")
|
||||
public void h5Index() {}
|
||||
|
||||
|
||||
+44
-37
@@ -1,7 +1,8 @@
|
||||
package com.budwk.app.zhgh.unionReimburse.controller;
|
||||
package com.budwk.app.zhgh.dayofficework.unionReimburse.controller;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckLogin;
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import cn.dev33.satoken.annotation.SaMode;
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.lang.Dict;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
@@ -22,11 +23,12 @@ import com.budwk.app.zhgh.dayofficework.outlay.outlayManage.club.model.OutlayMan
|
||||
import com.budwk.app.zhgh.dayofficework.outlay.outlayManage.school.model.OutlayManageSchool;
|
||||
import com.budwk.app.zhgh.dayofficework.outlay.outlayManage.union.model.OutlayManageUnion;
|
||||
import com.budwk.app.zhgh.staffbenefit.condolence.service.CondolenceTypeService;
|
||||
import com.budwk.app.zhgh.unionReimburse.model.UnionReimburse;
|
||||
import com.budwk.app.zhgh.dayofficework.unionReimburse.model.UnionReimburse;
|
||||
import com.budwk.app.zhgh.staffbenefit.condolence.model.CondolenceType;
|
||||
import com.budwk.app.zhgh.unionReimburse.service.UnionReimburseService;
|
||||
import com.budwk.app.zhgh.dayofficework.unionReimburse.service.UnionReimburseService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.nutz.aop.interceptor.ioc.TransAop;
|
||||
import org.nutz.dao.Cnd;
|
||||
import org.nutz.dao.Dao;
|
||||
@@ -51,6 +53,7 @@ import java.util.List;
|
||||
@At("/platform/unionReimburse/apply")
|
||||
@Api("工会报销申请")
|
||||
@Ok("json:full")
|
||||
@Slf4j
|
||||
public class UnionReimburseApplyController {
|
||||
|
||||
@Inject
|
||||
@@ -65,26 +68,32 @@ public class UnionReimburseApplyController {
|
||||
private CondolenceTypeService typeService;
|
||||
|
||||
|
||||
@At("")
|
||||
@Ok("beetl:/platform/zhgh/unionReimburse/apply/index.html")
|
||||
@SaCheckLogin
|
||||
public void index() {}
|
||||
@At("/index")
|
||||
@Ok("beetl:/platform/zhgh/dayofficework/unionReimburse/apply/index.html")
|
||||
@SaCheckPermission("unionReimburse.apply")
|
||||
public void index() {
|
||||
}
|
||||
@At("/h5")
|
||||
@Ok("beetl:/platform/zhghh5/dayofficework/unionReimburse/apply/index.html")
|
||||
@SaCheckPermission("h5.unionReimburse.apply")
|
||||
public void h5Index() {
|
||||
}
|
||||
|
||||
@At
|
||||
@ApiOperation("保存申请")
|
||||
@SaCheckPermission("unionReimburse.apply")
|
||||
@SaCheckPermission(value = {"unionReimburse.apply", "h5.unionReimburse.apply"}, mode = SaMode.OR)
|
||||
@SLog(type = "unionReimburse", tag = "工会报销-报销申请", msg = "保存报销申请")
|
||||
public Result save(@Param("data") UnionReimburse unionReimburse) {
|
||||
if(StrUtil.isBlank(unionReimburse.getId())) unionReimburse.setCreateTime(DateUtil.now());
|
||||
if (StrUtil.isBlank(unionReimburse.getId())) unionReimburse.setCreateTime(DateUtil.now());
|
||||
dao.insertOrUpdate(unionReimburse);
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
@At
|
||||
@SaCheckLogin
|
||||
@ApiOperation("提交申请")
|
||||
@SaCheckPermission(value = {"unionReimburse.apply", "h5.unionReimburse.apply"}, mode = SaMode.OR)
|
||||
public Result submit(@Param("data") UnionReimburse unionReimburse) {
|
||||
if(StrUtil.isBlank(unionReimburse.getId())) unionReimburse.setCreateTime(DateUtil.now());
|
||||
if (StrUtil.isBlank(unionReimburse.getId())) unionReimburse.setCreateTime(DateUtil.now());
|
||||
|
||||
dao.insertOrUpdate(unionReimburse);
|
||||
// 开启流程实例
|
||||
@@ -102,11 +111,11 @@ public class UnionReimburseApplyController {
|
||||
}
|
||||
|
||||
@At
|
||||
@SaCheckLogin
|
||||
@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(DateUtil.now());
|
||||
if (StrUtil.isBlank(unionReimburse.getId())) unionReimburse.setCreateTime(DateUtil.now());
|
||||
|
||||
dao.insertOrUpdate(unionReimburse);
|
||||
|
||||
@@ -133,25 +142,25 @@ public class UnionReimburseApplyController {
|
||||
|
||||
@At
|
||||
@ApiOperation("查询用户")
|
||||
@SaCheckPermission("unionReimburse.apply")
|
||||
@SaCheckPermission(value = {"unionReimburse.apply", "h5.unionReimburse.apply"}, mode = SaMode.OR)
|
||||
@SLog(type = "unionReimburse", tag = "查询用户", msg = "查询用户")
|
||||
public Object listUser(String keyword) {
|
||||
Sql sql = Sqls.create("""
|
||||
select
|
||||
id,
|
||||
username as userName,
|
||||
loginname as loginName,
|
||||
sex,
|
||||
mobile,
|
||||
technicalTitle,
|
||||
IFNULL(unitname, '暂无') as unitName,
|
||||
unitid as unitId,
|
||||
unionid as unionId,
|
||||
unionname as unionName
|
||||
from
|
||||
vw_user
|
||||
$condition
|
||||
""");
|
||||
select
|
||||
id,
|
||||
username as userName,
|
||||
loginname as loginName,
|
||||
sex,
|
||||
mobile,
|
||||
technicalTitle,
|
||||
IFNULL(unitname, '暂无') as unitName,
|
||||
unitid as unitId,
|
||||
unionid as unionId,
|
||||
unionname as unionName
|
||||
from
|
||||
vw_user
|
||||
$condition
|
||||
""");
|
||||
Cnd cnd = Cnd.NEW();
|
||||
if (StrUtil.isNotBlank(keyword)) {
|
||||
SqlExpressionGroup seg = new SqlExpressionGroup();
|
||||
@@ -159,8 +168,8 @@ public class UnionReimburseApplyController {
|
||||
seg.or(View_user::getUsername, "like", "%" + keyword + "%");
|
||||
cnd.and(seg);
|
||||
}
|
||||
if(!AuthUtil.hasRoleOr(RoleConstant.SYSADMIN.name(), RoleConstant.SCHOOL_UNION_ADMIN.name())) {
|
||||
if(AuthUtil.hasRoleOr(RoleConstant.BRANCH_UNION_ADMIN.name(), RoleConstant.BRANCH_UNION_CHAIRMAN.name())) {
|
||||
if (!AuthUtil.hasRoleOr(RoleConstant.SYSADMIN.name(), RoleConstant.SCHOOL_UNION_ADMIN.name())) {
|
||||
if (AuthUtil.hasRoleOr(RoleConstant.BRANCH_UNION_ADMIN.name(), RoleConstant.BRANCH_UNION_CHAIRMAN.name())) {
|
||||
cnd.and(View_user::getUnionId, "=", SecurityUtil.getUnionId());
|
||||
} else {
|
||||
cnd.and(View_user::getId, "=", SecurityUtil.getUserId());
|
||||
@@ -174,7 +183,7 @@ public class UnionReimburseApplyController {
|
||||
|
||||
@At
|
||||
@ApiOperation("查询职工慰问类型")
|
||||
@SaCheckLogin
|
||||
@SaCheckPermission(value = {"unionReimburse.apply", "h5.unionReimburse.apply"}, mode = SaMode.OR)
|
||||
public Result queryCondolenceType() {
|
||||
List<CondolenceType> list = typeService.query(Cnd.NEW().desc(CondolenceType::getCode));
|
||||
return Result.success(list);
|
||||
@@ -182,7 +191,7 @@ public class UnionReimburseApplyController {
|
||||
|
||||
@At
|
||||
@ApiOperation("查询校工会经费余额")
|
||||
@SaCheckPermission("unionReimburse.apply")
|
||||
@SaCheckPermission(value = {"unionReimburse.apply", "h5.unionReimburse.apply"}, mode = SaMode.OR)
|
||||
public Result getSchoolBudget() {
|
||||
OutlayManageSchool outlayManageSchool = dao.fetch(OutlayManageSchool.class,
|
||||
Cnd.where("year", "=", DateUtil.year(new Date())));
|
||||
@@ -197,7 +206,7 @@ public class UnionReimburseApplyController {
|
||||
|
||||
@At
|
||||
@ApiOperation("查询分工会经费余额")
|
||||
@SaCheckPermission("unionReimburse.apply")
|
||||
@SaCheckPermission(value = {"unionReimburse.apply", "h5.unionReimburse.apply"}, mode = SaMode.OR)
|
||||
public Result getUnionBalance() {
|
||||
OutlayManageUnion outlayManageUnion = dao.fetch(OutlayManageUnion.class,
|
||||
Cnd.where("unionId", "=", SecurityUtil.getUnionId()).and("year", "=", DateUtil.year(new Date())));
|
||||
@@ -211,7 +220,7 @@ public class UnionReimburseApplyController {
|
||||
|
||||
@At
|
||||
@ApiOperation("查询社团经费余额")
|
||||
@SaCheckPermission("unionReimburse.apply")
|
||||
@SaCheckPermission(value = {"unionReimburse.apply", "h5.unionReimburse.apply"}, mode = SaMode.OR)
|
||||
public Result getClubBudget(@Param("clubId") String clubId) {
|
||||
// 检查clubId参数是否为空
|
||||
if (StrUtil.isBlank(clubId)) {
|
||||
@@ -233,6 +242,4 @@ public class UnionReimburseApplyController {
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
+18
-9
@@ -1,10 +1,11 @@
|
||||
package com.budwk.app.zhgh.unionReimburse.controller;
|
||||
package com.budwk.app.zhgh.dayofficework.unionReimburse.controller;
|
||||
|
||||
import cn.afterturn.easypoi.excel.ExcelExportUtil;
|
||||
import cn.afterturn.easypoi.excel.entity.ExportParams;
|
||||
import cn.afterturn.easypoi.excel.entity.enmus.ExcelType;
|
||||
import cn.dev33.satoken.annotation.SaCheckLogin;
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import cn.dev33.satoken.annotation.SaMode;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.budwk.app.base.page.Pagination;
|
||||
import com.budwk.app.base.param.PageForm;
|
||||
@@ -13,10 +14,11 @@ import com.budwk.app.base.utils.CommonDownloadUtil;
|
||||
import com.budwk.app.flow.engine.FlowEngine;
|
||||
import com.budwk.app.sys.models.Sys_dict;
|
||||
import com.budwk.app.sys.services.SysDictService;
|
||||
import com.budwk.app.zhgh.unionReimburse.service.UnionReimburseService;
|
||||
import com.budwk.app.zhgh.unionReimburse.vo.UnionReimburseCollectExcelVO;
|
||||
import com.budwk.app.zhgh.dayofficework.unionReimburse.service.UnionReimburseService;
|
||||
import com.budwk.app.zhgh.dayofficework.unionReimburse.vo.UnionReimburseCollectExcelVO;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.poi.ss.usermodel.Workbook;
|
||||
import org.nutz.dao.Cnd;
|
||||
import org.nutz.dao.Dao;
|
||||
@@ -36,6 +38,7 @@ import java.util.List;
|
||||
@At("/platform/unionReimburse/collect")
|
||||
@Ok("json:full")
|
||||
@Api("查询统计")
|
||||
@Slf4j
|
||||
public class UnionReimburseCollectController {
|
||||
|
||||
@Inject
|
||||
@@ -49,14 +52,20 @@ public class UnionReimburseCollectController {
|
||||
@Inject
|
||||
private UnionReimburseService unionReimburseService;
|
||||
|
||||
@At("")
|
||||
@Ok("beetl:/platform/zhgh/unionReimburse/collect/index.html")
|
||||
@SaCheckLogin
|
||||
public void index() {}
|
||||
@At("/index")
|
||||
@Ok("beetl:/platform/zhgh/dayofficework/unionReimburse/collect/index.html")
|
||||
@SaCheckPermission("unionReimburse.collect")
|
||||
public void index() {
|
||||
}
|
||||
@At("/h5")
|
||||
@Ok("beetl:/platform/zhghh5/dayofficework/unionReimburse/collect/index.html")
|
||||
@SaCheckPermission("h5.unionReimburse.collect")
|
||||
public void h5Index() {
|
||||
}
|
||||
|
||||
@At
|
||||
@ApiOperation("分页查询")
|
||||
@SaCheckPermission("unionReimburse.collect")
|
||||
@SaCheckPermission(value = {"unionReimburse.collect", "h5.unionReimburse.collect"}, mode = SaMode.OR)
|
||||
public Result pageData(PageForm pageForm,
|
||||
@Param(value = "year") Integer year,
|
||||
@Param(value = "unionId") String unionId,
|
||||
@@ -115,7 +124,7 @@ public class UnionReimburseCollectController {
|
||||
|
||||
@At
|
||||
@Ok("void")
|
||||
@SaCheckPermission("unionReimburse.collect")
|
||||
@SaCheckPermission(value = {"unionReimburse.collect", "h5.unionReimburse.collect"}, mode = SaMode.OR)
|
||||
@ApiOperation("导出报销汇总表")
|
||||
public void onExport(@Param(value = "year") Integer year,
|
||||
@Param(value = "unionId") String unionId,
|
||||
+19
-11
@@ -1,7 +1,8 @@
|
||||
package com.budwk.app.zhgh.unionReimburse.controller;
|
||||
package com.budwk.app.zhgh.dayofficework.unionReimburse.controller;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckLogin;
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import cn.dev33.satoken.annotation.SaMode;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.budwk.app.base.annotation.SLog;
|
||||
import com.budwk.app.base.page.Pagination;
|
||||
@@ -9,15 +10,14 @@ import com.budwk.app.base.param.PageForm;
|
||||
import com.budwk.app.base.result.Result;
|
||||
import com.budwk.app.flow.engine.FlowEngine;
|
||||
import com.budwk.app.web.commons.auth.utils.SecurityUtil;
|
||||
import com.budwk.app.zhgh.staffbenefit.condolence.model.Condolence;
|
||||
import com.budwk.app.zhgh.unionReimburse.service.UnionReimburseService;
|
||||
import com.budwk.app.zhgh.dayofficework.unionReimburse.service.UnionReimburseService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.nutz.aop.interceptor.ioc.TransAop;
|
||||
import org.nutz.dao.Cnd;
|
||||
import org.nutz.dao.Sqls;
|
||||
import org.nutz.dao.sql.Sql;
|
||||
import org.nutz.dao.util.cri.SqlExpressionGroup;
|
||||
import org.nutz.ioc.aop.Aop;
|
||||
import org.nutz.ioc.loader.annotation.Inject;
|
||||
import org.nutz.ioc.loader.annotation.IocBean;
|
||||
@@ -37,6 +37,7 @@ import org.nutz.mvc.annotation.Param;
|
||||
@At("/platform/unionReimburse/mine")
|
||||
@Api("工会报销我的")
|
||||
@Ok("json:full")
|
||||
@Slf4j
|
||||
public class UnionReimburseMineController {
|
||||
|
||||
@Inject
|
||||
@@ -44,14 +45,21 @@ public class UnionReimburseMineController {
|
||||
@Inject
|
||||
private FlowEngine flowEngine;
|
||||
|
||||
@At("")
|
||||
@Ok("beetl:/platform/zhgh/unionReimburse/mine/index.html")
|
||||
@SaCheckLogin
|
||||
public void index() {}
|
||||
|
||||
@At("/index")
|
||||
@Ok("beetl:/platform/zhgh/dayofficework/unionReimburse/mine/index.html")
|
||||
@SaCheckPermission("unionReimburse.mine")
|
||||
public void index() {
|
||||
}
|
||||
@At("/h5")
|
||||
@Ok("beetl:/platform/zhghh5/dayofficework/unionReimburse/mine/index.html")
|
||||
@SaCheckPermission("h5.unionReimburse.mine")
|
||||
public void h5Index() {
|
||||
}
|
||||
|
||||
@At
|
||||
@ApiOperation("分页查询")
|
||||
@SaCheckPermission("unionReimburse.mine")
|
||||
@SaCheckPermission(value = {"unionReimburse.mine", "h5.unionReimburse.mine"}, mode = SaMode.OR)
|
||||
public Result pageData(PageForm pageForm,
|
||||
@Param(value = "year") Integer year,
|
||||
@Param(value = "unionId") String unionId,
|
||||
@@ -108,8 +116,8 @@ public class UnionReimburseMineController {
|
||||
@At
|
||||
@ApiOperation("删除")
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
@SaCheckPermission("unionReimburse.mine")
|
||||
@SLog(type = "unionReimburse", tag = "删除工会报销", msg = "删除工会报销")
|
||||
@SaCheckPermission(value = {"unionReimburse.mine", "h5.unionReimburse.mine"}, mode = SaMode.OR)
|
||||
@SLog( tag = "删除工会报销", msg = "删除工会报销")
|
||||
public Result delete(@Param("id") String id) {
|
||||
unionReimburseService.delete(id);
|
||||
flowEngine.processInstanceService().deleteProcessInstanceByBusinessKey(id);
|
||||
+17
-8
@@ -1,8 +1,9 @@
|
||||
package com.budwk.app.zhgh.unionReimburse.controller;
|
||||
package com.budwk.app.zhgh.dayofficework.unionReimburse.controller;
|
||||
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckLogin;
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import cn.dev33.satoken.annotation.SaMode;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.budwk.app.base.page.Pagination;
|
||||
import com.budwk.app.base.param.PageForm;
|
||||
@@ -10,9 +11,10 @@ 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.unionReimburse.service.UnionReimburseService;
|
||||
import com.budwk.app.zhgh.dayofficework.unionReimburse.service.UnionReimburseService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.nutz.dao.Cnd;
|
||||
import org.nutz.dao.Sqls;
|
||||
import org.nutz.dao.sql.Sql;
|
||||
@@ -21,7 +23,6 @@ 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 org.nutz.mvc.annotation.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@@ -29,19 +30,27 @@ import java.util.List;
|
||||
@At("/platform/unionReimburse/review")
|
||||
@Ok("json:full")
|
||||
@Api("审核报销")
|
||||
@Slf4j
|
||||
public class UnionReimburseReviewController {
|
||||
|
||||
@Inject
|
||||
private UnionReimburseService unionReimburseService;
|
||||
|
||||
@At("")
|
||||
@Ok("beetl:/platform/zhgh/unionReimburse/review/index.html")
|
||||
@SaCheckLogin
|
||||
public void index() {}
|
||||
|
||||
@At("/index")
|
||||
@Ok("beetl:/platform/zhgh/dayofficework/unionReimburse/review/index.html")
|
||||
@SaCheckPermission("unionReimburse.review")
|
||||
public void index() {
|
||||
}
|
||||
@At("/h5")
|
||||
@Ok("beetl:/platform/zhghh5/dayofficework/unionReimburse/review/index.html")
|
||||
@SaCheckPermission("h5.unionReimburse.review")
|
||||
public void h5Index() {
|
||||
}
|
||||
|
||||
@At
|
||||
@ApiOperation("分页查询")
|
||||
@SaCheckPermission("unionReimburse.review")
|
||||
@SaCheckPermission(value = {"unionReimburse.review", "h5.unionReimburse.review"}, mode = SaMode.OR)
|
||||
public Result pageData(PageForm pageForm,
|
||||
boolean approval,
|
||||
Integer year,
|
||||
+2
-2
@@ -1,4 +1,4 @@
|
||||
package com.budwk.app.zhgh.unionReimburse.interceptor;
|
||||
package com.budwk.app.zhgh.dayofficework.unionReimburse.interceptor;
|
||||
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import com.budwk.app.base.exception.BaseException;
|
||||
@@ -11,7 +11,7 @@ import com.budwk.app.zhgh.dayofficework.outlay.outlayManage.club.model.OutlayMan
|
||||
import com.budwk.app.zhgh.dayofficework.outlay.outlayManage.model.OutlayUseDetail;
|
||||
import com.budwk.app.zhgh.dayofficework.outlay.outlayManage.school.model.OutlayManageSchool;
|
||||
import com.budwk.app.zhgh.dayofficework.outlay.outlayManage.union.model.OutlayManageUnion;
|
||||
import com.budwk.app.zhgh.unionReimburse.model.UnionReimburse;
|
||||
import com.budwk.app.zhgh.dayofficework.unionReimburse.model.UnionReimburse;
|
||||
import org.nutz.dao.Cnd;
|
||||
import org.nutz.dao.Dao;
|
||||
import org.nutz.json.Json;
|
||||
+3
-3
@@ -1,4 +1,4 @@
|
||||
package com.budwk.app.zhgh.unionReimburse.model;
|
||||
package com.budwk.app.zhgh.dayofficework.unionReimburse.model;
|
||||
|
||||
import cn.hutool.db.DaoTemplate;
|
||||
import cn.hutool.json.JSONObject;
|
||||
@@ -187,8 +187,8 @@ public class UnionReimburse extends BaseModel {
|
||||
|
||||
@Column
|
||||
@Comment("活动类型(1.分工会,2.校工会,3.社团)")
|
||||
@ColDefine(type = ColType.INT, width = 2)
|
||||
private Integer activityType;
|
||||
@ColDefine(type = ColType.VARCHAR, width = 32)
|
||||
private String activityType;
|
||||
|
||||
@Column
|
||||
@Comment("活动人数")
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
package com.budwk.app.zhgh.dayofficework.unionReimburse.service;
|
||||
|
||||
import com.budwk.app.base.service.BaseService;
|
||||
import com.budwk.app.zhgh.dayofficework.unionReimburse.model.UnionReimburse;
|
||||
|
||||
public interface UnionReimburseService extends BaseService<UnionReimburse> {
|
||||
}
|
||||
+3
-4
@@ -1,10 +1,9 @@
|
||||
package com.budwk.app.zhgh.unionReimburse.service.impl;
|
||||
package com.budwk.app.zhgh.dayofficework.unionReimburse.service.impl;
|
||||
|
||||
|
||||
import com.budwk.app.base.service.BaseService;
|
||||
import com.budwk.app.base.service.impl.BaseServiceImpl;
|
||||
import com.budwk.app.zhgh.unionReimburse.model.UnionReimburse;
|
||||
import com.budwk.app.zhgh.unionReimburse.service.UnionReimburseService;
|
||||
import com.budwk.app.zhgh.dayofficework.unionReimburse.model.UnionReimburse;
|
||||
import com.budwk.app.zhgh.dayofficework.unionReimburse.service.UnionReimburseService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.nutz.dao.Dao;
|
||||
import org.nutz.ioc.loader.annotation.IocBean;
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package com.budwk.app.zhgh.unionReimburse.vo;
|
||||
package com.budwk.app.zhgh.dayofficework.unionReimburse.vo;
|
||||
|
||||
import cn.afterturn.easypoi.excel.annotation.Excel;
|
||||
import lombok.Data;
|
||||
+14
-6
@@ -6,6 +6,7 @@ import cn.afterturn.easypoi.excel.entity.ExportParams;
|
||||
import cn.afterturn.easypoi.excel.entity.enmus.ExcelType;
|
||||
import cn.afterturn.easypoi.excel.entity.params.ExcelExportEntity;
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import cn.dev33.satoken.annotation.SaMode;
|
||||
import com.budwk.app.base.annotation.SLog;
|
||||
import com.budwk.app.base.page.Pagination;
|
||||
import com.budwk.app.base.param.PageForm;
|
||||
@@ -51,14 +52,21 @@ public class ChildManageManageController {
|
||||
@Inject
|
||||
private SysDictService sysDictService;
|
||||
|
||||
@At("")
|
||||
|
||||
@At("/index")
|
||||
@Ok("beetl:/platform/zhgh/staffmanage/childManage/manage/index.html")
|
||||
@SaCheckPermission
|
||||
public void index() {}
|
||||
@SaCheckPermission("childManage.manage")
|
||||
public void index() {
|
||||
}
|
||||
@At("/h5")
|
||||
@Ok("beetl:/platform/zhghh5/staffmanage/childManage/manage/index.html")
|
||||
@SaCheckPermission("h5.childManage.manage")
|
||||
public void h5Index() {
|
||||
}
|
||||
|
||||
@At
|
||||
@ApiOperation("分页查询")
|
||||
@SaCheckPermission("childManage.manage")
|
||||
@SaCheckPermission(value = {"childManage.manage", "h5.childManage.manage"}, mode = SaMode.OR)
|
||||
public Result pageData(PageForm pageForm,
|
||||
Integer year,
|
||||
String searchName,
|
||||
@@ -114,7 +122,7 @@ public class ChildManageManageController {
|
||||
@At
|
||||
@ApiOperation("删除子女信息")
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
@SaCheckPermission("childManage.manage")
|
||||
@SaCheckPermission(value = {"childManage.manage", "h5.childManage.manage"}, mode = SaMode.OR)
|
||||
@SLog(tag = "子女信息-我的填报", msg = "删除id: ${args[0]}")
|
||||
public Result doDelete(String id) {
|
||||
childManageService.dao().delete(ChildManage.class, id);
|
||||
@@ -123,7 +131,7 @@ public class ChildManageManageController {
|
||||
|
||||
@At
|
||||
@Ok("void")
|
||||
@SaCheckPermission("childManage.manage")
|
||||
@SaCheckPermission(value = {"childManage.manage", "h5.childManage.manage"}, mode = SaMode.OR)
|
||||
public void doExportExcel(@Param("data") ChildManagePageForm pageForm, HttpServletResponse response) {
|
||||
try {
|
||||
Sql sql = childManageService.getSql(pageForm);
|
||||
|
||||
+13
-6
@@ -2,6 +2,7 @@ package com.budwk.app.zhgh.staffmanage.childManage.controller;
|
||||
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import cn.dev33.satoken.annotation.SaMode;
|
||||
import com.budwk.app.base.annotation.SLog;
|
||||
import com.budwk.app.base.page.Pagination;
|
||||
import com.budwk.app.base.param.PageForm;
|
||||
@@ -32,14 +33,20 @@ public class ChildManageMineController {
|
||||
@Inject
|
||||
private ChildManageService childManageService;
|
||||
|
||||
@At("")
|
||||
@At("/index")
|
||||
@Ok("beetl:/platform/zhgh/staffmanage/childManage/mine/index.html")
|
||||
@SaCheckPermission
|
||||
public void index() {}
|
||||
@SaCheckPermission("childManage.mine")
|
||||
public void index() {
|
||||
}
|
||||
@At("/h5")
|
||||
@Ok("beetl:/platform/zhghh5/staffmanage/childManage/mine/index.html")
|
||||
@SaCheckPermission("h5.childManage.mine")
|
||||
public void h5Index() {
|
||||
}
|
||||
|
||||
@At
|
||||
@ApiOperation("分页查询")
|
||||
@SaCheckPermission("childManage.mine")
|
||||
@SaCheckPermission(value = {"childManage.mine", "h5.childManage.mine"}, mode = SaMode.OR)
|
||||
public Result pageData(PageForm pageForm, Integer year) {
|
||||
Sql sql = Sqls.create("""
|
||||
SELECT
|
||||
@@ -62,8 +69,8 @@ public class ChildManageMineController {
|
||||
@At
|
||||
@ApiOperation("删除子女信息")
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
@SaCheckPermission("childManage.mine")
|
||||
@SLog(tag = "子女信息-我的填报", msg = "删除id: ${args[0]}")
|
||||
@SaCheckPermission(value = {"childManage.mine", "h5.childManage.mine"}, mode = SaMode.OR)
|
||||
@SLog(tag = "子女信息-我的填报", msg = "删除id: ${args[0]}")
|
||||
public Result doDelete(String id) {
|
||||
childManageService.dao().delete(ChildManage.class, id);
|
||||
return Result.success();
|
||||
|
||||
+13
-6
@@ -3,6 +3,7 @@ package com.budwk.app.zhgh.staffmanage.childManage.controller;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckLogin;
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import cn.dev33.satoken.annotation.SaMode;
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.budwk.app.base.annotation.SLog;
|
||||
@@ -41,14 +42,20 @@ public class ChildManageWriteController {
|
||||
private ChildManageService childManageService;
|
||||
|
||||
|
||||
@At("")
|
||||
@At("/index")
|
||||
@Ok("beetl:/platform/zhgh/staffmanage/childManage/write/index.html")
|
||||
@SaCheckPermission
|
||||
public void index() {}
|
||||
@SaCheckPermission("childManage.write")
|
||||
public void index() {
|
||||
}
|
||||
@At("/h5")
|
||||
@Ok("beetl:/platform/zhghh5/staffmanage/childManage/write/index.html")
|
||||
@SaCheckPermission("h5.childManage.write")
|
||||
public void h5Index() {
|
||||
}
|
||||
|
||||
@At
|
||||
@ApiOperation("保存子女信息")
|
||||
@SaCheckPermission("childManage.write")
|
||||
@SaCheckPermission(value = {"childManage.write", "h5.childManage.write"}, mode = SaMode.OR)
|
||||
@SLog(tag = "子女信息管理-信息填写", msg = "保存子女信息")
|
||||
public Result save(@Param("data") ChildManage childManage) {
|
||||
if(StrUtil.isBlank(childManage.getId())) childManage.setApplyTime(DateUtil.now());
|
||||
@@ -58,7 +65,7 @@ public class ChildManageWriteController {
|
||||
|
||||
@At
|
||||
@ApiOperation("查询用户")
|
||||
@SaCheckPermission("childManage.write")
|
||||
@SaCheckPermission(value = {"childManage.write", "h5.childManage.write"}, mode = SaMode.OR)
|
||||
@SLog(tag = "查询用户", msg = "查询用户")
|
||||
public Object listUser(String keyword) {
|
||||
Sql sql = Sqls.create("""
|
||||
@@ -98,7 +105,7 @@ public class ChildManageWriteController {
|
||||
}
|
||||
|
||||
@At
|
||||
@SaCheckLogin
|
||||
@SaCheckPermission(value = {"childManage.write", "h5.childManage.write"}, mode = SaMode.OR)
|
||||
@ApiOperation("查询身份证是否重复")
|
||||
public Result getIsRepeatByIdCard(String idCard, String id) {
|
||||
int count = childManageService.dao().count(ChildManage.class,
|
||||
|
||||
-20
@@ -1,20 +0,0 @@
|
||||
package com.budwk.app.zhgh.staffmanage.childManage.h5controller;
|
||||
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.nutz.ioc.loader.annotation.IocBean;
|
||||
import org.nutz.mvc.annotation.At;
|
||||
import org.nutz.mvc.annotation.Ok;
|
||||
|
||||
@IocBean
|
||||
@At("/platform/h5/childManage/manage")
|
||||
@Ok("json:full")
|
||||
@Slf4j
|
||||
public class H5ChildManageManageController {
|
||||
|
||||
@At("")
|
||||
@Ok("beetl:/platform/zhghh5/staffmanage/childManage/manage/index.html")
|
||||
@SaCheckPermission("h5.childManage.manage")
|
||||
public void index() {}
|
||||
}
|
||||
-27
@@ -1,27 +0,0 @@
|
||||
package com.budwk.app.zhgh.staffmanage.childManage.h5controller;
|
||||
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import com.budwk.app.zhgh.staffmanage.childManage.service.ChildManageService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.nutz.ioc.loader.annotation.Inject;
|
||||
import org.nutz.ioc.loader.annotation.IocBean;
|
||||
import org.nutz.mvc.annotation.At;
|
||||
import org.nutz.mvc.annotation.Ok;
|
||||
|
||||
@IocBean
|
||||
@At("/platform/h5/childManage/mine")
|
||||
@Ok("json:full")
|
||||
@Slf4j
|
||||
public class H5ChildManageMineController {
|
||||
|
||||
@Inject
|
||||
private ChildManageService childManageService;
|
||||
|
||||
@At("")
|
||||
@Ok("beetl:/platform/zhghh5/staffmanage/childManage/mine/index.html")
|
||||
@SaCheckPermission("h5.childManage.mine")
|
||||
public void index() {}
|
||||
|
||||
|
||||
}
|
||||
-30
@@ -1,30 +0,0 @@
|
||||
package com.budwk.app.zhgh.staffmanage.childManage.h5controller;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.nutz.dao.Dao;
|
||||
import org.nutz.ioc.loader.annotation.Inject;
|
||||
import org.nutz.ioc.loader.annotation.IocBean;
|
||||
import org.nutz.mvc.annotation.At;
|
||||
import org.nutz.mvc.annotation.Ok;
|
||||
|
||||
/**
|
||||
* @version 1.0
|
||||
* @Author hqw
|
||||
* @name:H5ChildManageController
|
||||
* @Date 2025/9/4 8:52
|
||||
* @注释
|
||||
*/
|
||||
@Slf4j
|
||||
@IocBean
|
||||
@Ok("json")
|
||||
@At("/platform/h5/childManage/write")
|
||||
public class H5ChildManageWriteController {
|
||||
|
||||
@At("")
|
||||
@Ok("beetl:/platform/zhghh5/staffmanage/childManage/write/index.html")
|
||||
@SaCheckPermission("h5.childManage.write")
|
||||
public void index() {
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,7 +0,0 @@
|
||||
package com.budwk.app.zhgh.unionReimburse.service;
|
||||
|
||||
import com.budwk.app.base.service.BaseService;
|
||||
import com.budwk.app.zhgh.unionReimburse.model.UnionReimburse;
|
||||
|
||||
public interface UnionReimburseService extends BaseService<UnionReimburse> {
|
||||
}
|
||||
@@ -105,7 +105,7 @@ const apply = {
|
||||
watch: {
|
||||
applyTime() {
|
||||
this.$nextTick(async () => {
|
||||
await this.queryAllowTime()
|
||||
await this.queryAllowDay()
|
||||
})
|
||||
},
|
||||
},
|
||||
@@ -166,7 +166,7 @@ const apply = {
|
||||
},
|
||||
async onOpen(row, applyRow = null) {
|
||||
this.row = row
|
||||
await this.queryAllowTime()
|
||||
await this.queryAllowDay()
|
||||
if(applyRow) {
|
||||
this.taskId = applyRow.taskId
|
||||
this.bizId = applyRow.bizId
|
||||
@@ -231,11 +231,11 @@ const apply = {
|
||||
}
|
||||
},
|
||||
// 查询哪些天是开放的
|
||||
async queryAllowTime() {
|
||||
async queryAllowDay() {
|
||||
const days = Array.from(document.querySelectorAll('.div-Calendar'))
|
||||
.map(el => el.getAttribute('data-day'))
|
||||
.sort()
|
||||
const {data} = await this.$axios.post("/platform/site/apply/queryAllowTime", {
|
||||
const {data} = await this.$axios.post("/platform/site/apply/queryAllowDay", {
|
||||
siteId: this.row.id,
|
||||
startTime: days[0],
|
||||
endTime: days[days.length - 1],
|
||||
@@ -254,17 +254,17 @@ const apply = {
|
||||
},
|
||||
},
|
||||
style: /*language=CSS*/ `
|
||||
.div-Calendar {
|
||||
::v-deep .div-Calendar {
|
||||
box-sizing: border-box;
|
||||
height: 100%;
|
||||
}
|
||||
.div-Calendar p {
|
||||
::v-deep .div-Calendar p {
|
||||
margin: 0;
|
||||
}
|
||||
.el-calendar-day:has(.not-allow-day) {
|
||||
::v-deep .el-calendar-day:has(.not-allow-day) {
|
||||
background-color: #F5F5F5;
|
||||
}
|
||||
.el-dialog__body {
|
||||
::v-deep .el-dialog__body {
|
||||
padding-top: 0;
|
||||
}
|
||||
`
|
||||
|
||||
@@ -3,19 +3,7 @@ layout("/layouts/platform.html"){
|
||||
#-->
|
||||
|
||||
<style>
|
||||
.div-Calendar {
|
||||
box-sizing: border-box;
|
||||
height: 100%;
|
||||
}
|
||||
.div-Calendar p {
|
||||
margin: 0;
|
||||
}
|
||||
.el-calendar-day:has(.not-allow-day) {
|
||||
background-color: #F5F5F5;
|
||||
}
|
||||
.el-dialog__body {
|
||||
padding-top: 0;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
|
||||
@@ -140,7 +140,7 @@ const basicForm = {
|
||||
style="width: 100%"
|
||||
placeholder="开始时间"
|
||||
v-model="row.startTime"
|
||||
:picker-options="{ start: '00:00',step: '00:30',end: '24:00'}">
|
||||
:picker-options="{ start: '00:00',step: '00:30',end: '23:59'}">
|
||||
</el-time-select>
|
||||
</template>
|
||||
</el-table-column>
|
||||
@@ -150,7 +150,7 @@ const basicForm = {
|
||||
style="width: 100%"
|
||||
placeholder="结束时间"
|
||||
v-model="row.endTime"
|
||||
:picker-options="{start: '00:00',step: '00:30',end: '24:00',minTime: row.start_time }">
|
||||
:picker-options="{start: '00:00',step: '00:30',end: '23:59',minTime: row.start_time }">
|
||||
</el-time-select>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
+7
-8
@@ -153,9 +153,9 @@ layout("/layouts/platform.html"){
|
||||
<el-descriptions-item label="活动类型" v-if="formData.reimburseProject === 'UNION_REIMBURSE_PROJECT_2'">
|
||||
<el-form-item label="活动类型" prop="activityType">
|
||||
<el-select v-model="formData.activityType" placeholder="请选择活动类型" style="width: 100%">
|
||||
<el-option label="分工会活动" value="1"></el-option>
|
||||
<el-option label="校工会活动" value="2"></el-option>
|
||||
<el-option label="协会(社团)活动" value="3"></el-option>
|
||||
<el-option label="分工会活动" value="分工会活动"></el-option>
|
||||
<el-option label="校工会活动" value="校工会活动"></el-option>
|
||||
<el-option label="协会(社团)活动" value="协会(社团)活动"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
@@ -216,7 +216,7 @@ layout("/layouts/platform.html"){
|
||||
<el-form-item prop="files" label="附件">
|
||||
<file-upload
|
||||
:value.sync="formData.files"
|
||||
:upload_number="5"
|
||||
:upload_number="10"
|
||||
upload_result_category="array"
|
||||
complete_result
|
||||
upload_mode="drag"
|
||||
@@ -251,7 +251,6 @@ layout("/layouts/platform.html"){
|
||||
paymentWay: [{required: true, message: '请选择支付方式', trigger: ["change", "blur"]}],
|
||||
reimburseProject: [{required: true, message: '请选择报销项目', trigger: ["change", "blur"]}],
|
||||
reimburseFundSource: [{required: true, message: '请选择经费来源', trigger: ["change", "blur"]}],
|
||||
mobile: [{required: true, message: '请填写联系方式', trigger: ["change", "blur"]}],
|
||||
bankUserName: [{required: true, message: '请填写户名', trigger: ["change", "blur"]}],
|
||||
bankCardNumber: [{required: true, message: '请填写银行账号', trigger: ["change", "blur"]}],
|
||||
bankOfDeposit: [{required: true, message: '请填写开户行', trigger: ["change", "blur"]}],
|
||||
@@ -349,7 +348,7 @@ layout("/layouts/platform.html"){
|
||||
this.$axios.post('/platform/unionReimburse/apply/save', {data: JSON.stringify(this.formData)}).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.$message.success(res.msg)
|
||||
window.location.href = '/platform/unionReimburse/mine'
|
||||
window.location.href = '/platform/unionReimburse/mine/index'
|
||||
}
|
||||
})
|
||||
})
|
||||
@@ -375,7 +374,7 @@ layout("/layouts/platform.html"){
|
||||
}).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.$message.success("提交成功")
|
||||
window.location.href = '/platform/unionReimburse/mine'
|
||||
window.location.href = '/platform/unionReimburse/mine/index'
|
||||
}
|
||||
})
|
||||
})
|
||||
@@ -402,7 +401,7 @@ layout("/layouts/platform.html"){
|
||||
}).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.$message.success("提交成功")
|
||||
window.location.href = '/platform/unionReimburse/mine'
|
||||
window.location.href = '/platform/unionReimburse/mine/index'
|
||||
}
|
||||
})
|
||||
})
|
||||
+2
-1
@@ -126,6 +126,7 @@ layout("/layouts/platform.html"){
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
pageDataUrl: "/platform/unionReimburse/collect/pageData",
|
||||
unionOptions: [],
|
||||
unitOptions: [],
|
||||
userOptions: [],
|
||||
@@ -175,7 +176,7 @@ layout("/layouts/platform.html"){
|
||||
})
|
||||
},
|
||||
onExport() {
|
||||
this.$downLoad(loc() + '/onExport', this.pageForm)
|
||||
this.$downLoad('/platform/unionReimburse/collect/onExport', this.pageForm)
|
||||
},
|
||||
onRevoke(row) {
|
||||
this.$confirm("您确定要撤回吗?", "提示", {
|
||||
+2
-1
@@ -126,6 +126,7 @@ layout("/layouts/platform.html"){
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
pageDataUrl: "/platform/unionReimburse/mine/pageData",
|
||||
unionOptions: [],
|
||||
unitOptions: [],
|
||||
userOptions: [],
|
||||
@@ -161,7 +162,7 @@ layout("/layouts/platform.html"){
|
||||
})
|
||||
},
|
||||
onEdit(row) {
|
||||
window.location.href = '/platform/unionReimburse/apply?taskId=' + (row.startTaskId || '') + "&bizId=" + row.id
|
||||
window.location.href = '/platform/unionReimburse/apply/index?taskId=' + (row.startTaskId || '') + "&bizId=" + row.id
|
||||
},
|
||||
onRevoke(row) {
|
||||
this.$confirm("您确定要撤回吗?", "提示", {
|
||||
+1
@@ -150,6 +150,7 @@ layout("/layouts/platform.html"){
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
pageDataUrl: "/platform/unionReimburse/review/pageData",
|
||||
pageForm: {
|
||||
approval: false
|
||||
},
|
||||
@@ -172,7 +172,7 @@ layout("/layouts/platform.html"){
|
||||
return age >= 0 ? age : '未出生';
|
||||
},
|
||||
openEdit(row) {
|
||||
window.location.href = '/platform/childManage/write?bizId=' + row.id + '&manage=1'
|
||||
window.location.href = '/platform/childManage/write/index?bizId=' + row.id + '&manage=1'
|
||||
},
|
||||
doDelete(id) {
|
||||
this.$confirm("您确定要删除吗?", "提示", {
|
||||
|
||||
@@ -119,7 +119,7 @@ layout("/layouts/platform.html"){
|
||||
return age >= 0 ? age : '未出生';
|
||||
},
|
||||
openEdit(row) {
|
||||
window.location.href = '/platform/childManage/write?bizId=' + row.id
|
||||
window.location.href = '/platform/childManage/write/index?bizId=' + row.id
|
||||
},
|
||||
doDelete(id) {
|
||||
this.$confirm("您确定要删除吗?", "提示", {
|
||||
|
||||
@@ -309,9 +309,9 @@ layout("/layouts/platform.html"){
|
||||
if (res.code === 0) {
|
||||
this.$message.success(res.msg)
|
||||
if (GetQueryString('manage') === '1') {
|
||||
window.location.href = '/platform/childManage/manage'
|
||||
window.location.href = '/platform/childManage/manage/index'
|
||||
}else {
|
||||
window.location.href = '/platform/childManage/mine'
|
||||
window.location.href = '/platform/childManage/mine/index'
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
@@ -8,8 +8,8 @@ layout("/layouts/platform_h5.html"){
|
||||
}
|
||||
|
||||
.list-card-body {
|
||||
width: calc(100% - 140px);
|
||||
display: flex;
|
||||
/* width: calc(100% - 140px);
|
||||
display: flex;*/
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
}
|
||||
@@ -35,6 +35,9 @@ layout("/layouts/platform_h5.html"){
|
||||
padding: 5px;
|
||||
border-radius: 5px;
|
||||
}
|
||||
.list-card-img img{
|
||||
width: 100%;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div id="app" v-cloak>
|
||||
@@ -44,6 +47,7 @@ layout("/layouts/platform_h5.html"){
|
||||
<year-van-dropdown-item :num="5" @change="doSearch" v-model="pageForm.year"></year-van-dropdown-item>
|
||||
<van-dropdown-item :options="stateList" @change="doSearch" v-model="pageForm.state"></van-dropdown-item>
|
||||
<van-dropdown-item :options="isEnrolledOptions" @change="doSearch" v-model="pageForm.isEnrolledText"></van-dropdown-item>
|
||||
<van-dropdown-item :options="activityTypeOptions" @change="doSearch" v-model="pageForm.activity_type"></van-dropdown-item>
|
||||
</van-dropdown-menu>
|
||||
</van-sticky>
|
||||
|
||||
@@ -115,12 +119,13 @@ layout("/layouts/platform_h5.html"){
|
||||
loading: false,
|
||||
refreshing: false,
|
||||
pageForm: {
|
||||
state: 2,
|
||||
state: 1,
|
||||
isEnrolledText: 0,
|
||||
year: new Date().getFullYear(),
|
||||
pageNumber: 1,
|
||||
pageSize: 5,
|
||||
totalCount: 0
|
||||
totalCount: 0,
|
||||
activity_type: 40001
|
||||
},
|
||||
yearList: [],
|
||||
isEnrolledOptions: [
|
||||
@@ -134,7 +139,12 @@ layout("/layouts/platform_h5.html"){
|
||||
],
|
||||
subLoading: false,
|
||||
viewShow: false,
|
||||
viewData: {}
|
||||
viewData: {},
|
||||
activityTypeOptions: [
|
||||
{ value: 40001, text: "校文化活动" },
|
||||
{ value: 40002, text: "分工会文化活动" },
|
||||
{ value: 40003, text: "协会文化活动" },
|
||||
]
|
||||
}
|
||||
},
|
||||
components: {
|
||||
|
||||
@@ -301,7 +301,6 @@ layout("/layouts/platform_h5.html"){
|
||||
<span>取消报名</span>
|
||||
<span style="font-size: 12px; margin-top: 5px">{{viewData.applyEndTime}}截止报名</span>
|
||||
</div>
|
||||
|
||||
<div class="bottom-button" v-if="$moment(viewData.endTime).valueOf() < $moment().valueOf()">活动已结束</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -0,0 +1,168 @@
|
||||
<!--#
|
||||
layout("/layouts/platform_h5.html"){
|
||||
#-->
|
||||
|
||||
<div id="app">
|
||||
<!-- 导航栏 -->
|
||||
|
||||
<van-nav-bar title="资产盘点" left-text="返回" left-arrow placeholder
|
||||
@click-left="historyBack" fixed></van-nav-bar>
|
||||
|
||||
<van-sticky offset-top="46px">
|
||||
<van-search
|
||||
:reverse-color="false"
|
||||
:show-action="false"
|
||||
@search="doSearch"
|
||||
input-align="left"
|
||||
placeholder="请输入编号或名称搜索"
|
||||
v-model="pageForm.searchKeyword"
|
||||
></van-search>
|
||||
<van-tabs v-model="pageForm.isStocktakingText"
|
||||
@change="(val)=>{this.pageForm.isStocktaking = val==='1';this.doSearch();}">
|
||||
<van-tab title="已盘点" name="1"></van-tab>
|
||||
<van-tab title="未盘点" name="0"></van-tab>
|
||||
</van-tabs>
|
||||
</van-sticky>
|
||||
|
||||
<table-list api="/platform/asset/stocktaking/pageData" :page_form.sync="pageForm"
|
||||
ref="tableListRef"
|
||||
title="assetNumber" @ready="onReady">
|
||||
<template v-slot="{index,row}">
|
||||
<table-column label="资产名称">{{row.assetName}}</table-column>
|
||||
<table-column label="类别名称"> {{row.assetTypeCode===1?'校工会资产':'分工会资产'}}</table-column>
|
||||
<table-column label="存放地点">{{row.assetStorageLocation}}</table-column>
|
||||
<table-column label="责任人">{{row.assetUseUserName}}</table-column>
|
||||
<table-column label="折旧到期日期"> {{$moment(row.assetRetiredAssetsDate).format('YYYY-MM-DD')}}
|
||||
</table-column>
|
||||
<table-column label="使用状况">{{row.assetUsageStateName}}</table-column>
|
||||
</template>
|
||||
<template #actions="{index,row}">
|
||||
<div class="action-btn" @click="onView(row)">
|
||||
<i class="fa fa-eye"></i>
|
||||
<span>查看</span>
|
||||
</div>
|
||||
<div class="action-btn" v-if="!row.isStocktaking"
|
||||
:disabled="stocktakingPlanOption.length==0
|
||||
||!pageForm.assetStocktakingPlanId
|
||||
||!stocktakingPlanOption.find(p=>p.id===pageForm.assetStocktakingPlanId).isShow"
|
||||
@click="onAudit(row)">
|
||||
<i class="fa fa-edit"></i>
|
||||
<span>开始盘点</span>
|
||||
</div>
|
||||
<div class="action-btn delete" v-if="row.isStocktaking"
|
||||
:disabled="stocktakingPlanOption.length==0
|
||||
||!pageForm.assetStocktakingPlanId
|
||||
||!stocktakingPlanOption.find(p=>p.id===pageForm.assetStocktakingPlanId).isShow"
|
||||
@click="onRevoke(row)">
|
||||
<i class="fa fa-undo"></i>
|
||||
<span>删除盘点</span>
|
||||
</div>
|
||||
</template>
|
||||
</table-list>
|
||||
|
||||
|
||||
<h5-asset-info ref="h5AssetInfoRef"></h5-asset-info>
|
||||
|
||||
<h5-asset-stocktaking-form ref="h5AssetStocktakingFormRef" @save_success="doSearch"></h5-asset-stocktaking-form>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
<!--#include("info.js"){}#-->
|
||||
<!--#include("stocktakingForm.js"){}#-->
|
||||
const vue = new Vue({
|
||||
el: "#app",
|
||||
store,
|
||||
data() {
|
||||
return {
|
||||
assetCategoryOption: [],
|
||||
stocktakingPlanOption: [],
|
||||
unionList: [],
|
||||
pageForm: {
|
||||
pageNumber: 1,
|
||||
pageSize: 10,
|
||||
totalCount: 0,
|
||||
isStocktakingText: "0",
|
||||
isStocktaking: false,
|
||||
}
|
||||
}
|
||||
},
|
||||
components: {
|
||||
"h5-asset-info": H5_ASSET_INFO,
|
||||
"h5-asset-stocktaking-form": H5_ASSET_STOCKTAKING_FORM,
|
||||
},
|
||||
methods: {
|
||||
onRevoke(row) {
|
||||
this.$dialog.confirm({
|
||||
title: "提示",
|
||||
message: "您确定要删除本次盘点信息吗?"
|
||||
}).then(() => {
|
||||
this.$axios.post("/platform/asset/stocktaking/doDelete", {
|
||||
id: row.id,
|
||||
assetStocktakingPlanId: this.pageForm.assetStocktakingPlanId
|
||||
}).then(resp => {
|
||||
if (resp.code === 0) {
|
||||
this.doSearch()
|
||||
this.$toast.success(resp.msg)
|
||||
} else {
|
||||
this.$toast.fail(resp.msg)
|
||||
}
|
||||
})
|
||||
|
||||
})
|
||||
},
|
||||
onAudit(row) {
|
||||
row.assetStocktakingPlanId = this.pageForm.assetStocktakingPlanId
|
||||
this.$refs.h5AssetStocktakingFormRef.onOpen(row)
|
||||
|
||||
},
|
||||
onView(row) {
|
||||
this.$refs.h5AssetInfoRef.onOpen(row)
|
||||
},
|
||||
// 查询资产类别
|
||||
queryCategory() {
|
||||
this.$axios.post("/platform/asset/category/queryCategory").then(resp => {
|
||||
if (resp.code === 0) {
|
||||
this.assetCategoryOption = resp.data
|
||||
}
|
||||
})
|
||||
},
|
||||
// 按年度查询资产盘点计划
|
||||
async queryStocktakingPlan() {
|
||||
const resp = await this.$axios.post("/platform/asset/stocktakingPlan/queryStocktakingPlan")
|
||||
if (resp.code === 0) {
|
||||
resp.data.forEach(v => {
|
||||
const startDate = this.$moment(v.startDate).format('YYYY-MM-DD')
|
||||
const endDate = this.$moment(v.endDate).format('YYYY-MM-DD')
|
||||
v.name = startDate + "至" + endDate + "(" + v.year + ")"
|
||||
v.isShow = (this.$moment().format('YYYY-MM-DD hh:mm:ss') > v.startDate && this.$moment().format('YYYY-MM-DD hh:mm:ss') < v.endDate)
|
||||
})
|
||||
this.stocktakingPlanOption = resp.data
|
||||
if (this.stocktakingPlanOption && this.stocktakingPlanOption.length > 0) {
|
||||
this.$set(this.pageForm, "assetStocktakingPlanId", this.stocktakingPlanOption[0].id)
|
||||
} else {
|
||||
this.$set(this.pageForm, "assetStocktakingPlanId", null)
|
||||
}
|
||||
this.doSearch()
|
||||
}
|
||||
},
|
||||
doSearch() {
|
||||
this.$nextTick(() => {
|
||||
this.pageForm.pageNumber = 1
|
||||
this.pageForm.totalCount = 0
|
||||
this.$refs.tableListRef.doSearch()
|
||||
})
|
||||
},
|
||||
onReady() {
|
||||
this.queryCategory()
|
||||
this.queryStocktakingPlan()
|
||||
}
|
||||
},
|
||||
created() {
|
||||
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,124 @@
|
||||
const H5_ASSET_INFO = {
|
||||
template: /*language=HTML*/ `
|
||||
<van-action-sheet v-model="visible" title="查看详情" ref="actionSheetRef">
|
||||
<van-tabs v-model="activeName">
|
||||
<van-tab title="资产基本信息" name="1">
|
||||
</van-tab>
|
||||
<van-tab title="盘点信息" name="2">
|
||||
</van-tab>
|
||||
</van-tabs>
|
||||
|
||||
<div class="detail-container" v-if="activeName==='1'">
|
||||
<van-cell-group>
|
||||
<van-cell title="资产编号">
|
||||
{{ viewData.assetNumber }}
|
||||
</van-cell>
|
||||
<van-cell title="资产名称">
|
||||
{{ viewData.assetName }}
|
||||
</van-cell>
|
||||
<van-cell title="资产类别">
|
||||
{{viewData.assetCategoryName}}({{viewData.assetDepreciationYear}}年)
|
||||
</van-cell>
|
||||
<van-cell title="资产规格型号">
|
||||
{{viewData.assetSpecs}}
|
||||
</van-cell>
|
||||
<van-cell title="供应商名称">
|
||||
{{viewData.assetSupplierName}}
|
||||
</van-cell>
|
||||
<van-cell title="采购方式">
|
||||
{{viewData.assetFundingSubjectName}}
|
||||
</van-cell>
|
||||
<van-cell title="单价(元)">
|
||||
{{viewData.assetUnitPrice}}
|
||||
</van-cell>
|
||||
<van-cell title="数量(台/件)">
|
||||
{{viewData.assetQuantity}}
|
||||
</van-cell>
|
||||
<van-cell title="资产类型">
|
||||
{{viewData.assetTypeCode===1?'校工会资产':'分工会资产'}}
|
||||
</van-cell>
|
||||
<van-cell title="开始使用日期">
|
||||
{{$moment(viewData.assetUsedDate).format('YYYY-MM-DD')}}
|
||||
</van-cell>
|
||||
<van-cell title="预计报废时间">
|
||||
{{$moment(viewData.assetRetiredAssetsDate).format('YYYY-MM-DD')}}
|
||||
</van-cell>
|
||||
<van-cell title="责任人">
|
||||
{{viewData.assetUseUserName}}
|
||||
</van-cell>
|
||||
<van-cell title="使用/管理部门">
|
||||
{{viewData.assetUseUnionName}}
|
||||
</van-cell>
|
||||
<van-cell title="存放地点">
|
||||
{{viewData.assetStorageLocation}}
|
||||
</van-cell>
|
||||
<van-cell title="使用状况">
|
||||
{{viewData.assetUsageStateName}}
|
||||
</van-cell>
|
||||
<van-cell title="备注" class="direction-column-cell">
|
||||
<div style="white-space: pre">{{viewData.assetNotes}}</div>
|
||||
</van-cell>
|
||||
</van-cell-group>
|
||||
</div>
|
||||
|
||||
<div class="detail-container" v-else-if="activeName==='2'">
|
||||
<template v-for="item in viewData.assetStocktakingList"
|
||||
v-if="viewData.assetStocktakingList&&viewData.assetStocktakingList.length>0">
|
||||
<van-cell-group :title="$moment(item.createdAt).format('YYYY-MM-DD HH:mm:ss')">
|
||||
<van-cell title="原责任人">
|
||||
{{ item.oldAssetUseUserName }}
|
||||
</van-cell>
|
||||
<van-cell title="原使用/管理部门">
|
||||
{{ item.oldAssetUseUnionName }}
|
||||
</van-cell>
|
||||
<van-cell title="原存放地点">
|
||||
{{ item.oldAssetStorageLocation }}
|
||||
</van-cell>
|
||||
<van-cell title="原使用状况">
|
||||
{{ item.oldAssetUsageStateName }}
|
||||
</van-cell>
|
||||
<!-- <van-cell title="操作时间">
|
||||
{{$moment(item.createdAt).format('YYYY-MM-DD HH:mm:ss')}}
|
||||
</van-cell>-->
|
||||
<van-cell title="旧备注" class="direction-column-cell">
|
||||
<div style="white-space: pre">{{item.oldAssetNotes}}</div>
|
||||
</van-cell>
|
||||
<van-cell title="旧资产图片" class="direction-column-cell">
|
||||
{{item.oldAssetFiles}}
|
||||
</van-cell>
|
||||
</van-cell-group>
|
||||
</template>
|
||||
<template v-if="viewData.assetStocktakingList&&viewData.assetStocktakingList.length===0">
|
||||
<van-empty description="暂无数据" ></van-empty>
|
||||
</template>
|
||||
</div>
|
||||
</van-action-sheet>
|
||||
`,
|
||||
data() {
|
||||
return {
|
||||
visible: false,
|
||||
viewData: {},
|
||||
row: null,
|
||||
activeName: "1",
|
||||
actionSheetRef: null
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 打开
|
||||
onOpen(row) {
|
||||
this.activeName = "1"
|
||||
this.row = row
|
||||
this.visible = true
|
||||
this.getInfo()
|
||||
},
|
||||
// 获取申请信息
|
||||
getInfo() {
|
||||
this.$axios.post('/platform/asset/manage/fondOneAsset', {id: this.row.id}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.viewData = res.data
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
}
|
||||
}
|
||||
+192
@@ -0,0 +1,192 @@
|
||||
let H5_ASSET_STOCKTAKING_FORM = {
|
||||
template: /*language=HTML*/ `
|
||||
<van-action-sheet v-model="visible" title="盘点信息">
|
||||
<div>
|
||||
<div class="form-container">
|
||||
<van-form ref="formRef">
|
||||
<van-cell-group title="资产信息">
|
||||
<van-field label="资产编号"
|
||||
:rules="[{ required: true }]"
|
||||
v-model="formData.assetNumber"
|
||||
readonly
|
||||
required></van-field>
|
||||
<van-field label="资产名称"
|
||||
:rules="[{ required: true }]"
|
||||
v-model="formData.assetName"
|
||||
readonly
|
||||
required></van-field>
|
||||
<van-field label="开始使用日期"
|
||||
:rules="[{ required: true }]"
|
||||
v-model="$moment(formData.assetUsedDate).format('YYYY-MM-DD')"
|
||||
readonly
|
||||
required></van-field>
|
||||
<van-field label="存放地点"
|
||||
:rules="[{ required: true }]"
|
||||
v-model="formData.assetStorageLocation"
|
||||
required
|
||||
name="assetStorageLocation"
|
||||
placeholder="请输入存放地点"></van-field>
|
||||
|
||||
<van-field
|
||||
v-model="formData.assetUseName"
|
||||
name="assetUseName"
|
||||
label="责任人"
|
||||
required
|
||||
readonly
|
||||
:rules="[{ required: true }]"
|
||||
is-link
|
||||
placeholder="请输入工号或姓名选择责任人"
|
||||
@click="assetUseNameShow=true"
|
||||
></van-field>
|
||||
<van-action-sheet v-model="assetUseNameShow" title="责任人" class="height100" :close-on-click-overlay="false">
|
||||
<van-search
|
||||
v-model="searchKeyword"
|
||||
:show-action="false"
|
||||
:reverse-color="false"
|
||||
input-align="left"
|
||||
placeholder="请输入工号或姓名选择责任人"
|
||||
@input="(val) => {searchAssetUseUser(val)}"
|
||||
@clear="(val) => {searchAssetUseUser(val)}"
|
||||
shape="round"
|
||||
></van-search>
|
||||
<div class="van-action-sheet__content mt5"
|
||||
v-if="assetUseUserOption && assetUseUserOption.length>0">
|
||||
<template>
|
||||
<template v-for="item in assetUseUserOption">
|
||||
<van-button native-type="button" @click="onUserSelect(item)"
|
||||
class="van-action-sheet__item van-hairline--bottom">
|
||||
<span class="van-action-sheet__name">{{item.username}}({{item.loginname}})</span>
|
||||
</van-button>
|
||||
</template>
|
||||
</template>
|
||||
</div>
|
||||
<van-empty description="暂无数据" v-else></van-empty>
|
||||
</van-action-sheet>
|
||||
|
||||
|
||||
<van-field
|
||||
:rules="[{ required: true }]"
|
||||
v-model="formData.assetUsageStateName"
|
||||
label="使用状况"
|
||||
name="assetUsageStateName"
|
||||
placeholder="请选择使用状况"
|
||||
required
|
||||
is-link
|
||||
readonly
|
||||
@click="showAssetUsageStateNamePopup = true"
|
||||
></van-field>
|
||||
<van-popup v-model="showAssetUsageStateNamePopup" position="bottom">
|
||||
<van-picker
|
||||
show-toolbar
|
||||
:columns="assetUsageStateNameOption.map(i => i.name)"
|
||||
@confirm="onAssetUsageStateNameConfirm"
|
||||
@cancel="showAssetUsageStateNamePopup = false"
|
||||
></van-picker>
|
||||
</van-popup>
|
||||
|
||||
<van-field label="备注"
|
||||
v-model="formData.assetNotes"
|
||||
type="textarea"
|
||||
name="assetNotes"
|
||||
rows="4"
|
||||
autosize
|
||||
maxlength="150"
|
||||
class="more-text"
|
||||
placeholder="请填写备注"></van-field>
|
||||
</van-cell-group>
|
||||
|
||||
<van-cell-group title="附件">
|
||||
<van-field class="more-text" name="assetFiles"
|
||||
:rules="[{ required: true,message:'请上传附件' }]"
|
||||
label=""
|
||||
required>
|
||||
<template #input>
|
||||
<h5-file-upload
|
||||
slot="input"
|
||||
:value.sync="formData.assetFiles"
|
||||
:upload_number="10"
|
||||
upload_mode="file"
|
||||
upload_result_category="array"
|
||||
upload_result_type="url"
|
||||
complete_result
|
||||
></h5-file-upload>
|
||||
</template>
|
||||
</van-field>
|
||||
</van-cell-group>
|
||||
|
||||
|
||||
<!-- 按钮区域 -->
|
||||
<div class="form-actions">
|
||||
<van-button type="primary" @click="onSubmit">提交</van-button>
|
||||
</div>
|
||||
</van-form>
|
||||
</div>
|
||||
</div>
|
||||
</van-action-sheet>
|
||||
`,
|
||||
dicts: ["ASSET_USAGE_STATE"],
|
||||
data() {
|
||||
return {
|
||||
visible: false,
|
||||
viewData: {},
|
||||
row: null,
|
||||
formData: {},
|
||||
assetUsageStateNameOption:[],
|
||||
showAssetUsageStateNamePopup:false,
|
||||
|
||||
assetUseUserOption:[],
|
||||
assetUseNameShow:false,
|
||||
searchKeyword:""
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 打开
|
||||
async onOpen(row) {
|
||||
this.row = row
|
||||
this.$set(this.formData, "assetId", row.id)
|
||||
this.$set(this.formData, "assetStocktakingPlanId", row.assetStocktakingPlanId)
|
||||
this.$set(this.formData, "assetNumber", row.assetNumber)
|
||||
this.$set(this.formData, "assetName", row.assetName)
|
||||
this.$set(this.formData, "assetUsedDate", row.assetUsedDate)
|
||||
this.$set(this.formData, "assetStorageLocation", row.assetStorageLocation)
|
||||
this.assetUsageStateNameOption = await this.$businessTool.getDictOptions("ASSET_USAGE_STATE")
|
||||
this.visible = true
|
||||
},
|
||||
onAssetUsageStateNameConfirm(value,index){
|
||||
this.formData.assetUsageStateName = this.assetUsageStateNameOption[index].name
|
||||
this.showAssetUsageStateNamePopup=false
|
||||
},
|
||||
onUserSelect(o){
|
||||
this.$set(this.formData, "assetUseUserId", o.id)
|
||||
this.$set(this.formData, "assetUseName", o.username)
|
||||
this.assetUseNameShow = false
|
||||
},
|
||||
searchAssetUseUser(val) {
|
||||
$.get("/platform/asset/manage/searchAssetUseUser", {query: val}).then(resp => {
|
||||
if (resp.code === 0) {
|
||||
this.assetUseUserOption = resp.data
|
||||
}
|
||||
})
|
||||
},
|
||||
onSubmit() {
|
||||
this.$refs.formRef.validate().then(() => {
|
||||
this.$dialog.confirm({
|
||||
title: "提示",
|
||||
message: "您确定要提交吗?"
|
||||
}).then(() => {
|
||||
let formData = clone(this.formData)
|
||||
if (formData.assetFiles) {
|
||||
formData.assetFiles = JSON.stringify(formData.assetFiles)
|
||||
}
|
||||
this.$axios.post("/platform/asset/stocktaking/doSubmit", formData).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.$toast(res.msg)
|
||||
this.visible = false
|
||||
this.$emit("save_success")
|
||||
}
|
||||
})
|
||||
})
|
||||
})
|
||||
},
|
||||
}
|
||||
}
|
||||
+3
-3
@@ -403,7 +403,7 @@ layout("/layouts/platform_h5.html"){
|
||||
}).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.$toast.success("提交成功")
|
||||
pjaxReplace("/platform/h5/enrollmentRegistration/apply/mine")
|
||||
pjaxReplace("/platform/enrollmentRegistration/applyList/h5")
|
||||
}
|
||||
})
|
||||
}).catch(() => {
|
||||
@@ -427,7 +427,7 @@ layout("/layouts/platform_h5.html"){
|
||||
}).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.$toast.success("提交成功")
|
||||
pjaxReplace("/platform/h5/enrollmentRegistration/apply/mine")
|
||||
pjaxReplace("/platform/enrollmentRegistration/applyList/h5")
|
||||
}
|
||||
})
|
||||
}).catch(() => {
|
||||
@@ -454,7 +454,7 @@ layout("/layouts/platform_h5.html"){
|
||||
}).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.$toast.success("提交成功")
|
||||
pjaxReplace("/platform/h5/enrollmentRegistration/apply/mine")
|
||||
pjaxReplace("/platform/enrollmentRegistration/applyList/h5")
|
||||
}
|
||||
})
|
||||
}).catch(() => {
|
||||
|
||||
+1
-1
@@ -79,7 +79,7 @@ layout("/layouts/platform_h5.html"){
|
||||
this.$refs.h5EnrollmentRegistrationInfoRef.onOpen(row)
|
||||
},
|
||||
onEdit(row) {
|
||||
pjaxReplace('/platform/h5/enrollmentRegistration/apply/index?taskId=' + (row.startTaskId || '') + "&bizId=" + row.id)
|
||||
pjaxReplace('/platform/enrollmentRegistration/apply/h5?taskId=' + (row.startTaskId || '') + "&bizId=" + row.id)
|
||||
},
|
||||
onDelete(id) {
|
||||
this.$dialog.confirm({
|
||||
|
||||
@@ -36,22 +36,26 @@ layout("/layouts/platform_h5.html"){
|
||||
<i class="fa fa-eye"></i>
|
||||
<span>查看</span>
|
||||
</div>
|
||||
<div class="action-btn" @click="onEdit(row)">
|
||||
<div class="action-btn" @click="onApply(row)">
|
||||
<i class="fa fa-edit"></i>
|
||||
<span>预约</span>
|
||||
</div>
|
||||
</template>
|
||||
</table-list>
|
||||
|
||||
<info ref="infoRef"></info>
|
||||
<site-apply ref="applyRef"></site-apply>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
|
||||
<!--#include('../common/siteInfo.js'){}#-->
|
||||
<!--#include('../common/apply.js'){}#-->
|
||||
new Vue({
|
||||
el: "#app",
|
||||
store,
|
||||
components: {
|
||||
|
||||
"info": siteInfo,
|
||||
"site-apply": apply,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@@ -63,9 +67,16 @@ layout("/layouts/platform_h5.html"){
|
||||
year: new Date().getFullYear(),
|
||||
type: null
|
||||
},
|
||||
typeOptions: [],
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
onView(row) {
|
||||
this.$refs.infoRef.onOpen(row)
|
||||
},
|
||||
onApply(row) {
|
||||
this.$refs.applyRef.onOpen(row)
|
||||
},
|
||||
async onReady() {
|
||||
const typeList = await this.querySiteType()
|
||||
this.typeOptions = [
|
||||
|
||||
@@ -0,0 +1,327 @@
|
||||
const apply = {
|
||||
template: /*language=HTML*/ `
|
||||
<div>
|
||||
<van-popup v-model:show="visible" :style="{ height: '100%',width: '100%', 'background-color': '#F7F8FA'}" position="right" safe-area-inset-bottom>
|
||||
<van-nav-bar :title="row.name" left-text="返回" left-arrow @click-left="visible = false" fixed placeholder></van-nav-bar>
|
||||
|
||||
<div class="top-calendar">
|
||||
<div class="calendar-left">
|
||||
<div :class="getDayClass(item)" @click="dayClick(item)" v-for="item in weekList">
|
||||
<div class="day-info-week">
|
||||
{{item.weekdayCN}}
|
||||
</div>
|
||||
<div class="day-info-month">
|
||||
{{$moment(item.day).format('MM-DD')}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="container">
|
||||
<table v-if="weekList.find(o => $moment(o.day).unix() === $moment(selectDate).unix())?.disabled === false" style="width: 100%">
|
||||
<template v-for="item in allowTimeList">
|
||||
<tr>
|
||||
<td class="container-times">{{item.startTime + '-' + item.endTime}}</td>
|
||||
<td>
|
||||
<div v-if="item.disabled === true" class="container-state">{{ item.tooltip }}</div>
|
||||
<div @click="selectTime(item)" v-else class="container-state" style="background-color: #e8ffef; color: #52986a">
|
||||
<label v-if="(item.dateStr + ' ' + item.startTime + '-' + item.endTime) !== (selected.dateStr + ' ' + selected.startTime + '-' + selected.endTime)">
|
||||
可预约
|
||||
</label>
|
||||
<span v-else>
|
||||
<van-icon name="passed" size="26" style="line-height: 36px;position: unset"></van-icon>
|
||||
</span>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</template>
|
||||
</table>
|
||||
<van-empty v-else image="error" :description="selectDate + '不能预约'"></van-empty>
|
||||
</div>
|
||||
|
||||
<div style="position: fixed; bottom: 0; width: 100%">
|
||||
<van-button @click="onApply" type="primary" color="#246fb4" style="width: 100%">确定预约</van-button>
|
||||
</div>
|
||||
</van-popup>
|
||||
|
||||
<van-action-sheet v-model="formVisible" title="确认预约信息">
|
||||
<van-notice-bar left-icon="volume-o"
|
||||
:text="'您已选择的预约日期为:' + selectDate"></van-notice-bar>
|
||||
<van-form ref="formRef" class="form-container">
|
||||
<van-field label="预约人" :rules="[{ required: true }]" v-model="formData.applyUserName" readonly
|
||||
required name="applyUserName"></van-field>
|
||||
<van-field label="性别" :rules="[{ required: true }]" v-model="formData.sex" readonly
|
||||
required name="sex"></van-field>
|
||||
<van-field label="工号" :rules="[{ required: true }]" v-model="formData.applyLoginName" readonly
|
||||
required name="applyLoginName"></van-field>
|
||||
<van-field label="所属单位" :rules="[{ required: true }]" v-model="formData.applyUnitName" readonly
|
||||
required name="applyUnitName"></van-field>
|
||||
<van-field label="联系电话" :rules="[{ required: true }]" v-model="formData.applyMobile" type="number"
|
||||
required name="applyMobile"></van-field>
|
||||
<van-field label="预约时间" :rules="[{ required: true }]" v-model="formData.applyTime"
|
||||
required readonly name="applyTime"></van-field>
|
||||
<van-field name="stepper" label="预约人数" required :rules="[{ required: true }]">
|
||||
<template #input>
|
||||
<van-stepper
|
||||
:disabled="row.reserveTarget === 1 || row.reserveTarget === 3"
|
||||
v-model="formData.joinCount"></van-stepper>
|
||||
</template>
|
||||
</van-field>
|
||||
<van-field
|
||||
v-model="formData.applyCause"
|
||||
rows="4"
|
||||
autosize
|
||||
label="预约事由"
|
||||
type="textarea"
|
||||
maxlength="50"
|
||||
placeholder="请输入预约事由"
|
||||
show-word-limit
|
||||
required
|
||||
name="applyCause"
|
||||
:rules="[{ required: true }]"
|
||||
></van-field>
|
||||
<div class="form-actions">
|
||||
<van-button @click="formVisible = false" type="info" plain round>关闭</van-button>
|
||||
<van-button @click="onSubmit" v-if="!taskId" type="info" round>提交</van-button>
|
||||
<van-button @click="onFinishTask" type="info" round>提交</van-button>
|
||||
</div>
|
||||
</van-form>
|
||||
</van-action-sheet>
|
||||
</div>
|
||||
`,
|
||||
store,
|
||||
data() {
|
||||
return {
|
||||
taskId: '',
|
||||
bizId: '',
|
||||
row: {},
|
||||
visible: false,
|
||||
selectDate: '',
|
||||
selected: {},
|
||||
weekList: [],
|
||||
allowDayList: [],
|
||||
allowTimeList: [],
|
||||
weekdayCNMap: {0: '周日', 1: '周一', 2: '周二', 3: '周三', 4: '周四', 5: '周五', 6: '周六'},
|
||||
|
||||
formVisible: false,
|
||||
formData: {},
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
|
||||
},
|
||||
methods: {
|
||||
async onOpen(row, applyRow = null) {
|
||||
this.row = row
|
||||
this.visible = true
|
||||
await this.init()
|
||||
if(applyRow) {
|
||||
this.taskId = applyRow.taskId
|
||||
this.bizId = applyRow.bizId
|
||||
this.applyTime = applyRow.applyDay
|
||||
this.selectDate = applyRow.applyDay
|
||||
this.selected = {
|
||||
dateStr: applyRow.applyDay,
|
||||
startTime: applyRow.startTime,
|
||||
endTime: applyRow.endTime,
|
||||
}
|
||||
this.formVisible = true
|
||||
this.formData = clone(applyRow)
|
||||
this.$set(this.formData, 'applyTime', this.formData.startTime + '-' + this.formData.endTime)
|
||||
this.$set(this.formData, 'sex', this.$store.state.user.sex)
|
||||
const day = this.weekList.find(o => o.dateStr === applyRow.applyDay)
|
||||
if(day) {
|
||||
await this.dayClick(day)
|
||||
}
|
||||
}
|
||||
},
|
||||
async init() {
|
||||
this.selectDate = this.$moment().format('YYYY-MM-DD')
|
||||
await this.queryAllowDay()
|
||||
await this.queryTimesByDay()
|
||||
this.setWeekList(this.selectDate)
|
||||
},
|
||||
onApply() {
|
||||
if(Object.keys(this.selected).length === 0) {
|
||||
this.$toast('请选择要预约的时间')
|
||||
return
|
||||
}
|
||||
this.$set(this.formData, "applyUserId", this.$store.state.user.id)
|
||||
this.$set(this.formData, "applyUserName", this.$store.state.user.username)
|
||||
this.$set(this.formData, "applyLoginName", this.$store.state.user.loginname,)
|
||||
this.$set(this.formData, "applyUnitId", this.$store.state.user?.unit?.id)
|
||||
this.$set(this.formData, "applyUnitName", this.$store.state.user?.unit?.name)
|
||||
this.$set(this.formData, "applyUnionId", this.$store.state.user?.union?.id)
|
||||
this.$set(this.formData, "applyUnionName", this.$store.state.user?.union?.name)
|
||||
this.$set(this.formData, "applyMobile", this.$store.state.user.mobile)
|
||||
this.$set(this.formData, "sex", this.$store.state.user.sex)
|
||||
this.$set(this.formData, "siteId", this.row.id)
|
||||
this.$set(this.formData, "applyTime", this.selected.startTime + '-' + this.selected.endTime)
|
||||
if (this.row.reserveTarget === 1 || this.row.reserveTarget === 3) {
|
||||
this.$set(this.formData, "joinCount", this.row.maxNum)
|
||||
} else {
|
||||
this.$set(this.formData, "joinCount", 1)
|
||||
}
|
||||
this.formVisible = true
|
||||
},
|
||||
onSubmit() {
|
||||
this.$refs.formRef.validate().then(() => {
|
||||
this.$dialog.confirm({
|
||||
title: "提示",
|
||||
message: "您确定要提交吗?"
|
||||
}).then(async () => {
|
||||
const res = await this.$axios.post("/platform/site/apply/submit", {
|
||||
data: JSON.stringify(this.formData),
|
||||
days: JSON.stringify([this.selected.dateStr])
|
||||
})
|
||||
this.$toast(res.msg)
|
||||
if (res.code === 0) {
|
||||
this.$pjaxReplace("/platform/site/mine/h5")
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
onFinishTask() {
|
||||
if (!this.formData.applyTime) {
|
||||
this.$toast('未选择预约时间')
|
||||
return
|
||||
}
|
||||
this.$refs.formRef.validate().then(() => {
|
||||
this.$dialog.confirm({
|
||||
title: "提示",
|
||||
message: "您确定要提交吗?"
|
||||
}).then(() => {
|
||||
this.$axios.post('/platform/site/apply/submitAgain', {
|
||||
data: JSON.stringify(this.formData),
|
||||
days: JSON.stringify([this.selected.dateStr]),
|
||||
taskId: this.taskId
|
||||
}).then(res => {
|
||||
this.$toast(res.msg)
|
||||
if (res.code === 0) {
|
||||
this.$pjaxReplace("/platform/site/mine/h5")
|
||||
}
|
||||
})
|
||||
})
|
||||
})
|
||||
},
|
||||
selectTime(item) {
|
||||
if((item.dateStr + ' ' + item.startTime + '-' + item.endTime) !== (this.selected.dateStr + ' ' + this.selected.startTime + '-' + this.selected.endTime)) {
|
||||
this.$set(this.selected, 'day', item.dateStr)
|
||||
this.$set(this.selected, 'startTime', item.startTime)
|
||||
this.$set(this.selected, 'endTime', item.endTime)
|
||||
} else {
|
||||
this.selected = {}
|
||||
}
|
||||
},
|
||||
// 获取每天的样式
|
||||
getDayClass(row) {
|
||||
let classStr = 'calendar-left-day'
|
||||
if(row.disabled) {
|
||||
classStr += ' left-day-disabled'
|
||||
} else {
|
||||
classStr += this.$moment(row.day).unix() === this.$moment(this.selectDate).unix() ? ' left-day-active' : ''
|
||||
}
|
||||
return classStr
|
||||
},
|
||||
// 点击某一天
|
||||
async dayClick(item) {
|
||||
this.selectDate = item.dateStr
|
||||
if(item.disabled) {
|
||||
this.$toast(this.$moment(item.day).format('YYYY-MM-DD') + '不可预约')
|
||||
} else {
|
||||
await this.queryTimesByDay()
|
||||
}
|
||||
},
|
||||
// 获取一周
|
||||
setWeekList(startDate) {
|
||||
const start = this.$moment(startDate)
|
||||
const allowDaySet = new Set(this.allowDayList)
|
||||
this.weekList = Array.from({ length: 8 }, (_, index) => {
|
||||
const day = start.clone().add(index, 'd')
|
||||
const dateStr = day.format('YYYY-MM-DD')
|
||||
const disabled = this.allowDayList.length > 0 && !allowDaySet.has(dateStr)
|
||||
const weekdayCN = this.weekdayCNMap[day.day()]
|
||||
return { day, disabled, weekdayCN, dateStr }
|
||||
})
|
||||
},
|
||||
// 查询哪些天是开放的
|
||||
async queryAllowDay() {
|
||||
const startTime = this.weekList.length === 0 ? this.$moment().format('YYYY-MM-DD') : this.weekList[0].dateStr
|
||||
const endTime = this.weekList.length === 0 ? this.$moment().add(8, 'd').format('YYYY-MM-DD') : this.weekList[this.weekList.length - 1].dateStr
|
||||
const {data} = await this.$axios.post("/platform/site/apply/queryAllowDay", {
|
||||
siteId: this.row.id,
|
||||
startTime: startTime,
|
||||
endTime: endTime,
|
||||
})
|
||||
this.allowDayList = data
|
||||
},
|
||||
// 查询时间段
|
||||
async queryTimesByDay() {
|
||||
const {data} = await this.$axios.post("/platform/site/apply/queryTimesByDay", {
|
||||
siteId: this.row.id,
|
||||
day: this.selectDate,
|
||||
})
|
||||
this.allowTimeList = data
|
||||
},
|
||||
},
|
||||
style: /*language=CSS*/ `
|
||||
::v-deep .top-calendar {
|
||||
height: 70px;
|
||||
max-height: 70px;
|
||||
position: sticky;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
max-width: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
background-color: #0e78c5;
|
||||
}
|
||||
::v-deep .calendar-left {
|
||||
/*width: calc(100% - 20px);*/
|
||||
overflow-x: auto;
|
||||
display: flex;
|
||||
height: 90%;
|
||||
}
|
||||
::v-deep .calendar-left-day {
|
||||
min-width: 65px;
|
||||
height: 100%;
|
||||
margin: 0 5px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
color: #FFF;
|
||||
border-radius: 10px;
|
||||
}
|
||||
::v-deep .left-day-active {
|
||||
background-color: #0000cc;
|
||||
}
|
||||
::v-deep .left-day-disabled {
|
||||
background-color: lightgrey;
|
||||
}
|
||||
::v-deep .container {
|
||||
background-color: white;
|
||||
margin: 10px 0;
|
||||
padding: 10px 0;
|
||||
overflow-y: auto;
|
||||
height: calc(100vh - 46px - 70px - 56px - 30px);
|
||||
}
|
||||
::v-deep .container-times {
|
||||
width: 58%;
|
||||
text-align: center;
|
||||
}
|
||||
::v-deep .container-state {
|
||||
width: 80px;
|
||||
height: 36px;
|
||||
line-height: 36px;
|
||||
text-align: center;
|
||||
background-color: #f2f2f2;
|
||||
border-radius: 2px;
|
||||
color: #929292;
|
||||
}
|
||||
::v-deep table {
|
||||
border-collapse: collapse;
|
||||
}
|
||||
`
|
||||
}
|
||||
@@ -0,0 +1,76 @@
|
||||
const applyInfo = {
|
||||
template:
|
||||
/*language=HTML*/
|
||||
`
|
||||
<van-action-sheet v-model="visible" title="查看详情">
|
||||
<div class="detail-container">
|
||||
<van-cell-group title="基本信息">
|
||||
<van-cell title="预约场地">{{ viewData.siteName }}</van-cell>
|
||||
<van-cell title="预约人">{{ viewData.applyUserName }}</van-cell>
|
||||
<van-cell title="预约人工号">{{ viewData.applyLoginName }}</van-cell>
|
||||
<van-cell title="所属单位">{{ viewData.applyUnitName }}</van-cell>
|
||||
<van-cell title="预约日期">{{ viewData.applyDay }}</van-cell>
|
||||
<van-cell title="开始时间">{{ viewData.startTime }}</van-cell>
|
||||
<van-cell title="结束时间">{{ viewData.endTime }}</van-cell>
|
||||
<van-cell title="联系电话">{{ viewData.applyMobile }}</van-cell>
|
||||
<van-cell title="预约人数">{{ viewData.joinCount }}</van-cell>
|
||||
<van-cell title="预约事由" class="direction-column-cell">{{ viewData.applyCause }}</van-cell>
|
||||
</van-cell-group>
|
||||
<template v-for="task in doneTasks">
|
||||
<van-cell-group :title="task.displayName" v-if="task.ext.isFirstTaskNode">
|
||||
<van-cell title="申请用户">{{ task.ext.initiatorName }}({{task.ext.initiatorAccount}})
|
||||
</van-cell>
|
||||
<van-cell title="申请时间">{{ task.finishTime }}</van-cell>
|
||||
<van-cell title="办理结果">
|
||||
<dict-tag :options="dict.type.PROCESS_TASK_SUBMIT_TYPE"
|
||||
:value="task.ext.submitType"></dict-tag>
|
||||
</van-cell>
|
||||
</van-cell-group>
|
||||
<van-cell-group :title="task.displayName" v-else>
|
||||
<van-cell title="办理用户">{{ task.taskFormData.userName }}({{task.taskFormData.loginName}})
|
||||
</van-cell>
|
||||
<van-cell title="办理时间">{{ task.finishTime }}</van-cell>
|
||||
<van-cell title="办理结果">
|
||||
<dict-tag :options="dict.type.PROCESS_TASK_SUBMIT_TYPE"
|
||||
:value="task.ext.submitType"></dict-tag>
|
||||
</van-cell>
|
||||
<van-cell title="办理意见" v-if="!task.ext.isFirstTaskNode" class="direction-column-cell">
|
||||
<div v-html="task.taskFormData.tf_opinion"></div>
|
||||
</van-cell>
|
||||
</van-cell-group>
|
||||
</template>
|
||||
</div>
|
||||
<slot></slot>
|
||||
</van-action-sheet>
|
||||
`,
|
||||
dicts: ["PROCESS_TASK_SUBMIT_TYPE"],
|
||||
data() {
|
||||
return {
|
||||
visible:false,
|
||||
viewData: {},
|
||||
doneTasks: [],
|
||||
row: null,
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
onOpen(row) {
|
||||
this.row = row
|
||||
this.visible = true
|
||||
this.viewData = row
|
||||
this.getDoneTasks()
|
||||
},
|
||||
onClose(){
|
||||
this.visible = false
|
||||
},
|
||||
getDoneTasks() {
|
||||
this.$axios.post("/flow/common/doneTasks", {bizId: this.row.id}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.doneTasks = res.data
|
||||
}
|
||||
})
|
||||
},
|
||||
},
|
||||
style: /*language=CSS*/ `
|
||||
|
||||
`
|
||||
}
|
||||
@@ -0,0 +1,123 @@
|
||||
const siteInfo = {
|
||||
template: /*language=HTML*/ `
|
||||
<div>
|
||||
<van-action-sheet v-model="visible" title="场地信息">
|
||||
<div class="detail-container">
|
||||
<van-cell-group title="基本信息">
|
||||
<van-cell title="创建人">{{ viewData.createUserName }}</van-cell>
|
||||
<van-cell title="创建时间">{{ viewData.createTime }}</van-cell>
|
||||
<van-cell title="场地名称">{{ viewData.name }}</van-cell>
|
||||
<van-cell title="场地地址" class="direction-column-cell">{{ viewData.address }}</van-cell>
|
||||
<van-cell title="联系人">{{ viewData.contactName }}</van-cell>
|
||||
<van-cell title="联系电话">{{ viewData.contactPhone }}</van-cell>
|
||||
<van-cell title="排序编号">{{ viewData.sortNum }}</van-cell>
|
||||
<van-cell title="容纳人数">{{ viewData.maxNum }}</van-cell>
|
||||
<van-cell title="场地类型">{{ viewData.typeName }}</van-cell>
|
||||
<van-cell title="面向对象">
|
||||
<span v-if="viewData.reserveTarget === 1">面向分工会</span>
|
||||
<span v-if="viewData.reserveTarget === 2">面向个人</span>
|
||||
<span v-if="viewData.reserveTarget === 3">面向集体</span>
|
||||
</van-cell>
|
||||
<van-cell title="性别限制">
|
||||
<span v-if="viewData.sexLimit === 0">不限制</span>
|
||||
<span v-if="viewData.sexLimit === 1">男</span>
|
||||
<span v-if="viewData.sexLimit === 2">女</span>
|
||||
</van-cell>
|
||||
<van-cell title="开启状态">
|
||||
<span v-if="viewData.state">开启</span>
|
||||
<span v-else>禁用</span>
|
||||
</van-cell>
|
||||
<van-cell title="排除节假日">
|
||||
<span v-if="viewData.state">是</span>
|
||||
<span v-else>否</span>
|
||||
</van-cell>
|
||||
<van-cell title="场地介绍" class="direction-column-cell">
|
||||
<div v-if="viewData.introduce" v-html="viewData.introduce"></div>
|
||||
<div v-else>暂无场地介绍</div>
|
||||
</van-cell>
|
||||
</van-cell-group>
|
||||
<van-cell-group title="禁用时间" v-if="viewData.notApplyTimeList && viewData.notApplyTimeList.length > 0">
|
||||
<table class="table-class">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>日期</th>
|
||||
<th>开始时间</th>
|
||||
<th>结束时间</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="(item,index) in viewData.notApplyTimeList" :key="index">
|
||||
<td>{{ item.date }}</td>
|
||||
<td>{{ item.startTime }}</td>
|
||||
<td>{{ item.endTime }}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</van-cell-group>
|
||||
<van-cell-group title="场次" v-if="viewData.openHours && viewData.openHours.length > 0">
|
||||
<table class="table-class">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>星期</th>
|
||||
<th>开始时间</th>
|
||||
<th>结束时间</th>
|
||||
<th>预约时间单位(小时)</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="(item,index) in viewData.openHours" :key="index">
|
||||
<td>
|
||||
<span v-if="item.weekNum === 1">周一</span>
|
||||
<span v-if="item.weekNum === 2">周二</span>
|
||||
<span v-if="item.weekNum === 3">周三</span>
|
||||
<span v-if="item.weekNum === 4">周四</span>
|
||||
<span v-if="item.weekNum === 5">周五</span>
|
||||
<span v-if="item.weekNum === 6">周六</span>
|
||||
<span v-if="item.weekNum === 0">周日</span>
|
||||
</td>
|
||||
<td>{{ item.startTime }}</td>
|
||||
<td>{{ item.endTime }}</td>
|
||||
<td>{{ item.timeUnit }}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</van-cell-group>
|
||||
</div>
|
||||
</van-action-sheet>
|
||||
</div>
|
||||
`,
|
||||
data() {
|
||||
return {
|
||||
viewData: {},
|
||||
visible: false
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
onOpen(row) {
|
||||
this.viewData = row
|
||||
this.visible = true
|
||||
},
|
||||
},
|
||||
style: /*language=CSS*/ `
|
||||
::v-deep .table-class{
|
||||
width: 100%;
|
||||
border-radius: 5px;
|
||||
overflow: hidden;
|
||||
line-height: 1.5rem;
|
||||
font-size: 13px;
|
||||
table-layout: fixed;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
::v-deep .table-class th {
|
||||
background-color: #f2f2f2;
|
||||
border: 1px solid #dddddd;
|
||||
}
|
||||
::v-deep .table-class tr {
|
||||
text-align: center;
|
||||
border-bottom: 1px solid #dddddd;
|
||||
}
|
||||
::v-deep .table-class td {
|
||||
border: 1px solid #dddddd;
|
||||
}
|
||||
`
|
||||
}
|
||||
@@ -0,0 +1,154 @@
|
||||
<!--#
|
||||
layout("/layouts/platform_h5.html"){
|
||||
#-->
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
|
||||
<div id="app">
|
||||
<van-nav-bar title="我的申请" left-text="返回" left-arrow @click-left="historyBack" fixed placeholder></van-nav-bar>
|
||||
|
||||
<van-sticky offset-top="46px">
|
||||
<van-search
|
||||
v-model="pageForm.searchKeyword"
|
||||
:show-action="false"
|
||||
:reverse-color="false"
|
||||
input-align="left"
|
||||
placeholder="请输入姓名或者工号搜索"
|
||||
@search="doSearch"
|
||||
></van-search>
|
||||
<van-dropdown-menu :close-on-click-outside="false" :close-on-click-overlay="false">
|
||||
<year-van-dropdown-item :num="5" @change="doSearch" v-model="pageForm.year"></year-van-dropdown-item>
|
||||
<van-dropdown-item v-model="pageForm.siteType" :options="typeOptions" :multiple="false"
|
||||
@change="doSearch"></van-dropdown-item>
|
||||
</van-dropdown-menu>
|
||||
</van-sticky>
|
||||
|
||||
<table-list api="/platform/site/mine/pageData" :page_form.sync="pageForm" ref="tableListRef" title="applyUserName" @ready="onReady">
|
||||
<template v-slot="{index,row}">
|
||||
<table-column label="场地名称">{{row.siteName}}</table-column>
|
||||
<table-column label="所属单位">{{row.applyUnitName}}</table-column>
|
||||
<table-column label="预约日期">{{row.applyDay}}</table-column>
|
||||
<table-column label="开始时间">{{row.startTime}}</table-column>
|
||||
<table-column label="结束时间">{{row.endTime}}</table-column>
|
||||
<table-column label="当前节点">{{row.taskName}}</table-column>
|
||||
</template>
|
||||
<template #actions="{index,row}">
|
||||
<div class="action-btn" @click="onView(row)">
|
||||
<i class="fa fa-eye"></i>
|
||||
<span>查看</span>
|
||||
</div>
|
||||
<div class="action-btn" @click="onEdit(row)"
|
||||
v-if="row.taskKey === 'startTask' || !row.instanceId">
|
||||
<i class="fa fa-edit"></i>
|
||||
<span>编辑</span>
|
||||
</div>
|
||||
<div class="action-btn delete" @click="onRevoke(row)"
|
||||
v-if="row.canRevoke">
|
||||
<i class="fa fa-undo"></i>
|
||||
<span>撤回</span>
|
||||
</div>
|
||||
<div class="action-btn delete" @click="onDelete(row)"
|
||||
v-if="row.taskKey === 'startTask' || !row.instanceId">
|
||||
<i class="fa fa-trash"></i>
|
||||
<span>删除</span>
|
||||
</div>
|
||||
</template>
|
||||
</table-list>
|
||||
|
||||
<info ref="infoRef"></info>
|
||||
<site-apply ref="applyRef"></site-apply>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
<!--#include('../common/apply.js'){}#-->
|
||||
<!--#include('../common/info.js'){}#-->
|
||||
new Vue({
|
||||
el: "#app",
|
||||
store,
|
||||
components: {
|
||||
info: applyInfo,
|
||||
"site-apply": apply,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
pageForm: {
|
||||
pageNumber: 1,
|
||||
pageSize: 10,
|
||||
totalCount: 0,
|
||||
year: new Date().getFullYear(),
|
||||
siteType: null
|
||||
},
|
||||
typeOptions: [],
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async onReady() {
|
||||
const typeList = await this.querySiteType()
|
||||
this.typeOptions = [
|
||||
{
|
||||
text: "全部类型",
|
||||
value: null
|
||||
}
|
||||
].concat(typeList.map((v) => ({ text: v.name, value: v.id })))
|
||||
if (this.typeOptions.length > 0) {
|
||||
this.pageForm.siteType = this.typeOptions[0].value
|
||||
this.doSearch()
|
||||
}
|
||||
},
|
||||
onRevoke(row) {
|
||||
this.$dialog.confirm({
|
||||
title: "提示",
|
||||
message: "您确定要撤回吗?"
|
||||
}).then(() => {
|
||||
this.$axios.post("/flow/common/revokeTask", { taskId: row.startTaskId }).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$toast(res.msg)
|
||||
this.doSearch()
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
onView(row) {
|
||||
this.$refs.infoRef.onOpen(row)
|
||||
},
|
||||
async onEdit(row) {
|
||||
const res = await this.$axios.post('/platform/site/manage/info', { id: row.siteId })
|
||||
this.$refs.applyRef.onOpen(res.data, row)
|
||||
},
|
||||
onDelete(id) {
|
||||
this.$dialog.confirm({
|
||||
title: "提示",
|
||||
message: "确定要删除此申请吗?"
|
||||
})
|
||||
.then(() => {
|
||||
this.$axios.post("/platform/site/mine/delete", { id: id }).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$toast.success(res.msg)
|
||||
this.doSearch()
|
||||
} else {
|
||||
this.$toast.fail(res.msg)
|
||||
}
|
||||
})
|
||||
})
|
||||
.catch(() => {})
|
||||
},
|
||||
async querySiteType() {
|
||||
const res = await this.$axios.post("/platform/site/type/querySiteType")
|
||||
return res.data
|
||||
},
|
||||
doSearch() {
|
||||
this.$nextTick(() => {
|
||||
this.pageForm.pageNumber = 1
|
||||
this.pageForm.totalCount = 0
|
||||
this.$refs.tableListRef.doSearch()
|
||||
})
|
||||
}
|
||||
},
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
+189
@@ -0,0 +1,189 @@
|
||||
<!--#
|
||||
layout("/layouts/platform_h5.html"){
|
||||
#-->
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
|
||||
<div id="app">
|
||||
<van-nav-bar title="校工会审核" left-text="返回" left-arrow @click-left="historyBack" fixed placeholder></van-nav-bar>
|
||||
|
||||
<van-sticky offset-top="46px">
|
||||
<van-search
|
||||
v-model="pageForm.searchKeyword"
|
||||
:show-action="false"
|
||||
:reverse-color="false"
|
||||
input-align="left"
|
||||
placeholder="请输入姓名或者工号搜索"
|
||||
@search="doSearch"
|
||||
></van-search>
|
||||
<van-dropdown-menu :close-on-click-outside="false" :close-on-click-overlay="false">
|
||||
<year-van-dropdown-item :num="5" @change="doSearch" v-model="pageForm.year"></year-van-dropdown-item>
|
||||
<van-dropdown-item v-model="pageForm.siteType" :options="typeOptions" :multiple="false"
|
||||
@change="doSearch"></van-dropdown-item>
|
||||
</van-dropdown-menu>
|
||||
<van-tabs v-model="pageForm.approvalText"
|
||||
@change="(val)=>{this.pageForm.approval = val==='1';this.doSearch();}">
|
||||
<van-tab title="已审核" name="1"></van-tab>
|
||||
<van-tab title="未审核" name="0"></van-tab>
|
||||
</van-tabs>
|
||||
</van-sticky>
|
||||
|
||||
<table-list api="/platform/site/schoolUnionAudit/pageData" :page_form.sync="pageForm" ref="tableListRef" title="applyUserName" @ready="onReady">
|
||||
<template v-slot="{index,row}">
|
||||
<table-column label="场地名称">{{row.siteName}}</table-column>
|
||||
<table-column label="所属单位">{{row.applyUnitName}}</table-column>
|
||||
<table-column label="预约日期">{{row.applyDay}}</table-column>
|
||||
<table-column label="开始时间">{{row.startTime}}</table-column>
|
||||
<table-column label="结束时间">{{row.endTime}}</table-column>
|
||||
<table-column label="当前节点">{{row.taskName}}</table-column>
|
||||
</template>
|
||||
<template #actions="{index,row}">
|
||||
<div class="action-btn" @click="onView(row)">
|
||||
<i class="fa fa-eye"></i>
|
||||
<span>查看</span>
|
||||
</div>
|
||||
<div class="action-btn" v-if="row.taskState === 10" @click="onApproval(row)">
|
||||
<i class="fa fa-edit"></i>
|
||||
<span>审核</span>
|
||||
</div>
|
||||
<div class="action-btn delete" v-if="row.canRevoke" @click="onRevoke(row)">
|
||||
<i class="fa fa-reply"></i>
|
||||
<span>撤回</span>
|
||||
</div>
|
||||
</template>
|
||||
</table-list>
|
||||
|
||||
<info ref="infoRef">
|
||||
<div v-if="showApprovalForm">
|
||||
<div class="process-title">{{formData.taskName}}</div>
|
||||
<van-form ref="formRef">
|
||||
<van-field
|
||||
v-model="formData.tf_opinion"
|
||||
name="tf_opinion"
|
||||
label="审批意见"
|
||||
placeholder="请输入审批意见"
|
||||
:rules="[{ required: true, message: '请填写审批意见' }]"
|
||||
required
|
||||
maxlength="100"
|
||||
show-word-limit
|
||||
></van-field>
|
||||
</van-form>
|
||||
<div style="display: flex; justify-content: space-between; column-gap: 10px; padding: 10px">
|
||||
<van-button type="danger" block @click="handleTaskAction(6)">退回</van-button>
|
||||
<van-button type="danger" block @click="handleTaskAction(20)">不同意</van-button>
|
||||
<van-button type="primary" block @click="handleTaskAction(1)">同意</van-button>
|
||||
</div>
|
||||
</div>
|
||||
</info>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
<!--#include('../common/info.js'){}#-->
|
||||
new Vue({
|
||||
el: "#app",
|
||||
store,
|
||||
components: {
|
||||
info: applyInfo,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
pageForm: {
|
||||
pageNumber: 1,
|
||||
pageSize: 10,
|
||||
totalCount: 0,
|
||||
searchKeyword: '',
|
||||
approvalText: "0",
|
||||
approval: false,
|
||||
year: new Date().getFullYear(),
|
||||
siteType: null,
|
||||
},
|
||||
typeOptions: [],
|
||||
formData: {},
|
||||
showApprovalForm: false
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async onReady() {
|
||||
const typeList = await this.querySiteType()
|
||||
this.typeOptions = [
|
||||
{
|
||||
text: "全部类型",
|
||||
value: null
|
||||
}
|
||||
].concat(typeList.map((v) => ({ text: v.name, value: v.id })))
|
||||
if (this.typeOptions.length > 0) {
|
||||
this.pageForm.siteType = this.typeOptions[0].value
|
||||
this.doSearch()
|
||||
}
|
||||
},
|
||||
onView(row) {
|
||||
this.showApprovalForm = false
|
||||
this.$refs.infoRef.onOpen(row)
|
||||
},
|
||||
onApproval(row) {
|
||||
this.showApprovalForm = true
|
||||
this.$refs.infoRef.onOpen(row)
|
||||
this.formData = {
|
||||
processTaskId: row.taskId,
|
||||
taskName: row.curTaskName
|
||||
}
|
||||
},
|
||||
async handleTaskAction(val) {
|
||||
try {
|
||||
await this.$refs.formRef.validate();
|
||||
this.$dialog.confirm({
|
||||
title: "提示",
|
||||
message: "您确定要提交吗?"
|
||||
}).then(() => {
|
||||
this.$axios.post("/flow/common/executeTask", {
|
||||
data: JSON.stringify({
|
||||
...this.formData,
|
||||
submitType: val
|
||||
})
|
||||
}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$refs.infoRef.onClose()
|
||||
this.$toast.success(res.msg)
|
||||
this.doSearch()
|
||||
}
|
||||
})
|
||||
}).catch(() => {
|
||||
|
||||
})
|
||||
} catch (error) {
|
||||
|
||||
}
|
||||
},
|
||||
onRevoke(row){
|
||||
this.$dialog.confirm({
|
||||
title: "提示",
|
||||
message: "您确定要撤回吗?"
|
||||
}).then(() => {
|
||||
this.$axios.post("/flow/common/revokeTask", {taskId: row.taskId}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$toast.success(res.msg)
|
||||
this.doSearch()
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
async querySiteType() {
|
||||
const res = await this.$axios.post("/platform/site/type/querySiteType")
|
||||
return res.data
|
||||
},
|
||||
doSearch() {
|
||||
this.$nextTick(() => {
|
||||
this.pageForm.pageNumber = 1
|
||||
this.pageForm.totalCount = 0
|
||||
this.$refs.tableListRef.doSearch()
|
||||
})
|
||||
}
|
||||
},
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
+942
@@ -0,0 +1,942 @@
|
||||
<!--#
|
||||
layout("/layouts/platform_h5.html"){
|
||||
#-->
|
||||
|
||||
<style >
|
||||
|
||||
</style>
|
||||
<div id="app" v-cloak>
|
||||
<van-nav-bar title="报销申请" left-text="返回" left-arrow @click-left="historyBack" placeholder fixed z-index="999"
|
||||
class="custom-nav"></van-nav-bar>
|
||||
|
||||
<div class="form-container">
|
||||
<van-form ref="formRef" >
|
||||
<!-- 子女信息 -->
|
||||
<van-cell-group title="子女信息" class="form-section">
|
||||
<van-field label="经办人" v-model="formData.userName" placeholder="从信息中心获取" readonly></van-field>
|
||||
<van-field label="工号" v-model="formData.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.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.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
|
||||
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.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.bankOfDeposit"
|
||||
placeholder="请输入开户行"
|
||||
:rules="[{ required: true }]"
|
||||
required>
|
||||
|
||||
</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-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>
|
||||
|
||||
<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'"
|
||||
v-model="formData.condolenceTypeName"
|
||||
name="condolenceTypeName"
|
||||
label="慰问类型"
|
||||
readonly
|
||||
placeholder="请选择慰问类型"
|
||||
@click="showCondolenceTypePicker = true"
|
||||
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-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
|
||||
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
|
||||
v-if="formData.reimburseProject === 'UNION_REIMBURSE_PROJECT_2'"
|
||||
label="活动人数"
|
||||
v-model="formData.activityNumber"
|
||||
placeholder="请输入活动人数"
|
||||
type="number"
|
||||
></van-field>
|
||||
|
||||
<van-field label="活动地点" v-if="formData.reimburseProject !== 'UNION_REIMBURSE_PROJECT_1'" v-model="formData.activityPlace" placeholder="请输入活动地点"></van-field>
|
||||
<van-field label="报销金额" v-if="formData.reimburseProject !== 'UNION_REIMBURSE_PROJECT_1'" v-model="formData.money" placeholder="请输入报销金额" type="number"></van-field>
|
||||
<van-field
|
||||
label="活动时间"
|
||||
v-if="formData.reimburseProject !== 'UNION_REIMBURSE_PROJECT_1'"
|
||||
v-model="formData.activityTime"
|
||||
placeholder="请选择活动时间"
|
||||
readonly
|
||||
@click="showActivityTimePicker = true"
|
||||
clickable
|
||||
></van-field>
|
||||
<van-popup position="bottom" round v-model:show="showActivityTimePicker">
|
||||
<van-datetime-picker
|
||||
type="date"
|
||||
:min-date="minDate"
|
||||
:max-date="maxDate"
|
||||
@confirm="onActivityTimeConfirm"
|
||||
@cancel="showActivityTimePicker = false"
|
||||
show-toolbar
|
||||
/>
|
||||
</van-popup>
|
||||
</template>
|
||||
|
||||
<!-- 发票信息 (当报销类别为发票时显示) -->
|
||||
<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"
|
||||
:value.sync="formData.files"
|
||||
:upload_number="10"
|
||||
upload_mode="file"
|
||||
upload_result_category="array"
|
||||
upload_result_type="url"
|
||||
complete_result
|
||||
></h5-file-upload>
|
||||
</template>
|
||||
</van-field>
|
||||
</van-cell-group>
|
||||
</van-cell-group>
|
||||
|
||||
<!-- 提交按钮 -->
|
||||
<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>提交1</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"],
|
||||
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日
|
||||
}
|
||||
},
|
||||
// 监听报销类别发生变化,报销项目联动改变
|
||||
// 修复 watch 中的监听器
|
||||
watch: {
|
||||
"formData.reimburseType"(newVal) {
|
||||
// 根据报销类别过滤可选的报销项目
|
||||
if (newVal === 'UNION_REIMBURSE_TYPE_1') {
|
||||
// 发票类型的报销项目
|
||||
this.reimburseProjectColumns = this.reimburseProjectList.filter((o) => {
|
||||
return ['1', 'UNION_REIMBURSE_TYPE_1'].includes(o.remark)
|
||||
}).map(item => {
|
||||
return {value: item.code, text: item.name}
|
||||
});
|
||||
} else {
|
||||
// 其他类型的报销项目
|
||||
this.reimburseProjectColumns = this.reimburseProjectList.filter((o) => {
|
||||
return ['1', 'UNION_REIMBURSE_TYPE_2'].includes(o.remark)
|
||||
}).map(item => {
|
||||
return {value: item.code, text: item.name}
|
||||
});
|
||||
}
|
||||
},
|
||||
// 添加对社团选择的监听
|
||||
"formData.clubId"(newVal) {
|
||||
// 当经费来源是社团且选择了具体社团时,重新查询余额
|
||||
if (this.formData.reimburseFundSource === 'UNION_REIMBURSE_FUND_SOURCE_3' && newVal) {
|
||||
this.queryFundBalance();
|
||||
}
|
||||
},
|
||||
// 添加对经费来源的监听
|
||||
"formData.reimburseFundSource"(newVal) {
|
||||
// 经费来源改变时查询余额
|
||||
this.queryFundBalance();
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
methods: {
|
||||
async onSave() {
|
||||
// 余额校验
|
||||
if (this.formData.money && this.formData.fundBalance) {
|
||||
const balance = parseFloat(this.formData.fundBalance);
|
||||
const money = parseFloat(this.formData.money);
|
||||
if (balance < money) {
|
||||
this.$message.warning("经费余额不足");
|
||||
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('网络错误,请稍后重试');
|
||||
});
|
||||
} catch (error) {
|
||||
// 表单验证失败
|
||||
console.log('表单验证失败', error);
|
||||
}
|
||||
},
|
||||
// 提交
|
||||
async onSubmit(){
|
||||
// 余额校验
|
||||
if (this.formData.money && this.formData.fundBalance) {
|
||||
const balance = parseFloat(this.formData.fundBalance);
|
||||
const money = parseFloat(this.formData.money);
|
||||
if (balance < money) {
|
||||
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('网络错误,请稍后重试');
|
||||
});
|
||||
}).catch(() => {
|
||||
// 取消提交
|
||||
});
|
||||
} catch (error) {
|
||||
// 表单验证失败
|
||||
console.log('表单验证失败', error);
|
||||
}
|
||||
},
|
||||
// 再次提交
|
||||
async onSubmitAgain() {
|
||||
// 余额校验
|
||||
if (this.formData.money && this.formData.fundBalance) {
|
||||
const balance = parseFloat(this.formData.fundBalance);
|
||||
const money = parseFloat(this.formData.money);
|
||||
if (balance < money) {
|
||||
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/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);
|
||||
}
|
||||
},
|
||||
onReimburseTypeConfirm(o) {
|
||||
this.$set(this.formData, "reimburseTypeName", o.text); // 显示名称
|
||||
this.$set(this.formData, "reimburseType", o.value); // 字典值
|
||||
this.showReimburseTypePicker = false;
|
||||
},
|
||||
onPaymentWayConfirm(o) {
|
||||
this.$set(this.formData, "paymentWayName", o.text); // 显示名称
|
||||
this.$set(this.formData, "paymentWay", o.value); // 字典值
|
||||
this.showPaymentWayPicker = false;
|
||||
},
|
||||
onReimburseProjectConfirm(o) {
|
||||
this.$set(this.formData, "reimburseProjectName", o.text); // 显示名称
|
||||
this.$set(this.formData, "reimburseProject", o.value); // 字典值
|
||||
this.showReimburseProjectPicker = false;
|
||||
},
|
||||
onReimburseFundSourceConfirm(o) {
|
||||
this.$set(this.formData, "reimburseFundSourceName", o.text); // 显示名称
|
||||
this.$set(this.formData, "reimburseFundSource", o.value); // 字典值
|
||||
this.showReimburseFundSourcePicker = false;
|
||||
},
|
||||
onClubConfirm(o) {
|
||||
this.$set(this.formData, "clubName", o.text);
|
||||
this.$set(this.formData, "clubId", o.value);
|
||||
this.showClubPicker = false;
|
||||
// 选择社团后查询经费余额
|
||||
this.queryFundBalance();
|
||||
},
|
||||
onCondolenceConfirm(o) {
|
||||
this.$set(this.formData, "condolenceName", o.text);
|
||||
this.$set(this.formData, "condolenceId", o.value);
|
||||
this.showCondolencePicker = false;
|
||||
// 设置联系方式
|
||||
const selectedUser = this.condolenceOptions.find(user => user.id === o.value);
|
||||
if (selectedUser) {
|
||||
this.$set(this.formData, "condolenceMobile", selectedUser.mobile);
|
||||
}
|
||||
},
|
||||
onCondolenceTypeConfirm(o) {
|
||||
this.$set(this.formData, "condolenceTypeName", o.text);
|
||||
this.$set(this.formData, "condolenceType", o.value);
|
||||
this.showCondolenceTypePicker = false;
|
||||
// 设置慰问金额
|
||||
const selectedType = this.typeOptions.find(type => type.id === o.value);
|
||||
if (selectedType) {
|
||||
this.$set(this.formData, "money", selectedType.money);
|
||||
}
|
||||
},
|
||||
onActivityTypeConfirm(o) {
|
||||
this.$set(this.formData, "activityTypeText", o.text);
|
||||
this.$set(this.formData, "activityType", o.value);
|
||||
this.showActivityTypePicker = false;
|
||||
},
|
||||
async initDictOptions() {
|
||||
// 报销类别
|
||||
const reimburseTypeData = await this.$businessTool.getDictOptions('UNION_REIMBURSE_TYPE')
|
||||
this.reimburseTypeColumns = reimburseTypeData.map(item => {
|
||||
return {value: item.code, text: item.name}
|
||||
})
|
||||
|
||||
// 支付方式
|
||||
const paymentWayData = await this.$businessTool.getDictOptions('UNION_REIMBURSE_PAYMENT_WAY')
|
||||
this.paymentWayColumns = paymentWayData.map(item => {
|
||||
return {value: item.code, text: item.name}
|
||||
})
|
||||
|
||||
// 报销项目
|
||||
const reimburseProjectData = await this.$businessTool.getDictOptions('UNION_REIMBURSE_PROJECT')
|
||||
this.reimburseProjectColumns = reimburseProjectData.map(item => {
|
||||
return {value: item.code, text: item.name}
|
||||
})
|
||||
this.reimburseProjectList = reimburseProjectData; // 保存原始数据
|
||||
|
||||
// 报销经费来源
|
||||
const reimburseFundSourceData = await this.$businessTool.getDictOptions('UNION_REIMBURSE_FUND_SOURCE')
|
||||
this.reimburseFundSourceColumns = reimburseFundSourceData.map(item => {
|
||||
return {value: item.code, text: item.name}
|
||||
})
|
||||
// 添加经费来源区分
|
||||
await this.filterReimburseFundSources();
|
||||
},
|
||||
|
||||
// 查询慰问对象
|
||||
queryCondolence(keyword) {
|
||||
this.$axios.post("/platform/UnionReimburse/apply/listUser", {keyword: keyword}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.condolenceOptions = res.data;
|
||||
this.condolenceColumns = res.data.map(item => {
|
||||
return {
|
||||
text: item.userName+'('+item.loginName+')'+'('+item.unitName+')'+'('+item.sex+')',
|
||||
value: item.id
|
||||
}
|
||||
});
|
||||
}
|
||||
})
|
||||
},
|
||||
// 搜索慰问对象
|
||||
searchCondolence() {
|
||||
if (!this.condolenceSearchKeyword) {
|
||||
this.condolenceSearchResults = [];
|
||||
return;
|
||||
}
|
||||
|
||||
this.$axios.post("/platform/UnionReimburse/apply/listUser", {
|
||||
keyword: this.condolenceSearchKeyword
|
||||
}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.condolenceSearchResults = res.data;
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
// 选择慰问对象
|
||||
selectCondolence(user) {
|
||||
this.$set(this.formData, "condolenceName", user.userName);
|
||||
this.$set(this.formData, "condolenceId", user.id);
|
||||
this.$set(this.formData, "condolenceMobile", user.mobile);
|
||||
this.showCondolenceSearch = false;
|
||||
},
|
||||
// 查询慰问类型
|
||||
queryCondolenceType() {
|
||||
this.$axios.post("/platform/unionReimburse/apply/queryCondolenceType")
|
||||
.then((resp) => {
|
||||
this.typeOptions = resp.data;
|
||||
this.condolenceTypeColumns = resp.data.map(item => {
|
||||
return {text: item.name, value: item.id}
|
||||
});
|
||||
})
|
||||
},
|
||||
// 慰问时间确认事件
|
||||
onCondolenceTimeConfirm(value) {
|
||||
// 格式化日期为 YYYY-MM-DD 格式
|
||||
this.$set(this.formData, "condolenceTime", this.$moment(value).format("YYYY-MM-DD"));
|
||||
this.showCondolenceTimePicker = false;
|
||||
},
|
||||
|
||||
// 活动时间确认事件
|
||||
onActivityTimeConfirm(value) {
|
||||
// 格式化日期为 YYYY-MM-DD 格式
|
||||
this.$set(this.formData, "activityTime", this.$moment(value).format("YYYY-MM-DD"));
|
||||
this.showActivityTimePicker = false;
|
||||
},
|
||||
|
||||
// 查询社团
|
||||
queryClubs() {
|
||||
this.$businessTool.listClub().then((res) => {
|
||||
this.clubOptions = res;
|
||||
this.clubColumns = res.map(item => {
|
||||
return {text: item.clubName, value: item.id}
|
||||
});
|
||||
})
|
||||
},
|
||||
// 查询经费余额
|
||||
queryFundBalance() {
|
||||
if (!this.formData.reimburseFundSource) {
|
||||
this.$set(this.formData, 'fundBalance', '');
|
||||
return;
|
||||
}
|
||||
|
||||
// 如果是社团经费来源,但没有选择具体社团,则不查询
|
||||
if (this.formData.reimburseFundSource === 'UNION_REIMBURSE_FUND_SOURCE_3' && !this.formData.clubId) {
|
||||
this.$set(this.formData, 'fundBalance', '');
|
||||
return;
|
||||
}
|
||||
|
||||
// 定义API映射关系
|
||||
const apiMap = {
|
||||
'UNION_REIMBURSE_FUND_SOURCE_1': {
|
||||
url: "/platform/unionReimburse/apply/getSchoolBudget",
|
||||
},
|
||||
'UNION_REIMBURSE_FUND_SOURCE_2': {
|
||||
url: "/platform/unionReimburse/apply/getUnionBalance",
|
||||
},
|
||||
'UNION_REIMBURSE_FUND_SOURCE_3': {
|
||||
url: "/platform/unionReimburse/apply/getClubBudget",
|
||||
}
|
||||
};
|
||||
|
||||
const fundSource = this.formData.reimburseFundSource;
|
||||
const apiInfo = apiMap[fundSource];
|
||||
|
||||
// 如果没有匹配的API,清空经费余额并返回
|
||||
if (!apiInfo) {
|
||||
this.$set(this.formData, 'fundBalance', '');
|
||||
return;
|
||||
}
|
||||
|
||||
// 构造请求参数
|
||||
const params = {
|
||||
reimburseFundSource: fundSource
|
||||
};
|
||||
|
||||
// 如果是社团经费,需要传递社团ID
|
||||
if (fundSource === 'UNION_REIMBURSE_FUND_SOURCE_3' && this.formData.clubId) {
|
||||
params.clubId = this.formData.clubId;
|
||||
}
|
||||
|
||||
// 显示加载状态
|
||||
this.$set(this.formData, 'fundBalance', '查询中...');
|
||||
|
||||
// 发送请求
|
||||
this.$axios.post(apiInfo.url, params)
|
||||
.then(response => {
|
||||
if (response.code === 0) {
|
||||
// 显示经费余额(只显示数字,不显示"元")
|
||||
this.$set(this.formData, 'fundBalance', response.data || '0.00');
|
||||
} else {
|
||||
this.$set(this.formData, 'fundBalance', '查询失败');
|
||||
}
|
||||
})
|
||||
.catch(error => {
|
||||
console.error("经费余额查询失败:", error);
|
||||
this.$set(this.formData, 'fundBalance', '查询失败');
|
||||
this.$toast.fail("经费余额查询失败");
|
||||
});
|
||||
},
|
||||
// 添加经费来源区分
|
||||
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 => {
|
||||
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);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// 更新经费来源选项
|
||||
this.reimburseFundSourceColumns = filteredSources;
|
||||
},
|
||||
init() {
|
||||
this.bizId = GetQueryString("bizId")
|
||||
if (this.bizId) {
|
||||
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 ) {
|
||||
const matchedReimburseType = this.reimburseTypeColumns.find(item =>
|
||||
item.value === originalData.reimburseType
|
||||
)
|
||||
if (matchedReimburseType) {
|
||||
this.$set(this.formData, "reimburseTypeName", matchedReimburseType.text)
|
||||
this.$set(this.formData, "reimburseType", matchedReimburseType.value)
|
||||
}
|
||||
}
|
||||
|
||||
// 处理支付方式显示
|
||||
if (this.paymentWayColumns.length > 0) {
|
||||
const matchedPaymentWay = this.paymentWayColumns.find(item =>
|
||||
item.value === originalData.paymentWay
|
||||
)
|
||||
if (matchedPaymentWay) {
|
||||
this.$set(this.formData, "paymentWayName", matchedPaymentWay.text)
|
||||
this.$set(this.formData, "paymentWay", matchedPaymentWay.value)
|
||||
}
|
||||
}
|
||||
|
||||
// 处理报销项目显示
|
||||
if (this.reimburseProjectColumns.length > 0 ) {
|
||||
const matchedReimburseProject = this.reimburseProjectColumns.find(item =>
|
||||
item.value === originalData.reimburseProject
|
||||
)
|
||||
if (matchedReimburseProject) {
|
||||
this.$set(this.formData, "reimburseProjectName", matchedReimburseProject.text)
|
||||
this.$set(this.formData, "reimburseProject", matchedReimburseProject.value)
|
||||
}
|
||||
}
|
||||
|
||||
// 处理报销经费来源显示
|
||||
if (this.reimburseFundSourceColumns.length > 0 ) {
|
||||
const matchedReimburseFundSource = this.reimburseFundSourceColumns.find(item =>
|
||||
item.value === originalData.reimburseFundSource
|
||||
)
|
||||
if (matchedReimburseFundSource) {
|
||||
this.$set(this.formData, "reimburseFundSourceName", matchedReimburseFundSource.text)
|
||||
this.$set(this.formData, "reimburseFundSource", matchedReimburseFundSource.value)
|
||||
}
|
||||
}
|
||||
|
||||
// 处理活动类型显示
|
||||
if (this.activityTypeColumns.length > 0 ) {
|
||||
const matchedActivityType = this.activityTypeColumns.find(item =>
|
||||
item.value === originalData.activityType
|
||||
)
|
||||
if (matchedActivityType) {
|
||||
this.$set(this.formData, "activityTypeText", matchedActivityType.text)
|
||||
this.$set(this.formData, "activityType", matchedActivityType.value)
|
||||
}
|
||||
}
|
||||
|
||||
// 处理社团显示
|
||||
if (this.clubColumns.length > 0 ) {
|
||||
const matchedClub = this.clubColumns.find(item =>
|
||||
item.value === originalData.clubId
|
||||
)
|
||||
if (matchedClub) {
|
||||
this.$set(this.formData, "clubName", matchedClub.text)
|
||||
}
|
||||
}
|
||||
|
||||
// 处理慰问类型显示
|
||||
if (this.condolenceTypeColumns.length > 0 ) {
|
||||
const matchedCondolenceType = this.condolenceTypeColumns.find(item =>
|
||||
item.value === originalData.condolenceType
|
||||
)
|
||||
if (matchedCondolenceType) {
|
||||
this.$set(this.formData, "condolenceTypeName", matchedCondolenceType.text)
|
||||
}
|
||||
}
|
||||
|
||||
// 查询经费余额
|
||||
if (this.formData.reimburseFundSource) {
|
||||
this.queryFundBalance();
|
||||
}
|
||||
}
|
||||
})
|
||||
} else {
|
||||
const user = this.$store.state.user
|
||||
this.$set(this.formData, "userName", user.username)
|
||||
this.$set(this.formData, "loginName", user.loginname)
|
||||
this.$set(this.formData, "mobile", user.mobile)
|
||||
this.$set(this.formData, "userId", user.id)
|
||||
this.$set(this.formData, "unitId", user.unitId)
|
||||
this.$set(this.formData, "unitName", user.unit.name)
|
||||
this.$set(this.formData, "unionId", user.union.id)
|
||||
this.$set(this.formData, "unionName", user.union.name)
|
||||
}
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
|
||||
async created() {
|
||||
await this.initDictOptions();
|
||||
await this.init();
|
||||
this.queryCondolenceType();
|
||||
this.queryClubs();
|
||||
}
|
||||
});
|
||||
</script>
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
+149
@@ -0,0 +1,149 @@
|
||||
<!--#
|
||||
layout("/layouts/platform_h5.html"){
|
||||
#-->
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<van-nav-bar @click-left="historyBack" left-arrow left-text="返回" title="报销统计" placeholder fixed></van-nav-bar>
|
||||
<van-sticky offset-top="46px">
|
||||
<van-search
|
||||
:reverse-color="false"
|
||||
:show-action="false"
|
||||
@search="doSearch"
|
||||
input-align="left"
|
||||
placeholder="请输入经办人搜索"
|
||||
v-model="pageForm.userName"
|
||||
></van-search>
|
||||
<van-dropdown-menu :close-on-click-outside="false" :close-on-click-overlay="false">
|
||||
<van-dropdown-item :options="yearList" @change="doSearch" v-model="pageForm.year"></van-dropdown-item>
|
||||
</van-dropdown-menu>
|
||||
</van-sticky>
|
||||
|
||||
|
||||
<table-list api="/platform/unionReimburse/collect/pageData" :page_form.sync="pageForm" ref="tableListRef"
|
||||
@ready="doSearch" title="taskName">
|
||||
<template v-slot="{index,row}">
|
||||
<table-column label="经办人">{{row.userName}}</table-column>
|
||||
<table-column label="所属工会">{{row.unionName}}</table-column>
|
||||
<table-column label="所属单位">{{row.unitName}}</table-column>
|
||||
<table-column label="报销类别">
|
||||
<dict-tag :options="dict.type.UNION_REIMBURSE_TYPE"
|
||||
:value="row.reimburseType">
|
||||
</dict-tag>
|
||||
</table-column>
|
||||
<table-column label="报销项目">
|
||||
<dict-tag :options="dict.type.UNION_REIMBURSE_PROJECT"
|
||||
:value="row.reimburseProject">
|
||||
</dict-tag>
|
||||
</table-column>
|
||||
<table-column label="金额">{{row.money}}</table-column>
|
||||
|
||||
</template>
|
||||
<template #actions="{index,row}">
|
||||
<div class="action-btn" @click="onView(row)">
|
||||
<i class="fa fa-eye"></i>
|
||||
<span>查看</span>
|
||||
</div>
|
||||
<div class="action-btn" @click="onEdit(row)" v-if="row.taskKey === 'startTask' || !row.instanceId">
|
||||
<i class="fa fa-edit"></i>
|
||||
<span>编辑</span>
|
||||
</div>
|
||||
<div class="action-btn delete" v-if="row.canRevoke" @click="onRevoke(item)">
|
||||
<i class="fa fa-undo"></i>
|
||||
<span>撤回</span>
|
||||
</div>
|
||||
<div class="action-btn delete" @click="onDelete(row)" v-if="row.taskKey === 'startTask' || !row.instanceId">
|
||||
<i class="fa fa-trash"></i>
|
||||
<span>删除</span>
|
||||
</div>
|
||||
</template>
|
||||
</table-list>
|
||||
|
||||
<union-reimburse-info ref="unionReimburseInfoRef"></union-reimburse-info>
|
||||
|
||||
</div>
|
||||
<script>
|
||||
<!--#include('../info.js'){}#-->
|
||||
const vue = new Vue({
|
||||
el: "#app",
|
||||
store,
|
||||
dicts: ["UNION_REIMBURSE_TYPE","UNION_REIMBURSE_PROJECT"],
|
||||
components: {
|
||||
"union-reimburse-info":UNION_REIMBURSE_INFO
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
viewShow: false,
|
||||
yearList: [],
|
||||
pageForm: {
|
||||
pageNumber: 1,
|
||||
pageSize: 10,
|
||||
totalCount: 0,
|
||||
searchKeyword: "",
|
||||
year: "",
|
||||
},
|
||||
infoShow: false
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
onView(row) {
|
||||
this.showApprovalForm = false
|
||||
this.$refs.unionReimburseInfoRef.onOpen(row)
|
||||
},
|
||||
onEdit(row) {
|
||||
this.$pjaxReplace("/platform/unionReimburse/apply/h5?bizId=" + row.id + "&taskId=" + row.startTaskId)
|
||||
},
|
||||
|
||||
onRevoke(row){
|
||||
this.$dialog
|
||||
.confirm({
|
||||
title: "提示",
|
||||
message: "您确定要撤销申请吗?"
|
||||
})
|
||||
.then(() => {
|
||||
this.$axios.post("/flow/common/revokeTask", {taskId: row.startTaskId}).then((resp) => {
|
||||
this.$toast.success(resp.msg)
|
||||
this.doSearch()
|
||||
})
|
||||
})
|
||||
},
|
||||
onDelete(row) {
|
||||
this.$dialog
|
||||
.confirm({
|
||||
title: "提示",
|
||||
message: "您确定要删除吗?"
|
||||
})
|
||||
.then(() => {
|
||||
this.$axios.post("/platform/unionReimburse/mine/delete", {id: row.id}).then((resp) => {
|
||||
if (resp.code === 0) {
|
||||
this.$toast.success(resp.msg)
|
||||
this.doSearch()
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
doSearch() {
|
||||
this.$nextTick(() => {
|
||||
this.pageForm.pageNumber = 1
|
||||
this.pageForm.totalCount = 0
|
||||
this.$refs.tableListRef.doSearch()
|
||||
})
|
||||
},
|
||||
initData() {
|
||||
for (let i = new Date().getFullYear() - 10; i <= new Date().getFullYear(); i++) {
|
||||
this.yearList.unshift({value: i, text: i + "年"})
|
||||
}
|
||||
this.$set(this.pageForm, "year", this.yearList[0].value)
|
||||
},
|
||||
|
||||
},
|
||||
created() {
|
||||
this.initData()
|
||||
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
@@ -0,0 +1,163 @@
|
||||
const UNION_REIMBURSE_INFO = {
|
||||
template:
|
||||
/*language=HTML*/`
|
||||
<van-action-sheet v-model="visible" title="查看详情">
|
||||
<div class="detail-container">
|
||||
<van-cell-group title="报销申请">
|
||||
<van-cell title="经办人">{{ viewData.userName }}</van-cell>
|
||||
<van-cell title="工号">{{ viewData.loginName }}</van-cell>
|
||||
<van-cell title="单位">{{ viewData.unitName }}</van-cell>
|
||||
<van-cell title="工会">{{ viewData.unionName }}</van-cell>
|
||||
<van-cell title="报销类别">
|
||||
<dict-tag :options="dict.type.UNION_REIMBURSE_TYPE"
|
||||
:value="viewData.reimburseType">
|
||||
</dict-tag></van-cell>
|
||||
<van-cell title="支付方式">
|
||||
<dict-tag :options="dict.type.UNION_REIMBURSE_PAYMENT_WAY"
|
||||
:value="viewData.paymentWay">
|
||||
</dict-tag></van-cell>
|
||||
<van-cell title="报销项目">
|
||||
<dict-tag :options="dict.type.UNION_REIMBURSE_PROJECT"
|
||||
:value="viewData.reimburseProject">
|
||||
</dict-tag></van-cell>
|
||||
<van-cell title="报销经费来源">
|
||||
<dict-tag :options="dict.type.UNION_REIMBURSE_FUND_SOURCE"
|
||||
:value="viewData.reimburseFundSource">
|
||||
</dict-tag></van-cell>
|
||||
<van-cell title="联系方式">{{ viewData.mobile }}</van-cell>
|
||||
<van-cell title="所属社团" v-if="viewData.reimburseFundSource === 'UNION_REIMBURSE_FUND_SOURCE_3'">{{ viewData.clubName }}</van-cell>
|
||||
<van-cell title="经费余额">{{ viewData.fundBalance }}</van-cell>
|
||||
<van-cell title="户名">{{ viewData.bankUserName }}</van-cell>
|
||||
<van-cell title="银行账号">{{ viewData.bankCardNumber }}</van-cell>
|
||||
<van-cell title="开户行">{{ viewData.bankOfDeposit }}</van-cell>
|
||||
<van-cell title="慰问对象" v-if="viewData.reimburseProject === 'UNION_REIMBURSE_PROJECT_1'">{{ viewData.condolenceName }}</van-cell>
|
||||
<van-cell title="联系方式" v-if="viewData.reimburseProject === 'UNION_REIMBURSE_PROJECT_1'">{{ viewData.condolenceMobile }}</van-cell>
|
||||
<van-cell title="慰问类型" v-if="viewData.reimburseProject === 'UNION_REIMBURSE_PROJECT_1'">{{ viewData.typeName }}</van-cell>
|
||||
<van-cell title="慰问金额" v-if="viewData.reimburseProject === 'UNION_REIMBURSE_PROJECT_1'">{{ viewData.money }}</van-cell>
|
||||
<van-cell title="慰问时间" v-if="viewData.reimburseProject === 'UNION_REIMBURSE_PROJECT_1'">{{ viewData.condolenceTime }}</van-cell>
|
||||
<van-cell title="活动名称" v-if="viewData.reimburseProject !== 'UNION_REIMBURSE_PROJECT_1'">{{ viewData.activityName }}</van-cell>
|
||||
<van-cell title="活动类型" v-if="viewData.reimburseProject === 'UNION_REIMBURSE_PROJECT_2'">{{ viewData.activityType }}</van-cell>
|
||||
<van-cell title="活动人数" v-if="viewData.reimburseProject === 'UNION_REIMBURSE_PROJECT_2'">{{ viewData.activityNumber }}</van-cell>
|
||||
<van-cell title="活动地点" v-if="viewData.reimburseProject !== 'UNION_REIMBURSE_PROJECT_1'">{{ viewData.activityPlace }}</van-cell>
|
||||
<van-cell title="报销金额" v-if="viewData.reimburseProject !== 'UNION_REIMBURSE_PROJECT_1'">{{ viewData.money }}</van-cell>
|
||||
<van-cell title="活动时间" v-if="viewData.reimburseProject !== 'UNION_REIMBURSE_PROJECT_1'">{{ viewData.activityTime }}</van-cell>
|
||||
<van-cell title="发票张数" v-if="viewData.reimburseType === 'UNION_REIMBURSE_TYPE_1'">{{ viewData.invoiceNumber }}</van-cell>
|
||||
<van-cell title="发票号码" v-if="viewData.reimburseType === 'UNION_REIMBURSE_TYPE_1'">{{ viewData.invoice }}</van-cell>
|
||||
<van-cell title="支付内容">{{ viewData.paymentNotes }}</van-cell>
|
||||
<van-cell title="附件">
|
||||
<div style="display: flex; flex-wrap: wrap;">
|
||||
<template v-for="(item,index) in viewData.files">
|
||||
<div v-if="item.url" :key="index" @click="previewOptionImg(viewData.files,index)" style="margin-right: 10px; margin-bottom: 10px;">
|
||||
<van-icon name="description" /> {{ getFileName(item.name) }}
|
||||
</div>
|
||||
</template>
|
||||
</div>
|
||||
</van-cell>
|
||||
</van-cell-group>
|
||||
|
||||
<template v-for="(task,index) in doneTasks">
|
||||
<div class="process-title">
|
||||
{{ task.displayName }}
|
||||
</div>
|
||||
<van-cell-group v-if="task.ext.isFirstTaskNode">
|
||||
<van-cell title="申请用户">
|
||||
{{ task.ext.initiatorName}}({{task.ext.initiatorAccount}})
|
||||
</van-cell>
|
||||
<van-cell title="申请时间">
|
||||
{{ task.finishTime}}
|
||||
</van-cell>
|
||||
<van-cell title="办理结果">
|
||||
<dict-tag :options="dict.type.PROCESS_TASK_SUBMIT_TYPE"
|
||||
:value="task.ext.submitType"></dict-tag>
|
||||
</van-cell>
|
||||
</van-cell-group>
|
||||
<van-cell-group v-else>
|
||||
<van-cell title="办理用户">
|
||||
{{ task.taskFormData.userName}}({{task.taskFormData.loginName}})
|
||||
</van-cell>
|
||||
<van-cell title="办理时间">
|
||||
{{ task.finishTime}}
|
||||
</van-cell>
|
||||
<van-cell title="办理结果">
|
||||
<dict-tag :options="dict.type.PROCESS_TASK_SUBMIT_TYPE"
|
||||
:value="task.ext.submitType"></dict-tag>
|
||||
</van-cell>
|
||||
<van-cell title="办理意见" v-if="!task.ext.isFirstTaskNode">
|
||||
<template #label>
|
||||
{{
|
||||
task.taskFormData.opinion
|
||||
}}
|
||||
</template>
|
||||
</van-cell>
|
||||
<van-cell title="签字" v-if="!task.ext.isFirstTaskNode">
|
||||
<van-image :src="task.ext.tf_userSign"
|
||||
v-if="task.ext.tf_userSign"
|
||||
class="signature-image"></van-image>
|
||||
</van-cell>
|
||||
</van-cell-group>
|
||||
</template>
|
||||
|
||||
</div>
|
||||
<slot></slot>
|
||||
</van-action-sheet>
|
||||
`,
|
||||
dicts: ["UNION_REIMBURSE_TYPE", "UNION_REIMBURSE_PAYMENT_WAY", "UNION_REIMBURSE_FUND_SOURCE","UNION_REIMBURSE_PROJECT","PROCESS_TASK_SUBMIT_TYPE"],
|
||||
data() {
|
||||
return {
|
||||
visible:false,
|
||||
viewData: {},
|
||||
doneTasks: [],
|
||||
row: null,
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 获取文件名
|
||||
getFileName(url) {
|
||||
if (!url) return '';
|
||||
const fileName = url.split('/').pop();
|
||||
return fileName.length > 15 ? fileName.substring(0, 15) + '...' : fileName;
|
||||
},
|
||||
|
||||
//预览文件
|
||||
previewOptionImg(files, index) {
|
||||
const file = files[index];
|
||||
if (!file || !file.url) return;
|
||||
|
||||
// 所有文件都在新窗口打开
|
||||
window.open(file.url, '_blank');
|
||||
},
|
||||
onOpen(row) {
|
||||
this.row = row
|
||||
this.visible = true
|
||||
this.getInfo()
|
||||
this.getDoneTasks()
|
||||
},
|
||||
// 关闭
|
||||
onClose(){
|
||||
this.visible = false
|
||||
},
|
||||
// 获取申请信息
|
||||
getInfo() {
|
||||
this.$axios.post("/platform/unionReimburse/apply/info", {id: this.row.id}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.viewData = res.data
|
||||
}
|
||||
})
|
||||
},
|
||||
// 查看
|
||||
openView(id) {
|
||||
this.$nextTick(() => {
|
||||
this.$refs.infoDialogRef.onOpen(id)
|
||||
})
|
||||
},
|
||||
// 获取已办任务审批记录
|
||||
getDoneTasks() {
|
||||
this.$axios.post("/flow/common/doneTasks", {bizId: this.row.id}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.doneTasks = res.data
|
||||
}
|
||||
})
|
||||
},
|
||||
},
|
||||
|
||||
}
|
||||
+141
@@ -0,0 +1,141 @@
|
||||
<!--#
|
||||
layout("/layouts/platform_h5.html"){
|
||||
#-->
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<van-nav-bar @click-left="historyBack" left-arrow left-text="返回" title="我的报销" placeholder fixed></van-nav-bar>
|
||||
<van-sticky offset-top="46px">
|
||||
<van-dropdown-menu :close-on-click-outside="false" :close-on-click-overlay="false">
|
||||
<van-dropdown-item :options="yearList" @change="doSearch" v-model="pageForm.year"></van-dropdown-item>
|
||||
</van-dropdown-menu>
|
||||
</van-sticky>
|
||||
|
||||
|
||||
<table-list api="/platform/unionReimburse/mine/pageData" :page_form.sync="pageForm" ref="tableListRef"
|
||||
@ready="doSearch" title="taskName">
|
||||
<template v-slot="{index,row}">
|
||||
<table-column label="经办人">{{row.userName}}</table-column>
|
||||
<table-column label="所属工会">{{row.unionName}}</table-column>
|
||||
<table-column label="所属单位">{{row.unitName}}</table-column>
|
||||
<table-column label="报销类别">
|
||||
<dict-tag :options="dict.type.UNION_REIMBURSE_TYPE"
|
||||
:value="row.reimburseType">
|
||||
</dict-tag>
|
||||
</table-column>
|
||||
<table-column label="报销项目">
|
||||
<dict-tag :options="dict.type.UNION_REIMBURSE_PROJECT"
|
||||
:value="row.reimburseProject">
|
||||
</dict-tag>
|
||||
</table-column>
|
||||
<table-column label="金额">{{row.money}}</table-column>
|
||||
|
||||
</template>
|
||||
<template #actions="{index,row}">
|
||||
<div class="action-btn" @click="onView(row)">
|
||||
<i class="fa fa-eye"></i>
|
||||
<span>查看</span>
|
||||
</div>
|
||||
<div class="action-btn" @click="onEdit(row)" v-if="row.taskKey === 'startTask' || !row.instanceId">
|
||||
<i class="fa fa-edit"></i>
|
||||
<span>编辑</span>
|
||||
</div>
|
||||
<div class="action-btn delete" v-if="row.canRevoke" @click="onRevoke(row)">
|
||||
<i class="fa fa-undo"></i>
|
||||
<span>撤回</span>
|
||||
</div>
|
||||
<div class="action-btn delete" @click="onDelete(row)" v-if="row.taskKey === 'startTask' || !row.instanceId">
|
||||
<i class="fa fa-trash"></i>
|
||||
<span>删除</span>
|
||||
</div>
|
||||
</template>
|
||||
</table-list>
|
||||
|
||||
<union-reimburse-info ref="unionReimburseInfoRef"></union-reimburse-info>
|
||||
|
||||
</div>
|
||||
<script>
|
||||
<!--#include('../info.js'){}#-->
|
||||
const vue = new Vue({
|
||||
el: "#app",
|
||||
store,
|
||||
dicts: ["UNION_REIMBURSE_TYPE","UNION_REIMBURSE_PROJECT"],
|
||||
components: {
|
||||
"union-reimburse-info":UNION_REIMBURSE_INFO
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
viewShow: false,
|
||||
yearList: [],
|
||||
pageForm: {
|
||||
pageNumber: 1,
|
||||
pageSize: 10,
|
||||
totalCount: 0,
|
||||
searchKeyword: "",
|
||||
year: "",
|
||||
},
|
||||
infoShow: false
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
onView(row) {
|
||||
this.showApprovalForm = false
|
||||
this.$refs.unionReimburseInfoRef.onOpen(row)
|
||||
},
|
||||
onEdit(row) {
|
||||
this.$pjaxReplace('/platform/unionReimburse/apply/h5?taskId=' + (row.startTaskId || '') + "&bizId=" + row.id)
|
||||
},
|
||||
|
||||
onRevoke(row){
|
||||
this.$dialog
|
||||
.confirm({
|
||||
title: "提示",
|
||||
message: "您确定要撤销申请吗?"
|
||||
})
|
||||
.then(() => {
|
||||
this.$axios.post("/flow/common/revokeTask", {taskId: row.startTaskId}).then((resp) => {
|
||||
this.$toast.success(resp.msg)
|
||||
this.doSearch()
|
||||
})
|
||||
})
|
||||
},
|
||||
onDelete(row) {
|
||||
this.$dialog
|
||||
.confirm({
|
||||
title: "提示",
|
||||
message: "您确定要删除吗?"
|
||||
})
|
||||
.then(() => {
|
||||
this.$axios.post("/platform/unionReimburse/mine/delete", {id: row.id}).then((resp) => {
|
||||
if (resp.code === 0) {
|
||||
this.$toast.success(resp.msg)
|
||||
this.doSearch()
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
doSearch() {
|
||||
this.$nextTick(() => {
|
||||
this.pageForm.pageNumber = 1
|
||||
this.pageForm.totalCount = 0
|
||||
this.$refs.tableListRef.doSearch()
|
||||
})
|
||||
},
|
||||
initData() {
|
||||
for (let i = new Date().getFullYear() - 10; i <= new Date().getFullYear(); i++) {
|
||||
this.yearList.unshift({value: i, text: i + "年"})
|
||||
}
|
||||
this.$set(this.pageForm, "year", this.yearList[0].value)
|
||||
},
|
||||
|
||||
},
|
||||
created() {
|
||||
this.initData()
|
||||
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
+175
@@ -0,0 +1,175 @@
|
||||
<!--#
|
||||
layout("/layouts/platform_h5.html"){
|
||||
#-->
|
||||
|
||||
<div id="app" v-cloak>
|
||||
<van-nav-bar @click-left="historyBack" left-arrow left-text="返回" title="报销审核" placeholder fixed></van-nav-bar>
|
||||
<van-sticky offset-top="46px">
|
||||
<van-search
|
||||
:reverse-color="false"
|
||||
:show-action="false"
|
||||
@search="doSearch"
|
||||
input-align="left"
|
||||
placeholder="请输入经办人搜索"
|
||||
v-model="pageForm.userName"
|
||||
></van-search>
|
||||
<van-tabs v-model="pageForm.approvalText"
|
||||
@change="(val)=>{this.pageForm.approval = val==='1';this.doSearch();}">
|
||||
<van-tab title="已审核" name="1"></van-tab>
|
||||
<van-tab title="未审核" name="0"></van-tab>
|
||||
</van-tabs>
|
||||
</van-sticky>
|
||||
|
||||
|
||||
<table-list api="/platform/unionReimburse/review/pageData" :page_form.sync="pageForm" ref="tableListRef"
|
||||
@ready="doSearch" title="curTaskName">
|
||||
<template v-slot="{index,row}">
|
||||
<table-column label="经办人">{{row.userName}}</table-column>
|
||||
<table-column label="所属工会">{{row.unionName}}</table-column>
|
||||
<table-column label="所属单位">{{row.unitName}}</table-column>
|
||||
<table-column label="报销类别">
|
||||
<dict-tag :options="dict.type.UNION_REIMBURSE_TYPE"
|
||||
:value="row.reimburseType">
|
||||
</dict-tag>
|
||||
</table-column>
|
||||
<table-column label="报销项目">
|
||||
<dict-tag :options="dict.type.UNION_REIMBURSE_PROJECT"
|
||||
:value="row.reimburseProject">
|
||||
</dict-tag>
|
||||
</table-column>
|
||||
<table-column label="金额">{{row.money}}</table-column>
|
||||
|
||||
</template>
|
||||
<template #actions="{index,row}">
|
||||
<div class="action-btn" @click="onView(row)">
|
||||
<i class="fa fa-eye"></i>
|
||||
<span>查看</span>
|
||||
</div>
|
||||
<div class="action-btn" v-if="row.taskState === 10" @click="onAudit(row)">
|
||||
<i class="fa fa-edit"></i>
|
||||
<span>审核</span>
|
||||
</div>
|
||||
</template>
|
||||
</table-list>
|
||||
|
||||
<union-reimburse-info ref="unionReimburseInfoRef">
|
||||
<div v-if="showApprovalForm">
|
||||
<div class="process-title">
|
||||
校工会审核
|
||||
</div>
|
||||
<div class="form-container">
|
||||
<van-form ref="formRef">
|
||||
<van-cell-group title="审批意见">
|
||||
<van-field label=""
|
||||
:rules="[{ required: true,message:'请填审批意见' }]"
|
||||
v-model="formData.tf_opinion"
|
||||
required
|
||||
type="textarea"
|
||||
name="tf_opinion"
|
||||
rows="4"
|
||||
autosize
|
||||
class="more-text"
|
||||
placeholder="请填审批意见"></van-field>
|
||||
</van-cell-group>
|
||||
<van-cell-group title="电子签名" class="form-section">
|
||||
<van-field class="more-text" name="tf_userSign" label="">
|
||||
<template #input>
|
||||
<h5-signature v-model="formData.tf_userSign" slot="input"></h5-signature>
|
||||
</template>
|
||||
</van-field>
|
||||
</van-cell-group>
|
||||
<!-- 按钮区域 -->
|
||||
<div class="form-actions">
|
||||
<van-button @click="handleTaskAction(6)">退回到发起人</van-button>
|
||||
<van-button type="danger" @click="handleTaskAction(2)">拒绝申请</van-button>
|
||||
<van-button type="primary" @click="handleTaskAction(1)">同意申请</van-button>
|
||||
</div>
|
||||
</van-form>
|
||||
</div>
|
||||
</div>
|
||||
</union-reimburse-info>
|
||||
|
||||
</div>
|
||||
<script>
|
||||
<!--#include('../info.js'){}#-->
|
||||
const vue = new Vue({
|
||||
el: "#app",
|
||||
store,
|
||||
dicts: ["UNION_REIMBURSE_TYPE","UNION_REIMBURSE_PROJECT"],
|
||||
components: {
|
||||
"union-reimburse-info":UNION_REIMBURSE_INFO
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
pageForm: {
|
||||
pageNumber: 1,
|
||||
pageSize: 10,
|
||||
totalCount: 0,
|
||||
searchKeyword: "",
|
||||
approvalText: "0",
|
||||
approval: false,
|
||||
year: new Date().getFullYear(),
|
||||
},
|
||||
formData: {},
|
||||
showApprovalForm: false,
|
||||
infoShow: false
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
handleTaskAction(val) {
|
||||
this.$refs.formRef.validate().then(() => {
|
||||
this.$dialog.confirm({
|
||||
title: '温馨提示',
|
||||
message: '您确定要提交吗?',
|
||||
}).then(() => {
|
||||
this.$axios.post('/flow/common/executeTask', {
|
||||
data: JSON.stringify({
|
||||
...this.formData,
|
||||
submitType: val
|
||||
})
|
||||
}).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.$toast.success("提交成功")
|
||||
this.doSearch()
|
||||
this.$refs.unionReimburseInfoRef.onClose()
|
||||
}
|
||||
})
|
||||
}).catch(() => {
|
||||
// on cancel
|
||||
});
|
||||
}).catch();
|
||||
},
|
||||
onView(row) {
|
||||
this.showApprovalForm = false
|
||||
this.$refs.unionReimburseInfoRef.onOpen(row)
|
||||
},
|
||||
onAudit(row) {
|
||||
this.showApprovalForm = true
|
||||
this.formData = {
|
||||
tf_opinion: null,
|
||||
tf_userSign: null,
|
||||
processTaskId: row.taskId,
|
||||
taskName: row.curTaskName
|
||||
}
|
||||
this.$refs.unionReimburseInfoRef.onOpen(row)
|
||||
},
|
||||
|
||||
doSearch() {
|
||||
this.$nextTick(() => {
|
||||
this.pageForm.pageNumber = 1
|
||||
this.pageForm.totalCount = 0
|
||||
this.$refs.tableListRef.doSearch()
|
||||
})
|
||||
},
|
||||
|
||||
},
|
||||
created() {
|
||||
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
-1
@@ -95,7 +95,6 @@ layout("/layouts/platform_h5.html"){
|
||||
pageSize: 10,
|
||||
totalCount: 0,
|
||||
searchKeyword: '',
|
||||
name: null,
|
||||
approvalText: "0",
|
||||
approval: false,
|
||||
year: new Date().getFullYear(),
|
||||
|
||||
-1
@@ -95,7 +95,6 @@ layout("/layouts/platform_h5.html"){
|
||||
pageSize: 10,
|
||||
totalCount: 0,
|
||||
searchKeyword: '',
|
||||
name: null,
|
||||
approvalText: "0",
|
||||
approval: false,
|
||||
year: new Date().getFullYear(),
|
||||
|
||||
@@ -94,7 +94,7 @@ layout("/layouts/platform_h5.html"){
|
||||
})
|
||||
},
|
||||
onEdit(row) {
|
||||
window.location.href = '/platform/h5/childManage/write?bizId=' + row.id
|
||||
window.location.href = '/platform/childManage/write/h5?bizId=' + row.id
|
||||
},
|
||||
onDelete(id) {
|
||||
this.$dialog.confirm({
|
||||
|
||||
@@ -87,14 +87,14 @@ layout("/layouts/platform_h5.html"){
|
||||
})
|
||||
},
|
||||
onEdit(row) {
|
||||
window.location.href = '/platform/h5/childManage/write?bizId=' + row.id
|
||||
window.location.href = '/platform/childManage/write/h5?bizId=' + row.id
|
||||
},
|
||||
onDelete(id) {
|
||||
onDelete(row) {
|
||||
this.$dialog.confirm({
|
||||
title: '温馨提示',
|
||||
message: '您确定要删除吗?',
|
||||
}).then(() => {
|
||||
this.$axios.post("/platform/childManage/mine/doDelete", {id}).then((res) => {
|
||||
this.$axios.post("/platform/childManage/mine/doDelete", {id: row.id}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$toast.success(res.msg)
|
||||
this.doSearch()
|
||||
|
||||
@@ -22,7 +22,7 @@ layout("/layouts/platform_h5.html"){
|
||||
name="childrenGrade"
|
||||
label="就读年级"
|
||||
readonly
|
||||
placeholder="请点击就读年级"
|
||||
placeholder="请选择就读年级"
|
||||
@click="showChildrenGradePicker = true"
|
||||
clickable
|
||||
></van-field>
|
||||
@@ -208,7 +208,7 @@ layout("/layouts/platform_h5.html"){
|
||||
this.$axios.post("/platform/childManage/write/save", { data: JSON.stringify(submitData) }).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.$toast(res.msg)
|
||||
this.$pjaxReplace('/platform/h5/childManage/mine')
|
||||
this.$pjaxReplace('/platform/childManage/mine/h5')
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user