This commit is contained in:
=
2026-05-07 18:01:54 +08:00
parent 9123ed5f66
commit 9d22c1c4e2
13 changed files with 1646 additions and 271 deletions
@@ -7,6 +7,7 @@ import cn.afterturn.easypoi.excel.entity.params.ExcelExportEntity;
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.constant.RoleConstant;
import com.budwk.app.base.page.Pagination;
@@ -237,6 +238,9 @@ public class UnionReimburseCollectController {
item.setReimburseFundSource(typeDict.getName());
}
}
if (StrUtil.isNotBlank(item.getCreateTime())) {
item.setCreateTime(DateUtil.format(DateUtil.parse(item.getCreateTime()), "yyyy-MM-dd HH:mm:ss"));
}
// 拼接备注字段(仿照系统代码逻辑,使用activityName和condolenceName字段)
if (cn.hutool.core.util.StrUtil.isNotBlank(item.getActivityName())) {
@@ -227,7 +227,7 @@ public class UnionReimburseMineController {
tempFile.deleteOnExit();
docData.put("createTime", DateUtil.format(unionReimburse.getCreateTime(), "yyyy-MM-dd"));
docData.put("createTime", DateUtil.format(unionReimburse.getCreateTime(), "yyyy-MM-dd HH:mm:ss"));
docData.put("unitName", unionReimburse.getUnitName());
docData.put("userName", unionReimburse.getUserName());
docData.put("loginName", unionReimburse.getLoginName());
@@ -309,7 +309,7 @@ public class UnionReimburseMineController {
.create();
docData.put("qrcode", pictureRenderData);
docData.put("createTime", DateUtil.format(unionReimburse.getCreateTime(), "yyyy-MM-dd"));
docData.put("createTime", DateUtil.format(unionReimburse.getCreateTime(), "yyyy-MM-dd HH:mm:ss"));
docData.put("unitName", unionReimburse.getUnitName());
docData.put("userName", unionReimburse.getUserName());
docData.put("loginName", unionReimburse.getLoginName());
@@ -139,10 +139,10 @@ public class UnionReimburseServiceImpl extends BaseServiceImpl<UnionReimburse> i
}
if (oldRecord == null) {
unionReimburse.setCreateTime(DateUtil.date());
unionReimburse.setCreateTime(toSecondPrecision(DateUtil.date()));
unionReimburse.setDocumentNo(generateDocumentNo());
} else {
unionReimburse.setCreateTime(oldRecord.getCreateTime());
unionReimburse.setCreateTime(toSecondPrecision(oldRecord.getCreateTime()));
unionReimburse.setDocumentNo(oldRecord.getDocumentNo());
}
unionReimburse.setStateId(stateId);
@@ -156,6 +156,16 @@ public class UnionReimburseServiceImpl extends BaseServiceImpl<UnionReimburse> i
return Result.success(stateId == 2 ? "提交成功" : "保存成功");
}
/**
* 申请时间统一保存到秒,避免数据库和页面出现毫秒级时间。
*/
private Date toSecondPrecision(Date date) {
if (date == null) {
return null;
}
return new Date((date.getTime() / 1000) * 1000);
}
@Override
public UnionReimburse getApplyForm(String id) {
UnionReimburse unionReimburse = this.fetch(id);
@@ -338,11 +338,11 @@ layout("/layouts/platform.html"){
</el-form-item>
</el-descriptions-item>
<el-descriptions-item label="报销金额" v-if="formData.reimburseProject !== 'UNION_REIMBURSE_PROJECT_1'">
<el-form-item label="报销金额" prop="money">
<el-input v-model="formData.money" placeholder="自动汇总发票金额" readonly></el-input>
</el-form-item>
</el-descriptions-item>
<!-- <el-descriptions-item label="报销金额" v-if="formData.reimburseProject !== 'UNION_REIMBURSE_PROJECT_1'">-->
<!-- <el-form-item label="报销金额" prop="money">-->
<!-- <el-input v-model="formData.money" placeholder="自动汇总发票金额" readonly></el-input>-->
<!-- </el-form-item>-->
<!-- </el-descriptions-item>-->
<el-descriptions-item label="活动时间" v-if="formData.reimburseProject !== 'UNION_REIMBURSE_PROJECT_1'">
<el-form-item label="活动时间" prop="activityTime">
@@ -1100,7 +1100,7 @@ layout("/layouts/platform.html"){
this.$set(this.detailForm, "invoiceCheckCode", data.invoiceCheckCode)
}
if (this.detailForm.invoiceNo) {
return this.validateInvoiceDuplicateBeforeSave()
return this.validateInvoiceDuplicateBeforeSave(true)
}
return true
}).catch((error) => {
@@ -1113,7 +1113,7 @@ layout("/layouts/platform.html"){
this.recognizingInvoice = false
})
},
async validateInvoiceDuplicateBeforeSave() {
async validateInvoiceDuplicateBeforeSave(checkHistory) {
const invoiceNo = this.detailForm.invoiceNo ? String(this.detailForm.invoiceNo).trim() : ""
if (!invoiceNo) {
return false
@@ -1133,6 +1133,9 @@ layout("/layouts/platform.html"){
this.$message.warning("发票号码【" + invoiceNo + "】与本次提交的第" + duplicateRows.join("、") + "条发票重复,不能保存")
return false
}
if (!checkHistory) {
return true
}
const resp = await this.$axios.get("/platform/unionReimburse/apply/checkInvoiceDuplicate", {
params: {
invoiceNo: invoiceNo,
@@ -1150,7 +1153,7 @@ layout("/layouts/platform.html"){
if (!valid) {
return
}
const duplicateValid = await this.validateInvoiceDuplicateBeforeSave()
const duplicateValid = await this.validateInvoiceDuplicateBeforeSave(false)
if (!duplicateValid) {
return
}
@@ -77,7 +77,11 @@ layout("/layouts/platform.html"){
</template>
</el-table-column>
<el-table-column prop="money" label="金额"></el-table-column>
<el-table-column prop="createTime" label="申请时间" sortable="custom"></el-table-column>
<el-table-column prop="createTime" label="申请时间" sortable="custom">
<template slot-scope="{row}">
{{ formatCreateTime(row.createTime) }}
</template>
</el-table-column>
<el-table-column prop="curTaskName" label="当前节点"></el-table-column>
<el-table-column prop="instanceState" label="流程状态">
<template slot-scope="{row}">
@@ -157,6 +161,9 @@ layout("/layouts/platform.html"){
}
},
methods: {
formatCreateTime(value) {
return value && this.$moment(value).isValid() ? this.$moment(value).format("YYYY-MM-DD HH:mm:ss") : ""
},
onView(row) {
this.$refs.guava.edit(() => {
this.showApprovalForm = false
@@ -55,7 +55,11 @@ layout("/layouts/platform.html"){
<el-table-column prop="userName" label="姓名"></el-table-column>
<el-table-column prop="unionName" label="所属工会" sortable="custom"></el-table-column>
<el-table-column prop="unitName" label="所属单位" sortable="custom"></el-table-column>
<el-table-column prop="createTime" label="申请时间" sortable="custom"></el-table-column>
<el-table-column prop="createTime" label="申请时间" sortable="custom">
<template slot-scope="{row}">
{{ formatCreateTime(row.createTime) }}
</template>
</el-table-column>
<el-table-column prop="reimburseProject" label="报销项目" sortable="custom">
<template slot-scope="{row}">
<span v-if="row.reimburseProject === 'UNION_REIMBURSE_PROJECT_1'">慰问</span>
@@ -150,6 +154,9 @@ layout("/layouts/platform.html"){
}
},
methods: {
formatCreateTime(value) {
return value && this.$moment(value).isValid() ? this.$moment(value).format("YYYY-MM-DD HH:mm:ss") : ""
},
onView(row) {
this.$refs.guava.edit(()=>{
this.showApprovalForm = false
@@ -52,7 +52,11 @@ layout("/layouts/platform.html"){
<el-table-column prop="userName" label="姓名"></el-table-column>
<el-table-column prop="unionName" label="所属工会" sortable="custom"></el-table-column>
<el-table-column prop="unitName" label="所属单位" sortable="custom"></el-table-column>
<el-table-column prop="createTime" label="申请时间" sortable="custom"></el-table-column>
<el-table-column prop="createTime" label="申请时间" sortable="custom">
<template slot-scope="{row}">
{{ formatCreateTime(row.createTime) }}
</template>
</el-table-column>
<el-table-column prop="reimburseProject" label="报销项目" sortable="custom">
<template slot-scope="{row}">
<span v-if="row.reimburseProject === 'UNION_REIMBURSE_PROJECT_1'">慰问</span>
@@ -125,6 +129,9 @@ layout("/layouts/platform.html"){
}
},
methods: {
formatCreateTime(value) {
return value && this.$moment(value).isValid() ? this.$moment(value).format("YYYY-MM-DD HH:mm:ss") : ""
},
onView(row) {
this.$refs.guava.view(() => {
this.$refs.unionReimburseInfoRef.onOpen(row)
@@ -62,7 +62,11 @@ layout("/layouts/platform.html"){
<el-table-column prop="userName" label="姓名"></el-table-column>
<el-table-column prop="unionName" label="所属工会" sortable="custom"></el-table-column>
<el-table-column prop="unitName" label="所属单位" sortable="custom"></el-table-column>
<el-table-column prop="createTime" label="申请时间" sortable="custom"></el-table-column>
<el-table-column prop="createTime" label="申请时间" sortable="custom">
<template slot-scope="{row}">
{{ formatCreateTime(row.createTime) }}
</template>
</el-table-column>
<el-table-column prop="reimburseProject" label="报销项目" sortable="custom">
<template slot-scope="{row}">
<span v-if="row.reimburseProject === 'UNION_REIMBURSE_PROJECT_1'">慰问</span>
@@ -159,6 +163,9 @@ layout("/layouts/platform.html"){
}
},
methods: {
formatCreateTime(value) {
return value && this.$moment(value).isValid() ? this.$moment(value).format("YYYY-MM-DD HH:mm:ss") : ""
},
onView(row) {
this.$refs.guava.edit(() => {
this.showApprovalForm = false
File diff suppressed because it is too large Load Diff
@@ -2,6 +2,19 @@
layout("/layouts/platform_h5.html"){
#-->
<style>
.state-primary {
color: #409eff;
}
.state-success {
color: #67c23a;
}
.state-danger {
color: #f56c6c;
}
</style>
<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">
@@ -22,31 +35,26 @@ layout("/layouts/platform_h5.html"){
<table-list api="/platform/unionReimburse/collect/pageData" :page_form.sync="pageForm" ref="tableListRef"
@ready="doSearch" >
<template v-slot="{index,row}">
<table-column label="经办人">{{row.userName}}</table-column>
<table-column label="经办人工号">{{row.loginName}}</table-column>
<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 label="申请时间">{{formatCreateTime(row.createTime)}}</table-column>
<table-column label="报销项目">{{getReimburseProjectName(row.reimburseProject)}}</table-column>
<table-column label="备注">{{getRemarkText(row)}}</table-column>
<table-column label="申请状态">
<span :class="getStateClass(row.stateId)">{{getStateName(row.stateId)}}</span>
</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" @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>
@@ -85,6 +93,58 @@ layout("/layouts/platform_h5.html"){
}
},
methods: {
// 手机端统计列表字段展示与我的报销列表保持一致。
getReimburseProjectName(reimburseProject) {
if (reimburseProject === "UNION_REIMBURSE_PROJECT_1") {
return "慰问"
}
if (reimburseProject === "UNION_REIMBURSE_PROJECT_2") {
return "文体活动"
}
if (reimburseProject === "UNION_REIMBURSE_PROJECT_3") {
return "日常活动"
}
if (reimburseProject === "UNION_REIMBURSE_PROJECT_4") {
return "专项活动"
}
return reimburseProject || ""
},
getRemarkText(row) {
if (row.reimburseProject === "UNION_REIMBURSE_PROJECT_1") {
return "被慰问人:" + (row.condolenceUserName || "")
}
return "活动名称:" + (row.activityName || "")
},
getStateName(stateId) {
if (stateId == 1) {
return "待提交"
}
if (stateId == 2) {
return "待审核确认"
}
if (stateId == 3) {
return "报销成功"
}
if (stateId == 4) {
return "拒绝"
}
if (stateId == 5) {
return "退回"
}
return stateId || ""
},
getStateClass(stateId) {
if (stateId == 3) {
return "state-success"
}
if (stateId == 4) {
return "state-danger"
}
return "state-primary"
},
formatCreateTime(value) {
return value && this.$moment(value).isValid() ? this.$moment(value).format("YYYY-MM-DD HH:mm:ss") : ""
},
onView(row) {
this.showApprovalForm = false
this.$refs.unionReimburseInfoRef.onOpen(row)
@@ -5,18 +5,12 @@ const UNION_REIMBURSE_INFO = {
<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">
<van-cell title="经办人">{{ viewData.userName }}</van-cell>
<van-cell title="联系方式">{{ viewData.mobile }}</van-cell>
<van-cell title="经费来源">
<dict-tag :options="dict.type.UNION_REIMBURSE_FUND_SOURCE"
:value="viewData.reimburseFundSource">
</dict-tag>
</van-cell>
<van-cell title="报销项目">
@@ -24,34 +18,114 @@ const UNION_REIMBURSE_INFO = {
:value="viewData.reimburseProject">
</dict-tag>
</van-cell>
<van-cell title="联系方式">{{ viewData.mobile }}</van-cell>
<van-cell title="证明人">{{viewData.certifierUserName}}({{viewData.certifierLoginName}})
<van-cell title="支付方式">
<dict-tag :options="dict.type.UNION_REIMBURSE_PAYMENT_WAY"
:value="viewData.paymentWay">
</dict-tag>
</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="活动名称">{{ viewData.activityName }}</van-cell>
<van-cell title="活动地点">{{ viewData.activityPlace || '暂无'}}</van-cell>
<van-cell title="报销金额(元)">{{ viewData.money }}</van-cell>
<van-cell title="活动时间">{{$moment(viewData.activityTime).format('YYYY-MM-DD')}}</van-cell>
<!-- <van-cell title="发票张数">{{ viewData.invoiceNumber }}</van-cell>-->
<van-cell title="支付内容">
<div style="white-space: pre-line">
{{ viewData.paymentNotes }}
</div>
<van-cell title="所属协会" v-if="viewData.reimburseFundSource === 'UNION_REIMBURSE_FUND_SOURCE_3'">
{{ viewData.clubName }}
</van-cell>
<van-cell title="签字">
<template #label>
<van-image :src="viewData.userSign"
style="width: 100%;height: 150px;"></van-image>
<van-cell title="余额" v-if="viewData.reimburseFundSource">{{ formatMoney(viewData.fundBalance) }}</van-cell>
<template v-if="viewData.paymentWay === 'UNION_REIMBURSE_PAYMENT_WAY_2'">
<van-cell title="付款人">{{ viewData.payerName }}</van-cell>
<van-cell title="户名">{{ viewData.bankUserName }}</van-cell>
<van-cell title="开户行">{{ viewData.bankOfDeposit }}</van-cell>
<van-cell title="银行卡号">{{ viewData.bankCardNumber }}</van-cell>
</template>
<template v-if="viewData.reimburseProject === 'UNION_REIMBURSE_PROJECT_1'">
<van-cell title="慰问对象">{{ viewData.condolenceUserName }}</van-cell>
<van-cell title="性别">{{ viewData.condolenceSex }}</van-cell>
<van-cell title="生日">{{ formatDateText(viewData.condolenceBirthday) }}</van-cell>
<van-cell title="身份证号">{{ viewData.condolenceIdCard }}</van-cell>
<van-cell title="联系方式">{{ viewData.condolenceMobile }}</van-cell>
<van-cell title="慰问类型">{{ viewData.typeName || viewData.condolenceTypeName }}</van-cell>
<van-cell title="慰问方式">{{ viewData.way }}</van-cell>
<van-cell title="慰问金额">{{ formatMoney(viewData.condolenceMoney) }}</van-cell>
<van-cell title="慰问时间">{{ formatDateText(viewData.condolenceTime) }}</van-cell>
<van-cell title="结婚时间" v-if="isCondolenceType('cf4ce7af322d464f8f86d818fcc00203')">
{{ formatDateText(viewData.marryTime) }}
</van-cell>
<van-cell title="生育时间" v-if="isCondolenceType('c90cb10dce6542e99ae271bee6fe8cc0')">
{{ formatDateText(viewData.fertilityTime) }}
</van-cell>
<template v-if="isCondolenceType('4e316737e71047e0b01aea78524c1416')">
<van-cell title="住院病由">{{ viewData.hospitalCausation }}</van-cell>
<van-cell title="住院开始时间">{{ formatDateText(viewData.hospitalizationStartTime) }}</van-cell>
<van-cell title="住院结束时间">{{ formatDateText(viewData.hospitalizationEndTime) }}</van-cell>
<van-cell title="入住医院">{{ viewData.hospital }}</van-cell>
<van-cell title="当年次数">{{ viewData.hospitalCount }}</van-cell>
</template>
</van-cell>
<template v-if="isCondolenceType('60f03a87b62b4823855814afdbf5672a')">
<van-cell title="去逝时间">{{ formatDateText(viewData.deathTime) }}</van-cell>
<van-cell title="与被慰问人关系">{{ viewData.condolenceRelationship }}</van-cell>
</template>
<van-cell title="参加随行人员">
<div style="white-space: pre-line">{{ viewData.participants }}</div>
</van-cell>
<van-cell title="报销事由">
<div style="white-space: pre-line">{{ viewData.paymentNotes }}</div>
</van-cell>
<van-cell title="备注">
<div style="white-space: pre-line">{{ viewData.notes }}</div>
</van-cell>
</template>
<template v-if="viewData.reimburseProject && viewData.reimburseProject !== 'UNION_REIMBURSE_PROJECT_1'">
<van-cell title="活动名称">{{ viewData.activityName }}</van-cell>
<van-cell title="活动人数">{{ viewData.activityNumber }}</van-cell>
<van-cell title="活动地点">{{ viewData.activityPlace }}</van-cell>
<van-cell title="活动时间">{{ formatDateText(viewData.activityTime) }}</van-cell>
<van-cell title="支付内容">
<div style="white-space: pre-line">{{ viewData.paymentNotes }}</div>
</van-cell>
</template>
<van-cell title="附件">
<template #label>
<file-preview :files="viewData.files" complete_result></file-preview>
<file-preview :files="viewData.files" complete_result
v-if="viewData.files && viewData.files.length > 0"></file-preview>
<span v-else>暂无附件</span>
</template>
</van-cell>
</van-cell-group>
<van-cell-group title="电子发票" v-if="viewData.reimburseProject && viewData.reimburseProject !== 'UNION_REIMBURSE_PROJECT_1'">
<van-cell title="报销金额">{{ formatMoney(viewData.money) }}</van-cell>
<van-cell title="发票张数">{{ viewData.invoiceNumber }}</van-cell>
<van-cell title="发票明细列表">
<template #label>
<template v-if="viewData.invoiceDetails && viewData.invoiceDetails.length > 0">
<div style="margin-top: 8px; padding: 10px 12px; border: 1px solid #ebedf0; border-radius: 6px; background: #fafafa;" v-for="(item, index) in viewData.invoiceDetails" :key="index">
<div style="margin-top: 4px; color: #323233;">第{{ index + 1 }}张发票</div>
<div style="margin-top: 4px;">发票号码:{{ item.invoiceNo || '未填写' }}</div>
<div style="margin-top: 4px;">发票金额:{{ formatMoney(item.invoiceAmount) }}</div>
<div style="margin-top: 4px;">销售方信息名称:{{ item.sellerName || '未填写' }}</div>
<div style="margin-top: 4px;">项目名称:{{ item.itemName || '未填写' }}</div>
<div style="margin-top: 4px;" v-if="item.remark">备注:{{ item.remark }}</div>
<file-preview :files="item.invoiceFiles" complete_result
v-if="item.invoiceFiles && item.invoiceFiles.length > 0"></file-preview>
<div style="margin-top: 4px;" v-else>文件:未上传</div>
</div>
</template>
<van-empty description="暂无发票明细" v-else></van-empty>
</template>
</van-cell>
</van-cell-group>
<!-- <van-cell-group title="电子签名">-->
<!-- <van-cell title="签字">-->
<!-- <template #label>-->
<!-- <van-image :src="viewData.userSign"-->
<!-- style="width: 100%;height: 150px;"-->
<!-- v-if="viewData.userSign"></van-image>-->
<!-- <span v-else>暂无签名</span>-->
<!-- </template>-->
<!-- </van-cell>-->
<!-- </van-cell-group>-->
<template v-for="(task,index) in doneTasks">
<div class="process-title">
{{ task.displayName }}
@@ -61,7 +135,7 @@ const UNION_REIMBURSE_INFO = {
{{ task.ext.initiatorName}}({{task.ext.initiatorAccount}})
</van-cell>
<van-cell title="申请时间">
{{ task.finishTime}}
{{ formatCreateTime(task.finishTime) }}
</van-cell>
<van-cell title="办理结果">
<dict-tag :options="dict.type.PROCESS_TASK_SUBMIT_TYPE"
@@ -73,7 +147,7 @@ const UNION_REIMBURSE_INFO = {
{{ task.taskFormData.userName}}({{task.taskFormData.loginName}})
</van-cell>
<van-cell title="办理时间">
{{ task.finishTime}}
{{ formatCreateTime(task.finishTime) }}
</van-cell>
<van-cell title="办理结果">
<dict-tag :options="dict.type.PROCESS_TASK_SUBMIT_TYPE"
@@ -118,6 +192,22 @@ const UNION_REIMBURSE_INFO = {
onClose() {
this.visible = false
},
formatCreateTime(value) {
return value && this.$moment(value).isValid() ? this.$moment(value).format("YYYY-MM-DD HH:mm:ss") : ""
},
formatDateText(value) {
return value && this.$moment(value).isValid() ? this.$moment(value).format("YYYY-MM-DD") : ""
},
formatMoney(value) {
if (value === null || value === undefined || value === "") {
return ""
}
const numberValue = Number(value)
return isNaN(numberValue) ? value : numberValue.toFixed(2)
},
isCondolenceType(typeId) {
return this.viewData.condolenceTypeId === typeId || this.viewData.condolenceType === typeId
},
// 获取申请信息
getInfo() {
this.$axios.post("/platform/unionReimburse/apply/info", { id: this.row.id }).then((res) => {
@@ -2,6 +2,19 @@
layout("/layouts/platform_h5.html"){
#-->
<style>
.state-primary {
color: #409eff;
}
.state-success {
color: #67c23a;
}
.state-danger {
color: #f56c6c;
}
</style>
<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">
@@ -14,37 +27,31 @@ layout("/layouts/platform_h5.html"){
<table-list api="/platform/unionReimburse/mine/pageData" :page_form.sync="pageForm" ref="tableListRef"
@ready="doSearch" >
<template v-slot="{index,row}">
<table-column label="经办人">{{row.userName}}</table-column>
<table-column label="经办人工号">{{row.loginName}}</table-column>
<table-column label="姓名">{{row.userName}}</table-column>
<table-column label="所属工会">{{row.unionName}}</table-column>
<table-column label="所属单位">{{row.unitName}}</table-column>
<table-column label="证明人">{{row.certifierUserName}}({{row.certifierLoginName}})</table-column>
<table-column label="报销类别">
<dict-tag :options="dict.type.UNION_REIMBURSE_TYPE"
:value="row.reimburseType">
</dict-tag>
<table-column label="申请时间">{{formatCreateTime(row.createTime)}}</table-column>
<table-column label="报销项目">{{getReimburseProjectName(row.reimburseProject)}}</table-column>
<table-column label="备注">{{getRemarkText(row)}}</table-column>
<table-column label="申请状态">
<span :class="getStateClass(row.stateId)">{{getStateName(row.stateId)}}</span>
</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>
<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">
<div class="action-btn" @click="onEdit(row)" v-if="row.stateId == 1 || row.stateId == 5">
<i class="fa fa-edit"></i>
<span>编辑</span>
</div>
<div class="action-btn delete" v-if="row.canRevoke" @click="onRevoke(row)">
<div class="action-btn delete" v-if="row.stateId == 2" @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">
<div class="action-btn delete" @click="onDelete(row)" v-if="row.stateId == 1">
<i class="fa fa-trash"></i>
<span>删除</span>
</div>
@@ -59,7 +66,7 @@ layout("/layouts/platform_h5.html"){
const vue = new Vue({
el: "#app",
store,
dicts: ["UNION_REIMBURSE_TYPE","UNION_REIMBURSE_PROJECT"],
dicts: ["UNION_REIMBURSE_PROJECT"],
components: {
"union-reimburse-info":UNION_REIMBURSE_INFO
},
@@ -78,6 +85,58 @@ layout("/layouts/platform_h5.html"){
}
},
methods: {
// 手机端列表的报销项目、备注、状态文案与 PC 端 mine 列表保持一致。
getReimburseProjectName(reimburseProject) {
if (reimburseProject === "UNION_REIMBURSE_PROJECT_1") {
return "慰问"
}
if (reimburseProject === "UNION_REIMBURSE_PROJECT_2") {
return "文体活动"
}
if (reimburseProject === "UNION_REIMBURSE_PROJECT_3") {
return "日常活动"
}
if (reimburseProject === "UNION_REIMBURSE_PROJECT_4") {
return "专项活动"
}
return reimburseProject || ""
},
getRemarkText(row) {
if (row.reimburseProject === "UNION_REIMBURSE_PROJECT_1") {
return "被慰问人:" + (row.condolenceUserName || "")
}
return "活动名称:" + (row.activityName || "")
},
getStateName(stateId) {
if (stateId == 1) {
return "待提交"
}
if (stateId == 2) {
return "待审核确认"
}
if (stateId == 3) {
return "报销成功"
}
if (stateId == 4) {
return "拒绝"
}
if (stateId == 5) {
return "退回"
}
return stateId || ""
},
getStateClass(stateId) {
if (stateId == 3) {
return "state-success"
}
if (stateId == 4) {
return "state-danger"
}
return "state-primary"
},
formatCreateTime(value) {
return value && this.$moment(value).isValid() ? this.$moment(value).format("YYYY-MM-DD HH:mm:ss") : ""
},
onView(row) {
this.showApprovalForm = false
this.$refs.unionReimburseInfoRef.onOpen(row)
@@ -93,7 +152,7 @@ layout("/layouts/platform_h5.html"){
message: "您确定要撤销申请吗?"
})
.then(() => {
this.$axios.post("/flow/common/revokeTask", {taskId: row.startTaskId}).then((resp) => {
this.$axios.post("/platform/unionReimburse/mine/revokeTask", {id: row.id}).then((resp) => {
this.$toast.success(resp.msg)
this.doSearch()
})
@@ -2,6 +2,19 @@
layout("/layouts/platform_h5.html"){
#-->
<style>
.state-primary {
color: #409eff;
}
.state-success {
color: #67c23a;
}
.state-danger {
color: #f56c6c;
}
</style>
<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">
@@ -24,28 +37,15 @@ layout("/layouts/platform_h5.html"){
<table-list api="/platform/unionReimburse/review/pageData" :page_form.sync="pageForm" ref="tableListRef"
@ready="doSearch">
<template v-slot="{index,row}">
<table-column label="经办人">{{row.userName}}</table-column>
<table-column label="经办人工号">{{row.loginName}}</table-column>
<table-column label="姓名">{{row.userName}}</table-column>
<table-column label="所属工会">{{row.unionName}}</table-column>
<table-column label="所属单位">{{row.unitName}}</table-column>
<table-column label="证明人">{{row.certifierUserName}}({{row.certifierLoginName}})</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>
<table-column label="申请时间">{{formatCreateTime(row.createTime)}}</table-column>
<table-column label="报销项目">{{getReimburseProjectName(row.reimburseProject)}}</table-column>
<table-column label="备注">{{getRemarkText(row)}}</table-column>
<table-column label="申请状态">
<span v-if="row.stateId == 1" style="color: #409eff;">待提交</span>
<span v-else-if="row.stateId == 2" style="color: #409eff;">待审核确认</span>
<span v-else-if="row.stateId == 3" style="color: #67c23a;">报销成功</span>
<span v-else-if="row.stateId == 4" style="color: #f56c6c;">拒绝</span>
<span v-else-if="row.stateId == 5" style="color: #409eff;">退回</span>
<span v-else>{{row.stateId}}</span>
<span :class="getStateClass(row.stateId)">{{getStateName(row.stateId)}}</span>
</table-column>
</template>
<template #actions="{index,row}">
@@ -79,14 +79,14 @@ layout("/layouts/platform_h5.html"){
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="" required
v-model="formData.reviewOpinion" :rules="[{ required: true,message:'请签名' }]">
<template #input>
<h5-signature v-model="formData.tf_userSign" slot="input"></h5-signature>
</template>
</van-field>
</van-cell-group>
<!-- <van-cell-group title="电子签名" class="form-section">-->
<!-- <van-field class="more-text" name="tf_userSign" label="" required-->
<!-- v-model="formData.reviewOpinion" :rules="[{ required: true,message:'请签名' }]">-->
<!-- <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 type="danger" @click="handleTaskAction(5)">退回到发起人</van-button>
<van-button type="danger" @click="handleTaskAction(4)">拒绝申请</van-button>
@@ -124,6 +124,58 @@ layout("/layouts/platform_h5.html"){
}
},
methods: {
// 手机端审核列表字段展示与我的报销列表保持一致。
getReimburseProjectName(reimburseProject) {
if (reimburseProject === "UNION_REIMBURSE_PROJECT_1") {
return "慰问"
}
if (reimburseProject === "UNION_REIMBURSE_PROJECT_2") {
return "文体活动"
}
if (reimburseProject === "UNION_REIMBURSE_PROJECT_3") {
return "日常活动"
}
if (reimburseProject === "UNION_REIMBURSE_PROJECT_4") {
return "专项活动"
}
return reimburseProject || ""
},
getRemarkText(row) {
if (row.reimburseProject === "UNION_REIMBURSE_PROJECT_1") {
return "被慰问人:" + (row.condolenceUserName || "")
}
return "活动名称:" + (row.activityName || "")
},
getStateName(stateId) {
if (stateId == 1) {
return "待提交"
}
if (stateId == 2) {
return "待审核确认"
}
if (stateId == 3) {
return "报销成功"
}
if (stateId == 4) {
return "拒绝"
}
if (stateId == 5) {
return "退回"
}
return stateId || ""
},
getStateClass(stateId) {
if (stateId == 3) {
return "state-success"
}
if (stateId == 4) {
return "state-danger"
}
return "state-primary"
},
formatCreateTime(value) {
return value && this.$moment(value).isValid() ? this.$moment(value).format("YYYY-MM-DD HH:mm:ss") : ""
},
handleTaskAction(val) {
this.$refs.formRef.validate().then(() => {
this.$dialog.confirm({
@@ -131,10 +183,7 @@ layout("/layouts/platform_h5.html"){
message: "您确定要提交吗?"
}).then(() => {
this.$axios.post("/platform/unionReimburse/review/reviewTask", {
data: JSON.stringify({
id: this.formData.id,
reviewOpinion: this.formData.reviewOpinion
}),
data: JSON.stringify(Object.assign({}, this.formData)),
submitType: val
}).then(res => {
if (res.code === 0) {
@@ -155,8 +204,7 @@ layout("/layouts/platform_h5.html"){
this.showApprovalForm = true
this.formData = {
id: row.id,
reviewOpinion: null,
tf_userSign: null
reviewOpinion: "通过"
}
this.$refs.unionReimburseInfoRef.onOpen(row)
},