|
|
!function (e, n, t) { "use strict"; n.fnKeyUnit = function (e) { e.value = e.value.toUpperCase() }, n.fnSGMod = function (n) { var t = n || e(".shjy-box"); "SG" !== parent.OrgID && t.remove() }, n.fnUpdateBillInfo = function (e, n, t) { var i = { Guid: n }; t && (i.BillNO = t), g_api.ConnectLite(e, "UpdateBillInfo", i, function (e) { e.RESULT && console.log(e) }) }, n.fnDeleteBillInfo = function (e) { var n = { BillNO: e }; g_api.ConnectLite("Exhibition", "DeleteBillInfo", n, function (e) { e.RESULT && console.log(e) }) }, n.getSelectedValues = function (e) { let n = []; return document.querySelectorAll(e + " option").forEach(function (e) { e.selected && n.push(e.value) }), n }, n.fnCheckBillEffective = function (n) { var t = []; return n && n.length > 0 && (t = e.grep(n, function (e) { return "6" !== e.AuditVal })), t.length > 0 }, n.fnCheckRtnBillEffective = function (n) { var t = []; return n && n.length > 0 && e.grep(n, function (n) { n.Bills && n.Bills.length > 0 && t.push(e.grep(n.Bills, function (e) { return "6" !== e.AuditVal })) }), t.length > 0 }, n.fnStarFeeItems = function (n) { n = n || {}; var t = [], i = [], a = function (e) { return CallAjax(ComFn.W_Com, ComFn.GetList, { Type: "", Params: { profiles: { ProfileType: "FeeClass", OrgID: parent.OrgID, UserID: parent.UserID }, sort: { SN: "asc" } } }, function (n) { n.d && (i = JSON.parse(n.d), e.html(createOptions(i, "SN", "ProfileName"))) }) }; getHtmlTmp("/Page/Pop/ProfileFees.html").done(function (l) { layer.open({ type: 1, title: i18next.t("common.ProfileFees"), shadeClose: !1, shade: .1, maxmin: !0, area: ["600px", "500px"], content: l, success: function (n, l) { var o = n.find("#lstLeft"), r = n.find("#lstRight"); a(n.find("#ProfileClass")), fnSetArgDrop([{ ArgClassID: "FeeClass", Select: o, ShowId: !0, CallBack: function (e) { t = e } }]).done(function () { o.find("option:first").remove(), optionListSearch(o, r, n.find("#ProfileFilter")) }), n.find("#ProfileClass").on("change", function () { var a = this.value, l = []; if (a) { var c = e.grep(i, function (e) { return e.SN.toString() === a })[0]; l = JSON.parse(c.ProfileSet || "[]"), n.find("#ProfileName").val(c.ProfileName) } else n.find("#ProfileName").val(""); r.html(""), o.html(createOptions(t, "id", "text", !0)).find("option:first").remove(), n.find("#lstLeft option").each(function () { var n = e(this).val(); l.indexOf(n) > -1 && e(this).appendTo(r) }) }), n.find(".cusclass-add").on("click", function () { !function (n) { var t = {}; if (t.OrgID = parent.OrgID, t.UserID = parent.UserID, t.ProfileType = "FeeClass", t.ProfileName = n.find("#ProfileName").val(), t.ProfileSet = [], n.find("#lstRight option").each(function () { t.ProfileSet.push(this.value) }), t.ProfileSet = JSON.stringify(t.ProfileSet), !(t = packParams(t)).ProfileName) return showMsg(i18next.t("message.ProfileFeesClassName_Required")), !1; CallAjax(ComFn.W_Com, ComFn.GetAdd, { Params: { profiles: t } }, function (i) { i.d > 0 ? (a(n.find("#ProfileClass")).done(function () { n.find("#ProfileClass option").each(function () { if (e(this).text() === t.ProfileName) return n.find("#ProfileClass").val(this.value), !1 }) }), showMsg(i18next.t("message.Save_Success"), "success")) : showMsg(i18next.t("message.Save_Failed"), "error") }, function () { showMsg(i18next.t("message.Save_Failed"), "error") }) }(n) }), n.find(".cusclass-upd").on("click", function () { !function (e) { var n = {}, t = e.find("#ProfileClass").val(); if (n.ProfileName = e.find("#ProfileName").val(), n.ProfileSet = [], e.find("#lstRight option").each(function () { n.ProfileSet.push(this.value) }), n.ProfileSet = JSON.stringify(n.ProfileSet), !(n = packParams(n, "upd")).ProfileName) return showMsg(i18next.t("message.ProfileFeesClassName_Required")), !1; CallAjax(ComFn.W_Com, ComFn.GetUpd, { Params: { profiles: { values: n, keys: { SN: t } } } }, function (n) { n.d > 0 ? (a(e.find("#ProfileClass")).done(function () { e.find("#ProfileClass").val(t) }), showMsg(i18next.t("message.Modify_Success"), "success")) : showMsg(i18next.t("message.Modify_Failed"), "error") }, function (
|