Merge branch 'main' of https://dd3skj.picp.vip/zhaoxinyu/zhgh_njnu
This commit is contained in:
+11
-7
@@ -1,19 +1,17 @@
|
||||
package com.budwk.app.zhgh.welfare.controller;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckLogin;
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.budwk.app.base.annotation.SLog;
|
||||
import com.budwk.app.base.page.Pagination;
|
||||
import com.budwk.app.base.param.PageForm;
|
||||
import com.budwk.app.base.result.Result;
|
||||
import com.budwk.app.base.utils.PageUtil;
|
||||
import com.budwk.app.web.commons.auth.utils.SecurityUtil;
|
||||
import com.budwk.app.sys.models.Sys_user;
|
||||
import com.budwk.app.zhgh.welfare.model.WelfareList;
|
||||
import com.budwk.app.zhgh.welfare.model.WelfareUserSelection;
|
||||
import com.budwk.app.zhgh.welfare.param.WelfareSelectionSituationPageForm;
|
||||
import com.budwk.app.zhgh.welfare.service.WelfareListService;
|
||||
import com.budwk.app.zhgh.welfare.service.WelfareSelectionSituationService;
|
||||
import com.budwk.app.zhgh.welfare.service.WelfareSingleService;
|
||||
import com.budwk.app.zhgh.welfare.service.WelfareStatisticsService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
@@ -21,8 +19,6 @@ import lombok.extern.slf4j.Slf4j;
|
||||
import org.nutz.aop.interceptor.ioc.TransAop;
|
||||
import org.nutz.dao.Cnd;
|
||||
import org.nutz.dao.Dao;
|
||||
import org.nutz.dao.Sqls;
|
||||
import org.nutz.dao.sql.Sql;
|
||||
import org.nutz.ioc.aop.Aop;
|
||||
import org.nutz.ioc.loader.annotation.Inject;
|
||||
import org.nutz.ioc.loader.annotation.IocBean;
|
||||
@@ -86,7 +82,7 @@ public class WelfareSelectionSituationController {
|
||||
@SaCheckPermission("welfare.selection.situation")
|
||||
public Result confirmSelect(@Param("selections") WelfareUserSelection[] selections, String projectId, String userId) {
|
||||
int count = dao.count(WelfareList.class, Cnd.where(WelfareList::getProjectId, "=", projectId).and(WelfareList::getUserId, "=", userId));
|
||||
if(count==0){
|
||||
if (count == 0) {
|
||||
return Result.error("此用户没有选择的权限");
|
||||
}
|
||||
|
||||
@@ -109,4 +105,12 @@ public class WelfareSelectionSituationController {
|
||||
public void exportXlsx(@Valid @Param("pageForm") WelfareSelectionSituationPageForm pageForm, HttpServletResponse response) {
|
||||
situationService.exportXlsx(pageForm, response);
|
||||
}
|
||||
|
||||
@At
|
||||
@SaCheckLogin
|
||||
public Result getMobileByUserId(String userId) {
|
||||
Sys_user user = dao.fetch(Sys_user.class, userId);
|
||||
return Result.success().addData(user.getMobile());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -29,6 +29,10 @@
|
||||
{{ viewData.retireDate ? $moment(viewData.retireDate).format("YYYY-MM-DD") : null }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="联系电话">{{ viewData.mobile }}</el-descriptions-item>
|
||||
<el-descriptions-item label="福利号码">
|
||||
{{ viewData.welfareMobile }}
|
||||
<el-link type="primary" @click="openWelfareMobile">修改</el-link>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="电子邮箱">{{ viewData.email }}</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
|
||||
@@ -62,6 +66,18 @@
|
||||
<el-descriptions-item label="现聘职级">{{ viewData.positionLevel }}</el-descriptions-item>
|
||||
<el-descriptions-item label="职员等级">{{ viewData.employeeLevel }}</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
|
||||
<el-dialog title="修改福利号码" width="30%" :visible.sync="welfareDialog" append-to-body>
|
||||
<el-form :model="welfareForm" ref="formRef" label-width="120px">
|
||||
<el-form-item label="福利号码" prop="welfareMobile">
|
||||
<el-input v-model="welfareForm.welfareMobile" placeholder="请输入福利号码" maxlength="11" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer">
|
||||
<el-button type="default" block @click="welfareDialog = false">取消</el-button>
|
||||
<el-button type="primary" block @click="saveWelfareMobile">保存</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
@@ -69,7 +85,12 @@ module.exports = {
|
||||
name: "userInfo",
|
||||
data() {
|
||||
return {
|
||||
viewData: {}
|
||||
id: null,
|
||||
viewData: {},
|
||||
welfareDialog: false,
|
||||
welfareForm: {
|
||||
welfareMobile: ""
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
@@ -77,11 +98,34 @@ module.exports = {
|
||||
if (!id) {
|
||||
return
|
||||
}
|
||||
this.id = id
|
||||
this.$axios.post("/platform/member/apply/common/findOne", { id }).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.viewData = res.data
|
||||
}
|
||||
})
|
||||
},
|
||||
openWelfareMobile() {
|
||||
this.welfareForm.welfareMobile = this.viewData.welfareMobile || ""
|
||||
this.welfareDialog = true
|
||||
},
|
||||
saveWelfareMobile() {
|
||||
if (!this.welfareForm.welfareMobile) {
|
||||
this.$message.warning("请输入福利号码")
|
||||
return
|
||||
}
|
||||
if (!/^1[3-9]\d{9}$/.test(this.welfareForm.welfareMobile)) {
|
||||
this.$message.warning("请输入正确的手机号码")
|
||||
return
|
||||
}
|
||||
|
||||
this.$axios.post("/platform/h5/updateWelfareMobile", { mobile: this.welfareForm.welfareMobile }).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.$message.success("修改成功")
|
||||
this.welfareDialog = false
|
||||
this.onOpen(this.id)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+2
-2
@@ -127,8 +127,8 @@ const MEMBER_MANAGE_TABLE = {
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item
|
||||
:command="{type:'changeWelfareMobile',data:row}"
|
||||
v-if="$auth.hasRoleOr(['SYSADMIN','SCHOOL_UNION_ADMIN'])">
|
||||
修改福利号码
|
||||
v-if="$auth.hasRoleOr(['SYSADMIN','SCHOOL_UNION_ADMIN','BRANCH_UNION_CHAIRMAN','BRANCH_UNION_CHAIRMAN'])">
|
||||
修改福利号码
|
||||
</el-dropdown-item>
|
||||
|
||||
<!--<el-dropdown-item
|
||||
|
||||
@@ -378,6 +378,15 @@ const optionSelect = {
|
||||
|
||||
if (this.userSelection && this.userSelection.length > 0) {
|
||||
this.contactForm.mobile = this.userSelection[0]?.mobile
|
||||
} else {
|
||||
if (this.isProxySelect) {
|
||||
// 否则使用默认手机号
|
||||
$.post("/platform/welfare/selection/situation/getMobileByUserId", { userId: this.userId }).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.contactForm.mobile = res.data
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
// 地址回显
|
||||
|
||||
@@ -65,12 +65,12 @@ const mine = {
|
||||
</span>
|
||||
</van-cell>
|
||||
|
||||
<van-cell is-link @click="$pjaxReplace('/platform/signature/h5')" class="action-cell">
|
||||
<!--<van-cell is-link @click="$pjaxReplace('/platform/signature/h5')" class="action-cell">
|
||||
<span class="cell-title" slot="title">
|
||||
<van-icon name="edit" class="cell-icon"></van-icon>
|
||||
福利号码
|
||||
</span>
|
||||
</van-cell>
|
||||
</van-cell>-->
|
||||
|
||||
<van-cell is-link @click="$pjaxReplace('/platform/signature/h5')" class="action-cell">
|
||||
<span class="cell-title" slot="title">
|
||||
|
||||
Reference in New Issue
Block a user