前端问题优化

This commit is contained in:
cwchen 2025-01-22 10:55:50 +08:00
parent 4796a44e6c
commit 68f0489613
1 changed files with 13 additions and 0 deletions

View File

@ -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) {