1
cwjbxqmz
2024-01-26 b742f00aac8e1e1bb628232383c35e67f4a41e4e
WebTM/views/Éú²ú¹¤Ðò¹ÜÀí/ίÍ⹤µ¥/WW_EntrustWorkOrderBillMainList.html
@@ -65,14 +65,7 @@
                        <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-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-Pushdown"><i class="layui-icon layui-icon-form"></i>下推委外派工单</button>
                            </div>
                        </script>
                    </form>
@@ -80,6 +73,9 @@
            </div>
        </div>
    </div>
     <script type="text/html" id="barDemo">
        <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="detail">查看</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,67 +99,47 @@
            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: 'HBillType ', title: '单据类型', sort: true, width: 120 }
                    , { field: 'HBillSubType', title: '子类型', sort: true, width: 170 }
                    //, { field: 'HBillStatus ', title: '单据状态', width: 105 }
                    , { field: 'HDate', title: '日期' }
                    , { field: 'HBillNo', title: '单据号', width: 115 }
                    , { field: 'HBillStatus', title: '单据状态(1未审,2审核通过,3关闭,4作废,5审核退回,6审核中,7已阅,8已回复,9结案,10验证,11下达,12开工,13申请审批,15申请检验,16 åˆ¤å®šåˆæ ¼ï¼Œ17判定不合格) ', width: 115 }
                    , { field: 'HCheckItemNowID', title: '当前审核项目' }
                    , { field: 'HCheckItemNextID', title: '待审核项目', width: 160 }
                    , { field: 'HCheckFlowID', title: '审批流', width: 160 }
                    , { field: 'HRemark ', title: '备注', width: 215 }
                    ////, { field: 'hunitid', title: 'hunitid' }
                    , { field: 'HBacker ', title: '退回人', width: 115 }
                    , { field: 'HBackDate', title: '退回日期' }
                    ////, { field: 'hempid', title: 'hempid' }
                    , { field: 'HBackRemark', title: '退回原因', width: 100 }
                    , { field: 'HChecker', title: '审核人' }
                    , { field: 'HCheckDate', title: '审核日期' }
                    , { field: 'HMaker', title: '制单人' }
                    , { field: 'HMakeDate', title: '制单日期' }
                    ////, { field: 'HCenterID', title: 'HCenterID' }
                    , { field: 'HUpDater', title: '修改人' }
                    , { field: 'HUpDateDate ', title: '修改日期' }
                    ////, { field: 'hbomid', title: 'hbomid' }
                    , { field: 'HCloseMan', title: '关闭人' }
                    ////, { field: 'HRoutingInterID', title: 'HRoutingInterID' }
                    , { field: 'HCloseDate', title: '关闭日期' }
                    , { field: 'HCloseType', title: '关闭类型' }
                    , { field: 'HDeleteMan', title: '作废人' }
                    , { field: 'HDeleteDate', title: '作废日期' }
                    , { field: 'HMainSourceBillType', title: '源单类型' }
                    , { field: 'HMainSourceInterID', title: '源单主内码' }
                    , { field: 'HMainSourceEntryID', title: '源单子内码' }
                    , { field: 'HMainSourceBillNo', title: '源单号' }
                    , { field: 'HPrintQty', title: '打印次数' }
                    //, { field: 'HCloseDate', title: '关闭日期' }
                    //, { field: 'HCloseType', 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: '计划跟踪号' }
                     { 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: '部门', title: '部门' }
                    , { field: 'HMaterID', title: 'HMaterID' }
                    , { field: '物料代码', title: '物料代码', width: 160 }
                    , { field: '物料名称', title: '物料名称', width: 160 }
                    , { field: '规格型号 ', title: '规格型号', width: 215 }
                    , { field: '表头备注', title: '表头备注' }
                    , { field: 'hsubid', title: 'hsubid', hide: true }
                    , { field: 'HEmpID', title: 'HEmpID' }
                    , { 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: '行关闭人', title: '行关闭人' }
                    , { field: 'HBillType', title: 'HBillType' }
                    , { field: 'HBillSubType', title: 'HBillSubType' }
                ]]
            };
@@ -171,7 +147,7 @@
            var index0 = layer.load(0, { shade: false });
            $.ajax({
                //url: "http://61.130.49.162:9090/WMSAPI///Web/GetMAXNum",
                url: GetWEBURL() + '/LEMS/MES_WW_EntrustWorkOrderBillMain_Json',
                url: GetWEBURL() + '/Sc_ProcessMangement/MES_WW_EntrustWorkOrderBillMain_Json',
                type: "GET",
                data: { "sWhere": sWhere },
                success: function (data1) {
@@ -214,11 +190,11 @@
                    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() + '/LEMS/MES_WW_EntrustWorkOrderBillMain_Json',
                    url: GetWEBURL() + '/Sc_ProcessMangement/MES_WW_EntrustWorkOrderBillMain_Json',
                    type: "GET",
                    data: { "sWhere": sWhere },
                    success: function (data1) {
@@ -239,6 +215,60 @@
                sWhere = "";//调用接口后清空sWhere缓存
            });
               //头工具栏事件
            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: ['../委外工序派工单/WW_AddEntrustProcSendWork.html?HInterID=' + data[0].hmainid.toString() + '&lentryid=' + rows.toString().substring(0, rows.length - 1),  '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;
                };
            });
            //laydate.render({
            //    elem: '#HDate'