疗休养优化
This commit is contained in:
@@ -128,7 +128,7 @@ layout("/layouts/v4/baseLayout.html"){
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<work-template v-if="$auth.hasRoleOr(['SYSADMIN','SCHOOL_UNION_ADMIN'])"></work-template>
|
||||
<!-- <work-template v-if="$auth.hasRoleOr(['SYSADMIN','SCHOOL_UNION_ADMIN'])"></work-template>-->
|
||||
|
||||
<jcdt :list="websiteNews"></jcdt>
|
||||
</div>
|
||||
|
||||
+1
-1
@@ -80,7 +80,7 @@ layout("/layouts/platform.html"){
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="分配时间" prop="assignedAt" width="170" sortable="custom" align="center" header-align="center" show-overflow-tooltip></el-table-column>
|
||||
<el-table-column label="操作" width="320" align="center" header-align="center" fixed="right">
|
||||
<el-table-column label="操作" width="380" align="center" header-align="center" fixed="right">
|
||||
<template slot-scope="{row}">
|
||||
<el-button v-if="!row.matterId && row.personType !== 'BACKUP'" size="mini" type="primary" @click="openSelectMatter(row)">选择路线</el-button>
|
||||
<el-button size="mini" type="primary" :loading="personTypeSwitching === row.id" @click="switchPersonType(row, row.personType === 'BACKUP' ? 'FORMAL' : 'BACKUP')">{{ row.personType === 'BACKUP' ? '转为正式' : '转为替补' }}</el-button>
|
||||
|
||||
@@ -42,7 +42,23 @@ layout("/layouts/platform.html"){
|
||||
</el-card>
|
||||
|
||||
<el-card class="mt10" shadow="never">
|
||||
<table-tool :app="this" label="线路列表"></table-tool>
|
||||
<div class="tour-list-header">
|
||||
<table-tool :app="this" label="线路列表"></table-tool>
|
||||
<div class="tour-period-area" v-if="travelPeriodOptions.length > 0">
|
||||
<div class="tour-period-filter">
|
||||
<button
|
||||
v-for="item in travelPeriodOptions"
|
||||
:key="item.value"
|
||||
type="button"
|
||||
class="tour-period-chip"
|
||||
:class="{'tour-period-chip--active': pageForm.travelPeriod === item.value}"
|
||||
@click="selectTravelPeriod(item)">
|
||||
{{ item.value }}
|
||||
</button>
|
||||
</div>
|
||||
<div class="tour-period-tip">可选择指定出行时间,快速查看对应路线</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<el-table
|
||||
v-loading="tableLoading"
|
||||
@@ -470,6 +486,62 @@ layout("/layouts/platform.html"){
|
||||
.over-cost-form-item .el-radio__input.is-checked + .el-radio__label {
|
||||
color: #f56c6c;
|
||||
}
|
||||
|
||||
.tour-list-header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-wrap: wrap;
|
||||
gap: 12px;
|
||||
margin-bottom: 12px;
|
||||
}
|
||||
|
||||
.tour-list-header /deep/ .wk-table-tool,
|
||||
.tour-list-header .wk-table-tool {
|
||||
flex: 0 0 auto;
|
||||
}
|
||||
|
||||
.tour-period-area {
|
||||
flex: 1 1 0;
|
||||
min-width: 240px;
|
||||
}
|
||||
|
||||
.tour-period-filter {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 10px;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.tour-period-tip {
|
||||
margin-top: 6px;
|
||||
color: #f56c6c;
|
||||
font-size: 12px;
|
||||
line-height: 1.4;
|
||||
}
|
||||
|
||||
.tour-period-chip {
|
||||
min-width: 118px;
|
||||
height: 34px;
|
||||
border: 1px solid #dcdfe6;
|
||||
border-radius: 4px;
|
||||
padding: 0 14px;
|
||||
background: #ffffff;
|
||||
color: #606266;
|
||||
font-size: 14px;
|
||||
line-height: 32px;
|
||||
text-align: center;
|
||||
cursor: pointer;
|
||||
box-sizing: border-box;
|
||||
transition: all 0.18s ease;
|
||||
}
|
||||
|
||||
.tour-period-chip:hover,
|
||||
.tour-period-chip--active {
|
||||
border-color: #0076c8;
|
||||
background: #0076c8;
|
||||
color: #ffffff;
|
||||
}
|
||||
</style>
|
||||
|
||||
<script nonce="${cspNonce!}">
|
||||
@@ -481,6 +553,7 @@ layout("/layouts/platform.html"){
|
||||
return {
|
||||
unionOptions: [],
|
||||
lineTypeOptions: [],
|
||||
travelPeriodOptions: [],
|
||||
signupVisible: false,
|
||||
signupLoading: false,
|
||||
cancelLoading: false,
|
||||
@@ -505,17 +578,36 @@ layout("/layouts/platform.html"){
|
||||
year: currentYear,
|
||||
lineName: "",
|
||||
lineType: "",
|
||||
unionId: ""
|
||||
unionId: "",
|
||||
travelPeriod: ""
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
resetSearch() {
|
||||
this.pageForm.year = moment().format("YYYY")
|
||||
const currentYear = moment().format("YYYY")
|
||||
const yearChanged = this.pageForm.year !== currentYear
|
||||
this.pageForm.year = currentYear
|
||||
this.pageForm.lineName = ""
|
||||
this.pageForm.lineType = ""
|
||||
this.pageForm.unionId = ""
|
||||
this.pageForm.travelPeriod = ""
|
||||
if (yearChanged) {
|
||||
return
|
||||
}
|
||||
this.loadLineTypeOptions()
|
||||
this.loadTravelPeriodOptions(true).then(() => {
|
||||
this.doSearch()
|
||||
})
|
||||
},
|
||||
selectTravelPeriod(item) {
|
||||
const travelPeriod = item && item.value ? item.value : ""
|
||||
if (this.pageForm.travelPeriod === travelPeriod) {
|
||||
this.pageForm.travelPeriod = ""
|
||||
this.doSearch()
|
||||
return
|
||||
}
|
||||
this.pageForm.travelPeriod = travelPeriod
|
||||
this.doSearch()
|
||||
},
|
||||
signupActionText(row) {
|
||||
@@ -1026,6 +1118,31 @@ layout("/layouts/platform.html"){
|
||||
}
|
||||
})
|
||||
},
|
||||
loadTravelPeriodOptions(defaultFirst) {
|
||||
return this.$axios.post(loc() + "/travelPeriodOptions", {
|
||||
year: this.pageForm.year
|
||||
}).then((res) => {
|
||||
if (res.code !== 0) {
|
||||
return
|
||||
}
|
||||
this.travelPeriodOptions = (res.data || []).map((item) => {
|
||||
const value = item.travelPeriod || ""
|
||||
return {
|
||||
value: value,
|
||||
name: value || "未设置出行时间"
|
||||
}
|
||||
}).filter((item) => item.value).sort((a, b) => {
|
||||
return String(a.value).localeCompare(String(b.value))
|
||||
})
|
||||
if (defaultFirst) {
|
||||
this.pageForm.travelPeriod = this.travelPeriodOptions.length > 0 ? this.travelPeriodOptions[0].value : ""
|
||||
}
|
||||
}).catch(() => {
|
||||
if (defaultFirst) {
|
||||
this.pageForm.travelPeriod = ""
|
||||
}
|
||||
})
|
||||
},
|
||||
loadDirectRelativeOptions() {
|
||||
this.$axios.post(loc() + "/directRelativeOptions").then((res) => {
|
||||
if (res.code === 0) {
|
||||
@@ -1054,12 +1171,18 @@ layout("/layouts/platform.html"){
|
||||
this.loadDirectRelativeOptions()
|
||||
this.loadBedTypeOptions()
|
||||
this.loadFamilyRelationshipOptions()
|
||||
this.pageData()
|
||||
this.loadTravelPeriodOptions(true).then(() => {
|
||||
this.pageData()
|
||||
})
|
||||
},
|
||||
watch: {
|
||||
"pageForm.year"() {
|
||||
this.pageForm.lineType = ""
|
||||
this.pageForm.travelPeriod = ""
|
||||
this.loadLineTypeOptions()
|
||||
this.loadTravelPeriodOptions(true).then(() => {
|
||||
this.doSearch()
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
@@ -378,6 +378,7 @@ layout("/layouts/platform_h5.html"){
|
||||
<van-button size="small" type="info" plain @click="openView(row)">查看</van-button>
|
||||
<van-button v-if="canModify(row) || isTravelEnded(row)" size="small" type="info" :disabled="isTravelEnded(row)" @click="openSignup(row)">修改</van-button>
|
||||
<van-button v-if="canRevoke(row)" size="small" type="danger" plain @click="revokeSignup(row)">撤回</van-button>
|
||||
<van-button v-if="showLeaveTour(row)" size="small" type="danger" plain :loading="leaveLoading" @click="leaveTour(row)">退出疗休养报名</van-button>
|
||||
<van-button v-if="showCancel(row)" size="small" type="danger" plain :disabled="isTravelEnded(row)" @click="cancelByRow(row)">取消报名</van-button>
|
||||
<van-button v-if="showExport(row)" size="small" type="info" plain :disabled="!canExport(row)" @click="downloadExport(row, 'cost')">报销申请</van-button>
|
||||
<van-button v-if="showDirectRelativeExport(row)" size="small" type="info" plain :disabled="!canDirectRelativeExport(row)" @click="downloadExport(row, 'direct')">亲属线路申请</van-button>
|
||||
@@ -584,6 +585,7 @@ layout("/layouts/platform_h5.html"){
|
||||
signupVisible: false,
|
||||
signupLoading: false,
|
||||
cancelLoading: false,
|
||||
leaveLoading: false,
|
||||
allowFamily: false,
|
||||
fillBedInfo: true,
|
||||
signupForm: {},
|
||||
@@ -733,6 +735,10 @@ layout("/layouts/platform_h5.html"){
|
||||
showCancel(row) {
|
||||
return !this.isApprovalRow(row) || this.canModify(row)
|
||||
},
|
||||
// 退出疗休养报名依赖人员分配记录,已退出的数据不再展示入口。
|
||||
showLeaveTour(row) {
|
||||
return this.toBoolean(row && row.canLeaveTour)
|
||||
},
|
||||
showExport(row) {
|
||||
return this.toBoolean(row && row.overCostReimbursed)
|
||||
},
|
||||
@@ -1075,6 +1081,32 @@ layout("/layouts/platform_h5.html"){
|
||||
})
|
||||
}).catch(() => {})
|
||||
},
|
||||
leaveTour(row) {
|
||||
if (!row || !row.assignmentId) {
|
||||
vant.Toast("暂无可退出的疗休养报名")
|
||||
return
|
||||
}
|
||||
vant.Dialog.confirm({
|
||||
title: "温馨提醒",
|
||||
message: "是否确认退出本次疗休养报名,退出后将取消报名资格!",
|
||||
confirmButtonColor: "#ee2f2f"
|
||||
}).then(() => {
|
||||
this.leaveLoading = true
|
||||
this.$axios.post("/platform/tour/mysignup/doLeaveTour", {
|
||||
assignmentId: row.assignmentId
|
||||
}).then((res) => {
|
||||
this.leaveLoading = false
|
||||
if (res.code === 0) {
|
||||
vant.Toast.success(res.msg || "退出疗休养报名成功")
|
||||
this.doSearch()
|
||||
} else {
|
||||
vant.Dialog.alert({ title: "提示", message: res.msg || "退出失败", confirmButtonColor: "#1867b0" })
|
||||
}
|
||||
}).catch(() => {
|
||||
this.leaveLoading = false
|
||||
})
|
||||
}).catch(() => {})
|
||||
},
|
||||
revokeSignup(row) {
|
||||
vant.Dialog.confirm({
|
||||
title: "温馨提醒",
|
||||
@@ -1106,6 +1138,7 @@ layout("/layouts/platform_h5.html"){
|
||||
this.fillBedInfo = true
|
||||
this.signupLoading = false
|
||||
this.cancelLoading = false
|
||||
this.leaveLoading = false
|
||||
}
|
||||
},
|
||||
created() {
|
||||
|
||||
@@ -128,10 +128,10 @@ layout("/layouts/platform_h5.html"){
|
||||
<div class="tour-apply-title">教职工信息</div>
|
||||
<van-field label="姓名" readonly v-model="signupForm.userName"></van-field>
|
||||
<van-field label="工号" readonly v-model="signupForm.jobNo"></van-field>
|
||||
<van-field label="身份证号码" v-model="signupForm.idCard" maxlength="30" placeholder="请填写身份证号码"></van-field>
|
||||
<van-field label="身份证号码" required v-model="signupForm.idCard" maxlength="30" placeholder="请填写身份证号码"></van-field>
|
||||
<van-field label="性别" readonly v-model="signupForm.gender"></van-field>
|
||||
<van-field label="年龄" readonly :value="staffAge(signupForm)"></van-field>
|
||||
<van-field label="手机号" v-model="signupForm.mobile" type="tel" maxlength="30" placeholder="请填写手机号"></van-field>
|
||||
<van-field label="手机号" required v-model="signupForm.mobile" type="tel" maxlength="30" placeholder="请填写手机号"></van-field>
|
||||
<van-field label="所属工会" readonly v-model="signupForm.unionName"></van-field>
|
||||
</div>
|
||||
|
||||
@@ -142,6 +142,7 @@ layout("/layouts/platform_h5.html"){
|
||||
<van-field v-if="signupForm.travelPeriod" label="出行时间" readonly v-model="signupForm.travelPeriod"></van-field>
|
||||
<van-field
|
||||
label="乘车地点"
|
||||
required
|
||||
readonly
|
||||
clickable
|
||||
is-link
|
||||
@@ -620,6 +621,27 @@ layout("/layouts/platform_h5.html"){
|
||||
}
|
||||
return true
|
||||
},
|
||||
showSubmitError(error) {
|
||||
// Keep signup submit errors local so the global axios interceptor does not show a duplicate toast.
|
||||
vant.Toast.clear()
|
||||
const responseData = error && error.response && error.response.data ? error.response.data : null
|
||||
const message = responseData && (responseData.msg || responseData.message)
|
||||
? (responseData.msg || responseData.message)
|
||||
: (error && (error.msg || error.message) ? (error.msg || error.message) : "报名提交失败")
|
||||
vant.Toast({
|
||||
message: message,
|
||||
duration: 3000
|
||||
})
|
||||
},
|
||||
submitSignupRequest(form) {
|
||||
// Use raw axios for this submit only; the page controls backend error text and toast duration locally.
|
||||
return axios.post("/platform/tour/signup/doSignup", $.param(form), {
|
||||
headers: {
|
||||
"Content-Type": "application/x-www-form-urlencoded;charset=utf-8",
|
||||
"x-requested-with": "XMLHttpRequest"
|
||||
}
|
||||
})
|
||||
},
|
||||
submitSignup() {
|
||||
if (this.pageLoading || this.submitLoading) return
|
||||
if (this.boardingPlaceOptions.length > 0 && !this.signupForm.boardingPlace) {
|
||||
@@ -634,26 +656,23 @@ layout("/layouts/platform_h5.html"){
|
||||
directRelative: this.isDirectFamilyLine(this.signupForm) ? JSON.stringify(this.directRelativeForm) : ""
|
||||
})
|
||||
this.submitLoading = true
|
||||
this.$axios.post("/platform/tour/signup/doSignup", form).then((res) => {
|
||||
this.submitSignupRequest(form).then((resp) => {
|
||||
this.submitLoading = false
|
||||
const res = resp.data || {}
|
||||
if (res.code === 0) {
|
||||
vant.Dialog.alert({
|
||||
title: "提示",
|
||||
message: res.msg || "报名成功",
|
||||
message: res.msg || "恭喜您已报名成功",
|
||||
confirmButtonColor: "#1867b0"
|
||||
}).then(() => {
|
||||
window.location.replace("/platform/tour/signup/h5/signup")
|
||||
})
|
||||
} else {
|
||||
vant.Dialog.alert({
|
||||
title: "提示",
|
||||
message: res.msg || "报名失败",
|
||||
confirmButtonColor: "#1867b0"
|
||||
})
|
||||
this.showSubmitError(res)
|
||||
}
|
||||
}).catch(() => {
|
||||
}).catch((error) => {
|
||||
this.submitLoading = false
|
||||
vant.Toast("报名提交失败")
|
||||
this.showSubmitError(error)
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
@@ -229,7 +229,7 @@ layout("/layouts/platform_h5.html"){
|
||||
</div>
|
||||
|
||||
<div class="tour-detail-footer">
|
||||
<van-button :type="detailActionType()" block round :disabled="detailActionDisabled()" @click="handleDetailAction">
|
||||
<van-button :type="detailActionType()" block round @click="handleDetailAction">
|
||||
{{ detailActionText() }}
|
||||
</van-button>
|
||||
</div>
|
||||
@@ -311,13 +311,7 @@ layout("/layouts/platform_h5.html"){
|
||||
detailActionType() {
|
||||
return this.canRevokeSignup() ? "danger" : "info"
|
||||
},
|
||||
detailActionDisabled() {
|
||||
return this.isSigned() && this.isApprovalSignup() && (this.isFinishedSignup() || this.isRejectedSignup() || (!this.canRevokeSignup() && !this.canModifySignup()))
|
||||
},
|
||||
handleDetailAction() {
|
||||
if (this.detailActionDisabled()) {
|
||||
return
|
||||
}
|
||||
if (this.canRevokeSignup()) {
|
||||
this.revokeSignup()
|
||||
return
|
||||
@@ -522,39 +516,8 @@ layout("/layouts/platform_h5.html"){
|
||||
vant.Toast("报名事项信息不完整")
|
||||
return
|
||||
}
|
||||
const goApply = () => {
|
||||
window.location.href = "/platform/tour/signup/h5/apply?matterId=" + encodeURIComponent(this.matterId)
|
||||
}
|
||||
this.$axios.post("/platform/tour/signup/signupEligibilityNotice", { matterId: this.matterId }).then((res) => {
|
||||
if (res.code !== 0) {
|
||||
vant.Dialog.alert({
|
||||
title: "温馨提醒",
|
||||
message: res.msg || "当前不能报名",
|
||||
confirmButtonColor: "#1867b0"
|
||||
})
|
||||
return
|
||||
}
|
||||
const data = res.data || {}
|
||||
if (!data.noticeRequired) {
|
||||
goApply()
|
||||
return
|
||||
}
|
||||
if (data.canApply) {
|
||||
vant.Dialog.confirm({
|
||||
title: "温馨提醒",
|
||||
message: data.message || "当前可报名,是否继续报名?",
|
||||
confirmButtonText: "继续报名",
|
||||
cancelButtonText: "稍后报名",
|
||||
confirmButtonColor: "#1867b0"
|
||||
}).then(goApply).catch(() => {})
|
||||
} else {
|
||||
vant.Dialog.alert({
|
||||
title: "温馨提醒",
|
||||
message: data.message || "当前不能报名",
|
||||
confirmButtonColor: "#1867b0"
|
||||
})
|
||||
}
|
||||
})
|
||||
// 线路详情底部按钮不做报名资格前置校验,所有业务规则统一放到最终提交报名时处理。
|
||||
window.location.href = "/platform/tour/signup/h5/apply?matterId=" + encodeURIComponent(this.matterId)
|
||||
},
|
||||
revokeSignup() {
|
||||
vant.Dialog.confirm({
|
||||
|
||||
@@ -326,13 +326,12 @@ layout("/layouts/platform_h5.html"){
|
||||
}
|
||||
|
||||
.tour-line-title-row {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 6px;
|
||||
position: relative;
|
||||
padding-right: 76px;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.tour-line-title {
|
||||
.tour-line-title-left {
|
||||
min-width: 0;
|
||||
color: #0f172a;
|
||||
font-size: 16px;
|
||||
@@ -341,9 +340,15 @@ layout("/layouts/platform_h5.html"){
|
||||
word-break: break-word;
|
||||
}
|
||||
|
||||
.tour-line-title {
|
||||
display: inline;
|
||||
}
|
||||
|
||||
.tour-line-type-badge {
|
||||
height: 18px;
|
||||
flex-shrink: 0;
|
||||
display: inline-block;
|
||||
margin-left: 5px;
|
||||
vertical-align: 2px;
|
||||
padding: 0 5px;
|
||||
border: 1px solid #ffd6a8;
|
||||
border-radius: 4px;
|
||||
@@ -355,6 +360,21 @@ layout("/layouts/platform_h5.html"){
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.tour-line-signup-count {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
height: 22px;
|
||||
padding: 0 7px;
|
||||
border-radius: 11px;
|
||||
background: #d9fde8;
|
||||
color: #2fcf6b;
|
||||
font-size: 11px;
|
||||
font-weight: 700;
|
||||
line-height: 22px;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.tour-line-tags {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
@@ -389,7 +409,9 @@ layout("/layouts/platform_h5.html"){
|
||||
|
||||
.tour-line-actions {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
justify-content: flex-end;
|
||||
gap: 8px;
|
||||
margin-top: 8px;
|
||||
}
|
||||
|
||||
@@ -410,6 +432,12 @@ layout("/layouts/platform_h5.html"){
|
||||
background: #ee2f2f;
|
||||
}
|
||||
|
||||
.tour-line-action--plain {
|
||||
border-color: #1e88e5;
|
||||
background: #ffffff;
|
||||
color: #1e88e5;
|
||||
}
|
||||
|
||||
.tour-line-action--disabled {
|
||||
border-color: #d1d5db;
|
||||
background: #e5e7eb;
|
||||
@@ -509,6 +537,7 @@ layout("/layouts/platform_h5.html"){
|
||||
<van-list
|
||||
v-model="loading"
|
||||
:finished="finished"
|
||||
:immediate-check="false"
|
||||
finished-text="没有更多了"
|
||||
@load="loadData">
|
||||
<div class="tour-line-list">
|
||||
@@ -526,11 +555,14 @@ layout("/layouts/platform_h5.html"){
|
||||
</div>
|
||||
<div class="tour-line-main">
|
||||
<div class="tour-line-title-row">
|
||||
<div class="tour-line-title">{{ row.lineName || '未命名线路' }}</div>
|
||||
<span v-if="lineTypeBadge(row.lineType)" class="tour-line-type-badge">{{ lineTypeBadge(row.lineType) }}</span>
|
||||
<span v-if="isSigned(row)" class="tour-line-signed-icon">
|
||||
<van-icon name="good-job"></van-icon>
|
||||
</span>
|
||||
<div class="tour-line-title-left">
|
||||
<div class="tour-line-title">{{ row.lineName || '未命名线路' }}</div>
|
||||
<span v-if="lineTypeBadge(row.lineType)" class="tour-line-type-badge">{{ lineTypeBadge(row.lineType) }}</span>
|
||||
<span v-if="isSigned(row)" class="tour-line-signed-icon">
|
||||
<van-icon name="good-job"></van-icon>
|
||||
</span>
|
||||
</div>
|
||||
<span v-if="hasSignupCount(row)" class="tour-line-signup-count">已报名 {{ row.signupCount }}人</span>
|
||||
</div>
|
||||
<div class="tour-line-tags">
|
||||
<span v-if="row.lotName" class="tour-line-tag">{{ row.lotName }}</span>
|
||||
@@ -556,6 +588,20 @@ layout("/layouts/platform_h5.html"){
|
||||
@click.stop="handleSignupAction(row)">
|
||||
{{ signupActionText(row) }}
|
||||
</button>
|
||||
<button
|
||||
v-if="showLeaveTourAction(row)"
|
||||
type="button"
|
||||
class="tour-line-action tour-line-action--danger"
|
||||
@click.stop="leaveTour(row)">
|
||||
退出疗休养
|
||||
</button>
|
||||
<button
|
||||
v-if="showCancelLineAction(row)"
|
||||
type="button"
|
||||
class="tour-line-action tour-line-action--plain"
|
||||
@click.stop="cancelLine(row)">
|
||||
取消本线路
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -596,7 +642,6 @@ layout("/layouts/platform_h5.html"){
|
||||
list: [],
|
||||
loading: false,
|
||||
finished: false,
|
||||
lineChecking: false,
|
||||
showUnionPopup: false,
|
||||
unionList: [
|
||||
{id: "", name: "全部分工会"}
|
||||
@@ -680,6 +725,9 @@ layout("/layouts/platform_h5.html"){
|
||||
isSigned(row) {
|
||||
return !!(row && (row.signed === true || row.signed === 1 || row.signed === "1" || row.ledgerId))
|
||||
},
|
||||
hasSignupCount(row) {
|
||||
return row && row.signupCount !== undefined && row.signupCount !== null && row.signupCount !== ""
|
||||
},
|
||||
isApprovalSignup(row) {
|
||||
return !!(row && this.isSigned(row) && row.instanceId)
|
||||
},
|
||||
@@ -714,7 +762,13 @@ layout("/layouts/platform_h5.html"){
|
||||
return "报名"
|
||||
},
|
||||
showSignupAction(row) {
|
||||
return this.isSigned(row) && this.canModifySignup(row)
|
||||
return false
|
||||
},
|
||||
showLeaveTourAction(row) {
|
||||
return this.isSigned(row) && this.toBoolean(row && row.canLeaveTour) && !!(row && row.assignmentId)
|
||||
},
|
||||
showCancelLineAction(row) {
|
||||
return this.isSigned(row) && this.toBoolean(row && row.canCancelLine) && !!(row && row.ledgerId)
|
||||
},
|
||||
signupActionDisabled(row) {
|
||||
return !!(this.isSigned(row) && this.isApprovalSignup(row) && (this.isRejectedSignup(row) || (!this.canRevokeSignup(row) && !this.canModifySignup(row))))
|
||||
@@ -737,39 +791,8 @@ layout("/layouts/platform_h5.html"){
|
||||
vant.Toast("报名事项信息不完整")
|
||||
return
|
||||
}
|
||||
const go = () => {
|
||||
window.location.href = "/platform/tour/signup/h5/apply?matterId=" + encodeURIComponent(row.matterId)
|
||||
}
|
||||
this.$axios.post("/platform/tour/signup/signupEligibilityNotice", { matterId: row.matterId }).then((res) => {
|
||||
if (res.code !== 0) {
|
||||
vant.Dialog.alert({
|
||||
title: "温馨提醒",
|
||||
message: res.msg || "当前不能报名",
|
||||
confirmButtonColor: "#1867b0"
|
||||
})
|
||||
return
|
||||
}
|
||||
const data = res.data || {}
|
||||
if (!data.noticeRequired) {
|
||||
go()
|
||||
return
|
||||
}
|
||||
if (data.canApply) {
|
||||
vant.Dialog.confirm({
|
||||
title: "温馨提醒",
|
||||
message: data.message || "当前可报名,是否继续报名?",
|
||||
confirmButtonText: "继续报名",
|
||||
cancelButtonText: "稍后报名",
|
||||
confirmButtonColor: "#1867b0"
|
||||
}).then(go).catch(() => {})
|
||||
} else {
|
||||
vant.Dialog.alert({
|
||||
title: "温馨提醒",
|
||||
message: data.message || "当前不能报名",
|
||||
confirmButtonColor: "#1867b0"
|
||||
})
|
||||
}
|
||||
})
|
||||
// 进入报名页不再提前做资格校验,所有业务校验统一放到最终提交报名时处理。
|
||||
window.location.href = "/platform/tour/signup/h5/apply?matterId=" + encodeURIComponent(row.matterId)
|
||||
},
|
||||
revokeSignup(row) {
|
||||
vant.Dialog.confirm({
|
||||
@@ -787,6 +810,46 @@ layout("/layouts/platform_h5.html"){
|
||||
})
|
||||
}).catch(() => {})
|
||||
},
|
||||
leaveTour(row) {
|
||||
if (!row || !row.assignmentId) {
|
||||
vant.Toast("人员分配信息不完整")
|
||||
return
|
||||
}
|
||||
vant.Dialog.confirm({
|
||||
title: "提示",
|
||||
message: "是否确认退出本次疗休养,退出后将取消报名资格!",
|
||||
confirmButtonColor: "#ee2f2f"
|
||||
}).then(() => {
|
||||
this.$axios.post("/platform/tour/signup/h5/doLeaveTour", { assignmentId: row.assignmentId }).then((res) => {
|
||||
if (res.code === 0) {
|
||||
vant.Toast.success(res.msg || "退出成功")
|
||||
this.doSearch()
|
||||
} else {
|
||||
vant.Dialog.alert({ title: "提示", message: res.msg || "退出失败", confirmButtonColor: "#1867b0" })
|
||||
}
|
||||
})
|
||||
}).catch(() => {})
|
||||
},
|
||||
cancelLine(row) {
|
||||
if (!row || !row.ledgerId) {
|
||||
vant.Toast("报名台账信息不完整")
|
||||
return
|
||||
}
|
||||
vant.Dialog.confirm({
|
||||
title: "提示",
|
||||
message: "是否确认取消本线路?",
|
||||
confirmButtonColor: "#ee2f2f"
|
||||
}).then(() => {
|
||||
this.$axios.post("/platform/tour/signup/h5/doCancelLine", { ledgerId: row.ledgerId }).then((res) => {
|
||||
if (res.code === 0) {
|
||||
vant.Toast.success(res.msg || "取消成功")
|
||||
this.doSearch()
|
||||
} else {
|
||||
vant.Dialog.alert({ title: "提示", message: res.msg || "取消失败", confirmButtonColor: "#1867b0" })
|
||||
}
|
||||
})
|
||||
}).catch(() => {})
|
||||
},
|
||||
doSearch() {
|
||||
this.pageForm.pageNumber = 1
|
||||
this.pageForm.totalCount = 0
|
||||
@@ -799,16 +862,18 @@ layout("/layouts/platform_h5.html"){
|
||||
this.pageForm.lineType = active ? "" : lineType
|
||||
this.pageForm.directFamilyUnitLine = null
|
||||
this.pageForm.travelPeriod = ""
|
||||
this.loadTravelPeriodOptions()
|
||||
this.doSearch()
|
||||
this.loadTravelPeriodOptions(true).then(() => {
|
||||
this.doSearch()
|
||||
})
|
||||
},
|
||||
toggleDirectFamilyLine() {
|
||||
const active = this.pageForm.directFamilyUnitLine === true
|
||||
this.pageForm.directFamilyUnitLine = active ? null : true
|
||||
this.pageForm.lineType = ""
|
||||
this.pageForm.travelPeriod = ""
|
||||
this.loadTravelPeriodOptions()
|
||||
this.doSearch()
|
||||
this.loadTravelPeriodOptions(true).then(() => {
|
||||
this.doSearch()
|
||||
})
|
||||
},
|
||||
openUnionPopup() {
|
||||
this.showUnionPopup = true
|
||||
@@ -849,8 +914,8 @@ layout("/layouts/platform_h5.html"){
|
||||
}))
|
||||
})
|
||||
},
|
||||
loadTravelPeriodOptions() {
|
||||
this.$axios.post("/platform/tour/signup/h5/travelPeriodOptions", {
|
||||
loadTravelPeriodOptions(defaultFirst) {
|
||||
return this.$axios.post("/platform/tour/signup/h5/travelPeriodOptions", {
|
||||
year: this.pageForm.year,
|
||||
lineType: this.pageForm.lineType,
|
||||
directFamilyUnitLine: this.pageForm.directFamilyUnitLine
|
||||
@@ -865,8 +930,15 @@ layout("/layouts/platform_h5.html"){
|
||||
name: item.travelPeriod || "未设置出行时间"
|
||||
}
|
||||
}).filter((item) => item.value).sort((a, b) => {
|
||||
return String(b.value).localeCompare(String(a.value))
|
||||
return String(a.value).localeCompare(String(b.value))
|
||||
})
|
||||
if (defaultFirst) {
|
||||
this.pageForm.travelPeriod = this.travelPeriodList.length > 0 ? this.travelPeriodList[0].value : ""
|
||||
}
|
||||
}).catch(() => {
|
||||
if (defaultFirst) {
|
||||
this.pageForm.travelPeriod = ""
|
||||
}
|
||||
})
|
||||
},
|
||||
loadData() {
|
||||
@@ -901,44 +973,18 @@ layout("/layouts/platform_h5.html"){
|
||||
vant.Toast("线路信息不完整")
|
||||
return
|
||||
}
|
||||
if (this.lineChecking) {
|
||||
return
|
||||
}
|
||||
this.lineChecking = true
|
||||
axios.post("/platform/tour/signup/signupDetail", $.param({ matterId: row.matterId }), {
|
||||
headers: {
|
||||
"Content-Type": "application/x-www-form-urlencoded;charset=utf-8",
|
||||
"x-requested-with": "XMLHttpRequest"
|
||||
}
|
||||
}).then((resp) => {
|
||||
this.lineChecking = false
|
||||
const res = resp.data || {}
|
||||
if (res.code !== 0) {
|
||||
vant.Dialog.alert({
|
||||
title: "温馨提醒",
|
||||
message: res.msg || "当前线路暂不能报名",
|
||||
confirmButtonColor: "#1867b0"
|
||||
})
|
||||
return
|
||||
}
|
||||
window.location.href = "/platform/tour/signup/h5/lineInfo?matterId="
|
||||
+ encodeURIComponent(row.matterId)
|
||||
+ "&lineId="
|
||||
+ encodeURIComponent(row.lineId)
|
||||
}).catch((err) => {
|
||||
this.lineChecking = false
|
||||
vant.Dialog.alert({
|
||||
title: "温馨提醒",
|
||||
message: err && err.msg ? err.msg : "当前线路暂不能报名",
|
||||
confirmButtonColor: "#1867b0"
|
||||
})
|
||||
})
|
||||
// 点击线路只进入详情页,报名资格和业务规则统一在提交报名按钮处校验。
|
||||
window.location.href = "/platform/tour/signup/h5/lineInfo?matterId="
|
||||
+ encodeURIComponent(row.matterId)
|
||||
+ "&lineId="
|
||||
+ encodeURIComponent(row.lineId)
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.loadUnionOptions()
|
||||
this.loadTravelPeriodOptions()
|
||||
this.loadData()
|
||||
this.loadTravelPeriodOptions(true).then(() => {
|
||||
this.loadData()
|
||||
})
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
@@ -575,11 +575,7 @@ const home = {
|
||||
|
||||
.quick-scroll {
|
||||
width: 100%;
|
||||
overflow-x: auto;
|
||||
overflow-y: hidden;
|
||||
-webkit-overflow-scrolling: touch;
|
||||
scrollbar-width: none;
|
||||
-ms-overflow-style: none;
|
||||
overflow: visible;
|
||||
}
|
||||
|
||||
.quick-scroll::-webkit-scrollbar {
|
||||
@@ -588,10 +584,9 @@ const home = {
|
||||
|
||||
.quick-scroll-grid {
|
||||
display: grid;
|
||||
grid-auto-flow: column;
|
||||
grid-template-rows: repeat(2, 82px);
|
||||
grid-auto-columns: 25%;
|
||||
min-width: 100%;
|
||||
grid-template-columns: repeat(4, minmax(0, 1fr));
|
||||
grid-auto-rows: 82px;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.quick-entry-item {
|
||||
|
||||
Reference in New Issue
Block a user