zzr99
2022-07-28 e570b232bc6b7aa8c46c73f87caa1cb89f90dcff
WebTM/views/²É¹º¹ÜÀí/²É¹º¶©µ¥/Cg_POOrderBillList.html
@@ -76,8 +76,6 @@
                                    </div>
                                </div>
                                <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnResCnz" id="btnReSearch" style="padding:0 5px">重新同步</button>-->
                                <div class="layui-colla-content">
                                    <div class="layui-inline">
                                        <label class="layui-form-label">单据号</label>
@@ -103,11 +101,11 @@
                                        </div>
                                    </div>
                                    <!--<div class="layui-inline">
        <label class="layui-form-label">反馈状态</label>
        <div class="layui-input-block">
            <input type="text" class="layui-input" name="HXTFKStatus" id="HXTFKStatus" style="width:190px;">
        </div>
    </div>-->
                                        <label class="layui-form-label">反馈状态</label>
                                        <div class="layui-input-block">
                                            <input type="text" class="layui-input" name="HXTFKStatus" id="HXTFKStatus" style="width:190px;">
                                        </div>
                                    </div>-->
                                    <div class="layui-inline">
                                        <label class="layui-form-label">物料编码</label>
                                        <div class="layui-input-block">
@@ -196,7 +194,7 @@
                , util = layui.util
            //查询条件
            var sWhere = "";
            var option = [];
            var option = []; var columns = [];
            var Name = "MouldProdInHouseCellWidth";
            //#endregion
