yusijie
2024-03-20 2f55e014a562ca2625e6ba3e3cc999c7d08c59c1
WebTM/views/ÑéÊÕÈë¿â/Í⹺Èë¿â/Kf_POStockInBackBillList.html
@@ -2,7 +2,7 @@
<html>
<head>
    <meta charset="utf-8" />
    <title>采购退料单列表</title>
    <title>采购收料单列表</title>
    <link rel="stylesheet" href="../../../layuiadmin/layui/css/layui.css" media="all">
    <link rel="stylesheet" href="../../../layuiadmin/style/admin.css" media="all">
    <!--<script src="../../../layuiadmin/layui/layui.js"></script>-->
@@ -38,73 +38,79 @@
                                <div class="layui-inline">
                                    <label class="layui-form-label">开始日期</label>
                                    <div class="layui-input-block">
                                        <input type="date" class="layui-input" id="HBeginDate" style="width:190px;">
                                        <input type="date" class="layui-input ForFilteringSchemes" id="HBeginDate" style="width:190px;">
                                    </div>
                                </div>
                                <div class="layui-inline">
                                    <label class="layui-form-label">结束日期</label>
                                    <div class="layui-input-block">
                                        <input type="date" class="layui-input" id="HEndDate" style="width:190px;">
                                        <input type="date" class="layui-input ForFilteringSchemes" id="HEndDate" style="width:190px;">
                                    </div>
                                </div>
                                <div class="layui-inline">
                                    <label class="layui-form-label">单据号</label>
                                    <div class="layui-input-block">
                                        <input type="text" class="layui-input" name="HBillNo" id="HBillNo" style="width:190px;">
                                        <input type="text" class="layui-input ForFilteringSchemes" name="HBillNo" id="HBillNo" style="width:190px;">
                                    </div>
                                </div>
                                <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnSearch" id="btnSearch">
                                    <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i>
                                </button>
                                <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnReSearch" id="btnReSearch" style="padding:0 5px">重置</button>
                                <div class="layui-row">
                                    <!--显示当前过滤方案-->
                                    <div class="layui-inline" style="margin-left:5px;">
                                        <div style="text-align:center;font-size:15px;font-weight:bold;color:#fc9393" id="HFilterScheme_Now"></div>
                                    </div>
                                </div>
                                <div class="layui-colla-content">
                                    <div class="layui-inline">
                                        <label class="layui-form-label">供应商</label>
                                        <div class="layui-input-block">
                                            <input type="text" class="layui-input" name="Hname" id="Hname" style="width:190px;">
                                            <input type="text" class="layui-input ForFilteringSchemes" name="Hname" id="Hname" style="width:190px;">
                                        </div>
                                    </div>
                                    <div class="layui-inline">
                                        <label class="layui-form-label">部门</label>
                                        <div class="layui-input-block">
                                            <input type="text" class="layui-input" name="HDeptID" id="HDeptID" style="width:190px;">
                                            <input type="text" class="layui-input ForFilteringSchemes" name="HDeptID" id="HDeptID" style="width:190px;">
                                        </div>
                                    </div>
                                    <div class="layui-inline">
                                        <label class="layui-form-label">物料代码</label>
                                        <div class="layui-input-block">
                                            <input type="text" class="layui-input" name="MaterialCode" id="MaterialCode" style="width:190px;">
                                            <input type="text" class="layui-input ForFilteringSchemes" name="MaterialCode" id="MaterialCode" style="width:190px;">
                                        </div>
                                    </div>
                                    <!--<hr />-->
                                    <div class="layui-inline">
                                        <label class="layui-form-label">物料名称</label>
                                        <div class="layui-input-block">
                                            <input type="text" class="layui-input" name="MaterialName" id="MaterialName" style="width:190px;">
                                            <input type="text" class="layui-input ForFilteringSchemes" name="MaterialName" id="MaterialName" style="width:190px;">
                                        </div>
                                    </div>
                                    <div class="layui-inline">
                                        <label class="layui-form-label">规格型号</label>
                                        <div class="layui-input-block">
                                            <input type="text" class="layui-input" name="SpecificationModel" id="SpecificationModel" style="width:190px;">
                                            <input type="text" class="layui-input ForFilteringSchemes" name="SpecificationModel" id="SpecificationModel" style="width:190px;">
                                        </div>
                                    </div>
                                    <div class="layui-inline">
                                        <label class="layui-form-label">源单单号</label>
                                        <div class="layui-input-block">
                                            <input type="text" class="layui-input" name="HSourceBillNo" id="HSourceBillNo" style="width:190px;">
                                            <input type="text" class="layui-input ForFilteringSchemes" name="HSourceBillNo" id="HSourceBillNo" style="width:190px;">
                                        </div>
                                    </div>
                                    <div class="layui-inline">
                                        <label class="layui-form-label">仓库</label>
                                        <div class="layui-input-block">
                                            <input type="text" class="layui-input" name="Warehouse" id="Warehouse" style="width:190px;">
                                            <input type="text" class="layui-input ForFilteringSchemes" name="Warehouse" id="Warehouse" style="width:190px;">
                                        </div>
                                    </div>
                                    <div class="layui-inline">
                                        <label class="layui-form-label">制单人</label>
                                        <div class="layui-input-block">
                                            <input type="text" class="layui-input" name="Hmaker" id="Hmaker" style="width:190px;">
                                            <input type="text" class="layui-input ForFilteringSchemes" name="Hmaker" id="Hmaker" style="width:190px;">
                                        </div>
                                    </div>
                                </div>
