yusijie
2024-12-25 b2d4264344af1d7f693057039a1e7d691ee1c257
WebTM/views/Éú²ú¹ÜÀí/Éú²ú¼Æ»®Æ½Ì¨/JIT_DayPlanPlatForm_TK.html
@@ -5,14 +5,15 @@
    <title>生产计划排产</title>
    <link rel="stylesheet" href="../../../layuiadmin/layui/css/layui.css" media="all">
    <link rel="stylesheet" href="../../../layuiadmin/style/admin.css" media="all">
    <link rel="stylesheet" href="../../../layuiadmin/ext/soulTable.css" media="all">
    <script src="../../../layuiadmin/layui/layui.js"></script>
    <script src="../../../layuiadmin/Scripts/json2.js"></script>
    <script src="../../../layuiadmin/Scripts/jquery-1.4.1.js"></script>
    <script src="../../../layuiadmin/Scripts/webConfig.js"></script>
    <script src="../../../layuiadmin/PubCustom.js"></script>
    <script src="../../../layuiadmin/zgqCustom/zgqCustom.js"></script>
    <script src="../../../layuiadmin/soulTable.slim.js"></script>
    <script src="../../../layuiadmin/modules//tableFilter2.js"></script>
    <!--<script src="../../../layuiadmin/soulTable.slim.js"></script>--> <!--标题筛选不能引用此js文件-->
    <!--<script src="../../../layuiadmin/modules//tableFilter2.js"></script>--> <!--标题筛选不能引用此js文件-->
</head>
<body>
    <div class="layui-fluid">
@@ -304,6 +305,7 @@
                                <button type="button" class="layui-btn layui-btn-sm" lay-event="set_Routing"><i class="layui-icon layui-icon-form"></i>工艺路线</button>
                                <button type="button" class="layui-btn layui-btn-sm" lay-event="set_Calendar"><i class="layui-icon layui-icon-form"></i>工厂日历</button>
                                <button type="button" class="layui-btn layui-btn-sm" lay-event="get_export" id="get_export"><i class="layui-icon layui-icon-export"></i>导出</button>
                                <button type="button" class="layui-btn layui-btn-sm" lay-event="clearFilter" id="clearFilter"><i class="layui-icon layui-icon-export"></i>清除所有标题筛选条件</button>
                            </div>
                        </script>
                        <script type="text/html" id="toolbarDemo2">
@@ -337,6 +339,7 @@
        base: '../../../layuiadmin/' //静态资源所在路径
    }).extend({
        index: 'lib/index', //主入口模块
        soulTable: '../ext/soulTable'
    }).use(['tree', 'index', 'form', 'table', 'element', 'laypage', 'laydate', 'util', 'soulTable','jquery'], function () {
        //#region å…¬ç”¨å˜é‡
@@ -586,6 +589,14 @@
                //导出excel
                case 'get_export':
                    get_Export();
                    break;
                //清除所有标题筛选
                case 'clearFilter':
                    if (obj.event === 'clearFilter') {
                        // æ¸…除所有筛选条件并重载表格
                        // å‚æ•°: tableId
                        soulTable.clearFilter('mainTable')
                    }
                    break;
            }
        });
