1
yusijie
2024-10-04 22031c10ead96768f0af46b3559d282c84f0eabf
1
11个文件已修改
1330 ■■■■■ 已修改文件
WebTM/WebTM.csproj.user 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/layuiadmin/Scripts/webConfig.js 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/views/基础资料/公用基础资料/Gy_Material.html 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/views/模治具管理/模治具管理/Gy_BarCodeBillList.html 319 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/views/生产管理/生产任务单/Sc_ICMOBillList.html 149 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/views/系统管理/日志管理/Xt_SystemLogList.html 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/views/计划管理/工艺路线/Gy_RoutingBillList.html 320 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/views/车间管理/工序出站汇报单/Cj_StationOutBill.html 83 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/views/车间管理/工序出站汇报单/Cj_StationOutBillList.html 170 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/views/车间管理/工序流转卡/Sc_ProcessExchangeBillList.html 154 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/views/车间管理/工序流转卡/Sc_ProcessExchangeBill_BatchSplit.html 121 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/WebTM.csproj.user
@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <PropertyGroup>
    <NameOfLastUsedPublishProfile>D:\智云迈思\MES\MES-WEB-LayUI\WebTM\Properties\PublishProfiles\FolderProfile.pubxml</NameOfLastUsedPublishProfile>
    <NameOfLastUsedPublishProfile>D:\vs\项目代码\MES-WEB-TM\MESWMS-LayUI\WebTM\Properties\PublishProfiles\FolderProfile.pubxml</NameOfLastUsedPublishProfile>
    <ProjectView>ProjectFiles</ProjectView>
    <LastActiveSolutionConfig>Debug|Any CPU</LastActiveSolutionConfig>
    <LastActiveSolutionConfig>Release|Any CPU</LastActiveSolutionConfig>
    <UseIISExpress>true</UseIISExpress>
    <Use64BitIISExpress />
    <IISExpressSSLPort />
WebTM/layuiadmin/Scripts/webConfig.js
@@ -7,12 +7,12 @@
    //var WEBURL = "http://localhost:8082/LuBaoAPI/";    //杨乐本地配置
    //var WEBURL = "http://localhost:8082/API/";    //杜贺本地配置
    /*var WEBURL = "http://localhost/API/";*/    //潘浙游本地配置  
    var WEBURL = "http://localhost:8082/API/";    //张瑞广本地配置
    var WEBURL = "http://localhost:81/API/";   //翁涛涛本地配置
    //var WEBURL = "http://localhost:8082/API/";    //张瑞广本地配置
    //var WEBURL = "http://localhost:81/API/"    //翁涛涛本地配置
    //var WEBURL = "http://47.96.97.237/API/";          //智云服务器
    var WEBURL = "http://localhost:8082/LuBaoAPI/";   //余思杰本地配置
    //var WEBURL = "http://localhost:8088/ARAPI/";      //余思杰本地配置(安瑞)
    //var WEBURL = "http://localhost/API/";             //潘浙游本地配置
    var WEBURL = "http://localhost/API/";             //潘浙游本地配置
    //var WEBURL = "http://61.164.86.218:8099/ABAPI/";  //奥邦
    //var WEBURL = "http://10.1.4.155/API/";            //江丰客户NEW
    //var WEBURL = "http://183.129.128.86:9090/API/";   //凯贝奈特客户服务器外网
WebTM/views/»ù´¡×ÊÁÏ/¹«Óûù´¡×ÊÁÏ/Gy_Material.html
@@ -362,7 +362,6 @@
                }
            });
            //#region é‡æ–°åŒæ­¥æŒ‰é’®
            form.on('submit(btnResCnz)', function (data) {
                set_ResCnz();
@@ -553,7 +552,6 @@
                                }
                            }
                            option.cols = [col];
                            option.data = data1.data;
                            ins = table.render(option);