@@ -119,8 +125,8 @@
                                <button type="button" class="layui-btn layui-btn-sm" lay-event="get_Refresh" id="Refresh"><i class="layui-icon layui-icon-refresh-3"></i>刷新</button>
                                <button type="button" class="layui-btn layui-btn-sm" lay-event="get_Exit" id="Exit"><i class="layui-icon layui-icon-logout"></i>退出</button>
                                <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-BarCodeDetail" id="BarCodeDetail"><i class="layui-icon layui-icon-form"></i>条码明细</button>
                                <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-Audit" id="Audit"><i class="layui-icon layui-icon-radio"></i>审核</button>
                                <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-DeAudit" id="DeAudit"><i class="layui-icon layui-icon-circle"></i>反审核</button>
                                <button type="button" class="layui-btn layui-btn-sm" style="display:none;" lay-event="set_CheckBill" id="CheckBill"><i class="layui-icon layui-icon-form"></i>审核</button>
                                <button type="button" class="layui-btn layui-btn-sm" style="display:none;" lay-event="set_AbandonCheck" id="AbandonCheck"><i class="layui-icon layui-icon-form"></i>反审核</button>
                                <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-Close" id="Close"><i class="layui-icon layui-icon-radio"></i>关闭</button>
                                <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-DeClose" id="DeClose"><i class="layui-icon layui-icon-radio"></i>反关闭</button>
                                <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-Drop" id="Drop"><i class="layui-icon layui-icon-radio"></i>作废</button>
@@ -129,6 +135,8 @@
                                <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-print" id="print"><i class="layui-icon layui-icon-print"></i>打印</button>
                                <button type="button" class="layui-btn layui-btn-sm" lay-event="set_HideColumn" id="HideColumn"><i class="layui-icon layui-icon-form"></i>列设置</button>
                                <button type="button" class="layui-btn layui-btn-sm" lay-event="set_HideButton" id="HideButton"><i class="layui-icon layui-icon-form"></i>按钮设置</button>
                                <button type="button" class="layui-btn layui-btn-sm" style="display:none;" lay-event="set_SaveScheme" id="set_SaveScheme"><i class="layui-icon layui-icon-template"></i>保存方案</button>
                                <button type="button" class="layui-btn layui-btn-sm" style="display:none;" lay-event="set_ReadScheme" id="set_ReadScheme"><i class="layui-icon layui-icon-set"></i>读取方案</button>
                            </div>
                        </script>
                    </form>
@@ -170,6 +178,18 @@
            var HPageTitle = get_PageTitle(HModuleType) == "" ? document.title : get_PageTitle(HModuleType);
            //#endregion
         //#region ã€è¿‡æ»¤æ–¹æ¡ˆã€‘
            //过滤条件的classç±»
            var HClassTag = "ForFilteringSchemes";
            //模块名称(中文版) æ¯ä¸ªæ¨¡å—页面都需要修改
            window.HModuleName = "采购退料单";
            //是否已经选择了过滤方案(全局变量)
            window.HDefaultFilter = "";
            //选择的过滤方案内码(全局变量)
            window.HInterID_Choose = 0;
            //#endregion
            set_ClearBill();
            //#endregion
