WebTM/views/Éú²ú¹¤Ðò¹ÜÀí/¹¤ÐòÅɹ¤µ¥/Sc_ProcessSendWorkList.html
@@ -66,12 +66,13 @@
                        <script type="text/html" id="toolbarDemo">
                            <div class="layui-btn-container">
                                <!--<button type="button" class="layui-btn layui-btn-sm" lay-event="btn-getCheckData"><i class="layui-icon layui-icon-tips"></i>预览</button>-->
                                <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-reload"><i class="layui-icon layui-icon-refresh"></i>刷新</button>
                                <!--<button type="button" class="layui-btn layui-btn-sm" lay-event="btn-reload"><i class="layui-icon layui-icon-refresh"></i>刷新</button>
                                <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-confirm" id="btn_confirm"><i class="layui-icon layui-icon-ok-circle"></i>确认</button>
                                <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-back" id="btn_back"><i class="layui-icon layui-icon-close-fill"></i>驳回</button>
                                <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-details"><i class="layui-icon layui-icon-form"></i>详情</button>
                                <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-generate"><i class="layui-icon layui-icon-file"></i>生成送货单</button>
                                <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-exit"><i class="layui-icon layui-icon-return"></i>退出</button>
                                <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-exit"><i class="layui-icon layui-icon-return"></i>退出</button>-->
                                <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-Pushdown"><i class="layui-icon layui-icon-form"></i>下推</button>
                            </div>
                        </script>
