feat: v3版疗休养优化6

This commit is contained in:
2026-10-26 16:50:49 +08:00
parent 4c03b389d4
commit 56cc3fee91
30 changed files with 868 additions and 342 deletions
@@ -52,7 +52,7 @@ public class TherapyCommonController {
@SaCheckLogin
public Result unions(Boolean isPermission) {
Cnd cnd = Cnd.NEW();
cnd.asc("unionname");
cnd.asc("unionCode");
if (Boolean.TRUE.equals(isPermission) && !TherapyContext.hasAnyRoles("sysadmin,A06")) {
cnd.and("id", "=", TherapyContext.getUnionId());
}
@@ -62,7 +62,13 @@ public class TheRapyRecuperationConfigController {
@ViReturn
@SaCheckLogin
@Aop(TransAop.READ_COMMITTED)
public Object operation(TheRapyRecuperationConfig config, String[] lotDeleteList, String unionLineNumberConfigs) {
public Object operation(TheRapyRecuperationConfig config, String[] lotDeleteList, String unionLineNumberConfigs, String lots) {
if (Strings.isNotBlank(lots)) {
config.setLots(Json.fromJsonAsList(TheRapyRecuperationLot.class, lots));
}
if (config.getLots() == null) {
config.setLots(new ArrayList<>());
}
// unionLineNumberConfigs 为前端分工会线路数量配置 JSON 数组,返回保存后的配置对象仍由 findOne 接口按实体结构回显。
config.setUnionLineNumberConfigs(Strings.isBlank(unionLineNumberConfigs)
? new ArrayList<>()
@@ -76,7 +82,9 @@ public class TheRapyRecuperationConfigController {
for (TheRapyRecuperationLot obj : collect) {
obj.setConfigId(config.getId());
}
dao.insert(collect);
if (!collect.isEmpty()) {
dao.insert(collect);
}
} else {
dao.insertWith(config, "lots");
}
@@ -105,11 +105,11 @@ const nation = [
'基诺族'
];
const loc = () => {
function loc() {
return location.href.replace(location.search, "").replace(location.hash, "")
}
const clone = (obj) => {
function clone(obj) {
return JSON.parse(JSON.stringify(obj))
}
@@ -1,4 +1,7 @@
const sublime = {
jumpPagePjax(url) {
window.location.href = url;
},
showLoadingbar() {
if (!document.getElementById('therapy-loading')) {
const bar = document.createElement('div');
@@ -12,6 +15,77 @@ const sublime = {
}
};
Vue.prototype.$validateForm = function(form) {
return new Promise(resolve => {
if (!form) {
this.$message.error('表单尚未加载完成');
resolve(false);
return;
}
const uploading = component => {
if (Array.isArray(component.uploadFiles) && component.uploadFiles.some(file => file.status === 'uploading')) return true;
return (component.$children || []).some(uploading);
};
if (uploading(form)) {
this.$message.warning('请等待图片或附件上传完成后再提交');
resolve(false);
return;
}
form.validate((valid, fields) => {
if (!valid) {
const errors = Object.values(fields || {}).flat();
this.$message.warning(errors.length ? errors[0].message : '请检查必填项和填写格式');
}
resolve(valid);
});
});
};
Vue.prototype.$confirmAction = async function(...args) {
try {
return await this.$confirm(...args);
} catch (error) {
if (error === 'cancel' || error === 'close') return false;
throw error;
}
};
Vue.prototype.$actionError = function(error) {
if (error === 'cancel' || error === 'close') return;
const message = error && (error.responseJSON && error.responseJSON.msg || error.msg || error.message);
this.$message.error(message || '操作失败,请稍后重试');
};
Vue.prototype.$downloadFile = function(url) {
window.location.href = url;
};
Vue.prototype.$importExcel = function(url, files) {
const data = new FormData();
files.forEach(file => data.append('file', file.raw, file.raw.name));
return $.ajax({url: url, type: 'POST', data: data, processData: false, contentType: false});
};
Vue.directive('throttle', {
bind(el) {
let lastClick = 0;
el.therapyThrottleHandler = event => {
const now = Date.now();
if (now - lastClick < 1000) {
event.preventDefault();
event.stopImmediatePropagation();
return;
}
lastClick = now;
};
el.addEventListener('click', el.therapyThrottleHandler, true);
},
unbind(el) {
el.removeEventListener('click', el.therapyThrottleHandler, true);
delete el.therapyThrottleHandler;
}
});
$.ajaxSetup({
traditional: true,
error(xhr) {
@@ -54,7 +54,7 @@ const initTableMixins = {
removeFile()
}
if (size && !file.size < size) {
if (size && file.size > size) {
this.notifyWarning(`文件大小不能超过 ${size / 1024 / 1024}MB!`)
removeFile()
}
@@ -104,7 +104,10 @@ const initTableMixins = {
} else {
this.$message.error(data.msg);
}
}, "json");
}, "json").always(() => {
sublime.closeLoadingbar();
this.tableLoading = false;
});
},
notifySuccess(msg) {
this.$notify({
@@ -280,9 +280,11 @@ module.exports = {
if (v.data && v.data.code === 0) {
insertImgFn(v.data.data)
} else {
this.$message.error("图片上传失败")
_this.$message.error(v.data && v.data.msg || "图片上传失败")
}
})
}).catch(() => {
_this.$message.error("图片上传失败,请重试")
})
}
this.editor.config.pasteFilterStyle = false
@@ -1,12 +1,14 @@
<template>
<el-drawer title="参加人员范围设置" :visible.sync="userScopeDialog" size="90%" :append-to-body="true" @closed="loadGroups">
<el-drawer title="参加人员范围设置" :visible.sync="userScopeDialog" size="40%" :append-to-body="true" @closed="loadGroups">
<div style="padding:0 20px 10px">
<el-select :value="group_id" placeholder="选择疗休养参加人员分组" filterable clearable @change="$emit('update:group_id', $event)">
<el-select :value="group_id" placeholder="选择疗休养参加人员分组" filterable clearable style="width:100%" @change="$emit('update:group_id', $event)">
<el-option v-for="group in groups" :key="group.groupId" :label="group.groupName" :value="group.groupId"></el-option>
</el-select>
<el-button type="text" @click="loadGroups">刷新分组</el-button>
</div>
<iframe v-if="userScopeDialog" src="/platform/activity/basic/scope" title="参加人员范围设置" style="width:100%;height:calc(100vh - 150px);border:0"></iframe>
<div style="padding:0 20px;text-align:right">
<el-button type="primary" @click="userScopeDialog = false">确定</el-button>
</div>
</el-drawer>
</template>
<script>
@@ -74,17 +74,17 @@
<el-table-column label="身份证号" prop="idCard"></el-table-column>
<el-table-column label="年龄" prop="age"></el-table-column>
<el-table-column label="床型" prop="bedType">
<template scope="{row}">
<template slot-scope="{row}">
{{ row.bedInfo?.bedType }}
</template>
</el-table-column>
<el-table-column label="床位" prop="bedNum">
<template scope="{row}">
<template slot-scope="{row}">
{{ row.bedInfo?.bedNum }}
</template>
</el-table-column>
<el-table-column label="意向拼床人" prop="otherSleepUser">
<template scope="{row}">
<template slot-scope="{row}">
{{ row.bedInfo?.otherSleepUser ? row.bedInfo?.otherSleepUser : '暂无' }}
</template>
</el-table-column>
@@ -3,9 +3,9 @@
<div v-if="view">
<a v-for="file in files" :key="file.id || file.filepath" :href="file.downloadPath || file.filepath || preview(file.id)" target="_blank" style="display:block">{{ file.name || file.filename }}</a>
</div>
<el-upload v-else action="/platform/inclusiveTherapyV3/common/uploadFile" name="file"
<el-upload v-else action="/platform/sys/file/uploadDynamicReturnUrl" name="file"
:limit="max" :multiple="max > 1" :file-list="fileList" :drag="card"
:before-upload="beforeUpload" :on-success="success" :on-remove="remove" :on-preview="open">
:before-upload="beforeUpload" :on-success="success" :on-error="error" :on-remove="remove" :on-preview="open">
<el-button size="small" type="primary">选择文件</el-button>
<div slot="tip"><slot></slot></div>
</el-upload>
@@ -32,10 +32,17 @@ module.exports = {
list.splice(list.indexOf(file), 1);
this.$message.error(result.msg); return;
}
file.rawInfo = result.data;
file.url = result.data.downloadPath || result.data.filepath;
if (typeof result.data !== 'string' || !result.data) {
list.splice(list.indexOf(file), 1);
this.$message.error('上传未返回文件地址'); return;
}
const id = new URL(result.data, window.location.origin).searchParams.get('id');
file.rawInfo = {id: id, name: file.name, filename: file.name,
downloadPath: result.data, filepath: result.data, url: result.data};
file.url = result.data;
this.emit(list);
},
error() { this.$message.error('文件上传失败,请重试'); },
remove(file, list) { this.emit(list); },
emit(list) {
this.$emit('update:files', list.map(file => file.rawInfo || file.response && file.response.data).filter(Boolean));
@@ -1,7 +1,7 @@
<template>
<el-upload action="/platform/inclusiveTherapyV3/common/uploadFile" name="file" list-type="picture-card"
<el-upload action="/platform/sys/file/uploadDynamicReturnUrl" name="file" list-type="picture-card"
:file-list="fileList" :limit="limit" :before-upload="beforeUpload"
:on-success="success" :on-remove="remove" :on-preview="open"
:on-success="success" :on-error="error" :on-exceed="exceed" :on-remove="remove" :on-preview="open"
:style="{'--therapy-width': width + 'px', '--therapy-height': height + 'px'}">
<i class="el-icon-plus"></i>
</el-upload>
@@ -30,16 +30,27 @@ module.exports = {
list.splice(list.indexOf(file), 1);
this.$message.error(result.msg); return;
}
file.url = result.data.filepath;
file.storedValue = result.data.filepath;
if (typeof result.data !== 'string' || !result.data) {
list.splice(list.indexOf(file), 1);
this.$message.error('上传未返回图片地址'); return;
}
file.url = result.data;
file.storedValue = result.data;
this.emit(list);
},
error() { this.$message.error('图片上传失败,请重试'); },
exceed() { this.$message.warning('最多上传' + this.limit + '张图片'); },
remove(file, list) { this.emit(list); },
emit(list) {
const values = list.map(file => file.storedValue).filter(Boolean);
this.$emit('input', Array.isArray(this.value) ? values : values[0] || '');
},
open(file) { window.open(file.url); }
open(file) {
const img = new Image();
img.src = file.url;
const viewer = new Viewer(img, {hidden() { viewer.destroy(); }});
viewer.show();
}
}
};
</script>
@@ -67,17 +67,17 @@
<el-table-column label="身份证号" prop="idCard"></el-table-column>
<el-table-column label="年龄" prop="age"></el-table-column>
<el-table-column label="床型" prop="bedType">
<template scope="{row}">
<template slot-scope="{row}">
{{ row.bedInfo?.bedType }}
</template>
</el-table-column>
<el-table-column label="床位" prop="bedNum">
<template scope="{row}">
<template slot-scope="{row}">
{{ row.bedInfo?.bedNum }}
</template>
</el-table-column>
<el-table-column label="意向拼床人" prop="otherSleepUser">
<template scope="{row}">
<template slot-scope="{row}">
{{ row.bedInfo?.otherSleepUser ? row.bedInfo?.otherSleepUser : '暂无' }}
</template>
</el-table-column>
@@ -243,22 +243,22 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
<el-table-column
align="center"
header-align="center"
v-for="column in tableColumns"
v-for="column in tableColumns" :key="column.prop"
show-overflow-tooltip
:label="column.label"
:prop="column.prop"
:sortable="column.sortable"
>
<template scope="{row}" v-if="column.prop=='isTransferIn'">
<template slot-scope="{row}" v-if="column.prop=='isTransferIn'">
<sapn v-if="row.takePartInUnionId!=unionId">转出</sapn>
<sapn v-else-if="row.selfUnionId!=unionId">转入</sapn>
<sapn v-else>否</sapn>
</template>
<template scope="{row}" v-else-if="column.prop=='lineName'">
<template slot-scope="{row}" v-else-if="column.prop=='lineName'">
<el-link type="primary" @click="openLine(row)">{{row.lineName}}
</el-link>
</template>
<template scope="{row}" v-else-if="column.prop=='isFamily'">
<template slot-scope="{row}" v-else-if="column.prop=='isFamily'">
<el-link v-if="!row.familyNumber" type="primary" @click="openView(row)">
{{row.isFamily?'携带':'未携带'}}({{row.isFamily}})
</el-link>
@@ -266,18 +266,19 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
{{row.familyNumber?'携带':'未携带'}}({{row.familyNumber}})
</el-link>
</template>
<template scope="{row}" v-else-if="column.prop=='num'">
<template slot-scope="{row}" v-else-if="column.prop=='num'">
{{1+row.num}}
</template>
<template scope="{row}" v-else-if="column.prop=='stateId'">
<template slot-scope="{row}" v-else-if="column.prop=='stateId'">
<span v-if="row.stateId">
<vi-table-state :state="row"></vi-table-state>
</span>
<sapn v-else style="color: #67C23A">暂无</sapn>
</template>
<template slot-scope="{row}" v-else>{{row[column.prop]}}</template>
</el-table-column>
<el-table-column align="center" header-align="center" label="操作" width="180px">
<template scope="{row}">
<template slot-scope="{row}">
<el-dropdown @command="dropdownCommand">
<el-button plain size="mini">
<i class="ti-settings"></i>
@@ -474,17 +475,17 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
<el-table-column label="身份证号" prop="idCard" show-overflow-tooltip></el-table-column>
<el-table-column label="年龄" prop="age"></el-table-column>
<el-table-column label="床型" prop="bedType">
<template scope="{row}">
<template slot-scope="{row}">
{{ row.bedInfo?.bedType }}
</template>
</el-table-column>
<el-table-column label="床位" prop="bedNum">
<template scope="{row}">
<template slot-scope="{row}">
{{ row.bedInfo?.bedNum }}
</template>
</el-table-column>
<el-table-column label="意向拼床人" prop="otherSleepUser">
<template scope="{row}">
<template slot-scope="{row}">
{{ row.bedInfo?.otherSleepUser ?
row.bedInfo?.otherSleepUser : '暂无' }}
</template>
@@ -647,7 +648,11 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
}
},
async doDelete(row) {
this.$confirm("您确定要删除【<span style='color: red'>" + row.userName + "</span>】的此条报名信息吗?", '提示', {
if (!this._therapyActions) this._therapyActions = new Set()
if (this._therapyActions.has('doDelete')) return
this._therapyActions.add('doDelete')
try {
await this.$confirm("您确定要删除【<span style='color: red'>" + row.userName + "</span>】的此条报名信息吗?", '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
dangerouslyUseHTMLString: true,
@@ -665,6 +670,11 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
}
}
})
} catch (error) {
this.$actionError(error)
} finally {
this._therapyActions.delete('doDelete')
}
},
async openModify(row) {
this.getUnionSelectLine(row.takePartInLineId)
@@ -689,8 +699,13 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
this.editVisible = true
},
async doEdit() {
this.$refs['editForm'].validate().then(async () => {
const confirm = await this.$confirm('您确定要修改这位老师的报名信息吗?', '提示', {
if (!this._therapyActions) this._therapyActions = new Set()
if (this._therapyActions.has('doEdit')) return
this._therapyActions.add('doEdit')
try {
return await this.$validateForm(this.$refs['editForm']).then(async valid => {
if (!valid) return
const confirm = await this.$confirmAction('您确定要修改这位老师的报名信息吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
@@ -710,6 +725,11 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
}
}
})
} catch (error) {
this.$actionError(error)
} finally {
this._therapyActions.delete('doEdit')
}
},
async lineChange(val) {
this.pageForm.selectId = '';
@@ -727,6 +747,10 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
}
},
async doOnekeyAudit(flag, adjustment) {
if (!this._therapyActions) this._therapyActions = new Set()
if (this._therapyActions.has('doOnekeyAudit')) return
this._therapyActions.add('doOnekeyAudit')
try {
let msg = '';
if (adjustment && !flag) {
msg = '您确定要一键【调整】您所勾选的报名信息吗,调整后该报名信息将不会在审核列表中展示, 是否继续?'
@@ -735,7 +759,7 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
} else if (!adjustment && flag) {
msg = '您确定要一键【通过】您所勾选的报名信息吗,是否继续?'
}
const confirm = await this.$confirm(msg, '提示', {
const confirm = await this.$confirmAction(msg, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
@@ -756,6 +780,11 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
this.dialogVisible = false
}
}
} catch (error) {
this.$actionError(error)
} finally {
this._therapyActions.delete('doOnekeyAudit')
}
},
async openOnekeyAudit() {
if (this.tableSelection.length === 0) {
@@ -798,7 +827,11 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
}
},
async doRecall(row) {
const confirm = await this.$confirm('您确定要撤回吗, 是否继续?', '提示', {
if (!this._therapyActions) this._therapyActions = new Set()
if (this._therapyActions.has('doRecall')) return
this._therapyActions.add('doRecall')
try {
const confirm = await this.$confirmAction('您确定要撤回吗, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
@@ -812,8 +845,17 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
this.$notify.warning({title: '失败', message: resp.msg});
}
}
} catch (error) {
this.$actionError(error)
} finally {
this._therapyActions.delete('doRecall')
}
},
async doAudit(flag, adjustment) {
if (!this._therapyActions) this._therapyActions = new Set()
if (this._therapyActions.has('doAudit')) return
this._therapyActions.add('doAudit')
try {
let msg = '';
if (adjustment && !flag) {
msg = '您确定要【调整】该报名信息吗,调整后该报名信息将不会在审核列表中展示, 是否继续?'
@@ -822,7 +864,7 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
} else if (!adjustment && flag) {
msg = '您确定要【通过】该报名信息吗,是否继续?'
}
const confirm = await this.$confirm(msg, '提示', {
const confirm = await this.$confirmAction(msg, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
@@ -845,6 +887,11 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
}
} catch (error) {
this.$actionError(error)
} finally {
this._therapyActions.delete('doAudit')
}
},
openLine(row) {
this.$refs.guava.public()
@@ -171,18 +171,18 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
<el-table-column
align="center"
header-align="center"
v-for="column in tableColumns"
v-for="column in tableColumns" :key="column.prop"
show-overflow-tooltip
:label="column.label"
:prop="column.prop"
:sortable="column.sortable"
>
<template scope="{row}" v-if="column.prop=='isTransferIn'">
<template slot-scope="{row}" v-if="column.prop=='isTransferIn'">
<sapn v-if="row.takePartInUnionId!=unionId">转出</sapn>
<sapn v-else-if="row.selfUnionId!=unionId">转入</sapn>
<sapn v-else>否</sapn>
</template>
<template scope="{row}" v-else-if="column.prop=='isFamily'">
<template slot-scope="{row}" v-else-if="column.prop=='isFamily'">
<el-link v-if="!row.familyNumber" type="primary" @click="openUser(row)">
{{row.isFamily?'携带':'未携带'}}({{row.isFamily}})
</el-link>
@@ -190,18 +190,19 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
{{row.familyNumber?'携带':'未携带'}}({{row.familyNumber}})
</el-link>
</template>
<template scope="{row}" v-else-if="column.prop=='num'">
<template slot-scope="{row}" v-else-if="column.prop=='num'">
{{1+row.num}}
</template>
<template scope="{row}" v-else-if="column.prop=='stateId'">
<template slot-scope="{row}" v-else-if="column.prop=='stateId'">
<span v-if="row.stateId">
<vi-table-state :state="row"></vi-table-state>
</span>
<sapn v-else style="color: #67C23A">暂无</sapn>
</template>
<template slot-scope="{row}" v-else>{{row[column.prop]}}</template>
</el-table-column>
<el-table-column align="center" header-align="center" label="操作" width="180px">
<template scope="{row}">
<template slot-scope="{row}">
<el-dropdown @command="dropdownCommand">
<el-button plain size="mini">
<i class="ti-settings"></i>
@@ -383,17 +384,17 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
<el-table-column label="身份证号" prop="idCard" show-overflow-tooltip></el-table-column>
<el-table-column label="年龄" prop="age"></el-table-column>
<el-table-column label="床型" prop="bedType">
<template scope="{row}">
<template slot-scope="{row}">
{{ row.bedInfo.bedType }}
</template>
</el-table-column>
<el-table-column label="床位" prop="bedNum">
<template scope="{row}">
<template slot-scope="{row}">
{{ row.bedInfo.bedNum }}
</template>
</el-table-column>
<el-table-column label="意向拼床人" prop="otherSleepUser">
<template scope="{row}">
<template slot-scope="{row}">
{{ row.bedInfo.otherSleepUser ?
row.bedInfo.otherSleepUser : '暂无' }}
</template>
@@ -520,7 +521,11 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
}
},
async doDelete(row) {
this.$confirm("您确定要删除【<span style='color: red'>" + row.userName + "</span>】的此条报名信息吗?", '提示', {
if (!this._therapyActions) this._therapyActions = new Set()
if (this._therapyActions.has('doDelete')) return
this._therapyActions.add('doDelete')
try {
await this.$confirm("您确定要删除【<span style='color: red'>" + row.userName + "</span>】的此条报名信息吗?", '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
dangerouslyUseHTMLString: true,
@@ -538,6 +543,11 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
}
}
})
} catch (error) {
this.$actionError(error)
} finally {
this._therapyActions.delete('doDelete')
}
},
async openModify(row) {
this.editFormData = {};
@@ -561,8 +571,13 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
this.editVisible = true
},
async doEdit() {
this.$refs['editForm'].validate().then(async () => {
const confirm = await this.$confirm('您确定要修改这位老师的报名信息吗?', '提示', {
if (!this._therapyActions) this._therapyActions = new Set()
if (this._therapyActions.has('doEdit')) return
this._therapyActions.add('doEdit')
try {
return await this.$validateForm(this.$refs['editForm']).then(async valid => {
if (!valid) return
const confirm = await this.$confirmAction('您确定要修改这位老师的报名信息吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
@@ -582,8 +597,17 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
}
}
})
} catch (error) {
this.$actionError(error)
} finally {
this._therapyActions.delete('doEdit')
}
},
async doOnekeyAudit(flag, adjustment) {
if (!this._therapyActions) this._therapyActions = new Set()
if (this._therapyActions.has('doOnekeyAudit')) return
this._therapyActions.add('doOnekeyAudit')
try {
let msg = '';
if (adjustment && !flag) {
msg = '您确定要一键【调整】您所勾选的报名信息吗,调整后该报名信息将不会在审核列表中展示, 是否继续?'
@@ -592,7 +616,7 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
} else if (!adjustment && flag) {
msg = '您确定要一键【通过】您所勾选的报名信息吗,是否继续?'
}
const confirm = await this.$confirm(msg, '提示', {
const confirm = await this.$confirmAction(msg, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
@@ -613,6 +637,11 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
this.dialogVisible = false
}
}
} catch (error) {
this.$actionError(error)
} finally {
this._therapyActions.delete('doOnekeyAudit')
}
},
async openOnekeyAudit() {
if (this.tableSelection.length === 0) {
@@ -655,7 +684,11 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
}
},
async doRecall(row) {
const confirm = await this.$confirm('您确定要撤回吗, 是否继续?', '提示', {
if (!this._therapyActions) this._therapyActions = new Set()
if (this._therapyActions.has('doRecall')) return
this._therapyActions.add('doRecall')
try {
const confirm = await this.$confirmAction('您确定要撤回吗, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
@@ -669,8 +702,17 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
this.$notify.warning({title: '失败', message: resp.msg});
}
}
} catch (error) {
this.$actionError(error)
} finally {
this._therapyActions.delete('doRecall')
}
},
async doAudit(flag, adjustment) {
if (!this._therapyActions) this._therapyActions = new Set()
if (this._therapyActions.has('doAudit')) return
this._therapyActions.add('doAudit')
try {
let msg = '';
if (adjustment && !flag) {
msg = '您确定要【调整】该报名信息吗,调整后该报名信息将不会在审核列表中展示, 是否继续?'
@@ -679,7 +721,7 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
} else if (!adjustment && flag) {
msg = '您确定要【通过】该报名信息吗,是否继续?'
}
const confirm = await this.$confirm(msg, '提示', {
const confirm = await this.$confirmAction(msg, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
@@ -702,6 +744,11 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
}
} catch (error) {
this.$actionError(error)
} finally {
this._therapyActions.delete('doAudit')
}
},
openEdit(row) {
this.$set(this.formData, "isTransferIn", row.isTransferIn)
@@ -237,22 +237,22 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
<el-table-column
align="center"
header-align="center"
v-for="column in tableColumns"
v-for="column in tableColumns" :key="column.prop"
show-overflow-tooltip
:label="column.label"
:prop="column.prop"
:sortable="column.sortable"
>
<template scope="{row}" v-if="column.prop=='isTransferIn'">
<template slot-scope="{row}" v-if="column.prop=='isTransferIn'">
<sapn v-if="row.takePartInUnionId!=unionId">转出</sapn>
<sapn v-else-if="row.selfUnionId!=unionId">转入</sapn>
<sapn v-else>否</sapn>
</template>
<template scope="{row}" v-else-if="column.prop=='lineName'">
<template slot-scope="{row}" v-else-if="column.prop=='lineName'">
<el-link type="primary" @click="openLine(row)">{{row.lineName}}
</el-link>
</template>
<template scope="{row}" v-else-if="column.prop=='isFamily'">
<template slot-scope="{row}" v-else-if="column.prop=='isFamily'">
<el-link v-if="!row.familyNumber" type="primary" @click="openView(row)">
{{row.isFamily?'携带':'未携带'}}({{row.isFamily}})
</el-link>
@@ -260,18 +260,19 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
{{row.familyNumber?'携带':'未携带'}}({{row.familyNumber}})
</el-link>
</template>
<template scope="{row}" v-else-if="column.prop=='num'">
<template slot-scope="{row}" v-else-if="column.prop=='num'">
{{1+row.num}}
</template>
<template scope="{row}" v-else-if="column.prop=='stateId'">
<template slot-scope="{row}" v-else-if="column.prop=='stateId'">
<span v-if="row.stateId">
<vi-table-state :state="row"></vi-table-state>
</span>
<sapn v-else style="color: #67C23A">暂无</sapn>
</template>
<template slot-scope="{row}" v-else>{{row[column.prop]}}</template>
</el-table-column>
<el-table-column align="center" header-align="center" label="操作" width="180px">
<template scope="{row}">
<template slot-scope="{row}">
<el-dropdown @command="dropdownCommand">
<el-button plain size="mini">
<i class="ti-settings"></i>
@@ -468,17 +469,17 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
<el-table-column label="身份证号" prop="idCard" show-overflow-tooltip></el-table-column>
<el-table-column label="年龄" prop="age"></el-table-column>
<el-table-column label="床型" prop="bedType">
<template scope="{row}">
<template slot-scope="{row}">
{{ row.bedInfo?.bedType }}
</template>
</el-table-column>
<el-table-column label="床位" prop="bedNum">
<template scope="{row}">
<template slot-scope="{row}">
{{ row.bedInfo?.bedNum }}
</template>
</el-table-column>
<el-table-column label="意向拼床人" prop="otherSleepUser">
<template scope="{row}">
<template slot-scope="{row}">
{{ row.bedInfo?.otherSleepUser ?
row.bedInfo?.otherSleepUser : '暂无' }}
</template>
@@ -642,8 +643,12 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
this.doDelete(data)
}
},
async doDelete(row){
this.$confirm("您确定要删除【<span style='color: red'>" + row.userName + "</span>】的此条报名信息吗?", '提示', {
async doDelete(row) {
if (!this._therapyActions) this._therapyActions = new Set()
if (this._therapyActions.has('doDelete')) return
this._therapyActions.add('doDelete')
try {
await this.$confirm("您确定要删除【<span style='color: red'>" + row.userName + "</span>】的此条报名信息吗?", '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
dangerouslyUseHTMLString: true,
@@ -661,6 +666,11 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
}
}
})
} catch (error) {
this.$actionError(error)
} finally {
this._therapyActions.delete('doDelete')
}
},
async openModify(row) {
this.getUnionSelectLine(row.takePartInLineId)
@@ -685,8 +695,13 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
this.editVisible = true
},
async doEdit() {
this.$refs['editForm'].validate().then(async () => {
const confirm = await this.$confirm('您确定要修改这位老师的报名信息吗?', '提示', {
if (!this._therapyActions) this._therapyActions = new Set()
if (this._therapyActions.has('doEdit')) return
this._therapyActions.add('doEdit')
try {
return await this.$validateForm(this.$refs['editForm']).then(async valid => {
if (!valid) return
const confirm = await this.$confirmAction('您确定要修改这位老师的报名信息吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
@@ -707,6 +722,11 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
}
}
})
} catch (error) {
this.$actionError(error)
} finally {
this._therapyActions.delete('doEdit')
}
},
async lineChange(val) {
console.log(val)
@@ -739,6 +759,10 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
this.lineSignNumber = resp.data
},
async doOnekeyAudit(flag, adjustment) {
if (!this._therapyActions) this._therapyActions = new Set()
if (this._therapyActions.has('doOnekeyAudit')) return
this._therapyActions.add('doOnekeyAudit')
try {
let msg = '';
if (adjustment && !flag) {
msg = '您确定要一键【调整】您所勾选的报名信息吗,调整后该报名信息将不会在审核列表中展示, 是否继续?'
@@ -747,7 +771,7 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
} else if (!adjustment && flag) {
msg = '您确定要一键【通过】您所勾选的报名信息吗,是否继续?'
}
const confirm = await this.$confirm(msg, '提示', {
const confirm = await this.$confirmAction(msg, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
@@ -768,6 +792,11 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
this.dialogVisible = false
}
}
} catch (error) {
this.$actionError(error)
} finally {
this._therapyActions.delete('doOnekeyAudit')
}
},
async openOnekeyAudit() {
if (this.tableSelection.length === 0) {
@@ -801,7 +830,11 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
}
},
async doRecall(row) {
const confirm = await this.$confirm('您确定要撤回吗, 是否继续?', '提示', {
if (!this._therapyActions) this._therapyActions = new Set()
if (this._therapyActions.has('doRecall')) return
this._therapyActions.add('doRecall')
try {
const confirm = await this.$confirmAction('您确定要撤回吗, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
@@ -816,8 +849,17 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
}
}
} catch (error) {
this.$actionError(error)
} finally {
this._therapyActions.delete('doRecall')
}
},
async doAudit(flag, adjustment) {
if (!this._therapyActions) this._therapyActions = new Set()
if (this._therapyActions.has('doAudit')) return
this._therapyActions.add('doAudit')
try {
let msg = '';
if (adjustment && !flag) {
msg = '您确定要【调整】该报名信息吗,调整后该报名信息将不会在审核列表中展示, 是否继续?'
@@ -826,7 +868,7 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
} else if (!adjustment && flag) {
msg = '您确定要【通过】该报名信息吗,是否继续?'
}
const confirm = await this.$confirm(msg, '提示', {
const confirm = await this.$confirmAction(msg, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
@@ -848,6 +890,11 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
}
}
} catch (error) {
this.$actionError(error)
} finally {
this._therapyActions.delete('doAudit')
}
},
openLine(row) {
this.$refs.guava.public()
@@ -92,9 +92,9 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
align="center"
header-align="center"
show-overflow-tooltip
v-for="column in tableColumns"
v-for="column in tableColumns" :key="column.prop"
>
<template scope="{row}" v-if="column.prop==='isDisabled'">
<template slot-scope="{row}" v-if="column.prop==='isDisabled'">
<el-switch
:active-value="false"
:inactive-value="true"
@@ -104,20 +104,21 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
v-model="row.isDisabled">
</el-switch>
</template>
<template scope="{row}" v-else-if="column.prop==='lotId'">
<template slot-scope="{row}" v-else-if="column.prop==='lotId'">
<div v-for="item in modifyBdList">
<span v-if="row.lotId===item.id">{{item.lotName}}</span>
</div>
</template>
<template scope="{row}" v-else-if="column.prop==='activityTime'">
<template slot-scope="{row}" v-else-if="column.prop==='activityTime'">
<span>
{{row.activityStartTime + '至' + row.activityEndTime}}
</span>
</template>
<template slot-scope="{row}" v-else>{{row[column.prop]}}</template>
</el-table-column>
<el-table-column label="操作" width="250px">
<template scope="{row}">
<template slot-scope="{row}">
<el-button @click="openView(row.id)" size="mini" type="primary">查看</el-button>
<el-button @click="openEdit(row.id)" size="mini" type="primary">编辑</el-button>
<el-button @click="doDelete(row.id)" size="mini" type="danger">删除</el-button>
@@ -356,7 +357,7 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
<el-timeline-item timestamp="下载模板" placement="top">
<el-card>
<el-button size="medium" type=""
@click="location.href='/platform/inclusiveTherapyV3/baseManagement/exportTemplate'"
@click="$downloadFile('/platform/inclusiveTherapyV3/baseManagement/exportTemplate')"
icon="el-icon-download">下载模板
</el-button>
@@ -366,6 +367,7 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
<el-card>
<el-form>
<el-upload
action="/platform/inclusiveTherapyV3/baseManagement/importBaseManager"
name="file"
ref="upload"
:on-remove="(file, fileList) => {importData.fileList = fileHandleRemove(file, fileList)}"
@@ -556,15 +558,28 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
}
},
async baseStatusChange(id) {
if (!this._therapyActions) this._therapyActions = new Set()
if (this._therapyActions.has('baseStatusChange')) return
this._therapyActions.add('baseStatusChange')
try {
const resp = await $.post(loc() + '/openClosedBase/' + id)
if (resp.code === 0) {
this.notifySuccess(resp.msg)
} else {
this.notifyWarning(resp.msg)
}
} catch (error) {
this.$actionError(error)
} finally {
this._therapyActions.delete('baseStatusChange')
}
},
async doDelete(id) {
const confirm = await this.$confirm('您确定要删除吗?', '提示', {
if (!this._therapyActions) this._therapyActions = new Set()
if (this._therapyActions.has('doDelete')) return
this._therapyActions.add('doDelete')
try {
const confirm = await this.$confirmAction('您确定要删除吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
@@ -578,12 +593,22 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
} else {
this.notifyWarning(resp.msg)
}
} catch (error) {
this.$actionError(error)
} finally {
this._therapyActions.delete('doDelete')
}
},
async doSubmit() {
const valid = await this.$refs['form'].validate()
if (!this._therapyActions) this._therapyActions = new Set()
if (this._therapyActions.has('doSubmit')) return
this._therapyActions.add('doSubmit')
let loading = null
try {
const valid = await this.$validateForm(this.$refs['form'])
if (!valid) return
const loading = this.$loading({
loading = this.$loading({
lock: true,
text: '提交中',
spinner: 'el-icon-loading',
@@ -591,7 +616,6 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
});
const resp = await $.post(loc() + '/doSubmit', {base: JSON.stringify(this.formData)})
loading.close()
if (resp.code === 0) {
this.$refs.guava.index()
this.notifySuccess(resp.msg)
@@ -599,6 +623,12 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
} else {
this.notifyWarning(resp.msg)
}
} catch (error) {
this.$actionError(error)
} finally {
if (loading) loading.close()
this._therapyActions.delete('doSubmit')
}
},
yearChange() {
this.formData.travelAgencyId = null
@@ -649,37 +679,28 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
}
this.importVisible = true;
},
doImport() {
if (this.importData.fileList.length === 0) {
this.notifyWarning("请选择文件!")
async doImport() {
if (this.importLoading) return
const files = this.importData.fileList || []
if (!files.length || files.some(file => !file.raw)) {
this.notifyWarning('请选择要导入的Excel文件')
return
}
const data = new FormData();
this.importData.fileList.forEach((val) => {
data.append("file", val.raw, val.raw.name);
});
this.importLoading = true
$.ajax({
url: loc() + "/importBaseManager",
type: "post",
data: data,
processData: false,
contentType: false,
success: (data) => {
if (data.code === 0){
this.$message.success(data.msg)
this.pageData();
this.importVisible = false
this.importLoading = false
}else {
this.importVisible = false
}
},
error: (data) => {
this.notifyWarning("导入失败")
this.importLoading = false
try {
const resp = await this.$importExcel('/platform/inclusiveTherapyV3/baseManagement/importBaseManager', files)
if (resp.code === 0) {
this.notifySuccess(resp.msg || '导入成功')
this.pageData()
this.importVisible = false
} else {
this.notifyWarning(resp.msg || '导入失败')
}
});
} catch (error) {
this.$actionError(error)
} finally {
this.importLoading = false
}
},
},
async created() {
@@ -22,24 +22,24 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
<div class="search">
<div class="search-item">
<div class="search-item-label">年度范围:</div>
<div class="search-item-option">
<div class="search-item-option" style="display:flex;align-items:center;gap:10px">
<el-date-picker
v-model="pageForm.startYear"
type="year"
class="picker-year"
format="yyyy"
style="width: 46%"
style="flex:1;width:0;min-width:0"
value-format="yyyy"
@change="handleChangeYear"
>
</el-date-picker>
<span>至</span>
<span style="flex-shrink:0">至</span>
<el-date-picker
v-model="pageForm.endYear"
type="year"
class="picker-year"
format="yyyy"
style="width: 46%"
style="flex:1;width:0;min-width:0"
value-format="yyyy"
@change="handleChangeYear"
>
@@ -276,7 +276,7 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
<el-form-item label="线路类型" prop="regionalNature">
<el-radio-group class="mr0-radio" size="small" v-model="formData.regionalNature">
<el-radio :label="item.value"
border v-for="item in regionalNatureList">
border v-for="(item, therapyIndex) in regionalNatureList" :key="item.id || item.code || therapyIndex">
{{item.label}}
</el-radio>
</el-radio-group>
@@ -333,7 +333,7 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
<el-radio-group class="mr0-radio" size="small" v-model="formData.signUpMode">
<el-radio :label="item.value" v-if="isShow(item.roles)"
size="small"
border v-for="item in signUpModeList">
border v-for="(item, therapyIndex) in signUpModeList" :key="item.id || item.code || therapyIndex">
{{item.label}}
</el-radio>
</el-radio-group>
@@ -813,10 +813,15 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
}
},
async doSubmit() {
const valid = await this.$refs['form'].validate()
if (!this._therapyActions) this._therapyActions = new Set()
if (this._therapyActions.has('doSubmit')) return
this._therapyActions.add('doSubmit')
let loading = null
try {
const valid = await this.$validateForm(this.$refs['form'])
if (!valid) return
const loading = this.$loading({
loading = this.$loading({
lock: true,
text: '提交中',
spinner: 'el-icon-loading',
@@ -824,10 +829,9 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
});
delete this.formData.travelAgency
const resp = await $.post(loc() + '/doSubmit', this.formData)
loading.close()
if (resp.code === 0) {
this.$message.success(resp.msg)
this.$confirm('需要将该线路设置为出行线路吗?', '提示', {
await this.$confirm('需要将该线路设置为出行线路吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
@@ -844,17 +848,36 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
} else {
this.$message.warning(resp.msg)
}
} catch (error) {
this.$actionError(error)
} finally {
if (loading) loading.close()
this._therapyActions.delete('doSubmit')
}
},
async lineStatusChange(id) {
if (!this._therapyActions) this._therapyActions = new Set()
if (this._therapyActions.has('lineStatusChange')) return
this._therapyActions.add('lineStatusChange')
try {
const resp = await $.post(loc() + '/openClosedLine/' + id)
if (resp.code === 0) {
this.notifySuccess(resp.msg)
} else {
this.notifyWarning(resp.msg)
}
} catch (error) {
this.$actionError(error)
} finally {
this._therapyActions.delete('lineStatusChange')
}
},
async doDelete(id) {
const confirm = await this.$confirm('可能会导致数据不完整,您确定要删除吗?', '提示', {
if (!this._therapyActions) this._therapyActions = new Set()
if (this._therapyActions.has('doDelete')) return
this._therapyActions.add('doDelete')
try {
const confirm = await this.$confirmAction('可能会导致数据不完整,您确定要删除吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
@@ -868,6 +891,11 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
} else {
this.notifyWarning(resp.msg)
}
} catch (error) {
this.$actionError(error)
} finally {
this._therapyActions.delete('doDelete')
}
},
async openView(id) {
this.$refs.guava.view()
@@ -387,7 +387,11 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
this.editDialogVisible = true
},
async doSubmit() {
const valid = await this.$refs['form'].validate()
if (!this._therapyActions) this._therapyActions = new Set()
if (this._therapyActions.has('doSubmit')) return
this._therapyActions.add('doSubmit')
try {
const valid = await this.$validateForm(this.$refs['form'])
if (!valid) return
const resp = await $.post(loc() + '/doSubmit', {travelAgency: JSON.stringify(this.formData)})
if (resp.code === 0) {
@@ -397,17 +401,35 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
} else {
this.notifyWarning(resp.msg)
}
} catch (error) {
this.$actionError(error)
} finally {
this._therapyActions.delete('doSubmit')
}
},
async travelAgencyStatusChange(id) {
if (!this._therapyActions) this._therapyActions = new Set()
if (this._therapyActions.has('travelAgencyStatusChange')) return
this._therapyActions.add('travelAgencyStatusChange')
try {
const resp = await $.post(loc() + '/openClosedTravelAgency/' + id)
if (resp.code === 0) {
this.notifySuccess(resp.msg)
} else {
this.notifyWarning(resp.msg)
}
} catch (error) {
this.$actionError(error)
} finally {
this._therapyActions.delete('travelAgencyStatusChange')
}
},
async doDelete(id) {
const confirm = await this.$confirm('可能会导致数据不完整,您确定要删除吗?', '提示', {
if (!this._therapyActions) this._therapyActions = new Set()
if (this._therapyActions.has('doDelete')) return
this._therapyActions.add('doDelete')
try {
const confirm = await this.$confirmAction('可能会导致数据不完整,您确定要删除吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
@@ -421,6 +443,11 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
} else {
this.notifyWarning(resp.msg)
}
} catch (error) {
this.$actionError(error)
} finally {
this._therapyActions.delete('doDelete')
}
},
async openView(row) {
@@ -27,7 +27,14 @@
<script src="${base!}/assets/staffbenefit/therapyRecuperation/component.js"></script>
<script src="${base!}/assets/staffbenefit/therapyRecuperation/initTableMixins.js"></script>
<script src="${base!}/assets/staffbenefit/therapyRecuperation/compat.js"></script>
<script src="${base!}/assets/platform/js/util/commonUtil.js"></script>
<script src="${base!}/assets/platform/js/tool/businessTool.js"></script>
<script>
Vue.prototype.$axios = commonUtil.axiosService();
Vue.prototype.$businessTool = businessTool;
Vue.prototype.$downLoad = commonUtil.downLoadService;
Vue.prototype.$download = commonUtil.downLoadService;
Vue.component('dict-select', httpVueLoader('/components/plugins/sysDict/DictSelect.vue'));
Vue.component('guava', httpVueLoader('/components/staffbenefit/therapyRecuperation/Guava.vue'));
Vue.component('text-editor', httpVueLoader('/components/plugins/sysTextEditor/index.vue'));
Vue.component('file-upload', httpVueLoader('/components/staffbenefit/therapyRecuperation/FileUpload.vue'));
@@ -283,15 +283,15 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
<!--# if(@com.budwk.app.zhgh.staffbenefit.therapyRecuperation.support.TherapyContext.hasRole('H04')){ #-->
<template>
<el-button icon="el-icon-s-promotion"
@click="location.href='/platform/inclusiveTherapyV3/query/exportDeclareForm'"
@click="$downloadFile('/platform/inclusiveTherapyV3/query/exportDeclareForm')"
size="small" type="primary">申报表导出
</el-button>
<el-button icon="el-icon-s-promotion"
@click="location.href='/platform/inclusiveTherapyV3/query/exportTravelers?year=' + pageForm.year"
@click="$downloadFile('/platform/inclusiveTherapyV3/query/exportTravelers?year=' + pageForm.year)"
size="small" type="primary">出行人员导出
</el-button>
<el-button icon="el-icon-s-promotion"
@click="location.href='/platform/inclusiveTherapyV3/query/exportSignUser?year=' + pageForm.year"
@click="$downloadFile('/platform/inclusiveTherapyV3/query/exportSignUser?year=' + pageForm.year)"
size="small" type="primary">本分工会报名人员导出
</el-button>
</template>
@@ -346,7 +346,7 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
<el-table-column align="center" header-align="center" type="index" label="序号"
width="80px" key="#index">
<template scope="scope">
<template slot-scope="scope">
<span>{{scope.$index+(pageForm.pageNumber - 1) * pageForm.pageSize + 1}} </span>
</template>
</el-table-column>
@@ -354,17 +354,17 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
<el-table-column
align="center"
header-align="center"
v-for="column in tableColumns"
v-for="column in tableColumns" :key="column.prop"
show-overflow-tooltip
:label="column.label"
:prop="column.prop"
:sortable="column.sortable"
>
<template scope="{row}" v-if="column.prop=='lineName'">
<template slot-scope="{row}" v-if="column.prop=='lineName'">
<el-link type="primary" @click="openLine(row)">{{row.lineName}}
</el-link>
</template>
<template scope="{row}" v-else-if="column.prop=='isFamily'">
<template slot-scope="{row}" v-else-if="column.prop=='isFamily'">
<el-link v-if="!row.familyNumber" type="primary" @click="openView(row)">
{{row.isFamily?'携带':'未携带'}}({{row.isFamily}})
</el-link>
@@ -372,7 +372,7 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
{{row.familyNumber?'携带':'未携带'}}({{row.familyNumber}})
</el-link>
</template>
<template scope="{row}" v-else-if="column.prop=='lineNum'">
<template slot-scope="{row}" v-else-if="column.prop=='lineNum'">
<span v-if="!row.familyNumber" >
{{row.lineNum}}({{row.signUpUserFamilyNum}})
@@ -383,21 +383,21 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
</template>
<template scope="{row}" v-else-if="column.prop=='signUpMode'">
<template slot-scope="{row}" v-else-if="column.prop=='signUpMode'">
{{signUpModeName(row.signUpMode)}}
</template>
<template scope="{row}" v-else-if="column.prop=='agencyNum'">
<template slot-scope="{row}" v-else-if="column.prop=='agencyNum'">
<el-link type="primary" @click="openApplyUser(row)">{{row.agencyNum}}
</el-link>
</template>
<template scope="{row}" v-else-if="column.prop=='times'">
<template slot-scope="{row}" v-else-if="column.prop=='times'">
<div v-if="row.playStartTime">{{row.playStartTime}}</div>
<div v-else>{{row.playStartTime1}}</div>
</template>
<template scope="{row}" v-else-if="column.prop=='isTakePartIn'">
<template slot-scope="{row}" v-else-if="column.prop=='isTakePartIn'">
{{row.isTakePartIn?'已参加':'未参加'}}
</template>
<template scope="{row}" v-else-if="column.prop=='stateId'">
<template slot-scope="{row}" v-else-if="column.prop=='stateId'">
<span v-if="row.stateId">
<vi-table-state :state="row"></vi-table-state>
</span>-->
@@ -409,15 +409,16 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
{{row.travelAgencyName}}
</el-link>
</template>-->
<template scope="{row}" v-else-if="column.prop=='lineOrMaName'">
<template slot-scope="{row}" v-else-if="column.prop=='lineOrMaName'">
{{row.lineName?row.lineName:row.baseName?row.baseName:row.travelAgencyName}}
</template>
<template scope="{row:{officialWebsite}}"
<template slot-scope="{row:{officialWebsite}}"
v-else-if="column.prop==='officialWebsite'">
<a :href="officialWebsite" class="text-primary" target="_blank">
{{officialWebsite}}
</a>
</template>
<template slot-scope="{row}" v-else>{{row[column.prop]}}</template>
</el-table-column>
<!-- <el-table-column label="家属信息" type="expand" width="100px"
v-if="pageForm.lb==='ry'">
@@ -458,13 +459,13 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
header-align="center"
label="标段"
sortable>
<template scope="{row}">
<template slot-scope="{row}">
{{row.lotName}}
</template>
</el-table-column>
<el-table-column label="操作" width="250px"
v-if="pageForm.lb==='ry'||pageForm.lb===''||pageForm.lb==='xl'">
<template scope="{row}">
<template slot-scope="{row}">
<template v-if="pageForm.lb==='xl'">
<el-button @click="openApplyUser(row)" size="mini" type="primary">
查看
@@ -494,7 +495,7 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
</el-table-column>
<el-table-column label="操作" width="250px" v-if="pageForm.lb==='lxs'">
<template scope="{row}">
<template slot-scope="{row}">
<el-button @click="doEmail(row)" size="mini" type="primary">发送
</el-button>
</template>
@@ -525,7 +526,7 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
row-key="id" @sort-change="pageOrder"
v-loading="tableLoading">
<el-table-column label="家属信息" type="expand" width="150px">
<template scope="{row}">
<template slot-scope="{row}">
<el-card shadow="never">
<h4 slot="header" style="color: #1867b0">
家属信息
@@ -536,17 +537,17 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
<el-table-column label="身份证号" prop="idCard"></el-table-column>
<el-table-column label="年龄" prop="age"></el-table-column>
<el-table-column label="床型" prop="bedType">
<template scope="{row}">
<template slot-scope="{row}">
{{ row.bedInfo?.bedType }}
</template>
</el-table-column>
<el-table-column label="床位" prop="bedNum">
<template scope="{row}">
<template slot-scope="{row}">
{{ row.bedInfo?.bedNum }}
</template>
</el-table-column>
<el-table-column label="意向拼床人" prop="otherSleepUser">
<template scope="{row}">
<template slot-scope="{row}">
{{ row.bedInfo?.otherSleepUser ?
row.bedInfo?.otherSleepUser : '暂无' }}
</template>
@@ -558,26 +559,27 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
</el-table-column>
<el-table-column align="center" header-align="center" type="index" label="序号"
width="80px">
<template scope="scope">
<template slot-scope="scope">
<span>{{scope.$index+(pageFormUser.pageNumber - 1) * pageFormUser.pageSize + 1}} </span>
</template>
</el-table-column>
<el-table-column
align="center"
header-align="center"
v-for="column in tableColumnUsers"
v-for="(column, therapyIndex) in tableColumnUsers"
show-overflow-tooltip
:label="column.label"
:prop="column.prop"
:sortable="column.sortable"
>
:key="column.id || column.code || therapyIndex">
<template scope="{row}" v-if="column.prop=='isFamily'">
<template slot-scope="{row}" v-if="column.prop=='isFamily'">
{{row.isFamily?'携带':'未携带'}}
</template>
<template slot-scope="{row}" v-else>{{row[column.prop]}}</template>
</el-table-column>
<el-table-column label="操作" width="250px">
<template scope="{row}">
<template slot-scope="{row}">
<el-button @click="openView(row)" size="mini" type="primary">查看
</el-button>
</template>
@@ -706,7 +708,7 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
<el-timeline-item timestamp="下载模板" placement="top">
<el-card>
<el-button size="small" type=""
@click="location.href='/platform/inclusiveTherapyV3/common/downloadTemplate?filePath=travel/TravelEnrollImport.xlsx&fileName=参加人员导入模板.xls'"
@click="$downloadFile('/platform/inclusiveTherapyV3/common/downloadTemplate?filePath=travel/TravelEnrollImport.xlsx&fileName=参加人员导入模板.xls')"
icon="el-icon-download">下载模板
</el-button>
</el-card>
@@ -715,6 +717,7 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
<el-card>
<el-form>
<el-upload
action="/platform/inclusiveTherapyV3/user/query/enrollImport"
name="file"
ref="upload"
:on-remove="(file, fileList) => {
@@ -758,17 +761,17 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
<el-table-column label="身份证号" prop="idCard"></el-table-column>
<el-table-column label="年龄" prop="age"></el-table-column>
<el-table-column label="床型" prop="bedType">
<template scope="{row}">
<template slot-scope="{row}">
{{ row.bedInfo.bedType }}
</template>
</el-table-column>
<el-table-column label="床位" prop="bedNum">
<template scope="{row}">
<template slot-scope="{row}">
{{ row.bedInfo.bedNum }}
</template>
</el-table-column>
<el-table-column label="意向拼床人" prop="otherSleepUser">
<template scope="{row}">
<template slot-scope="{row}">
{{ row.bedInfo.otherSleepUser ?
row.bedInfo.otherSleepUser : '暂无' }}
</template>
@@ -834,17 +837,17 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
<el-table-column label="身份证号" prop="idCard" show-overflow-tooltip></el-table-column>
<el-table-column label="年龄" prop="age"></el-table-column>
<el-table-column label="床型" prop="bedType">
<template scope="{row}">
<template slot-scope="{row}">
{{ row.bedInfo?.bedType }}
</template>
</el-table-column>
<el-table-column label="床位" prop="bedNum">
<template scope="{row}">
<template slot-scope="{row}">
{{ row.bedInfo?.bedNum }}
</template>
</el-table-column>
<el-table-column label="意向拼床人" prop="otherSleepUser">
<template scope="{row}">
<template slot-scope="{row}">
{{ row.bedInfo?.otherSleepUser ?
row.bedInfo?.otherSleepUser : '暂无' }}
</template>
@@ -1029,7 +1032,11 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
}
})
},
async doReimbursement(){
async doReimbursement() {
if (!this._therapyActions) this._therapyActions = new Set()
if (this._therapyActions.has('doReimbursement')) return
this._therapyActions.add('doReimbursement')
try {
if (this.multipleSelection && this.multipleSelection.length > 0){
const enrollIds = this.multipleSelection.filter(v=>v.isTakePartIn).map(v=>v.id)
@@ -1046,7 +1053,7 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
return
}
console.log(enrollIds)
this.$confirm(msg, '提示', {
await this.$confirm(msg, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
dangerouslyUseHTMLString: true,
@@ -1072,6 +1079,11 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
} else {
this.$message.warning('请勾选需要报销的报名信息')
}
} catch (error) {
this.$actionError(error)
} finally {
this._therapyActions.delete('doReimbursement')
}
},
async lineChange(val) {
this.pageForm.selectId = '';
@@ -1097,7 +1109,11 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
}
},
async doDelete(row) {
this.$confirm("您确定要删除【<span style='color: red'>" + row.userName + "</span>】的此条报名信息吗?", '提示', {
if (!this._therapyActions) this._therapyActions = new Set()
if (this._therapyActions.has('doDelete')) return
this._therapyActions.add('doDelete')
try {
await this.$confirm("您确定要删除【<span style='color: red'>" + row.userName + "</span>】的此条报名信息吗?", '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
dangerouslyUseHTMLString: true,
@@ -1115,6 +1131,11 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
}
}
})
} catch (error) {
this.$actionError(error)
} finally {
this._therapyActions.delete('doDelete')
}
},
async doSearch() {
this.pageForm.pageNumber = 1;
@@ -1123,8 +1144,13 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
await this.getXlByUnion()
},
async doEdit() {
this.$refs['editForm'].validate().then(async () => {
const confirm = await this.$confirm('您确定要修改这位老师的报名信息吗?', '提示', {
if (!this._therapyActions) this._therapyActions = new Set()
if (this._therapyActions.has('doEdit')) return
this._therapyActions.add('doEdit')
try {
return await this.$validateForm(this.$refs['editForm']).then(async valid => {
if (!valid) return
const confirm = await this.$confirmAction('您确定要修改这位老师的报名信息吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
@@ -1144,6 +1170,11 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
}
}
})
} catch (error) {
this.$actionError(error)
} finally {
this._therapyActions.delete('doEdit')
}
},
async openEdit(row) {
this.editFormData = {};
@@ -1224,6 +1255,10 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
this.multipleSelection = val;
},
async doAttend() {
if (!this._therapyActions) this._therapyActions = new Set()
if (this._therapyActions.has('doAttend')) return
this._therapyActions.add('doAttend')
try {
let arr = []
this.multipleSelection.forEach((v, index) => {
if (!v.lotId || !v.takePartInTime) {
@@ -1245,6 +1280,11 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
this.notifyWarning(refs.msg)
}
} catch (error) {
this.$actionError(error)
} finally {
this._therapyActions.delete('doAttend')
}
},
async checkState2(type) {
this.pageForm.state2 = type
@@ -1269,7 +1309,7 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
await this.doSearch()
},
async doEmail(row) {
const confirm = await this.$confirm('您将发送文件到旅行社邮箱!, 是否继续?', '提示', {
const confirm = await this.$confirmAction('您将发送文件到旅行社邮箱!, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
@@ -1284,7 +1324,7 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
}
},
async doRemind(row) {
const confirm = await this.$confirm('您将发送提醒!, 是否继续?', '提示', {
const confirm = await this.$confirmAction('您将发送提醒!, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
@@ -1312,7 +1352,7 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
linePlayTime,
} = this.pageForm
let types = this.pageForm.state == 1 ? JSON.stringify(['line']) : JSON.stringify(['travel'])
window.open("/platform/inclusiveTherapyV3/user/query/doExport?" +
this.$downloadFile("/platform/inclusiveTherapyV3/user/query/doExport?" +
"searchName=" + searchName +
"&searchKeyword=" + searchKeyword +
"&startYear=" + year +
@@ -1341,7 +1381,7 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
linePlayTime,
} = this.pageForm
let types = this.pageForm.state == 1 ? JSON.stringify(['line']) : JSON.stringify(['travel'])
window.open("/platform/inclusiveTherapyV3/user/query/doExportExcel?" +
this.$downloadFile("/platform/inclusiveTherapyV3/user/query/doExportExcel?" +
"searchName=" + searchName +
"&searchKeyword=" + searchKeyword +
"&startYear=" + year +
@@ -1703,23 +1743,25 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
this.importVisible = true;
},
async doImport() {
if (this.importData.fileList.length === 0) {
this.notifyWarning("请选择文件!")
if (this.importLoading) return
const files = this.importData.fileList || []
if (!files.length || files.some(file => !file.raw)) {
this.notifyWarning('请选择要导入的Excel文件')
return
}
const data = new FormData();
this.importData.fileList.forEach((val) => {
data.append("file", val.raw, val.raw.name);
});
this.importLoading = true
const resp = await $.post('/platform/inclusiveTherapyV3/user/query/enrollImport', data)
if (resp.code === 0) {
await this.pageData();
this.importVisible = false
} else {
this.notifyWarning("导入失败")
try {
const resp = await this.$importExcel('/platform/inclusiveTherapyV3/user/query/enrollImport', files)
if (resp.code === 0) {
this.notifySuccess(resp.msg || '导入成功')
this.pageData()
this.importVisible = false
} else {
this.notifyWarning(resp.msg || '导入失败')
}
} catch (error) {
this.$actionError(error)
} finally {
this.importLoading = false
}
},
@@ -260,18 +260,18 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
<el-table-column
align="center"
header-align="center"
v-for="column in tableColumns"
v-for="column in tableColumns" :key="column.prop"
show-overflow-tooltip
:label="column.label"
:prop="column.prop"
:sortable="column.sortable"
>
<template scope="{row}" v-if="column.prop=='lineName'">
<template slot-scope="{row}" v-if="column.prop=='lineName'">
{{row.baseName?row.baseName:row.lineName}}
<!-- <el-link type="primary" @click="openLine(row)">{{row.lineName}}
</el-link>-->
</template>
<template scope="{row}" v-else-if="column.prop=='isFamily'">
<template slot-scope="{row}" v-else-if="column.prop=='isFamily'">
<el-link v-if="!row.familyNumber" type="primary" @click="openView(row)">
{{row.isFamily?'携带':'未携带'}}({{row.isFamily}})
</el-link>
@@ -279,17 +279,18 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
{{row.familyNumber?'携带':'未携带'}}({{row.familyNumber}})
</el-link>
</template>
<template scope="{row}" v-else-if="column.prop=='isTakePartIn'">
<template slot-scope="{row}" v-else-if="column.prop=='isTakePartIn'">
{{row.isTakePartIn?'已参加':'未参加'}}
</template>
<template scope="{row}" v-else-if="column.prop=='lotName'">
<template slot-scope="{row}" v-else-if="column.prop=='lotName'">
<span v-if="row.lotName"> {{row.lotName}}</span>
<span v-else>暂无</span>
</template>
<template slot-scope="{row}" v-else>{{row[column.prop]}}</template>
</el-table-column>
<el-table-column label="操作" width="250px">
<template scope="{row}">
<template slot-scope="{row}">
<el-button @click="openView(row)" size="mini" type="primary">查看
</el-button>
<el-button
@@ -392,7 +393,7 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
<el-timeline-item timestamp="下载模板" placement="top">
<el-card>
<el-button size="medium" type=""
@click="location.href='/platform/inclusiveTherapyV3/common/downloadTemplate?filePath=travel/TravelEnrollImport.xlsx&fileName=参加人员导入模板.xls'"
@click="$downloadFile('/platform/inclusiveTherapyV3/common/downloadTemplate?filePath=travel/TravelEnrollImport.xlsx&fileName=参加人员导入模板.xls')"
icon="el-icon-download">下载模板
</el-button>
</el-card>
@@ -401,6 +402,7 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
<el-card>
<el-form>
<el-upload
action="/platform/inclusiveTherapyV3/user/query/enrollImport"
name="file"
ref="upload"
:on-remove="(file, fileList) => {
@@ -487,17 +489,17 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
show-overflow-tooltip></el-table-column>
<el-table-column label="年龄" prop="age"></el-table-column>
<el-table-column label="床型" prop="bedType">
<template scope="{row}">
<template slot-scope="{row}">
{{ row.bedInfo?.bedType }}
</template>
</el-table-column>
<el-table-column label="床位" prop="bedNum">
<template scope="{row}">
<template slot-scope="{row}">
{{ row.bedInfo?.bedNum }}
</template>
</el-table-column>
<el-table-column label="意向拼床人" prop="otherSleepUser">
<template scope="{row}">
<template slot-scope="{row}">
{{ row.bedInfo?.otherSleepUser ?
row.bedInfo?.otherSleepUser : '暂无' }}
</template>
@@ -602,12 +604,12 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
<el-button type="primary" size="mini" @click="addProxyCompanion">添加家属</el-button>
<el-table :data="proxySignUpForm.companionList" class="mt10" border>
<el-table-column label="姓名" min-width="110">
<template scope="{row}">
<template slot-scope="{row}">
<el-input v-model="row.userName" placeholder="姓名"></el-input>
</template>
</el-table-column>
<el-table-column label="性别" width="100">
<template scope="{row}">
<template slot-scope="{row}">
<el-select v-model="row.sex" placeholder="性别">
<el-option label="男" value="男"></el-option>
<el-option label="女" value="女"></el-option>
@@ -615,23 +617,23 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
</template>
</el-table-column>
<el-table-column label="年龄" width="110">
<template scope="{row}">
<template slot-scope="{row}">
<el-input-number v-model="row.age" :min="0" :max="120" controls-position="right"
style="width: 90px"></el-input-number>
</template>
</el-table-column>
<el-table-column label="身份证件" min-width="170">
<template scope="{row}">
<template slot-scope="{row}">
<el-input v-model="row.idCard" placeholder="身份证号、护照等"></el-input>
</template>
</el-table-column>
<el-table-column label="手机号" min-width="140">
<template scope="{row}">
<template slot-scope="{row}">
<el-input v-model="row.mobile" placeholder="手机号"></el-input>
</template>
</el-table-column>
<el-table-column label="关系" min-width="110">
<template scope="{row}">
<template slot-scope="{row}">
<el-select v-model="row.relation" placeholder="关系">
<el-option v-for="item in proxyCompanionRelationOptions"
:key="item"
@@ -642,7 +644,7 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
</template>
</el-table-column>
<el-table-column label="房间" min-width="120">
<template scope="{row}">
<template slot-scope="{row}">
<el-select v-model="row.bedInfo.bedType" clearable placeholder="请选择">
<el-option v-for="item in proxyRoomOptions"
:key="item"
@@ -653,7 +655,7 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
</template>
</el-table-column>
<el-table-column label="床位" width="100">
<template scope="{row}">
<template slot-scope="{row}">
<el-select v-if="row.bedInfo.bedType == '标准间'" v-model="row.bedInfo.bedNum" clearable
placeholder="床位">
<el-option v-for="item in proxyBedOptions"
@@ -665,7 +667,7 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
</template>
</el-table-column>
<el-table-column label="是否拼房" width="130">
<template scope="{row}">
<template slot-scope="{row}">
<el-radio-group v-if="row.bedInfo.bedType == '标准间'"
v-model="row.bedInfo.isSleepTogether">
<el-radio :label="true">是</el-radio>
@@ -674,14 +676,14 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
</template>
</el-table-column>
<el-table-column label="意向拼房人" min-width="150">
<template scope="{row}">
<template slot-scope="{row}">
<el-input v-if="row.bedInfo.bedType == '标准间' && row.bedInfo.isSleepTogether == true"
v-model="row.bedInfo.otherSleepUser"
placeholder="多个拼房人请用,隔开"></el-input>
</template>
</el-table-column>
<el-table-column label="操作" width="80">
<template scope="scope">
<template slot-scope="scope">
<el-button type="text" @click="removeProxyCompanion(scope.$index)">删除</el-button>
</template>
</el-table-column>
@@ -969,6 +971,10 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
})
},
async doReimbursement() {
if (!this._therapyActions) this._therapyActions = new Set()
if (this._therapyActions.has('doReimbursement')) return
this._therapyActions.add('doReimbursement')
try {
if (this.multipleSelection && this.multipleSelection.length > 0) {
const enrollIds = this.multipleSelection.filter(v => v.isTakePartIn).map(v => v.id)
@@ -985,7 +991,7 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
return
}
console.log(enrollIds)
this.$confirm(msg, '提示', {
await this.$confirm(msg, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
dangerouslyUseHTMLString: true,
@@ -1011,6 +1017,11 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
} else {
this.$message.warning('请勾选需要报销的报名信息')
}
} catch (error) {
this.$actionError(error)
} finally {
this._therapyActions.delete('doReimbursement')
}
},
doModify(row) {
this.$confirm("您确定要调整【<span style='color: red'>" + row.userName + "</span>】的此条报名信息吗?", '提示', {
@@ -1047,7 +1058,7 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
isTakePartIn,
} = this.pageForm
let types = this.pageForm.state == 1 ? JSON.stringify(['line']) : JSON.stringify(['travel'])
window.open(loc() + "/doExport?takePartInBaseManagementId=" + takePartInBaseManagementId +
this.$downloadFile(loc() + "/doExport?takePartInBaseManagementId=" + takePartInBaseManagementId +
"&searchName=" + searchName +
"&searchKeyword=" + searchKeyword +
"&startYear=" + startYear +
@@ -1083,7 +1094,7 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
linePlayTime,
isTakePartIn,
} = this.pageForm
window.open(loc() + "/doExportViewExcel?takePartInBaseManagementId=" + takePartInBaseManagementId +
this.$downloadFile(loc() + "/doExportViewExcel?takePartInBaseManagementId=" + takePartInBaseManagementId +
"&searchName=" + searchName +
"&searchKeyword=" + searchKeyword +
"&startYear=" + startYear +
@@ -1109,8 +1120,13 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
}
},
async doEdit() {
this.$refs['editForm'].validate().then(async () => {
const confirm = await this.$confirm('您确定要修改这位老师的报名信息吗?', '提示', {
if (!this._therapyActions) this._therapyActions = new Set()
if (this._therapyActions.has('doEdit')) return
this._therapyActions.add('doEdit')
try {
return await this.$validateForm(this.$refs['editForm']).then(async valid => {
if (!valid) return
const confirm = await this.$confirmAction('您确定要修改这位老师的报名信息吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
@@ -1130,6 +1146,11 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
}
}
})
} catch (error) {
this.$actionError(error)
} finally {
this._therapyActions.delete('doEdit')
}
},
async openEdit(row) {
this.getUnionSelectLine(row.takePartInLineId)
@@ -1230,6 +1251,10 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
this.multipleSelection = val;
},
async doAttend() {
if (!this._therapyActions) this._therapyActions = new Set()
if (this._therapyActions.has('doAttend')) return
this._therapyActions.add('doAttend')
try {
let arr = []
this.multipleSelection.forEach((v, index) => {
if (!v.lotId || !v.takePartInTime) {
@@ -1250,6 +1275,11 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
this.notifyWarning(refs.msg)
}
} catch (error) {
this.$actionError(error)
} finally {
this._therapyActions.delete('doAttend')
}
},
checkboxT(v) {
if (v.isTakePartIn) {
@@ -1428,36 +1458,28 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
}
this.importVisible = true;
},
doImport() {
if (this.importData.fileList.length === 0) {
this.notifyWarning("请选择文件!")
async doImport() {
if (this.importLoading) return
const files = this.importData.fileList || []
if (!files.length || files.some(file => !file.raw)) {
this.notifyWarning('请选择要导入的Excel文件')
return
}
const data = new FormData();
this.importData.fileList.forEach((val) => {
data.append("file", val.raw, val.raw.name);
});
this.importLoading = true
$.ajax({
url: loc() + "/enrollImport",
type: "post",
data: data,
processData: false,
contentType: false,
success: (data) => {
if (data.code === 0) {
this.pageData();
this.importVisible = false
} else {
this.importLoading = false
}
},
error: (data) => {
this.notifyWarning("导入失败")
this.importLoading = false
try {
const resp = await this.$importExcel('/platform/inclusiveTherapyV3/user/query/enrollImport', files)
if (resp.code === 0) {
this.notifySuccess(resp.msg || '导入成功')
this.pageData()
this.importVisible = false
} else {
this.notifyWarning(resp.msg || '导入失败')
}
});
} catch (error) {
this.$actionError(error)
} finally {
this.importLoading = false
}
},
importVisibleClose() {
this.importVisible = false;
@@ -70,7 +70,7 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
<div class="panel-body">
<el-radio-group @change="travelId=''" size="small" v-model="lineId">
<el-radio :label="item.id"
border v-for="item in lines">{{item.label}}
border v-for="(item, therapyIndex) in lines" :key="item.id || item.code || therapyIndex">{{item.label}}
</el-radio>
</el-radio-group>
</div>
@@ -86,7 +86,7 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
<div class="panel-body">
<el-radio-group @change="lineId=''" size="small" v-model="travelId">
<el-radio :label="item.id"
border v-for="item in travels">{{item.label}}
border v-for="(item, therapyIndex) in travels" :key="item.id || item.code || therapyIndex">{{item.label}}
</el-radio>
</el-radio-group>
</div>
@@ -101,7 +101,7 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
<el-button @click="downloadTemplate" size="small" type="primary">下载模板</el-button>
<el-upload
:action="loc()+'/readExcel'"
action="/platform/inclusiveTherapyV3/joinUserImport/readExcel"
:auto-upload="false"
:data="{lineId:lineId,travelAgencyId:travelId}"
:file-list="fileList"
@@ -109,7 +109,7 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
:on-error="(err)=>{this.notifyWarning(err)}"
:on-exceed="()=>{this.notifyWarning('最多只能选择一个文件')}"
:on-success="fileHandleSuccess"
accept="xls,xlsx"
accept=".xls,.xlsx"
drag
ref="upload"
style="text-align: center"
@@ -204,6 +204,10 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
this.stepActive--
},
async next() {
if (!this._therapyActions) this._therapyActions = new Set()
if (this._therapyActions.has('next')) return
this._therapyActions.add('next')
try {
const i = this.stepActive
if (i === 0) {
if (this.lineId === '' && this.travelId === '') {
@@ -243,6 +247,11 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
return
}
this.stepActive++
} catch (error) {
this.$actionError(error)
} finally {
this._therapyActions.delete('next')
}
},
yearChange() {
this.selectLineOrTravelAgency()
@@ -255,7 +264,7 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
}
},
downloadTemplate() {
window.open(loc() + '/downloadTemplate')
this.$downloadFile(loc() + '/downloadTemplate')
}
},
updated() {
@@ -44,7 +44,7 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
v-model="pageForm.lineId">
<el-option :label="item.lineName"
:value="item.id"
v-for="item in schoolFreeLineList"></el-option>
v-for="(item, therapyIndex) in schoolFreeLineList" :key="item.id || item.code || therapyIndex"></el-option>
</el-select>
</div>
</div>
@@ -81,7 +81,7 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
<el-radio-group class="mr0-radio"
v-model="pageForm.regionalNature">
<el-radio-button :label="item.value"
border v-for="item in regionalNatureList">
border v-for="(item, therapyIndex) in regionalNatureList" :key="item.id || item.code || therapyIndex">
{{item.label}}
</el-radio-button>
</el-radio-group>
@@ -128,15 +128,15 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
header-align="center"
show-overflow-tooltip
:width="column.width"
v-for="column in tableColumns"
v-for="column in tableColumns" :key="column.prop"
>
<template scope="{row:{signUpMode}}" v-if="column.prop==='signUpMode'">
<template slot-scope="{row:{signUpMode}}" v-if="column.prop==='signUpMode'">
{{signUpModeName(signUpMode)}}
</template>
<template scope="{row:{createMode}}" v-else-if="column.prop==='createMode'">
<template slot-scope="{row:{createMode}}" v-else-if="column.prop==='createMode'">
{{createModeName(createMode)}}
</template>
<template scope="{row}" v-else-if="column.prop==='isDisabled'">
<template slot-scope="{row}" v-else-if="column.prop==='isDisabled'">
<el-switch
:active-value="false"
:inactive-value="true"
@@ -146,7 +146,7 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
v-model="row.isDisabled">
</el-switch>
</template>
<template scope="{row}" v-else-if="column.prop==='signUpUserAndFamilyNum'">
<template slot-scope="{row}" v-else-if="column.prop==='signUpUserAndFamilyNum'">
<span class="text-primary" v-if="configData.familyInfo == 2">
{{row.signUpUserNum + row.signUpUserFamilyNum}}
</span>
@@ -154,14 +154,15 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
{{row.signUpUserNum + row.familyNumber}}
</span>
</template>
<template scope="{row}" v-else-if="column.prop==='playTime'">
<template slot-scope="{row}" v-else-if="column.prop==='playTime'">
<template v-if="row.playStartTime">{{row.playStartTime + '至' + row.playEndTime}}</template>
</template>
<template slot-scope="{row}" v-else>{{row[column.prop]}}</template>
</el-table-column>
<el-table-column label="操作" width="100px">
<template scope="{row}">
<template slot-scope="{row}">
<el-button @click="openViewSignUpUsers(row.usId,row.unionId)" size="mini" type="primary">调整
</el-button>
</template>
@@ -186,7 +187,7 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
:data="schoolFreeSignUpUserList" ref="adjustTable">
<el-table-column selectable="" type="selection"></el-table-column>
<el-table-column label="序号" type="expand" width="150px">
<template scope="{row}">
<template slot-scope="{row}">
<el-card class="companion_card" shadow="never">
<h4 slot="header" style="color: #1867b0">
家属信息
@@ -208,7 +209,7 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
<el-table-column label="工会" prop="unionName" show-overflow-tooltip sortable></el-table-column>
<el-table-column label="报名时间" prop="signingUptime"></el-table-column>
<el-table-column label="家属人数" prop="companionCount">
<template scope="{row}">
<template slot-scope="{row}">
<span v-if="configData.familyInfo === 2" class="text-primary">
{{row.companionCount}}
</span>
@@ -218,7 +219,7 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
</template>
</el-table-column>
<el-table-column label="是否调整" prop="isNormal">
<template scope="{row}">
<template slot-scope="{row}">
<span class="text-success" v-if="row.isNormal">
未调整
</span>
@@ -228,7 +229,7 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
</template>
</el-table-column>
<el-table-column label="操作">
<template scope="{row}">
<template slot-scope="{row}">
<el-button @click="adjustmentUser(row.loginName,row.isNormal)" size="mini" type="primary"
v-if="row.isNormal">调整
</el-button>
@@ -318,15 +319,20 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
async pageData() {
sublime.showLoadingbar()
this.tableLoading = true
try {
const resp = await $.post(loc() + '/pageData', this.pageForm)
sublime.closeLoadingbar()
this.tableLoading = false
if (resp.code === 0) {
this.tableData = resp.data.list
this.pageForm.totalCount = resp.data.totalCount
} else {
this.notifyWarning(resp.msg)
}
} catch (error) {
this.$actionError(error)
} finally {
sublime.closeLoadingbar()
this.tableLoading = false
}
},
async openViewSignUpUsers(lineId, unionId) {
this.currentLineId = lineId
@@ -343,8 +349,12 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
},
//调整人员
async adjustmentUser(loginName, isNormal) {
if (!this._therapyActions) this._therapyActions = new Set()
if (this._therapyActions.has('adjustmentUser')) return
this._therapyActions.add('adjustmentUser')
try {
const msg = isNormal ? '确定要调整吗?' : '确定要恢复吗?'
const confirm = await this.$confirm(msg, '提示', {
const confirm = await this.$confirmAction(msg, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
@@ -358,14 +368,23 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
} else {
this.notifyWarning(resp.msg)
}
} catch (error) {
this.$actionError(error)
} finally {
this._therapyActions.delete('adjustmentUser')
}
},
async aKeyToAdjust() {
if (!this._therapyActions) this._therapyActions = new Set()
if (this._therapyActions.has('aKeyToAdjust')) return
this._therapyActions.add('aKeyToAdjust')
try {
if (this.$refs.adjustTable.selection.length === 0) {
this.notifyWarning('请选择需要调整的人员')
return
}
const confirm = await this.$confirm('您确定要一键调整吗', '提示', {
const confirm = await this.$confirmAction('您确定要一键调整吗', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
@@ -388,13 +407,22 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
} else {
this.notifyWarning(resp.msg)
}
} catch (error) {
this.$actionError(error)
} finally {
this._therapyActions.delete('aKeyToAdjust')
}
},
async smsAlerts() {
if (!this._therapyActions) this._therapyActions = new Set()
if (this._therapyActions.has('smsAlerts')) return
this._therapyActions.add('smsAlerts')
try {
if (this.$refs.adjustTable.selection.length === 0) {
this.notifyWarning('请选择需要发送短信通知的人员')
return
}
const confirm = await this.$confirm('此操作会向已调整的人员发送短信,您确定要发送短信提醒吗?', '提示', {
const confirm = await this.$confirmAction('此操作会向已调整的人员发送短信,您确定要发送短信提醒吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
@@ -418,14 +446,28 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
} else {
this.notifyWarning(resp.msg)
}
} catch (error) {
this.$actionError(error)
} finally {
this._therapyActions.delete('smsAlerts')
}
},
async lineStatusChange(id) {
if (!this._therapyActions) this._therapyActions = new Set()
if (this._therapyActions.has('lineStatusChange')) return
this._therapyActions.add('lineStatusChange')
try {
const resp = await $.post('/platform/inclusiveTherapyV3/line/openClosedLine/' + id)
if (resp.code === 0) {
this.notifySuccess(resp.msg)
} else {
this.notifyWarning(resp.msg)
}
} catch (error) {
this.$actionError(error)
} finally {
this._therapyActions.delete('lineStatusChange')
}
},
async getConfigData() {
const resp = await $.get('/platform/inclusiveTherapyV3/TheRapyConfig/findOne')
@@ -110,20 +110,21 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
align="center"
header-align="center"
show-overflow-tooltip
v-for="column in tableColumns"
v-for="column in tableColumns" :key="column.prop"
>
<template scope="{row:{signUpMode}}" v-if="column.prop==='signUpMode'">
<template slot-scope="{row:{signUpMode}}" v-if="column.prop==='signUpMode'">
{{signUpModeName(signUpMode)}}
</template>
<template scope="{row:{createMode}}" v-else-if="column.prop==='createMode'">
<template slot-scope="{row:{createMode}}" v-else-if="column.prop==='createMode'">
{{createModeName(createMode)}}
</template>
<template scope="{row}" v-if="column.prop==='times'">
<template slot-scope="{row}" v-else-if="column.prop==='times'">
{{row.playStartTime.substr(0,10)}}至{{row.playEndTime.substr(0,10)}}
</template>
<template slot-scope="{row}" v-else>{{row[column.prop]}}</template>
</el-table-column>
<el-table-column label="操作" width="200px">
<template scope="{row}">
<template slot-scope="{row}">
<el-button @click="openViewClusterInfo(row.id)" size="mini" type="primary">查看</el-button>
<el-button @click="openCluster(row.id,row.ascriptionUnionId)" size="mini" type="primary">组团
</el-button>
@@ -238,7 +239,7 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
<el-table-column label="性别" prop="sex"></el-table-column>
<el-table-column label="工会" prop="unionName"></el-table-column>
<el-table-column label="身份" prop="isLeader">
<template scope="{row}">
<template slot-scope="{row}">
<span class="text-primary" v-if="row.isLeader">团长</span>
<span v-else>成员</span>
</template>
@@ -255,7 +256,7 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
<el-radio-group size="small" v-model="batchMoveData.originalGroup">
<el-radio :label="item"
border
v-for="(item,key) in clusterData">{{item.clusterName}}
v-for="(item,key) in clusterData" :key="item.id || item.code || key">{{item.clusterName}}
</el-radio>
</el-radio-group>
@@ -295,7 +296,7 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
<el-radio :disabled="item.clusterName == batchMoveData.originalGroup.clusterName"
:label="item"
border
v-for="(item,key) in clusterData">{{item.clusterName}}
v-for="(item,key) in clusterData" :key="item.id || item.code || key">{{item.clusterName}}
</el-radio>
</el-radio-group>
</div>
@@ -425,6 +426,10 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
},
async setClusterMembers() {
if (!this._therapyActions) this._therapyActions = new Set()
if (this._therapyActions.has('setClusterMembers')) return
this._therapyActions.add('setClusterMembers')
try {
const emptyCluster = Object.values(vue.clusterData).filter(v => v.clusterName !== '线路未分配人员').find(v => v.members.length === 0)
if (emptyCluster) {
this.notifyWarning(emptyCluster.clusterName + '未分配成员,请分配后再提交!')
@@ -443,6 +448,11 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
} else {
this.notifyWarning(resp.msg)
}
} catch (error) {
this.$actionError(error)
} finally {
this._therapyActions.delete('setClusterMembers')
}
},
setMemberRole(key, loginName, isLeader) {
const i = this.clusterData[key].members.findIndex(v => v.loginName === loginName)
@@ -46,7 +46,7 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
v-model="pageForm.regionalNature">
<el-radio-button :label="item.value"
border
v-for="item in regionalNatureList">
v-for="(item, therapyIndex) in regionalNatureList" :key="item.id || item.code || therapyIndex">
{{item.label}}
</el-radio-button>
</el-radio-group>
@@ -134,7 +134,7 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
header-align="center"
show-overflow-tooltip
v-for="column in tableColumns">
<template scope="{row}" v-if="column.prop === 'playTimes' || column.prop === 'signUpTimes'">
<template slot-scope="{row}" v-if="column.prop === 'playTimes' || column.prop === 'signUpTimes'">
<template v-if="row[column.prop]">
<template slot="content">
<div :class="[index === row[column.prop].split(',').length - 1 ? '' : 'mb10']"
@@ -149,18 +149,18 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
</template>
<span v-else>暂未设置</span>
</template>
<template scope="{row}" v-else-if="column.prop === 'signUpMode'">
<template slot-scope="{row}" v-else-if="column.prop === 'signUpMode'">
{{signUpModeName(row.signUpMode)}}
</template>
<template scope="{row}" v-else-if="column.prop === 'isOpen'">
<template slot-scope="{row}" v-else-if="column.prop === 'isOpen'">
{{row.isOpen ? '是' : '否'}}
</template>
<template scope="{row}" v-else>
<template slot-scope="{row}" v-else>
{{row[column.prop]}}
</template>
</el-table-column>
<el-table-column align="center" header-align="center" label="操作" width="120px">
<template scope="{row}">
<template slot-scope="{row}">
<el-dropdown @command="dropdownCommand">
<el-button size="mini">
<i class="ti-settings"></i>
@@ -212,7 +212,7 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
<el-table-column label="最少成团人数(包括家属)" prop="estimatedFamilyNumbers" width="170"></el-table-column>
<el-table-column label="最多人数" prop="maxPeopleNumber" width="100"></el-table-column>
<el-table-column label="是否开启" width="80">
<template scope="{row}">
<template slot-scope="{row}">
{{row.enable ? '是' : '否'}}
</template>
</el-table-column>
@@ -494,7 +494,7 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
url += this.buildExportParam('regionalNature', this.pageForm.regionalNature)
url += this.buildExportParam('pageOrderName', this.pageForm.pageOrderName)
url += this.buildExportParam('pageOrderBy', this.pageForm.pageOrderBy)
window.open(url)
this.$downloadFile(url)
},
buildExportParam(name, value) {
return '&' + name + '=' + encodeURIComponent(value == null ? '' : value)
@@ -579,13 +579,11 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
this.$set(row, 'contactPhone', item.contactMobileNumber)
}
},
saveEditTimeSlots() {
this.$refs.editTimeSlotsForm.validate((valid) => {
if (!valid) {
return
}
async saveEditTimeSlots() {
if (this.editTimeSlotsLoading || !await this.$validateForm(this.$refs.editTimeSlotsForm)) return
try {
this.$set(this, 'editTimeSlotsLoading', true)
$.post(loc() + '/saveTimeSlots', {
await $.post(loc() + '/saveTimeSlots', {
lineId: this.editTimeSlotsForm.lineId,
unionId: this.editTimeSlotsForm.unionId,
year: this.pageForm.year,
@@ -601,7 +599,9 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
}).always(() => {
this.$set(this, 'editTimeSlotsLoading', false)
})
})
} catch (error) {
this.$actionError(error)
}
},
cancelLine(row) {
const msg = '确认取消该分工会选择的线路吗?取消后将删除该线路下已有报名、床位、同伴和变更记录。'
@@ -62,7 +62,7 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
@change="doSearch"
v-model="pageForm.regionalNature">
<el-radio-button :label="item.value"
border v-for="item in regionalNatureList">
border v-for="(item, therapyIndex) in regionalNatureList" :key="item.id || item.code || therapyIndex">
{{item.label}}
</el-radio-button>
</el-radio-group>
@@ -145,16 +145,16 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
v-model="row.isDisabled">
</el-switch>
</template>-->
<template scope="{row:{signUpMode}}" v-if="column.prop==='signUpMode'">
<template slot-scope="{row:{signUpMode}}" v-if="column.prop==='signUpMode'">
{{signUpModeName(signUpMode)}}
</template>
<template scope="{row:{createMode}}" v-else-if="column.prop==='createMode'">
<template slot-scope="{row:{createMode}}" v-else-if="column.prop==='createMode'">
{{createModeName(createMode)}}
</template>
<template scope="{row}" v-else-if="column.prop==='belongUnionName'">
<template slot-scope="{row}" v-else-if="column.prop==='belongUnionName'">
{{pageForm.mode == 2 && pageForm.selectStatus == 1 ? '校工会' : row.belongUnionName}}
</template>
<template scope="{row}" v-else-if="column.prop==='playTime'">
<template slot-scope="{row}" v-else-if="column.prop==='playTime'">
<template v-if="row.playTimes">
<!--<el-tooltip placement="top">
<div slot="content">
@@ -183,16 +183,17 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
选择并设置出行时间段
</el-button>
</template>
<template scope="{row}" v-else-if="column.prop==='createUnionName'">
<template slot-scope="{row}" v-else-if="column.prop==='createUnionName'">
<span v-if="!row.isSelect">
{{row.createUnionName}}
</span>
<span v-else>{{row.belongUnionName}}</span>
</template>
<template slot-scope="{row}" v-else>{{row[column.prop]}}</template>
</el-table-column>
<el-table-column label="操作" width="100px">
<template scope="{row}">
<template slot-scope="{row}">
<el-dropdown @command="dropdownCommand">
<el-button size="mini">
<i class="ti-settings"></i>
@@ -720,11 +721,15 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
}
},
async doSelect() {
if (!this._therapyActions) this._therapyActions = new Set()
if (this._therapyActions.has('doSelect')) return
this._therapyActions.add('doSelect')
try {
if (!this.assertCanSelectLine()) return
const valid = await this.$refs['form'].validate()
const valid = await this.$validateForm(this.$refs['form'])
if (!valid) return
const confirm = await this.$confirm('请再次确认,是否选择此线路为疗休养线路?', '提示', {
const confirm = await this.$confirmAction('请再次确认,是否选择此线路为疗休养线路?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
@@ -749,6 +754,11 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
} else {
this.notifyWarning(resp.msg)
}
} catch (error) {
this.$actionError(error)
} finally {
this._therapyActions.delete('doSelect')
}
},
createModeName(val) {
const d = this.createModeList.find(v => v.value === val)
@@ -759,9 +769,13 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
return d ? d.label : null
},
async deSelect({applyCount, id: lineId, usUnionId: unionId}) {
if (!this._therapyActions) this._therapyActions = new Set()
if (this._therapyActions.has('deSelect')) return
this._therapyActions.add('deSelect')
try {
if (!this.assertCanSelectLine()) return
const msg = applyCount > 0 ? '已经有教工选择本线路,请确认是否取消选择本线路,一旦取消将清空报名人员!!!' : '您确定要取消吗?'
const confirm = await this.$confirm(msg, '提示', {
const confirm = await this.$confirmAction(msg, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
@@ -775,6 +789,11 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
} else {
this.notifyWarning(resp.msg)
}
} catch (error) {
this.$actionError(error)
} finally {
this._therapyActions.delete('deSelect')
}
},
async getTravelAgencyOptions() {
const {data} = await $.get(loc() + '/getTravelAgencyOptions', {year: this.pageForm.year})
@@ -857,7 +876,7 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
this.travelAgencyList = resp.data
},
async doEditOpen(row) {
console.log(row)
try {
const resp = await $.get(loc() + '/doEditOpen', {id: row.usId})
if (resp.code === 0) {
this.$message.success(resp.msg)
@@ -865,6 +884,10 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
this.$message.warning(resp.msg)
}
this.pageData()
} catch (error) {
this.$actionError(error)
this.pageData()
}
}
},
async created() {
@@ -60,7 +60,7 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
<div class="col-title">
旅行社平均分
<el-rate style="float: right"
value="5"
:value="5"
disabled
show-text
:texts="aaa"
@@ -79,7 +79,7 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
<div class="col-title">
线路平均分
<el-rate style="float: right"
value="5"
:value="5"
disabled
show-text
:texts="aaa"
@@ -125,7 +125,8 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
async getLineRating() {
let data = []
const refs = await $.post(loc() + "/getLineRating", {year: this.year})
refs.data.forEach(v => {
if (refs.code !== 0) { this.notifyWarning(refs.msg); return }
(refs.data || []).forEach(v => {
data.push({lineName: v.lineName, avg: v.avg})
})
if (chart.lineRating) {
@@ -154,7 +155,8 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
async getTravelAgencyRating() {
let data = []
const refs = await $.post(loc() + "/getTravelAgencyRating", {year: this.year})
refs.data.forEach(v => {
if (refs.code !== 0) { this.notifyWarning(refs.msg); return }
(refs.data || []).forEach(v => {
data.push({travelAgencyName: v.travelAgencyName, avg: v.avg})
})
if (chart.travelAgencyRating) {
@@ -183,7 +185,8 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
async getLineBar() {
let data = []
const refs = await $.post(loc() + "/getLineBar", {regionalNature: this.regionalNature, year: this.year})
refs.data.forEach(v => {
if (refs.code !== 0) { this.notifyWarning(refs.msg); return }
(refs.data || []).forEach(v => {
data.push({lineName: v.lineName, lineNum: (v.enrollNum + v.companionNum)})
})
if (chart.lineBar) {
@@ -212,7 +215,7 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
async getSnSwNum() {
const {data} = await $.post(loc() + "/getSnSwNum", {year: this.year})
this.snNum = data.snNum
this.swNum = data.snNum
this.swNum = data.swNum
}
},
@@ -228,4 +231,4 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
<!--#
}
#-->
#-->
@@ -200,14 +200,14 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
<el-table-column type="selection" reserve-selection width="55px"></el-table-column>
<el-table-column align="center" header-align="center" type="index" label="序号"
width="80px" key="#index" fixed="left">
<template scope="scope">
<template slot-scope="scope">
<span>{{scope.$index+(pageForm.pageNumber - 1) * pageForm.pageSize + 1}} </span>
</template>
</el-table-column>
<el-table-column
align="center"
header-align="center"
v-for="column in tableColumns"
v-for="column in tableColumns" :key="column.prop"
show-overflow-tooltip
:label="column.label"
:prop="column.prop"
@@ -215,21 +215,22 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
:fixed="column.fixed"
:sortable="column.sortable"
>
<template scope="{row}" v-if="column.prop=='lineName'">
<template slot-scope="{row}" v-if="column.prop=='lineName'">
<el-link type="primary" @click="openLine(row)">{{row.lineName}}
</el-link>
</template>
<template scope="{row}" v-if="column.prop=='signUpMode'">
<template slot-scope="{row}" v-else-if="column.prop=='signUpMode'">
<span>{{row.signUpMode == '1' ? '校工会组织' : '分工会组织'}}</span>
</template>
<template scope="{row}" v-else-if="column.prop=='groupCount'">
<template slot-scope="{row}" v-else-if="column.prop=='groupCount'">
<el-link type="primary" @click="openUserData(row)">
{{Number(row.lineNum || 0) + Number(row.adultFamilyNum || 0)}}
</el-link>
</template>
<template slot-scope="{row}" v-else>{{row[column.prop]}}</template>
</el-table-column>
<el-table-column label="操作" width="380px" fixed="right">
<template scope="{row}">
<template slot-scope="{row}">
<template>
<el-button @click="openUserData(row)" size="mini" type="primary">
查看人员
@@ -271,7 +272,7 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
filterable="true"
placeholder="所属工会" style="width: 100%;"
v-model="userPageForm.unionId">
<el-option :label="item.unionname" :value="item.id" v-for="item in unions"></el-option>
<el-option :label="item.unionname" :value="item.id" v-for="(item, therapyIndex) in unions" :key="item.id || item.code || therapyIndex"></el-option>
</el-select>
</div>
</div>
@@ -282,7 +283,7 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
<el-select clearable="true" filterable="true" placeholder="所属单位"
style="width: 100%;"
v-model="userPageForm.unitId">
<el-option :label="item.name" :value="item.id" v-for="item in units"></el-option>
<el-option :label="item.name" :value="item.id" v-for="(item, therapyIndex) in units" :key="item.id || item.code || therapyIndex"></el-option>
</el-select>
</div>
</div>
@@ -298,13 +299,13 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
<el-table-column
align="center"
header-align="center"
v-for="column in userDataTableColumns"
v-for="(column, therapyIndex) in userDataTableColumns"
show-overflow-tooltip
:label="column.label"
:prop="column.prop"
:sortable="column.sortable"
>
<template scope="{row}" v-if="column.prop=='isFamily'">
:key="column.id || column.code || therapyIndex">
<template slot-scope="{row}" v-if="column.prop=='isFamily'">
<el-link v-if="!row.familyNumber" type="primary">
{{row.isFamily?'携带':'未携带'}}({{row.isFamily}})
</el-link>
@@ -312,6 +313,7 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
{{row.familyNumber?'携带':'未携带'}}({{row.familyNumber}})
</el-link>
</template>
<template slot-scope="{row}" v-else>{{row[column.prop]}}</template>
</el-table-column>
</el-table>
<el-row class="el-pagination-container" style="margin-bottom: 0px">
@@ -599,7 +601,7 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
regionalNature,
travelAgencyId,
} = this.pageForm
window.open("/platform/inclusiveTherapyV3/user/query/doExport?" +
this.$downloadFile("/platform/inclusiveTherapyV3/user/query/doExport?" +
"startYear=" + startYear +
"&endYear=" + endYear +
"&unionId=" + unionId +
@@ -632,7 +634,11 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
this.doSearch()
},
async sendSuccess(row) {
this.$confirm("确定发送<span style='color: red'>成团通知</span>吗?", '提示', {
if (!this._therapyActions) this._therapyActions = new Set()
if (this._therapyActions.has('sendSuccess')) return
this._therapyActions.add('sendSuccess')
try {
await this.$confirm("确定发送<span style='color: red'>成团通知</span>吗?", '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
@@ -645,9 +651,15 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
this.$message.warning(resp.msg)
}
})
} catch (error) {
this.$actionError(error)
} finally {
this._therapyActions.delete('sendSuccess')
}
},
sendFail(row) {
this.$confirm("确定发送<span style='color: red'>未成团通知</span>并<span style='color: red'>保留报名记录</span>吗?", '提示', {
async sendFail(row) {
try {
await this.$confirm("确定发送<span style='color: red'>未成团通知</span>并<span style='color: red'>保留报名记录</span>吗?", '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
@@ -660,6 +672,9 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
this.$message.warning(resp.msg)
}
})
} catch (error) {
this.$actionError(error)
}
},
sendGroupMail() {
if (!this.multipleSelection || this.multipleSelection.length === 0) {
@@ -699,14 +714,15 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
}).catch(() => {
})
},
resendFailNotice() {
this.$confirm("确定补发<span style='color: red'>2026年已删除报名记录的未成团通知</span>吗?", '提示', {
async resendFailNotice() {
try {
await this.$confirm("确定补发<span style='color: red'>2026年已删除报名记录的未成团通知</span>吗?", '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
dangerouslyUseHTMLString: true
}).then(() => {
$.post('/platform/inclusiveTherapyV3/statistics/resendFailNotice')
return $.post('/platform/inclusiveTherapyV3/statistics/resendFailNotice')
.then((resp) => {
if (resp.code === 0) {
this.$message.success(resp.msg)
@@ -717,6 +733,9 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
.always(() => {
})
})
} catch (error) {
this.$actionError(error)
}
},
openLine(row) {
this.$refs.guava.public()
@@ -262,10 +262,10 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
})
},
doExportExcel() {
window.open(loc() + '/doExportExcel?year=' + encodeURIComponent(this.pageForm.year || ''))
this.$downloadFile(loc() + '/doExportExcel?year=' + encodeURIComponent(this.pageForm.year || ''))
},
doExportUnionExcel() {
window.open(loc() + '/doExportUnionExcel?year=' + encodeURIComponent(this.pageForm.year || ''))
this.$downloadFile(loc() + '/doExportUnionExcel?year=' + encodeURIComponent(this.pageForm.year || ''))
}
},
created() {
@@ -27,7 +27,7 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
ref="table"
v-loading="tableLoading">
<el-table-column align="center" header-align="center" type="index" label="序号" width="80px">
<template scope="scope">
<template slot-scope="scope">
<span>{{scope.$index + 1}}</span>
</template>
</el-table-column>
@@ -42,7 +42,7 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
<el-table-column align="center" header-align="center" prop="selectedProvinceInNumber"
label="已选择省内数量"></el-table-column>
<el-table-column align="center" header-align="center" prop="finished" label="是否完成">
<template scope="{row}">
<template slot-scope="{row}">
<el-tag v-if="row.finished" type="success">已完成</el-tag>
<el-tag v-else type="danger">未完成</el-tag>
</template>
@@ -187,28 +187,28 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
</el-button>
<el-table :data="formData.lots" stripe style="width: 100%">
<el-table-column prop="index" label="序号" width="180">
<template scope="scope">
<template slot-scope="scope">
{{scope.$index+1}}
</template>
</el-table-column>
<el-table-column prop="lotName" label="标段名称">
<template scope="{row}">
<template slot-scope="{row}">
<el-input v-model="row.lotName" placeholder="请输入标段名称"></el-input>
</template>
</el-table-column>
<el-table-column prop="lotValue" label="标段值">
<template scope="{row}">
<template slot-scope="{row}">
<el-input v-model="row.lotValue" placeholder="请输入标段值"></el-input>
</template>
</el-table-column>
<el-table-column prop="activityCost" label="标段费用">
<template scope="{row}">
<template slot-scope="{row}">
<el-input v-model="row.activityCost" placeholder="请输入标段费用"></el-input>
</template>
</el-table-column>
<!--# if(@com.budwk.app.zhgh.staffbenefit.therapyRecuperation.support.TherapyContext.hasRole('sysadmin')){ #-->
<el-table-column prop="index" label="操作">
<template scope="scope">
<template slot-scope="scope">
<el-button type="danger" icon="el-icon-delete"
@click="deleteLotsRow(scope)"></el-button>
</template>
@@ -223,30 +223,30 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
<el-form-item label="分工会线路数量">
<el-table :data="formData.unionLineNumberConfigs" stripe style="width: 100%">
<el-table-column prop="index" label="序号" width="120">
<template scope="scope">
<template slot-scope="scope">
{{scope.$index+1}}
</template>
</el-table-column>
<el-table-column prop="unionId" label="分工会">
<template scope="{row}">
<template slot-scope="{row}">
<el-select v-model="row.unionId" placeholder="请选择分工会" filterable clearable
style="width: 100%">
<el-option v-for="item in unionOptions"
:value="item.id"
:key="item.id"
:label="item.unionname"
:label="item.name"
:disabled="isUnionSelected(item.id, row)"></el-option>
</el-select>
</template>
</el-table-column>
<el-table-column prop="minProvinceOutNumber" label="最少省外数量">
<template scope="{row}">
<template slot-scope="{row}">
<el-input v-model.number="row.minProvinceOutNumber"
placeholder="请输入最少省外数量"></el-input>
</template>
</el-table-column>
<el-table-column prop="minProvinceInNumber" label="最少省内数量">
<template scope="{row}">
<template slot-scope="{row}">
<el-input v-model.number="row.minProvinceInNumber"
placeholder="请输入最少省内数量"></el-input>
</template>
@@ -255,7 +255,7 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
<template slot="header">
<el-button type="primary" size="small" @click="addUnionLineNumberRow">添加一条</el-button>
</template>
<template scope="scope">
<template slot-scope="scope">
<el-button type="danger" icon="el-icon-delete"
@click="deleteUnionLineNumberRow(scope.$index)"></el-button>
</template>
@@ -288,7 +288,7 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
<el-card>
<div v-if="LineNameList.line!=null">
<el-descriptions class="margin-top" title="线路名称" :column="3">
<el-descriptions-item v-for="(o,index) in LineNameList.line">
<el-descriptions-item v-for="(o,index) in LineNameList.line" :key="index">
<template slot="label">
{{o.index}}
</template>
@@ -299,7 +299,7 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
</div>
<div v-if="LineNameList.base!=null">
<el-descriptions class="margin-top" title="目的地名称" :column="3">
<el-descriptions-item v-for="o in LineNameList.base">
<el-descriptions-item v-for="(o,index) in LineNameList.base" :key="index">
<template slot="label">
{{o.index}}
</template>
@@ -324,6 +324,7 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
</div>
<script>
Vue.component('table-tool', httpVueLoader('/components/plugins/sysTableTool/index.vue'))
const vue = new Vue({
el: '#app',
@@ -349,7 +350,7 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
outsideQuota: null,
outsideQuotaProportion: 0,
outsideNumber: null,
travelFrequency: null,
travelFrequency: 1,
groupNumber: null,
modifyDays: null,
modifyNumber: null,
@@ -420,7 +421,7 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
}
},
components: {
'drawer-user-scope': httpVueLoader('/components/staffbenefit/therapyRecuperation/DrawerUserScope.vue'),
'drawer-user-scope': httpVueLoader('/components/module/activity/DrawerUserScope.vue'),
},
methods: {
async deleteLotsRow(scope) {
@@ -435,7 +436,7 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
this.tableScopeId=scope.row.id
this.tableScopeIndex=scope.$index;
}else {
const confirm = await this.$confirm('您确定要删除吗?', '提示', {
const confirm = await this.$confirmAction('您确定要删除吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
@@ -471,7 +472,15 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
}
},
async operation() {
const valid = await this.$refs["addForm"].validate()
const valid = await new Promise(resolve => {
this.$refs["addForm"].validate((passed, fields) => {
if (!passed) {
const errors = Object.values(fields || {}).flat()
this.$message.warning(errors.length ? errors[0].message : '请检查必填项和填写格式')
}
resolve(passed)
})
})
if (valid) {
this.subLoading = true
const loading = this.$loading({
@@ -480,14 +489,13 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
spinner: 'el-icon-loading',
background: COVER_LAYER_COLOR
})
try {
const cloneData = clone(this.formData)
if (this.lotDeleteList && this.lotDeleteList.length > 0) {
cloneData.lotDeleteList = JSON.stringify(this.lotDeleteList)
}
if (this.formData.lots && this.formData.lots.length > 0) {
cloneData.lots = JSON.stringify(this.formData.lots)
}
cloneData.lots = JSON.stringify(this.formData.lots || [])
if (this.formData.unionLineNumberConfigs && this.formData.unionLineNumberConfigs.length > 0) {
cloneData.unionLineNumberConfigs = JSON.stringify(this.formData.unionLineNumberConfigs)
}
@@ -495,12 +503,17 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
const resp = await $.post(loc() + "/operation", cloneData)
if (resp.code === 0){
this.$notify.success({title: '成功', message: resp.msg});
loading.close()
this.subLoading = false
}else {
this.$notify.error({title: '失败', message: resp.msg});
}
} catch (error) {
const message = error && (error.responseJSON && error.responseJSON.msg || error.msg || error.message)
this.$notify.error({title: '失败', message: message || '提交失败,请稍后重试'})
} finally {
loading.close()
this.subLoading = false
}
}
},
async findOne() {
@@ -515,6 +528,9 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
if (!data.unionLineNumberConfigs) {
this.$set(data, 'unionLineNumberConfigs', [])
}
if (data.travelFrequency == null || data.travelFrequency === '') {
data.travelFrequency = 1
}
this.formData = data
this.initLineContentEditor(data.notice)
},
@@ -532,6 +548,10 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
this.LineNameList = {};
},
async deleteLotById() {
if (!this._therapyActions) this._therapyActions = new Set()
if (this._therapyActions.has('deleteLotById')) return
this._therapyActions.add('deleteLotById')
try {
if (this.tableScopeId == null || this.tableScopeId===''){
this.formData.lots.splice(this.tableScopeIndex, 1);
this.$notify.success({title: '成功', message: "操作成功"});
@@ -548,11 +568,16 @@ layout("/platform/zhgh/staffbenefit/therapyRecuperation/layouts/platform.html"){
this.$notify.error({title: '失败', message: resp.msg});
}
} catch (error) {
this.$actionError(error)
} finally {
this._therapyActions.delete('deleteLotById')
}
}
},
async created() {
this.findOne();
this.unionOptions = await getUnions(null)
this.unionOptions = await this.$businessTool.listUnion()
this.initLineContentEditor();
},
watch: {