@@ -239,13 +259,11 @@
                    //删除按钮
                    case 'btn-Delete': set_DeleteBill();
                        break;
                    //审核
                    case 'btn-Audit':
                        set_AuditBill();
                      //审核
                    case 'set_CheckBill': set_CheckBill(0);
                        break;
                    //反审核
                    case 'btn-DeAudit':
                        set_DeAuditBill();
                    case 'set_AbandonCheck': set_CheckBill(1);
                        break;
                    //关闭按钮        ï¼ˆ1:关闭、2:反关闭)
                    case 'btn-Close':
@@ -272,6 +290,10 @@
                    //列设置
                    case 'set_HideColumn': get_HideColumn();
                        break;
                    //打印
                    case 'btn-print':
                        get_PrintReport();
                        break;
                    //条码明细
                    case 'btn-BarCodeDetail': get_BarCodeDetail();
                        break;
@@ -280,6 +302,12 @@
                        var btns = document.getElementsByTagName("button");     //获取本页所有按钮对象
                        var HBillType = "1239";
                        get_HideButton(btns, HBillType, HModName, sessionStorage["HUserName"]);
                        break;
                     //保存方案
                    case 'set_SaveScheme': set_SaveScheme();
                        break;
                    //读取方案
                    case 'set_ReadScheme': set_ReadScheme();
                        break;
                };
            });
@@ -327,17 +355,17 @@
                        , { field: '供应商', title: '供应商', width: 250, sort: true }
                        , { field: '交货地点', title: '交货地点', sort: true }
                        , { field: 'HCurID', title: 'HCurID', width: 120, hide: true, sort: true }
                        , { field: '币别代码', title: '币别代码', sort: true }
                        , { field: '币别代码', title: '币别代码', sort: true, hide: true }
                        , { field: '币别', title: '币别', sort: true }
                        , { field: '汇率', title: '汇率', sort: true }
                        , { field: 'HDeptID', title: 'HDeptID', width: 120, hide: true, sort: true }
                        , { field: '部门代码', title: '部门代码', width: 150, sort: true }
                        , { field: '部门代码', title: '部门代码', width: 150, sort: true, hide: true }
                        , { field: '部门', title: '部门', sort: true }
                        , { field: 'HManagerID', title: 'HManagerID', width: 120, hide: true, sort: true }
                        , { field: '主管代码', title: '主管代码', sort: true }
                        , { field: '主管代码', title: '主管代码', sort: true , hide: true}
                        , { field: '主管', title: '主管', sort: true }
                        , { field: 'HEmpID', title: 'HEmpID', width: 120, hide: true, sort: true }
                        , { field: '业务员代码', title: '业务员代码', width: 120, sort: true }
                        , { field: '业务员代码', title: '业务员代码', width: 120, sort: true, hide: true }
                        , { field: '业务员', title: '业务员', sort: true }
                        , { field: '摘要', title: '摘要', sort: true }
                        , { field: '表头备注', title: '表头备注', sort: true }
@@ -348,17 +376,18 @@
                        , { field: '规格型号', title: '规格型号', sort: true }
                        , { field: '批号', title: '批号', sort: true }
                        , { field: 'HUnitID', title: 'HUnitID', hide: true, sort: true }
                        , { field: '计量单位代码', title: '计量单位代码', width: 150, sort: true }
                        , { field: '计量单位代码', title: '计量单位代码', width: 150, sort: true, hide: true }
                        , { field: '计量单位', title: '计量单位', width: 150, sort: true }
                        , { field: '数量', title: '数量', sort: true, totalRow: true}
                        , { field: '应收数量', title: '应收数量', sort: true, totalRow: true}
                        , { field: '实收数量', title: '实收数量', sort: true, totalRow: true}
                        , { field: '单价', title: '单价', sort: true, totalRow: true }
                        , { field: '金额', title: '金额', sort: true, totalRow: true }
                        , { field: '单价', title: '单价', sort: true, totalRow: true}
                        , { field: 'HWHID', title: 'HWHID', hide: true, sort: true }
                        , { field: '收料仓库代码', title: '收料仓库代码', width: 150, sort: true }
                        , { field: '收料仓库代码', title: '收料仓库代码', width: 150, sort: true , hide: true}
                        , { field: '收料仓库', title: '收料仓库', sort: true }
                        , { field: 'HSPID', title: 'HSPID', hide: true, sort: true }
                        , { field: '仓位代码', title: '仓位代码', sort: true }
                        , { field: '仓位代码', title: '仓位代码', sort: true, hide: true }
                        , { field: '仓位名称', title: '仓位名称', sort: true }
                        , { field: '源单单号', title: '源单单号', width: 125, sort: true }
                        , { field: '采购订单号', title: '采购订单号', width: 125, sort: true }
