chenhaozhe
2025-06-06 f9f6100da86639f99df50c2885e42968d0a74ea8
WebTM/views/Éú²ú¹ÜÀí/¿Í»§±êÇ©/Sc_CustomerTagInfoList.html
@@ -45,6 +45,18 @@
                                        <input type="text" class="layui-input ForFilteringSchemes" name="HBillNo" id="HBillNo" 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 ForFilteringSchemes" name="HMaterNumber" id="HMaterNumber" 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 ForFilteringSchemes" name="HCustName" id="HCustName" 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>
@@ -190,7 +202,7 @@
            var HModName = "Sc_CustomerTagInfoList";
            var HBillType = "10003";
            var ins;       //用于导出excel
            //#region ã€è¿‡æ»¤æ–¹æ¡ˆã€‘
            //过滤条件的classç±» 
@@ -418,7 +430,7 @@
                            
                            option.cols = [col];
                            option.data = data1.data;
                            table.render(option);
                            ins = table.render(option);
                            laypage.render(optionPage);
                            layer.close(ajaxLoad);
@@ -504,45 +516,40 @@
                    case 'btn-Delete':
                        var checkStatus = table.checkStatus('mainTable')
                            , data = checkStatus.data;
                        if (checkStatus.data.length === 1) {
                            var InterID = data[0].hmainid.toString();
                            var HsupId = data[0].hsubid;
                            var HQty = data[0].数量;
                            var HSourceInterID = data[0].源单主内码;
                            var HSourceEntryID = data[0].源单子内码;
                        if (checkStatus.data.length >= 1) {
                            var HItemSubIDs = "";
                            for (i = 0; i < data.length; i++) {
                                HItemSubIDs += data[i].HItemSubID.toString() + ",";
                            }
                            HItemSubIDs = HItemSubIDs.substring(0, HItemSubIDs.length - 1)
                            //逻辑删除方法
                            layer.confirm("确认要删除吗,删除后不能恢复", { title: "删除确认" }, function (index) {
                                if (data[0].状态=="创建") {
                                    $.ajax({
                                        type: "GET",
                                        url: GetWEBURL() + "Xs_SeOutStockBill/DeltetSeOutStockBill", //方法所在页面和方法名
                                        data: { "HInterID": InterID, "HsupId": HsupId, "HQty": HQty, "HSourceInterID": HSourceInterID, "HSourceEntryID": HSourceEntryID, "user": 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();
                                                });
                                $.ajax({
                                    type: "GET",
                                    url: GetWEBURL() + "Sc_CustomerTagInfo/Delete", //方法所在页面和方法名
                                    data: { "HItemSubIDs": HItemSubIDs, "user": 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.alert(result.code + result.Message, { icon: 5 });
                                        }
                                    });
                                } else {
                                    layer.msg('此条数据不是创建状态,无法删除!');
                                }
                                    }, error: function () {
                                        layer.alert("接口请求失败!", { icon: 5 });
                                    }
                                });
                            })
                        }
                        else {
                            layer.msg('请选择一行数据删除!');
                            layer.msg('请选择数据删除!');
                        }
                        break;
                    //刷新
@@ -600,6 +607,8 @@
            //#region å¿«é€Ÿè¿‡æ»¤
            function get_FastQuery(table, option) {
                var HBillNo = $("#HBillNo").val();//单据号
                var HMaterNumber = $("#HMaterNumber").val();//物料代码
                var HCustName = $("#HCustName").val();//客户名称
                var ColName = $("#ColName").val();//复选框
                var Comparator = $("#Comparator").val()
@@ -677,6 +686,12 @@
                if (HBillNo) {
                    sWhere += " and å•据号 like '%" + HBillNo + "%'";
                }
                if (HMaterNumber) {
                    sWhere += " and ç‰©æ–™ä»£ç  like '%" + HMaterNumber + "%'";
                }
                if (HCustName) {
                    sWhere += " and å®¢æˆ·åç§° like '%" + HCustName + "%'";
                }
                //sWhere += addSWhereByOpenType();
                get_DisplayPage(sWhere);
@@ -686,6 +701,8 @@
            //#region é‡ç½®è¿‡æ»¤æ¡ä»¶
            function set_ClearQuery() {
                $("#HBillNo").val("");//
                $("#HMaterNumber").val("");//
                $("#HCustName").val("");//
                $("#ColContent").val("");
                $("#ColName").val("0");
@@ -774,6 +791,23 @@
                })
            }
            //#region å¯¼å‡ºExecel
            function get_Export() {
                option.data.forEach((item) => {
                    for (let itemobj in item) {
                        if (item[itemobj] == null) {
                            item[itemobj] = "";
                        }
                        if (item[itemobj].length > 0) {  // å‡è®¾å­—段名为field
                            item[itemobj] = item[itemobj].toString().replaceAll(/[\r\n]+/g, '');  // å°†æ¢è¡Œç¬¦æ›¿æ¢ä¸ºç©ºå­—符串
                        }
                    }
                });
                table.exportFile(ins.config.id, option.data, "xls");
            }
            //#endregion
            //隐藏列设置
            function get_HideColumn() {
                var colName = "";