From dd7a67ad1735ba080f41668f31517ae46e112a60 Mon Sep 17 00:00:00 2001 From: erdanergou Date: Thu, 1 Jun 2023 08:52:31 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E7=AE=A1=E7=90=86=E5=91=98?= =?UTF-8?q?=E5=87=BA=E5=BA=93=E6=97=B6=E7=BB=84=E5=90=88=E5=87=BA=E5=BA=93?= =?UTF-8?q?=E6=97=B6=E4=BB=A3=E9=A2=86=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pages/application/application-out.html | 2 + .../application-out.html | 88 +++++++++++++------ 2 files changed, 65 insertions(+), 25 deletions(-) diff --git a/src/main/resources/templates/pages/application/application-out.html b/src/main/resources/templates/pages/application/application-out.html index 792ef65f..4f3c8b21 100644 --- a/src/main/resources/templates/pages/application/application-out.html +++ b/src/main/resources/templates/pages/application/application-out.html @@ -1820,6 +1820,8 @@ let id = obj.id; if (id.indexOf("ForGroup") !== -1) { id = "ForGroup"; + }else{ + id = ""; } let name = obj.value; if (name !== "") { diff --git a/src/main/resources/templates/pages/applicationForStorageCenter/application-out.html b/src/main/resources/templates/pages/applicationForStorageCenter/application-out.html index c2d7cf5d..6aa2f3e2 100644 --- a/src/main/resources/templates/pages/applicationForStorageCenter/application-out.html +++ b/src/main/resources/templates/pages/applicationForStorageCenter/application-out.html @@ -258,6 +258,30 @@
+
+
+ +
+ +
+
+ +
+
@@ -524,7 +548,7 @@ elem: '#stepForm2', filter: 'stepForm2', width: '100%', //设置容器宽度 - height: '600px', + height: '700px', stepItems: [{ title: '填写信息' }, { @@ -555,6 +579,7 @@ }; $("#openCompanyAdminorg").on('click',selectPost); + $("#openCompanyAdminorgForGroup").on('click',selectPost); // 提交(物料出库) form.on('submit(formStep)', function (data) { @@ -584,7 +609,7 @@ } data.params = remove(data.params, Number(keyNumber)); } - $.ajax({ + /*$.ajax({ url: "/depositoryRecord/applicationOut", type: 'post', dataType: 'json', @@ -612,9 +637,9 @@ complete: function () { layer.close(this.layerIndex); } - }); + });*/ } - + console.log(data) return false; }); @@ -646,7 +671,8 @@ } data.params = remove(data.params, Number(keyNumber)); } - $.ajax({ + console.log(data) + /*$.ajax({ url: "/group/applicationOutForGroup", type: 'post', dataType: 'json', @@ -672,7 +698,7 @@ complete: function () { layer.close(this.layerIndex); } - }); + });*/ } }); @@ -681,21 +707,22 @@ // 监听开关 form.on('switch()', function (data) { let isAgency = data.elem.checked; //开关是否开启,true或者false + let id = data.elem.id; if (isAgency) { // 如果开启了代领功能 - $("#agencyItem").show(); + $("#agencyItem"+ id).show(); // 添加必填 - $("#agencyUid").attr("lay-verify", "required"); + $("#agencyUid"+ id).attr("lay-verify", "required"); - $("#openCompanyAdminorg").off("click"); + $("#openCompanyAdminorg"+ id).off("click"); } else { - $("#agencyItem").hide(); + $("#agencyItem"+ id).hide(); // 删除必填 - $("#agencyUid").removeAttr("lay-verify"); + $("#agencyUid"+ id).removeAttr("lay-verify"); - $("#openCompanyAdminorg").on('click',selectPost); + $("#openCompanyAdminorg"+ id).on('click',selectPost); } }); @@ -1950,6 +1977,12 @@ // 用于选择代领用户 selectUser = function (obj) { + let id = obj.id; + if (id.indexOf("ForGroup") !== -1) { + id = "ForGroup"; + }else{ + id = ''; + } let name = obj.value; if (name !== "") { let req = {}; @@ -1973,17 +2006,17 @@ icon: 0, time: 1000 }, function () { - $("#adminorgId").val(""); - $("#openCompanyAdminorg").val(""); - $("#agencyUid").val(""); - $("#agencyUser").val(""); + $("#adminorgId" + id).val(""); + $("#openCompanyAdminorg" + id).val(""); + $("#agencyUid" + id).val(""); + $("#agencyUser" + id).val(""); }) } else if (count > 1) { let content = ``; $.each(data, function (index, item) { let listItem = `
- +
`; content += listItem; }); @@ -1995,10 +2028,10 @@ }) } else { let user = data[0]; - $("#adminorgId").val(user.maindeparment); - $("#openCompanyAdminorg").val(user.maindeparmentname); - $("#agencyUid").val(user.id); - $("#agencyUser").val(user.name); + $("#adminorgId" + id).val(user.maindeparment); + $("#openCompanyAdminorg" + id).val(user.maindeparmentname); + $("#agencyUid" + id).val(user.id); + $("#agencyUser" + id).val(user.name); } } }) @@ -2008,14 +2041,19 @@ // 用于选定人员 SelectTheUser = function (obj) { let data = $(obj); + let isGroup = data.attr("isGroup"); + if (isGroup !== "ForGroup") { + isGroup = ""; + } + let adminorg = data.attr("adminorg"); let adminorgName = data.attr("adminorgname"); let id = data.attr("id"); let name = data.attr("name"); - $("#adminorgId").val(adminorg); - $("#openCompanyAdminorg").val(adminorgName); - $("#agencyUid").val(id); - $("#agencyUser").val(name); + $("#adminorgId" + isGroup).val(adminorg); + $("#openCompanyAdminorg" + isGroup).val(adminorgName); + $("#agencyUid" + isGroup).val(id); + $("#agencyUser" + isGroup).val(name); layer.close(selectUserIfame) };