门户后台-协议管理功能完善
This commit is contained in:
parent
1293b64981
commit
8346fe7b99
@ -116,6 +116,7 @@ public class AgreementPortalServiceImpl extends DefaultBaseService implements IA
|
||||
} else {
|
||||
setAppUpdateInfo(token, params);
|
||||
}
|
||||
|
||||
// 查询此类型是否已经有数据
|
||||
// 如果有,则版本号+1
|
||||
Object o = params.get("sendStatus");
|
||||
@ -126,9 +127,14 @@ public class AgreementPortalServiceImpl extends DefaultBaseService implements IA
|
||||
Optional<AgreementPortalDTO> max = list.stream()
|
||||
.max(Comparator.comparingDouble(AgreementPortalDTO::getVersionNum));
|
||||
params.put("versionNum", max.get().getVersionNum() + 1);
|
||||
params.put("sendStatus", o);
|
||||
|
||||
if(!o.equals("save")) {
|
||||
save(agreementVO);
|
||||
}else {
|
||||
agreementDao.update(params);
|
||||
}
|
||||
}
|
||||
params.put("sendStatus", o);
|
||||
agreementDao.update(params);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -273,7 +273,7 @@
|
||||
}
|
||||
});
|
||||
} else if(layEvent === 'updateEvent') {
|
||||
if(checkDatas.length === 0) {
|
||||
/*if(checkDatas.length === 0) {
|
||||
top.dialog.msg(top.dataMessage.table.selectEdit);
|
||||
} else if(checkDatas.length > 1) {
|
||||
top.dialog.msg(top.dataMessage.table.selectOneEdit);
|
||||
@ -292,6 +292,24 @@
|
||||
reloadTable();
|
||||
}
|
||||
});
|
||||
}*/
|
||||
if(checkDatas.length === 0) {
|
||||
top.dialog.msg(top.dataMessage.table.selectEdit);
|
||||
} else if(checkDatas.length > 1) {
|
||||
top.dialog.msg(top.dataMessage.table.selectOneEdit);
|
||||
}else {
|
||||
layer.open({
|
||||
type: 2,
|
||||
title: false,
|
||||
closeBtn: 0,
|
||||
area: ['100%', '100%'],
|
||||
shadeClose: true,
|
||||
anim: 2,
|
||||
content: top.restAjax.path('route/agreementportal/update?agreementId={agreementId}', [checkDatas[0].agreementId]),
|
||||
end: function() {
|
||||
reloadTable();
|
||||
}
|
||||
});
|
||||
}
|
||||
} else if(layEvent === 'removeEvent') {
|
||||
if(checkDatas.length === 0) {
|
||||
|
@ -55,7 +55,7 @@
|
||||
<div class="layui-form-item layui-layout-admin">
|
||||
<div class="layui-input-block">
|
||||
<div class="layui-footer" style="left: 0;">
|
||||
<button type="button" class="layui-btn" lay-submit lay-filter="saveForm">保存</button>
|
||||
<button type="button" class="layui-btn" id="saveBtn" lay-submit lay-filter="saveForm">保存</button>
|
||||
<button type="button" class="layui-btn" lay-submit lay-filter="submitForm">发布</button>
|
||||
<button type="button" class="layui-btn layui-btn-primary close">返回上级</button>
|
||||
</div>
|
||||
@ -144,6 +144,11 @@
|
||||
}
|
||||
form.val('dataForm', dataFormData);
|
||||
form.render(null, 'dataForm');
|
||||
|
||||
if('save' != data['sendStatus']) {
|
||||
$('#saveBtn').attr('disabled', 'disabled');
|
||||
}
|
||||
|
||||
initContentRichText(data['content']);
|
||||
initagreementportalTypeSelect(data['agreementType']);
|
||||
// 设置开关值
|
||||
|
Loading…
Reference in New Issue
Block a user