@@ -1038,6 +1036,7 @@
                $.ajax({
                    url: GetWEBURL() + '/Gy_MaterType/Gy_MaterTypeTreeListByLevel',
                    type: "GET",
                    data: { "HOrgID": sessionStorage["OrganizationID"] },
                    success: function (data1) {
                        if (data1.count == 1) {
                            layer.close(ajaxLoad);
WebTM/views/Ä£Öξ߹ÜÀí/Ä£Öξ߹ÜÀí/Gy_BarCodeBillList.html
@@ -218,7 +218,8 @@
            var option = [];
            var ins;
            var titleData = ["单据ID", "HMaterID", "HDeptID", "HSupID"];//不需要显示的字段 å¯æ‰©å±•
            var page = 1;//分页数据
            var size = 50;
            //#region ã€è¿‡æ»¤æ–¹æ¡ˆã€‘
            //过滤条件的classç±»
@@ -318,6 +319,7 @@
                        $("#HMaterNumber").val("");
                        sWhere = "";
                        get_Display(sWhere);
                        break;
                    //作废按钮
                    case 'set_Drop': set_DropBill(0);
@@ -386,8 +388,11 @@
                $("#ColName2").val("0");
                $("#Comparator2").val("0");
                form.render('select');
                 if (page != 1) {
                    $("#page a:eq(1)").get(0).click();//点击分页栏第一页
                }
                sWhere = "";
                get_Display(sWhere);
                get_DisplayPage(sWhere);
            });
            //#endregion
@@ -412,19 +417,19 @@
                    var com = "";
                    switch (Comparator) {
                        case "7":
                            com = "like '%" + ColContent + "%'";
                            com = "like ''%" + ColContent + "%''";
                            break;
                        case "8":
                            com = "like '" + ColContent + "%'";
                            com = "like ''%" + ColContent + "''";
                            break;
                        case "9":
                            com = "like '%" + ColContent + "'";
                            com = "like''" + ColContent + "%''";
                            break;
                        case "10":
                            com = "not like '%" + ColContent + "%'";
                            com = "not like ''%" + ColContent + "%''";
                            break;
                        default:
                            com = "" + Comparator + "'" + ColContent + "'";
                            com = "" + Comparator + "''" + ColContent + "''";
                            break;
                    }
                    sWhere += " and " + ColName + " " + com;
@@ -434,19 +439,19 @@
                if (ColName1 != 0 && Comparator1 != 0) {
                    switch (Comparator1) {
                        case "7":
                            com1 = "like '%" + ColContent1 + "%'";
                            com1 = "like ''%" + ColContent1 + "%''";
                            break;
                        case "8":
                            com = "like '" + ColContent1 + "%'";
                            com1 = "like ''%" + ColContent1 + "''";
                            break;
                        case "9":
                            com = "like '%" + ColContent1 + "'";
                            com1 = "like''" + ColContent1 + "%''";
                            break;
                        case "10":
                            com1 = "not like '%" + ColContent1 + "%'";
                            com1 = "not like''%" + ColContent1 + "%''";
                            break;
                        default:
                            com1 = "" + Comparator1 + "'" + ColContent1 + "'";
                            com1 = "" + Comparator1 + "''" + ColContent1 + "''";
                            break;
                    }
                    sWhere += " and " + ColName1 + " " + com1;
@@ -456,49 +461,51 @@
                if (ColName2 != 0 && Comparator2 != 0) {
                    switch (Comparator) {
                        case "7":
                            com2 = "like '%" + ColContent2 + "%'";
                            com2 = "like ''%" + ColContent2 + "%''";
                            break;
                        case "8":
                            com = "like '" + ColContent2 + "%'";
                            com2 = "like''%" + ColContent2 + "''";
                            break;
                        case "9":
                            com = "like '%" + ColContent2 + "'";
                            com2 = "like ''" + ColContent2 + "%''";
                            break;
                        case "10":
                            com2 = "not like '%" + ColContent2 + "%'";
                            com2 = "not like ''%" + ColContent2 + "%''";
                            break;
                        default:
                            com2 = "" + Comparator2 + "'" + ColContent2 + "'";
                            com2 = "" + Comparator2 + "''" + ColContent2 + "''";
                            break;
                    }
                    sWhere += " and " + ColName2 + " " + com2;
                }
                if (HBeginDate) {
                    sWhere += " and CONVERT(varchar(100),日期, 23) >= '" + HBeginDate + "'";
                    sWhere += " and CONVERT(varchar(100),日期, 23) >= ''" + HBeginDate + "''";
                }
                if (HEndDate) {
                    sWhere += " and CONVERT(varchar(100),日期, 23) <= '" + HEndDate + "'";
                    sWhere += " and CONVERT(varchar(100),日期, 23) <= ''" + HEndDate + "''";
                }
                if (HBarCode) {
                    sWhere += " and æ¡ç ç¼–号 like '%" + HBarCode + "%'";
                    sWhere += " and æ¡ç ç¼–号 like ''%" + HBarCode + "%''";
                }
                if (HMaterName) {
                    sWhere += " and ç‰©æ–™åç§° like'%" + HMaterName + "%'";
                    sWhere += " and ç‰©æ–™åç§° like''%" + HMaterName + "%''";
                }
                if (HMaterNumber) {
                    sWhere += " and ç‰©æ–™ä»£ç  like'%" + HMaterNumber + "%'";
                    sWhere += " and ç‰©æ–™ä»£ç  like''%" + HMaterNumber + "%''";
                }                
                if (HSourceBillNo) {
                    sWhere += " and æºå•单号 like '%" + HSourceBillNo + "%'";
                    sWhere += " and æºå•单号 like ''%" + HSourceBillNo + "%''";
                }
                get_Display(sWhere);
                get_DisplayPage(sWhere);
                sWhere = "";//调用接口后清空sWhere缓存
            });
            //#endregion
            //#region åˆå§‹åŒ–界面
            function set_ClearBill() {
                //初始化表格
                set_InitGrid();
                //初始化日期间隔、开始日期、结束日期
                setSelect_HInitTimeCycle();
                //若日期间隔不为 ä»»æ„é—´éš”,则禁用开始日期与结束日期的选择
@@ -514,10 +521,9 @@
                //根据日期间隔设置开始时间与结束时间
                $("#HBeginDate").val(Format(new Date(new Date() - 1000 * 60 * 60 * 24 * HInitTimeCycle), "yyyy-MM-dd"));
                $("#HEndDate").val(Format(new Date(), "yyyy-MM-dd"));
                //初始化表格
                set_InitGrid();
                //查询
                get_Display(sWhere);
                get_DisplayPage(sWhere);
                //任意字段过滤下拉框初始化
                ColFilter();
@@ -525,68 +531,153 @@
                get_DefaultModule();
            }
            function set_InitGrid() {
                 option = {
                option = {
                    elem: '#mainTable'
                    , toolbar: '#toolbarDemo'
                    , height: 'full-50'
                     , page: true
                     , totalRow: true
                    , page: true
                    , totalRow: true
                    , cellMinWidth: 90
                    , limits: [50, 500, 5000, 20000]
                     , limit: 50
                     , done: function (res, curr, count) {
                         soulTable.render(this);
                     }
                     , cols: [[
                         { type: 'checkbox', fixed: 'left' }
                         , { field: 'hmainid', title: '单据ID', hide: true, sort: true }
                         , { field: '条码类型', title: '条码类型', width: 160, sort: true }
                         , { field: '条码编号', title: '条码编号', width: 160, sort: true }
                         , { field: 'HMaterID', title: 'HMaterID', width: 160, hide: true, sort: true }
                         , { field: '物料代码', title: '物料代码', width: 200, sort: true }
                         , { field: '物料名称', title: '物料名称', width: 250, sort: true }
                         , { field: '规格型号', title: '规格型号', width: 250, sort: true }
                         , { field: '计量单位代码', title: '计量单位代码', width: 200, sort: true }
                         , { field: '计量单位', title: '计量单位', width: 200, sort: true }
                         , { field: '炉号', title: '炉号', width: 200, sort: true }
                         , { field: '钢卷号', title: '钢卷号', width: 200, sort: true }
                         , { field: '条码状态', title: '条码状态', width: 200, sort: true }
                         , { field: '厂商', title: '厂商', width: 200, sort: true }
                         , { field: '捆包号', title: '捆包号', width: 200, sort: true }
                         , { field: '生产日期', title: '生产日期', width: 200, templet: "<div>{{d.生产日期 ==null ?'':layui.util.toDateString(d.生产日期, 'yyyy-MM-dd HH:mm:ss')}}</div>", sort: true }
                         , { field: '保质期至', title: '保质期至', width: 200, templet: "<div>{{d.保质期至 ==null ?'':layui.util.toDateString(d.保质期至, 'yyyy-MM-dd HH:mm:ss')}}</div>", sort: true }
                         , { field: 'HAuxPropID', title: 'HAuxPropID', width: 200, sort: true }
                         , { field: '辅助属性代码', title: '辅助属性代码', width: 160, sort: true }
                         , { field: '辅助属性', title: '辅助属性', width: 160, sort: true }
                         , { field: '批号', title: '批号', width: 160, sort: true }
                         , { field: '数量', title: '数量', width: 200, sort: true, totalRow: true}
                         , { field: '计划跟踪号', title: '计划跟踪号', width: 200, sort: true }
                         , { field: '源单单号', title: '源单单号', width: 200, sort: true }
                         , { field: 'HSupID', title: 'HSupID', width: 200, hide: true, sort: true }
                         , { field: '供应商代码', title: '供应商代码', width: 200, sort: true }
                         , { field: '供应商', title: '供应商', width: 200, sort: true }
                         , { field: '进料日期', title: '进料日期', width: 200, sort: true }
                         , { field: '进料日期周', title: '进料日期周', width: 115, sort: true }
                         , { field: '客户型号', title: '客户型号', width: 115, sort: true }
                         , { field: '往来单位', title: '往来单位', width: 200, sort: true }
                         , { field: 'HDeptID', title: 'HDeptID', width: 200, hide: true, sort: true }
                         , { field: '车间', title: '车间', width: 115, sort: true }
                         , { field: '计划完工日期', title: '计划完工日期', width: 200, sort: true }
                         , { field: '拖号', title: '拖号', width: 200, sort: true }
                         , { field: '总托数', title: '总托数', width: 200, sort: true, totalRow: true }
                         , { field: '备注', title: '备注', width: 200, sort: true }
                         , { field: '制作人', title: '制作人', width: 115, sort: true }
                         , { field: '日期', title: '日期', width: 200, templet: "<div>{{d.日期 ==null ?'':layui.util.toDateString(d.日期, 'yyyy-MM-dd HH:mm:ss')}}</div>", sort: true }
                         , { field: '打印次数', title: '打印次数', width: 200, sort: true }
                         , { field: '作废标记', title: '作废标记', width: 200, sort: true }
                         , { field: '作废人', title: '作废人', width: 115, sort: true }
                         , { field: '生产入库日期', title: '生产入库日期', width: 200, templet: "<div>{{d.生产入库日期 ==null ?'':layui.util.toDateString(d.生产入库日期, 'yyyy-MM-dd HH:mm:ss')}}</div>", sort: true }
                         , { field: '销售出库日期', title: '销售出库日期', width: 200, templet: "<div>{{d.销售出库日期 ==null ?'':layui.util.toDateString(d.销售出库日期, 'yyyy-MM-dd HH:mm:ss')}}</div>", sort: true }
                     ]]
                    , limit: 50
                    , done: function (res, curr, count) {
                        soulTable.render(this);
                    }
                    , cols: [[
                        { type: 'checkbox', fixed: 'left' }
                        , { field: 'hmainid', title: '单据ID', hide: true, sort: true }
                        , { field: '条码类型', title: '条码类型', width: 160, sort: true }
                        , { field: '条码编号', title: '条码编号', width: 160, sort: true }
                        , { field: 'HMaterID', title: 'HMaterID', width: 160, hide: true, sort: true }
                        , { field: '物料代码', title: '物料代码', width: 200, sort: true }
                        , { field: '物料名称', title: '物料名称', width: 250, sort: true }
                        , { field: '规格型号', title: '规格型号', width: 250, sort: true }
                        , { field: '计量单位代码', title: '计量单位代码', width: 200, sort: true }
                        , { field: '计量单位', title: '计量单位', width: 200, sort: true }
                        , { field: '炉号', title: '炉号', width: 200, sort: true }
                        , { field: '钢卷号', title: '钢卷号', width: 200, sort: true }
                        , { field: '条码状态', title: '条码状态', width: 200, sort: true }
                        , { field: '厂商', title: '厂商', width: 200, sort: true }
                        , { field: '捆包号', title: '捆包号', width: 200, sort: true }
                        , { field: '生产日期', title: '生产日期', width: 200, templet: "<div>{{d.生产日期 ==null ?'':layui.util.toDateString(d.生产日期, 'yyyy-MM-dd HH:mm:ss')}}</div>", sort: true }
                        , { field: '保质期至', title: '保质期至', width: 200, templet: "<div>{{d.保质期至 ==null ?'':layui.util.toDateString(d.保质期至, 'yyyy-MM-dd HH:mm:ss')}}</div>", sort: true }
                        , { field: 'HAuxPropID', title: 'HAuxPropID', width: 200, sort: true }
                        , { field: '辅助属性代码', title: '辅助属性代码', width: 160, sort: true }
                        , { field: '辅助属性', title: '辅助属性', width: 160, sort: true }
                        , { field: '批号', title: '批号', width: 160, sort: true }
                        , { field: '数量', title: '数量', width: 200, sort: true, totalRow: true }
                        , { field: '计划跟踪号', title: '计划跟踪号', width: 200, sort: true }
                        , { field: '源单单号', title: '源单单号', width: 200, sort: true }
                        , { field: 'HSupID', title: 'HSupID', width: 200, hide: true, sort: true }
                        , { field: '供应商代码', title: '供应商代码', width: 200, sort: true }
                        , { field: '供应商', title: '供应商', width: 200, sort: true }
                        , { field: '进料日期', title: '进料日期', width: 200, sort: true }
                        , { field: '进料日期周', title: '进料日期周', width: 115, sort: true }
                        , { field: '客户型号', title: '客户型号', width: 115, sort: true }
                        , { field: '往来单位', title: '往来单位', width: 200, sort: true }
                        , { field: 'HDeptID', title: 'HDeptID', width: 200, hide: true, sort: true }
                        , { field: '车间', title: '车间', width: 115, sort: true }
                        , { field: '计划完工日期', title: '计划完工日期', width: 200, sort: true }
                        , { field: '拖号', title: '拖号', width: 200, sort: true }
                        , { field: '总托数', title: '总托数', width: 200, sort: true, totalRow: true }
                        , { field: '备注', title: '备注', width: 200, sort: true }
                        , { field: '制作人', title: '制作人', width: 115, sort: true }
                        , { field: '日期', title: '日期', width: 200, templet: "<div>{{d.日期 ==null ?'':layui.util.toDateString(d.日期, 'yyyy-MM-dd HH:mm:ss')}}</div>", sort: true }
                        , { field: '打印次数', title: '打印次数', width: 200, sort: true }
                        , { field: '作废标记', title: '作废标记', width: 200, sort: true }
                        , { field: '作废人', title: '作废人', width: 115, sort: true }
                        , { field: '生产入库日期', title: '生产入库日期', width: 200, templet: "<div>{{d.生产入库日期 ==null ?'':layui.util.toDateString(d.生产入库日期, 'yyyy-MM-dd HH:mm:ss')}}</div>", sort: true }
                        , { field: '销售出库日期', title: '销售出库日期', width: 200, templet: "<div>{{d.销售出库日期 ==null ?'':layui.util.toDateString(d.销售出库日期, 'yyyy-MM-dd HH:mm:ss')}}</div>", sort: true }
                    ]]
                };
                optionPage = {
                    elem: 'page', //注意,这里的 page æ˜¯ ID,不用加 # å·
                    count: 10000, //数据总数,从服务端得到
                    limit: 50,
                    limits: [50, 500, 5000, 50000],
                    layout: ['count', 'prev', 'page', 'next', 'limit', 'skip'],
                    jump: function (obj, first) {
                        //console.log(obj)
                        //obj包含了当前分页的所有参数,比如:
                        //console.log(obj.curr); //得到当前页,以便向服务端请求对应页的数据。
                        //console.log(obj.limit); //得到每页显示的条数
                        //首次不执行
                        if (!first) {
                            //do something
                            page = obj.curr;
                            size = obj.limit;
                            get_FastQuery();
                        }
                    }
                }
                laypage.render(optionPage);
            }
            //#region åˆ†é¡µæŸ¥è¯¢
            function get_DisplayPage(sWhere) {
                var wait = layer.load();//遮罩
                var ajaxLoad = layer.load();
                $.ajax({
                    url: GetWEBURL() + '/Gy_BarCodeBillList/page',
                    type: "GET",
                    data: { "sWhere": sWhere, "user": sessionStorage["HUserName"], "page": page, "size": size },
                    success: function (data1) {
                        option.limit = size;//改变表格页大小
                        if (data1.code == 1) {
                            optionPage.count = data1.count;//改变列表数据总数
                            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 (data[i].name == 'HInterID' || data[i].name == 'HBillType' || data[i].name == 'hmainid') {
                                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: 120 });
                                            break;
                                        default:
                                            col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: true, width: 120 });
                                    }
                                }
                            }
                            option.cols = [col];
                            option.data = data1.data;
                            ins = table.render(option);
                            laypage.render(optionPage);
                            //刷新表格数据
                            DisPlay_HideColumn();
                            layer.close(ajaxLoad);
                            if ($("#ColName option").length < 1) {
                                ColFilter();
                            }
                            //layer.alert("查询成功", { icon: 1 });
                        } else {
                            option.data = [[]]
                            table.render(option);
                            layer.close(ajaxLoad);
                            /*layer.alert(data1.code + data1.Message, { icon: 5 });*/
                        }
                    }, error: function () {
                        layer.close(ajaxLoad);
                        layer.alert("接口请求失败!", { icon: 5 });
                    }
                });
            }
            //#endregion
             //#endregion
            //进入页面显示的缓存列表
            function get_Display(sWhere) {
@@ -696,6 +787,70 @@
                else {
                    layer.msg('请选择一行数据作废!');
                }
            }
            //#endregion
            //#region åˆ†é¡µæŸ¥è¯¢
            function get_DisplayPage(sWhere) {
                var wait = layer.load();//遮罩
                var ajaxLoad = layer.load();
                $.ajax({
                    url: GetWEBURL() + '/Gy_BarCodeBillList/page',
                    type: "GET",
                    data: { "sWhere": sWhere, "user": sessionStorage["HUserName"], "page": page, "size": size },
                    success: function (data1) {
                        option.limit = size;//改变表格页大小
                        if (data1.code == 1) {
                            optionPage.count = data1.count;//改变列表数据总数
                            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 (data[i].name == 'HInterID' || data[i].name == 'HBillType' || data[i].name == 'hmainid') {
                                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: 120 });
                                            break;
                                        default:
                                            col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: true, width: 120 });
                                    }
                                }
                            }
                            option.cols = [col];
                            option.data = data1.data;
                            ins = table.render(option);
                            laypage.render(optionPage);
                            //刷新表格数据
                            DisPlay_HideColumn();
                            layer.close(ajaxLoad);
                            if ($("#ColName option").length < 1) {
                                ColFilter();
                            }
                            //layer.alert("查询成功", { icon: 1 });
                        } else {
                            option.data = [[]]
                            table.render(option);
                            layer.close(ajaxLoad);
                            /*layer.alert(data1.code + data1.Message, { icon: 5 });*/
                        }
                    }, error: function () {
                        layer.close(ajaxLoad);
                        layer.alert("接口请求失败!", { icon: 5 });
                    }
                });
            }
            //#endregion
