feat: 特殊慰问-职工慰问优化4
This commit is contained in:
+3
-3
@@ -172,16 +172,16 @@ public class CondolenceReadController {
|
||||
}
|
||||
|
||||
private void applyReadScope(Cnd cnd, String alias) {
|
||||
if (AuthUtil.hasPermission("all_school")) {
|
||||
if (AuthUtil.hasPermission("condolence_all_school")) {
|
||||
return;
|
||||
}
|
||||
if (AuthUtil.hasPermission("branch_union")) {
|
||||
if (AuthUtil.hasPermission("condolence_branch_union")) {
|
||||
String unionId = SecurityUtil.getUnionId();
|
||||
if (StrUtil.isNotBlank(unionId)) {
|
||||
cnd.and(alias + ".applyUnionId", "=", unionId);
|
||||
return;
|
||||
}
|
||||
} else if (AuthUtil.hasPermission("self")) {
|
||||
} else if (AuthUtil.hasPermission("condolence_self")) {
|
||||
cnd.and(alias + ".createdBy", "=", SecurityUtil.getUserId());
|
||||
return;
|
||||
}
|
||||
|
||||
+3
-3
@@ -154,7 +154,7 @@ public class DifficultHelpReadingController {
|
||||
""");
|
||||
Cnd cnd = Cnd.NEW();
|
||||
cnd.and("ins.state", "=", 20);
|
||||
pageParam.buildSearch(cnd, "info.", false);
|
||||
pageParam.buildReadingSearch(cnd, "info.");
|
||||
cnd.groupBy("info.id");
|
||||
sql.setCondition(cnd);
|
||||
Pagination<NutMap> pagination = difficultHelpCommonService.listPageMap(pageParam.getPageNumber(), pageParam.getPageSize(), sql);
|
||||
@@ -269,7 +269,7 @@ public class DifficultHelpReadingController {
|
||||
$condition
|
||||
""");
|
||||
Cnd cnd = Cnd.NEW();
|
||||
pageParam.buildSearch(cnd, "info.", false);
|
||||
pageParam.buildReadingSearch(cnd, "info.");
|
||||
cnd.groupBy("info.id");
|
||||
sql.setCondition(cnd);
|
||||
List<NutMap> list = difficultHelpCommonService.listMap(sql);
|
||||
@@ -500,7 +500,7 @@ public class DifficultHelpReadingController {
|
||||
$condition
|
||||
""");
|
||||
Cnd cnd = Cnd.NEW();
|
||||
pageParam.buildSearch(cnd, "info.", false);
|
||||
pageParam.buildReadingSearch(cnd, "info.");
|
||||
cnd.groupBy("info.id");
|
||||
sql.setCondition(cnd);
|
||||
List<NutMap> list = difficultHelpCommonService.listMap(sql);
|
||||
|
||||
+1
@@ -129,6 +129,7 @@ public class DifficultHelpCommonServiceImpl extends BaseServiceImpl<DifficultHel
|
||||
|
||||
// 2. 查询符合条件的 DifficultHelpInfo 记录
|
||||
Cnd cnd = Cnd.NEW();
|
||||
pageForm.applyReadingScope(cnd, "");
|
||||
if (StrUtil.isNotBlank(pageForm.getSearchKeyword())) {
|
||||
cnd.and(Cnd.exps("loginName", "LIKE", "%" + pageForm.getSearchKeyword() + "%")
|
||||
.or("userName", "LIKE", "%" + pageForm.getSearchKeyword() + "%"));
|
||||
|
||||
+20
@@ -32,6 +32,26 @@ public class DifficultHelpPageParam extends PageForm {
|
||||
|
||||
private List<String> dateRange;
|
||||
|
||||
public void buildReadingSearch(Cnd cnd, String prefix) {
|
||||
buildSearch(cnd, prefix, false);
|
||||
applyReadingScope(cnd, prefix);
|
||||
}
|
||||
|
||||
public void applyReadingScope(Cnd cnd, String prefix) {
|
||||
if (AuthUtil.hasPermission("difficult_all_school")) {
|
||||
return;
|
||||
}
|
||||
if (AuthUtil.hasPermission("difficult_branch_union") && StrUtil.isNotBlank(SecurityUtil.getUnionId())) {
|
||||
cnd.and(prefix + "unionId", "=", SecurityUtil.getUnionId());
|
||||
return;
|
||||
}
|
||||
if (AuthUtil.hasPermission("difficult_self") && StrUtil.isNotBlank(SecurityUtil.getUserId())) {
|
||||
cnd.and(prefix + "userId", "=", SecurityUtil.getUserId());
|
||||
return;
|
||||
}
|
||||
cnd.and("1", "=", 0);
|
||||
}
|
||||
|
||||
public void buildSearch(Cnd cnd, String prefix){
|
||||
buildSearch(cnd, prefix, true);
|
||||
}
|
||||
|
||||
@@ -25,10 +25,7 @@ module.exports = {
|
||||
watch: {
|
||||
value: {
|
||||
handler(val) {
|
||||
if (val) {
|
||||
this.signatureContent = val
|
||||
this.$emit("input", this.signatureContent)
|
||||
}
|
||||
this.signatureContent = val || null
|
||||
},
|
||||
immediate: true
|
||||
}
|
||||
@@ -62,8 +59,11 @@ module.exports = {
|
||||
if (res.code !== 0) {
|
||||
throw new Error("签字信息加载失败")
|
||||
}
|
||||
this.signatureContent = res.data && res.data.signature
|
||||
this.$emit("input", this.signatureContent)
|
||||
// 已保存的业务签字或刚收到的扫码签字优先,默认签名仅补充空值。
|
||||
if (!this.value && !this.signatureContent && res.data && res.data.signature) {
|
||||
this.signatureContent = res.data.signature
|
||||
this.$emit("input", this.signatureContent)
|
||||
}
|
||||
})
|
||||
},
|
||||
// 返回等待完成的 Promise;连接成功、等待30秒或组件销毁时结束等待。
|
||||
|
||||
+7
-1
@@ -247,7 +247,13 @@ layout("/layouts/platform_h5.html"){
|
||||
if (window.h5HistoryLayerManager && window.h5HistoryLayerManager.open("condolence-action-confirm")) return
|
||||
this.$set(this, "confirmVisible", true)
|
||||
})
|
||||
.catch(() => {})
|
||||
.catch(errors => {
|
||||
if (!Array.isArray(errors) || !errors.length) return
|
||||
this.$toast(errors[0].message || '请完善审批信息')
|
||||
this.$nextTick(() => {
|
||||
this.$refs.formRef.scrollToField(errors[0].name)
|
||||
})
|
||||
})
|
||||
},
|
||||
// 确认操作时先回退确认框历史,再根据操作类型调用办理或撤回接口。
|
||||
confirmPendingAction() {
|
||||
|
||||
+7
-1
@@ -264,7 +264,13 @@ layout("/layouts/platform_h5.html"){
|
||||
if (window.h5HistoryLayerManager && window.h5HistoryLayerManager.open("condolence-action-confirm")) return
|
||||
this.$set(this, "confirmVisible", true)
|
||||
})
|
||||
.catch(() => {})
|
||||
.catch(errors => {
|
||||
if (!Array.isArray(errors) || !errors.length) return
|
||||
this.$toast(errors[0].message || '请完善审批信息')
|
||||
this.$nextTick(() => {
|
||||
this.$refs.formRef.scrollToField(errors[0].name)
|
||||
})
|
||||
})
|
||||
},
|
||||
// 确认操作时先回退确认框历史,再根据操作类型调用办理或撤回接口。
|
||||
confirmPendingAction() {
|
||||
|
||||
+7
-1
@@ -247,7 +247,13 @@ layout("/layouts/platform_h5.html"){
|
||||
if (window.h5HistoryLayerManager && window.h5HistoryLayerManager.open("condolence-action-confirm")) return
|
||||
this.$set(this, "confirmVisible", true)
|
||||
})
|
||||
.catch(() => {})
|
||||
.catch(errors => {
|
||||
if (!Array.isArray(errors) || !errors.length) return
|
||||
this.$toast(errors[0].message || '请完善审批信息')
|
||||
this.$nextTick(() => {
|
||||
this.$refs.formRef.scrollToField(errors[0].name)
|
||||
})
|
||||
})
|
||||
},
|
||||
// 确认操作时先回退确认框历史,再根据操作类型调用办理或撤回接口。
|
||||
confirmPendingAction() {
|
||||
|
||||
+7
-1
@@ -247,7 +247,13 @@ layout("/layouts/platform_h5.html"){
|
||||
if (window.h5HistoryLayerManager && window.h5HistoryLayerManager.open("condolence-action-confirm")) return
|
||||
this.$set(this, "confirmVisible", true)
|
||||
})
|
||||
.catch(() => {})
|
||||
.catch(errors => {
|
||||
if (!Array.isArray(errors) || !errors.length) return
|
||||
this.$toast(errors[0].message || '请完善审批信息')
|
||||
this.$nextTick(() => {
|
||||
this.$refs.formRef.scrollToField(errors[0].name)
|
||||
})
|
||||
})
|
||||
},
|
||||
// 确认操作时先回退确认框历史,再根据操作类型调用办理或撤回接口。
|
||||
confirmPendingAction() {
|
||||
|
||||
+7
-1
@@ -257,7 +257,13 @@ layout("/layouts/platform_h5.html"){
|
||||
if (window.h5HistoryLayerManager && window.h5HistoryLayerManager.open("difficult-help-action-confirm")) return
|
||||
this.$set(this, "confirmVisible", true)
|
||||
})
|
||||
.catch(() => {})
|
||||
.catch(errors => {
|
||||
if (!Array.isArray(errors) || !errors.length) return
|
||||
this.$toast(errors[0].message || '请完善审批信息')
|
||||
this.$nextTick(() => {
|
||||
this.$refs.formRef.scrollToField(errors[0].name)
|
||||
})
|
||||
})
|
||||
},
|
||||
|
||||
// 确认操作时先回退确认框历史,再根据操作类型调用办理或撤回接口。
|
||||
|
||||
@@ -318,7 +318,7 @@ layout("/layouts/platform_h5.html"){
|
||||
</style>
|
||||
<div id="app">
|
||||
<div class="difficult-help-list-page">
|
||||
<van-nav-bar title="帮扶申请记录" left-text="返回" left-arrow @click-left="historyBack" placeholder fixed></van-nav-bar>
|
||||
<van-nav-bar title="我的申请" left-text="返回" left-arrow @click-left="historyBack" placeholder fixed></van-nav-bar>
|
||||
<van-sticky offset-top="46px">
|
||||
<div class="difficult-help-list-sticky">
|
||||
<van-search
|
||||
|
||||
+7
-1
@@ -251,7 +251,13 @@ layout("/layouts/platform_h5.html"){
|
||||
if (window.h5HistoryLayerManager && window.h5HistoryLayerManager.open("difficult-help-action-confirm")) return
|
||||
this.$set(this, "confirmVisible", true)
|
||||
})
|
||||
.catch(() => {})
|
||||
.catch(errors => {
|
||||
if (!Array.isArray(errors) || !errors.length) return
|
||||
this.$toast(errors[0].message || '请完善审批信息')
|
||||
this.$nextTick(() => {
|
||||
this.$refs.formRef.scrollToField(errors[0].name)
|
||||
})
|
||||
})
|
||||
},
|
||||
|
||||
// 确认操作时先回退确认框历史,再根据操作类型调用办理或撤回接口。
|
||||
|
||||
+7
-1
@@ -265,7 +265,13 @@ layout("/layouts/platform_h5.html"){
|
||||
if (window.h5HistoryLayerManager && window.h5HistoryLayerManager.open("difficult-help-action-confirm")) return
|
||||
this.$set(this, "confirmVisible", true)
|
||||
})
|
||||
.catch(() => {})
|
||||
.catch(errors => {
|
||||
if (!Array.isArray(errors) || !errors.length) return
|
||||
this.$toast(errors[0].message || '请完善审批信息')
|
||||
this.$nextTick(() => {
|
||||
this.$refs.formRef.scrollToField(errors[0].name)
|
||||
})
|
||||
})
|
||||
},
|
||||
|
||||
// 确认操作时先回退确认框历史,再根据操作类型调用办理或撤回接口。
|
||||
|
||||
+1
-1
@@ -328,7 +328,7 @@ layout("/layouts/platform_h5.html"){
|
||||
methods: {
|
||||
showInvalidApplicationTab(errors) {
|
||||
if (!Array.isArray(errors) || !errors.length) return
|
||||
const error = errors[0]
|
||||
const error = errors.find(item => !String(item.name || '').startsWith('recipients')) || errors[0]
|
||||
const name = String(error.name || '')
|
||||
const recipient = name.match(/^recipients\.(\d+)\./)
|
||||
this.activeApplicationTab = name.startsWith('recipients') ? 'recipients' : 'form'
|
||||
|
||||
Reference in New Issue
Block a user