..
This commit is contained in:
@@ -318,7 +318,7 @@ layout("/layouts/platform.html"){
|
||||
</div>
|
||||
<div class="route-info-item">
|
||||
<span class="route-info-label">已报名人数</span>
|
||||
<span class="route-info-value">
|
||||
<span class="route-info-value" @click="viewSignUpUser(item)">
|
||||
<span class="badge badge-primary">{{ item.signUpUserNum }}</span>
|
||||
</span>
|
||||
</div>
|
||||
@@ -350,7 +350,7 @@ layout("/layouts/platform.html"){
|
||||
</div>
|
||||
</guava>
|
||||
|
||||
<line-sign-up ref="lineSignUpRef" @view-line="openLine"></line-sign-up>
|
||||
<line-sign-up ref="lineSignUpRef" @view-line="openLine" @view-user="viewSignUpUser"></line-sign-up>
|
||||
|
||||
<el-dialog :title="baseName + '报名'" width="60%" :visible.sync="baseVisible" :close-on-click-modal="false" :close-on-press-escape="false">
|
||||
<base-sign-up ref="baseRef" :config_data="config" @success="baseSuccess"></base-sign-up>
|
||||
@@ -365,6 +365,27 @@ layout("/layouts/platform.html"){
|
||||
<el-button type="primary" @click="lineDialogVisible = false">关 闭</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
|
||||
|
||||
<el-dialog title="报名人员" :visible.sync="signUpUserVisible" :close-on-click-modal="false"
|
||||
:close-on-press-escape="false" append-to-body>
|
||||
|
||||
<div style="width: 300px">
|
||||
<el-input placeholder="请输入姓名查询" v-model="signUpUserPageForm.searchKeyWord">
|
||||
<el-button slot="append" icon="el-icon-search" @click="getSignUpUserData"></el-button>
|
||||
</el-input>
|
||||
</div>
|
||||
|
||||
<el-table :data="signUpUserTableData" max-height="70vh">
|
||||
<el-table-column type="index" label="序号"></el-table-column>
|
||||
<el-table-column prop="userName" label="姓名"></el-table-column>
|
||||
<el-table-column prop="loginName" label="工号"></el-table-column>
|
||||
<el-table-column prop="mobile" label="手机号"></el-table-column>
|
||||
<el-table-column prop="unitName" label="单位"></el-table-column>
|
||||
<el-table-column prop="unionName" label="分工会"></el-table-column>
|
||||
</el-table>
|
||||
</el-dialog>
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
@@ -401,6 +422,12 @@ layout("/layouts/platform.html"){
|
||||
|
||||
// 查看详情
|
||||
lineDialogVisible: false,
|
||||
|
||||
// 报名人员
|
||||
signUpUserPageForm: {},
|
||||
signUpUserVisible: false,
|
||||
signUpUserTableData: []
|
||||
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
@@ -512,6 +539,32 @@ layout("/layouts/platform.html"){
|
||||
this.$refs.lineRef.openInit(row.usId, row.id)
|
||||
})
|
||||
},
|
||||
|
||||
// 查看报名人员
|
||||
viewSignUpUser(row) {
|
||||
this.signUpUserVisible = true
|
||||
this.signUpUserPageForm = {
|
||||
baseId: row.id,
|
||||
usId: row.usId,
|
||||
searchKeyWord: null
|
||||
}
|
||||
this.getSignUpUserData()
|
||||
},
|
||||
|
||||
getSignUpUserData() {
|
||||
$.post('/platform/theRapyRecuperation/line/enroll/openSignUser', this.signUpUserPageForm).then(res => {
|
||||
if (res.code === 0) {
|
||||
if (jQuery.isEmptyObject(res.data)) {
|
||||
this.signUpUserTableData = []
|
||||
} else {
|
||||
this.signUpUserTableData = Object.values(res.data).flatMap(v => v)
|
||||
}
|
||||
} else {
|
||||
this.$message.error(res.msg)
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
},
|
||||
created() {
|
||||
this.pageData();
|
||||
|
||||
@@ -82,8 +82,8 @@ const LineSignUp = {
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="350px">
|
||||
<template slot-scope="scope">
|
||||
<el-button size="mini"
|
||||
:type="selectedTime && selectedTime.usId === scope.row.usId ? 'success' : 'primary'"
|
||||
<el-button size="mini"
|
||||
:type="selectedTime && selectedTime.usId === scope.row.usId ? 'success' : 'primary'"
|
||||
@click="handleCurrentChange(scope.row)">
|
||||
{{ selectedTime && selectedTime.usId === scope.row.usId ? '已选择' : '选择' }}
|
||||
</el-button>
|
||||
@@ -121,7 +121,7 @@ const LineSignUp = {
|
||||
<el-input v-model="signupForm.idCard" placeholder="请输入身份证号"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="手机号" prop="mobile"
|
||||
:rules="[{required: true, message: '请输入手机号', trigger: 'blur'},{pattern: /^1[3-9]\d{8}$/, message: '请输入正确的手机号', trigger: ['change','blur']}]">
|
||||
:rules="[{required: true, message: '请输入手机号', trigger: 'blur'},{pattern: /^1[3-9]\\d{9}$/, message: '请输入正确的手机号', trigger: ['change','blur']}]">
|
||||
<el-input v-model="signupForm.mobile" placeholder="请输入手机号"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="所属工会" prop="unionName">
|
||||
@@ -186,7 +186,7 @@ const LineSignUp = {
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item :label="'手机号'" :prop="'companionList.' + index + '.mobile'"
|
||||
:rules="[{required: true, message: '请输入手机号', trigger: 'blur'},{pattern: /^1[3-9]\d{8}$/, message: '请输入正确的手机号', trigger: ['change','blur']}]">
|
||||
:rules="[{required: true, message: '请输入手机号', trigger: 'blur'},{pattern: /^1[3-9]\\d{9}$/, message: '请输入正确的手机号', trigger: ['change','blur']}]">
|
||||
<el-input v-model="person.mobile" placeholder="请输入手机号"></el-input>
|
||||
</el-form-item>
|
||||
|
||||
@@ -296,18 +296,8 @@ const LineSignUp = {
|
||||
<el-button @click="onReadSafe" type="primary">我已阅读确认</el-button>
|
||||
</el-row>
|
||||
</el-dialog>
|
||||
|
||||
<el-dialog title="报名人员" :visible.sync="signUpUserVisible" :close-on-click-modal="false"
|
||||
:close-on-press-escape="false" append-to-body>
|
||||
<el-table :data="signUpUserTableData">
|
||||
|
||||
</el-table>
|
||||
</el-dialog>
|
||||
|
||||
|
||||
</el-dialog>
|
||||
`,
|
||||
data() {
|
||||
`, data() {
|
||||
return {
|
||||
visible: false,
|
||||
line: {},
|
||||
@@ -331,21 +321,18 @@ const LineSignUp = {
|
||||
|
||||
rules: {},
|
||||
|
||||
basicRoomColumns: [
|
||||
{label: '0.5间(一张床)', value: 0.5},
|
||||
{label: '1间(两张床)', value: 1},
|
||||
{label: '1.5间(三张床)', value: 1.5},
|
||||
{label: '2间(四张床)', value: 2},
|
||||
],
|
||||
basicRoomColumns: [{label: '0.5间(一张床)', value: 0.5}, {
|
||||
label: '1间(两张床)',
|
||||
value: 1
|
||||
}, {label: '1.5间(三张床)', value: 1.5}, {label: '2间(四张床)', value: 2},],
|
||||
roomColumns: [],
|
||||
basicRoomRemarkColumns: [
|
||||
{label: '携带家属,1间房', value: 1},
|
||||
{label: '已与其他老师自由组合共住1间房', value: 2},
|
||||
{label: '1间房,额外支付单房差', value: 3},
|
||||
{label: '正常报名', value: 4},
|
||||
{label: '随机拼房', value: 5},
|
||||
{label: '2间房,额外支付单房差', value: 6},
|
||||
],
|
||||
basicRoomRemarkColumns: [{label: '携带家属,1间房', value: 1}, {
|
||||
label: '已与其他老师自由组合共住1间房',
|
||||
value: 2
|
||||
}, {label: '1间房,额外支付单房差', value: 3}, {label: '正常报名', value: 4}, {
|
||||
label: '随机拼房',
|
||||
value: 5
|
||||
}, {label: '2间房,额外支付单房差', value: 6},],
|
||||
roomRemarkColumns: [],
|
||||
|
||||
// 第二意向线路
|
||||
@@ -360,12 +347,6 @@ const LineSignUp = {
|
||||
|
||||
// 报名id
|
||||
enrollId: null,
|
||||
|
||||
// 报名人员
|
||||
signUpUserVisible: false,
|
||||
signUpUserTableData: [],
|
||||
signUpUserSearchKeyWord: null
|
||||
|
||||
}
|
||||
},
|
||||
|
||||
@@ -383,18 +364,14 @@ const LineSignUp = {
|
||||
};
|
||||
this.roomColumns = bedCountStrategies[bedCount]?.() || [];
|
||||
this.signupForm.carryFamilyNum = companionCount
|
||||
},
|
||||
deep: true,
|
||||
immediate: true
|
||||
},
|
||||
'signupForm.roomCount'(oldVal, newVal) {
|
||||
}, deep: true, immediate: true
|
||||
}, 'signupForm.roomCount'(oldVal, newVal) {
|
||||
if (newVal && oldVal !== newVal) {
|
||||
this.$set(this.signupForm, 'roomRemark', '')
|
||||
this.$set(this.signupForm, 'roomRemarkName', '')
|
||||
}
|
||||
this.updateRoomRemarkColumns()
|
||||
},
|
||||
'signupForm.roomRemark'(val) {
|
||||
}, 'signupForm.roomRemark'(val) {
|
||||
if (val) {
|
||||
this.$set(this.signupForm, 'roomRemarkName', this.roomRemarkColumns.find(o => o.value === val)?.label)
|
||||
} else {
|
||||
@@ -432,14 +409,12 @@ const LineSignUp = {
|
||||
|
||||
// 获取出行时间
|
||||
async getPlayTimes() {
|
||||
const {code, data, msg} = await $.post('/platform/theRapyRecuperation/line/enroll/getSelectLineById',
|
||||
{
|
||||
lineId: this.line.lineId,
|
||||
unionId: this.pageForm.unionId,
|
||||
theRapyRecuperationType: this.pageForm.theRapyRecuperationType,
|
||||
lineUnionType: this.pageForm.lineUnionType,
|
||||
}
|
||||
)
|
||||
const {code, data, msg} = await $.post('/platform/theRapyRecuperation/line/enroll/getSelectLineById', {
|
||||
lineId: this.line.lineId,
|
||||
unionId: this.pageForm.unionId,
|
||||
theRapyRecuperationType: this.pageForm.theRapyRecuperationType,
|
||||
lineUnionType: this.pageForm.lineUnionType,
|
||||
})
|
||||
if (code === 0) {
|
||||
this.playTimes = data
|
||||
}
|
||||
@@ -447,17 +422,7 @@ const LineSignUp = {
|
||||
|
||||
// 查看报名人员
|
||||
viewSignUpUser(row) {
|
||||
$.post('/platform/theRapyRecuperation/line/enroll/openSignUser', {
|
||||
usId: row.usId,
|
||||
searchKeyWord: this.signUpUserSearchKeyWord
|
||||
}).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.signUpUserTableData = res.data
|
||||
this.signUpUserVisible = true
|
||||
} else {
|
||||
this.$message.error(res.msg)
|
||||
}
|
||||
})
|
||||
this.$emit('view-user', row)
|
||||
},
|
||||
|
||||
// 选择出行时间
|
||||
@@ -539,8 +504,7 @@ const LineSignUp = {
|
||||
const today = new Date();
|
||||
let age = today.getFullYear() - birthDate.getFullYear();
|
||||
|
||||
if (today.getMonth() < birthDate.getMonth() ||
|
||||
(today.getMonth() === birthDate.getMonth() && today.getDate() < birthDate.getDate())) {
|
||||
if (today.getMonth() < birthDate.getMonth() || (today.getMonth() === birthDate.getMonth() && today.getDate() < birthDate.getDate())) {
|
||||
age--;
|
||||
}
|
||||
|
||||
@@ -554,20 +518,15 @@ const LineSignUp = {
|
||||
const companionCount = companionList.length;
|
||||
|
||||
const roomCountStrategies = {
|
||||
0.5: () => [2, 5],
|
||||
1: () => {
|
||||
0.5: () => [2, 5], 1: () => {
|
||||
if (companionCount === 0) return [3];
|
||||
if (companionCount === 1) return [4];
|
||||
return [1];
|
||||
},
|
||||
1.5: () => [1, 3],
|
||||
2: () => companionCount < 3 ? [6] : [4]
|
||||
}, 1.5: () => [1, 3], 2: () => companionCount < 3 ? [6] : [4]
|
||||
};
|
||||
|
||||
const matchedValues = roomCountStrategies[roomCount]?.();
|
||||
this.roomRemarkColumns = matchedValues !== undefined
|
||||
? this.basicRoomRemarkColumns.filter(o => matchedValues.includes(o.value))
|
||||
: [...this.basicRoomRemarkColumns]; // 默认处理:恢复基础列
|
||||
this.roomRemarkColumns = matchedValues !== undefined ? this.basicRoomRemarkColumns.filter(o => matchedValues.includes(o.value)) : [...this.basicRoomRemarkColumns]; // 默认处理:恢复基础列
|
||||
|
||||
// 如果最后的roomRemarkColumns的length只有1,直接默认第一个元素显示
|
||||
if (this.roomRemarkColumns.length === 1) {
|
||||
@@ -629,8 +588,7 @@ const LineSignUp = {
|
||||
})
|
||||
},
|
||||
|
||||
},
|
||||
style: /*language=CSS*/ `
|
||||
}, style: /*language=CSS*/ `
|
||||
.line-sign-up-dialog .el-dialog__body {
|
||||
padding: 0 20px 20px 20px;
|
||||
max-height: 70vh;
|
||||
@@ -674,7 +632,7 @@ const LineSignUp = {
|
||||
border-radius: 4px;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
|
||||
.time-table .el-table__header th {
|
||||
background-color: #f2f6fc;
|
||||
color: #606266;
|
||||
@@ -682,18 +640,18 @@ const LineSignUp = {
|
||||
}
|
||||
|
||||
.time-table .selected-row {
|
||||
background-color: #c1dbf7!important;
|
||||
background-color: #c1dbf7 !important;
|
||||
font-weight: 500;
|
||||
position: relative;
|
||||
transition: all 0.3s ease;
|
||||
box-shadow: 0 0 10px rgba(64, 158, 255, 0.3);
|
||||
}
|
||||
|
||||
|
||||
.time-table .selected-row td {
|
||||
background-color: #e6f1ff;
|
||||
color: #409EFF;
|
||||
}
|
||||
|
||||
|
||||
.time-table .selected-row td:first-child {
|
||||
border-left: none;
|
||||
}
|
||||
@@ -743,7 +701,7 @@ const LineSignUp = {
|
||||
padding-top: 20px;
|
||||
border-top: 1px solid #EBEEF5;
|
||||
}
|
||||
|
||||
|
||||
.el-form-item__label {
|
||||
font-weight: 500;
|
||||
}
|
||||
@@ -786,14 +744,14 @@ const LineSignUp = {
|
||||
background-color: #f4f4f5;
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
|
||||
/* 响应式调整 */
|
||||
@media (max-width: 768px) {
|
||||
.line-sign-up-dialog .el-dialog {
|
||||
width: 95% !important;
|
||||
margin-top: 10px !important;
|
||||
}
|
||||
|
||||
|
||||
.time-table {
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user