困难帮扶移植
This commit is contained in:
+77
@@ -1,7 +1,10 @@
|
||||
package com.budwk.app.zhgh.staffbenefit.difficulthelp.controller;
|
||||
|
||||
import cn.afterturn.easypoi.excel.ExcelExportUtil;
|
||||
import cn.afterturn.easypoi.excel.entity.ExportParams;
|
||||
import cn.afterturn.easypoi.excel.entity.TemplateExportParams;
|
||||
import cn.afterturn.easypoi.excel.entity.enmus.ExcelType;
|
||||
import cn.afterturn.easypoi.excel.entity.params.ExcelExportEntity;
|
||||
import cn.dev33.satoken.annotation.SaCheckLogin;
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
@@ -9,6 +12,7 @@ import cn.hutool.core.io.FileUtil;
|
||||
import cn.hutool.core.io.IoUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import cn.hutool.json.JSONUtil;
|
||||
import com.alibaba.excel.EasyExcel;
|
||||
import com.budwk.app.base.constant.RoleConstant;
|
||||
import com.budwk.app.base.page.Pagination;
|
||||
import com.budwk.app.base.result.Result;
|
||||
@@ -24,10 +28,13 @@ import com.budwk.app.web.commons.auth.utils.AuthUtil;
|
||||
import com.budwk.app.web.commons.auth.utils.SecurityUtil;
|
||||
import com.budwk.app.web.commons.base.Globals;
|
||||
import com.budwk.app.zhgh.activity.declarereimbursement.vo.ActivityBudgetVO;
|
||||
import com.budwk.app.zhgh.dayofficework.exerciseCard.vo.ExercisePeopleImportVo;
|
||||
import com.budwk.app.zhgh.dayofficework.unionReimburse.model.UnionReimburse;
|
||||
import com.budwk.app.zhgh.staffbenefit.difficulthelp.models.DifficultHelpInfo;
|
||||
import com.budwk.app.zhgh.staffbenefit.difficulthelp.service.DifficultHelpCommonService;
|
||||
import com.budwk.app.zhgh.staffbenefit.difficulthelp.vo.DifficultHelpPageParam;
|
||||
import com.budwk.app.zhgh.staffbenefit.difficulthelp.vo.moneyImportVo;
|
||||
import com.budwk.app.zhgh.staffbenefit.medicalMutualAid.aidFund.param.AidFundPageForm;
|
||||
import com.deepoove.poi.XWPFTemplate;
|
||||
import com.deepoove.poi.config.Configure;
|
||||
import com.deepoove.poi.data.PictureRenderData;
|
||||
@@ -52,9 +59,12 @@ import org.nutz.ioc.loader.annotation.IocBean;
|
||||
import org.nutz.lang.Lang;
|
||||
import org.nutz.lang.random.R;
|
||||
import org.nutz.lang.util.NutMap;
|
||||
import org.nutz.mvc.annotation.AdaptBy;
|
||||
import org.nutz.mvc.annotation.At;
|
||||
import org.nutz.mvc.annotation.Ok;
|
||||
import org.nutz.mvc.annotation.Param;
|
||||
import org.nutz.mvc.upload.TempFile;
|
||||
import org.nutz.mvc.upload.UploadAdaptor;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.awt.image.BufferedImage;
|
||||
@@ -66,6 +76,7 @@ import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.stream.IntStream;
|
||||
import java.util.zip.ZipEntry;
|
||||
import java.util.zip.ZipOutputStream;
|
||||
|
||||
@@ -118,6 +129,7 @@ public class DifficultHelpReadingController {
|
||||
LEFT(info.applyTime, 10) AS applyTime,
|
||||
info.applyCount,
|
||||
info.mobile,
|
||||
info.money,
|
||||
ins.id AS instanceId,
|
||||
ins.businessNo,
|
||||
ins.state instanceState,
|
||||
@@ -142,6 +154,7 @@ public class DifficultHelpReadingController {
|
||||
$condition
|
||||
""");
|
||||
Cnd cnd = Cnd.NEW();
|
||||
cnd.and("ins.state", "=", 20);
|
||||
pageParam.buildSearch(cnd, "info.");
|
||||
cnd.groupBy("info.id");
|
||||
sql.setCondition(cnd);
|
||||
@@ -160,6 +173,70 @@ public class DifficultHelpReadingController {
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
@At
|
||||
@Ok("void")
|
||||
@ApiOperation("导入模板下载")
|
||||
@SaCheckPermission("difficultHelp.reading")
|
||||
public void downloadTemplate(HttpServletResponse response) {
|
||||
try {
|
||||
response.setContentType("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet");
|
||||
response.setCharacterEncoding("utf-8");
|
||||
String fileName = URLEncoder.encode("实际金额导入模版", "UTF-8").replaceAll("\\+", "%20");
|
||||
response.setHeader("Content-disposition", "attachment;filename*=" + fileName + ".xlsx");
|
||||
EasyExcel.write(response.getOutputStream(), moneyImportVo.class)
|
||||
.sheet("实际金额导入模版")
|
||||
.doWrite(ArrayList::new);
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException("导出失败");
|
||||
}
|
||||
}
|
||||
|
||||
@At
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
@ApiOperation("导入实际金额")
|
||||
@SaCheckPermission("difficultHelp.reading")
|
||||
@AdaptBy(type = UploadAdaptor.class, args = {"ioc:fileUpload"})
|
||||
public Result importMoney(TempFile file, Boolean isFlag) {
|
||||
try {
|
||||
System.out.println(isFlag);
|
||||
NutMap nutMap = difficultHelpCommonService.handlingMoneyImport(file, isFlag);
|
||||
if (Lang.isNotEmpty(nutMap)) {
|
||||
return Result.success(nutMap);
|
||||
}
|
||||
return Result.success("导入成功");
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
return Result.error();
|
||||
}
|
||||
}
|
||||
|
||||
@At
|
||||
@Ok("void")
|
||||
@ApiOperation("导出会员年度补助记录")
|
||||
@SaCheckPermission("difficultHelp.reading")
|
||||
public void exportYearPayRecord(DifficultHelpPageParam pageForm, HttpServletResponse response){
|
||||
List<Integer> years = IntStream.rangeClosed(2025, DateUtil.thisYear())
|
||||
.boxed()
|
||||
.toList();
|
||||
List<ExcelExportEntity> entityList = new ArrayList<>();
|
||||
entityList.add(new ExcelExportEntity("姓名", "userName", 20));
|
||||
years.forEach(year -> {
|
||||
ExcelExportEntity entity = new ExcelExportEntity(String.valueOf(year), String.valueOf(year), 20);
|
||||
entity.setType(10);
|
||||
entityList.add(entity);
|
||||
});
|
||||
ExcelExportEntity entity = new ExcelExportEntity("合计", "totalMoney", 20);
|
||||
entity.setType(10);
|
||||
entityList.add(entity);
|
||||
|
||||
List<NutMap> list = difficultHelpCommonService.getYearPayList(pageForm);
|
||||
ExportParams exportParams = new ExportParams();
|
||||
exportParams.setType(ExcelType.XSSF);
|
||||
Workbook workbook = ExcelExportUtil.exportExcel(exportParams, entityList, list);
|
||||
CommonDownloadUtil.download(pageForm.getYear() + "受助人年度补助记录.xlsx", workbook, response);
|
||||
}
|
||||
|
||||
|
||||
@At
|
||||
@Ok("void")
|
||||
public void doExportAllApply(DifficultHelpPageParam pageParam, HttpServletResponse response) throws Exception {
|
||||
|
||||
+15
@@ -2,6 +2,12 @@ package com.budwk.app.zhgh.staffbenefit.difficulthelp.service;
|
||||
|
||||
import com.budwk.app.base.service.BaseService;
|
||||
import com.budwk.app.zhgh.staffbenefit.difficulthelp.models.DifficultHelpInfo;
|
||||
import com.budwk.app.zhgh.staffbenefit.difficulthelp.vo.DifficultHelpPageParam;
|
||||
import com.budwk.app.zhgh.staffbenefit.medicalMutualAid.aidFund.param.AidFundPageForm;
|
||||
import org.nutz.lang.util.NutMap;
|
||||
import org.nutz.mvc.upload.TempFile;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @version 1.0
|
||||
@@ -11,4 +17,13 @@ import com.budwk.app.zhgh.staffbenefit.difficulthelp.models.DifficultHelpInfo;
|
||||
* @注释
|
||||
*/
|
||||
public interface DifficultHelpCommonService extends BaseService<DifficultHelpInfo> {
|
||||
|
||||
/**
|
||||
* 导入实际金额数据处理
|
||||
* @param file 文件
|
||||
* @param isFlag 是否清空更新
|
||||
*/
|
||||
NutMap handlingMoneyImport(TempFile file, Boolean isFlag);
|
||||
|
||||
List<NutMap> getYearPayList(DifficultHelpPageParam pageForm);
|
||||
}
|
||||
|
||||
+154
@@ -1,10 +1,37 @@
|
||||
package com.budwk.app.zhgh.staffbenefit.difficulthelp.service.impl;
|
||||
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import cn.hutool.json.JSONUtil;
|
||||
import com.budwk.app.base.service.impl.BaseServiceImpl;
|
||||
import com.budwk.app.base.utils.ManyAddOrRenewUtil;
|
||||
import com.budwk.app.base.utils.easyexcel.EasyExcelUtil;
|
||||
import com.budwk.app.sys.models.Sys_user;
|
||||
import com.budwk.app.sys.views.View_user;
|
||||
import com.budwk.app.zhgh.staffbenefit.difficulthelp.models.DifficultHelpInfo;
|
||||
import com.budwk.app.zhgh.staffbenefit.difficulthelp.service.DifficultHelpCommonService;
|
||||
import com.budwk.app.zhgh.staffbenefit.difficulthelp.vo.DifficultHelpPageParam;
|
||||
import com.budwk.app.zhgh.staffbenefit.difficulthelp.vo.moneyImportVo;
|
||||
import com.budwk.app.zhgh.staffbenefit.medicalMutualAid.aidFund.model.AidFundMemberPay;
|
||||
import com.budwk.app.zhgh.staffbenefit.medicalMutualAid.aidFund.param.AidFundPageForm;
|
||||
import org.apache.poi.ss.formula.functions.T;
|
||||
import org.nutz.aop.interceptor.ioc.TransAop;
|
||||
import org.nutz.dao.Cnd;
|
||||
import org.nutz.dao.Dao;
|
||||
import org.nutz.dao.Sqls;
|
||||
import org.nutz.dao.entity.Record;
|
||||
import org.nutz.dao.sql.Sql;
|
||||
import org.nutz.ioc.aop.Aop;
|
||||
import org.nutz.ioc.loader.annotation.Inject;
|
||||
import org.nutz.ioc.loader.annotation.IocBean;
|
||||
import org.nutz.lang.Lang;
|
||||
import org.nutz.lang.random.R;
|
||||
import org.nutz.lang.util.NutMap;
|
||||
import org.nutz.mvc.upload.TempFile;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.stream.IntStream;
|
||||
|
||||
/**
|
||||
* @version 1.0
|
||||
@@ -19,4 +46,131 @@ public class DifficultHelpCommonServiceImpl extends BaseServiceImpl<DifficultHel
|
||||
public DifficultHelpCommonServiceImpl(Dao dao) {
|
||||
super(dao);
|
||||
}
|
||||
|
||||
@Inject
|
||||
private ManyAddOrRenewUtil manyAddOrRenewUtil;
|
||||
|
||||
@Override
|
||||
public List<NutMap> getYearPayList(DifficultHelpPageParam pageForm) {
|
||||
// 1. 生成年份列表
|
||||
List<Integer> years = IntStream.rangeClosed(2025, DateUtil.thisYear())
|
||||
.boxed()
|
||||
.collect(Collectors.toList());
|
||||
|
||||
// 2. 查询符合条件的 DifficultHelpInfo 记录
|
||||
Cnd cnd = Cnd.NEW();
|
||||
if (StrUtil.isNotBlank(pageForm.getSearchKeyword())) {
|
||||
cnd.and(Cnd.exps("loginName", "LIKE", "%" + pageForm.getSearchKeyword() + "%")
|
||||
.or("userName", "LIKE", "%" + pageForm.getSearchKeyword() + "%"));
|
||||
}
|
||||
List<DifficultHelpInfo> infoList = dao().query(DifficultHelpInfo.class, cnd);
|
||||
|
||||
// 3. 构建用户缴费索引 (userId -> year -> money)
|
||||
Map<String, Map<Integer, Double>> payIndex = new HashMap<>();
|
||||
for (DifficultHelpInfo info : infoList) {
|
||||
String userId = info.getId();
|
||||
int year = DateUtil.year(info.getApplyTime());
|
||||
double money = info.getMoney() != null ? info.getMoney() : 0.0;
|
||||
|
||||
payIndex.computeIfAbsent(userId, k -> new HashMap<>()).put(year, money);
|
||||
}
|
||||
|
||||
// 4. 组装结果数据
|
||||
List<NutMap> result = new ArrayList<>();
|
||||
for (DifficultHelpInfo info : infoList) {
|
||||
NutMap userData = NutMap.NEW();
|
||||
userData.put("userName", info.getUserName() + "-" + info.getLoginName());
|
||||
|
||||
double totalMoney = 0.0;
|
||||
for (Integer year : years) {
|
||||
Double yearMoney = Optional.ofNullable(payIndex.get(info.getId()))
|
||||
.map(map -> map.get(year))
|
||||
.orElse(0.0);
|
||||
userData.put(String.valueOf(year), yearMoney == 0.0 ? null : yearMoney);
|
||||
totalMoney += yearMoney;
|
||||
}
|
||||
userData.put("totalMoney", totalMoney);
|
||||
result.add(userData);
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
@Override
|
||||
public NutMap handlingMoneyImport(TempFile file, Boolean isFlag) {
|
||||
List<T> ts = EasyExcelUtil.syncReadModel(file.getFile(), moneyImportVo.class, 0, 1);
|
||||
List<moneyImportVo> list = JSONUtil.parseArray(JSONUtil.toJsonStr(ts)).toList(moneyImportVo.class);
|
||||
|
||||
// 返回错误记录
|
||||
List<moneyImportVo> errorInfos = new ArrayList<>();
|
||||
|
||||
for (moneyImportVo v : list) {
|
||||
if (StrUtil.isBlank(v.getLoginName())) {
|
||||
v.setErrorInfo("工号不能为空!");
|
||||
errorInfos.add(v);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (StrUtil.isBlank(v.getYear())) {
|
||||
v.setErrorInfo("年份不能为空!");
|
||||
errorInfos.add(v);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (v.getMoney() == null) {
|
||||
v.setErrorInfo("金额不能为空!");
|
||||
errorInfos.add(v);
|
||||
continue;
|
||||
}
|
||||
|
||||
try {
|
||||
Double money = Double.valueOf(v.getMoney());
|
||||
|
||||
// 根据年份和工号查找对应的困难补助记录
|
||||
Cnd cnd = Cnd.NEW();
|
||||
cnd.and("loginName", "=", v.getLoginName())
|
||||
.and("YEAR(applyTime)", "=", Integer.parseInt(v.getYear()));
|
||||
|
||||
// 只更新第一条匹配的记录
|
||||
DifficultHelpInfo existingRecord = dao().fetch(DifficultHelpInfo.class, cnd);
|
||||
|
||||
if (existingRecord != null) {
|
||||
// 更新金额字段
|
||||
existingRecord.setMoney(money);
|
||||
dao().update(existingRecord, "^(money)$"); // 只更新money字段
|
||||
} else {
|
||||
v.setErrorInfo("未找到对应年份和工号的记录!");
|
||||
errorInfos.add(v);
|
||||
continue;
|
||||
}
|
||||
} catch (NumberFormatException e) {
|
||||
v.setErrorInfo("金额格式错误!");
|
||||
errorInfos.add(v);
|
||||
continue;
|
||||
} catch (Exception e) {
|
||||
v.setErrorInfo("年份格式错误!");
|
||||
errorInfos.add(v);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
// 如果有错误数据就返回给前端
|
||||
if (Lang.isNotEmpty(errorInfos)) {
|
||||
NutMap nutMap = NutMap.NEW();
|
||||
nutMap.setv("totalCount", list.size());
|
||||
nutMap.setv("successCount", Math.max(list.size() - errorInfos.size(), 0));
|
||||
nutMap.setv("errorCount", errorInfos.size());
|
||||
nutMap.setv("errorList", errorInfos.stream().map(v -> {
|
||||
return NutMap.NEW()
|
||||
.addv("年份", v.getYear())
|
||||
.addv("工号", v.getLoginName())
|
||||
.addv("姓名", v.getUsername())
|
||||
.addv("错误原因", v.getErrorInfo());
|
||||
}).collect(Collectors.toList()));
|
||||
return nutMap;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -59,7 +59,7 @@ public class AIdFundPayRecordController {
|
||||
|
||||
|
||||
@At("")
|
||||
@Ok("beetl:/platform/zhgh/staffbenefit/medicalMutualAid/aidFund/payRecord/index.html")
|
||||
@Ok("beetl:/platform/zhgh/staffbenefit/medicalMutualAid/aidFund/paexportYearPayRecordyRecord/index.html")
|
||||
@SaCheckPermission("medicalMutualAid.aidFund.payRecord")
|
||||
public void index() {
|
||||
}
|
||||
|
||||
+82
-2
@@ -42,6 +42,7 @@ layout("/layouts/platform.html"){
|
||||
|
||||
<el-card shadow="never" class="mt10">
|
||||
<table-tool :app="this" label="审批列表">
|
||||
<el-button type="primary" size="small" @click="allAudit" :disabled="pageForm.audit === 'true'">一键审核</el-button>
|
||||
<el-radio-group @change="doSearch" class="mr5" size="small" v-model="pageForm.audit">
|
||||
<el-radio-button label="true">已审核</el-radio-button>
|
||||
<el-radio-button label="false">未审核</el-radio-button>
|
||||
@@ -117,7 +118,7 @@ layout("/layouts/platform.html"){
|
||||
return {
|
||||
pageForm: {
|
||||
year: this.$moment().format("YYYY"),
|
||||
audit: false
|
||||
audit: "false"
|
||||
},
|
||||
tableColumns: [
|
||||
{ prop: "loginName", label: "受助人工号", sortable: true },
|
||||
@@ -135,7 +136,6 @@ layout("/layouts/platform.html"){
|
||||
unions: [],
|
||||
units: [],
|
||||
|
||||
// 审核相关
|
||||
formData: {},
|
||||
showApprovalForm: false
|
||||
}
|
||||
@@ -143,6 +143,11 @@ layout("/layouts/platform.html"){
|
||||
components: {
|
||||
'info': INFO,
|
||||
},
|
||||
computed: {
|
||||
hasUnapprovedItems() {
|
||||
return this.tableData.some(item => item.taskState === 10);
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
openView(row) {
|
||||
this.$refs.guava.edit(() => {
|
||||
@@ -150,6 +155,81 @@ layout("/layouts/platform.html"){
|
||||
this.$refs.infoRef.onOpen(row)
|
||||
})
|
||||
},
|
||||
allAudit() {
|
||||
if (this.pageForm.audit !== "false" || !this.tableData || this.tableData.length === 0) {
|
||||
this.$message.warning('没有待审核的数据!');
|
||||
return;
|
||||
}
|
||||
const message = '确定要一键审核这 ' + this.tableData.length + ' 条记录吗?';
|
||||
this.$confirm(message, '批量审核确认', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
this.batchApprove(this.tableData);
|
||||
}).catch(() => {
|
||||
|
||||
});
|
||||
},
|
||||
|
||||
async batchApprove(items) {
|
||||
const loading = this.$loading({
|
||||
lock: true,
|
||||
text: '正在批量审核...',
|
||||
spinner: 'el-icon-loading',
|
||||
background: 'rgba(0, 0, 0, 0.7)'
|
||||
});
|
||||
let successCount = 0;
|
||||
let failCount = 0;
|
||||
try {
|
||||
for (let i = 0; i < items.length; i++) {
|
||||
const item = items[i];
|
||||
try {
|
||||
await this.approveSingleItem(item);
|
||||
successCount++;
|
||||
} catch (error) {
|
||||
failCount++;
|
||||
}
|
||||
}
|
||||
loading.close();
|
||||
if (failCount > 0) {
|
||||
this.$message({
|
||||
message: '批量审核完成:成功 ' + successCount + ' 条,失败 ' + failCount + ' 条',
|
||||
type: 'warning'
|
||||
});
|
||||
} else {
|
||||
this.$message({
|
||||
message: '批量审核完成:成功 ' + successCount + ' 条',
|
||||
type: 'success'
|
||||
});
|
||||
}
|
||||
|
||||
this.doSearch();
|
||||
} catch (error) {
|
||||
loading.close();
|
||||
this.$message.error('批量审核过程中发生错误');
|
||||
}
|
||||
},
|
||||
|
||||
approveSingleItem(item) {
|
||||
return new Promise((resolve, reject) => {
|
||||
this.$axios.post("/flow/common/executeTask", {
|
||||
data: JSON.stringify({
|
||||
processTaskId: item.taskId,
|
||||
tf_opinion: '审核通过',
|
||||
submitType: 1
|
||||
})
|
||||
}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
resolve(res);
|
||||
} else {
|
||||
reject(res);
|
||||
}
|
||||
}).catch((error) => {
|
||||
reject(error);
|
||||
});
|
||||
});
|
||||
},
|
||||
openAudit(row) {
|
||||
this.$refs.guava.edit(()=>{
|
||||
this.showApprovalForm = true
|
||||
|
||||
@@ -64,7 +64,7 @@ layout("/layouts/platform.html"){
|
||||
size="small"></enum-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" fixed="right" width="250px">
|
||||
<el-table-column label="操作" fixed="right" width="300px">
|
||||
<template slot-scope="{row}">
|
||||
<el-button @click="openView(row)" size="mini" type="primary">查看</el-button>
|
||||
<el-button v-if="row.taskKey === 'startTask' || !row.instanceId" @click="onEdit(row)" size="mini" type="primary">
|
||||
|
||||
+30
-7
@@ -42,9 +42,11 @@ layout("/layouts/platform.html"){
|
||||
|
||||
<el-card shadow="never" class="mt10">
|
||||
<table-tool label="数据列表">
|
||||
<el-button @click="exportAllApply" size="mini" type="primary">导出申请表(压缩包)</el-button>
|
||||
<el-button @click="exportSummaryXlsx" size="mini" type="primary">导出汇总表(excel)</el-button>
|
||||
<el-button @click="exportSummaryDocx" size="mini" type="primary">导出汇总表(word)</el-button>
|
||||
<el-button type="primary" size="small" @click="importMoney">导入实际金额</el-button>
|
||||
<el-button @click="exportYearPayRecord" size="small" icon="el-icon-download" type="primary">导出补助金额</el-button>
|
||||
<el-button @click="exportAllApply" size="small" type="primary">导出申请表(压缩包)</el-button>
|
||||
<el-button @click="exportSummaryXlsx" size="small" type="primary">导出汇总表(excel)</el-button>
|
||||
<el-button @click="exportSummaryDocx" size="small" type="primary">导出汇总表(word)</el-button>
|
||||
</table-tool>
|
||||
|
||||
<el-table :data="tableData" :size="tableSize" @sort-change="pageOrder"
|
||||
@@ -77,6 +79,14 @@ layout("/layouts/platform.html"){
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<el-dialog title="人员导入" :visible.sync="importDialog" width="50%" :close-on-click-modal="false" :close-on-press-escape="false">
|
||||
<file-import
|
||||
ref="viewImport"
|
||||
temp_url="/platform/difficultHelp/reading/downloadTemplate"
|
||||
post_url="/platform/difficultHelp/reading/importMoney"
|
||||
@flush="successImport"
|
||||
></file-import>
|
||||
</el-dialog>
|
||||
<!--#include("/layouts/pagination.html"){}#-->
|
||||
</el-card>
|
||||
|
||||
@@ -109,17 +119,27 @@ layout("/layouts/platform.html"){
|
||||
{ prop: "subsidyStandards", label: "困难类型", sortable: true },
|
||||
{ prop: "applyTime", label: "申请时间", sortable: true },
|
||||
{ prop: "applyCount", label: "申请次数", sortable: true },
|
||||
{ prop: "taskName", label: "当前节点" },
|
||||
{ prop: "instanceState", label: "流程状态" }
|
||||
{ prop: "money", label: "实际金额", sortable: true },
|
||||
// { prop: "taskName", label: "当前节点" },
|
||||
// { prop: "instanceState", label: "流程状态" }
|
||||
],
|
||||
unions: [],
|
||||
units: []
|
||||
units: [],
|
||||
importDialog: false,
|
||||
}
|
||||
},
|
||||
components: {
|
||||
'info': INFO
|
||||
'info': INFO,
|
||||
"file-import": httpVueLoader("/components/plugins/sysImport/index.vue?v=" + new Date().getTime())
|
||||
},
|
||||
methods: {
|
||||
importMoney() {
|
||||
this.importDialog = true
|
||||
},
|
||||
successImport() {
|
||||
this.importDialog = false
|
||||
this.pageData()
|
||||
},
|
||||
openView(row) {
|
||||
this.$refs.guava.view(() => {
|
||||
this.$refs.infoRef.onOpen(row)
|
||||
@@ -164,6 +184,9 @@ layout("/layouts/platform.html"){
|
||||
this.units = await this.$businessTool.listUnit(this.$store.state.user.union.id)
|
||||
}
|
||||
},
|
||||
exportYearPayRecord(){
|
||||
this.$downLoad('/platform/difficultHelp/reading/exportYearPayRecord', this.pageForm)
|
||||
},
|
||||
exportAllApply() {
|
||||
this.$downLoad('/platform/difficultHelp/reading/doExportAllApply', this.pageForm)
|
||||
},
|
||||
|
||||
+120
-3
@@ -42,6 +42,7 @@ layout("/layouts/platform.html"){
|
||||
|
||||
<el-card shadow="never" class="mt10">
|
||||
<table-tool :app="this" label="审批列表">
|
||||
<el-button type="primary" size="small" @click="allAudit" :disabled="pageForm.audit === 'true'">一键审核</el-button>
|
||||
<el-radio-group @change="doSearch" class="mr5" size="small" v-model="pageForm.audit">
|
||||
<el-radio-button label="true">已审核</el-radio-button>
|
||||
<el-radio-button label="false">未审核</el-radio-button>
|
||||
@@ -49,6 +50,7 @@ layout("/layouts/platform.html"){
|
||||
</table-tool>
|
||||
<el-table :data="tableData" :size="tableSize" @sort-change="pageOrder"
|
||||
ref="table" row-key="id" style="width: 100%">
|
||||
<el-table-column :reserve-selection="true" type="selection" width="55"></el-table-column>
|
||||
<el-table-column :index="indexMethod" header-align="center" label="序号"
|
||||
type="index" width="60px"></el-table-column>
|
||||
<el-table-column
|
||||
@@ -79,6 +81,21 @@ layout("/layouts/platform.html"){
|
||||
<!--#include("/layouts/pagination.html"){}#-->
|
||||
</el-card>
|
||||
|
||||
<el-dialog title="设置审核信息" :visible.sync="dialogVisible" width="30%" center>
|
||||
<el-form :model="formData" ref="formData" label-width="100px">
|
||||
<el-form-item label="级别" prop="level" :rules="[{required:true,message:'必填',trigger:['change','blur']}]">
|
||||
<dict-select v-model="formData.level" code="DIFFICULT_LEVEL" style="width: 100%" placeholder="请选择级别"></dict-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="审核金额" prop="money" :rules="[{required:true,message:'必填',trigger:['change','blur']}]">
|
||||
<el-input-number placeholder="请输入金额" v-model="formData.money" style="width: 100%" :precision="2" :min="0"></el-input-number>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="dialogVisible = false">取 消</el-button>
|
||||
<el-button type="primary" @click="submitAudit">确 定</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
|
||||
<template #edit>
|
||||
<info ref="infoRef">
|
||||
<div v-if="showApprovalForm">
|
||||
@@ -130,7 +147,7 @@ layout("/layouts/platform.html"){
|
||||
return {
|
||||
pageForm: {
|
||||
year: this.$moment().format("YYYY"),
|
||||
audit: false
|
||||
audit: "false"
|
||||
},
|
||||
tableColumns: [
|
||||
{ prop: "loginName", label: "受助人工号", sortable: true },
|
||||
@@ -148,12 +165,17 @@ layout("/layouts/platform.html"){
|
||||
unions: [],
|
||||
units: [],
|
||||
|
||||
// 审核相关
|
||||
formData: {
|
||||
level: '',
|
||||
money: 0,
|
||||
tf_opinion: "",
|
||||
},
|
||||
showApprovalForm: false
|
||||
showApprovalForm: false,
|
||||
auditForm: {
|
||||
level: '',
|
||||
money: 0
|
||||
},
|
||||
dialogVisible: false
|
||||
}
|
||||
},
|
||||
components: {
|
||||
@@ -166,6 +188,101 @@ layout("/layouts/platform.html"){
|
||||
this.$refs.infoRef.onOpen(row)
|
||||
})
|
||||
},
|
||||
allAudit() {
|
||||
const selectedRows = this.$refs.table.selection;
|
||||
if (selectedRows.length === 0) {
|
||||
this.$message.warning('请至少选择一条记录进行审核!');
|
||||
return;
|
||||
}
|
||||
this.dialogVisible = true;
|
||||
},
|
||||
submitAudit() {
|
||||
this.$refs.formData.validate((valid) => {
|
||||
if (valid) {
|
||||
const selectedRows = this.$refs.table.selection;
|
||||
const message = '确定要审核这 ' + selectedRows.length + ' 条记录吗?';
|
||||
this.$confirm(message, '批量审核确认', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
this.batchApprove(selectedRows);
|
||||
this.dialogVisible = false;
|
||||
}).catch(() => {
|
||||
});
|
||||
} else {
|
||||
this.$message.error('请填写完整的审核信息!');
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
async batchApprove(items) {
|
||||
const loading = this.$loading({
|
||||
lock: true,
|
||||
text: '正在批量审核...',
|
||||
spinner: 'el-icon-loading',
|
||||
background: 'rgba(0, 0, 0, 0.7)'
|
||||
});
|
||||
let successCount = 0;
|
||||
let failCount = 0;
|
||||
try {
|
||||
for (let i = 0; i < items.length; i++) {
|
||||
const item = items[i];
|
||||
try {
|
||||
await this.approveSingleItem(item);
|
||||
successCount++;
|
||||
} catch (error) {
|
||||
failCount++;
|
||||
}
|
||||
}
|
||||
loading.close();
|
||||
if (failCount > 0) {
|
||||
this.$message({
|
||||
message: '批量审核完成:成功 ' + successCount + ' 条,失败 ' + failCount + ' 条',
|
||||
type: 'warning'
|
||||
});
|
||||
} else {
|
||||
this.$message({
|
||||
message: '批量审核完成:成功 ' + successCount + ' 条',
|
||||
type: 'success'
|
||||
});
|
||||
}
|
||||
this.doSearch();
|
||||
} catch (error) {
|
||||
loading.close();
|
||||
this.$message.error('批量审核过程中发生错误');
|
||||
}
|
||||
},
|
||||
|
||||
approveSingleItem(item) {
|
||||
return new Promise((resolve, reject) => {
|
||||
this.$axios.post("/platform/difficultHelp/schoolUnionApproval/save", {
|
||||
data: JSON.stringify({
|
||||
...this.formData,
|
||||
id: item.id
|
||||
})
|
||||
}).then((saveRes) => {
|
||||
if (saveRes.code !== 0) {
|
||||
throw new Error(saveRes.msg || '保存失败');
|
||||
}
|
||||
return this.$axios.post("/flow/common/executeTask", {
|
||||
data: JSON.stringify({
|
||||
processTaskId: item.taskId,
|
||||
tf_opinion: '审核通过',
|
||||
submitType: 1,
|
||||
})
|
||||
});
|
||||
}).then((taskRes) => {
|
||||
if (taskRes.code === 0) {
|
||||
resolve(taskRes);
|
||||
} else {
|
||||
throw new Error(taskRes.msg || '审批失败');
|
||||
}
|
||||
}).catch((error) => {
|
||||
reject(error);
|
||||
});
|
||||
});
|
||||
},
|
||||
openAudit(row) {
|
||||
this.$refs.guava.edit(()=>{
|
||||
this.showApprovalForm = true
|
||||
|
||||
+77
-2
@@ -42,6 +42,7 @@ layout("/layouts/platform.html"){
|
||||
|
||||
<el-card shadow="never" class="mt10">
|
||||
<table-tool :app="this" label="审批列表">
|
||||
<el-button type="primary" size="small" @click="allAudit" :disabled="pageForm.audit === 'true'">一键审核</el-button>
|
||||
<el-radio-group @change="doSearch" class="mr5" size="small" v-model="pageForm.audit">
|
||||
<el-radio-button label="true">已审核</el-radio-button>
|
||||
<el-radio-button label="false">未审核</el-radio-button>
|
||||
@@ -117,7 +118,7 @@ layout("/layouts/platform.html"){
|
||||
return {
|
||||
pageForm: {
|
||||
year: this.$moment().format("YYYY"),
|
||||
audit: false
|
||||
audit: "false"
|
||||
},
|
||||
tableColumns: [
|
||||
{ prop: "loginName", label: "受助人工号", sortable: true },
|
||||
@@ -135,7 +136,6 @@ layout("/layouts/platform.html"){
|
||||
unions: [],
|
||||
units: [],
|
||||
|
||||
// 审核相关
|
||||
formData: {},
|
||||
showApprovalForm: false
|
||||
}
|
||||
@@ -150,6 +150,81 @@ layout("/layouts/platform.html"){
|
||||
this.$refs.infoRef.onOpen(row)
|
||||
})
|
||||
},
|
||||
allAudit() {
|
||||
if (this.pageForm.audit !== "false" || !this.tableData || this.tableData.length === 0) {
|
||||
this.$message.warning('没有待审核的数据!');
|
||||
return;
|
||||
}
|
||||
const message = '确定要一键审核这 ' + this.tableData.length + ' 条记录吗?';
|
||||
this.$confirm(message, '批量审核确认', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
this.batchApprove(this.tableData);
|
||||
}).catch(() => {
|
||||
|
||||
});
|
||||
},
|
||||
|
||||
async batchApprove(items) {
|
||||
const loading = this.$loading({
|
||||
lock: true,
|
||||
text: '正在批量审核...',
|
||||
spinner: 'el-icon-loading',
|
||||
background: 'rgba(0, 0, 0, 0.7)'
|
||||
});
|
||||
let successCount = 0;
|
||||
let failCount = 0;
|
||||
try {
|
||||
for (let i = 0; i < items.length; i++) {
|
||||
const item = items[i];
|
||||
try {
|
||||
await this.approveSingleItem(item);
|
||||
successCount++;
|
||||
} catch (error) {
|
||||
failCount++;
|
||||
}
|
||||
}
|
||||
loading.close();
|
||||
if (failCount > 0) {
|
||||
this.$message({
|
||||
message: '批量审核完成:成功 ' + successCount + ' 条,失败 ' + failCount + ' 条',
|
||||
type: 'warning'
|
||||
});
|
||||
} else {
|
||||
this.$message({
|
||||
message: '批量审核完成:成功 ' + successCount + ' 条',
|
||||
type: 'success'
|
||||
});
|
||||
}
|
||||
|
||||
this.doSearch();
|
||||
} catch (error) {
|
||||
loading.close();
|
||||
this.$message.error('批量审核过程中发生错误');
|
||||
}
|
||||
},
|
||||
|
||||
approveSingleItem(item) {
|
||||
return new Promise((resolve, reject) => {
|
||||
this.$axios.post("/flow/common/executeTask", {
|
||||
data: JSON.stringify({
|
||||
processTaskId: item.taskId,
|
||||
tf_opinion: '审核通过',
|
||||
submitType: 1
|
||||
})
|
||||
}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
resolve(res);
|
||||
} else {
|
||||
reject(res);
|
||||
}
|
||||
}).catch((error) => {
|
||||
reject(error);
|
||||
});
|
||||
});
|
||||
},
|
||||
openAudit(row) {
|
||||
this.$refs.guava.edit(()=>{
|
||||
this.showApprovalForm = true
|
||||
|
||||
+497
-372
@@ -2,282 +2,346 @@
|
||||
layout("/layouts/platform_h5.html"){
|
||||
#-->
|
||||
<div id="app">
|
||||
<van-nav-bar title="帮扶申请" left-text="返回" left-arrow @click-left="historyBack" placeholder fixed></van-nav-bar>
|
||||
|
||||
<div class="form-container">
|
||||
<van-form ref="formRef">
|
||||
<van-cell-group title="申请人信息" class="form-section">
|
||||
<van-field label="填写人姓名" :rules="[{ required: true }]" v-model="formData.proxyUserName" readonly
|
||||
required name="proxyUserName"></van-field>
|
||||
<van-field label="填写人工号" :rules="[{ required: true }]" v-model="formData.proxyLoginName" readonly
|
||||
required name="proxyLoginName"></van-field>
|
||||
<van-field label="申请模式" name="mode" required :rules="[{ required: true }]">
|
||||
<template #input>
|
||||
<van-radio-group v-model="formData.mode" @change="modeChange" direction="horizontal">
|
||||
<van-radio name="1" shape="square">本人申请</van-radio>
|
||||
<van-radio
|
||||
v-if="$auth.hasRoleOr('SYSADMIN, SCHOOL_UNION_ADMIN, BRANCH_UNION_CHAIRMAN, BRANCH_UNION_OPERATOR')"
|
||||
name="2" shape="square">替他人申请
|
||||
</van-radio>
|
||||
</van-radio-group>
|
||||
</template>
|
||||
</van-field>
|
||||
</van-cell-group>
|
||||
|
||||
<van-cell-group title="受助人信息" class="form-section">
|
||||
<template v-if="formData.mode == 2">
|
||||
<van-field label="受助人" :rules="[{ required: true }]" v-model="formData.userName"
|
||||
required name="userName" placeholder="请输入受补助人姓名后点击查询">
|
||||
<template #button>
|
||||
<van-button :disabled="formData.id" @click="queryRecipients(formData.userName)"
|
||||
size="small" type="primary">查询
|
||||
</van-button>
|
||||
</template>
|
||||
</van-field>
|
||||
|
||||
<van-action-sheet
|
||||
:actions="subsidizedList"
|
||||
:close-on-click-overlay="false"
|
||||
@cancel="userCancel"
|
||||
@select="onUserSelect"
|
||||
cancel-text="重新输入姓名或工号查询"
|
||||
v-model="userSheetShow">
|
||||
</van-action-sheet>
|
||||
|
||||
</template>
|
||||
<template v-else>
|
||||
<van-field label="受助人" :rules="[{ required: true }]" v-model="formData.userName" readonly
|
||||
required name="userName"></van-field>
|
||||
</template>
|
||||
|
||||
<van-field
|
||||
v-model="formData.sex"
|
||||
label="性别"
|
||||
required
|
||||
is-link
|
||||
placeholder="请选择性别"
|
||||
readonly
|
||||
name="sex"
|
||||
:rules="[{ required: true }]"
|
||||
@click="showSexPicker = true"
|
||||
></van-field>
|
||||
<van-popup v-model="showSexPicker" position="bottom">
|
||||
<van-picker
|
||||
show-toolbar
|
||||
:columns="['男性', '女性']"
|
||||
@confirm="onSexConfirm"
|
||||
@cancel="showSexPicker=false"
|
||||
></van-picker>
|
||||
</van-popup>
|
||||
<van-field
|
||||
v-model="formData.birthday"
|
||||
label="出生年月"
|
||||
is-link
|
||||
placeholder="请填写出生年月"
|
||||
@click="showBirthday"
|
||||
required
|
||||
readonly
|
||||
name="birthday"
|
||||
:rules="[{ required: true }]"
|
||||
></van-field>
|
||||
<van-popup v-model="showDatePicker" position="bottom">
|
||||
<van-datetime-picker
|
||||
type="date"
|
||||
:min-date="new Date(1900, 0, 1)"
|
||||
:max-date="maxDate"
|
||||
@confirm="onDateConfirm"
|
||||
@cancel="showDatePicker=false"
|
||||
></van-datetime-picker>
|
||||
</van-popup>
|
||||
|
||||
<van-field
|
||||
v-model="formData.unionName"
|
||||
label="所在工会"
|
||||
placeholder="请选择所在工会"
|
||||
readonly
|
||||
name="unionName"
|
||||
:rules="[{ required: true }]"
|
||||
required
|
||||
></van-field>
|
||||
<van-field
|
||||
v-model="formData.unitName"
|
||||
label="所在单位"
|
||||
placeholder="请选择所在单位"
|
||||
readonly
|
||||
name="unitName"
|
||||
:rules="[{ required: true }]"
|
||||
required
|
||||
></van-field>
|
||||
<van-field
|
||||
v-model="formData.officialCapacity"
|
||||
label="职务职称"
|
||||
placeholder="请填写职务职称"
|
||||
maxlength="50"
|
||||
clearable
|
||||
required
|
||||
name="officialCapacity"
|
||||
:rules="[{ required: true }]"
|
||||
></van-field>
|
||||
|
||||
<van-field
|
||||
v-model="formData.mobile"
|
||||
label="手机号码"
|
||||
placeholder="请填写手机号码"
|
||||
maxlength="11"
|
||||
clearable
|
||||
required
|
||||
name="mobile"
|
||||
:rules="[{ required: true }]"
|
||||
></van-field>
|
||||
<van-field
|
||||
v-model="formData.idCard"
|
||||
label="身份证号"
|
||||
placeholder="请填写身份证号"
|
||||
maxlength="18"
|
||||
clearable
|
||||
required
|
||||
name="idCard"
|
||||
:rules="[{ required: true }]"
|
||||
></van-field>
|
||||
<van-field
|
||||
v-model="formData.homeAddress"
|
||||
label="家庭住址"
|
||||
type="textarea"
|
||||
placeholder="请填写家庭住址"
|
||||
maxlength="50"
|
||||
required
|
||||
name="homeAddress"
|
||||
:rules="[{ required: true }]"
|
||||
></van-field>
|
||||
|
||||
|
||||
</van-cell-group>
|
||||
|
||||
<van-cell-group title="困难类型及材料" class="form-section">
|
||||
<van-field
|
||||
v-model="formData.subsidyStandards"
|
||||
label="困难类型"
|
||||
placeholder="请选择款项"
|
||||
is-link
|
||||
@click="showSubsidyPicker = true"
|
||||
required
|
||||
name="subsidyStandards"
|
||||
:rules="[{ required: true, message: '请选择款项' }]"
|
||||
></van-field>
|
||||
<van-popup v-model="showSubsidyPicker" position="bottom">
|
||||
<van-picker
|
||||
show-toolbar
|
||||
:columns="subsidyStandards"
|
||||
@confirm="onSubsidyConfirm"
|
||||
@cancel="showSubsidyPicker=false"
|
||||
></van-picker>
|
||||
</van-popup>
|
||||
|
||||
<van-field
|
||||
v-model="formData.bankCardNum"
|
||||
label="收款账户"
|
||||
maxlength="20"
|
||||
clearable
|
||||
name="bankCardNum"
|
||||
placeholder="请填写收款账户"
|
||||
:rules="[{ required: true }]"
|
||||
required
|
||||
></van-field>
|
||||
|
||||
<van-field
|
||||
v-model="formData.bankUserName"
|
||||
label="户名"
|
||||
placeholder="请填写户名"
|
||||
:rules="[{ required: true }]"
|
||||
required
|
||||
name="bankUserName"
|
||||
></van-field>
|
||||
<van-field
|
||||
v-model="formData.bankOfDeposit"
|
||||
label="开户行"
|
||||
placeholder="请填写开户行"
|
||||
:rules="[{ required: true }]"
|
||||
required
|
||||
name="bankOfDeposit"
|
||||
></van-field>
|
||||
|
||||
<van-field
|
||||
v-model="formData.reason"
|
||||
label="申请原因"
|
||||
type="textarea"
|
||||
placeholder="请简述申请原因"
|
||||
maxlength="500"
|
||||
required
|
||||
name="reason"
|
||||
:rules="[{ required: true }]"
|
||||
></van-field>
|
||||
</van-cell-group>
|
||||
|
||||
<van-cell-group title="附件信息" class="form-section">
|
||||
<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 title="签字" class="form-section">
|
||||
<van-field class="more-text" name="sign" label="">
|
||||
<template #input>
|
||||
<h5-signature v-model="formData.sign" slot="input"></h5-signature>
|
||||
</template>
|
||||
</van-field>
|
||||
</van-cell-group>
|
||||
|
||||
<div class="form-actions">
|
||||
<van-button native-type="button" plain type="info" @click="onSave">保存</van-button>
|
||||
<van-button type="primary" @click="onSubmit" v-if="!taskId">提交</van-button>
|
||||
<van-button type="primary" @click="onFinishTask" v-else>提交</van-button>
|
||||
</div>
|
||||
</van-form>
|
||||
<div v-if="!isShow">
|
||||
<van-empty image="error" :description="'抱歉,当前时间不能申请,可申请时间为' + time + '。'"></van-empty>
|
||||
</div>
|
||||
|
||||
<van-dialog v-model="showDialog" class="family-dialog" title="添加家庭成员" show-cancel-button
|
||||
:before-close="handleBeforeClose">
|
||||
<van-cell-group>
|
||||
<van-field
|
||||
v-model="newMember.name"
|
||||
label="姓名"
|
||||
placeholder="请输入姓名"
|
||||
required
|
||||
></van-field>
|
||||
<van-field
|
||||
v-model="newMember.age"
|
||||
label="年龄(岁)"
|
||||
type="number"
|
||||
placeholder="请输入年龄"
|
||||
required
|
||||
></van-field>
|
||||
<van-field
|
||||
v-model="newMember.relation"
|
||||
label="关系"
|
||||
placeholder="请输入关系"
|
||||
required
|
||||
></van-field>
|
||||
<van-field
|
||||
v-model="newMember.monthlyIncome"
|
||||
label="月收入(元)"
|
||||
type="number"
|
||||
placeholder="请输入月收入"
|
||||
required
|
||||
></van-field>
|
||||
</van-cell-group>
|
||||
</van-dialog>
|
||||
<div v-else>
|
||||
<van-nav-bar title="帮扶申请" left-text="返回" left-arrow @click-left="historyBack" placeholder fixed></van-nav-bar>
|
||||
|
||||
<div class="form-container">
|
||||
<van-form ref="formRef">
|
||||
<van-cell-group title="申请人信息" class="form-section">
|
||||
<van-field label="申请次数" v-model="formData.applyCount" readonly
|
||||
required name="applyCount"></van-field>
|
||||
<van-field label="填写人姓名" :rules="[{ required: true }]" v-model="formData.proxyUserName" readonly
|
||||
required name="proxyUserName"></van-field>
|
||||
<van-field label="填写人工号" :rules="[{ required: true }]" v-model="formData.proxyLoginName" readonly
|
||||
required name="proxyLoginName"></van-field>
|
||||
<van-field label="申请模式" name="mode" required :rules="[{ required: true }]">
|
||||
<template #input>
|
||||
<van-radio-group v-model="formData.mode" @change="modeChange" direction="horizontal">
|
||||
<van-radio name="1" shape="square">本人申请</van-radio>
|
||||
<van-radio
|
||||
v-if="$auth.hasRoleOr('SYSADMIN, SCHOOL_UNION_ADMIN, BRANCH_UNION_CHAIRMAN, BRANCH_UNION_OPERATOR')"
|
||||
name="2" shape="square">替他人申请
|
||||
</van-radio>
|
||||
</van-radio-group>
|
||||
</template>
|
||||
</van-field>
|
||||
</van-cell-group>
|
||||
|
||||
<van-cell-group title="受助人信息" class="form-section">
|
||||
<template v-if="formData.mode == 2">
|
||||
<van-field label="受助人" :rules="[{ required: true }]" v-model="formData.userName"
|
||||
required name="userName" placeholder="请输入受补助人姓名后点击查询">
|
||||
<template #button>
|
||||
<van-button :disabled="formData.id" @click="queryRecipients(formData.userName)"
|
||||
size="small" type="primary">查询
|
||||
</van-button>
|
||||
</template>
|
||||
</van-field>
|
||||
|
||||
<van-action-sheet
|
||||
:actions="subsidizedList"
|
||||
:close-on-click-overlay="false"
|
||||
@cancel="userCancel"
|
||||
@select="onUserSelect"
|
||||
cancel-text="重新输入姓名或工号查询"
|
||||
v-model="userSheetShow">
|
||||
</van-action-sheet>
|
||||
|
||||
</template>
|
||||
<template v-else>
|
||||
<van-field label="受助人" :rules="[{ required: true }]" v-model="formData.userName" readonly
|
||||
required name="userName"></van-field>
|
||||
</template>
|
||||
|
||||
<van-field
|
||||
v-model="formData.sex"
|
||||
label="性别"
|
||||
required
|
||||
is-link
|
||||
placeholder="请选择性别"
|
||||
readonly
|
||||
name="sex"
|
||||
:rules="[{ required: true }]"
|
||||
@click="showSexPicker = true"
|
||||
></van-field>
|
||||
<van-popup v-model="showSexPicker" position="bottom">
|
||||
<van-picker
|
||||
show-toolbar
|
||||
:columns="['男性', '女性']"
|
||||
@confirm="onSexConfirm"
|
||||
@cancel="showSexPicker=false"
|
||||
></van-picker>
|
||||
</van-popup>
|
||||
|
||||
<van-field
|
||||
v-model="formData.unionName"
|
||||
label="所在工会"
|
||||
placeholder="请选择所在工会"
|
||||
readonly
|
||||
name="unionName"
|
||||
:rules="[{ required: true }]"
|
||||
required
|
||||
></van-field>
|
||||
<van-field
|
||||
v-model="formData.unitName"
|
||||
label="所在单位"
|
||||
placeholder="请选择所在单位"
|
||||
readonly
|
||||
name="unitName"
|
||||
:rules="[{ required: true }]"
|
||||
required
|
||||
></van-field>
|
||||
|
||||
<van-field
|
||||
v-model="formData.position"
|
||||
label="职务"
|
||||
placeholder="请填写职务"
|
||||
maxlength="20"
|
||||
clearable
|
||||
required
|
||||
name="position"
|
||||
:rules="[{ required: true }]"
|
||||
></van-field>
|
||||
|
||||
<van-field
|
||||
v-model="formData.officialCapacity"
|
||||
label="职称"
|
||||
placeholder="请填写职称"
|
||||
maxlength="20"
|
||||
clearable
|
||||
required
|
||||
name="officialCapacity"
|
||||
:rules="[{ required: true }]"
|
||||
></van-field>
|
||||
|
||||
<van-field
|
||||
v-model="formData.mobile"
|
||||
label="手机号码"
|
||||
placeholder="请填写手机号码"
|
||||
maxlength="11"
|
||||
clearable
|
||||
required
|
||||
name="mobile"
|
||||
:rules="[{ required: true }]"
|
||||
></van-field>
|
||||
<van-field
|
||||
v-model="formData.idCard"
|
||||
label="身份证号"
|
||||
placeholder="请填写身份证号"
|
||||
maxlength="18"
|
||||
clearable
|
||||
required
|
||||
name="idCard"
|
||||
:rules="[{ required: true }]"
|
||||
></van-field>
|
||||
<van-field
|
||||
v-model="formData.homeAddress"
|
||||
label="家庭住址"
|
||||
type="textarea"
|
||||
placeholder="请填写家庭住址"
|
||||
maxlength="50"
|
||||
required
|
||||
name="homeAddress"
|
||||
:rules="[{ required: true }]"
|
||||
></van-field>
|
||||
|
||||
<van-field
|
||||
v-model="formData.homeIncome"
|
||||
label="家庭年总收入(万元)"
|
||||
type="number"
|
||||
placeholder="请填写家庭年总收入"
|
||||
clearable
|
||||
required
|
||||
name="homeIncome"
|
||||
:rules="[{ required: true }]"
|
||||
></van-field>
|
||||
|
||||
<van-field
|
||||
v-model="formData.homeNumber"
|
||||
label="家庭人数"
|
||||
type="number"
|
||||
placeholder="请填写家庭人数"
|
||||
clearable
|
||||
required
|
||||
name="homeNumber"
|
||||
:rules="[{ required: true }]"
|
||||
></van-field>
|
||||
|
||||
</van-cell-group>
|
||||
|
||||
<van-cell-group title="困难类型及材料" class="form-section">
|
||||
<van-field
|
||||
v-model="formData.subsidyName"
|
||||
label="补助类型"
|
||||
placeholder="请选择补助类型"
|
||||
is-link
|
||||
@click="showSubsidyPicker = true"
|
||||
required
|
||||
name="subsidyName"
|
||||
:rules="[{ required: true, message: '请选择补助类型' }]"
|
||||
></van-field>
|
||||
<van-popup v-model="showSubsidyPicker" position="bottom">
|
||||
<van-picker
|
||||
show-toolbar
|
||||
:columns="subsidyTypeColumns"
|
||||
@confirm="onSubsidyTypeConfirm"
|
||||
@cancel="showSubsidyPicker=false">
|
||||
</van-picker>
|
||||
</van-popup>
|
||||
|
||||
<van-field
|
||||
v-model="formData.subsidyStandardsName"
|
||||
label="困难类型"
|
||||
placeholder="请选择困难类型"
|
||||
is-link
|
||||
@click="showSubsidyStandardPicker = true"
|
||||
required
|
||||
name="subsidyStandardsName"
|
||||
:rules="[{ required: true, message: '请选择困难类型' }]"
|
||||
></van-field>
|
||||
<van-popup v-model="showSubsidyStandardPicker" position="bottom">
|
||||
<van-picker
|
||||
show-toolbar
|
||||
:columns="subsidyStandardColumns"
|
||||
@confirm="onSubsidyStandardConfirm"
|
||||
@cancel="showSubsidyStandardPicker=false">
|
||||
</van-picker>
|
||||
</van-popup>
|
||||
|
||||
<van-field
|
||||
v-model="formData.bankCardNum"
|
||||
label="收款账户"
|
||||
maxlength="20"
|
||||
clearable
|
||||
name="bankCardNum"
|
||||
placeholder="请填写收款账户"
|
||||
:rules="[{ required: true }]"
|
||||
required
|
||||
></van-field>
|
||||
|
||||
<van-field
|
||||
v-model="formData.bankOfDeposit"
|
||||
label="开户行"
|
||||
placeholder="请填写开户行"
|
||||
:rules="[{ required: true }]"
|
||||
required
|
||||
name="bankOfDeposit"
|
||||
></van-field>
|
||||
|
||||
<van-field
|
||||
v-model="formData.reason"
|
||||
label="生活致困原因"
|
||||
type="textarea"
|
||||
placeholder="请简述生活致困原因"
|
||||
maxlength="500"
|
||||
required
|
||||
name="reason"
|
||||
:rules="[{ required: true }]"
|
||||
></van-field>
|
||||
</van-cell-group>
|
||||
|
||||
<van-cell-group title="家庭主要成员信息" class="form-section up_down">
|
||||
<div class="van-cell">
|
||||
<div style="display: flex;justify-content: space-between">
|
||||
<div style="display: flex;">
|
||||
<div style="width: 100%">
|
||||
<span>家庭主要成员及联系方式</span>
|
||||
</div>
|
||||
</div>
|
||||
<van-button v-if="formData.familyList && formData.familyList.length>0 && formData.familyList.length<5"
|
||||
style="width: 40px"
|
||||
icon="plus" type="primary" round size="mini"
|
||||
@click="formData.familyList.push({})"
|
||||
native-type="button"></van-button>
|
||||
</div>
|
||||
<template v-if="formData.familyList && formData.familyList.length>0">
|
||||
<div v-for="member,index in formData.familyList" class="mt5">
|
||||
<div style="font-weight: 700;display: flex;justify-content: space-between">
|
||||
<span>成员{{toChinesNum(index+1)}}</span>
|
||||
<van-button style="width: 40px"
|
||||
icon="cross" type="danger" round size="mini"
|
||||
@click="formData.familyList.splice(index,1)"
|
||||
native-type="button"></van-button>
|
||||
</div>
|
||||
<van-field label="关系" v-model="member.relation" placeholder="请填写与本人关系"
|
||||
:rules="[{ required:true, message: '请填写与本人关系' }]"></van-field>
|
||||
<van-field label="姓名" v-model="member.name" placeholder="请填写姓名"
|
||||
:rules="[{ required:true, message: '请填写姓名' }]"></van-field>
|
||||
<van-field label="年龄" v-model="member.age" placeholder="请填写年龄"
|
||||
:rules="[{ required:true, message: '请填写年龄' }]" type="number"></van-field>
|
||||
<van-field label="工作单位" v-model="member.homeUnit" placeholder="请填写工作单位"
|
||||
:rules="[{ required:true, message: '请填写工作单位' }]"></van-field>
|
||||
<van-field label="年收入(元)" v-model="member.yearIncome" placeholder="请填写年收入"
|
||||
:rules="[{ required:true, message: '请填写年收入' }]" type="number"></van-field>
|
||||
<van-field label="备注" v-model="member.remarks" placeholder="请填写备注"
|
||||
:rules="[{ required:true, message: '请填写备注' }]"></van-field>
|
||||
</div>
|
||||
</template>
|
||||
<template v-else>
|
||||
<div style="padding: 50px;text-align: center">
|
||||
<van-button style="width: 50px"
|
||||
icon="plus" type="primary" round size="mini"
|
||||
@click="formData.familyList.push({})"
|
||||
native-type="button"></van-button>
|
||||
</div>
|
||||
</template>
|
||||
</div>
|
||||
</van-cell-group>
|
||||
|
||||
<van-cell-group title="附件信息" class="form-section">
|
||||
<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 title="签字" class="form-section">
|
||||
<van-field class="more-text" name="sign" label="">
|
||||
<template #input>
|
||||
<h5-signature v-model="formData.sign" slot="input"></h5-signature>
|
||||
</template>
|
||||
</van-field>
|
||||
<div style="color: red; padding: 10px;">
|
||||
本人承诺:本人及家庭成员未有购买价格超过15万元的机动车,也未有两套及以上商品房,特此承诺!
|
||||
</div>
|
||||
</van-cell-group>
|
||||
|
||||
<div class="form-actions">
|
||||
<van-button native-type="button" plain type="info" @click="onSave">保存</van-button>
|
||||
<van-button type="primary" @click="onSubmit" v-if="!taskId">提交</van-button>
|
||||
<van-button type="primary" @click="onFinishTask" v-else>提交</van-button>
|
||||
</div>
|
||||
</van-form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<style>
|
||||
.mt5 {
|
||||
margin-top: 5px;
|
||||
}
|
||||
.up_down > .van-cell {
|
||||
flex-flow: column;
|
||||
}
|
||||
|
||||
.up_down > .van-cell > .van-field__label {
|
||||
width: 100%;
|
||||
}
|
||||
</style>
|
||||
|
||||
<script nonce="${cspNonce!}">
|
||||
new Vue({
|
||||
el: "#app",
|
||||
@@ -289,31 +353,29 @@ layout("/layouts/platform_h5.html"){
|
||||
showSexPicker: false,
|
||||
showDatePicker: false,
|
||||
showSubsidyPicker: false,
|
||||
showSubsidyStandardPicker: false,
|
||||
formData: {
|
||||
id: GetQueryString("bizId"),
|
||||
mode: "1"
|
||||
mode: "1",
|
||||
familyList: [],
|
||||
applyCount:'1'
|
||||
},
|
||||
subsidyStandards: [
|
||||
"患重大疾病",
|
||||
"低收入家庭",
|
||||
"因突发变故致困",
|
||||
"长期病休",
|
||||
"其他情况"
|
||||
],
|
||||
newMember: {
|
||||
name: "",
|
||||
age: "",
|
||||
relation: "",
|
||||
monthlyIncome: ""
|
||||
},
|
||||
showDialog: false,
|
||||
isEditing: false,
|
||||
editingIndex: null,
|
||||
subsidyTypeColumns: [],
|
||||
subsidyStandardColumns: [],
|
||||
subsidyValue: "",
|
||||
subsidyStandardsValue: "",
|
||||
|
||||
// 替他人申请相关
|
||||
userSheetShow: false,
|
||||
subsidizedList: [],
|
||||
maxDate: new Date(),
|
||||
|
||||
isShow: true,
|
||||
time: ''
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
canImportFamilyInfo() {
|
||||
return false;
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
@@ -330,13 +392,44 @@ layout("/layouts/platform_h5.html"){
|
||||
}
|
||||
this.subsidizedList = []
|
||||
},
|
||||
// 保存
|
||||
|
||||
async initDictOptions() {
|
||||
const subsidyTypeData = await this.$businessTool.getDictOptions("DIFFICULT_SUBSIDY_TYPE");
|
||||
this.subsidyTypeColumns = subsidyTypeData.map(item => {
|
||||
return { value: item.code, text: item.name };
|
||||
});
|
||||
|
||||
const subsidyStandardData = await this.$businessTool.getDictOptions("DIFFICULT_TYPE");
|
||||
this.subsidyStandardColumns = subsidyStandardData.map(item => {
|
||||
return { value: item.code, text: item.name };
|
||||
});
|
||||
},
|
||||
|
||||
prepareSubmitData() {
|
||||
const submitData = JSON.parse(JSON.stringify(this.formData));
|
||||
if (this.formData.subsidyName) {
|
||||
const matchedSubsidy = this.subsidyTypeColumns.find(item => item.text === this.formData.subsidyName);
|
||||
submitData.subsidy = matchedSubsidy ? matchedSubsidy.value : this.subsidyValue;
|
||||
} else {
|
||||
submitData.subsidy = this.subsidyValue;
|
||||
}
|
||||
if (this.formData.subsidyStandardsName) {
|
||||
const matchedStandard = this.subsidyStandardColumns.find(item => item.text === this.formData.subsidyStandardsName);
|
||||
submitData.subsidyStandards = matchedStandard ? matchedStandard.value : this.subsidyStandardsValue;
|
||||
} else {
|
||||
submitData.subsidyStandards = this.subsidyStandardsValue;
|
||||
}
|
||||
|
||||
return submitData;
|
||||
},
|
||||
|
||||
onSave() {
|
||||
this.$dialog.confirm({
|
||||
title: "提示",
|
||||
message: "您确定要保存吗?"
|
||||
}).then(() => {
|
||||
this.$axios.post("/platform/difficultHelp/apply/save", { data: JSON.stringify(this.formData) }).then(res => {
|
||||
const submitData = this.prepareSubmitData();
|
||||
this.$axios.post("/platform/difficultHelp/apply/save", { data: JSON.stringify(submitData) }).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.$toast("保存成功")
|
||||
this.$pjaxReplace("/platform/difficultHelp/mine/h5")
|
||||
@@ -345,7 +438,6 @@ layout("/layouts/platform_h5.html"){
|
||||
})
|
||||
},
|
||||
|
||||
// 提交
|
||||
onSubmit() {
|
||||
this.$refs.formRef.validate().then(() => {
|
||||
if (!this.formData.sign){
|
||||
@@ -367,8 +459,9 @@ layout("/layouts/platform_h5.html"){
|
||||
return
|
||||
}
|
||||
|
||||
const submitData = this.prepareSubmitData();
|
||||
this.$axios.post("/platform/difficultHelp/apply/submit", {
|
||||
data: JSON.stringify(this.formData)
|
||||
data: JSON.stringify(submitData)
|
||||
}).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.$toast("提交成功")
|
||||
@@ -400,8 +493,9 @@ layout("/layouts/platform_h5.html"){
|
||||
return
|
||||
}
|
||||
|
||||
const submitData = this.prepareSubmitData();
|
||||
this.$axios.post("/platform/difficultHelp/apply/submitAgain", {
|
||||
data: JSON.stringify(this.formData),
|
||||
data: JSON.stringify(submitData),
|
||||
taskId: GetQueryString("taskId")
|
||||
}).then(res => {
|
||||
if (res.code === 0) {
|
||||
@@ -440,8 +534,11 @@ layout("/layouts/platform_h5.html"){
|
||||
this.$set(this.formData, "unitName", user.unitName)
|
||||
this.$set(this.formData, "unionId", user.unionid)
|
||||
this.$set(this.formData, "unionName", user.unionName)
|
||||
this.$set(this.formData, "birthday", this.$moment(user.birthday).format("YYYY-MM-DD"))
|
||||
this.$set(this.formData, "position", user.position || "")
|
||||
this.$set(this.formData, "officialCapacity", user.officialCapacity || "")
|
||||
this.$set(this.formData, "mobile", user.mobile)
|
||||
this.$set(this.formData, "idCard", user.idCard)
|
||||
this.$set(this.formData, "homeAddress", user.homeAddress)
|
||||
} else {
|
||||
this.$set(this.formData, "userId", null)
|
||||
this.$set(this.formData, "userName", null)
|
||||
@@ -451,8 +548,11 @@ layout("/layouts/platform_h5.html"){
|
||||
this.$set(this.formData, "unitName", null)
|
||||
this.$set(this.formData, "unionId", null)
|
||||
this.$set(this.formData, "unionName", null)
|
||||
this.$set(this.formData, "birthday", null)
|
||||
this.$set(this.formData, "position", "")
|
||||
this.$set(this.formData, "officialCapacity", "")
|
||||
this.$set(this.formData, "mobile", null)
|
||||
this.$set(this.formData, "idCard", null)
|
||||
this.$set(this.formData, "homeAddress", null)
|
||||
}
|
||||
this.userSheetShow = false
|
||||
},
|
||||
@@ -465,94 +565,82 @@ layout("/layouts/platform_h5.html"){
|
||||
this.formData.birthday = moment(value).format("YYYY-MM-DD")
|
||||
this.showDatePicker = false
|
||||
},
|
||||
onSubsidyConfirm(value) {
|
||||
this.formData.subsidyStandards = value
|
||||
this.showSubsidyPicker = false
|
||||
onSubsidyTypeConfirm(option) {
|
||||
this.$set(this.formData, "subsidyName", option.text);
|
||||
this.subsidyValue = option.value;
|
||||
this.showSubsidyPicker = false;
|
||||
},
|
||||
handleBeforeClose(action, done) {
|
||||
if (action === "confirm") {
|
||||
if (!this.newMember.name || !this.newMember.age || !this.newMember.relation || !this.newMember.monthlyIncome) {
|
||||
this.$toast("请填写完整信息")
|
||||
done(false)
|
||||
} else {
|
||||
done()
|
||||
if (this.bizId) {
|
||||
this.updateMember()
|
||||
} else {
|
||||
this.addMember()
|
||||
}
|
||||
done()
|
||||
}
|
||||
} else {
|
||||
done()
|
||||
}
|
||||
},
|
||||
|
||||
addMember() {
|
||||
this.formData.familyList.push({ ...this.newMember })
|
||||
this.resetNewMember()
|
||||
},
|
||||
|
||||
editMember(index) {
|
||||
this.newMember = { ...this.formData.familyList[index] }
|
||||
this.editingIndex = index
|
||||
this.isEditing = true
|
||||
this.showDialog = true
|
||||
},
|
||||
updateMember() {
|
||||
this.formData.familyList.splice(this.editingIndex, 1, { ...this.newMember })
|
||||
this.resetNewMember()
|
||||
},
|
||||
removeMember(index) {
|
||||
this.formData.familyList.splice(index, 1)
|
||||
},
|
||||
resetNewMember() {
|
||||
this.newMember = { name: "", age: "", relation: "", monthlyIncome: "" }
|
||||
this.isEditing = false
|
||||
this.editingIndex = null
|
||||
onSubsidyStandardConfirm(option) {
|
||||
this.$set(this.formData, "subsidyStandardsName", option.text);
|
||||
this.subsidyStandardsValue = option.value;
|
||||
this.showSubsidyStandardPicker = false;
|
||||
},
|
||||
|
||||
findOne(id) {
|
||||
this.$axios.post("/platform/difficultHelp/mine/findOne", { id }).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.formData = res.data
|
||||
if (!this.formData.familyList) {
|
||||
this.formData.familyList = []
|
||||
}
|
||||
if (this.formData.subsidy) {
|
||||
const matchedSubsidy = this.subsidyTypeColumns.find(item => item.value === this.formData.subsidy);
|
||||
if (matchedSubsidy) {
|
||||
this.$set(this.formData, "subsidyName", matchedSubsidy.text);
|
||||
this.subsidyValue = this.formData.subsidy;
|
||||
}
|
||||
}
|
||||
|
||||
if (this.formData.subsidyStandards) {
|
||||
const matchedStandard = this.subsidyStandardColumns.find(item => item.value === this.formData.subsidyStandards);
|
||||
if (matchedStandard) {
|
||||
this.$set(this.formData, "subsidyStandardsName", matchedStandard.text);
|
||||
this.subsidyStandardsValue = this.formData.subsidyStandards;
|
||||
}
|
||||
}
|
||||
|
||||
this.queryRecipients(res.data.loginName)
|
||||
}
|
||||
})
|
||||
},
|
||||
// 申请模式
|
||||
modeChange(val) {
|
||||
const savedApplyCount = this.formData.applyCount;
|
||||
const user = this.$store.state.user
|
||||
if (val === "1") {
|
||||
this.$set(this.formData, "userId", user.id)
|
||||
this.$set(this.formData, "userName", user.username)
|
||||
this.$set(this.formData, "loginName", user.loginname)
|
||||
this.$set(this.formData, "proxyUserId", user.id)
|
||||
this.$set(this.formData, "proxyUserName", user.username)
|
||||
this.$set(this.formData, "proxyLoginName", user.loginname)
|
||||
this.$set(this.formData, "mode", "1")
|
||||
this.$set(this.formData, "sex", user.sex)
|
||||
this.$set(this.formData, "unitId", user.unit.id)
|
||||
this.$set(this.formData, "unitName", user.unit.name)
|
||||
this.$set(this.formData, "unionId", user.union.id)
|
||||
this.$set(this.formData, "unionName", user.union.name)
|
||||
this.$set(this.formData, "monthlyIncome", null)
|
||||
this.$set(this.formData, "birthday", this.$moment(user.birthday).format("YYYY-MM-DD"))
|
||||
this.$set(this.formData, "mobile", user.mobile)
|
||||
this.$set(this.formData, "homeAddress", user.homeAddress)
|
||||
this.$set(this.formData, "subsidyStandards", null)
|
||||
this.$set(this.formData, "reason", null)
|
||||
this.$set(this.formData, "remarks", null)
|
||||
this.$set(this.formData, "familyList", [])
|
||||
this.$set(this.formData, "files", [])
|
||||
this.$set(this.formData, 'userId', user.id)
|
||||
this.$set(this.formData, 'userName', user.username)
|
||||
this.$set(this.formData, 'loginName', user.loginname)
|
||||
this.$set(this.formData, 'proxyUserId', user.id)
|
||||
this.$set(this.formData, 'proxyUserName', user.username)
|
||||
this.$set(this.formData, 'proxyLoginName', user.loginname)
|
||||
this.$set(this.formData, 'mode', "1")
|
||||
this.$set(this.formData, 'sex', user.sex)
|
||||
this.$set(this.formData, 'unitId', user.unit.id)
|
||||
this.$set(this.formData, 'unitName', user.unit.name)
|
||||
this.$set(this.formData, 'unionId', user.union.id)
|
||||
this.$set(this.formData, 'unionName', user.union.name)
|
||||
this.$set(this.formData, 'yearIncome', null)
|
||||
this.$set(this.formData, 'birthday', user.birthday)
|
||||
this.$set(this.formData, 'idCard', user.idCard)
|
||||
this.$set(this.formData, 'mobile', user.mobile)
|
||||
this.$set(this.formData, 'homeAddress', user.homeAddress)
|
||||
this.$set(this.formData, 'subsidyStandards', null)
|
||||
this.$set(this.formData, 'reason', null)
|
||||
this.$set(this.formData, 'remarks', null)
|
||||
this.$set(this.formData, 'familyList', [])
|
||||
this.$set(this.formData, 'files', [])
|
||||
this.$set(this.formData, 'applyCount', savedApplyCount )
|
||||
this.queryRecipients(user.loginname)
|
||||
} else {
|
||||
this.formData = {}
|
||||
this.$set(this.formData, "proxyUserId", user.id)
|
||||
this.$set(this.formData, "proxyUserName", user.username)
|
||||
this.$set(this.formData, "proxyLoginName", user.loginname)
|
||||
this.$set(this.formData, "mode", "2")
|
||||
this.$set(this.formData, "familyList", [])
|
||||
this.$set(this.formData, "files", [])
|
||||
this.$set(this.formData, 'proxyUserId', user.id)
|
||||
this.$set(this.formData, 'proxyUserName', user.username)
|
||||
this.$set(this.formData, 'proxyLoginName', user.loginname)
|
||||
this.$set(this.formData, 'mode', "2")
|
||||
this.$set(this.formData, 'familyList', [])
|
||||
this.$set(this.formData, 'files', [])
|
||||
this.$set(this.formData, 'applyCount',savedApplyCount )
|
||||
}
|
||||
},
|
||||
/**
|
||||
@@ -642,17 +730,54 @@ layout("/layouts/platform_h5.html"){
|
||||
return { status: 0, msg: "无效的卡号,请检查后再试。" }
|
||||
}
|
||||
return { status: 200, msg: "卡号有效。" }
|
||||
},
|
||||
|
||||
toChinesNum(num) {
|
||||
let changeNum = ["零", "一", "二", "三", "四", "五", "六", "七", "八", "九"]
|
||||
let unit = ["", "十", "百", "千", "万"]
|
||||
num = parseInt(num)
|
||||
let getWan = (temp) => {
|
||||
let strArr = temp.toString().split("").reverse()
|
||||
let newNum = ""
|
||||
for (let i = 0; i < strArr.length; i++) {
|
||||
newNum = (i == 0 && strArr[i] == 0 ? "" : (i > 0 && strArr[i] == 0 && strArr[i - 1] == 0 ? "" : changeNum[strArr[i]] + (strArr[i] == 0 ? unit[0] : unit[i]))) + newNum
|
||||
}
|
||||
return newNum
|
||||
}
|
||||
let overWan = Math.floor(num / 10000)
|
||||
let noWan = num % 10000
|
||||
if (noWan.toString().length < 4) {
|
||||
noWan = "0" + noWan
|
||||
}
|
||||
return overWan ? getWan(overWan) + "万" + getWan(noWan) : getWan(num)
|
||||
},
|
||||
|
||||
async getIsCanPlay() {
|
||||
const res = await this.$axios.post("/platform/difficultHelp/apply/getIsCanPlay");
|
||||
if (res.code === 0) {
|
||||
this.isShow = res.data.result;
|
||||
this.time = res.data.time;
|
||||
if (res.data.applyCount !== null && res.data.applyCount !== undefined && res.data.applyCount !== 0) {
|
||||
this.$set(this.formData, 'applyCount', res.data.applyCount)
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
if (this.bizId) {
|
||||
this.findOne(this.bizId)
|
||||
} else {
|
||||
this.modeChange("1")
|
||||
await this.getIsCanPlay();
|
||||
|
||||
if (this.isShow) {
|
||||
await this.initDictOptions();
|
||||
if (this.bizId) {
|
||||
this.findOne(this.bizId)
|
||||
} else {
|
||||
this.modeChange("1")
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<!--#
|
||||
}
|
||||
#-->
|
||||
|
||||
+148
-100
@@ -1,94 +1,132 @@
|
||||
const INFO = {
|
||||
template: /*language=HTML*/ `
|
||||
<van-action-sheet v-model="visible" title="查看详情">
|
||||
<div class="detail-container">
|
||||
<van-cell-group title="基本信息">
|
||||
<van-cell title="填写人姓名">{{viewData.proxyUserName}}</van-cell>
|
||||
<van-cell title="填写人工号">{{viewData.proxyLoginName}}</van-cell>
|
||||
<van-cell title="申请模式">{{viewData.mode == 1 ? '本人申请' : '替他人申请'}}</van-cell>
|
||||
|
||||
<van-cell title="受助人">{{ viewData.userName + '(' + viewData.loginName + ')' }}</van-cell>
|
||||
<van-cell title="性别">{{viewData.sex}}</van-cell>
|
||||
<van-cell title="出生年月">{{viewData.birthday}}</van-cell>
|
||||
|
||||
<van-cell title="所属工会">{{viewData.unionName}}</van-cell>
|
||||
<van-cell title="所属单位">{{viewData.unitName}}</van-cell>
|
||||
<van-cell title="职务职称">{{viewData.officialCapacity}}</van-cell>
|
||||
|
||||
<van-cell title="手机号码">{{viewData.mobile}}</van-cell>
|
||||
<van-cell title="身份证号">{{viewData.idCard}}</van-cell>
|
||||
<van-cell title="家庭住址">{{viewData.homeAddress}}</van-cell>
|
||||
<van-cell title="收款账户">{{viewData.bankCardNum}}</van-cell>
|
||||
<van-cell title="户名">{{viewData.bankUserName}}</van-cell>
|
||||
<van-cell title="开户行">{{viewData.bankOfDeposit}}</van-cell>
|
||||
<div class="detail-container">
|
||||
<van-cell-group title="基本信息">
|
||||
<van-cell title="填写人姓名">{{ viewData.proxyUserName }}</van-cell>
|
||||
<van-cell title="填写人工号">{{ viewData.proxyLoginName }}</van-cell>
|
||||
<van-cell title="性别">{{ viewData.sex }}</van-cell>
|
||||
|
||||
<van-cell title="受助人">{{ viewData.userName + '(' + viewData.loginName + ')' }}</van-cell>
|
||||
<van-cell title="所在单位">{{ viewData.unitName }}</van-cell>
|
||||
<van-cell title="所在工会">{{ viewData.unionName }}</van-cell>
|
||||
|
||||
<van-cell title="困难类型">{{viewData.subsidyStandards}}</van-cell>
|
||||
<van-cell title="申请原因">{{viewData.reason}}</van-cell>
|
||||
|
||||
<van-cell class="direction-column-cell" title="附件">
|
||||
<file-preview :files="viewData.files" complete_result></file-preview>
|
||||
</van-cell>
|
||||
<van-cell title="签字">
|
||||
<van-image v-if="viewData.sign" :src="viewData.sign"
|
||||
class="signature-image"></van-image>
|
||||
<span v-else>暂无</span>
|
||||
<van-cell title="职务">{{ viewData.position }}</van-cell>
|
||||
<van-cell title="职称">{{ viewData.officialCapacity }}</van-cell>
|
||||
<van-cell title="联系电话">{{ viewData.mobile }}</van-cell>
|
||||
|
||||
<van-cell title="家庭年总收入(万元)">{{ viewData.homeIncome }}</van-cell>
|
||||
<van-cell title="家庭人数">{{ viewData.homeNumber }}</van-cell>
|
||||
<van-cell title="家庭住址">{{ viewData.homeAddress }}</van-cell>
|
||||
|
||||
<van-cell title="补助类型">
|
||||
<dict-tag :options="dict.type.DIFFICULT_SUBSIDY_TYPE" :value="viewData.subsidy"></dict-tag>
|
||||
</van-cell>
|
||||
</van-cell-group>
|
||||
<van-cell title="困难类型">
|
||||
<dict-tag :options="dict.type.DIFFICULT_TYPE" :value="viewData.subsidyStandards"></dict-tag>
|
||||
</van-cell>
|
||||
<van-cell title="申请次数">{{ viewData.applyCount || 1 }}</van-cell>
|
||||
|
||||
<!-- <van-cell-group title="家庭成员经济收入" v-if="viewData.familyList && viewData.familyList.length > 0">
|
||||
<table class="table-class">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>序号</th>
|
||||
<th>姓名</th>
|
||||
<th>年龄</th>
|
||||
<th>关系</th>
|
||||
<th>月收入(元)</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="(item,index) in viewData.familyList" :key="index">
|
||||
<td>{{ index + 1 }}</td>
|
||||
<td>{{ item.name }}</td>
|
||||
<td>{{ item.age }}</td>
|
||||
<td>{{ item.relation }}</td>
|
||||
<td>{{ item.monthlyIncome }}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</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.PROPOSAL_CASE_FILING_RESULT"
|
||||
:value="task.ext.caseFilingResult"></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>
|
||||
<van-cell title="开户行">{{ viewData.bankOfDeposit }}</van-cell>
|
||||
<van-cell title="银行卡号">{{ viewData.bankCardNum }}</van-cell>
|
||||
|
||||
<van-cell title="生活致困原因" class="text-cell">
|
||||
<template #label>
|
||||
<div style="word-wrap: break-word; white-space: pre-line;">
|
||||
{{viewData.reason}}
|
||||
</div>
|
||||
</template>
|
||||
</van-cell>
|
||||
|
||||
<van-cell title="家庭成员" class="column-cell">
|
||||
<table class="family-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="table-header">序号</th>
|
||||
<th class="table-header">与本人关系</th>
|
||||
<th class="table-header">姓名</th>
|
||||
<th class="table-header">年龄</th>
|
||||
<th class="table-header">工作单位</th>
|
||||
<th class="table-header">年收入(元)</th>
|
||||
<th class="table-header">备注</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr class="table-row" v-for="(item, index) in viewData.familyList" :key="index">
|
||||
<td class="table-cell">{{ index + 1 }}</td>
|
||||
<td class="table-cell">{{ item.relation }}</td>
|
||||
<td class="table-cell">{{ item.name }}</td>
|
||||
<td class="table-cell">{{ item.age }}</td>
|
||||
<td class="table-cell">{{ item.homeUnit }}</td>
|
||||
<td class="table-cell">{{ item.yearIncome }}</td>
|
||||
<td class="table-cell">{{ item.remarks }}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</van-cell>
|
||||
|
||||
<van-cell title="本人承诺">
|
||||
<div style="text-align: left; padding: 5px 0; font-size: 14px;">
|
||||
本人及家庭成员未有购买价格超过15万元的机动车,也未有两套及以上商品房,特此承诺!
|
||||
</div>
|
||||
<div style="text-align: right; font-size: 12px; color: #999; margin-top: 5px;">
|
||||
<span>承诺人:{{ viewData.userName }}</span>
|
||||
<br/>
|
||||
<span>{{ $moment(viewData.applyTime).format("YYYY-MM-DD") }}</span>
|
||||
</div>
|
||||
</van-cell>
|
||||
|
||||
<van-cell title="签字" v-if="viewData.sign">
|
||||
<img :src="viewData.sign" style="max-width: 100px; max-height: 50px;" />
|
||||
</van-cell>
|
||||
|
||||
<van-cell title="附件" v-if="viewData.files && viewData.files.length > 0">
|
||||
<div v-for="(file, index) in viewData.files" :key="index" style="margin-bottom: 5px;">
|
||||
<a :href="file.url" target="_blank">{{ file.name }}</a>
|
||||
</div>
|
||||
</van-cell>
|
||||
<van-cell title="附件" v-else>
|
||||
<span>暂无</span>
|
||||
</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="审批级别" v-if="task.displayName == '校工会审核'">
|
||||
{{ viewData.level }}
|
||||
</van-cell>
|
||||
<van-cell title="审批金额" v-if="task.displayName == '校工会审核'">
|
||||
{{ '¥' + viewData.money }}
|
||||
</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 && task.taskFormData.opinion" class="direction-column-cell">
|
||||
<div style="white-space: pre-line;">{{ task.taskFormData.opinion }}</div>
|
||||
</van-cell>
|
||||
</van-cell-group>
|
||||
</template>
|
||||
</div>
|
||||
<slot></slot>
|
||||
<slot></slot>
|
||||
</van-action-sheet>
|
||||
`,
|
||||
dicts: ["PROCESS_TASK_SUBMIT_TYPE"],
|
||||
data() {
|
||||
dicts: ["PROCESS_TASK_SUBMIT_TYPE", "DIFFICULT_SUBSIDY_TYPE", "DIFFICULT_TYPE"], data() {
|
||||
return {
|
||||
visible: false,
|
||||
row: {},
|
||||
@@ -97,7 +135,6 @@ const INFO = {
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 打开
|
||||
onOpen(row) {
|
||||
this.row = row
|
||||
this.visible = true
|
||||
@@ -110,7 +147,6 @@ const INFO = {
|
||||
this.visible = false
|
||||
},
|
||||
|
||||
// 获取申请信息
|
||||
info() {
|
||||
this.$axios.post("/platform/difficultHelp/mine/findOne", { id: this.row.id }).then((res) => {
|
||||
if (res.code === 0) {
|
||||
@@ -118,8 +154,6 @@ const INFO = {
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
// 获取已办任务审批记录
|
||||
getDoneTasks() {
|
||||
this.$axios.post("/flow/common/doneTasks", { bizId: this.row.id }).then((res) => {
|
||||
if (res.code === 0) {
|
||||
@@ -129,25 +163,39 @@ const INFO = {
|
||||
},
|
||||
},
|
||||
style: /*language=CSS*/ `
|
||||
/deep/ .table-class{
|
||||
.column-cell {
|
||||
flex-direction: column;
|
||||
}
|
||||
.family-table {
|
||||
width: 100%;
|
||||
border-radius: 5px;
|
||||
overflow: hidden;
|
||||
line-height: 1.5rem;
|
||||
font-size: 13px;
|
||||
table-layout: fixed;
|
||||
max-width: 100%;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
/deep/ .table-class th {
|
||||
background-color: #f2f2f2;
|
||||
border: 1px solid #dddddd;
|
||||
}
|
||||
/deep/ .table-class tr {
|
||||
table-layout: auto;
|
||||
text-align: center;
|
||||
border-bottom: 1px solid #dddddd;
|
||||
font-family: 'Arial', sans-serif;
|
||||
margin: 20px 0;
|
||||
}
|
||||
/deep/ .table-class td {
|
||||
border: 1px solid #dddddd;
|
||||
.table-header {
|
||||
background-color: gray;
|
||||
color: white;
|
||||
font-weight: bold;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
.table-row {
|
||||
background-color: #f9f9f9;
|
||||
transition: background-color 0.3s;
|
||||
}
|
||||
.table-row:hover {
|
||||
background-color: #f1f1f1;
|
||||
}
|
||||
.table-cell {
|
||||
padding: 10px 5px;
|
||||
border: 1px solid #ddd;
|
||||
text-align: center;
|
||||
font-size: 12px;
|
||||
}
|
||||
.text-cell {
|
||||
word-break: break-all;
|
||||
}
|
||||
`
|
||||
}
|
||||
|
||||
+67
-13
@@ -60,6 +60,35 @@ layout("/layouts/platform_h5.html"){
|
||||
<div v-if="showApprovalForm">
|
||||
<div class="process-title">{{formData.taskName}}</div>
|
||||
<van-form ref="formRef">
|
||||
<van-field
|
||||
v-model="formData.level"
|
||||
name="level"
|
||||
label="级别"
|
||||
placeholder="请选择级别"
|
||||
is-link
|
||||
@click="showLevelPicker = true"
|
||||
:rules="[{ required: true, message: '请选择级别' }]"
|
||||
required
|
||||
></van-field>
|
||||
<van-popup v-model="showLevelPicker" position="bottom">
|
||||
<van-picker
|
||||
show-toolbar
|
||||
:columns="levelColumns"
|
||||
@confirm="onLevelConfirm"
|
||||
@cancel="showLevelPicker=false">
|
||||
</van-picker>
|
||||
</van-popup>
|
||||
|
||||
<van-field
|
||||
v-model="formData.money"
|
||||
name="money"
|
||||
label="审核金额"
|
||||
placeholder="请输入审核金额"
|
||||
type="number"
|
||||
:rules="[{ required: true, message: '请输入审核金额' }]"
|
||||
required
|
||||
></van-field>
|
||||
|
||||
<van-field
|
||||
v-model="formData.tf_opinion"
|
||||
name="tf_opinion"
|
||||
@@ -100,7 +129,10 @@ layout("/layouts/platform_h5.html"){
|
||||
unitList: [],
|
||||
|
||||
formData: {},
|
||||
showApprovalForm: false
|
||||
showApprovalForm: false,
|
||||
|
||||
showLevelPicker: false,
|
||||
levelColumns: []
|
||||
}
|
||||
},
|
||||
components: {
|
||||
@@ -121,7 +153,6 @@ layout("/layouts/platform_h5.html"){
|
||||
})
|
||||
},
|
||||
|
||||
// 查看详情
|
||||
onView(row) {
|
||||
this.showApprovalForm = false
|
||||
this.$refs.infoRef.onOpen(row)
|
||||
@@ -132,10 +163,25 @@ layout("/layouts/platform_h5.html"){
|
||||
this.$refs.infoRef.onOpen(row)
|
||||
this.formData = {
|
||||
processTaskId: row.taskId,
|
||||
taskName: row.curTaskName
|
||||
taskName: row.curTaskName,
|
||||
money: 0,
|
||||
id: row.id,
|
||||
tf_opinion: ""
|
||||
}
|
||||
},
|
||||
|
||||
async initLevelDict() {
|
||||
const levelData = await this.$businessTool.getDictOptions("DIFFICULT_LEVEL");
|
||||
this.levelColumns = levelData.map(item => {
|
||||
return { text: item.name, value: item.code };
|
||||
});
|
||||
},
|
||||
|
||||
onLevelConfirm(option) {
|
||||
this.formData.level = option.value;
|
||||
this.showLevelPicker = false;
|
||||
},
|
||||
|
||||
async handleTaskAction(val) {
|
||||
try {
|
||||
await this.$refs.formRef.validate();
|
||||
@@ -143,16 +189,24 @@ layout("/layouts/platform_h5.html"){
|
||||
title: "提示",
|
||||
message: "您确定要提交吗?"
|
||||
}).then(() => {
|
||||
this.$axios.post("/flow/common/executeTask", {
|
||||
this.$axios.post("/platform/difficultHelp/schoolUnionApproval/save", {
|
||||
data: JSON.stringify({
|
||||
...this.formData,
|
||||
submitType: val
|
||||
})
|
||||
}).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$refs.infoRef.onClose()
|
||||
this.$toast.success(res.msg)
|
||||
this.doSearch()
|
||||
}).then((saveRes) => {
|
||||
if (saveRes.code === 0) {
|
||||
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(() => {
|
||||
@@ -165,6 +219,7 @@ layout("/layouts/platform_h5.html"){
|
||||
|
||||
// 撤回
|
||||
onRevoke(row) {
|
||||
debugger
|
||||
this.$dialog.confirm({
|
||||
title: '提示',
|
||||
message: '您确定要撤回吗?',
|
||||
@@ -206,9 +261,7 @@ layout("/layouts/platform_h5.html"){
|
||||
v.text = v.name
|
||||
v.value = v.id
|
||||
})
|
||||
if (hasAdmin && !this.pageForm.unionId) {
|
||||
this.unitList.unshift({ text: "全部单位", value: null })
|
||||
}
|
||||
this.unitList.unshift({ text: "全部单位", value: null })
|
||||
if (this.unitList && this.unitList.length > 0) {
|
||||
this.$set(this.pageForm, "unitId", this.unitList[0].value)
|
||||
}
|
||||
@@ -217,6 +270,7 @@ layout("/layouts/platform_h5.html"){
|
||||
async created() {
|
||||
await this.initUnion()
|
||||
await this.flushUnits()
|
||||
await this.initLevelDict()
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user