@@ -298,7 +296,6 @@
            });
            //#endregion
            //#region æ­¤é¡µé¢æ‰€æœ‰æ–¹æ³•
            function set_ClearBill() {
                //初始化表格
@@ -308,87 +305,103 @@
                //加载业务员
                get_HEmpName();
            }
            //初始化表格
            function set_InitGrid() {
                $("#HBeginDate").val("2022-03-14");
                $("#HEndDate").val(Format(new Date(), "yyyy-MM-dd"));
                var columns = [
                    { type: 'checkbox', fixed: 'left', totalRowText: '合计' }
                    ,{ field: 'hmainid', title: 'hmainid', sort: true, hide: true }
                    , { field: '日期', title: '日期', width: 120, templet: "<div>{{d.日期 ==null ?'':layui.util.toDateString(d.日期, 'yyyy-MM-dd')}}</div>" }
                    , { field: '单据号', title: '单据号', width: 150 }
                    , { field: '供应商', title: '供应商', width: 150 }
                    , { field: '业务员', title: '业务员', width: 100 }
                    , { field: 'HBillType', title: 'HBillType', hide: true }
                    , { field: 'HSupID', title: 'HSupID', hide: true }
                    , { field: '业务状态', title: '业务状态', width: 100, hide: true }
                    , { field: '分配状态', title: '分配状态', width: 100 }
                    , { field: '发布状态', title: '发布状态', width: 100 }
                    , { field: '供应商协同状态', title: '供应商协同状态', width: 135 }/*物料代码,物料名称,规格型号,批号,数量,单位,源单单号*/
                    , { field: '反馈状态', title: '供应商反馈状态', width: 135 }
                    , { field: '物料编码', title: '物料编码', width: 120 }
                    , { field: '物料代码', title: '物料代码', width: 200 }
                    , { field: '物料名称', title: '物料名称', width: 130 }
                    , { field: '数量', title: '订单数量', width: 100 }
                    , { field: '打印条码数量', title: '打印条码数量', width: 120 }
                    , { field: '关联数量', title: '已发货数量', width: 120 }
                    , { field: '未关联数量', title: '未已发货数量', width: 120 }
                    , { field: '完成状态', title: '完成状态', width: 100 }
                    , { field: 'HUnitID', title: 'HUnitID', hide: true }
                    , { field: '规格型号', title: '规格型号', width: 100 }
                    , { field: 'HUnitID', title: 'HUnitID', hide: true }
                    , { field: '计量单位代码', title: '计量单位代码', width: 120 }
                    , { field: '计量单位', title: '计量单位', width: 100 }
                    , { field: '批号', title: '批号', width: 100 }
                    , { field: '数量', title: '数量', width: 100 }
                    , { field: '源单单号', title: '源单单号', width: 100 }
                    , { field: '供应商代码', title: '供应商代码', width: 120, hide: true}
                    , { field: '业务员代码', title: '业务员代码', width: 100, hide: true}
                    , { field: 'HPriority', title: 'HPriority', width: 100, hide: true }
                    , { field: '优先级', title: '优先级', width: 100 }
                    , { field: '交货地点', title: '交货地点', width: 100}
                    , { field: 'HPSStyleID', title: 'HPSStyleID', hide: true }
                    , { field: '采购方式代码', title: '采购方式代码', width: 120}
                    , { field: '采购方式', title: '采购方式', width: 100}
                    , { field: 'HSSID', title: 'HSSID', hide: true }
                    , { field: '结算方式代码', title: '结算方式代码', width: 120}
                    , { field: '结算方式', title: '结算方式', width: 100}
                    , { field: '结算日期', title: '结算日期', width: 120, templet: "<div>{{d.日期 ==null ?'':layui.util.toDateString(d.结算日期, 'yyyy-MM-dd')}}</div>" }
                    , { field: 'HCurID', title: 'HCurID', hide: true }
                    , { field: '币别代码', title: '币别代码', width: 100}
                    , { field: '币别', title: '币别', width: 100}
                    , { field: '汇率', title: '汇率', width: 100}
                    , { field: 'HDeptID', title: 'HDeptID', hide: true }
                    , { field: '部门代码', title: '部门代码', width: 100}
                    , { field: '部门', title: '部门', width: 100}
                    , { field: 'HManagerID', title: 'HManagerID', hide: true }
                    , { field: '主管代码', title: '主管代码', width: 100}
                    , { field: '主管', title: '主管', width: 100}
                    , { field: 'HEmpID', title: 'HEmpID', hide: true }
                    , { field: '摘要', title: '摘要', width: 100}
                    , { field: '表头备注', title: '表头备注', width: 100}
                    , { field: 'hsubid', title: 'hsubid', hide: true }
                    , { field: 'HMaterID', title: 'HMaterID', hide: true }
                    , { field: '单价', title: '单价', width: 100}
                    , { field: '金额', title: '金额', width: 100}
                    , { field: '税率', title: '税率', width: 100}
                    , { field: '税额', title: '税额', width: 100}
                    , { field: '价税合计', title: '价税合计', width: 100}
                    , { field: '交货日期', title: '交货日期', width: 120, templet: "<div>{{d.日期 ==null ?'':layui.util.toDateString(d.交货日期, 'yyyy-MM-dd')}}</div>" }
                    , { field: '计划跟踪号', title: '计划跟踪号', width: 100}
                    , { field: '表体备注', title: '表体备注', width: 100}
                    , { field: '制单人', title: '制单人', width: 100}
                    , { field: '制单日期', title: '制单日期', width: 120, templet: "<div>{{d.日期 ==null ?'':layui.util.toDateString(d.制单日期, 'yyyy-MM-dd')}}</div>" }
                    , { field: '审核人', title: '审核人', width: 100}
                    , { field: '审核日期', title: '审核日期', width: 120, templet: "<div>{{d.日期 ==null ?'':layui.util.toDateString(d.审核日期, 'yyyy-MM-dd')}}</div>" }
                    , { field: '修改人', title: '修改人', width: 100}
                    , { field: '修改日期', title: '修改日期', width: 120, templet: "<div>{{d.日期 ==null ?'':layui.util.toDateString(d.修改日期, 'yyyy-MM-dd')}}</div>" }
                    , { field: '关闭人', title: '关闭人', width: 100}
                    , { field: '关闭日期', title: '关闭日期', width: 120, templet: "<div>{{d.日期 ==null ?'':layui.util.toDateString(d.关闭日期, 'yyyy-MM-dd')}}</div>" }
                    , { field: '作废人', title: '作废人', width: 100}
                    , { field: '作废日期', title: '作废日期', width: 120, templet: "<div>{{d.日期 ==null ?'':layui.util.toDateString(d.作废日期, 'yyyy-MM-dd')}}</div>" }
                ];
                //columns = [
                //     { type: 'checkbox', fixed: 'left', totalRowText: '合计' }
                //    ,{ field: 'hmainid', title: 'hmainid', sort: true, hide: true }
                //    , { field: '日期', title: '日期', width: 120, templet: "<div>{{d.日期 ==null ?'':layui.util.toDateString(d.日期, 'yyyy-MM-dd')}}</div>" }
                //    , { field: '单据号', title: '单据号', width: 150 }
                //    , { field: '供应商', title: '供应商', width: 150 }
                //    , { field: '业务员', title: '业务员', width: 100 }
                //    , { field: 'HBillType', title: 'HBillType', hide: true }
                //    , { field: 'HSupID', title: 'HSupID', hide: true }
                //    , { field: '业务状态', title: '业务状态', width: 100, hide: true }
                //    , { field: '分配状态', title: '分配状态', width: 100 }
                //    , { field: '发布状态', title: '发布状态', width: 100 }
                //    , { field: '供应商协同状态', title: '供应商协同状态', width: 135 }/*物料代码,物料名称,规格型号,批号,数量,单位,源单单号*/
                //    , { field: '反馈状态', title: '供应商反馈状态', width: 135 }
                //    , { field: '物料编码', title: '物料编码', width: 120 }
                //    , { field: '物料代码', title: '物料代码', width: 200 }
                //    , { field: '物料名称', title: '物料名称', width: 130 }
                //    , { field: '数量', title: '订单数量', width: 100 }
                //    , { field: '打印条码数量', title: '打印条码数量', width: 120 }
                //    , { field: '关联数量', title: '已发货数量', width: 120 }
                //    , { field: '未关联数量', title: '未已发货数量', width: 120 }
                //    , { field: '完成状态', title: '完成状态', width: 100 }
                //    , { field: 'HUnitID', title: 'HUnitID', hide: true }
                //    , { field: '规格型号', title: '规格型号', width: 100 }
                //    , { field: 'HUnitID', title: 'HUnitID', hide: true }
                //    , { field: '计量单位代码', title: '计量单位代码', width: 120 }
                //    , { field: '计量单位', title: '计量单位', width: 100 }
                //    , { field: '批号', title: '批号', width: 100 }
                //    , { field: '数量', title: '数量', width: 100 }
                //    , { field: '源单单号', title: '源单单号', width: 100 }
                //    , { field: '供应商代码', title: '供应商代码', width: 120, hide: true}
                //    , { field: '业务员代码', title: '业务员代码', width: 100, hide: true}
                //    , { field: 'HPriority', title: 'HPriority', width: 100, hide: true }
                //    , { field: '优先级', title: '优先级', width: 100 }
                //    , { field: '交货地点', title: '交货地点', width: 100}
                //    , { field: 'HPSStyleID', title: 'HPSStyleID', hide: true }
                //    , { field: '采购方式代码', title: '采购方式代码', width: 120}
                //    , { field: '采购方式', title: '采购方式', width: 100}
                //    , { field: 'HSSID', title: 'HSSID', hide: true }
                //    , { field: '结算方式代码', title: '结算方式代码', width: 120}
                //    , { field: '结算方式', title: '结算方式', width: 100}
                //    , { field: '结算日期', title: '结算日期', width: 120, templet: "<div>{{d.日期 ==null ?'':layui.util.toDateString(d.结算日期, 'yyyy-MM-dd')}}</div>" }
                //    , { field: 'HCurID', title: 'HCurID', hide: true }
                //    , { field: '币别代码', title: '币别代码', width: 100}
                //    , { field: '币别', title: '币别', width: 100}
                //    , { field: '汇率', title: '汇率', width: 100}
                //    , { field: 'HDeptID', title: 'HDeptID', hide: true }
                //    , { field: '部门代码', title: '部门代码', width: 100}
                //    , { field: '部门', title: '部门', width: 100}
                //    , { field: 'HManagerID', title: 'HManagerID', hide: true }
                //    , { field: '主管代码', title: '主管代码', width: 100}
                //    , { field: '主管', title: '主管', width: 100}
                //    , { field: 'HEmpID', title: 'HEmpID', hide: true }
                //    , { field: '摘要', title: '摘要', width: 100}
                //    , { field: '表头备注', title: '表头备注', width: 100}
                //    , { field: 'hsubid', title: 'hsubid', hide: true }
                //    , { field: 'HMaterID', title: 'HMaterID', hide: true }
                //    , { field: '单价', title: '单价', width: 100}
                //    , { field: '金额', title: '金额', width: 100}
                //    , { field: '税率', title: '税率', width: 100}
                //    , { field: '税额', title: '税额', width: 100}
                //    , { field: '价税合计', title: '价税合计', width: 100}
                //    , { field: '交货日期', title: '交货日期', width: 120, templet: "<div>{{d.日期 ==null ?'':layui.util.toDateString(d.交货日期, 'yyyy-MM-dd')}}</div>" }
                //    , { field: '计划跟踪号', title: '计划跟踪号', width: 100}
                //    , { field: '表体备注', title: '表体备注', width: 100}
                //    , { field: '制单人', title: '制单人', width: 100}
                //    , { field: '制单日期', title: '制单日期', width: 120, templet: "<div>{{d.日期 ==null ?'':layui.util.toDateString(d.制单日期, 'yyyy-MM-dd')}}</div>" }
                //    , { field: '审核人', title: '审核人', width: 100}
                //    , { field: '审核日期', title: '审核日期', width: 120, templet: "<div>{{d.日期 ==null ?'':layui.util.toDateString(d.审核日期, 'yyyy-MM-dd')}}</div>" }
                //    , { field: '修改人', title: '修改人', width: 100}
                //    , { field: '修改日期', title: '修改日期', width: 120, templet: "<div>{{d.日期 ==null ?'':layui.util.toDateString(d.修改日期, 'yyyy-MM-dd')}}</div>" }
                //    , { field: '关闭人', title: '关闭人', width: 100}
                //    , { field: '关闭日期', title: '关闭日期', width: 120, templet: "<div>{{d.日期 ==null ?'':layui.util.toDateString(d.关闭日期, 'yyyy-MM-dd')}}</div>" }
                //    , { field: '作废人', title: '作废人', width: 100}
                //    , { field: '作废日期', title: '作废日期', width: 120, templet: "<div>{{d.日期 ==null ?'':layui.util.toDateString(d.作废日期, 'yyyy-MM-dd')}}</div>" }
                //];
                $.ajax({
                    url: GetWEBURL() + '/Cg_POOrderBill/list2',
                    type: "GET",
                    async: false,
                    data: { "sWhere": sWhere, "user": sessionStorage["HUserName"] },
                    success: function (data1) {
                        if (data1.count == 1) {
                            columns = data1.data;
                            columns.unshift({ type: 'checkbox', fixed: 'left', totalRowText: '合计' });
                        } else {
                            layer.alert(data1.Message, { icon: 5 });
                        }
                    }, error: function () {
                        layer.alert("接口请求失败!", { icon: 5 });
                    }
                });
                option = {
                    elem: '#mainTable'
                    , toolbar: '#toolbarDemo'
@@ -414,6 +427,7 @@
                //    });
                //}
            }
            //加载网格
            function get_Display(sWhere) {
                var wait = layer.load();//遮罩
@@ -536,7 +550,7 @@
                        , title: '打印模版选择'
                        , shade: 0.6 //遮罩透明度
                        , maxmin: false //允许全屏最小化
                        , anim: 0 //0-6的动画形式,-1不开启
                        , anim: 0 //0-6的动画形式,-1不开启
                        , content: ['../../BaseSet/SRM_OpenTmpList.html?linterid=' + data[0].hmainid.toString() + '&MyMsg=' + data[0].hmainid.toString() + '&Type=HMouldProdInBill', 'yes']
                        , resize: false
                    })
@@ -1005,8 +1019,8 @@
            //快速过滤
            function get_FastQuery(table, option) {
                var HStatus = $("select[name='HStatus']").val();//
                var HStatus2 = $("select[name='HStatus2']").val();//
                var HStatus = $("select[name='HStatus']").val();//
                var HStatus2 = $("select[name='HStatus2']").val();//
                var HBeginDate = $("#HBeginDate").val();//开始日期
                var HEndDate = $("#HEndDate").val();//结束日期
                var HBillNo = $("#HBillNo").val(); //单据号