@@ -479,20 +508,20 @@
            })
            //#endregion
            //删除
         //删除
            function set_DeleteBill() {
                var checkStatus = table.checkStatus('mainTable')
                    , data = checkStatus.data;
                if (checkStatus.data.length === 1) {
                    var Hmainid = data[0].hmainid.toString();
                    var HsupId = data[0].hsubid;
                    var InterID = data[0].hmainid.toString();
                    //逻辑删除方法
                    layer.confirm("确认要删除吗,删除后不能恢复", { title: "删除确认" }, function (index) {
                        var wait = layer.load();
                        $.ajax({
                            type: "GET",
                            url: GetWEBURL() + "/Kf_POStockInBackBill/DeltetKf_POStockInBackBill", //方法所在页面和方法名
                            data: { "Hmainid": Hmainid, "HsupId": HsupId,"user": sessionStorage["HUserName"] },
                            data: { "HInterID": InterID, "user": sessionStorage["HUserName"]},
                            success: function (result) {
                                if (result.count == 1) {
                                    layer.msg(result.Message, { time: 1 * 1000, icon: 1 }, function () {
@@ -519,20 +548,47 @@
                    layer.msg('请选择一行数据删除!');
                }
            }
            //审核
            function set_AuditBill() {
          //打印
            function get_PrintReport() {
                var checkStatus = table.checkStatus('mainTable')
                    , data = checkStatus.data;
                if (checkStatus.data.length === 0) {
                    return layer.msg('请选择数据打印!');
                }
                else {
                    var hmainid = [];
                    for (var i = 0; i < checkStatus.data.length; i++) {
                        hmainid.push((data[i].hmainid * (10 ** 8)) + data[i].hsubid)
                    }
                    layer.open({
                        type: 2
                        , area: ['50%', '50%']
                        , title: '打印模版选择'
                        , shade: 0.6 //遮罩透明度
                        , maxmin: false //允许全屏最小化
                        , anim: 0 //0-6的动画形式,-1不开启
                        , content: ['../../BaseSet/SRM_OpenTmpList.html?linterid=' + hmainid.toString() + '&MyMsg=' + hmainid.toString() + '&Type=HPOInStockBill', 'yes']
                        , resize: false
                    })
                }
            }
              //#region åå®¡æ ¸/审核数据
            function set_CheckBill(num) {
                var checkStatus = table.checkStatus('mainTable')
                    , data = checkStatus.data;
                if (checkStatus.data.length === 1) {
                    var InterID = data[0].hmainid.toString();
                    //逻辑审核方法
                    $.ajax({
                        type: "GET",
                        url: GetWEBURL() + "/Kf_POStockInBackBill/AuditProcessReportList", //方法所在页面和方法名
                        data: { "HInterID": InterID, "IsAudit": 1, "CurUserName": sessionStorage["HUserName"] },
                        data: { "HInterID": InterID, "IsAudit": num, "CurUserName": sessionStorage["HUserName"] },
                        success: function (result) {
                            if (result.count == 1) {
                                layer.msg(result.Message, { time: 1 * 1000, icon: 1 }, function () {
@@ -541,7 +597,7 @@
                                    //关闭当前frame
                                    layer.close(index);
                                    //修改为功后刷新界面
                                    window.location.reload();
                                    $("#btnSearch").trigger('click');
                                });
                            } else {
@@ -551,49 +607,12 @@
                            layer.alert("接口请求失败!", { icon: 5 });
                        }
                    });
                }
                else {
                    layer.msg('请选择一行数据审核!');
                }
            }
            //反审核
            function set_DeAuditBill() {
                var checkStatus = table.checkStatus('mainTable')
                    , data = checkStatus.data;
                if (checkStatus.data.length === 1) {
                    var InterID = data[0].hmainid.toString();
                    //逻辑审核方法
                    $.ajax({
                        type: "GET",
                        url: GetWEBURL() + "/Kf_POStockInBackBill/AuditProcessReportList", //方法所在页面和方法名
                        data: { "HInterID": InterID, "IsAudit": 2, "CurUserName": sessionStorage["HUserName"] },
                        success: function (result) {
                            if (result.count == 1) {
                                layer.msg(result.Message, { time: 1 * 1000, icon: 1 }, function () {
                                    // å¾—到frame索引
                                    var index = layer.getFrameIndex(window.name);
                                    //关闭当前frame
                                    layer.close(index);
                                    //修改为功后刷新界面
                                    window.location.reload();
                                });
                            } else {
                                layer.alert(result.code + result.Message, { icon: 5 });
                            }
                        }, error: function () {
                            layer.alert("接口请求失败!", { icon: 5 });
                        }
                    });
                }
                else {
                    layer.msg('请选择一行数据反审核!');
                }
            }
            //#endregion
            //#region åå…³é—­/关闭数据
            function set_CloseBill(num) {
@@ -631,7 +650,7 @@
            }
            //#endregion
            //#region åä½œåºŸ/作废数据
          //#region åä½œåºŸ/作废数据
            function set_DropBill(num) {
                var checkStatus = table.checkStatus('mainTable')
                    , data = checkStatus.data;
@@ -665,7 +684,7 @@
                    layer.msg('请选择一行数据审核!');
                }
            }
            //#endregionz
            //#endregion
            //#region æ¡ç æ˜Žç»†
            function get_BarCodeDetail() {
@@ -679,7 +698,7 @@
                    layer.open({
                        type: 2
                        , area: ['90%', '90%']
                        , title: '采购退料单条码明细'
                        , title: '采购收料单条码明细'
                        , closeBtn: 1
                        , shade: 0.6 //遮罩透明度
                        , maxmin: true //允许全屏最小化
@@ -848,7 +867,254 @@
            //#endregion
         //#region ã€è¿‡æ»¤æ–¹æ¡ˆã€‘
            //获取当前用户的默认过滤方案
            function get_DefaultModule() {
                $.ajax({
                    url: GetWEBURL() + '/Xt_FastICScheme/Chooselist',
                    type: "GET",
                    data: { "user": sessionStorage["Czybm"], "HModuleName": HModuleName, "HInterID": 0, "Type": "Default" },
                    success: function (data1) {
                        if (data1.count == 1) {
                            //当前用户设置有默认的过滤方案
                            var data = data1.data;
                            //当前选择的过滤方案
                            HInterID_Choose = data[0].hmainid;
                            //过滤方案内码
                            HInterID = data[0].hmainid
                            //过滤方案名称
                            HDefaultFilter = data[0].方案名称
                            //过滤方案的备注(方案信息描述)
                            var HRemark = data[0].备注
                            //显示出当前的默认过滤方案
                            document.getElementById("HFilterScheme_Now").style.display = "block";
                            document.getElementById('HFilterScheme_Now').innerHTML = "当前过滤方案:" + HDefaultFilter + '<span style="font-size: 15px; font-weight: bold; color:#7b90fb">  ' + "(" + HRemark + ")" + '</span>';
                            //把过滤条件值回写到页面上
                            for (let i = 0; i < data.length; i++) {
                                $("#" + data[i].过滤字段ID).val(data[i].过滤值);
                                if (data[i].过滤标签类型 == 'SELECT') {
                                    $("#" + data[i].过滤字段ID).find("option[value='" + data[i].过滤值 + "']").attr("selected", true);
                                }
                            }
                            //执行查询方法
                            get_FastQuery()
                            form.render("select");
                        } else {
                            //当前用户没有设置默认的过滤方案
                            //隐藏显示过滤方案的标签信息
                            document.getElementById("HFilterScheme_Now").style.display = "none";
                            //执行查询方法
                            get_FastQuery()
                            form.render("select");
                        }
                    }, error: function () {
                        layer.alert("接口请求失败!", { icon: 5 });
                    }
                });
            }
            //保存方案
            function set_SaveScheme() {
                var index = layer.open()
                //判断用户是否点击了右上角的“叉号”关闭弹窗页面
                var HIsClose_Manual = false;
                //获取本页所有过滤条件对象(class中包含"ForFilteringSchemes"的元素)
                var Filter = document.getElementsByClassName(HClassTag);
                var HFilterIdList = "";//过滤条件
                var HFilterIdLists = "";//拼接多个过滤条件
                var HValue = "";//过滤值
                var HElement_type = "";//过滤标签类型
                for (var i = 0; i < Filter.length; i++) {
                    HFilterIdList = Filter[i].id; //过滤条件ID
                    HFilterIdLists += Filter[i].id + ","; //过滤条件ID(拼接)
                    HValue += $("#" + HFilterIdList).val() + ","; //过滤条件中输入的值
                    HElement_type += document.getElementById(HFilterIdList).tagName + ",";//通过标签id获取标签类型
                }
                //去除末尾逗号
                HFilterIdLists = HFilterIdLists.substring(0, HFilterIdLists.length - 1);
                HValue = HValue.substring(0, HValue.length - 1);
                HElement_type = HElement_type.substring(0, HElement_type.length - 1);
                //当前页面上没有选择过滤方案,进入新增方法
                if (HDefaultFilter == "") {
                    layer.open({
                        type: 2
                        , area: ['40%', '80%']
                        , title: '过滤方案'
                        , shift: 0//弹出动画
                        , content: '../../系统管理/过滤方案设置/Xt_FastICScheme.html?OperationType=1&HModuleName=' + HModuleName + '&HFilterIdLists=' + HFilterIdLists + '&HValue=' + HValue + '&HElement_type=' + HElement_type
                        , cancel: function () {
                            // å³ä¸Šè§’关闭事件的逻辑
                            HIsClose_Manual = true;
                        }
                        , end: function () {
                            if (HIsClose_Manual != true) {
                                get_FastQuery();
                                //显示当前的过滤方案
                                document.getElementById("HFilterScheme_Now").style.display = "block";
                                document.getElementById('HFilterScheme_Now').innerHTML = "当前过滤方案:" + sessionStorage["HFilterSchemeName_" + sessionStorage["Czybm"]] + '<span style="font-size: 15px; font-weight: bold; color:#7b90fb">  ' + "(" + sessionStorage["HFilterSchemeRemark_" + sessionStorage["Czybm"]] + ")" + '</span>';
                            }
                        }
                    })
                    layer.close(index)
                } else {
                    //当前页面已有过滤方案,用户选择 æ–°å¢žæˆ–者编辑
                    layer.confirm('当前已选择过滤方案,是否修改?请选择对应操作', {
                        title: "操作提示",
                        icon: 0,
                        btn: ['新增方案', '保存修改当前方案', '取消']
                    }, function (index, layero) {
                        //新增
                        layer.open({
                            type: 2
                            , area: ['40%', '80%']
                            , title: '过滤方案'
                            , shift: 0//弹出动画
                            , content: '../../系统管理/过滤方案设置/Xt_FastICScheme.html?OperationType=1&HModuleName=' + HModuleName + '&HFilterIdLists=' + HFilterIdLists + '&HValue=' + HValue + '&HElement_type=' + HElement_type
                            , end: function () {
                                get_FastQuery()
                                //显示当前的过滤方案
                                document.getElementById("HFilterScheme_Now").style.display = "block";
                                document.getElementById('HFilterScheme_Now').innerHTML = "当前过滤方案:" + sessionStorage["HFilterSchemeName_" + sessionStorage["Czybm"]] + '<span style="font-size: 15px; font-weight: bold; color:#7b90fb">  ' + "(" + sessionStorage["HFilterSchemeRemark_" + sessionStorage["Czybm"]] + ")" + '</span>';
                            }
                        })
                        layer.close(index)
                    }, function (index) {
                        //编辑
                        var Filter_Edit = document.getElementsByClassName(HClassTag); //获取本页所有过滤条件对象(class中包含"ForFilteringSchemes"的元素)
                        HFilterIdList = "";
                        HFilterIdLists = "";
                        HValue = "";
                        HElement_type = "";
                        for (var i = 0; i < Filter_Edit.length; i++) {
                            HFilterIdList = Filter_Edit[i].id; //过滤条件ID
                            HFilterIdLists += Filter_Edit[i].id + ","; //过滤条件ID(拼接)
                            HValue += $("#" + HFilterIdList).val() + ","; //过滤条件中输入的值
                            HElement_type += document.getElementById(HFilterIdList).tagName + ",";//通过标签id获取标签类型
                        }
                        //去除末尾逗号
                        HFilterIdLists = HFilterIdLists.substring(0, HFilterIdLists.length - 1);
                        HValue = HValue.substring(0, HValue.length - 1);
                        HElement_type = HElement_type.substring(0, HElement_type.length - 1);
                        var sMainSub = HInterID_Choose + ';' + HFilterIdLists + ';' + HValue + ';' + HElement_type + ';' + sessionStorage["Czybm"] + ';' + 3;
                        //修改
                        $.ajax({
                            type: "POST",
                            url: GetWEBURL() + "/Xt_FastICScheme/save", //方法所在页面和方法名
                            async: true,
                            data: { "oMain": sMainSub },
                            dataType: "json",
                            success: function (data) {
                                if (data.count == 1) { // è¯´æ˜ŽéªŒè¯æˆåŠŸäº†ï¼Œ
                                    layer.msg(data.Message, { time: 1 * 1000, icon: 1 });
                                }
                                else {
                                }
                                layer.closeAll("loading");
                            },
                            error: function (err) {
                            }
                        });
                        layer.close(index)
                    }, function (index) {
                        //取消
                        layer.alert('取消')
                        layer.close(index)
                    });
                }
            }
            //读取方案
            function set_ReadScheme() {
                var HIsClose_Manual = false;
                var Filter = document.getElementsByClassName(HClassTag); //获取本页所有过滤条件对象(class中包含"ForFilteringSchemes"的元素)
                var HFilterIdList = "";
                var HFilterIdLists = "";
                var HValue = "";
                var HElement_type = "";
                for (var i = 0; i < Filter.length; i++) {
                    HFilterIdList = Filter[i].id; //过滤条件ID
                    HFilterIdLists += Filter[i].id + ","; //过滤条件ID(拼接)
                    HValue += $("#" + HFilterIdList).val() + ","; //过滤条件中输入的值
                    HElement_type += document.getElementById(HFilterIdList).tagName + ",";//通过标签id获取标签类型
                }
                //去除末尾逗号
                HFilterIdLists = HFilterIdLists.substring(0, HFilterIdLists.length - 1);
                HValue = HValue.substring(0, HValue.length - 1);
                HElement_type = HElement_type.substring(0, HElement_type.length - 1);
                layer.open({
                    type: 2
                    , area: ['80%', '80%']
                    , title: '过滤方案列表'
                    , shift: 0//弹出动画
                    , content: '../../系统管理/过滤方案设置/Xt_FastICSchemeList.html?HType=Select&HFilterIdLists=' + HFilterIdLists + '&HValue=' + HValue + '&HElement_type=' + HElement_type + '&HModuleName=' + HModuleName
                    , cancel: function () {
                        // å³ä¸Šè§’关闭事件的逻辑
                        HIsClose_Manual = true;
                    }
                    , end: function () {
                        if (HIsClose_Manual != true) {
                            get_FastQuery()
                            form.render("select");
                        }
                    }
                })
            }
            //#endregion
        })
         //#region ã€è¿‡æ»¤æ–¹æ¡ˆè¿”回数据】
        function HFilterScheme(obj)  //返回过滤方案
        {
            var HInterID = obj[0].hmainid;
            HInterID_Choose = obj[0].hmainid;
            $.ajax({
                url: GetWEBURL() + '/Xt_FastICScheme/Chooselist',
                type: "GET",
                data: { "user": sessionStorage["Czybm"], "HModuleName": HModuleName, "HInterID": HInterID, "Type": "Select" },
                success: function (data1) {
                    if (data1.count == 1) {
                        var data = data1.data;
                        //赋值过滤方案名称
                        HDefaultFilter = data[0].方案名称
                        var HRemark = data[0].备注
                        //显示当前的过滤方案
                        document.getElementById("HFilterScheme_Now").style.display = "block";
                        document.getElementById('HFilterScheme_Now').innerHTML = "当前过滤方案:" + HDefaultFilter + '<span style="font-size: 15px; font-weight: bold; color:#7b90fb">  ' + "(" + HRemark + ")" + '</span>';
                        HInterID = data[0].hmainid
                        //根据选择的过滤方案回填数据到列表过滤条件
                        for (let i = 0; i < data.length; i++) {
                            $("#" + data[i].过滤字段ID).val(data[i].过滤值);
                            if (data[i].过滤标签类型 == 'SELECT') {
                                $("#" + data[i].过滤字段ID).find("option[value='" + data[i].过滤值 + "']").attr("selected", true);
                            }
                        }
                    } else {
                        layer.close(ajaxLoad);
                        layer.alert(data1.code + data1.Message, { icon: 5 });
                    }
                }, error: function () {
                    layer.close(ajaxLoad);
                    layer.alert("接口请求失败!", { icon: 5 });
                }
            });
        }
        //#endregion
    </script>
</body>
</html>