|
|
|
@ -11,15 +11,16 @@ layui.use(['form', 'admin', 'HttpRequest'], function () {
|
|
|
|
|
|
|
|
|
|
//表单提交事件
|
|
|
|
|
form.on('submit(btnSubmit)', function (data) {
|
|
|
|
|
var request = new HttpRequest(Feng.ctxPath + "/dict/add", 'post', function (data) {
|
|
|
|
|
admin.closeThisDialog();
|
|
|
|
|
Feng.success("添加成功!");
|
|
|
|
|
admin.putTempData('formOk', true);
|
|
|
|
|
}, function (data) {
|
|
|
|
|
admin.closeThisDialog();
|
|
|
|
|
Feng.error("添加失败!" + data.message);
|
|
|
|
|
});
|
|
|
|
|
request.set(data.field);
|
|
|
|
|
request.start(true);
|
|
|
|
|
var request = new HttpRequest(Feng.ctxPath + "/dict/add", 'post', function (data) {
|
|
|
|
|
admin.closeThisDialog();
|
|
|
|
|
Feng.success("添加成功!");
|
|
|
|
|
admin.putTempData('formOk', true);
|
|
|
|
|
}, function (data) {
|
|
|
|
|
admin.closeThisDialog();
|
|
|
|
|
Feng.error("添加失败!" + data.message);
|
|
|
|
|
});
|
|
|
|
|
request.set(data.field);
|
|
|
|
|
request.start(true);
|
|
|
|
|
return false;
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|