地大bug整改,工会报销:入住医院必填;校工会审核默认通过改成已付款成功;余额字段隐藏,只有系统管理员、校工会管理员可以看的。费用报销:隐藏分工会的经费类型
This commit is contained in:
+7
-1
@@ -150,7 +150,7 @@ layout("/layouts/platform.html"){
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="余额" v-if="formData.reimburseFundSource">
|
||||
<el-form-item label="余额">
|
||||
<el-input :value="fundBalanceText" readonly></el-input>
|
||||
<el-input :value="canViewFundBalance ? fundBalanceText : '******'" readonly></el-input>
|
||||
</el-form-item>
|
||||
</el-descriptions-item>
|
||||
|
||||
@@ -820,6 +820,8 @@ layout("/layouts/platform.html"){
|
||||
|
||||
condolenceUserId: [{required: true, message: "请选择慰问对象", trigger: ["change", "blur"]}],
|
||||
condolenceTypeId: [{required: true, message: "请选择慰问类型", trigger: ["change", "blur"]}],
|
||||
// 住院慰问显示入住医院字段时,提交和重新提交均须填写非空白医院名称。
|
||||
hospital: [{required: true, whitespace: true, message: "请输入入住医院", trigger: ["change", "blur"]}],
|
||||
way: [{required: true, message: "请选择慰问方式", trigger: ["change", "blur"]}],
|
||||
condolenceMoney: [{required: true, message: "请输入慰问金额", trigger: ["change", "blur"]}],
|
||||
participants: [{required: true, message: "请填写参与随行人员", trigger: ["change", "blur"]}],
|
||||
@@ -865,6 +867,10 @@ layout("/layouts/platform.html"){
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
// 仅系统管理员和校工会管理员可查看真实余额,其他账号统一显示余额遮罩。
|
||||
canViewFundBalance() {
|
||||
return this.$auth.hasRoleOr(["SYSADMIN", "SCHOOL_UNION_ADMIN"])
|
||||
},
|
||||
showInvoiceTab() {
|
||||
return !!this.formData.reimburseProject
|
||||
},
|
||||
|
||||
+1
-1
@@ -212,7 +212,7 @@ layout("/layouts/platform.html"){
|
||||
this.showApprovalForm = true
|
||||
this.formData = {
|
||||
id: row.id,
|
||||
reviewOpinion: '通过'
|
||||
reviewOpinion: '已付款成功'
|
||||
}
|
||||
this.$refs.unionReimburseInfoRef.onOpen(row)
|
||||
})
|
||||
|
||||
+9
-2
@@ -473,7 +473,7 @@ layout("/layouts/platform_h5.html"){
|
||||
<van-field
|
||||
v-if="formData.reimburseFundSource"
|
||||
label="余额"
|
||||
v-model="formData.fundBalance"
|
||||
:value="canViewFundBalance ? formData.fundBalance : '******'"
|
||||
readonly
|
||||
placeholder="自动查询"
|
||||
></van-field>
|
||||
@@ -706,7 +706,10 @@ layout("/layouts/platform_h5.html"){
|
||||
@cancel="closePopup('showHospitalizationEndTimePicker')"
|
||||
@confirm="onDateConfirm('hospitalizationEndTime', 'showHospitalizationEndTimePicker', $event)"></van-datetime-picker>
|
||||
</van-popup>
|
||||
<van-field label="入住医院" v-model="formData.hospital" placeholder="请输入入住医院"></van-field>
|
||||
<!-- 住院慰问提交和重新提交时,入住医院不能为空或仅包含空白字符。 -->
|
||||
<van-field label="入住医院" name="hospital" v-model="formData.hospital" required
|
||||
:rules="[{ required: true, message: '请输入入住医院' }, { pattern: /\S/, message: '请输入入住医院' }]"
|
||||
placeholder="请输入入住医院"></van-field>
|
||||
<van-field label="当年次数" v-model="formData.hospitalCount" placeholder="请填写当年次数" type="number"></van-field>
|
||||
</template>
|
||||
|
||||
@@ -1248,6 +1251,10 @@ layout("/layouts/platform_h5.html"){
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
// 仅系统管理员和校工会管理员可查看真实余额,其他账号统一显示余额遮罩。
|
||||
canViewFundBalance() {
|
||||
return this.$auth.hasRoleOr(["SYSADMIN", "SCHOOL_UNION_ADMIN"])
|
||||
},
|
||||
paymentInfoRows() {
|
||||
return this.formData.paymentDetails || []
|
||||
},
|
||||
|
||||
@@ -2,7 +2,7 @@ const UNION_REIMBURSE_INFO = {
|
||||
template:
|
||||
/*language=HTML*/
|
||||
`
|
||||
<van-popup v-model="visible" position="right" :style="{width: '100%', height: '100%'}" get-container="#app" :close-on-click-overlay="false" class="union-reimburse-info-sheet">
|
||||
<van-popup v-model="visible" position="right" :style="{width: '100%', height: '100%'}" :get-container="false" :close-on-click-overlay="false" class="union-reimburse-info-sheet">
|
||||
<div class="union-reimburse-info-detail">
|
||||
<van-nav-bar :title="detailTitle" left-text="返回" left-arrow fixed @click-left="onClose"></van-nav-bar>
|
||||
<div class="detail-container">
|
||||
@@ -308,6 +308,9 @@ const UNION_REIMBURSE_INFO = {
|
||||
<slot></slot>
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="$slots.footer" class="union-reimburse-info-footer">
|
||||
<slot name="footer"></slot>
|
||||
</div>
|
||||
</div>
|
||||
</van-popup>
|
||||
`,
|
||||
@@ -336,18 +339,23 @@ const UNION_REIMBURSE_INFO = {
|
||||
},
|
||||
mounted() {
|
||||
this.injectInfoStyle()
|
||||
const manager = window.h5HistoryLayerManager
|
||||
if (manager) {
|
||||
manager.ensureRegistered("union-reimburse-info")
|
||||
this.$set(this, "historyLayerUnsubscribe", manager.subscribe((layers) => {
|
||||
this.$set(this, "visible", layers.includes(this.historyLayerName))
|
||||
}))
|
||||
}
|
||||
this.subscribeHistoryLayer()
|
||||
},
|
||||
beforeDestroy() {
|
||||
if (this.historyLayerUnsubscribe) this.historyLayerUnsubscribe()
|
||||
},
|
||||
methods: {
|
||||
// PJAX 会重置全局历史栈订阅;每次打开前重新订阅,保证返回事件能同步关闭详情。
|
||||
subscribeHistoryLayer() {
|
||||
if (this.historyLayerUnsubscribe) this.historyLayerUnsubscribe()
|
||||
this.$set(this, "historyLayerUnsubscribe", null)
|
||||
const manager = window.h5HistoryLayerManager
|
||||
if (!manager) return
|
||||
manager.ensureRegistered("union-reimburse-info")
|
||||
this.$set(this, "historyLayerUnsubscribe", manager.subscribe((layers) => {
|
||||
this.$set(this, "visible", layers.includes(this.historyLayerName))
|
||||
}))
|
||||
},
|
||||
injectInfoStyle() {
|
||||
// 当前组件是普通 JS 对象注册,Vue 不会自动注入 style 字段,这里只为本详情弹窗注入一次样式。
|
||||
const styleId = "union-reimburse-info-style"
|
||||
@@ -365,6 +373,7 @@ const UNION_REIMBURSE_INFO = {
|
||||
this.$set(this, "detailTitle", title || "报销详情")
|
||||
this.$set(this, "currentPaymentIndex", 0)
|
||||
// 详情弹层的显示状态由全局历史栈统一同步,确保系统返回键与页面返回按钮关闭同一层。
|
||||
this.subscribeHistoryLayer()
|
||||
const manager = window.h5HistoryLayerManager
|
||||
if (manager && manager.open(this.historyLayerName)) {
|
||||
this.getInfo()
|
||||
@@ -375,10 +384,13 @@ const UNION_REIMBURSE_INFO = {
|
||||
this.getInfo()
|
||||
this.getDoneTasks()
|
||||
},
|
||||
// 只关闭当前详情对应的历史层,避免误关闭审核确认弹框等上层业务弹框。
|
||||
// 详情之上存在确认框或预览时先关闭最上层;无历史层时才直接关闭详情。
|
||||
onClose() {
|
||||
const manager = window.h5HistoryLayerManager
|
||||
if (manager && manager.close(this.historyLayerName)) return
|
||||
if (manager && manager.stack.length) {
|
||||
manager.close()
|
||||
return
|
||||
}
|
||||
this.$set(this, "visible", false)
|
||||
},
|
||||
formatCreateTime(value) {
|
||||
@@ -533,12 +545,19 @@ const UNION_REIMBURSE_INFO = {
|
||||
color: #1989fa;
|
||||
}
|
||||
|
||||
.detail-container {
|
||||
.union-reimburse-info-detail > .detail-container {
|
||||
flex: 1;
|
||||
min-height: 0;
|
||||
overflow: hidden;
|
||||
background: #f3f7fd;
|
||||
}
|
||||
|
||||
/* 审核按钮占独立底部区域,意见表单随正文滚动,避免被按钮遮挡或挤出可视区。 */
|
||||
.union-reimburse-info-footer {
|
||||
flex-shrink: 0;
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
.union-info-scroll {
|
||||
height: 100%;
|
||||
overflow-y: auto;
|
||||
|
||||
+9
-4
@@ -44,7 +44,7 @@ layout("/layouts/platform_h5.html"){
|
||||
</main>
|
||||
|
||||
<union-reimburse-info ref="unionReimburseInfoRef" history-layer-name="union-reimburse-review-info">
|
||||
<template v-if="showApprovalForm">
|
||||
<div v-if="showApprovalForm" class="union-reimburse-approval">
|
||||
<section class="union-reimburse-approval-card">
|
||||
<h2 class="union-reimburse-approval-card__title">{{formData.taskName || '校工会审核'}}</h2>
|
||||
<van-form ref="formRef">
|
||||
@@ -52,7 +52,9 @@ layout("/layouts/platform_h5.html"){
|
||||
<van-field v-model="formData.reviewOpinion" class="union-reimburse-approval-field" name="reviewOpinion" type="textarea" rows="6" label="" placeholder="请输入审批意见" :rules="[{required: true, message: '请填写审批意见'}]" maxlength="100" show-word-limit></van-field>
|
||||
</van-form>
|
||||
</section>
|
||||
<div class="union-reimburse-approval-actions">
|
||||
</div>
|
||||
<template slot="footer">
|
||||
<div v-if="showApprovalForm" class="union-reimburse-approval-actions">
|
||||
<van-button :loading="formLoading" type="danger" block @click="handleTaskAction(5)">退回</van-button>
|
||||
<van-button :loading="formLoading" type="danger" block @click="handleTaskAction(4)">不同意</van-button>
|
||||
<van-button :loading="formLoading" type="primary" block @click="handleTaskAction(3)">同意</van-button>
|
||||
@@ -173,9 +175,12 @@ layout("/layouts/platform_h5.html"){
|
||||
this.$set(this, "formData", {
|
||||
id: row.id,
|
||||
taskName: "校工会审核",
|
||||
reviewOpinion: ""
|
||||
reviewOpinion: "已付款成功"
|
||||
})
|
||||
// 先完成审批意见及插槽渲染,再打开详情,避免首次打开时表单尚未更新。
|
||||
this.$nextTick(() => {
|
||||
this.$refs.unionReimburseInfoRef.onOpen(row, "报销审核")
|
||||
})
|
||||
this.$refs.unionReimburseInfoRef.onOpen(row, "报销审核")
|
||||
},
|
||||
onLoadingChange(state) { this.$set(this, "listLoading", state.loading) },
|
||||
onNavBack() { const manager = window.h5HistoryLayerManager; if (manager && manager.stack.length) { manager.close(); return } historyBack() },
|
||||
|
||||
Reference in New Issue
Block a user