工会报销导出以及发票填报修改

This commit is contained in:
2026-09-29 14:16:00 +08:00
parent 5c0f593c08
commit d94a6ed014
18 changed files with 1959 additions and 1073 deletions
File diff suppressed because it is too large Load Diff
@@ -13,24 +13,24 @@ layout("/layouts/platform.html"){
<el-input placeholder="请输入姓名或工号" clearable v-model="pageForm.searchKeyword"></el-input>
</search-item>
<search-item label="所属工会" v-if="isAdmin">
<el-select v-model="pageForm.unionId" @change="doSearch" style="width: 100%"
placeholder="请选择所属工会" clearable>
<el-option v-for="item in unionOptions"
:value="item.id"
:key="item.id"
:label="item.name"
></el-option>
</el-select>
<el-select v-model="pageForm.unionId" @change="doSearch" style="width: 100%"
placeholder="请选择所属工会" clearable>
<el-option v-for="item in unionOptions"
:value="item.id"
:key="item.id"
:label="item.name"
></el-option>
</el-select>
</search-item>
<search-item label="所属单位" v-if="isAdmin">
<el-select v-model="pageForm.unitId" @change="doSearch" style="width: 100%"
placeholder="请选择所属单位" clearable>
<el-option v-for="item in unitOptions"
:value="item.id"
:key="item.id"
:label="item.name"
></el-option>
</el-select>
<el-select v-model="pageForm.unitId" @change="doSearch" style="width: 100%"
placeholder="请选择所属单位" clearable>
<el-option v-for="item in unitOptions"
:value="item.id"
:key="item.id"
:label="item.name"
></el-option>
</el-select>
</search-item>
<search-item label="报销项目">
<el-select v-model="pageForm.reimburseProject" @change="doSearch" style="width: 100%"
@@ -95,9 +95,13 @@ layout("/layouts/platform.html"){
<el-table-column label="操作" fixed="right" width="350px">
<template slot-scope="{row}">
<el-button @click="onView(row)" size="mini" type="primary">查看</el-button>
<el-button v-if="isAdmin && row.stateId == 3" @click="openEdit(row)" size="mini" type="primary">实际金额</el-button>
<el-button v-if="row.stateId == 3" @click="doPrint(row)" size="mini" type="primary">打印</el-button>
<el-button v-if="$auth.hasRole('SYSADMIN')" @click="onDelete(row.id)" size="mini" type="danger">删除</el-button>
<el-button v-if="isAdmin && row.stateId == 3" @click="openEdit(row)" size="mini" type="primary">
实际金额
</el-button>
<el-button @click="doPrint(row)" size="mini" type="primary">打印</el-button>
<el-button v-if="$auth.hasRole('SYSADMIN')" @click="onDelete(row.id)" size="mini" type="danger">
删除
</el-button>
</template>
</el-table-column>
</el-table>
@@ -124,13 +128,12 @@ layout("/layouts/platform.html"){
</div>
<script nonce="${cspNonce!}">
<!--#include('../info.js'){}#-->
new Vue({
el: "#app",
store,
dicts: ["UNION_REIMBURSE_TYPE","UNION_REIMBURSE_PROJECT"],
dicts: ["UNION_REIMBURSE_TYPE", "UNION_REIMBURSE_PROJECT"],
//分页数据
mixins: [initTableMixins],
components: {
@@ -149,8 +152,8 @@ layout("/layouts/platform.html"){
},
editFormRules: {
realMoney: [
{ required: true, message: '请输入实际报销金额', trigger: 'blur' },
{ pattern: /^([0-9]+)(\.[0-9]{1,2})?$/, message: '请输入正确的金额格式', trigger: 'blur' }
{required: true, message: '请输入实际报销金额', trigger: 'blur'},
{pattern: /^([0-9]+)(\.[0-9]{1,2})?$/, message: '请输入正确的金额格式', trigger: 'blur'}
]
}
}
@@ -204,7 +207,7 @@ layout("/layouts/platform.html"){
}
},
onView(row) {
this.$refs.guava.edit(()=>{
this.$refs.guava.edit(() => {
this.showApprovalForm = false
this.$refs.unionReimburseInfoRef.onOpen(row)
})
@@ -266,11 +269,8 @@ layout("/layouts/platform.html"){
window.open('/platform/unionReimburse/collect/exportSkr?year=' + year + "&unionId=" + unionId + '&unitId=' + unitId + "&reimburseProject=" + reimburseProject)
},
doPrint(row) {
if (row.reimburseProject != "UNION_REIMBURSE_PROJECT_1") {
window.location.href = "/platform/unionReimburse/mine/ActExport?id=" + (row.id || '') + "&Print=true"
} else {
window.location.href = "/platform/unionReimburse/mine/ConExport?id=" + (row.id || '') + "&Print=true"
}
// 所有状态均可下载审批单 PDF,复用公共下载的 POST 请求、错误提示和 loading 收尾。
this.$downLoad("/platform/unionReimburse/collect/exportPdf", {id: row.id})
},
onExport() {
this.$downLoad('/platform/unionReimburse/collect/onExport', this.pageForm)
@@ -130,38 +130,38 @@ const unionReimburseInfo = {
<span>{{ viewData.condolenceTime | dateFormat }}</span>
</el-descriptions-item>
<el-descriptions-item label="结婚时间" v-if="viewData.condolenceTypeId === 'cf4ce7af322d464f8f86d818fcc00203'">
<el-descriptions-item label="结婚时间" v-if="condolenceTypeCode === 'A'">
<span>{{ viewData.marryTime | dateFormat }}</span>
</el-descriptions-item>
<el-descriptions-item label="生育时间" v-if="viewData.condolenceTypeId === 'c90cb10dce6542e99ae271bee6fe8cc0'">
<el-descriptions-item label="生育时间" v-if="condolenceTypeCode === 'D'">
<span>{{ viewData.fertilityTime | dateFormat }}</span>
</el-descriptions-item>
<el-descriptions-item label="住院病由" v-if="viewData.condolenceTypeId === '4e316737e71047e0b01aea78524c1416'">
<el-descriptions-item label="住院病由" v-if="condolenceTypeCode === 'E'">
<span>{{ viewData.hospitalCausation }}</span>
</el-descriptions-item>
<el-descriptions-item label="住院时间" v-if="viewData.condolenceTypeId === '4e316737e71047e0b01aea78524c1416'">
<el-descriptions-item label="住院时间" v-if="condolenceTypeCode === 'E'">
<span v-if="viewData.hospitalizationStartTime && viewData.hospitalizationEndTime">
{{ $moment(viewData.hospitalizationStartTime).format('YYYY-MM-DD') }} 至 {{ $moment(viewData.hospitalizationEndTime).format('YYYY-MM-DD') }}
</span>
<span v-else>暂无住院时间</span>
</el-descriptions-item>
<el-descriptions-item label="入住医院" v-if="viewData.condolenceTypeId === '4e316737e71047e0b01aea78524c1416'">
<el-descriptions-item label="入住医院" v-if="condolenceTypeCode === 'E'">
<span>{{ viewData.hospital }}</span>
</el-descriptions-item>
<el-descriptions-item label="当年次数" v-if="viewData.condolenceTypeId === '4e316737e71047e0b01aea78524c1416'">
<el-descriptions-item label="当年次数" v-if="condolenceTypeCode === 'E'">
<span>{{ viewData.hospitalCount }}</span>
</el-descriptions-item>
<el-descriptions-item label="去逝时间" v-if="viewData.condolenceTypeId === '60f03a87b62b4823855814afdbf5672a'">
<el-descriptions-item label="去逝时间" v-if="condolenceTypeCode === 'G' || condolenceTypeCode === 'H'">
<span>{{ viewData.deathTime | dateFormat }}</span>
</el-descriptions-item>
<el-descriptions-item label="与被慰问人关系" v-if="viewData.condolenceTypeId === '60f03a87b62b4823855814afdbf5672a'">
<el-descriptions-item label="与被慰问人关系" v-if="condolenceTypeCode === 'H'">
<span>{{ viewData.condolenceRelationship }}</span>
</el-descriptions-item>
@@ -174,10 +174,6 @@ const unionReimburseInfo = {
<span>{{ viewData.paymentNotes }}</span>
</el-descriptions-item>
<el-descriptions-item label="备注" :span="3" v-if="viewData.reimburseProject === 'UNION_REIMBURSE_PROJECT_1'">
<span>{{ viewData.notes }}</span>
</el-descriptions-item>
<el-descriptions-item label="附件" :span="3">
<file-preview v-if="viewData.files && viewData.files.length > 0"
:files="viewData.files"
@@ -204,15 +200,6 @@ const unionReimburseInfo = {
<el-col :span="24">
<el-form-item label="支付内容" label-width="100px">
<el-input :autosize="{ minRows: 4, maxRows: 8}"
:value="viewData.paymentNotes"
readonly
type="textarea"></el-input>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="备注" label-width="100px">
<el-input :autosize="{ minRows: 3, maxRows: 6}"
:value="viewData.notes"
readonly
type="textarea"></el-input>
@@ -240,7 +227,17 @@ const unionReimburseInfo = {
</template>
</el-table-column>
<el-table-column label="发票号码" min-width="140" prop="invoiceNo"></el-table-column>
<el-table-column align="right" label="发票金额" min-width="110">
<el-table-column align="right" label="税前金额" min-width="110">
<template slot-scope="scope">
<span>{{ scope.row.amountWithoutTax == null ? '-' : formatMoney(scope.row.amountWithoutTax) }}</span>
</template>
</el-table-column>
<el-table-column align="right" label="税额" min-width="100">
<template slot-scope="scope">
<span>{{ scope.row.taxAmount == null ? '-' : formatMoney(scope.row.taxAmount) }}</span>
</template>
</el-table-column>
<el-table-column align="right" label="价税合计" min-width="110">
<template slot-scope="scope">
<span>{{ formatMoney(scope.row.invoiceAmount) }}</span>
</template>
@@ -299,6 +296,11 @@ const unionReimburseInfo = {
}
},
computed: {
// 详情接口按关联类型返回业务编码,避免不同环境的类型 ID 影响字段显示。
condolenceTypeCode() {
return this.viewData.reimburseProject === "UNION_REIMBURSE_PROJECT_1"
? (this.viewData.condolenceTypeCode || "") : ""
},
showInvoiceTab() {
return !!this.viewData.reimburseProject
},
@@ -86,10 +86,9 @@ layout("/layouts/platform.html"){
<el-table-column label="操作" fixed="right" width="300px">
<template slot-scope="{row}">
<el-button @click="onView(row)" size="mini" type="primary">查看</el-button>
<el-button v-if="[2, 3, 4, 5].includes(Number(row.stateId))" @click="doExport(row)" size="mini" type="primary">导出</el-button>
<el-button v-if="row.stateId == 1 || row.stateId == 5" @click="onEdit(row)" size="mini" type="primary">编辑</el-button>
<el-button v-if="row.stateId == 2" @click="onRevoke(row.id)" size="mini" type="danger">撤回</el-button>
<el-button v-if="row.stateId == 3" @click="doExport(row)" size="mini" type="primary">导出报销表</el-button>
<el-button v-if="row.stateId == 3" @click="doPrint(row)" size="mini" type="primary">打印</el-button>
<el-button v-if="row.stateId == 1" @click="onDelete(row.id)" size="mini" type="danger">删除</el-button>
</template>
</el-table-column>
@@ -171,19 +170,8 @@ layout("/layouts/platform.html"){
},
doExport(row) {
if (row.reimburseProject != "UNION_REIMBURSE_PROJECT_1") {
window.location.href = "/platform/unionReimburse/mine/ActExport?id=" + (row.id || '')
} else {
window.location.href = "/platform/unionReimburse/mine/ConExport?id=" + (row.id || '')
}
},
doPrint(row) {
if (row.reimburseProject != "UNION_REIMBURSE_PROJECT_1") {
window.location.href = "/platform/unionReimburse/mine/ActExport?id=" + (row.id || '') + "&Print=true"
} else {
window.location.href = "/platform/unionReimburse/mine/ConExport?id=" + (row.id || '') + "&Print=true"
}
// 复用公共下载的POST请求、错误提示和loading收尾,由后端选择对应审批单模板。
this.$downLoad("/platform/unionReimburse/mine/exportPdf", {id: row.id})
}
},
File diff suppressed because it is too large Load Diff
@@ -116,15 +116,15 @@ const UNION_REIMBURSE_INFO = {
<div class="union-info-label">慰问时间</div>
<div class="union-info-value">{{ formatDateText(viewData.condolenceTime) }}</div>
</div>
<div class="union-info-row" v-if="isCondolenceType('cf4ce7af322d464f8f86d818fcc00203')">
<div class="union-info-row" v-if="condolenceTypeCode === 'A'">
<div class="union-info-label">结婚时间</div>
<div class="union-info-value">{{ formatDateText(viewData.marryTime) }}</div>
</div>
<div class="union-info-row" v-if="isCondolenceType('c90cb10dce6542e99ae271bee6fe8cc0')">
<div class="union-info-row" v-if="condolenceTypeCode === 'D'">
<div class="union-info-label">生育时间</div>
<div class="union-info-value">{{ formatDateText(viewData.fertilityTime) }}</div>
</div>
<template v-if="isCondolenceType('4e316737e71047e0b01aea78524c1416')">
<template v-if="condolenceTypeCode === 'E'">
<div class="union-info-row">
<div class="union-info-label">住院病由</div>
<div class="union-info-value">{{ viewData.hospitalCausation }}</div>
@@ -146,12 +146,12 @@ const UNION_REIMBURSE_INFO = {
<div class="union-info-value">{{ viewData.hospitalCount }}</div>
</div>
</template>
<template v-if="isCondolenceType('60f03a87b62b4823855814afdbf5672a')">
<template v-if="condolenceTypeCode === 'G' || condolenceTypeCode === 'H'">
<div class="union-info-row">
<div class="union-info-label">去逝时间</div>
<div class="union-info-value">{{ formatDateText(viewData.deathTime) }}</div>
</div>
<div class="union-info-row">
<div class="union-info-row" v-if="condolenceTypeCode === 'H'">
<div class="union-info-label">与被慰问人关系</div>
<div class="union-info-value">{{ viewData.condolenceRelationship }}</div>
</div>
@@ -164,10 +164,6 @@ const UNION_REIMBURSE_INFO = {
<div class="union-info-label">报销事由</div>
<div class="union-info-value">{{ viewData.paymentNotes }}</div>
</div>
<div class="union-info-row">
<div class="union-info-label">备注</div>
<div class="union-info-value">{{ viewData.notes }}</div>
</div>
</div>
<div class="union-info-section" v-if="viewData.reimburseProject && viewData.reimburseProject !== 'UNION_REIMBURSE_PROJECT_1'">
@@ -188,10 +184,6 @@ const UNION_REIMBURSE_INFO = {
<div class="union-info-label">活动时间</div>
<div class="union-info-value">{{ formatDateText(viewData.activityTime) }}</div>
</div>
<div class="union-info-row">
<div class="union-info-label">支付内容</div>
<div class="union-info-value">{{ viewData.paymentNotes }}</div>
</div>
</div>
<div class="union-info-section">
@@ -212,6 +204,10 @@ const UNION_REIMBURSE_INFO = {
<div class="union-info-label">发票张数</div>
<div class="union-info-value">{{ viewData.invoiceNumber }}</div>
</div>
<div class="union-info-row">
<div class="union-info-label">支付内容</div>
<div class="union-info-value">{{ viewData.notes }}</div>
</div>
<div class="union-invoice-subtitle">发票明细表</div>
<div class="union-invoice-card-list" v-if="viewData.invoiceDetails && viewData.invoiceDetails.length > 0">
<div class="union-invoice-card" v-for="(item, index) in viewData.invoiceDetails" :key="index">
@@ -221,7 +217,15 @@ const UNION_REIMBURSE_INFO = {
<div class="union-info-value">{{ item.invoiceNo || '未填写' }}</div>
</div>
<div class="union-info-row">
<div class="union-info-label">发票金额</div>
<div class="union-info-label">税前金额</div>
<div class="union-info-value">{{ item.amountWithoutTax == null ? '未识别' : formatMoney(item.amountWithoutTax) }}</div>
</div>
<div class="union-info-row">
<div class="union-info-label">税额</div>
<div class="union-info-value">{{ item.taxAmount == null ? '未识别' : formatMoney(item.taxAmount) }}</div>
</div>
<div class="union-info-row">
<div class="union-info-label">价税合计</div>
<div class="union-info-value">{{ formatMoney(item.invoiceAmount) }}</div>
</div>
<div class="union-info-row">
@@ -333,6 +337,11 @@ const UNION_REIMBURSE_INFO = {
}
},
computed: {
// 详情接口按关联类型返回业务编码,避免不同环境的类型 ID 影响字段显示。
condolenceTypeCode() {
return this.viewData.reimburseProject === "UNION_REIMBURSE_PROJECT_1"
? (this.viewData.condolenceTypeCode || "") : ""
},
paymentInfoRows() {
return this.viewData.paymentDetails || []
}
@@ -406,9 +415,6 @@ const UNION_REIMBURSE_INFO = {
const numberValue = Number(value)
return isNaN(numberValue) ? value : numberValue.toFixed(2)
},
isCondolenceType(typeId) {
return this.viewData.condolenceTypeId === typeId || this.viewData.condolenceType === typeId
},
getPaymentWayText(paymentWay) {
const matchedPaymentWay = this.dict.type.UNION_REIMBURSE_PAYMENT_WAY.find(item => item.code === paymentWay)
return matchedPaymentWay ? matchedPaymentWay.name : ""