可见性修改,资金计划表校验取消
parent
38834e20c3
commit
06935c0f0d
|
@ -533,21 +533,24 @@ public class ProjectService {
|
|||
for (String projectIdStr : split) {
|
||||
Integer projectId = Integer.parseInt(projectIdStr);
|
||||
//1.先清除以前的
|
||||
List<ProjectVisible> projectVisibles = projectVisibleRepository.findAllByProjectIdEquals(projectId);
|
||||
if(CollectionUtil.isNotEmpty(projectVisibles)){
|
||||
projectVisibleRepository.deleteInBatch(projectVisibles);
|
||||
}
|
||||
// List<ProjectVisible> projectVisibles = projectVisibleRepository.findAllByProjectIdEquals(projectId);
|
||||
// if(CollectionUtil.isNotEmpty(projectVisibles)){
|
||||
// projectVisibleRepository.deleteInBatch(projectVisibles);
|
||||
// }
|
||||
//2.再保存
|
||||
|
||||
for (String s : idss) {
|
||||
//只要用户的,角色的不要
|
||||
if(s.startsWith(PREFIX_USER)){
|
||||
ProjectVisible pv = new ProjectVisible();
|
||||
pv.setProjectId(projectId);
|
||||
pv.setType(ProjectVisible.TYPE_USER);
|
||||
//去掉前缀
|
||||
pv.setTid(Integer.parseInt(s.substring(PREFIX_USER.length())));
|
||||
pvs.add(pv);
|
||||
if (projectVisibleRepository.findByProjectIdAndTypeAndTid(projectId,
|
||||
ProjectVisible.TYPE_USER, Integer.parseInt(s.substring(PREFIX_USER.length()))).isEmpty()) {
|
||||
ProjectVisible pv = new ProjectVisible();
|
||||
pv.setProjectId(projectId);
|
||||
pv.setType(ProjectVisible.TYPE_USER);
|
||||
//去掉前缀
|
||||
pv.setTid(Integer.parseInt(s.substring(PREFIX_USER.length())));
|
||||
pvs.add(pv);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -163,12 +163,12 @@ $(function () {
|
|||
}
|
||||
|
||||
//校验数据正确性
|
||||
var message = verifyBudgetPlan();
|
||||
if (message) {
|
||||
layuiAlert(message);
|
||||
$("#saveDraft").attr('disabled', false);
|
||||
return;
|
||||
}
|
||||
// var message = verifyBudgetPlan();
|
||||
// if (message) {
|
||||
// layuiAlert(message);
|
||||
// $("#saveDraft").attr('disabled', false);
|
||||
// return;
|
||||
// }
|
||||
|
||||
dataPlan = prepareAjaxDataVerify(dataPlan, BUDGET_PLAN_DETAIL2, $("#id").val());
|
||||
if(dataPlan){
|
||||
|
|
|
@ -86,11 +86,11 @@ $(function () {
|
|||
closeOnConfirm:false,
|
||||
onConfirm: function(e) {
|
||||
//校验数据正确性
|
||||
var message = verifyBudgetPlan();
|
||||
if (message) {
|
||||
layuiAlert(message);
|
||||
return;
|
||||
}
|
||||
// var message = verifyBudgetPlan();
|
||||
// if (message) {
|
||||
// layuiAlert(message);
|
||||
// return;
|
||||
// }
|
||||
//不能使用e.data,因为无法获取动态添加的
|
||||
var data = collectData("am-modal-prompt-input-budget-plan-detail");
|
||||
//data = prepareAjaxData(data, BUDGET_PLAN_DETAIL_ARR, $("#id").val(),false);
|
||||
|
@ -284,11 +284,11 @@ function bindMonth() {
|
|||
$(function () {
|
||||
$("#budgetPlanDetailTableSave").click(function () {
|
||||
//校验数据正确性
|
||||
var message = verifyBudgetPlan();
|
||||
if (message) {
|
||||
layuiAlert(message);
|
||||
return;
|
||||
}
|
||||
// var message = verifyBudgetPlan();
|
||||
// if (message) {
|
||||
// layuiAlert(message);
|
||||
// return;
|
||||
// }
|
||||
|
||||
//不能使用e.data,因为无法获取动态添加的
|
||||
var data = collectData("am-modal-prompt-input-budget-plan-detail");
|
||||
|
|
Loading…
Reference in New Issue