@@ -880,7 +1035,7 @@
                var Organization = '<option  value="0" selected="selected" ></option>';
                for (var i = 1; i < option.cols[0].length; i++) {
                    if (option.cols[0][i].hide != true) {
                        Organization += '<option  style="color:blue;" value="' + option.cols[0][i].field + '">' + option.cols[0][i].field + '</option>';
                        Organization += '<option  style="color:blue;" value="' + option.cols[0][i].field + '">' + option.cols[0][i].title + '</option>';
                    }
                }
                $("#ColName").empty();
WebTM/views/Éú²ú¹ÜÀí/Éú²úÈÎÎñµ¥/Sc_ICMOBillList.html
@@ -371,7 +371,8 @@
            window.HDefaultFilter = "";
            //选择的过滤方案内码(全局变量)
            window.HInterID_Choose = 0;
            var page = 1;//分页数据
            var size = 50;
            //#endregion
            //初始化表格
@@ -854,6 +855,28 @@
                        , { field: '物料分类', title: '物料分类', sort: true }
                    ]]
                };
                optionPage = {
                    elem: 'page', //注意,这里的 page æ˜¯ ID,不用加 # å·
                    count: 10000, //数据总数,从服务端得到
                    limit: 50,
                    limits: [50, 500, 5000, 50000],
                    layout: ['count', 'prev', 'page', 'next', 'limit', 'skip'],
                    jump: function (obj, first) {
                        //console.log(obj)
                        //obj包含了当前分页的所有参数,比如:
                        //console.log(obj.curr); //得到当前页,以便向服务端请求对应页的数据。
                        //console.log(obj.limit); //得到每页显示的条数
                        //首次不执行
                        if (!first) {
                            //do something
                            page = obj.curr;
                            size = obj.limit;
                            get_FastQuery();
                        }
                    }
                }
                laypage.render(optionPage);
            }
            //#endregion  ç›‘听网格表体事件
            table.on('tool(mainTable)', function (obj) {
@@ -1027,6 +1050,70 @@
            }
            //#endregion
            //#region åˆ†é¡µæŸ¥è¯¢
            function get_DisplayPage(sWhere) {
                var wait = layer.load();//遮罩
                var ajaxLoad = layer.load();
                $.ajax({
                    url: GetWEBURL() + '/LEMS/MES_IF_ICMOBillListPage',
                    type: "GET",
                    data: { "sWhere": sWhere, "user": sessionStorage["HUserName"], "page": page, "size": size },
                    success: function (data1) {
                        option.limit = size;//改变表格页大小
                        if (data1.code == 1) {
                            optionPage.count = data1.count;//改变列表数据总数
                            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 (data[i].name == 'HInterID' || data[i].name == 'HBillType' || data[i].name == 'hmainid') {
                                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: 120 });
                                            break;
                                        default:
                                            col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: true, width: 120 });
                                    }
                                }
                            }
                            option.cols = [col];
                            option.data = data1.data;
                            ins = table.render(option);
                            laypage.render(optionPage);
                            //刷新表格数据
                            DisPlay_HideColumn();
                            layer.close(ajaxLoad);
                            if ($("#ColName option").length < 1) {
                                ColFilter();
                            }
                            //layer.alert("查询成功", { icon: 1 });
                        } else {
                            option.data = [[]]
                            table.render(option);
                            layer.close(ajaxLoad);
                            /*layer.alert(data1.code + data1.Message, { icon: 5 });*/
                        }
                    }, error: function () {
                        layer.close(ajaxLoad);
                        layer.alert("接口请求失败!", { icon: 5 });
                    }
                });
            }
            //#endregion
            //#region å¿«é€Ÿè¿‡æ»¤
            function get_FastQuery(number) {
                var HDate = $("#HDate").val();;//开始日期
@@ -1057,19 +1144,19 @@
                    var com = "";
                    switch (Comparator) {
                        case "7":
                            com = "like'%" + ColContent + "%'";
                            com = "like''%" + ColContent + "%''";
                            break;
                        case "8":
                            com = "like'%" + ColContent + "'";
                            com = "like''%" + ColContent + "''";
                            break;
                        case "9":
                            com = "like'" + ColContent + "%'";
                            com = "like''" + ColContent + "%''";
                            break;
                        case "10":
                            com = "not like'%" + ColContent + "%'";
                            com = "not like''%" + ColContent + "%''";
                            break;
                        default:
                            com = "" + Comparator + "'" + ColContent + "'";
                            com = "" + Comparator + "''" + ColContent + "''";
                            break;
                    }
                    sWhere += " and " + ColName + " " + com;
@@ -1080,19 +1167,19 @@
                    var com1 = "";
                    switch (Comparator1) {
                        case "7":
                            com1 = "like'%" + ColContent1 + "%'";
                            com1 = "like''%" + ColContent1 + "%''";
                            break;
                        case "8":
                            com1 = "like'%" + ColContent1 + "'";
                            com1 = "like''%" + ColContent1 + "''";
                            break;
                        case "9":
                            com1 = "like'" + ColContent1 + "%'";
                            com1 = "like''" + ColContent1 + "%''";
                            break;
                        case "10":
                            com1 = "not like'%" + ColContent1 + "%'";
                            com1 = "not like''%" + ColContent1 + "%''";
                            break;
                        default:
                            com1 = "" + Comparator1 + "'" + ColContent1 + "'";
                            com1 = "" + Comparator1 + "''" + ColContent1 + "''";
                            break;
                    }
                    sWhere += " and " + ColName1 + " " + com1;
@@ -1101,19 +1188,19 @@
                    var com2 = "";
                    switch (Comparator2) {
                        case "7":
                            com2 = "like'%" + ColContent2 + "%'";
                            com2 = "like''%" + ColContent2 + "%''";
                            break;
                        case "8":
                            com2 = "like'%" + ColContent2 + "'";
                            com2 = "like''%" + ColContent2 + "''";
                            break;
                        case "9":
                            com2 = "like'" + ColContent2 + "%'";
                            com2 = "like''" + ColContent2 + "%''";
                            break;
                        case "10":
                            com2 = "not like'%" + ColContent2 + "%'";
                            com2 = "not like''%" + ColContent2 + "%''";
                            break;
                        default:
                            com2 = "" + Comparator2 + "'" + ColContent2 + "'";
                            com2 = "" + Comparator2 + "''" + ColContent2 + "''";
                            break;
                    }
                    sWhere += " and " + ColName2 + " " + com2;
@@ -1132,51 +1219,51 @@
                        sWhere += "";
                    }
                    if (HSF == "已下推") {
                        sWhere += " and æ˜¯å¦ä¸‹æŽ¨ç”Ÿæˆæµè½¬å¡ like '%" + HSF + "%' ";
                        sWhere += " and æ˜¯å¦ä¸‹æŽ¨ç”Ÿæˆæµè½¬å¡ like ''%" + HSF + "%'' ";
                    }
                    if (HSF == "部分下推") {
                        sWhere += " and æ˜¯å¦ä¸‹æŽ¨ç”Ÿæˆæµè½¬å¡ like '%" + HSF + "%' ";
                        sWhere += " and æ˜¯å¦ä¸‹æŽ¨ç”Ÿæˆæµè½¬å¡ like ''%" + HSF + "%'' ";
                    }
                    if (HSF == "未下推") {
                        sWhere += " and æ˜¯å¦ä¸‹æŽ¨ç”Ÿæˆæµè½¬å¡ like '%" + HSF + "%' ";
                        sWhere += " and æ˜¯å¦ä¸‹æŽ¨ç”Ÿæˆæµè½¬å¡ like ''%" + HSF + "%'' ";
                    }
                }
                if (HDate) {
                    sWhere += " and æ—¥æœŸ >= '" + HDate + "'";
                    sWhere += " and CONVERT(varchar(100),日期, 23) >= ''" + HDate + "''";
                }
                if (HDate1) {
                    sWhere += " and æ—¥æœŸ <= '" + HDate1 + "'";
                    sWhere += " and CONVERT(varchar(100),日期, 23) <= ''" + HDate1 + "''";
                }
                if (HOrderProcNO) {
                    sWhere += " and è®¢å•跟踪号 like '%" + HOrderProcNO + "%'";
                    sWhere += " and è®¢å•跟踪号 like ''%" + HOrderProcNO + "%''";
                }
                if (HSeOrderBillNo) {
                    sWhere += " and é”€å”®è®¢å•号 like '%" + HSeOrderBillNo + "%'";
                    sWhere += " and é”€å”®è®¢å•号 like ''%" + HSeOrderBillNo + "%''";
                }
                if (WorkCenter) {
                    sWhere += " and å•据号 like '%" + WorkCenter + "%'";
                    sWhere += " and å•据号 like ''%" + WorkCenter + "%''";
                }
                if (HMaterName) {
                    sWhere += " and äº§å“ä»£ç  like '%" + HMaterName + "%'";
                    sWhere += " and äº§å“ä»£ç  like ''%" + HMaterName + "%''";
                }
                if (HDeptName && HDeptName != 0) {
                    sWhere += " and HDeptID = " + HDeptName;
                }
                if (HStatus && HStatus != 0) {
                    sWhere += " and çŠ¶æ€  like '%" + HStatus + "%'";
                    sWhere += " and çŠ¶æ€  like ''%" + HStatus + "%''";
                }
                if (HBillType) {
                    sWhere += " and å•据类型 like '%" + HBillType + "%'";
                    sWhere += " and å•据类型 like ''%" + HBillType + "%''";
                }
                if (HErpID) {
                    sWhere += " and å”¯ä¸€ID like '%" + HErpID + "%'";
                    sWhere += " and å”¯ä¸€ID like ''%" + HErpID + "%''";
                }
                if (HModel) {
                    sWhere += " and è§„格型号 like '%" + HModel + "%'";
                    sWhere += " and è§„格型号 like ''%" + HModel + "%''";
                }
                if (number == 3) {
                    if (HProject) {
                        sWhere += " and é¡¹ç›®å· like '%" + HProject + "%'";
                        sWhere += " and é¡¹ç›®å· like ''%" + HProject + "%''";
                    }
                }
                //if (HSF) {
