Merge remote-tracking branch 'origin/main'

This commit is contained in:
2026-04-30 09:23:12 +08:00
9 changed files with 809 additions and 328 deletions
@@ -38,7 +38,7 @@ layout("/layouts/platform.html"){
<div class="search-item-label">活动项目</div>
<div class="search-item-option">
<el-select v-model="pageForm.eventId" placeholder="请选择活动项目" filterable clearable
style="width: 100%" @change="doSearchS">
style="width: 100%" @change="doSearch">
<el-option
v-for="item in events"
:key="item.eventId"
@@ -49,6 +49,51 @@ layout("/layouts/platform.html"){
</div>
</div>
<div class="search-item">
<div class="search-item-label">男子女子</div>
<div class="search-item-option">
<el-select v-model="pageForm.isMenWomen" placeholder="请选择男子女子" clearable
style="width: 100%" @change="doSearch">
<el-option
v-for="item in menWomenList"
:key="item.id"
:label="item.name"
:value="item.id">
</el-option>
</el-select>
</div>
</div>
<div class="search-item">
<div class="search-item-label">项目类型</div>
<div class="search-item-option">
<el-select v-model="pageForm.projectType" placeholder="请选择项目类型" clearable
style="width: 100%" @change="doSearch">
<el-option
v-for="item in projectTypeList"
:key="item.id"
:label="item.name"
:value="item.id">
</el-option>
</el-select>
</div>
</div>
<div class="search-item">
<div class="search-item-label">比赛组别</div>
<div class="search-item-option">
<el-select v-model="pageForm.competitionCategory" placeholder="请选择比赛组别" filterable clearable
style="width: 100%" @change="doSearch">
<el-option
v-for="item in groupList"
:key="item.id"
:label="item.name"
:value="item.id">
</el-option>
</el-select>
</div>
</div>
</div>
</el-card>
@@ -125,7 +170,7 @@ layout("/layouts/platform.html"){
</template>
<template #edit_func>
<el-button type="primary" @click="openAdd" v-if="awardsMode==1">临时获奖人员添加</el-button>
<el-button type="primary" @click="openAdd">临时获奖人员添加</el-button>
<el-button type="primary" @click="doAdd">确 定</el-button>
</template>
@@ -431,11 +476,14 @@ layout("/layouts/platform.html"){
return {
userOptions: [],
groupList: [
{value: 1, name: "甲组"},
{value: 2, name: "乙组"},
{value: 3, name: "丙组"},
{value: 4, name: "丁组"}
groupList: [],
menWomenList: [
{id: 1, name: "男子"},
{id: 2, name: "女子"}
],
projectTypeList: [
{id: "1", name: "单项"},
{id: "2", name: "团体"}
],
dialogVisible: false,
viewData: [],
@@ -465,7 +513,9 @@ layout("/layouts/platform.html"){
{name: "第八名", id: 8}],
sexList: [{sex: "男", id: 1}, {sex: "女", id: 2}],
pageForm: {
isMenWomen: [],
isMenWomen: "",
projectType: "",
competitionCategory: "",
year: new Date().getFullYear() + "",
},
formRules: {
@@ -511,7 +561,7 @@ layout("/layouts/platform.html"){
},
async unitChange() {
const unit = this.unitOptions.find(v => v.id === this.formData.unitId)
this.$set(this.formData, "unionId", unit.id)
this.$set(this.formData, "unionId", unit.unionId)
this.$set(this.formData, "unionname", unit.unionName)
this.$set(this.formData, "unitname", unit.name)
},
@@ -545,8 +595,14 @@ layout("/layouts/platform.html"){
pageForm.identity = JSON.stringify(this.formData.identity)
const resp = await this.$axios.post(loc() + "/doAddUser", pageForm)
if (resp.code === 0) {
await this.userChange()
this.userDetailsChange()
if (this.awardsMode == 2) {
this.unionList = await this.getUnionList({activityId: this.activityId, eventId: this.eventId})
this.userData = await this.getUnionData({activityId: this.activityId, eventId: this.eventId})
await this.unionDetailsChange()
} else {
await this.userChange()
this.userDetailsChange()
}
this.dialogVisible = false
} else {
this.notifyWarning(resp.msg)
@@ -554,21 +610,24 @@ layout("/layouts/platform.html"){
}
})
},
async yearChange() {
yearChange() {
this.activityList = []
this.events = []
this.$set(this.pageForm, "activityId", "")
this.$set(this.pageForm, "eventId", "")
const {data} = await this.$axios.post("/platform/activity/score/statistics/getActivitys", {year: this.pageForm.year})
this.activityList = data
if (data.length > 0) {
this.pageForm.activityId = this.activityList[0].id
}
await this.doSearchS()
this.$axios.post("/platform/activity/score/statistics/getActivitys", {year: this.pageForm.year}).then((res) => {
const data = res.data
this.activityList = data
if (data.length > 0) {
this.pageForm.activityId = this.activityList[0].id
}
this.doSearchS()
})
},
async changeActivit() {
const resp = await this.$axios.post("/platform/activity/apply/getEvents", {activityId: this.pageForm.activityId})
this.events = resp.data
changeActivit() {
return this.$axios.post("/platform/activity/apply/getEvents", {activityId: this.pageForm.activityId}).then((resp) => {
this.events = resp.data
})
},
async doAdd() {
@@ -802,25 +861,34 @@ layout("/layouts/platform.html"){
},
async getActivitys() {
const {data} = await this.$axios.post("/platform/activity/score/statistics/getActivitys", {year: this.pageForm.year})
return data;
getActivitys() {
return this.$axios.post("/platform/activity/score/statistics/getActivitys", {year: this.pageForm.year}).then((res) => {
return res.data
})
},
async doSearchS() {
this.doSearch()
await this.changeActivit()
focusGroup() {
this.$axios.post("/platform/activity/basic/event/focusGroup").then((resp) => {
if (resp.code === 0) {
this.groupList = resp.data
} else {
this.notifyWarning(resp.msg)
}
})
},
doSearchS() {
this.$set(this.pageForm, "eventId", "")
this.changeActivit().then(() => {
this.doSearch()
})
},
doSearch() {
this.pageForm.pageNumber = 1
this.pageData()
},
pageData() {
this.tabLoading = true
this.tableLoading = true
const pageForm = clone(this.pageForm)
pageForm.isMenWomen = JSON.stringify(pageForm.isMenWomen)
this.$axios.post("/platform/activity/results/input/pageData", pageForm).then(resp => {
this.tabLoading = false
if (resp.code == 0) {
this.tableData = resp.data.list;
this.pageForm.totalCount = resp.data.totalCount;
@@ -830,20 +898,16 @@ layout("/layouts/platform.html"){
type: 'error'
});
}
}).finally(() => {
this.tableLoading = false
})
},
},
async created() {
created() {
this.focusGroup()
this.yearChange()
// this.pageData()
this.activityList = await this.getActivitys()
if (this.activityList.length) {
this.pageForm.activityId = this.activityList[0].id
}
await this.changeActivit()
this.pageData()
}
})
</script>
@@ -51,8 +51,66 @@ layout("/layouts/platform.html"){
<el-tabs class="reimbursement-tabs" v-model="activeTabName">
<el-tab-pane label="申请基本信息" name="basic">
<el-descriptions :column="2" border>
<el-descriptions-item label="经办人">{{formData.userName}}</el-descriptions-item>
<el-descriptions-item label="经费来源" span="2">
<el-form-item label="经费来源" prop="reimburseFundSource">
<el-radio-group v-model="formData.reimburseFundSource" size="medium" @change="selectFundSource">
<el-radio v-if="$auth.hasPermission('unionReimburse.xgh')"
label="UNION_REIMBURSE_FUND_SOURCE_1"
border>校工会经费</el-radio>
<el-radio v-if="$auth.hasPermission('unionReimburse.fgh')"
label="UNION_REIMBURSE_FUND_SOURCE_2"
border>分工会经费</el-radio>
<el-radio v-if="$auth.hasPermission('unionReimburse.club')"
label="UNION_REIMBURSE_FUND_SOURCE_3"
border>协会经费</el-radio>
</el-radio-group>
<!-- <span class="invoice-summary-tip" v-if="fundBalanceText">余额:{{fundBalanceText}}</span>-->
</el-form-item>
</el-descriptions-item>
<el-descriptions-item label="报销项目" :span="2">
<el-form-item label="报销项目" prop="reimburseProject">
<el-radio-group v-model="formData.reimburseProject" size="medium" @change="handleReimburseProjectChange">
<el-radio :label="item.code" border v-for="item in reimburseProjectList">
{{item.name}}
</el-radio>
</el-radio-group>
</el-form-item>
</el-descriptions-item>
<el-descriptions-item label="支付方式">
<el-form-item label="支付方式" prop="paymentWay">
<el-radio-group v-model="formData.paymentWay" size="medium">
<el-radio :label="item.code" border v-for="item in dict.type.UNION_REIMBURSE_PAYMENT_WAY">
{{item.name}}
</el-radio>
</el-radio-group>
</el-form-item>
</el-descriptions-item>
<el-descriptions-item label="工号">{{formData.loginName}}</el-descriptions-item>
<el-descriptions-item label="经办人">{{formData.userName}}</el-descriptions-item>
<el-descriptions-item label="所属协会" v-if="formData.reimburseFundSource === 'UNION_REIMBURSE_FUND_SOURCE_3'">
<el-form-item label="所属协会" prop="clubId">
<el-select clearable
placeholder="请选择协会"
style="width: 100%;"
v-model="formData.clubId"
@change="clubChange">
<el-option
:key="item.id"
:label="item.clubName"
:value="item.id"
v-for="item in clubOptions">
</el-option>
</el-select>
</el-form-item>
</el-descriptions-item>
<el-descriptions-item label="余额" v-if="formData.reimburseFundSource">
<el-form-item label="余额">
<el-input :value="fundBalanceText" readonly></el-input>
</el-form-item>
</el-descriptions-item>
<!-- <el-descriptions-item label="报销类别">-->
<!-- <el-form-item label="报销类别" prop="reimburseType">-->
<!-- <el-radio-group v-model="formData.reimburseType" size="medium">-->
@@ -62,24 +120,8 @@ layout("/layouts/platform.html"){
<!-- </el-radio-group>-->
<!-- </el-form-item>-->
<!-- </el-descriptions-item>-->
<el-descriptions-item label="报销项目" span="2">
<el-form-item label="报销项目" prop="reimburseProject">
<el-radio-group v-model="formData.reimburseProject" size="medium" @change="handleReimburseProjectChange">
<el-radio :label="item.code" border v-for="item in reimburseProjectList">
{{item.name}}
</el-radio>
</el-radio-group>
</el-form-item>
</el-descriptions-item>
<el-descriptions-item label="支付方式">
<el-form-item label="支付方式" prop="paymentWay">
<el-radio-group v-model="formData.paymentWay" size="medium">
<el-radio :label="item.code" border v-for="item in dict.type.UNION_REIMBURSE_PAYMENT_WAY">
{{item.name}}
</el-radio>
</el-radio-group>
</el-form-item>
</el-descriptions-item>
<!-- <el-descriptions-item label="报销经费来源" span="2">
@@ -304,15 +346,6 @@ layout("/layouts/platform.html"){
</el-form-item>
</el-descriptions-item>
<el-descriptions-item label="活动类型" v-if="formData.reimburseProject === 'UNION_REIMBURSE_PROJECT_2'">
<el-form-item label="活动类型" prop="activityType">
<el-select v-model="formData.activityType" placeholder="请选择活动类型" style="width: 100%">
<el-option label="分工会活动" value="分工会活动"></el-option>
<el-option label="校工会活动" value="校工会活动"></el-option>
<el-option label="社团(社团)活动" value="社团(社团)活动"></el-option>
</el-select>
</el-form-item>
</el-descriptions-item>
<el-descriptions-item label="活动人数" v-if="formData.reimburseProject !== 'UNION_REIMBURSE_PROJECT_1'">
<el-form-item label="活动人数" prop="activityNumber">
<el-input v-model="formData.activityNumber" placeholder="请输入活动人数" type="text"></el-input>
@@ -437,6 +470,8 @@ layout("/layouts/platform.html"){
</el-form-item>
</el-descriptions-item>
<el-descriptions-item :span="2" v-if="formData.reimburseProject === 'UNION_REIMBURSE_PROJECT_1'" style="display: none;">
</el-descriptions-item>
<el-descriptions-item label="参加随行人员" :span="2"
v-if="formData.reimburseProject === 'UNION_REIMBURSE_PROJECT_1'">
@@ -457,6 +492,8 @@ layout("/layouts/platform.html"){
type="textarea" :autosize="{ minRows: 4, maxRows: 8}"></el-input>
</el-form-item>
</el-descriptions-item>
<el-descriptions-item :span="2" v-if="formData.reimburseProject !== 'UNION_REIMBURSE_PROJECT_1' && formData.reimburseFundSource === 'UNION_REIMBURSE_FUND_SOURCE_3'" style="display: none;">
</el-descriptions-item>
<el-descriptions-item :span="2">
<template slot="label">
附件
@@ -714,7 +751,6 @@ layout("/layouts/platform.html"){
condolenceMoney: [{required: true, message: "请输入慰问金额", trigger: ["change", "blur"]}],
participants: [{required: true, message: "请填写参与随行人员", trigger: ["change", "blur"]}],
payer: [{required: true, message: "请选择付款人", trigger: ["change", "blur"]}],
activityType: [{required: true, message: "请选择活动类型", trigger: ["change", "blur"]}],
activityPlace: [{required: true, message: "请输入活动地点", trigger: ["change", "blur"]}],
activityTime: [{required: true, message: "请选择活动时间", trigger: ["change", "blur"]}],
activityNumber: [{required: true, message: "请输入活动人数", trigger: ["change", "blur"]}]
@@ -733,6 +769,7 @@ layout("/layouts/platform.html"){
reimburseProjectList: [],
reimburseProjects: [],
clubOptions: [],
fundBalanceText: '',
budgetTypeOption: [],
payerOptions: []
}
@@ -953,6 +990,7 @@ layout("/layouts/platform.html"){
this.$set(this.formData, "money", null)
} else {
this.rebuildInvoiceSummary()
this.normalizeFundBalance()
}
},
openInvoiceDialog(mode, row, index) {
@@ -1200,9 +1238,14 @@ layout("/layouts/platform.html"){
// this.$set(this.formData, "way", this.chooseType.way)
// }
// },
normalizeFundBalance() {
const fundBalance = Number(this.formData.fundBalance)
this.$set(this.formData, "fundBalance", Number.isNaN(fundBalance) ? null : fundBalance)
},
// 保存
onSave() {
this.rebuildInvoiceSummary()
this.normalizeFundBalance()
this.$confirm("您确定保存吗?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
@@ -1221,11 +1264,17 @@ layout("/layouts/platform.html"){
return new Promise((resolve) => {
this.$refs.formRef.validate((valid) => {
if (valid) {
if (this.formData.reimburseFundSource === "UNION_REIMBURSE_FUND_SOURCE_3" && !this.formData.clubId) {
this.$message.warning("请选择协会")
resolve(false)
return
}
if (!this.validateInvoiceDetailsBeforeSubmit()) {
this.$set(this, "activeTabName", "invoice")
resolve(false)
return
}
this.normalizeFundBalance()
this.rebuildInvoiceSummary()
resolve(true)
} else {
@@ -1298,68 +1347,71 @@ layout("/layouts/platform.html"){
const project = this.descOptions.find(item => item.reimburseProject === projectCode);
return project ? project.fileDesc : '';
},
//经费来源查询
reimburseFundSourceChange() {
// 检查是否有选择经费来源
if (!this.formData.reimburseFundSource) {
this.$set(this.formData, "fundBalance", "")
return
selectFundSource(code) {
this.$set(this.formData, "reimburseFundSource", code)
if (code !== "UNION_REIMBURSE_FUND_SOURCE_3") {
this.$set(this.formData, "clubId", null)
this.$set(this.formData, "clubName", null)
} else if (this.clubOptions.length === 1) {
this.$set(this.formData, "clubId", this.clubOptions[0].id)
this.$set(this.formData, "clubName", this.clubOptions[0].clubName)
}
// 如果是社团经费来源,但没有选择具体社团,则不查询
if (this.formData.reimburseFundSource === "UNION_REIMBURSE_FUND_SOURCE_3" && !this.formData.clubId) {
this.$set(this.formData, "fundBalance", "")
return
}
// 定义API映射关系
const apiMap = {
"UNION_REIMBURSE_FUND_SOURCE_1": {
url: "/platform/unionReimburse/apply/getSchoolBudget"
},
"UNION_REIMBURSE_FUND_SOURCE_2": {
url: "/platform/unionReimburse/apply/getUnionBalance"
},
"UNION_REIMBURSE_FUND_SOURCE_3": {
url: "/platform/unionReimburse/apply/getClubBudget"
this.reimburseFundSourceChange()
},
clubChange() {
if (this.formData.clubId) {
const selectedClub = this.clubOptions.find(club => club.id === this.formData.clubId)
if (selectedClub) {
this.$set(this.formData, "clubName", selectedClub.clubName)
}
this.reimburseFundSourceChange()
return
}
this.$set(this.formData, "clubName", null)
this.$set(this.formData, "fundBalance", null)
this.fundBalanceText = "请选择协会"
},
// 经费来源查询
reimburseFundSourceChange() {
if (!this.formData.reimburseFundSource) {
this.$set(this.formData, "fundBalance", null)
this.fundBalanceText = ""
return
}
if (this.formData.reimburseFundSource === "UNION_REIMBURSE_FUND_SOURCE_3" && !this.formData.clubId) {
this.$set(this.formData, "fundBalance", null)
this.fundBalanceText = ""
return
}
const fundSource = this.formData.reimburseFundSource
const apiInfo = apiMap[fundSource]
// 如果没有匹配的API,清空经费余额并返回
if (!apiInfo) {
this.$set(this.formData, "fundBalance", "")
if (!fundSource) {
this.$set(this.formData, "fundBalance", null)
this.fundBalanceText = ""
return
}
// 构造请求参数
const params = {
reimburseFundSource: fundSource
}
// 如果是社团经费,需要传递社团ID
if (fundSource === "UNION_REIMBURSE_FUND_SOURCE_3" && this.formData.clubId) {
params.clubId = this.formData.clubId
}
// 显示加载状态
this.$set(this.formData, "fundBalance", "查询中...")
// 发送请求
this.$axios.post(apiInfo.url, params)
this.$set(this.formData, "fundBalance", null)
this.fundBalanceText = "查询中..."
this.$axios.post("/platform/unionReimburse/apply/getBudgetBalance", params)
.then(response => {
if (response.code === 0) {
// 显示经费余额(只显示数字,不显示"元")
this.$set(this.formData, "fundBalance", response.data || "0.00")
this.$set(this.formData, "fundBalance", response.data || 0)
this.fundBalanceText = (response.data || 0).toString()
} else {
this.$set(this.formData, "fundBalance", "查询失败")
this.$set(this.formData, "fundBalance", null)
this.fundBalanceText = response.msg || "查询失败"
this.$message.warning(this.fundBalanceText)
}
})
.catch(error => {
console.error("经费余额查询失败:", error)
this.$set(this.formData, "fundBalance", "查询失败")
this.$set(this.formData, "fundBalance", null)
this.fundBalanceText = "查询失败"
this.$message.error("经费余额查询失败")
})
},
@@ -1433,7 +1485,16 @@ layout("/layouts/platform.html"){
this.queryFileDesc()
this.queryCondolenceType()
//社团查询
this.$businessTool.listCLubByRole().then((res) => (this.clubOptions = res))
this.$businessTool.listClubByRole().then((res) => {
this.$set(this, "clubOptions", res || [])
if (res && res.length === 1 && !this.formData.clubId) {
this.$set(this.formData, "clubId", res[0].id)
this.$set(this.formData, "clubName", res[0].clubName)
}
if (this.formData.reimburseFundSource) {
this.reimburseFundSourceChange()
}
})
}
})
</script>
@@ -5,168 +5,248 @@ const unionReimburseInfo = {
申请信息
<el-link type="primary" @click="openChart">点击查看流程图</el-link>
</div>
<el-descriptions :column="2" border class="flow-task-form">
<el-descriptions-item label="经办人">{{viewData.userName}}</el-descriptions-item>
<el-descriptions-item label="工号">{{viewData.loginName}}</el-descriptions-item>
<el-descriptions-item label="单位">{{viewData.unitName}}</el-descriptions-item>
<el-descriptions-item label="工会">{{viewData.unionName}}</el-descriptions-item>
<el-descriptions-item label="报销项目">
<span v-if="viewData.reimburseProject === 'UNION_REIMBURSE_PROJECT_1'">慰问</span>
<span v-else-if="viewData.reimburseProject === 'UNION_REIMBURSE_PROJECT_2'">文体活动</span>
<span v-else-if="viewData.reimburseProject === 'UNION_REIMBURSE_PROJECT_3'">日常活动</span>
<span v-else-if="viewData.reimburseProject === 'UNION_REIMBURSE_PROJECT_4'">专项活动</span>
<span v-else>{{ viewData.reimburseProject }}</span>
</el-descriptions-item>
<el-tabs v-model="activeTabName" style="margin-top: 10px;">
<el-tab-pane label="申请基本信息" name="basic">
<el-descriptions :column="2" border class="flow-task-form">
<el-descriptions-item label="经费来源" :span="2">
<dict-tag :options="dict.type.UNION_REIMBURSE_FUND_SOURCE"
:value="viewData.reimburseFundSource">
</dict-tag>
</el-descriptions-item>
<el-descriptions-item label="支付方式">
<dict-tag :options="dict.type.UNION_REIMBURSE_PAYMENT_WAY"
:value="viewData.paymentWay">
</dict-tag>
</el-descriptions-item>
<el-descriptions-item label="报销项目" :span="2">
<dict-tag :options="dict.type.UNION_REIMBURSE_PROJECT"
:value="viewData.reimburseProject">
</dict-tag>
</el-descriptions-item>
<el-descriptions-item label="联系方式">{{viewData.mobile}}</el-descriptions-item>
<el-descriptions-item label="支付方式">
<dict-tag :options="dict.type.UNION_REIMBURSE_PAYMENT_WAY"
:value="viewData.paymentWay">
</dict-tag>
</el-descriptions-item>
<el-descriptions-item label="付款人" v-if="viewData.paymentWay === 'UNION_REIMBURSE_PAYMENT_WAY_2'">
<span>{{ viewData.payerName }}</span>
</el-descriptions-item>
<el-descriptions-item label="工号">{{viewData.loginName}}</el-descriptions-item>
<el-descriptions-item label="经办人">{{viewData.userName}}</el-descriptions-item>
<el-descriptions-item label="单位">{{viewData.unitName}}</el-descriptions-item>
<el-descriptions-item label="工会">{{viewData.unionName}}</el-descriptions-item>
<el-descriptions-item label="开户行" v-if="viewData.paymentWay === 'UNION_REIMBURSE_PAYMENT_WAY_2'">
<span>{{ viewData.bankOfDeposit }}</span>
</el-descriptions-item>
<el-descriptions-item label="所属协会" v-if="viewData.reimburseFundSource === 'UNION_REIMBURSE_FUND_SOURCE_3'">
<span>{{ viewData.clubName }}</span>
</el-descriptions-item>
<el-descriptions-item label="银行卡号" v-if="viewData.paymentWay === 'UNION_REIMBURSE_PAYMENT_WAY_2'">
<span>{{ viewData.bankCardNumber }}</span>
</el-descriptions-item>
<el-descriptions-item label="余额" v-if="viewData.reimburseFundSource">
<span>{{ formatMoney(viewData.fundBalance) }}</span>
</el-descriptions-item>
<!-- 慰问相关字段 -->
<el-descriptions-item label="慰问对象" v-if="viewData.reimburseProject === 'UNION_REIMBURSE_PROJECT_1'">
<span>{{ viewData.condolenceUserName }}{{ viewData.condolenceLoginName }})({{ viewData.condolenceUnitName }}</span>
</el-descriptions-item>
<el-descriptions-item label="联系方式">
<span>{{ viewData.mobile }}</span>
</el-descriptions-item>
<el-descriptions-item label="性别" v-if="viewData.reimburseProject === 'UNION_REIMBURSE_PROJECT_1'">
<span>{{ viewData.condolenceSex }}</span>
</el-descriptions-item>
<el-descriptions-item label="付款人" v-if="viewData.paymentWay === 'UNION_REIMBURSE_PAYMENT_WAY_2'">
<span>{{ viewData.payerName }}</span>
</el-descriptions-item>
<el-descriptions-item label="生日" v-if="viewData.reimburseProject === 'UNION_REIMBURSE_PROJECT_1'">
<span>{{ viewData.condolenceBirthday && $moment(viewData.condolenceBirthday).isValid() ? $moment(viewData.condolenceBirthday).format('YYYY-MM-DD') : '' }}</span>
</el-descriptions-item>
<el-descriptions-item label="户名" v-if="viewData.paymentWay === 'UNION_REIMBURSE_PAYMENT_WAY_2'">
<span>{{ viewData.bankUserName }}</span>
</el-descriptions-item>
<el-descriptions-item label="身份证号" v-if="viewData.reimburseProject === 'UNION_REIMBURSE_PROJECT_1'">
<span>{{ viewData.condolenceIdCard }}</span>
</el-descriptions-item>
<el-descriptions-item label="开户行" v-if="viewData.paymentWay === 'UNION_REIMBURSE_PAYMENT_WAY_2'">
<span>{{ viewData.bankOfDeposit }}</span>
</el-descriptions-item>
<el-descriptions-item label="联系方式" v-if="viewData.reimburseProject === 'UNION_REIMBURSE_PROJECT_1'">
<span>{{ viewData.condolenceMobile }}</span>
</el-descriptions-item>
<el-descriptions-item label="银行卡号" v-if="viewData.paymentWay === 'UNION_REIMBURSE_PAYMENT_WAY_2'">
<span>{{ viewData.bankCardNumber }}</span>
</el-descriptions-item>
<el-descriptions-item label="慰问类型" v-if="viewData.reimburseProject === 'UNION_REIMBURSE_PROJECT_1'">
<span>{{ viewData.typeName }}</span>
</el-descriptions-item>
<el-descriptions-item label="慰问对象" v-if="viewData.reimburseProject === 'UNION_REIMBURSE_PROJECT_1'">
<span>{{ viewData.condolenceUserName }}{{ viewData.condolenceLoginName }})({{ viewData.condolenceUnitName }}</span>
</el-descriptions-item>
<el-descriptions-item label="慰问方式" v-if="viewData.reimburseProject === 'UNION_REIMBURSE_PROJECT_1'">
<span>{{ viewData.way }}</span>
</el-descriptions-item>
<el-descriptions-item label="性别" v-if="viewData.reimburseProject === 'UNION_REIMBURSE_PROJECT_1'">
<span>{{ viewData.condolenceSex }}</span>
</el-descriptions-item>
<el-descriptions-item label="慰问金额" v-if="viewData.reimburseProject === 'UNION_REIMBURSE_PROJECT_1'">
<span>{{ viewData.condolenceMoney }}</span>
</el-descriptions-item>
<el-descriptions-item label="实际报销金额" v-if="viewData.reimburseProject === 'UNION_REIMBURSE_PROJECT_1'">
<span>{{ viewData.realMoney }}</span>
</el-descriptions-item>
<el-descriptions-item label="生日" v-if="viewData.reimburseProject === 'UNION_REIMBURSE_PROJECT_1'">
<span>{{ viewData.condolenceBirthday && $moment(viewData.condolenceBirthday).isValid() ? $moment(viewData.condolenceBirthday).format('YYYY-MM-DD') : '' }}</span>
</el-descriptions-item>
<!-- 活动相关字段 -->
<el-descriptions-item label="活动名称" v-if="viewData.reimburseProject !== 'UNION_REIMBURSE_PROJECT_1'">
<span>{{ viewData.activityName }}</span>
</el-descriptions-item>
<el-descriptions-item label="身份证号" v-if="viewData.reimburseProject === 'UNION_REIMBURSE_PROJECT_1'">
<span>{{ viewData.condolenceIdCard }}</span>
</el-descriptions-item>
<el-descriptions-item label="活动类型" v-if="viewData.reimburseProject === 'UNION_REIMBURSE_PROJECT_2'">
<span>{{ viewData.activityType }}</span>
</el-descriptions-item>
<el-descriptions-item label="联系方式" v-if="viewData.reimburseProject === 'UNION_REIMBURSE_PROJECT_1'">
<span>{{ viewData.condolenceMobile }}</span>
</el-descriptions-item>
<el-descriptions-item label="活动人数" v-if="viewData.reimburseProject !== 'UNION_REIMBURSE_PROJECT_1'">
<span>{{ viewData.activityNumber }}</span>
</el-descriptions-item>
<el-descriptions-item label="慰问类型" v-if="viewData.reimburseProject === 'UNION_REIMBURSE_PROJECT_1'">
<span>{{ viewData.typeName }}</span>
</el-descriptions-item>
<el-descriptions-item label="活动地点" v-if="viewData.reimburseProject !== 'UNION_REIMBURSE_PROJECT_1'">
<span>{{ viewData.activityPlace }}</span>
</el-descriptions-item>
<el-descriptions-item label="慰问方式" v-if="viewData.reimburseProject === 'UNION_REIMBURSE_PROJECT_1'">
<span>{{ viewData.way }}</span>
</el-descriptions-item>
<el-descriptions-item label="报销金额" v-if="viewData.reimburseProject !== 'UNION_REIMBURSE_PROJECT_1'">
<span>{{ viewData.money }}</span>
</el-descriptions-item>
<el-descriptions-item label="慰问金额" v-if="viewData.reimburseProject === 'UNION_REIMBURSE_PROJECT_1'">
<span>{{ formatMoney(viewData.condolenceMoney) }}</span>
</el-descriptions-item>
<el-descriptions-item label="实际报销金额" v-if="viewData.reimburseProject !== 'UNION_REIMBURSE_PROJECT_1'">
<span>{{ viewData.realMoney }}</span>
</el-descriptions-item>
<el-descriptions-item label="实际报销金额" v-if="viewData.reimburseProject === 'UNION_REIMBURSE_PROJECT_1' && viewData.realMoney != null">
<span>{{ formatMoney(viewData.realMoney) }}</span>
</el-descriptions-item>
<el-descriptions-item label="活动时间" v-if="viewData.reimburseProject !== 'UNION_REIMBURSE_PROJECT_1'">
<span>{{ viewData.activityTime | dateFormat }}</span>
</el-descriptions-item>
<el-descriptions-item label="活动名称" v-if="viewData.reimburseProject !== 'UNION_REIMBURSE_PROJECT_1'">
<span>{{ viewData.activityName }}</span>
</el-descriptions-item>
<el-descriptions-item label="发票张数">
<span>{{ viewData.invoiceNumber }}</span>
</el-descriptions-item>
<el-descriptions-item label="活动人数" v-if="viewData.reimburseProject !== 'UNION_REIMBURSE_PROJECT_1'">
<span>{{ viewData.activityNumber }}</span>
</el-descriptions-item>
<el-descriptions-item label="慰问时间" v-if="viewData.reimburseProject === 'UNION_REIMBURSE_PROJECT_1'">
<span>{{ viewData.condolenceTime | dateFormat }}</span>
</el-descriptions-item>
<el-descriptions-item label="活动地点" v-if="viewData.reimburseProject !== 'UNION_REIMBURSE_PROJECT_1'">
<span>{{ viewData.activityPlace }}</span>
</el-descriptions-item>
<el-descriptions-item label="结婚时间" v-if="viewData.condolenceTypeId === 'cf4ce7af322d464f8f86d818fcc00203'">
<span>{{ viewData.marryTime | dateFormat }}</span>
</el-descriptions-item>
<el-descriptions-item label="报销金额" v-if="viewData.reimburseProject !== 'UNION_REIMBURSE_PROJECT_1'">
<span>{{ formatMoney(viewData.money) }}</span>
</el-descriptions-item>
<el-descriptions-item label="生育时间" v-if="viewData.condolenceTypeId === 'c90cb10dce6542e99ae271bee6fe8cc0'">
<span>{{ viewData.fertilityTime | dateFormat }}</span>
</el-descriptions-item>
<el-descriptions-item label="实际报销金额" v-if="viewData.reimburseProject !== 'UNION_REIMBURSE_PROJECT_1' && viewData.realMoney != null">
<span>{{ formatMoney(viewData.realMoney) }}</span>
</el-descriptions-item>
<el-descriptions-item label="住院病由" v-if="viewData.condolenceTypeId === '4e316737e71047e0b01aea78524c1416'">
<span>{{ viewData.hospitalCausation }}</span>
</el-descriptions-item>
<el-descriptions-item label="活动时间" v-if="viewData.reimburseProject !== 'UNION_REIMBURSE_PROJECT_1'">
<span>{{ viewData.activityTime | dateFormat }}</span>
</el-descriptions-item>
<el-descriptions-item label="住院时间" v-if="viewData.condolenceTypeId === '4e316737e71047e0b01aea78524c1416'">
<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.reimburseProject === 'UNION_REIMBURSE_PROJECT_1'">
<span>{{ viewData.condolenceTime | dateFormat }}</span>
</el-descriptions-item>
<el-descriptions-item label="入住医院" v-if="viewData.condolenceTypeId === '4e316737e71047e0b01aea78524c1416'">
<span>{{ viewData.hospital }}</span>
</el-descriptions-item>
<el-descriptions-item label="结婚时间" v-if="viewData.condolenceTypeId === 'cf4ce7af322d464f8f86d818fcc00203'">
<span>{{ viewData.marryTime | dateFormat }}</span>
</el-descriptions-item>
<el-descriptions-item label="当年次数" v-if="viewData.condolenceTypeId === '4e316737e71047e0b01aea78524c1416'">
<span>{{ viewData.hospitalCount }}</span>
</el-descriptions-item>
<el-descriptions-item label="生育时间" v-if="viewData.condolenceTypeId === 'c90cb10dce6542e99ae271bee6fe8cc0'">
<span>{{ viewData.fertilityTime | dateFormat }}</span>
</el-descriptions-item>
<el-descriptions-item label="去逝时间" v-if="viewData.condolenceTypeId === '60f03a87b62b4823855814afdbf5672a'">
<span>{{ viewData.deathTime | dateFormat }}</span>
</el-descriptions-item>
<el-descriptions-item label="住院病由" v-if="viewData.condolenceTypeId === '4e316737e71047e0b01aea78524c1416'">
<span>{{ viewData.hospitalCausation }}</span>
</el-descriptions-item>
<el-descriptions-item label="与被慰问人关系" v-if="viewData.condolenceTypeId === '60f03a87b62b4823855814afdbf5672a'">
<span>{{ viewData.condolenceRelationship }}</span>
</el-descriptions-item>
<el-descriptions-item label="住院时间" v-if="viewData.condolenceTypeId === '4e316737e71047e0b01aea78524c1416'">
<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="参加随行人员" :span="2"
v-if="viewData.reimburseProject === 'UNION_REIMBURSE_PROJECT_1'">
<span>{{ viewData.participants }}</span>
</el-descriptions-item>
<el-descriptions-item label="入住医院" v-if="viewData.condolenceTypeId === '4e316737e71047e0b01aea78524c1416'">
<span>{{ viewData.hospital }}</span>
</el-descriptions-item>
<el-descriptions-item label="报销事由" :span="2">
<span>{{ viewData.paymentNotes }}</span>
</el-descriptions-item>
<el-descriptions-item label="当年次数" v-if="viewData.condolenceTypeId === '4e316737e71047e0b01aea78524c1416'">
<span>{{ viewData.hospitalCount }}</span>
</el-descriptions-item>
<el-descriptions-item label="备注" :span="2">
<span>{{ viewData.notes }}</span>
</el-descriptions-item>
<el-descriptions-item label="去逝时间" v-if="viewData.condolenceTypeId === '60f03a87b62b4823855814afdbf5672a'">
<span>{{ viewData.deathTime | dateFormat }}</span>
</el-descriptions-item>
<el-descriptions-item label="附件" :span="2">
<file-preview v-if="viewData.files && viewData.files.length > 0" :files="viewData.files"
complete_result></file-preview>
<span v-else>暂无附件</span>
</el-descriptions-item>
</el-descriptions>
<el-descriptions-item label="与被慰问人关系" v-if="viewData.condolenceTypeId === '60f03a87b62b4823855814afdbf5672a'">
<span>{{ viewData.condolenceRelationship }}</span>
</el-descriptions-item>
<el-descriptions-item label="参加随行人员" :span="2"
v-if="viewData.reimburseProject === 'UNION_REIMBURSE_PROJECT_1'">
<span>{{ viewData.participants }}</span>
</el-descriptions-item>
<el-descriptions-item label="报销事由" :span="2" v-if="viewData.reimburseProject === 'UNION_REIMBURSE_PROJECT_1'">
<span>{{ viewData.paymentNotes }}</span>
</el-descriptions-item>
<el-descriptions-item label="备注" :span="2" v-if="viewData.reimburseProject === 'UNION_REIMBURSE_PROJECT_1'">
<span>{{ viewData.notes }}</span>
</el-descriptions-item>
<el-descriptions-item label="附件" :span="2">
<file-preview v-if="viewData.files && viewData.files.length > 0"
:files="viewData.files"
complete_result></file-preview>
<span v-else>暂无附件</span>
</el-descriptions-item>
</el-descriptions>
</el-tab-pane>
<el-tab-pane label="发票信息" name="invoice" v-if="showInvoiceTab">
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="报销金额" label-width="100px">
<el-input :value="formatMoney(viewData.money)" readonly></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="发票张数" label-width="100px">
<el-input :value="viewData.invoiceNumber" readonly></el-input>
</el-form-item>
</el-col>
<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>
</el-form-item>
</el-col>
<el-col :span="24">
<div style="display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; flex-wrap: wrap;">
<div>
<div style="font-size: 14px; color: #1867b0; font-weight: 600;">发票明细列表</div>
<div style="margin-top: 8px; font-size: 12px; color: #909399;">
查看页按申请页结构展示发票明细,仅用于查看,不提供编辑操作。
</div>
</div>
</div>
<el-table :data="viewData.invoiceDetails" border empty-text="暂无发票明细">
<el-table-column align="center" label="序号" type="index" width="70"></el-table-column>
<el-table-column label="文件名称" min-width="220">
<template slot-scope="scope">
<file-preview v-if="scope.row.invoiceFiles && scope.row.invoiceFiles.length > 0"
:files="scope.row.invoiceFiles"
complete_result></file-preview>
<span v-else>未上传</span>
</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">
<template slot-scope="scope">
<span>{{ formatMoney(scope.row.invoiceAmount) }}</span>
</template>
</el-table-column>
<el-table-column label="销售方信息名称" min-width="180" prop="sellerName"></el-table-column>
<el-table-column label="项目名称" min-width="180" prop="itemName"></el-table-column>
<el-table-column label="备注" min-width="150" prop="remark"></el-table-column>
</el-table>
</el-col>
</el-row>
</el-tab-pane>
</el-tabs>
<template>
<div class="mt10" v-if="viewData.reviewTime">
@@ -181,13 +261,13 @@ const unionReimburseInfo = {
<span v-else-if="viewData.stateId == 4" style="color: #f56c6c;">拒绝</span>
<span v-else-if="viewData.stateId == 5" style="color: #409eff;">退回</span>
<span v-else style="color: #409eff;">{{ viewData.stateId }}</span>
</el-descriptions-item>
</el-descriptions-item>
<el-descriptions-item label="审核意见">{{ viewData.reviewOpinion }}</el-descriptions-item>
</el-descriptions>
</div>
</template>
<slot></slot>
<slot></slot>
<snaker-chart ref="snakerChartRef"></snaker-chart>
</div>
`,
@@ -201,42 +281,69 @@ const unionReimburseInfo = {
},
data() {
return {
activeTabName: "basic",
visible: false,
viewData: {},
viewData: {
files: [],
invoiceDetails: []
},
typeName: '',
row: null
}
},
computed: {
showInvoiceTab() {
return this.viewData.reimburseProject !== "UNION_REIMBURSE_PROJECT_1"
}
},
methods: {
// 打开
onOpen(row) {
this.row = row
this.visible = true
this.activeTabName = "basic"
this.getInfo()
},
// 获取申请信息
getInfo() {
this.$axios.post('/platform/unionReimburse/apply/info', {id: this.row.id}).then((res) => {
if (res.code === 0) {
this.viewData = res.data
this.viewData = this.buildViewData(res.data)
this.typeName = res.data.typeName || ''
}
})
},
// // 获取已办任务审批记录
// getDoneTasks() {
// this.$axios.post("/flow/common/doneTasks", {bizId: this.row.id}).then((res) => {
// if (res.code === 0) {
// this.doneTasks = res.data
// }
// })
// },
//
// // 查看流程图
// openChart(){
// this.$refs.snakerChartRef.onOpenFull(this.row.instanceProcessDefineId,this.row.instanceId)
// }
// 查看页面需要给附件和发票明细补默认值,避免空数据时组件渲染异常。
buildViewData(data) {
const viewData = Object.assign({
files: [],
invoiceDetails: []
}, data || {})
if (!Array.isArray(viewData.files)) {
viewData.files = []
}
if (!Array.isArray(viewData.invoiceDetails)) {
viewData.invoiceDetails = []
}
return viewData
},
// 查看页金额统一保留两位小数,和申请页展示口径保持一致。
formatMoney(value) {
if (value === null || value === undefined || value === "") {
return ""
}
const numberValue = Number(value)
if (Number.isNaN(numberValue)) {
return value
}
return numberValue.toFixed(2)
},
// 查看流程图
openChart() {
if (!this.row || !this.$refs.snakerChartRef) {
return
}
this.$refs.snakerChartRef.onOpenFull(this.row.instanceProcessDefineId, this.row.instanceId)
}
}
}