@@ -872,205 +883,205 @@
            var oneday = 1000 * 60 * 60 * 24;
            columns.push({ type: 'checkbox', fixed: 'left', sort: true });
            columns.push({ type: 'numbers', field: '序号',title: '序号', sort: true });
            columns.push({ field: '单据号', title: '单据号', hide: true, sort: true });
            columns.push({ field: '销售订单号', title: '销售订单号', width: 150, sort: true });
            columns.push({ field: '生产订单号', title: '生产订单号', width: 150, style: 'background-color: #f9f9f9;', sort: true });
            columns.push({ field: '生产组织', title: '生产组织', width: 150, sort: true });
            columns.push({ field: '物料代码', title: '物料编码', width: 150, sort: true });
            columns.push({ field: '物料名称', title: '物料名称', width: 150, sort: true });
            columns.push({ field: '规格型号', title: '规格型号', width: 150, sort: true });
            columns.push({ field: '小时产能', title: '小时产能', width: 150, sort: true, edit: 'text' });
            columns.push({ field: '销售订单数量', title: '销售订单数量', width: 150, sort: true });//0
            columns.push({ field: '计划数量', title: '生产订单数量', width: 150, sort: true });//0
            columns.push({ field: '日计划数量总量', title: '日计划数量总量', width: 150, sort: true });//0
            columns.push({ field: '今日之前日计划数量', title: '今日之前日计划数量', width: 150, sort: true });//0
            columns.push({ field: '计划开始日期', title: '预计开工日期', width: 150, templet: "<div>{{d.计划开始日期 ==null ?'':layui.util.toDateString(d.计划开始日期, 'yyyy-MM-dd')}}</div>", sort: true });
            columns.push({ field: '计划结束日期', title: '计划结束日期', width: 150, templet: "<div>{{d.计划结束日期 ==null ?'':layui.util.toDateString(d.计划结束日期, 'yyyy-MM-dd')}}</div>", event: "HPlanEndDate", sort: true });
            columns.push({ field: '订单可排数量', title: '订单可排数量', width: 150 });
            columns.push({ field: '拆单数量', title: '拆单数量', width: 150, edit: 'text' });
            columns.push({ field: '昨日数量', title: '昨日数量' });
            columns.push({ field: '优先级', title: '优先级', width: 150, edit: 'text', sort: true });
            columns.push({ field: '生产资源', title: '生产资源', width: 150, edit: 'text', event: "HSourceID" });
            columns.push({ field: '最早开工日期', title: '最早开工日期', width: 150, templet: "<div>{{d.最早开工日期 ==null ?'':layui.util.toDateString(d.最早开工日期, 'yyyy-MM-dd')}}</div>", sort: true });
            columns.push({ type: 'numbers', field: '序号', title: '序号', sort: true, filter: true });
            columns.push({ field: '单据号', title: '单据号', hide: true, sort: true, filter: true});
            columns.push({ field: '销售订单号', title: '销售订单号', width: 150, sort: true, filter: true });
            columns.push({ field: '生产订单号', title: '生产订单号', width: 150, style: 'background-color: #f9f9f9;', sort: true, filter: true });
            columns.push({ field: '生产组织', title: '生产组织', width: 150, sort: true, filter: true });
            columns.push({ field: '物料代码', title: '物料编码', width: 150, sort: true, filter: true });
            columns.push({ field: '物料名称', title: '物料名称', width: 150, sort: true, filter: true });
            columns.push({ field: '规格型号', title: '规格型号', width: 150, sort: true, filter: true });
            columns.push({ field: '小时产能', title: '小时产能', width: 150, sort: true, edit: 'text', filter: true });
            columns.push({ field: '销售订单数量', title: '销售订单数量', width: 150, sort: true, filter: true });//0
            columns.push({ field: '计划数量', title: '生产订单数量', width: 150, sort: true, filter: true });//0
            columns.push({ field: '日计划数量总量', title: '日计划数量总量', width: 150, sort: true, filter: true});//0
            columns.push({ field: '今日之前日计划数量', title: '今日之前日计划数量', width: 150, sort: true, filter: true });//0
            columns.push({ field: '计划开始日期', title: '预计开工日期', width: 150, templet: "<div>{{d.计划开始日期 ==null ?'':layui.util.toDateString(d.计划开始日期, 'yyyy-MM-dd')}}</div>", sort: true, filter: { type: 'date[yyyy-MM-dd HH:mm:ss]' } });
            columns.push({ field: '计划结束日期', title: '计划结束日期', width: 150, templet: "<div>{{d.计划结束日期 ==null ?'':layui.util.toDateString(d.计划结束日期, 'yyyy-MM-dd')}}</div>", event: "HPlanEndDate", sort: true, filter: { type: 'date[yyyy-MM-dd HH:mm:ss]' } });
            columns.push({ field: '订单可排数量', title: '订单可排数量', width: 150, filter: true});
            columns.push({ field: '拆单数量', title: '拆单数量', width: 150, edit: 'text', filter: true});
            columns.push({ field: '昨日数量', title: '昨日数量', filter: true});
            columns.push({ field: '优先级', title: '优先级', width: 150, edit: 'text', sort: true, filter: true });
            columns.push({ field: '生产资源', title: '生产资源', width: 150, edit: 'text', event: "HSourceID", filter: true });
            columns.push({ field: '最早开工日期', title: '最早开工日期', width: 150, templet: "<div>{{d.最早开工日期 ==null ?'':layui.util.toDateString(d.最早开工日期, 'yyyy-MM-dd')}}</div>", sort: true, filter: { type: 'date[yyyy-MM-dd HH:mm:ss]' } });
            columns.push({
                field: Format(myDate.getTime() + 0 * oneday, 'yyyy-MM-dd'), title: Format(myDate.getTime() + 0 * oneday, 'MM.dd'), edit: 'text', width: 70, templet: function (d) {
                field: Format(myDate.getTime() + 0 * oneday, 'yyyy-MM-dd'), title: Format(myDate.getTime() + 0 * oneday, 'MM.dd'), edit: 'text', width: 70, filter: true, templet: function (d) {
                    return DayColor(d[Format(myDate.getTime() + 0 * oneday, 'yyyy/MM/dd')], d[Format(myDate.getTime() + 0 * oneday, 'yyyy-MM-dd')], d, Format(myDate.getTime() + 0 * oneday, 'yyyy-MM-dd'));
                }
            })//0
            columns.push({
                field: Format(myDate.getTime() + 1 * oneday, 'yyyy-MM-dd'), title: Format(myDate.getTime() + 1 * oneday, 'MM.dd'), edit: 'text', width: 70, templet: function (d) {
                field: Format(myDate.getTime() + 1 * oneday, 'yyyy-MM-dd'), title: Format(myDate.getTime() + 1 * oneday, 'MM.dd'), edit: 'text', width: 70, filter: true, templet: function (d) {
                    return DayColor(d[Format(myDate.getTime() + 1 * oneday, 'yyyy/MM/dd')], d[Format(myDate.getTime() + 1 * oneday, 'yyyy-MM-dd')], d, Format(myDate.getTime() + 1 * oneday, 'yyyy-MM-dd'));
                }
            })//0
            columns.push({
                field: Format(myDate.getTime() + 2 * oneday, 'yyyy-MM-dd'), title: Format(myDate.getTime() + 2 * oneday, 'MM.dd'), edit: 'text', width: 70, templet: function (d) {
                field: Format(myDate.getTime() + 2 * oneday, 'yyyy-MM-dd'), title: Format(myDate.getTime() + 2 * oneday, 'MM.dd'), edit: 'text', width: 70, filter: true, templet: function (d) {
                    return DayColor(d[Format(myDate.getTime() + 2 * oneday, 'yyyy/MM/dd')], d[Format(myDate.getTime() + 2 * oneday, 'yyyy-MM-dd')], d, Format(myDate.getTime() + 2 * oneday, 'yyyy-MM-dd'));
                }
            })//0
            columns.push({
                field: Format(myDate.getTime() + 3 * oneday, 'yyyy-MM-dd'), title: Format(myDate.getTime() + 3 * oneday, 'MM.dd'), edit: 'text', width: 70, templet: function (d) {
                field: Format(myDate.getTime() + 3 * oneday, 'yyyy-MM-dd'), title: Format(myDate.getTime() + 3 * oneday, 'MM.dd'), edit: 'text', width: 70, filter: true, templet: function (d) {
                    return DayColor(d[Format(myDate.getTime() + 3 * oneday, 'yyyy/MM/dd')], d[Format(myDate.getTime() + 3 * oneday, 'yyyy-MM-dd')], d, Format(myDate.getTime() + 3 * oneday, 'yyyy-MM-dd'));
                }
            })//0
            columns.push({
                field: Format(myDate.getTime() + 4 * oneday, 'yyyy-MM-dd'), title: Format(myDate.getTime() + 4 * oneday, 'MM.dd'), edit: 'text', width: 70, templet: function (d) {
                field: Format(myDate.getTime() + 4 * oneday, 'yyyy-MM-dd'), title: Format(myDate.getTime() + 4 * oneday, 'MM.dd'), edit: 'text', width: 70, filter: true, templet: function (d) {
                    return DayColor(d[Format(myDate.getTime() + 4 * oneday, 'yyyy/MM/dd')], d[Format(myDate.getTime() + 4 * oneday, 'yyyy-MM-dd')], d, Format(myDate.getTime() + 4 * oneday, 'yyyy-MM-dd'));
                }
            })//0
            columns.push({
                field: Format(myDate.getTime() + 5 * oneday, 'yyyy-MM-dd'), title: Format(myDate.getTime() + 5 * oneday, 'MM.dd'), edit: 'text', width: 70, templet: function (d) {
                field: Format(myDate.getTime() + 5 * oneday, 'yyyy-MM-dd'), title: Format(myDate.getTime() + 5 * oneday, 'MM.dd'), edit: 'text', width: 70, filter: true, templet: function (d) {
                    return DayColor(d[Format(myDate.getTime() + 5 * oneday, 'yyyy/MM/dd')], d[Format(myDate.getTime() + 5 * oneday, 'yyyy-MM-dd')], d, Format(myDate.getTime() + 5 * oneday, 'yyyy-MM-dd'));
                }
            })//0
            columns.push({
                field: Format(myDate.getTime() + 6 * oneday, 'yyyy-MM-dd'), title: Format(myDate.getTime() + 6 * oneday, 'MM.dd'), edit: 'text', width: 70, templet: function (d) {
                field: Format(myDate.getTime() + 6 * oneday, 'yyyy-MM-dd'), title: Format(myDate.getTime() + 6 * oneday, 'MM.dd'), edit: 'text', width: 70, filter: true, templet: function (d) {
                    return DayColor(d[Format(myDate.getTime() + 6 * oneday, 'yyyy/MM/dd')], d[Format(myDate.getTime() + 6 * oneday, 'yyyy-MM-dd')], d, Format(myDate.getTime() + 6 * oneday, 'yyyy-MM-dd'));
                }
            })//0
            columns.push({
                field: Format(myDate.getTime() + 7 * oneday, 'yyyy-MM-dd'), title: Format(myDate.getTime() + 7 * oneday, 'MM.dd'), edit: 'text', width: 70, templet: function (d) {
                field: Format(myDate.getTime() + 7 * oneday, 'yyyy-MM-dd'), title: Format(myDate.getTime() + 7 * oneday, 'MM.dd'), edit: 'text', width: 70, filter: true, templet: function (d) {
                    return DayColor(d[Format(myDate.getTime() + 7 * oneday, 'yyyy/MM/dd')], d[Format(myDate.getTime() + 7 * oneday, 'yyyy-MM-dd')], d, Format(myDate.getTime() + 7 * oneday, 'yyyy-MM-dd'));
                }
            })//0
            columns.push({
                field: Format(myDate.getTime() + 8 * oneday, 'yyyy-MM-dd'), title: Format(myDate.getTime() + 8 * oneday, 'MM.dd'), edit: 'text', width: 70, templet: function (d) {
                field: Format(myDate.getTime() + 8 * oneday, 'yyyy-MM-dd'), title: Format(myDate.getTime() + 8 * oneday, 'MM.dd'), edit: 'text', width: 70, filter: true, templet: function (d) {
                    return DayColor(d[Format(myDate.getTime() + 8 * oneday, 'yyyy/MM/dd')], d[Format(myDate.getTime() + 8 * oneday, 'yyyy-MM-dd')], d, Format(myDate.getTime() + 8 * oneday, 'yyyy-MM-dd'));
                }
            })//0
            columns.push({
                field: Format(myDate.getTime() + 9 * oneday, 'yyyy-MM-dd'), title: Format(myDate.getTime() + 9 * oneday, 'MM.dd'), edit: 'text', width: 70, templet: function (d) {
                field: Format(myDate.getTime() + 9 * oneday, 'yyyy-MM-dd'), title: Format(myDate.getTime() + 9 * oneday, 'MM.dd'), edit: 'text', width: 70, filter: true, templet: function (d) {
                    return DayColor(d[Format(myDate.getTime() + 9 * oneday, 'yyyy/MM/dd')], d[Format(myDate.getTime() + 9 * oneday, 'yyyy-MM-dd')], d, Format(myDate.getTime() + 9 * oneday, 'yyyy-MM-dd'));
                }
            })//0
            columns.push({
                field: Format(myDate.getTime() + 10 * oneday, 'yyyy-MM-dd'), title: Format(myDate.getTime() + 10 * oneday, 'MM.dd'), edit: 'text', width: 70, templet: function (d) {
                field: Format(myDate.getTime() + 10 * oneday, 'yyyy-MM-dd'), title: Format(myDate.getTime() + 10 * oneday, 'MM.dd'), edit: 'text', width: 70, filter: true, templet: function (d) {
                    return DayColor(d[Format(myDate.getTime() + 10 * oneday, 'yyyy/MM/dd')], d[Format(myDate.getTime() + 10 * oneday, 'yyyy-MM-dd')], d, Format(myDate.getTime() + 10 * oneday, 'yyyy-MM-dd'));
                }
            })//0
            columns.push({
                field: Format(myDate.getTime() + 11 * oneday, 'yyyy-MM-dd'), title: Format(myDate.getTime() + 11 * oneday, 'MM.dd'), edit: 'text', width: 70, templet: function (d) {
                field: Format(myDate.getTime() + 11 * oneday, 'yyyy-MM-dd'), title: Format(myDate.getTime() + 11 * oneday, 'MM.dd'), edit: 'text', width: 70, filter: true, templet: function (d) {
                    return DayColor(d[Format(myDate.getTime() + 11 * oneday, 'yyyy/MM/dd')], d[Format(myDate.getTime() + 11 * oneday, 'yyyy-MM-dd')], d, Format(myDate.getTime() + 11 * oneday, 'yyyy-MM-dd'));
                }
            })//0
            columns.push({
                field: Format(myDate.getTime() + 12 * oneday, 'yyyy-MM-dd'), title: Format(myDate.getTime() + 12 * oneday, 'MM.dd'), edit: 'text', width: 70, templet: function (d) {
                field: Format(myDate.getTime() + 12 * oneday, 'yyyy-MM-dd'), title: Format(myDate.getTime() + 12 * oneday, 'MM.dd'), edit: 'text', width: 70, filter: true, templet: function (d) {
                    return DayColor(d[Format(myDate.getTime() + 12 * oneday, 'yyyy/MM/dd')], d[Format(myDate.getTime() + 12 * oneday, 'yyyy-MM-dd')], d, Format(myDate.getTime() + 12 * oneday, 'yyyy-MM-dd'));
                }
            })//0
            columns.push({
                field: Format(myDate.getTime() + 13 * oneday, 'yyyy-MM-dd'), title: Format(myDate.getTime() + 13 * oneday, 'MM.dd'), edit: 'text', width: 70, templet: function (d) {
                field: Format(myDate.getTime() + 13 * oneday, 'yyyy-MM-dd'), title: Format(myDate.getTime() + 13 * oneday, 'MM.dd'), edit: 'text', width: 70, filter: true, templet: function (d) {
                    return DayColor(d[Format(myDate.getTime() + 13 * oneday, 'yyyy/MM/dd')], d[Format(myDate.getTime() + 13 * oneday, 'yyyy-MM-dd')], d, Format(myDate.getTime() + 13 * oneday, 'yyyy-MM-dd'));
                }
            })//0
            columns.push({
                field: Format(myDate.getTime() + 14 * oneday, 'yyyy-MM-dd'), title: Format(myDate.getTime() + 14 * oneday, 'MM.dd'), edit: 'text', width: 70, templet: function (d) {
                field: Format(myDate.getTime() + 14 * oneday, 'yyyy-MM-dd'), title: Format(myDate.getTime() + 14 * oneday, 'MM.dd'), edit: 'text', width: 70, filter: true, templet: function (d) {
                    return DayColor(d[Format(myDate.getTime() + 14 * oneday, 'yyyy/MM/dd')], d[Format(myDate.getTime() + 14 * oneday, 'yyyy-MM-dd')], d, Format(myDate.getTime() + 14 * oneday, 'yyyy-MM-dd'));
                }
            })//0
            columns.push({
                field: Format(myDate.getTime() + 15 * oneday, 'yyyy-MM-dd'), title: Format(myDate.getTime() + 15 * oneday, 'MM.dd'), edit: 'text', width: 70, templet: function (d) {
                field: Format(myDate.getTime() + 15 * oneday, 'yyyy-MM-dd'), title: Format(myDate.getTime() + 15 * oneday, 'MM.dd'), edit: 'text', width: 70, filter: true, templet: function (d) {
                    return DayColor(d[Format(myDate.getTime() + 15 * oneday, 'yyyy/MM/dd')], d[Format(myDate.getTime() + 15 * oneday, 'yyyy-MM-dd')], d, Format(myDate.getTime() + 15 * oneday, 'yyyy-MM-dd'));
                }
            })//0
            columns.push({
                field: Format(myDate.getTime() + 16 * oneday, 'yyyy-MM-dd'), title: Format(myDate.getTime() + 16 * oneday, 'MM.dd'), edit: 'text', width: 70, templet: function (d) {
                field: Format(myDate.getTime() + 16 * oneday, 'yyyy-MM-dd'), title: Format(myDate.getTime() + 16 * oneday, 'MM.dd'), edit: 'text', width: 70, filter: true, templet: function (d) {
                    return DayColor(d[Format(myDate.getTime() + 16 * oneday, 'yyyy/MM/dd')], d[Format(myDate.getTime() + 16 * oneday, 'yyyy-MM-dd')], d, Format(myDate.getTime() + 16 * oneday, 'yyyy-MM-dd'));
                }
            })//0
            columns.push({
                field: Format(myDate.getTime() + 17 * oneday, 'yyyy-MM-dd'), title: Format(myDate.getTime() + 17 * oneday, 'MM.dd'), edit: 'text', width: 70, templet: function (d) {
                field: Format(myDate.getTime() + 17 * oneday, 'yyyy-MM-dd'), title: Format(myDate.getTime() + 17 * oneday, 'MM.dd'), edit: 'text', width: 70, filter: true, templet: function (d) {
                    return DayColor(d[Format(myDate.getTime() + 17 * oneday, 'yyyy/MM/dd')], d[Format(myDate.getTime() + 17 * oneday, 'yyyy-MM-dd')], d, Format(myDate.getTime() + 17 * oneday, 'yyyy-MM-dd'));
                }
            })//0
            columns.push({
                field: Format(myDate.getTime() + 18 * oneday, 'yyyy-MM-dd'), title: Format(myDate.getTime() + 18 * oneday, 'MM.dd'), edit: 'text', width: 70, templet: function (d) {
                field: Format(myDate.getTime() + 18 * oneday, 'yyyy-MM-dd'), title: Format(myDate.getTime() + 18 * oneday, 'MM.dd'), edit: 'text', width: 70, filter: true, templet: function (d) {
                    return DayColor(d[Format(myDate.getTime() + 18 * oneday, 'yyyy/MM/dd')], d[Format(myDate.getTime() + 18 * oneday, 'yyyy-MM-dd')], d, Format(myDate.getTime() + 18 * oneday, 'yyyy-MM-dd'));
                }
            })//0
            columns.push({
                field: Format(myDate.getTime() + 19 * oneday, 'yyyy-MM-dd'), title: Format(myDate.getTime() + 19 * oneday, 'MM.dd'), edit: 'text', width: 70, templet: function (d) {
                field: Format(myDate.getTime() + 19 * oneday, 'yyyy-MM-dd'), title: Format(myDate.getTime() + 19 * oneday, 'MM.dd'), edit: 'text', width: 70, filter: true, templet: function (d) {
                    return DayColor(d[Format(myDate.getTime() + 19 * oneday, 'yyyy/MM/dd')], d[Format(myDate.getTime() + 19 * oneday, 'yyyy-MM-dd')], d, Format(myDate.getTime() + 19 * oneday, 'yyyy-MM-dd'));
                }
            })//0
            columns.push({
                field: Format(myDate.getTime() + 20 * oneday, 'yyyy-MM-dd'), title: Format(myDate.getTime() + 20 * oneday, 'MM.dd'), edit: 'text', width: 70, templet: function (d) {
                field: Format(myDate.getTime() + 20 * oneday, 'yyyy-MM-dd'), title: Format(myDate.getTime() + 20 * oneday, 'MM.dd'), edit: 'text', width: 70, filter: true, templet: function (d) {
                    return DayColor(d[Format(myDate.getTime() + 20 * oneday, 'yyyy/MM/dd')], d[Format(myDate.getTime() + 20 * oneday, 'yyyy-MM-dd')], d, Format(myDate.getTime() + 20 * oneday, 'yyyy-MM-dd'));
                }
            })//0
            columns.push({
                field: Format(myDate.getTime() + 21 * oneday, 'yyyy-MM-dd'), title: Format(myDate.getTime() + 21 * oneday, 'MM.dd'), edit: 'text', width: 70, templet: function (d) {
                field: Format(myDate.getTime() + 21 * oneday, 'yyyy-MM-dd'), title: Format(myDate.getTime() + 21 * oneday, 'MM.dd'), edit: 'text', width: 70, filter: true, templet: function (d) {
                    return DayColor(d[Format(myDate.getTime() + 21 * oneday, 'yyyy/MM/dd')], d[Format(myDate.getTime() + 21 * oneday, 'yyyy-MM-dd')], d, Format(myDate.getTime() + 21 * oneday, 'yyyy-MM-dd'));
                }
            })//0
            columns.push({
                field: Format(myDate.getTime() + 22 * oneday, 'yyyy-MM-dd'), title: Format(myDate.getTime() + 22 * oneday, 'MM.dd'), edit: 'text', width: 70, templet: function (d) {
                field: Format(myDate.getTime() + 22 * oneday, 'yyyy-MM-dd'), title: Format(myDate.getTime() + 22 * oneday, 'MM.dd'), edit: 'text', width: 70, filter: true, templet: function (d) {
                    return DayColor(d[Format(myDate.getTime() + 22 * oneday, 'yyyy/MM/dd')], d[Format(myDate.getTime() + 22 * oneday, 'yyyy-MM-dd')], d, Format(myDate.getTime() + 22 * oneday, 'yyyy-MM-dd'));
                }
            })//0
            columns.push({
                field: Format(myDate.getTime() + 23 * oneday, 'yyyy-MM-dd'), title: Format(myDate.getTime() + 23 * oneday, 'MM.dd'), edit: 'text', width: 70, templet: function (d) {
                field: Format(myDate.getTime() + 23 * oneday, 'yyyy-MM-dd'), title: Format(myDate.getTime() + 23 * oneday, 'MM.dd'), edit: 'text', width: 70, filter: true, templet: function (d) {
                    return DayColor(d[Format(myDate.getTime() + 23 * oneday, 'yyyy/MM/dd')], d[Format(myDate.getTime() + 23 * oneday, 'yyyy-MM-dd')], d, Format(myDate.getTime() + 23 * oneday, 'yyyy-MM-dd'));
                }
            })//0
            columns.push({
                field: Format(myDate.getTime() + 24 * oneday, 'yyyy-MM-dd'), title: Format(myDate.getTime() + 24 * oneday, 'MM.dd'), edit: 'text', width: 70, templet: function (d) {
                field: Format(myDate.getTime() + 24 * oneday, 'yyyy-MM-dd'), title: Format(myDate.getTime() + 24 * oneday, 'MM.dd'), edit: 'text', width: 70, filter: true, templet: function (d) {
                    return DayColor(d[Format(myDate.getTime() + 24 * oneday, 'yyyy/MM/dd')], d[Format(myDate.getTime() + 24 * oneday, 'yyyy-MM-dd')], d, Format(myDate.getTime() + 24 * oneday, 'yyyy-MM-dd'));
                }
            })//0
            columns.push({
                field: Format(myDate.getTime() + 25 * oneday, 'yyyy-MM-dd'), title: Format(myDate.getTime() + 25 * oneday, 'MM.dd'), edit: 'text', width: 70, templet: function (d) {
                field: Format(myDate.getTime() + 25 * oneday, 'yyyy-MM-dd'), title: Format(myDate.getTime() + 25 * oneday, 'MM.dd'), edit: 'text', width: 70, filter: true, templet: function (d) {
                    return DayColor(d[Format(myDate.getTime() + 25 * oneday, 'yyyy/MM/dd')], d[Format(myDate.getTime() + 25 * oneday, 'yyyy-MM-dd')], d, Format(myDate.getTime() + 25 * oneday, 'yyyy-MM-dd'));
                }
            })//0
            columns.push({
                field: Format(myDate.getTime() + 26 * oneday, 'yyyy-MM-dd'), title: Format(myDate.getTime() + 26 * oneday, 'MM.dd'), edit: 'text', width: 70, templet: function (d) {
                field: Format(myDate.getTime() + 26 * oneday, 'yyyy-MM-dd'), title: Format(myDate.getTime() + 26 * oneday, 'MM.dd'), edit: 'text', width: 70, filter: true, templet: function (d) {
                    return DayColor(d[Format(myDate.getTime() + 26 * oneday, 'yyyy/MM/dd')], d[Format(myDate.getTime() + 26 * oneday, 'yyyy-MM-dd')], d, Format(myDate.getTime() + 26 * oneday, 'yyyy-MM-dd'));
                }
            })//0
            columns.push({
                field: Format(myDate.getTime() + 27 * oneday, 'yyyy-MM-dd'), title: Format(myDate.getTime() + 27 * oneday, 'MM.dd'), edit: 'text', width: 70, templet: function (d) {
                field: Format(myDate.getTime() + 27 * oneday, 'yyyy-MM-dd'), title: Format(myDate.getTime() + 27 * oneday, 'MM.dd'), edit: 'text', width: 70, filter: true, templet: function (d) {
                    return DayColor(d[Format(myDate.getTime() + 27 * oneday, 'yyyy/MM/dd')], d[Format(myDate.getTime() + 27 * oneday, 'yyyy-MM-dd')], d, Format(myDate.getTime() + 27 * oneday, 'yyyy-MM-dd'));
                }
            })//0
            columns.push({
                field: Format(myDate.getTime() + 28 * oneday, 'yyyy-MM-dd'), title: Format(myDate.getTime() + 28 * oneday, 'MM.dd'), edit: 'text', width: 70, templet: function (d) {
                field: Format(myDate.getTime() + 28 * oneday, 'yyyy-MM-dd'), title: Format(myDate.getTime() + 28 * oneday, 'MM.dd'), edit: 'text', width: 70, filter: true, templet: function (d) {
                    return DayColor(d[Format(myDate.getTime() + 28 * oneday, 'yyyy/MM/dd')], d[Format(myDate.getTime() + 28 * oneday, 'yyyy-MM-dd')], d, Format(myDate.getTime() + 28 * oneday, 'yyyy-MM-dd'));
                }
            })//0
            columns.push({
                field: Format(myDate.getTime() + 29 * oneday, 'yyyy-MM-dd'), title: Format(myDate.getTime() + 29 * oneday, 'MM.dd'), edit: 'text', width: 70, templet: function (d) {
                field: Format(myDate.getTime() + 29 * oneday, 'yyyy-MM-dd'), title: Format(myDate.getTime() + 29 * oneday, 'MM.dd'), edit: 'text', width: 70, filter: true, templet: function (d) {
                    return DayColor(d[Format(myDate.getTime() + 29 * oneday, 'yyyy/MM/dd')], d[Format(myDate.getTime() + 29 * oneday, 'yyyy-MM-dd')], d, Format(myDate.getTime() + 29 * oneday, 'yyyy-MM-dd'));
                }
            })//0
            columns.push({
                field: Format(myDate.getTime() + 30 * oneday, 'yyyy-MM-dd'), title: Format(myDate.getTime() + 30 * oneday, 'MM.dd'), edit: 'text', width: 70, templet: function (d) {
                field: Format(myDate.getTime() + 30 * oneday, 'yyyy-MM-dd'), title: Format(myDate.getTime() + 30 * oneday, 'MM.dd'), edit: 'text', width: 70, filter: true, templet: function (d) {
                    return DayColor(d[Format(myDate.getTime() + 30 * oneday, 'yyyy/MM/dd')], d[Format(myDate.getTime() + 30 * oneday, 'yyyy-MM-dd')], d, Format(myDate.getTime() + 30 * oneday, 'yyyy-MM-dd'));
                }
            })//0
            columns.push({ field: '生产订单明细行号', title: '生产订单明细行号', width: 150, sort: true });
            columns.push({ field: 'T31', title: 'T31', width: 70 });//0
            columns.push({ field: '订单类型', title: '订单类型', width: 150, sort: true });
            columns.push({ field: '生产订单单据类型', title: '源单订单单据类型', width: 150, sort: true });
            columns.push({ field: '业务状态', title: '业务状态', width: 150, sort: true });
            columns.push({ field: '产线入库数量', title: '产线入库数量', width: 150, sort: true });
            columns.push({ field: '未排数量', title: '可排数量', width: 150, sort: true });
            columns.push({ field: '订单等级', title: '订单等级', width: 150, sort: true });
            columns.push({ field: '订单交货期', title: '订单交货期', width: 150, templet: "<div>{{d.订单交货期 =='1900-01-01' ?'':layui.util.toDateString(d.订单交货期, 'yyyy-MM-dd')}}</div>", sort: true });
            columns.push({ field: '订单需求数量', title: '订单需求数量', width: 150, sort: true });
            columns.push({ field: '开工余量', title: '开工余量', width: 150, sort: true });
            columns.push({ field: '生产周期', title: '生产周期', width: 150, sort: true });
            columns.push({ field: '最迟开工日期', title: '最迟开工日期', width: 150, templet: "<div>{{d.最迟开工日期 =='' ?'':layui.util.toDateString(d.最迟开工日期, 'yyyy-MM-dd')}}</div>", sort: true });
            columns.push({ field: '最迟完工日期', title: '最迟完工日期', width: 150, templet: "<div>{{d.最迟完工日期 =='' ?'':layui.util.toDateString(d.最迟完工日期, 'yyyy-MM-dd')}}</div>", sort: true });
            columns.push({ field: '生产车间', title: '生产车间', width: 150 });
            columns.push({ field: '源单主内码', title: '源单主内码', width: 150, sort: true });
            columns.push({ field: '源单子内码', title: '源单子内码', width: 150, sort: true });
            columns.push({ field: 'hmainid', title: '日计划工单主码', width: 150, sort: true });
            columns.push({ field: '电压/功率/底板', title: '电压/功率/底板', width: 150, sort: true });
            columns.push({ field: '计量单位', title: '计量单位', width: 150, sort: true });
            columns.push({ field: '拆单数量', title: '拆单数量', width: 150 });//0
            columns.push({ field: '未入库数量', title: '未入库数量', width: 150 });//0
            columns.push({ field: '生产订单明细行号', title: '生产订单明细行号', width: 150, sort: true, filter: true });
            columns.push({ field: 'T31', title: 'T31', width: 70, filter: true});//0
            columns.push({ field: '订单类型', title: '订单类型', width: 150, sort: true, filter: true });
            columns.push({ field: '生产订单单据类型', title: '源单订单单据类型', width: 150, sort: true, filter: true });
            columns.push({ field: '业务状态', title: '业务状态', width: 150, sort: true, filter: true});
            columns.push({ field: '产线入库数量', title: '产线入库数量', width: 150, sort: true, filter: true });
            columns.push({ field: '未排数量', title: '可排数量', width: 150, sort: true, filter: true});
            columns.push({ field: '订单等级', title: '订单等级', width: 150, sort: true, filter: true});
            columns.push({ field: '订单交货期', title: '订单交货期', width: 150, templet: "<div>{{d.订单交货期 =='1900-01-01' ?'':layui.util.toDateString(d.订单交货期, 'yyyy-MM-dd')}}</div>", sort: true, filter: true });
            columns.push({ field: '订单需求数量', title: '订单需求数量', width: 150, sort: true, filter: true });
            columns.push({ field: '开工余量', title: '开工余量', width: 150, sort: true, filter: true });
            columns.push({ field: '生产周期', title: '生产周期', width: 150, sort: true, filter: true});
            columns.push({ field: '最迟开工日期', title: '最迟开工日期', width: 150, templet: "<div>{{d.最迟开工日期 =='' ?'':layui.util.toDateString(d.最迟开工日期, 'yyyy-MM-dd')}}</div>", sort: true, filter: { type: 'date[yyyy-MM-dd HH:mm:ss]' }});
            columns.push({ field: '最迟完工日期', title: '最迟完工日期', width: 150, templet: "<div>{{d.最迟完工日期 =='' ?'':layui.util.toDateString(d.最迟完工日期, 'yyyy-MM-dd')}}</div>", sort: true, filter: { type: 'date[yyyy-MM-dd HH:mm:ss]' } });
            columns.push({ field: '生产车间', title: '生产车间', width: 150, filter: true});
            columns.push({ field: '源单主内码', title: '源单主内码', width: 150, sort: true, filter: true });
            columns.push({ field: '源单子内码', title: '源单子内码', width: 150, sort: true, filter: true });
            columns.push({ field: 'hmainid', title: '日计划工单主码', width: 150, sort: true, filter: true });
            columns.push({ field: '电压/功率/底板', title: '电压/功率/底板', width: 150, sort: true, filter: true});
            columns.push({ field: '计量单位', title: '计量单位', width: 150, sort: true, filter: true });
            columns.push({ field: '拆单数量', title: '拆单数量', width: 150, filter: true });//0
            columns.push({ field: '未入库数量', title: '未入库数量', width: 150 , filter: true});//0
            columns.push({ field: 'HICMOInterID', title: 'HICMOInterID', width: 150, hide: true });
            columns.push({ field: 'HGroupID', title: 'HGroupID', width: 150, hide: true });
            columns.push({ field: 'HGroupName', title: 'HGroupName', width: 150, hide: true });
@@ -1095,7 +1106,7 @@
                , limit: 500//默认显示全部
                , limits: [500,1000,1500,3000,5000,10000,20000]
                , done: function (res, page, count) {
                    soulTable.render(this);
                    $('.layui-table thead').on('click', 'th', function () {
                        // èŽ·å–ç‚¹å‡»çš„è¡¨å¤´çš„ field å€¼
                        var field = $(this).data('field');
@@ -1135,7 +1146,8 @@
                    //for (var i = 0; i < HBackgroundColorIndex.length;i++) {
                    //    $("tr[data-index='" + i + "']").attr({ "style": "background:#F74848;color:black;" });
                    //}
                    //}
                    soulTable.render(this)
                }
            }
        }