@@ -1190,7 +1277,7 @@
                //根据用户过滤用户关联客户的记录
                sWhere += getSWhereByHUser();
                get_Display(sWhere);
                get_DisplayPage(sWhere);
                sWhere = "";//调用接口后清空sWhere缓存
                GetDataCols = "";
            }
WebTM/views/ϵͳ¹ÜÀí/ÈÕÖ¾¹ÜÀí/Xt_SystemLogList.html
@@ -509,7 +509,6 @@
            }
            //日期间隔下拉列表监听
            form.on('select(HInitTimeCycle)', function (data) {
                var HInitTimeCycle = $("#HInitTimeCycle").val() * 1;
WebTM/views/¼Æ»®¹ÜÀí/¹¤ÒÕ·Ïß/Gy_RoutingBillList.html
@@ -201,11 +201,6 @@
                                <button type="button" class="layui-btn layui-btn-sm" style="display:none;" lay-event="get_Exit" id="get_Exit"><i class="layui-icon layui-icon-logout"></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" style="display:none;" lay-event="set_startCheckBill" id="set_startCheckBill"><i class="layui-icon layui-icon-form"></i>发起审批</button>
                                <button type="button" class="layui-btn layui-btn-sm" style="display:none;" lay-event="get_CheckFlowInfo" id="get_CheckFlowInfo"><i class="layui-icon layui-icon-form"></i>查看审批进度</button>
                                <button type="button" class="layui-btn layui-btn-sm" style="display:none;" lay-event="set_CheckBill_Flow" id="CheckBill_Flow"><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_Flow" id="AbandonCheck_Flow"><i class="layui-icon layui-icon-form"></i>多级反审核</button>
                                <button type="button" class="layui-btn layui-btn-sm" style="display:none;" lay-event="set_RejectCheck_Flow" id="RejectCheck_Flow"><i class="layui-icon layui-icon-form"></i>驳回</button>
                                <button type="button" class="layui-btn layui-btn-sm" style="display:none;" lay-event="set_CloseBill" id="set_CloseBill"><i class="layui-icon layui-icon-form"></i>关闭</button>
                                <button type="button" class="layui-btn layui-btn-sm" style="display:none;" lay-event="set_CancelCloseBill" id="set_CancelCloseBill"><i class="layui-icon layui-icon-form"></i>反关闭</button>
                                <button type="button" class="layui-btn layui-btn-sm" style="display:none;" lay-event="btn-ProcPriceRequestBills" id="btn-ProcPriceRequestBills"><i class="layui-icon layui-icon-delete"></i>多行下推(定额申请单)</button>
@@ -244,9 +239,10 @@
            //var sWhere = " äº§å“ä»£ç  = 'BX0002'";
            var sWhere = "";
            var option = [];
            var page = 1;//分页数据
            var size = 50;
            var ins;                        //用于导出excel
            var HModName = "Gy_RoutingBillList";
            var HBillType = 3301;
            var titleData = [];//不需要显示的字段 å¯æ‰©å±•
            //获取参数
            function getUrlVars() {
@@ -291,21 +287,6 @@
                        break;
                    //编辑
                    case 'set_ShowBill': set_ShowBill();
                        break;
                    //发起审批
                    case 'set_startCheckBill': set_startCheckBill();
                        break;
                    //查看审批进度
                    case 'get_CheckFlowInfo': get_CheckFlowInfo();
                        break;
                    //多级审核
                    case 'set_CheckBill_Flow': set_CheckBill_Flow(0);
                        break;
                    //多级反审核
                    case 'set_AbandonCheck_Flow': set_CheckBill_Flow(1);
                        break;
                    //驳回
                    case 'set_RejectCheck_Flow': set_RejectCheck_Flow();
                        break;
                    //多行下推
                    case 'btn-ProcPriceRequestBills': set_ProcPriceRequestBills();
@@ -513,6 +494,28 @@
                        //, { field: '流转工序', title: '流转工序' }
                    ]]
                };
                optionPage = {
                    elem: 'page', //注意,这里的 page æ˜¯ ID,不用加 # å·
                    count: 10000, //数据总数,从服务端得到
                    limit: 50,
                    limits: [50, 500, 5000, 50000],
                    layout: ['count', 'prev', 'page', 'next', 'limit', 'skip'],
                    jump: function (obj, first) {
                        //console.log(obj)
                        //obj包含了当前分页的所有参数,比如:
                        //console.log(obj.curr); //得到当前页,以便向服务端请求对应页的数据。
                        //console.log(obj.limit); //得到每页显示的条数
                        //首次不执行
                        if (!first) {
                            //do something
                            page = obj.curr;
                            size = obj.limit;
                            get_FastQuery();
                        }
                    }
                }
                laypage.render(optionPage);
            }
@@ -623,7 +626,6 @@
                //sWhere += " and HPRDORGID=" + sessionStorage["OrganizationID"] + " ";
                if (HMaterID != "" && HMaterID != "undefined" && HMaterID != null) {
                    sWhere += " and HMaterID = " + HMaterID;
                    sWhere += " and å®¡æ ¸äºº != ''";
                }
                if (HProID != 0 && HProID != "undefined" && HProID != null) {
                    sWhere += " and HMainProcID = " + HProID;
@@ -754,19 +756,19 @@
                    var com = "";
                    switch (Comparator) {
                        case "7":
                            com = "like'%" + ColContent + "%'";
                            com = "like''%" + ColContent + "%''";
                            break;
                        case "8":
                            com = "like'%" + ColContent + "'";
                            com = "like''%" + ColContent + "''";
                            break;
                        case "9":
                            com = "like'" + ColContent + "%'";
                            com = "like''" + ColContent + "%''";
                            break;
                        case "10":
                            com = "not like'%" + ColContent + "%'";
                            com = "not like''%" + ColContent + "%''";
                            break;
                        default:
                            com = "" + Comparator + "'" + ColContent + "'";
                            com = "" + Comparator + "''" + ColContent + "''";
                            break;
                    }
                    sWhere += " and " + ColName + " " + com;
@@ -776,19 +778,19 @@
                    var com1 = "";
                    switch (Comparator1) {
                        case "7":
                            com1 = "like'%" + ColContent1 + "%'";
                            com1 = "like''%" + ColContent1 + "%''";
                            break;
                        case "8":
                            com1 = "like'%" + ColContent1 + "'";
                            com1 = "like''%" + ColContent1 + "''";
                            break;
                        case "9":
                            com1 = "like'" + ColContent1 + "%'";
                            com1 = "like''" + ColContent1 + "%''";
                            break;
                        case "10":
                            com1 = "not like'%" + ColContent1 + "%'";
                            com1 = "not like''%" + ColContent1 + "%''";
                            break;
                        default:
                            com1 = "" + Comparator1 + "'" + ColContent1 + "'";
                            com1 = "" + Comparator1 + "''" + ColContent1 + "''";
                            break;
                    }
                    sWhere += " and " + ColName1 + " " + com1;
@@ -797,19 +799,19 @@
                    var com2 = "";
                    switch (Comparator2) {
                        case "7":
                            com2 = "like'%" + ColContent2 + "%'";
                            com2 = "like''%" + ColContent2 + "%''";
                            break;
                        case "8":
                            com2 = "like'%" + ColContent2 + "'";
                            com2 = "like''%" + ColContent2 + "''";
                            break;
                        case "9":
                            com2 = "like'" + ColContent2 + "%'";
                            com2 = "like''" + ColContent2 + "%''";
                            break;
                        case "10":
                            com2 = "not like'%" + ColContent2 + "%'";
                            com2 = "not like''%" + ColContent2 + "%''";
                            break;
                        default:
                            com2 = "" + Comparator + "'" + ColContent + "'";
                            com2 = "" + Comparator + "''" + ColContent + "''";
                            break;
                    }
                    sWhere += " and " + ColName2 + " " + com2;
@@ -819,10 +821,10 @@
                } else {
                    if (HDate) {
                        sWhere += " and CONVERT(varchar(100),日期, 23) >= '" + HDate + "'";
                        sWhere += " and CONVERT(varchar(100),日期, 23) >= ''" + HDate + "''";
                    }
                    if (HDate1) {
                        sWhere += " and CONVERT(varchar(100),日期, 23) <= '" + HDate1 + "'";
                        sWhere += " and CONVERT(varchar(100),日期, 23) <= ''" + HDate1 + "''";
                    }
                }
                
@@ -834,32 +836,96 @@
                }
                if (HOrderProcNO) {
                    sWhere += " and å•据类型 like '%" + HOrderProcNO + "%'";
                    sWhere += " and å•据类型 like ''%" + HOrderProcNO + "%''";
                }
                if (HMaterName) {
                    sWhere += "and ç‰©æ–™åç§° like '%" + HMaterName + "%'";
                    sWhere += "and ç‰©æ–™åç§° like ''%" + HMaterName + "%''";
                }
                if (HMaterNumber) {
                    sWhere += "and  ç‰©æ–™ä»£ç  like '%" + HMaterNumber + "%'";
                    sWhere += "and  ç‰©æ–™ä»£ç  like ''%" + HMaterNumber + "%''";
                }
                if (HModel) {
                    sWhere += "and  è§„格型号 like '%" + HModel + "%'";
                    sWhere += "and  è§„格型号 like ''%" + HModel + "%''";
                }
                if (WorkCenter) {
                    sWhere += " and å•据号 like '%" + WorkCenter + "%'";
                    sWhere += " and å•据号 like ''%" + WorkCenter + "%''";
                }
                if (HOrgID) {
                    sWhere += " and HOrgID = '" + HOrgID + "'";
                    sWhere += " and HOrgID = ''" + HOrgID + "''";
                }
                if (number==2) {
                    if (HProject!='0') {
                        sWhere += " and é¡¹ç›®å· like '%" + HProject + "%'";
                        sWhere += " and é¡¹ç›®å· like ''%" + HProject + "%''";
                    }
                }
               
                sWhere += " and å·¥åºä»£ç  != '9999' and HBillSubType<>'SUB'"
                get_Display(sWhere);
                sWhere += " and å·¥åºä»£ç  != ''9999'' and HBillSubType<>''SUB''"
                get_DisplayPage(sWhere);
                sWhere = "";//调用接口后清空sWhere缓存
            }
            //#endregion
            //#region åˆ†é¡µæŸ¥è¯¢
            function get_DisplayPage(sWhere) {
                var wait = layer.load();//遮罩
                var ajaxLoad = layer.load();
                $.ajax({
                    url: GetWEBURL() + '/Gy_RoutingBill/page',
                    type: "GET",
                    data: { "sWhere": sWhere, "user": sessionStorage["HUserName"], "page": page, "size": size },
                    success: function (data1) {
                        option.limit = size;//改变表格页大小
                        if (data1.code == 1) {
                            optionPage.count = data1.count;//改变列表数据总数
                            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 (data[i].name == 'HInterID' || data[i].name == 'HBillType' || data[i].name == 'hmainid') {
                                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: 120 });
                                            break;
                                        default:
                                            col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: true, width: 120 });
                                    }
                                }
                            }
                            option.cols = [col];
                            option.data = data1.data;
                            ins = table.render(option);
                            laypage.render(optionPage);
                            //刷新表格数据
                            DisPlay_HideColumn();
                            layer.close(ajaxLoad);
                            if ($("#ColName option").length < 1) {
                                ColFilter();
                            }
                            //layer.alert("查询成功", { icon: 1 });
                        } else {
                            option.data = [[]]
                            table.render(option);
                            layer.close(ajaxLoad);
                            /*layer.alert(data1.code + data1.Message, { icon: 5 });*/
                        }
                    }, error: function () {
                        layer.close(ajaxLoad);
                        layer.alert("接口请求失败!", { icon: 5 });
                    }
                });
            }
            //#endregion
