前端问题优化
This commit is contained in:
parent
4796a44e6c
commit
68f0489613
|
|
@ -155,6 +155,7 @@ function submitApply(data) {
|
|||
if (result.code === 200) {
|
||||
parent.layer.msg(result.msg, { icon: 1 });
|
||||
if (isGoOn === '1') { // 保存并继续添加
|
||||
clearFormData();
|
||||
closePage(2, result.data);
|
||||
} else if (isGoOn === '0' && objParam.type !== 3) { // 保存
|
||||
closePage(1, result.data);
|
||||
|
|
@ -174,6 +175,18 @@ function submitApply(data) {
|
|||
errorFn(xhr, status, error)
|
||||
}, null);
|
||||
}
|
||||
function clearFormData(){
|
||||
if (objParam.level === '1') {
|
||||
$('#name').val('');
|
||||
} else if (objParam.level === '2') {
|
||||
$('#name').val('');
|
||||
} else if (objParam.level === '3') {
|
||||
$('#name').val('');
|
||||
$('#unitName').val('');
|
||||
$('#cycle').val('');
|
||||
$('#remark').val('');
|
||||
}
|
||||
}
|
||||
|
||||
// 关闭页面 type:2 保存并继续添加
|
||||
function closePage(type, obj) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue