yangle
2023-08-24 22870b2ceda5ea1dc4e83c8b8d6a11973b834be3
WebTM/views/ÖÊÁ¿¹ÜÀí/¹¤Ðò¼ìÑéµ¥/QC_ProcessCheckBillList.html
@@ -87,6 +87,7 @@
                , util = layui.util
            var option = [];
            var HModName = "QC_ProcessCheckBillList";
            var titleData = ["hmainid", "hentryid", "HEntryID", "HSourceID", "HMaterID", "HFirstCheckEmp", "HQCCheckItemID", "HUnitID", "HSampleSchemeID"];
            //查询条件
            var sWhere = "";
@@ -196,23 +197,87 @@
                    ]]
                };
            }
            ////#region æŸ¥è¯¢
            //function get_Display(sWhere) {
            //    var ajaxLoad = layer.load();
            //    $.ajax({
            //        //url: "http://61.130.49.162:9090/WMSAPI///Web/GetMAXNum",
            //        url: GetWEBURL() + '/QC_ProcessCheckBill/GetProcessCheckBillList',
            //        type: "GET",
            //        data: { "sWhere": sWhere, "user": sessionStorage["HUserName"] },
            //        success: function (data1) {
            //            if (data1.count == 1) {
            //                option.data = data1.data;
            //                table.render(option);
            //                layer.close(ajaxLoad);
            //                //layer.alert("查询成功", { icon: 1 });
            //            } else {
            //                layer.close(ajaxLoad);
            //                layer.alert(data1.code + data1.Message, { icon: 5 });
            //            }
            //        }, error: function () {
            //            layer.close(ajaxLoad);
            //            layer.alert("接口请求失败!", { icon: 5 });
            //        }
            //    });
            //}
            ////#endregion
            //#region æŸ¥è¯¢
            function get_Display(sWhere) {
                var ajaxLoad = layer.load();
                $.ajax({
                    //url: "http://61.130.49.162:9090/WMSAPI///Web/GetMAXNum",
                    url: GetWEBURL() + '/QC_ProcessCheckBill/GetProcessCheckBillList',
                    url: GetWEBURL() + '/QC_ProcessCheckBill/QC_ProcessCheckBillList',
                    type: "GET",
                    data: { "sWhere": sWhere, "user": sessionStorage["HUserName"] },
                    success: function (data1) {
                        if (data1.count == 1) {
                            option.data = data1.data;
                            table.render(option);
                            layer.close(ajaxLoad);
                            //layer.alert("查询成功", { icon: 1 });
                            var data = [];
                            var col = [];
                            //给空的数组赋值
                            for (var key in data1.list) {
                                data.push({ "id": data1.list[key].ColmCols, "name": data1.list[key].ColmCols, "Type": data1.list[key].ColmType });
                            }
                            //在列表左边添加勾选框
                            col.push({ type: 'checkbox', fixed: 'left' });
                            for (var i = 0; i < data.length; i++) {
                                if ($.inArray(data[i].name, titleData) > -1) {
                                    col.push({ field: data[i].id, title: data[i].name, align: 'center', hide: true }); //隐藏id列
                                }
                                else {
                                    switch (data[i].Type) {
                                        //int
                                        case 'DateTime':
                                            col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: true, templet: "<div>{{d." + data[i].name + " ==null ?'':layui.util.toDateString(d." + data[i].name + ", 'yyyy-MM-dd')}}</div>", width: 200 });
                                            break;
                                        default:
                                            col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: true, width: 200 });
                                    }
                                }
                            }
                            option = {
                                elem: '#mainTable'
                                , toolbar: '#toolbarDemo'
                                , height: 'full-50'
                                , page: true //开启分页
                                , limit: 500
                                , limits: [500, 2000, 5000, 20000]
                                , cols: [col]
                                , data: data1.data
                            };
                            //初始化表格
                            DisPlay_HideColumn();
                            table.render(option);
                            //if ($("#Comparator").val() == 0 && $("#ColContent").val() == "") {
                            //    ColFilter();
                            //}
                        } else {
                            layer.close(ajaxLoad);
                            layer.alert(data1.code + data1.Message, { icon: 5 });
                            layer.msg(data1.code + data1.Message, { icon: 5 });
                        }
                    }, error: function () {
                        layer.close(ajaxLoad);
@@ -312,7 +377,7 @@
                var checkStatus = table.checkStatus('mainTable')
                    , data = checkStatus.data;
                if (checkStatus.data.length === 1) {
                    var ItemID = data[0];
                    var HItemID = data[0].hmainid;
                    layer.confirm("确认要删除吗,删除后不能恢复", { title: "删除确认" }, function (index) {
                        var wait = layer.load();
                        //逻辑删除方法
@@ -320,7 +385,7 @@
                            url: GetWEBURL() + '/QC_ProcessCheckBill/Delete_Json',
                            type: "GET",
                            data: { "HItemID": ItemID, "user": sessionStorage["HUserName"]},
                            data: { "HItemID": HItemID, "user": sessionStorage["HUserName"]},
                            success: function (result) {
                                console.log('gouba' + result);
                                if (result.count == 1) {
@@ -467,12 +532,14 @@
                            var dataCol = [];//数据库查询出的列数据
                            var titleData = ["单据ID", "表头备注", "物料", "hsubid"];//不需要显示的字段 å¯æ‰©å±•
                            var titleData = ["hmainid", "hentryid", "HEntryID", "HSourceID", "HMaterID", "HFirstCheckEmp", "HQCCheckItemID", "HUnitID", "HSampleSchemeID"];//不需要显示的字段 å¯æ‰©å±•
                            dataCol = data1.data[0].HGridString.split(',');
                            for (var i = 0; i < option.cols[0].length - 2; i++) {
                                var dataCols = dataCol[i].split('|');
                                if (dataCol[i]) {
                                    var dataCols = dataCol[i].split('|');
                                }
                                //隐藏列
                                if (dataCols[1] == 1) {
                                    option.cols[0][i + 1]["hide"] = true;