@@ -1062,7 +1128,7 @@
            //#region åˆ·æ–°
            function get_Refresh() {
                set_ClearQuery();
                get_Display(sWhere);
                get_DisplayPage(sWhere);
            }
            //审核   [1 å®¡æ ¸ã€2 åå®¡æ ¸]
@@ -1098,149 +1164,6 @@
                }
            }
            //#region å‘起审批
            function set_startCheckBill() {
                var checkStatus = table.checkStatus('mainTable')
                    , data = checkStatus.data;
                if (checkStatus.data.length === 1) {
                    var InterID = data[0].hmainid.toString();
                    //逻辑审核方法
                    $.ajax({
                        type: "GET",
                        url: GetWEBURL() + "/Gy_Routing/StartCheckFlow", //方法所在页面和方法名
                        data: { "HInterID": InterID, "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);
                                    $("#btnSearch").trigger('click');
                                });
                            } else {
                                layer.alert(result.code + result.Message, { icon: 5 });
                            }
                        }, error: function () {
                            layer.alert("接口请求失败!", { icon: 5 });
                        }
                    });
                    //修改为功后刷新界面
                    $("#btnSearch").trigger('click');
                }
                else {
                    layer.msg('请选择一行数据审核!');
                }
            }
            //#endregion
            //#region æŸ¥çœ‹å®¡æ‰¹è¿›åº¦
            function get_CheckFlowInfo() {
                var checkStatus = table.checkStatus('mainTable')
                    , data = checkStatus.data;
                if (checkStatus.data.length === 1) {
                    var hID = data[0].hmainid.toString();
                    layer.open({
                        type: 2
                        , area: ['70%', '70%']
                        , title: '单据审批进度'
                        , closeBtn: 1
                        , shade: 0.6 //遮罩透明度
                        , maxmin: true //允许全屏最小化
                        , anim: 0 //0-6的动画形式,-1不开启
                        , content: '../../系统管理/多级审批/审批进度/Xt_CheckFlowProgressList.html?linterid=' + hID + '&HSouceBillType=' + HBillType
                        , resize: false,
                        end: function () {
                            ////修改为功后刷新界面
                            //if (get_needClose_Bar == 0) {
                            //    $("#btnSearch").trigger('click');
                            //} else if (get_needClose_Bar == 1) {
                            //    $("#get_needClose").trigger('click');
                            //}
                        }
                        , cancel: function () {
                        }
                    })
                } else {
                    layer.msg('请选择一行数据查看!');
                }
            }
            //#endregion
            //#region å¤šçº§ åå®¡æ ¸/审核数据
            function set_CheckBill_Flow(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() + "/Gy_Routing/AuditFlow", //方法所在页面和方法名
                        data: { "HInterID": InterID, "IsAudit": num, "CurUserName": sessionStorage["HUserName"], "CurUserID": sessionStorage["Czybm"] },
                        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);
                                    //修改为功后刷新界面
                                    $("#btnSearch").trigger('click');
                                });
                            } else {
                                layer.alert(result.code + result.Message, { icon: 5 });
                            }
                        }, error: function () {
                            layer.alert("接口请求失败!", { icon: 5 });
                        }
                    });
                }
                else {
                    layer.msg('请选择一行数据审核!');
                }
            }
            //#endregion
            //#region é©³å›ž
            function set_RejectCheck_Flow(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() + "/Gy_Routing/RejectCheckFlow", //方法所在页面和方法名
                        data: { "HInterID": InterID, "CurUserID": sessionStorage["Czybm"] },
                        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);
                                });
                                //修改为功后刷新界面
                                $("#btnSearch").trigger('click');
                            } else {
                                layer.alert(result.code + result.Message, { icon: 5 });
                            }
                        }, error: function () {
                            layer.alert("接口请求失败!", { icon: 5 });
                        }
                    });
                }
                else {
                    layer.msg('请选择一行数据审核!');
                }
            }
            //#endregion
            //关闭  [1 å…³é—­ã€2 åå…³é—­]
            function set_CloseBill(num) {
@@ -1305,7 +1228,7 @@
                var colName = "";
                var contentUrl = "";
                for (var i = 1; i < option.cols[0].length - 1; i++) {
                    colName += option.cols[0][i]["field"] + ",";
                    colName += option.cols[0][i]["title"] + ",";
                }
                var urlStr = window.document.location.pathname;//获取文件路径
                var urlLen = urlStr.split('/');
@@ -1340,7 +1263,6 @@
                $.ajax({
                    url: GetWEBURL() + '/Xt_grdAlignment_WMES/grdAlignmentWMESList',
                    type: "GET",
                    async:"false",
                    data: { "HModName": HModName, "user": sessionStorage["HUserName"] },
                    success: function (data1) {
                        if (data1.data.length != 0) {
@@ -1377,10 +1299,6 @@
                                if (dataCols[1] == 0 && $.inArray(option.cols[0][i + 1]["title"], titleData) == -1) {
                                    option.cols[0][i + 1]["hide"] = false;
                                }
                                //统计列
                                if (dataCols[6] == 1) {
                                    option.cols[0][i + 1]["totalRow"] = true;
                                }
                                //字体所在位置(å·¦ å±…中 å³)
                                switch (dataCols[2]) {
                                    case "L":
@@ -1392,10 +1310,6 @@
                                    case "R":
                                        option.cols[0][i + 1]["align"] = "right";
                                        break;
                                }
                                //设置表格title属性显示别名
                                if (dataCols[4] != null && dataCols[4] != "") {
                                    option.cols[0][i + 1]["title"] = dataCols[4];
                                }
                            }
@@ -1450,7 +1364,7 @@
                var Organization = '<option  value="0" selected="selected" ></option>';
                for (var i = 1; i < option.cols[0].length; i++) {
                    if (option.cols[0][i].hide != true) {
                        Organization += '<option  style="color:blue;" value="' + option.cols[0][i].field + '">' + option.cols[0][i].title + '</option>';
                        Organization += '<option  style="color:blue;" value="' + option.cols[0][i].field + '">' + option.cols[0][i].field + '</option>';
                    }
                }
                $("#ColName").empty();
WebTM/views/³µ¼ä¹ÜÀí/¹¤Ðò³öÕ¾»ã±¨µ¥/Cj_StationOutBill.html
@@ -1190,89 +1190,6 @@
                                    getHModel($('#HProcExchHinteID').val(), $('#HProcPlanEntryID').val(), $('#HProcExchBillNo').val());
                                    break;
                                case "P20":
                                    form.val("formData", { //formTest å³ class="layui-form" æ‰€åœ¨å…ƒç´ å±žæ€§ lay-filter="" å¯¹åº”的值
                                        "HICMOInterID": data.hicmointerid,
                                        "HICMOBillNo": data.任务单号,
                                        "HMaterID": data.HMaterID,
                                        "HMaterName": data.产品,
                                        "HMaterNumber": data.产品代码,
                                        "HMaterModel": data.规格型号,
                                        "HPieceQty": data.流转卡数量,
                                        "HPlanQty": data.流转卡数量,
                                        "lngBillKey": data.hmainid,
                                        "HProcExchBillNo": data.单据号,
                                        "HProcExchHinteID": data.hmainid,
                                        "HProcPlanEntryID": data.hsubid,
                                        "HICMOQty": data.任务单数量,
                                        "HOrderProcNO": data.订单跟踪号,
                                        "HPRDOrgID": data.组织
                                    });
                                    //$("#HBarCode").attr("readonly", "readonly");//条形码只读
                                    //$("#HBarCode").css("background-color", "#efefef4d");
                                    HProcExchBillNoFlag = true;
                                    var HProcExchHinteID = $('#HProcExchHinteID').val();
                                    var HInterID = data.hmainid;
                                    //自动匹配流水号
                                    $.ajax({
                                        url: GetWEBURL() + "/Sc_StationInBill/autoGetProcNo",
                                        type: "GET",
                                        data: { "HUserID": sessionStorage["Czybm"], "HInterID": HInterID, "BillType": "Out" },
                                        success: function (data1) {
                                            if (data1.count == 1) {
                                                var data = data1.data[0];
                                                form.val("formData", { //formTest å³ class="layui-form" æ‰€åœ¨å…ƒç´ å±žæ€§ lay-filter="" å¯¹åº”的值
                                                    "lngBillSubKey": data.hsubid,
                                                    "HProcName": data.工序,
                                                    "HProcID": data.工序ID,
                                                    "HProcNo": data.流水号,
                                                    "HCenterName": data.工作中心,
                                                    "HCenterID": data.HCenterID,
                                                    "NoOutboundHqty": (data.流转卡数量 - data.出站报废关联数量 - data.出站关联数量)
                                                });
                                                if (data.首道工序 == "是") {
                                                    FirstEndHProcNo = 1;
                                                } else if (data.末道工序 == "是") {
                                                    FirstEndHProcNo = 2;
                                                }
                                                $("#HProcNo").attr("readonly", "readonly");
                                                $("#HProcNo").css("background-color", "#efefef4d");
                                            }
                                        }
                                    })
                                    option = {
                                        elem: '#mainTable',
                                        url: GetWEBURL() + "/Cj_StationEntrustInBill/DisBillEntryList",
                                        //, cellMinWidth: 80
                                        toolbar: '#toolbarDemo'
                                        , where: { HProcExchHinteID: HProcExchHinteID }
                                        , cols: [[
                                            { type: 'numbers', title: '序号', totalRow: true }
                                            , { field: 'HOrderProcNO', title: '订单跟踪号', edit: 'text' }
                                            , { field: 'hbillno', title: '流转卡号', hide: true }
                                            , { field: 'HICMOBillNo', title: '生产订单号', edit: 'text' }
                                            , { field: '产品代码', title: '产品代码' }
                                            , { field: '产品名称', title: '产品名称', edit: 'text' }
                                            , { field: '流转卡数量', title: '流转卡数量' }
                                            , { field: '流水号', title: '流水号', edit: 'text' }
                                            , { field: '工序名称', title: '工序名称' }
                                            , { field: '工作中心', title: '工作中心' }
                                            , { field: '是否委外', title: '是否委外', edit: 'text' }
                                            , { field: '供应商', title: '供应商' }
                                            , { field: '计划数量', title: '计划数量' }
                                            , { field: '进站数量', title: '进站数量', edit: 'text' }
                                            , { field: '出站数量', title: '出站数量' }
                                        ]]
                                        , height: 500
                                    }
                                    table.render(option)
                                    getHModel($('#HProcExchHinteID').val(), $('#HProcPlanEntryID').val(), $('#HProcExchBillNo').val());
                                    break;
                            }
                            //layer.close(index);
                            //set_InitGrid();
WebTM/views/³µ¼ä¹ÜÀí/¹¤Ðò³öÕ¾»ã±¨µ¥/Cj_StationOutBillList.html
@@ -257,17 +257,15 @@
            var option2 = [];
            var option3 = [];
            var option4 = [];
            var ins;                        //用于导出excel
            var page = 1;//分页数据
            var size = 50;
            var ins;  //用于导出excel
            var HModName = "Cj_StationOutBillList";
            var HModName1 = "Sc_StationOutBillSub_TechParam";
            var HModName2 = "Sc_StationOutBillSub_Note";
            var HModName3 = "Sc_StationOutBillSub_SN";
            var HModName4 = "Sc_StationOutBillSub_Emp";
            var titleData = ["HMaterID", "HUnitID", "HSourceID", "hmainid", "HProcExchInterID", "HProcID", "HunitID", "HEmpID", "HGroupID", "HProcExchEntryID", "HSubID", "HICMOInterID", "选择", "查询日期", "成本对象", "成本对象名称", "HBillStatus", "HBillType", "HPRDORGID"];//不需要显示的字段 å¯æ‰©å±•
            var params = get_UrlVars();
            var sProcExchBillNo = params[params[0]] == null ? "undefined" : params[params[0]];    //流转卡号(工序流转卡下查用到)
            var OperationType = params[params[1]] == null ? 1 : params[params[1]];  //1为直接列表模块打开  2为从其他模块跳转打开列表
            var ViewName = params[params[2]] == null ? "h_v_MES_StationOutBillList" : params[params[2]];    //所调用的视图
            //#region ã€è¿‡æ»¤æ–¹æ¡ˆã€‘
@@ -291,6 +289,7 @@
            //工序流转卡下查标记
            var lookDownBar = 0;              //(0:下查操作;1:直接查看)
            var params = get_UrlVars();       //获取参数
            //初始化表格
@@ -302,6 +301,7 @@
            //重置按钮
            form.on('submit(btnReSearch)', function (data) {
                set_ClearQuery();
                get_FastQuery();
            });
            //查询按钮
@@ -640,11 +640,32 @@
                        none: '无数据!'
                    }
                };
                set_ClearQuery();
                get_FastQuery();
                optionPage = {
                    elem: 'page', //注意,这里的 page æ˜¯ ID,不用加 # å·
                    count: 10000, //数据总数,从服务端得到
                    limit: 50,
                    limits: [50, 500, 5000, 50000],
                    layout: ['count', 'prev', 'page', 'next', 'limit', 'skip'],
                    jump: function (obj, first) {
                        //console.log(obj)
                        //obj包含了当前分页的所有参数,比如:
                        //console.log(obj.curr); //得到当前页,以便向服务端请求对应页的数据。
                        //console.log(obj.limit); //得到每页显示的条数
                        //首次不执行
                        if (!first) {
                            //do something
                            page = obj.curr;
                            size = obj.limit;
                            get_FastQuery();
                        }
                    }
                }
                laypage.render(optionPage);
            }
            set_ClearQuery();
            get_FastQuery();
            //功能按钮是否禁用方法,每次加载表格都要调用
            function btnIs() {
                //$('#btn-Add').addClass("layui-btn-disabled").attr("disabled", true);//新增按钮
@@ -1581,8 +1602,8 @@
            //快速过滤
            function get_FastQuery() {
                //判断是否为下查操作,若是则变更查询单号和时间过滤条件
                if (sProcExchBillNo != "undefined" && lookDownBar == 0) {
                    $("#HProcExchBillNo").val(sProcExchBillNo);
                if (typeof (params[params[0]]) != "undefined" && lookDownBar == 0) {
                    $("#HProcExchBillNo").val(params[params[0]]);
                    $("#HBeginDate").val("1990-01-01");
                    $("#HEndDate").val("2200-12-30");
                    lookDownBar = 1;
@@ -1608,56 +1629,56 @@
                    var com = "";
                    switch (Comparator) {
                        case "7":
                            com = "like'%" + ColContent + "%'";
                            com = "like''%" + ColContent + "%''";
                            break;
                        case "8":
                            com = "like'%" + ColContent + "'";
                            com = "like''%" + ColContent + "''";
                            break;
                        case "9":
                            com = "like'" + ColContent + "%'";
                            com = "like''" + ColContent + "%''";
                            break;
                        case "10":
                            com = "not like'%" + ColContent + "%'";
                            com = "not like''%" + ColContent + "%''";
                            break;
                        default:
                            com = "" + Comparator + "'" + ColContent + "'";
                            com = "" + Comparator + "''" + ColContent + "''";
                            break;
                    }
                    sWhere += " and " + ColName+    " "+ com;
                }
                if (HBeginDate) {
                    sWhere += " and CONVERT(varchar(100),出站时间, 23) >= '" + HBeginDate + "'";
                    sWhere += " and CONVERT(varchar(100),出站时间, 23) >= ''" + HBeginDate + "''";
                }
                if (HEndDate) {
                    sWhere += " and CONVERT(varchar(100),出站时间, 23) <= '" + HEndDate + "'";
                    sWhere += " and CONVERT(varchar(100),出站时间, 23) <= ''" + HEndDate + "''";
                }
                if (HWorkBillNo) {
                    sWhere += " and ä»»åŠ¡å• like '%" + HWorkBillNo + "%'";
                    sWhere += " and ä»»åŠ¡å• like ''%" + HWorkBillNo + "%''";
                }
                if (HBillNo) {
                    sWhere += " and å•据号 like '%" + HBillNo + "%'";
                    sWhere += " and å•据号 like ''%" + HBillNo + "%''";
                }
                if (HProcExchBillNo) {
                    sWhere += " and å·¥åºæµè½¬å¡å· like '%" + HProcExchBillNo + "%'";
                    sWhere += " and å·¥åºæµè½¬å¡å· like ''%" + HProcExchBillNo + "%''";
                }
                if (HProcExchBillNo) {
                    sWhere += " and å·¥åºæµè½¬å¡å· like '%" + HProcExchBillNo + "%'";
                    sWhere += " and å·¥åºæµè½¬å¡å· like ''%" + HProcExchBillNo + "%''";
                }
                if (checkHWasterQty) {
                    sWhere += "  and æŠ¥åºŸæ•°é‡>0 ";
                }
                if (HNumber) {
                    sWhere += " and äº§å“ä»£ç  like '%" + HNumber + "%'";
                    sWhere += " and äº§å“ä»£ç  like ''%" + HNumber + "%''";
                }
                if (HName) {
                    sWhere += " and å½“前工序 like '%" + HName + "%'";
                    sWhere += " and å½“前工序 like ''%" + HName + "%''";
                }
                if (HEmpNumber) {
                    sWhere += " and æ“ä½œå‘˜ä»£ç  like '%" + HEmpNumber + "%'";
                    sWhere += " and æ“ä½œå‘˜ä»£ç  like ''%" + HEmpNumber + "%''";
                }
                if (HEmpName) {
                    sWhere += " and æ“ä½œå‘˜ like '%" + HEmpName + "%'";
                    sWhere += " and æ“ä½œå‘˜ like ''%" + HEmpName + "%''";
                }
                if (HStatus) {
@@ -1676,25 +1697,101 @@
                        default:
                    }
                }
                sWhere += "  and HBillSubType<>'SUB'";
                get_Display(sWhere);
                sWhere += "  and HBillSubType<>''SUB''";
                get_DisplayPage(sWhere);
                sWhere = "";//调用接口后清空sWhere缓存
            }
            //#region åˆ†é¡µæŸ¥è¯¢
            function get_DisplayPage(sWhere) {
                var wait = layer.load();//遮罩
                var ajaxLoad = layer.load();
                $.ajax({
                    url: GetWEBURL() + '/Cj_StationOutBill/page',
                    type: "GET",
                    data: { "sWhere": sWhere, "user": sessionStorage["HUserName"], "page": page, "size": size },
                    success: function (data1) {
                        option.limit = size;//改变表格页大小
                        if (data1.code == 1) {
                            optionPage.count = data1.count;//改变列表数据总数
                            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 (data[i].name == 'HInterID' || data[i].name == 'HBillType' || data[i].name == 'hmainid') {
                                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: 120 });
                                            break;
                                        default:
                                            col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: true, width: 120 });
                                    }
                                }
                            }
                            option.cols = [col];
                            option.data = data1.data;
                            ins = table.render(option);
                            laypage.render(optionPage);
                            //刷新表格数据
                            DisPlay_HideColumn();
                            layer.close(ajaxLoad);
                            if ($("#ColName option").length < 1) {
                                ColFilter();
                            }
                            //layer.alert("查询成功", { icon: 1 });
                        } else {
                            option.data = [[]]
                            table.render(option);
                            layer.close(ajaxLoad);
                            /*layer.alert(data1.code + data1.Message, { icon: 5 });*/
                        }
                    }, error: function () {
                        layer.close(ajaxLoad);
                        layer.alert("接口请求失败!", { icon: 5 });
                    }
                });
            }
            //#endregion
            //加载网格
            function get_Display(sWhere) {
                //进入页面显示的缓存列表
                var ajaxLoad = layer.load();    
                var wait = layer.load();
                $.ajax({
                    url: GetWEBURL() + '/Cj_StationOutBill/get_Display',
                    type: "GET",
                    url: GetWEBURL() + '/Cj_StationOutBillController/GetSc_StationOutBillList_Json',
                    async: false,    //async用于控制(false)同步和(true)异步,默认的是true,即请求默认的是异步请求
                    data: { "sWhere": sWhere, "HMaker": sessionStorage["HUserName"], "HBillSubType": "3791", "OperationType": OperationType, "ViewName": ViewName },
                    //url: GetWEBURL() + '/Cj_StationOutBill/get_Display',
                    //type: "GET",
                    //data: { "sWhere": sWhere, "user": sessionStorage["HUserName"], "HBillSubType": "3791" },
                    data: { "sWhere": sWhere, "user": sessionStorage["HUserName"], "HBillSubType": "3791" },
                    //success: function (data1) {
                    //    if (data1.count == 0) {
                    //        option.data = [];
                    //        layer.alert(data1.Message, { icon: 5 });
                    //    } else {
                    //        option.data = data1.data;
                    //    }
                    //    table.render(option);
                    //    btnIs();
                    //    if ($("#Comparator").val() == 0 && $("#ColContent").val() == "") {
                    //        ColFilter();
                    //    }
                    //    layer.close(wait);
                    //}, error: function () {
                    //    layer.close(wait);
                    //    layer.alert("接口请求失败!", { icon: 5 });
                    //}
                    success: function (data1) {
                        if (data1.count == 1) {
                            var data = [];
@@ -1702,11 +1799,6 @@
                            //给空的数组赋值
                            for (var key in data1.list) {
                                data.push({ "id": data1.list[key].ColmCols, "name": data1.list[key].ColmCols, "Type": data1.list[key].ColmType });
                                //获取不需要显示的列(H开头的列不显示)
                                var patrn = new RegExp(/^h/i);
                                if (patrn.test(data1.list[key].ColmCols)) {
                                    titleData[key] = data1.list[key].ColmCols;
                                }
                            }
                            //在列表左边添加勾选框
                            col.push({ type: 'checkbox', fixed: 'left', totalRowText: '合计' });
WebTM/views/³µ¼ä¹ÜÀí/¹¤ÐòÁ÷ת¿¨/Sc_ProcessExchangeBillList.html
@@ -346,7 +346,8 @@
            var wybj = false;
            var QJQD = 0;//判断器具清单查询列表是否有数据  0没有 1有
            var Organization = sessionStorage["Organization"]
            var page = 1;//分页数据
            var size = 50;
            var ins;                        //用于导出excel
            //#region ã€è¿‡æ»¤æ–¹æ¡ˆã€‘
@@ -581,6 +582,12 @@
            //#region é‡ç½®æŒ‰é’®
            form.on('submit(btnReSearch)', function (data) {
                set_ClearQuery();
                if (page != 1) {
                    $("#page a:eq(1)").get(0).click();//点击分页栏第一页
                } else {
                    get_FastQuery();
                }
            });
            //#endregion
@@ -655,6 +662,8 @@
            //#region é‡ç½®è¿‡æ»¤æ¡ä»¶æ–¹æ³•
            function set_ClearQuery() {
                $("#SHPrintQty").val("");//打印状态
                $("#HWorkBillNo").val("");//任务号
                $("#HDeptName").val("0");//生产车间
                $("input[type='checkbox'][name='wybj']").prop('checked', false);
                form.render("checkbox");//委外标记
@@ -669,7 +678,7 @@
                $("#ColContent").val("");
                $("#ColName").val("0");
                $("#Comparator").val("0");
                $("#ColContent1").val("");
                $("#ColName1").val("0");
                $("#Comparator1").val("0");
@@ -712,19 +721,19 @@
                    var com = "";
                    switch (Comparator) {
                        case "7":
                            com = "like'%" + ColContent + "%'";
                            com = "like''%" + ColContent + "%''";
                            break;
                        case "8":
                            com = "like'%" + ColContent + "'";
                            com = "like''%" + ColContent + "''";
                            break;
                        case "9":
                            com = "like'" + ColContent + "%'";
                            com = "like''" + ColContent + "%''";
                            break;
                        case "10":
                            com = "not like'%" + ColContent + "%'";
                            com = "not like''%" + ColContent + "%''";
                            break;
                        default:
                            com = "" + Comparator + "'" + ColContent + "'";
                            com = "" + Comparator + "''" + ColContent + "''";
                            break;
                    }
                    sWhere += " and " + ColName + " " + com;
@@ -734,19 +743,19 @@
                    var com1 = "";
                    switch (Comparator1) {
                        case "7":
                            com1 = "like'%" + ColContent1 + "%'";
                            com1 = "like''%" + ColContent1 + "%''";
                            break;
                        case "8":
                            com1 = "like'%" + ColContent1 + "'";
                            com1 = "like''%" + ColContent1 + "''";
                            break;
                        case "9":
                            com1 = "like'" + ColContent1 + "%'";
                            com1 = "like''" + ColContent1 + "%''";
                            break;
                        case "10":
                            com1 = "not like'%" + ColContent1 + "%'";
                            com1 = "not like''%" + ColContent1 + "%''";
                            break;
                        default:
                            com1 = "" + Comparator1 + "'" + ColContent1 + "'";
                            com1 = "" + Comparator1 + "''" + ColContent1 + "''";
                            break;
                    }
                    sWhere += " and " + ColName1 + " " + com1;
@@ -756,19 +765,19 @@
                    var com2 = "";
                    switch (Comparator2) {
                        case "7":
                            com2 = "like'%" + ColContent2 + "%'";
                            com2 = "like''%" + ColContent2 + "%''";
                            break;
                        case "8":
                            com2 = "like'%" + ColContent2 + "'";
                            com2 = "like''%" + ColContent2 + "''";
                            break;
                        case "9":
                            com2 = "like'" + ColContent2 + "%'";
                            com2 = "like''" + ColContent2 + "%''";
                            break;
                        case "10":
                            com2 = "not like'%" + ColContent2 + "%'";
                            com2 = "not like''%" + ColContent2 + "%''";
                            break;
                        default:
                            com2 = "" + Comparator2 + "'" + ColContent2 + "'";
                            com2 = "" + Comparator2 + "''" + ColContent2 + "''";
                            break;
                    }
                    sWhere += " and " + ColName2 + " " + com2;
@@ -786,45 +795,45 @@
                    }
                }
                if (wybj) {
                    sWhere += " and å§”外标记 = 'Y'";
                    sWhere += " and å§”外标记 = ''Y''";
                }
                if (HDate) {
                    sWhere += " and CONVERT(varchar(100),日期, 23)  >= '" + HDate + "'";
                    sWhere += " and CONVERT(varchar(100),日期, 23)  >= ''" + HDate + "''";
                }
                if (HDate1) {
                    sWhere += " and CONVERT(varchar(100),日期, 23)  <= '" + HDate1 + "'";
                    sWhere += " and CONVERT(varchar(100),日期, 23)  <= ''" + HDate1 + "''";
                }
                if (HWorkBillNo) {
                    sWhere += " and ç”Ÿäº§è®¢å•号 like '%" + HWorkBillNo + "%'";
                    sWhere += " and ç”Ÿäº§è®¢å•号 like ''%" + HWorkBillNo + "%''";
                }
                if (HOrderProcNO) {
                    sWhere += " and è®¢å•跟踪号 like '%" + HOrderProcNO + "%'";
                    sWhere += " and è®¢å•跟踪号 like ''%" + HOrderProcNO + "%''";
                }
                if (SHname) {
                    sWhere += " and  å­ä»¶ä»£ç  like '%" + SHname + "%'";
                    sWhere += " and  å­ä»¶ä»£ç  like ''%" + SHname + "%''";
                }
                if (HBillNo) {
                    sWhere += " and å•据号 like '%" + HBillNo + "%'"
                    sWhere += " and å•据号 like ''%" + HBillNo + "%''"
                }
                if (HDeptName != "0") {
                    sWhere += " and HWorkShopID like '%" + HDeptName + "%'"
                    sWhere += " and HWorkShopID like ''%" + HDeptName + "%''"
                }
                if (HErpID) {
                    sWhere += " and å”¯ä¸€ID like '%" + HErpID + "%'";
                    sWhere += " and å”¯ä¸€ID like ''%" + HErpID + "%''";
                }
                if (HBatchNo) {
                    sWhere += " and æ‰¹æ¬¡å· like '%" + HBatchNo + "%'";
                    sWhere += " and æ‰¹æ¬¡å· like ''%" + HBatchNo + "%''";
                }
                if (number==2) {
                    if (HProject) {
                        sWhere += " and é¡¹ç›®å· like '%" + HProject + "%'";
                        sWhere += " and é¡¹ç›®å· like ''%" + HProject + "%''";
                    }
                }
                //根据用户过滤用户关联客户的记录
                sWhere += getSWhereByHUser();
                get_Display(sWhere);
                get_DisplayPage(sWhere);
                sWhere = "";//调用接口后清空sWhere缓存
            }
            //#endregion
@@ -845,6 +854,70 @@
            });
            //#endregion
            //#region åˆ†é¡µæŸ¥è¯¢
            function get_DisplayPage(sWhere) {
                var wait = layer.load();//遮罩
                var ajaxLoad = layer.load();
                $.ajax({
                    url: GetWEBURL() + '/Sc_ProcessExchangeBillList/page',
                    type: "GET",
                    data: { "sWhere": sWhere, "user": sessionStorage["HUserName"], "page": page, "size": size },
                    success: function (data1) {
                        option.limit = size;//改变表格页大小
                        if (data1.code == 1) {
                            optionPage.count = data1.count;//改变列表数据总数
                            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 (data[i].name == 'HInterID' || data[i].name == 'HBillType' || data[i].name == 'hmainid') {
                                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: 120 });
                                            break;
                                        default:
                                            col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: true, width: 120 });
                                    }
                                }
                            }
                            option.cols = [col];
                            option.data = data1.data;
                            ins = table.render(option);
                            laypage.render(optionPage);
                            //刷新表格数据
                            DisPlay_HideColumn();
                            layer.close(ajaxLoad);
                            if ($("#ColName option").length < 1) {
                                ColFilter();
                            }
                            //layer.alert("查询成功", { icon: 1 });
                        } else {
                            option.data = [[]]
                            table.render(option);
                            layer.close(ajaxLoad);
                            /*layer.alert(data1.code + data1.Message, { icon: 5 });*/
                        }
                    }, error: function () {
                        layer.close(ajaxLoad);
                        layer.alert("接口请求失败!", { icon: 5 });
                    }
                });
            }
            //#endregion
            //查询子表数据
