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