diff --git a/js/aq_basic/child/type_form.js b/js/aq_basic/child/type_form.js index 1285525..fd86486 100644 --- a/js/aq_basic/child/type_form.js +++ b/js/aq_basic/child/type_form.js @@ -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) {