@@ -1239,7 +1312,28 @@
                    //    , { field: '包装标识编码', title: '包装标识编码', width: 80 }
                    ]]
                };
                //table.render(option);
                optionPage = {
                    elem: 'page', //注意,这里的 page æ˜¯ ID,不用加 # å·
                    count: 10000, //数据总数,从服务端得到
                    limit: 50,
                    limits: [50, 500, 5000, 50000],
                    layout: ['count', 'prev', 'page', 'next', 'limit', 'skip'],
                    jump: function (obj, first) {
                        //console.log(obj)
                        //obj包含了当前分页的所有参数,比如:
                        //console.log(obj.curr); //得到当前页,以便向服务端请求对应页的数据。
                        //console.log(obj.limit); //得到每页显示的条数
                        //首次不执行
                        if (!first) {
                            //do something
                            page = obj.curr;
                            size = obj.limit;
                            get_FastQuery();
                        }
                    }
                }
                laypage.render(optionPage);
            }
            //初始化从表列表  å·¥è‰ºæµç¨‹
WebTM/views/³µ¼ä¹ÜÀí/¹¤ÐòÁ÷ת¿¨/Sc_ProcessExchangeBill_BatchSplit.html
@@ -16,7 +16,6 @@
    <script src="../../../layuiadmin/PubCustom.js"></script>
    <script src="../../../layuiadmin/zgqCustom/zgqCustom.js"></script>
    <script src="../../../layuiadmin/PageTitle.js"></script>
    <script src="../../../layuiadmin/grwebapp.js"></script>
    <style type="text/css">
        .layui-form-item .layui-inline {
            margin-right: 0;
@@ -52,8 +51,7 @@
                    <div class="layui-card-header">
                        <div class="layui-btn-group">
                            <button type="button" id="add-btn" class="layui-btn layui-btn-normal layui-btn-radius" lay-submit="" lay-filter="Saver">保存</button>
                            <button type="button" id="print-btn" class="layui-btn layui-btn-normal layui-btn-radius layui-btn-disabled" lay-submit="" lay-filter="get_Print" disabled>打印</button>
                            <button type="button" id="batchPrint-btn" class="layui-btn layui-btn-normal layui-btn-radius layui-btn-disabled" lay-submit="" lay-filter="get_BatchPrint" disabled>批量打印</button>
                            <button type="button" id="print-btn" class="layui-btn layui-btn-normal layui-btn-radius layui-btn-disabled" lay-submit="" lay-filter="get_BatchPrint" disabled>打印</button>
                            <button type="button" class="layui-btn layui-btn-normal layui-btn-radius" lay-submit="" lay-filter="Exit" style="margin-left:50px !important;">退出</button>
                        </div>
                    </div>
@@ -241,15 +239,10 @@
            });
            //打印
            form.on('submit(get_Print)', function () {
                get_Print();
            })
            //批量打印
            form.on('submit(get_BatchPrint)', function () {
                get_BatchPrint();
            })
            //退出按钮
            form.on('submit(Exit)', function () {
                if (params[1] != null) {
@@ -274,8 +267,7 @@
                        , { type: 'numbers', title: '序号', width: 100, totalRow: true }
                        , { field: 'HICMOInterID', title: '生产订单内码', width: 100, hide: true }//生产订单内码
                        , { field: 'HICMOEntryID', title: '生产订单子内码', width: 100, hide: true }//生产订单子内码
                        , { field: 'HICMOBillNo', title: '生产订单内码', width: 120 }//生产订单号
                        , { field: 'HWorkShopID', title: '生产车间', width: 100, hide: true }//生产车间内码
                        , { field: 'HICMOBillNo', title: '生产订单', width: 120 }//生产订单号
                        , { field: 'HMaterID', title: 'HMaterID', width: 100, hide: true }
                        , { field: '物料代码', title: '物料代码', width: 150 }
                        , { field: '物料名称', title: '物料名称', width: 150 }
@@ -283,7 +275,6 @@
                        , { field: 'HQty', title: '订单总数', width: 110 }
                        , { field: 'HFinishQty', title: '已生成流转卡数', width: 130 }
                        , { field: 'HUsableQty', title: '剩余可用数量', width: 130 }
                        , { field: 'HLotcardQty', title: '单张流转卡数', width: 130 }
                        , { field: 'HProQty', title: '流转卡数量', width: 110, edit: 'text' }
                        , { field: 'HBatchNo', title: '批号', width: 110, edit: 'text' }
                        , { field: 'HGroupNumber', title: '班组', width: 110, edit: 'text' }
@@ -300,8 +291,8 @@
                //初始表格数据
                var rowdata = [{
                    "HICMOInterID": 0, "HICMOEntryID": 0, "HICMOBillNo": "", "HWorkShopID": 0, "HMaterID": 0, "物料代码": ""
                    , "物料名称": "", "规格型号": "", "HQty": 0, "HFinishQty": 0, "HUsableQty": 0, "HLotcardQty": 0
                    "HICMOInterID": 0, "HICMOEntryID": 0, "HICMOBillNo": "", "HMaterID": 0, "物料代码": ""
                    , "物料名称": "", "规格型号": "", "HQty": 0, "HFinishQty": 0, "HUsableQty": 0
                    , "HProQty": 0, "HRoutingInterID": 0, "HRoutingName": "", "HSheetQty": 0
                    , "HInterID": 0, "HBillNo": "", "HBatchNo": "", "HBatchManager": "", "HGroupNumber": ""
                }];
@@ -341,13 +332,11 @@
                                rowdata.push(
                                    {
                                        "HICMOInterID": subdata[i].HICMOInterID, "HICMOEntryID": subdata[i].HICMOEntryID, "HICMOBillNo": subdata[i].HICMOBillNo
                                        , "HWorkShopID": subdata[i].HWorkShopID, "HMaterID": subdata[i].HMaterID, "物料代码": subdata[i].物料代码
                                        , "物料名称": subdata[i].物料名称
                                        , "HMaterID": subdata[i].HMaterID, "物料代码": subdata[i].物料代码, "物料名称": subdata[i].物料名称
                                        , "规格型号": subdata[i].规格型号, "HQty": subdata[i].HQty, "HFinishQty": subdata[i].HFinishQty
                                        , "HUsableQty": subdata[i].HUsableQty, "HLotcardQty": subdata[i].HLotcardQty, "HProQty": subdata[i].HProQty
                                        , "HRoutingInterID": subdata[i].HRoutingInterID, "HRoutingName": subdata[i].HRoutingName, "HSheetQty": subdata[i].HSheetQty
                                        , "HDate": formatDate(subdata[i].HDate), "HInterID": HInterID, "HBillNo": HBillNo, "HBatchNo": subdata[i].HBatchNo
                                        , "HBatchManager": subdata[i].是否启用批次, "HGroupNumber": ""
                                        , "HUsableQty": subdata[i].HUsableQty, "HProQty": subdata[i].HProQty, "HRoutingInterID": subdata[i].HRoutingInterID
                                        , "HRoutingName": subdata[i].HRoutingName, "HSheetQty": subdata[i].HSheetQty, "HDate": formatDate(subdata[i].HDate)
                                        , "HInterID": HInterID, "HBillNo": HBillNo, "HBatchNo": "", "HBatchManager": subdata[i].是否启用批次, "HGroupNumber": ""
                                    }
                                )
                            }
@@ -363,7 +352,6 @@
                                    , { field: 'HICMOInterID', title: '生产订单内码', width: 100, hide: true }//生产订单内码
                                    , { field: 'HICMOEntryID', title: '生产订单子内码', width: 100, hide: true }//生产订单子内码
                                    , { field: 'HICMOBillNo', title: '生产订单', width: 120 }//生产订单号
                                    , { field: 'HWorkShopID', title: '生产车间内码', width: 100, hide: true }//生产车间内码
                                    , { field: 'HMaterID', title: 'HMaterID', width: 100, hide: true }
                                    , { field: '物料代码', title: '物料代码', width: 150 }
                                    , { field: '物料名称', title: '物料名称', width: 150 }
@@ -371,7 +359,6 @@
                                    , { field: 'HQty', title: '订单总数', width: 110 }
                                    , { field: 'HFinishQty', title: '已生成流转卡数', width: 130 }
                                    , { field: 'HUsableQty', title: '剩余可用数量', width: 130 }
                                    , { field: 'HLotcardQty', title: '单张流转卡数', width: 130 }
                                    , { field: 'HProQty', title: '流转卡数量', width: 110, edit: 'text' }
                                    , { field: 'HBatchNo', title: '批号', width: 110, edit: 'text' }
                                    , { field: 'HGroupNumber', title: '班组', width: 110, edit: 'text' }
@@ -458,7 +445,6 @@
                        if (data.count == 1) { // è¯´æ˜ŽéªŒè¯æˆåŠŸäº†ï¼Œ
                            layer.msg(data.Message, { icon: 1 });
                            $('#print-btn').removeClass("layui-btn-disabled").attr("disabled", false);//打印按钮启用
                            $('#batchPrint-btn').removeClass("layui-btn-disabled").attr("disabled", false);//批量打印按钮启用
                            layer.close(index);
                        }
                        else {
@@ -491,7 +477,7 @@
                                , shift: 2 //弹出动画
                                , area: ["90%", "90%"] //窗体大小
                                , maxmin: true //设置最大最小按钮是否显示
                                , content: ['../../计划管理/工艺路线/Gy_RoutingBillList.html?HMaterID=' + obj.data.HMaterID + '&HProID=' + 0, 'yes']
                                , content: ["../../计划管理/工艺路线/Gy_RoutingBillList.html", "yes"]
                                , btn: ["确定", "取消"]
                                , btn1: function (index, laero) {
                                    //按钮一  çš„回调
@@ -519,7 +505,7 @@
            }
            //打印
            function get_Print() {
            function get_BatchPrint() {
                var checkStatus = table.checkStatus('mainTable')
                    , data = checkStatus.data;
                if (checkStatus.data.length >= 1) {
@@ -543,91 +529,6 @@
                else {
                    layer.msg('请选择要打印的流转卡!');
                }
            }
            //批量打印
            var time;
            var num = 0;
            function get_BatchPrint() {
                var checkStatus = table.checkStatus('mainTable')
                    , data = checkStatus.data;
                if (checkStatus.data.length > 0) {
                    //逻辑删除方法
                    layer.confirm("确认要批量打印吗?", { title: "确认" }, function (index) {
                        time = setInterval(function () {
                            dy_PL(data);
                        }, 1000);
                        //关闭当前frame
                        layer.close(index);
                    })
                }
                else {
                    layer.msg('请选择数据打印!');
                }
            }
            function dy_PL(rest) {
                var HInterID = rest[num].HInterID.toString();
                var sWhere = "select cast( b.流水号 as float) æµæ°´å·,生产订单号,a.生产数量,a.流转卡数量,a.产品代码,a.单据号,case when ISNULL(a.生产规格,'')='' then a.产品规格 else a.生产规格 end äº§å“è§„æ ¼,a.产品名称,a.日期,a.单据号,b.工序代码,b.工序名称,a.批号,b.工艺工作中心,b.工艺工艺参数,a.生产车间,b.工段名称,b.生产订单数量 from h_v_Sc_ProcessExchangeBillQuery a left join h_v_Sc_ProcessExchangeBillQuerySub b on a.hmainid=b.hmainid   where b.hmainid in(" + HInterID + ") and b.工序代码 != '9999' order by cast(b.流水号 as int)"
                $.ajax({
                    type: "GET",
                    url: GetWEBURL() + "/Gy_SOPBillList/WindowPrintList", //方法所在页面和方法名
                    async: false,
                    data: { "sWhere": sWhere },
                    success: function (data) {
                        if (data.count == 1) { // è¯´æ˜ŽéªŒè¯æˆåŠŸäº†ï¼Œ
                            if (data.data.length != 0) {
                                var dataPrint = [];
                                for (var i = 0; i < data.data.length; i++) {
                                    data.data[i]["流水号"] = data.data[i]["流水号"].toFixed(1);
                                    dataPrint.push(data.data[i])
                                }
                                var Customer = {
                                    "Table": dataPrint
                                }
                                var args = {
                                    type: "print",//打印模式
                                    //type: "preview",//预览模式
                                    showOptionDlg: false, //如果不显示打印对话框而直接打印,将此行注释去掉即可
                                    report: urlAddRandomNo("../../grf/流转卡JSON.grf"),
                                    data: Customer
                                };
                                console.log(data.data[0].单据号);
                                //var args = {
                                //    report: urlAddRandomNo("../../grf/cs10.grf"),
                                //    data: Customer
                                //};
                                webapp_ws_ajax_run(args);
                                if (rest.length <= num + 1) {
                                    num = 0;
                                    clearInterval(time);
                                } else {
                                    num++;
                                }
                            } else {
                                layer.msg("查无数据!");
                            }
                        }
                        else {
                            layer.msg(data.Message, { icon: 5 });
                        }
                        layer.closeAll("loading");
                    },
                    error: function (err) {
                        layer.msg("错误:" + err, { icon: 5 });
                    }
                })
            }
            //表格行内事件删除