From 93ef3f2ab542b7b6fe941c30bf56b35e743cf299 Mon Sep 17 00:00:00 2001 From: LSH Date: 星期六, 04 十一月 2023 17:51:39 +0800 Subject: [PATCH] # --- src/main/webapp/static/js/priOnline2/priOnline.js | 68 ++++++++++++++++++++++++++++++++++ 1 files changed, 68 insertions(+), 0 deletions(-) diff --git a/src/main/webapp/static/js/priOnline2/priOnline.js b/src/main/webapp/static/js/priOnline2/priOnline.js index f710787..b2a6eb5 100644 --- a/src/main/webapp/static/js/priOnline2/priOnline.js +++ b/src/main/webapp/static/js/priOnline2/priOnline.js @@ -177,6 +177,9 @@ case 'addBlank': showEditModel(); break; + case 'addBlank2': + showEditModel2(); + break; case 'refreshData': tableIns.reload({ page: { @@ -547,6 +550,42 @@ }); } + /* 寮圭獥 - 鏂板銆佷慨鏀� */ + function showEditModel2(mData) { + admin.open({ + type: 1, + area: '800px', + title: '鎺ュ彇' + '鏍镐环', + content: $('#editDialogHJ').html(), + success: function (layero, dIndex) { + let loadNameXml = loadNameXmlSel() + form.val('detailHJ', mData); + form.on('submit(editSubmitHJ)', function (data) { + data.field.id = loadNameXml.getValue()[0] ? loadNameXml.getValue()[0].id : null; + $.ajax({ + url: baseUrl+"/priOnline2/HJ/add/auth", + headers: {'token': localStorage.getItem('token')}, + data: data.field, + method: 'POST', + success: function (res) { + if (res.code === 200){ + layer.close(dIndex); + layer.msg(res.msg, {icon: 1}); + tableReload() + } else if (res.code === 403){ + top.location.href = baseUrl+"/"; + }else { + layer.msg(res.msg, {icon: 2}); + } + } + }) + }); + $(layero).children('.layui-layer-content').css('overflow', 'visible'); + layui.form.render('select'); + } + }); + } + //鏇存柊form function showEditForm(mData) { admin.open({ @@ -640,6 +679,35 @@ }) } + window.loadNameXmlSel = function () { + return xmSelect.render({ + el: '#nameXmlSel', + autoRow: true, + filterable: true, + remoteSearch: true, + clickClose: true, + radio: true, + remoteMethod: function (val, cb, show) { + $.ajax({ + url: baseUrl + "/priOnline2/HJ/search/auth", + headers: {'token': localStorage.getItem('token')}, + data: { + condition: val + }, + method: 'POST', + success: function (res) { + if (res.code === 200) { + cb(res.data) + } else { + cb([]); + layer.msg(res.msg, {icon: 2}); + } + } + }); + } + }); + } + }); // 鍏抽棴鍔ㄤ綔 -- Gitblit v1.9.1