@@ -103,73 +104,127 @@
            var option = {
                elem: '#mainTable'
                //, toolbar: '#toolbarDemo'
                , toolbar: '#toolbarDemo'
                ,height: 'full-50' 
                , page: true
                ,cellMinWidth: 90
                , cols: [[
                    //{ field: 'hmainid', title: 'hmainid', sort: true, width: 165 }
                       { type: 'checkbox' }
                     ,{ field: 'HDate', title: '日期', sort: true, width: 120 }
                    , { field: 'HBillNo', title: '单据号', sort: true, width: 170 }
                    , { field: 'HBillStatus ', title: '单据状态', width: 105 }
                    , { field: 'HICMOBillNo', title: '任务单号' }
                    , { field: 'HCheckItemNowID', title: '当前审核项目' }
                    , { field: 'HCheckItemNextID', title: '待审核项目' }
                    , { field: 'HCheckFlowID', title: '审批流' }
                    , { field: 'HICMOInterID', title: '任务单ID', width: 115 }
                    , { field: 'HProcPlanBillNo', title: '工序计划单号', width: 115 }
                    , { field: 'HPlanBeginDate', title: '工序计划开工日期' }
                    , { field: 'HPlanEndDate', title: '工序计划完工日期', width: 160 }
                    , { field: 'HBatchNo', title: '批号', width: 160 }
                    , { field: 'HSeOrderInterID ', title: '销售订单主ID', width: 215 }
                    ////, { field: 'hunitid', title: 'hunitid' }
                    , { field: 'HSeOrderEntryID ', title: '销售子ID ', width: 115 }
                    , { field: 'HSeOrderBillNo', title: '销售订单号' }
                    ////, { field: 'hempid', title: 'hempid' }
                    , { field: 'HProcID   ', title: '工序ID', width: 100 }
                    , { field: 'HProcNumber', title: '工序代码' }
                    , { field: 'HDeptID', title: '部门ID' }
                    , { field: 'HDeptNumber', title: '部门代码' }
                    , { field: 'HGroupID', title: '班组ID' }
                    ////, { field: 'HCenterID', title: 'HCenterID' }
                    , { field: 'HGroupNumber', title: '班组代码' }
                    , { field: 'HMaterID ', title: '产品ID' }
                    ////, { field: 'hbomid', title: 'hbomid' }
                    , { field: 'HMaterNumber', title: '产品代码' }
                    ////, { field: 'HRoutingInterID', title: 'HRoutingInterID' }
                    , { field: 'HUnitID   ', title: '单位ID' }
                    , { field: 'HUnitNumber', title: '单位代码' }
                    , { field: 'HRoutingInterID', title: '工序路线ID' }
                    , { field: 'HPlanQty', title: '工序计划生产数量' }
                    , { field: 'HExplanation', title: '摘要' }
                    , { field: 'HInnerBillNo', title: '内部单据号' }
                    , { field: 'HBacker', title: '退回人' }
                    , { field: 'HBackDate', title: '退回日期 ' }
                    , { field: 'HChecker', title: '审核人' }
                    , { field: 'HCheckDate', title: '审核日期' }
                    , { field: 'HMaker', title: '制单人' }
                    ////, { field: 'hsubid', title: 'hsubid' }
                    , { field: 'HMakeDate', title: '制单日期' }
                    , { field: 'HUpDater', title: '修改人' }
                    , { field: 'HUpDateDate', title: '修改日期' }
                    , { field: 'HCloseMan', title: '关闭人' }
                    , { field: 'HCloseDate', title: '关闭日期' }
                    , { field: 'HCloseType', title: '关闭类型 ' }
                    , { field: 'HDeleteMan', title: '作废人' }
                    , { field: 'HDeleteDate', title: '作废日期' }
                    //, { field: '修改日期', title: '修改日期' }
                    //, { field: 'HDeleteMan', title: '关闭人' }
                    //, { field: '关闭日期', title: '关闭日期' }
                    //, { field: '作废人', title: '作废人' }
                    //, { field: '作废日期', title: '作废日期' }
                    //, { field: '行关闭人', title: '行关闭人' }
                    //, { field: '关闭类型', title: '关闭类型' }
                    //, { field: '单据类型', title: '单据类型' }
                    //, { field: '计划跟踪号', title: '计划跟踪号' }
                     { type: 'checkbox' }
                     ,{ field: 'hmainid', title: 'hmainid', sort: true, fixed: true, hide: true }
                     ,{ field: '日期', title: '日期', sort: true, width: 120 }
                    , { field: '单据号', title: '单据号', sort: true, width: 170 }
                    , { field: 'HDeptID ', title: 'HDeptID', width: 105 }
                    , { field: '部门代码', title: '部门代码' }
                    , { field: '部门', title: '部门' }
                    , { field: 'HMaterID', title: 'HMaterID' }
                    , { field: '物料代码', title: '物料代码' }
                    , { field: '物料名称', title: '物料名称', width: 115 }
                    , { field: '规格型号', title: '规格型号', width: 115 }
                    , { field: 'HUnitID', title: 'HUnitID' }
                    , { field: '计量单位代码', title: '计量单位代码', width: 160 }
                    , { field: '计量单位', title: '计量单位', width: 160 }
                    , { field: 'HprocID ', title: 'HprocID', width: 215 }
                    , { field: '工序代码 ', title: '工序代码 ', width: 115 }
                    , { field: '工序', title: '工序' }
                    , { field: 'HGroupID   ', title: 'HGroupID', width: 100 }
                    , { field: '班组代码', title: '班组代码' }
                    , { field: '班组名称', title: '班组名称' }
                    , { field: 'HSourceID', title: 'HSourceID' }
                    , { field: '资源代码', title: '资源代码' }
                    , { field: '生产资源', title: '生产资源' }
                    , { field: 'HWorkerID ', title: 'HWorkerID' }
                    , { field: '职员代码', title: '职员代码' }
                    , { field: '职员   ', title: '职员' }
                    , { field: 'hsubid', title: 'hsubid', hide: true }
                    , { field: '数量', title: '数量' }
                    , { field: '计划开工日期', title: '计划开工日期' }
                    , { field: '计划完工日期', title: '计划完工日期' }
                    , { field: '计划工时', title: '计划工时' }
                    , { field: '表体备注', title: '表体备注' }
                    , { field: 'HICMOInterID', title: 'HICMOInterID ' }
                    , { field: '生产任务单号', title: '生产任务单号' }
                    , { field: 'HSeOrderInterID', title: 'HSeOrderInterID' }
                    , { field: '销售订单号', title: '销售订单号' }
                    , { field: '表头备注', title: '表头备注' }
                    , { field: '制单人', title: '制单人' }
                    , { field: '制单日期', title: '制单日期' }
                    , { field: '审核人', title: '审核人' }
                    , { field: '审核日期', title: '审核日期' }
                    , { field: '修改人', title: '修改人 ' }
                    , { field: '修改日期', title: '修改日期' }
                    , { field: '关闭人', title: '关闭人' }
                    , { field: '关闭日期', title: '关闭日期' }
                    , { field: '作废人', title: '作废人' }
                    , { field: '作废日期', title: '作废日期' }
                    , { field: '源单主内码', title: '源单主内码' }
                    , { field: '源单子内码', title: '源单子内码' }
                    , { field: '源单单号', title: '源单单号' }
                    , { field: '源单类型', title: '源单类型' }
                    , { field: '行关闭人', title: '行关闭人' }
                    , { field: 'HBillType', title: 'HBillType' }
                    , { field: 'HQtyDecimal', title: 'HQtyDecimal' }
                    , { field: 'HPriceDecimal', title: 'HPriceDecimal' }
                ]]
            };
              //头工具栏事件
            table.on('toolbar(mainTable)', function (obj) {
                var checkStatus = table.checkStatus(obj.config.id);
                switch (obj.event) {
                    case 'btn-Pushdown':
                        var checkStatus = table.checkStatus('mainTable')
                        , data = checkStatus.data;
                        ajaxLabelData = data;
                        var rows = '';
                        var HEntry = '';
                          for (var i = 0; i < data.length; i++) {
                                rows += data[i].hmainid.toString() + ',' ;
                        }
                        if (checkStatus.data.length < 1)
                        {
                            layer.msg('请选择一行数据下推');
                        } else
                        {
            //页面层
            layer.open({
                           type: 2 //page层类型
                           ,area: ['100%', '100%']
                           ,title: '新增工序汇报单'
                           ,shade: 0.6 //遮罩透明度
                           ,maxmin: false //允许全屏最小化
                    , anim: 0 //0-6的动画形式,-1不开启
                    , content: ['../工序汇报单/Sc_Add_ProcessReportList.html?hinterid=' + data[0].hmainid.toString() + '&lentryid=' + rows.toString().substring(0, rows.length - 1),
                        '&PlanBeginDate=' + data[0].计划开工日期.toString(), '&PlanEndDate=' + data[0].计划完工日期.toString(),
                        'yes']
                    , resize: false
                   , cancel: function () {
                                //$(".layui-btn").removeclass("layui-btn-disabled");
                            }
                       });
                        }
                        break;
                    case 'add':
                        var date = new Date();
                        var day = date.getDate();
                        var month = date.getMonth() + 1;
                        var year = date.getFullYear();
                        var shijian = year + "/" + month + "/" + day;
                        layer.msg(shijian);
                        break;
                    case '':
                        layer.msg('');
                        break;
                };
            });
            //进入页面显示的缓存列表
            var index0 = layer.load(0, { shade: false });
            $.ajax({