南大三十年教职工疗休养
This commit is contained in:
+52
@@ -71,6 +71,7 @@ layout("/layouts/platform.html"){
|
||||
<div class="tour-ledger-actions">
|
||||
<el-button size="medium" type="primary" icon="el-icon-upload2" @click="showImportDialog = true">参加人员导入</el-button>
|
||||
<el-button size="medium" type="primary" icon="el-icon-check" @click="setParticipants">设置参加人员</el-button>
|
||||
<el-button size="medium" type="primary" icon="el-icon-mobile-phone" :loading="syncMobileLoading" @click="syncMobile">获取手机号</el-button>
|
||||
<el-button size="medium" type="primary" icon="el-icon-download" @click="exportLedgerData">导出台账数据</el-button>
|
||||
<el-button size="medium" type="primary" icon="el-icon-download" @click="exportUnionSignupZip">导出分工会报名压缩包</el-button>
|
||||
</div>
|
||||
@@ -366,6 +367,7 @@ layout("/layouts/platform.html"){
|
||||
detailRow: {},
|
||||
doneTasks: [],
|
||||
showImportDialog: false,
|
||||
syncMobileLoading: false,
|
||||
multipleSelection: [],
|
||||
filterOptionsTimer: null,
|
||||
currentUnionId: "",
|
||||
@@ -440,6 +442,56 @@ layout("/layouts/platform.html"){
|
||||
})
|
||||
})
|
||||
},
|
||||
syncMobile() {
|
||||
const selectedCount = this.multipleSelection.length
|
||||
const confirmText = selectedCount > 0
|
||||
? "确定获取已勾选的" + selectedCount + "名台账人员手机号吗?"
|
||||
: "未勾选人员,将获取当前查询条件下全部台账人员手机号,确定继续吗?"
|
||||
this.$confirm(confirmText, "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(() => {
|
||||
const params = {
|
||||
ids: selectedCount > 0 ? JSON.stringify(this.multipleSelection.map(item => item.id)) : "",
|
||||
startYear: this.pageForm.startYear,
|
||||
endYear: this.pageForm.endYear,
|
||||
keyword: this.pageForm.keyword,
|
||||
unionId: this.pageForm.unionId,
|
||||
lineId: this.pageForm.lineId,
|
||||
travelPeriod: this.pageForm.travelPeriod,
|
||||
lineType: this.pageForm.lineType,
|
||||
directFamilyOnly: this.pageForm.directFamilyOnly,
|
||||
overCostOnly: this.pageForm.overCostOnly
|
||||
}
|
||||
this.syncMobileLoading = true
|
||||
this.$axios.post(loc() + "/syncMobile", params).then((res) => {
|
||||
if (res.code === 0) {
|
||||
const data = res.data || {}
|
||||
const failedJobNos = data.failedJobNos || []
|
||||
this.$alert(
|
||||
"请求人数:" + (data.requestUserCount || 0) +
|
||||
"<br>接口返回数量:" + (data.pulledCount || 0) +
|
||||
"<br>有效手机号数量:" + (data.validMobileCount || 0) +
|
||||
"<br>系统用户更新数量:" + (data.updatedUserCount || 0) +
|
||||
"<br>台账更新数量:" + (data.ledgerUpdatedCount || 0) +
|
||||
"<br>失败工号数量:" + failedJobNos.length,
|
||||
"手机号获取完成",
|
||||
{
|
||||
dangerouslyUseHTMLString: true,
|
||||
confirmButtonText: "确定"
|
||||
}
|
||||
)
|
||||
this.clearTableSelection()
|
||||
this.pageData()
|
||||
} else {
|
||||
this.$message.warning(res.msg || "手机号获取失败")
|
||||
}
|
||||
}).finally(() => {
|
||||
this.syncMobileLoading = false
|
||||
})
|
||||
}).catch(() => {})
|
||||
},
|
||||
exportUnionSignupZip() {
|
||||
const params = new URLSearchParams()
|
||||
;["startYear", "endYear", "keyword", "unionId", "lineId", "travelPeriod", "lineType"].forEach(key => {
|
||||
|
||||
@@ -20,6 +20,14 @@ layout("/layouts/platform.html"){
|
||||
>
|
||||
备份历史会员
|
||||
</el-button>
|
||||
<el-button
|
||||
v-if="$auth.hasRoleOr(['SYSADMIN','SCHOOL_UNION_ADMIN'])"
|
||||
type="primary"
|
||||
size="small"
|
||||
icon="el-icon-mobile-phone"
|
||||
:loading="syncMobileLoading"
|
||||
@click="syncMobile"
|
||||
>获取手机号</el-button>
|
||||
<el-button type="primary" size="small" icon="el-icon-download" @click="exportMember">会员档案导出</el-button>
|
||||
<el-popover
|
||||
placement="bottom"
|
||||
@@ -148,8 +156,9 @@ layout("/layouts/platform.html"){
|
||||
{ prop: "expectedLeaveSchoolDate", label: "预计/最后离校时间", width: 120, sortable: true, checked: 0 },
|
||||
],
|
||||
checkedFields: [],
|
||||
|
||||
importDialog: false
|
||||
|
||||
importDialog: false,
|
||||
syncMobileLoading: false
|
||||
}
|
||||
},
|
||||
components: {
|
||||
@@ -180,6 +189,39 @@ layout("/layouts/platform.html"){
|
||||
openArchive() {
|
||||
this.$refs.archiveMemberRef.archiveDialogVisible = true
|
||||
},
|
||||
syncMobile() {
|
||||
this.$confirm("将从手机号为空的会员中随机取500人获取手机号,确定继续吗?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(() => {
|
||||
this.syncMobileLoading = true
|
||||
this.$axios.post(loc() + "/syncMobile").then((res) => {
|
||||
if (res.code === 0) {
|
||||
const data = res.data || {}
|
||||
const failedJobNos = data.failedJobNos || []
|
||||
this.$alert(
|
||||
"抽取人数:" + (data.sampleCount || 0) +
|
||||
"<br>请求人数:" + (data.requestUserCount || 0) +
|
||||
"<br>接口返回数量:" + (data.pulledCount || 0) +
|
||||
"<br>有效手机号数量:" + (data.validMobileCount || 0) +
|
||||
"<br>系统用户更新数量:" + (data.updatedUserCount || 0) +
|
||||
"<br>失败工号数量:" + failedJobNos.length,
|
||||
"手机号获取完成",
|
||||
{
|
||||
dangerouslyUseHTMLString: true,
|
||||
confirmButtonText: "确定"
|
||||
}
|
||||
)
|
||||
this.pageData()
|
||||
} else {
|
||||
this.$message.warning(res.msg || "手机号获取失败")
|
||||
}
|
||||
}).finally(() => {
|
||||
this.syncMobileLoading = false
|
||||
})
|
||||
}).catch(() => {})
|
||||
},
|
||||
openView(userId) {
|
||||
this.$refs.guava.view(() => {
|
||||
this.$refs.infoRef.onOpen(userId)
|
||||
|
||||
Reference in New Issue
Block a user