ch
2022-11-17 1d32d97bdbd90c9162c67ca38402eef113f6254d
WebTM/views/Éú²ú¹¤Ðò¹ÜÀí/¹¤Ðò»ã±¨µ¥/Sc_ProcessReportList.html
@@ -65,14 +65,13 @@
                        <table class="" id="mainTable" lay-filter="mainTable"></table>
                        <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-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-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>
                            </div>
                        </script>
                    </form>
@@ -80,6 +79,11 @@
            </div>
        </div>
    </div>
    <script type="text/html" id="barDemo">
        <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="detail">查看</a>
        <a class="layui-btn layui-btn-xs" lay-event="edit">编辑</a>
        <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">删除</a>
    </script>
    <script src="../../../layuiadmin/layui/layui.js"></script>
    <script src="../../../layuiadmin/Scripts/json2.js"></script>
    <script src="../../../layuiadmin/Scripts/jquery-1.4.1.js"></script>
@@ -103,77 +107,105 @@
            var option = {
                elem: '#mainTable'
                //, toolbar: '#toolbarDemo'
                ,height: 'full-50'
                , toolbar: '#toolbarDemo'
                , page: true
                ,cellMinWidth: 90
                , cellMinWidth: 90
                , limit: 50
                , limits: [50, 500, 5000, 20000]
                , 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: '生产车间代码', title: '生产车间代码', width: 115 }
                    { type: 'checkbox', fixed: 'left' }
                     ,{fixed: 'left', title:'操作', toolbar: '#barDemo', width:200}
                    , { field: 'hmainid ', title: 'hmainid', width: 105, sort: true, fixed: true, hide: true }
                    ,{ field: '日期', title: '日期', sort: true, width: 120 }
                    , { field: '单据号', title: '单据号', sort: true, width: 170 }
                    , { field: 'HDeptID', title: '部门ID', width: 115 }
                    , { field: 'HDeptNumber', title: '部门代码' }
                    , { field: 'HGroupID', title: '班组ID', width: 160 }
                    , { field: 'HGroupNumber', title: '班组代码', width: 160 }
                    , { field: 'HMaterID ', title: '班组代码', width: 215 }
                    , { field: '部门', title: '部门' }
                    , { field: 'HMaterID', title: 'HMaterID' }
                    , { field: '物料代码', title: '物料代码', width: 160 }
                    , { field: '物料名称', title: '物料名称', width: 160 }
                    , { field: '规格型号 ', title: '规格型号', width: 215 }
                    ////, { field: 'hunitid', title: 'hunitid' }
                    , { field: 'HMaterID ', title: '产品ID ', width: 115 }
                    , { field: 'HMaterNumber', title: '产品代码' }
                    , { field: 'HUnitID ', title: 'HUnitID ', width: 115 }
                    , { field: '单位代码', title: '单位代码' }
                    ////, { field: 'hempid', title: 'hempid' }
                    , { field: 'HUnitID', title: '单位ID', width: 100 }
                    , { field: 'HUnitNumber', title: '单位代码' }
                    , { field: 'HPlanQty', title: '计划数量' }
                    , { field: 'HInStockQty', title: '入库数量' }
                    , { field: 'HSumTimes', title: '总工作时间' }
                    , { field: '单位名称', title: '单位名称', width: 100 }
                    , { field: '表头备注', title: '表头备注' }
                    , { field: 'hsubid', title: 'hsubid' }
                    , { field: 'HEmpID', title: 'HEmpID' }
                    , { field: '职员', title: '职员' }
                    ////, { field: 'HCenterID', title: 'HCenterID' }
                    , { field: 'HExplanation', title: '摘要' }
                    , { field: 'HRemark ', title: '备注' }
                    , { field: '工序', title: '工序' }
                    , { field: '单价 ', title: '单价' }
                    ////, { field: 'hbomid', title: 'hbomid' }
                    , { field: 'HInnerBillNo', title: '内部单据号' }
                    , { field: '数量', title: '数量' }
                    ////, { field: 'HRoutingInterID', title: 'HRoutingInterID' }
                    , { field: 'HBacker', title: '退回人' }
                    , { field: 'HBackDate', title: '退回日期' }
                    , { field: 'HChecker', title: '审核人' }
                    , { field: 'HCheckDate', title: '审核日期' }
                    , { field: 'HMaker', title: '制单人' }
                    , { field: 'HMakeDate', title: '制单日期' }
                    , { field: 'HUpDater', title: '修改人' }
                    , { field: 'HUpDateDate', title: '修改日期' }
                    , { field: 'HCloseMan', title: '关闭人' }
                    , { field: 'HCloseDate', title: '关闭日期' }
                    , { field: 'HCloseType', title: '关闭类型' }
                    , { field: '不良数量', title: '不良数量' }
                    , { field: '报废数', title: '报废数' }
                    , { field: '表体备注', title: '表体备注' }
                    , { field: '制单人', title: '制单人' }
                    , { field: '制单日期', title: '制单日期' }
                    , { field: '审核人', title: '审核人' }
                    , { field: '审核日期', title: '审核日期' }
                    , { field: '修改人', title: '修改人' }
                    , { field: '修改日期', title: '修改日期' }
                    , { field: '关闭人', title: '关闭人' }
                    , { field: '关闭日期', title: '关闭日期' }
                    ////, { field: 'hsubid', title: 'hsubid' }
                    , { field: 'HDeleteMan', title: '作废人' }
                    , { field: 'HDeleteDate', 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: '源单单号', title: '源单单号' }
                    , { field: '源单类型', title: '源单类型' }
                    , { field: '行关闭人', title: '行关闭人' }
                    , { field: 'HBillType', title: 'HBillType' }
                    , { field: 'HBillSubType', title: 'HBillSubType' }
                    , { field: 'HICMOInterID', title: 'HICMOInterID' }
                    , { field: '任务单号', title: '任务单号' }
                    , { field: 'HSourceID', title: 'HSourceID' }
                    , { field: '生产资源代码', title: '生产资源代码' }
                    , { field: '生产资源', title: '生产资源' }
                    //, { field: '关闭类型', title: '关闭类型' }
                    //, { field: '单据类型', title: '单据类型' }
                    //, { field: '计划跟踪号', title: '计划跟踪号' }
                ]]
            };
               //监听工具条
            table.on('tool(mainTable)', function (obj) {
                var data = obj.data;
                if (obj.event === 'detail') {
                    layer.msg('ID:' + data.hmainid + ' çš„æŸ¥çœ‹æ“ä½œ');         //页面层
                    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.hmainid, 'yes']
                        , resize: false
                        , cancel: function () {
                            //$(".layui-btn").removeClass("layui-btn-disabled");
                        }
                    });
                } else if (obj.event === 'del') {
                    layer.confirm('真的删除行么', function (index) {
                        obj.del();
                        layer.close(index);
                    });
                } else if (obj.event === 'edit') {
                    layer.alert('编辑行:<br>' + JSON.stringify(data))
                }
            });
            //进入页面显示的缓存列表
            var index0 = layer.load(0, { shade: false });
            $.ajax({
                //url: "http://61.130.49.162:9090/WMSAPI///Web/GetMAXNum",
                url: GetWEBURL() + '/Sc_ProcessMangement/MES_Sc_ProcessReportList_Json',
                type: "GET",
                data: { "sWhere": sWhere },
                data: { "sWhere": sWhere, "user": sessionStorage["HUserName"]},
                success: function (data1) {
                    if (data1.count == 1) {
                        option.data = data1.data;
@@ -197,6 +229,7 @@
                $("#WorkCenter").val("");//单据号
                $("#btnSearch").click();
            });
            //查询按钮
            form.on('submit(btnSearch)', function (data) {//选择仓位
@@ -205,22 +238,22 @@
                var HOrderProcNO = $("#HOrderProcNO").val();//订单跟踪号
                var WorkCenter = $("#WorkCenter").val();//单据号
                if (HDate) {
                    sWhere += " and HDate >= '" + HDate + "'";
                    sWhere += " and æ—¥æœŸ >= '" + HDate + "'";
                }
                if (HDate1) {
                    sWhere += " and HDate <= '" + HDate1 + "'";
                    sWhere += " and æ—¥æœŸ <= '" + HDate1 + "'";
                }
                if (HOrderProcNO) {
                    sWhere += " and è®¢å•跟踪号 like '%" + HOrderProcNO + "%'";
                }
                if (WorkCenter) {
                    sWhere += " and HBillNo like '%" + WorkCenter + "%'";
                    sWhere += " and å•据号 like '%" + WorkCenter + "%'";
                }
                var index = layer.load(0, { shade: false });
                $.ajax({
                    url: GetWEBURL() + '/Sc_ProcessMangement/MES_Sc_ProcessReportList_Json',
                    type: "GET",
                    data: { "sWhere": sWhere },
                    data: { "sWhere": sWhere, "user": sessionStorage["HUserName"] },
                    success: function (data1) {
                        if (data1.count == 1) {
                            option.data = data1.data;