杨乐
2022-01-13 789552d278259a28fb7a4933ad976476e124f11d
Merge branch 'master' of http://101.37.171.70:10101/r/MESWMS-LayUI
6个文件已修改
585 ■■■■■ 已修改文件
WebTM/views/index.html 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/views/基础资料/基础资料/InventoryAnalysis.html 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/views/模治具管理/模治具仓库管理/Sc_MouldRepairOutBillEdit.html 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/views/生产管理/报工台工序/产量汇报/Sc_Add_ProductReportStepBillList.html 115 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/views/生产管理/生产包装单/Sc_PackUnionBill.html 406 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/views/车间管理/报表分析/Sc_StationInBillList.html 38 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/views/index.html
@@ -348,6 +348,12 @@
                                        <dd><a lay-href="生产管理/组装单/Sc_GroupOrderBillList.html">组装追溯单维护</a></dd>
                                    </dl>
                                </dd>
                                <dd>
                                    <a>组托单</a>
                                    <dl class="layui-nav-child">
                                        <dd><a lay-href="生产管理/生产包装单/Sc_PackUnionBill.html">组托单维护</a></dd>
                                    </dl>
                                </dd>
                            </dl>
                        </li>
                        <!-- è½¦é—´ç®¡ç† -->
WebTM/views/»ù´¡×ÊÁÏ/»ù´¡×ÊÁÏ/InventoryAnalysis.html
@@ -591,7 +591,7 @@
                            option1.data = data1.list[0];
                            table1.render(option1);
                        } else {
                            layer.alert(result.code + result.Message, { icon: 5 });
                            layer.alert(data1.code + data1.Message, { icon: 5 });
                        }
                    }, error: function () {
                        layer.alert("接口失效!", { icon: 5 });
@@ -612,7 +612,7 @@
                            option2.data = data1.list[0];
                            table2.render(option2);
                        } else {
                            layer.alert(result.code + result.Message, { icon: 5 });
                            layer.alert(data1.code + data1.Message, { icon: 5 });
                        }
                    }, error: function () {
                        layer.alert("接口失效!", { icon: 5 });
@@ -633,7 +633,7 @@
                            option3.data = data1.list[0];
                            table3.render(option3);
                        } else {
                            layer.alert(result.code + result.Message, { icon: 5 });
                            layer.alert(data1.code + data1.Message, { icon: 5 });
                        }
                    }, error: function () {
                        layer.alert("接口失效!", { icon: 5 });
@@ -654,7 +654,7 @@
                            option4.data = data1.list[0];
                            table4.render(option4);
                        } else {
                            layer.alert(result.code + result.Message, { icon: 5 });
                            layer.alert(data1.code + data1.Message, { icon: 5 });
                        }
                    }, error: function () {
                        layer.alert("接口失效!", { icon: 5 });
@@ -675,7 +675,7 @@
                            option5.data = data1.list[0];
                            table5.render(option5);
                        } else {
                            layer.alert(result.code + result.Message, { icon: 5 });
                            layer.alert(data1.code + data1.Message, { icon: 5 });
                        }
                    }, error: function () {
                        layer.alert("接口失效!", { icon: 5 });
@@ -696,7 +696,7 @@
                            option6.data = data1.list[0];
                            table6.render(option6);
                        } else {
                            layer.alert(result.code + result.Message, { icon: 5 });
                            layer.alert(data1.code + data1.Message, { icon: 5 });
                        }
                    }, error: function () {
                        layer.alert("接口失效!", { icon: 5 });
@@ -717,7 +717,7 @@
                            option7.data = data1.list[0];
                            table7.render(option7);
                        } else {
                            layer.alert(result.code + result.Message, { icon: 5 });
                            layer.alert(data1.code + data1.Message, { icon: 5 });
                        }
                    }, error: function () {
                        layer.alert("接口失效!", { icon: 5 });
@@ -768,6 +768,7 @@
                    , data = checkStatus.data;
                if (checkStatus.data.length === 1) {
                    var HInterID = data[0].条码.toString();
                    var HItemID = data[0].HItemID.toString();
                    $.ajax({
                        type: "GET",
                        url: GetWEBURL() + "/Gy_StockCheckItemBill/MakeProdOut", //方法所在页面和方法名
@@ -801,6 +802,7 @@
                    , data = checkStatus.data;
                if (checkStatus.data.length === 1) {
                    var HInterID = data[0].条码.toString();
                    var HItemID = data[0].HItemID.toString();
                    $.ajax({
                        type: "GET",
                        url: GetWEBURL() + "/Gy_StockCheckItemBill/MakeProdOutBack", //方法所在页面和方法名
@@ -834,6 +836,7 @@
                    , data = checkStatus.data;
                if (checkStatus.data.length === 1) {
                    var HInterID = data[0].条码.toString();
                    var HItemID = data[0].HItemID.toString();
                    $.ajax({
                        type: "GET",
                        url: GetWEBURL() + "/Gy_StockCheckItemBill/MakeOtherIn", //方法所在页面和方法名
@@ -867,6 +870,7 @@
                    , data = checkStatus.data;
                if (checkStatus.data.length === 1) {
                    var HInterID = data[0].条码.toString();
                    var HItemID = data[0].HItemID.toString();
                    $.ajax({
                        type: "GET",
                        url: GetWEBURL() + "/Gy_StockCheckItemBill/MakeScrapOut", //方法所在页面和方法名
@@ -900,6 +904,7 @@
                    , data = checkStatus.data;
                if (checkStatus.data.length === 1) {
                    var HInterID = data[0].条码.toString();
                    var HItemID = data[0].HItemID.toString();
                    $.ajax({
                        type: "GET",
                        url: GetWEBURL() + "/Gy_StockCheckItemBill/MakeProdBack", //方法所在页面和方法名
WebTM/views/Ä£Öξ߹ÜÀí/Ä£Öξֿ߲â¹ÜÀí/Sc_MouldRepairOutBillEdit.html
@@ -354,6 +354,7 @@
            });
            //行内事件
            table.on('tool(mainTable)', function (obj) {
                alert(1);
                set_GridDelete(obj);   //行内删除
                set_GridCellCheck(obj); //行内快捷键筛选
            });
WebTM/views/Éú²ú¹ÜÀí/±¨¹¤Ì¨¹¤Ðò/²úÁ¿»ã±¨/Sc_Add_ProductReportStepBillList.html
@@ -175,12 +175,6 @@
                                                </div>
                                                <div class="layui-form-item">
                                                    <div class="layui-inline">
                                                        <label class="layui-form-label">计划数量:</label>
                                                        <div class="layui-input-inline">
                                                            <input class="layui-input" name="HPlanQty" lay-verify="HPlanQty" id="HPlanQty" autocomplete="off">
                                                        </div>
                                                    </div>
                                                    <div class="layui-inline">
                                                        <label class="layui-form-label">生产资源</label>
                                                        <div class="layui-input-inline">
                                                            <input type="text" name="HSourceName" id="HSourceName" class="layui-input" value="" style="float:left;width:150px;">
@@ -202,8 +196,6 @@
                                                            </button>
                                                        </div>
                                                    </div>
                                                </div>
                                                <div class="layui-form-item">
                                                    <div class="layui-inline">
                                                        <label class="layui-form-label">操作员:</label>
                                                        <div class="layui-input-inline">
@@ -215,6 +207,29 @@
                                                            </button>
                                                        </div>
                                                    </div>
                                                </div>
                                                <div class="layui-form-item">
                                                    <div class="layui-inline">
                                                        <label class="layui-form-label">计划数量:</label>
                                                        <div class="layui-input-inline">
                                                            <input class="layui-input" name="HPlanQty" lay-verify="HPlanQty" id="HPlanQty" autocomplete="off">
                                                        </div>
                                                    </div>
                                                    <div class="layui-inline">
                                                        <label class="layui-form-label">采集数量:</label>
                                                        <div class="layui-input-inline">
                                                            <input class="layui-input" name="GatherQty" lay-verify="GatherQty" id="GatherQty" autocomplete="off">
                                                        </div>
                                                    </div>
                                                    <div class="layui-inline">
                                                        <label class="layui-form-label">合格数量:</label>
                                                        <div class="layui-input-inline">
                                                            <input class="layui-input" name="HQty" lay-verify="HQty" id="HQty" autocomplete="off">
                                                        </div>
                                                    </div>
                                                </div>
                                                <div class="layui-form-item">
                                                    <div class="layui-inline">
                                                        <label class="layui-form-label">不良数量:</label>
                                                        <div class="layui-input-inline">
@@ -231,14 +246,6 @@
                                                        <label class="layui-form-label">因料报废数:</label>
                                                        <div class="layui-input-inline">
                                                            <input class="layui-input" name="HWasterQty2" lay-verify="HWasterQty2" id="HWasterQty2" autocomplete="off">
                                                        </div>
                                                    </div>
                                                </div>
                                                <div class="layui-form-item">
                                                    <div class="layui-inline">
                                                        <label class="layui-form-label">报工数量:</label>
                                                        <div class="layui-input-inline">
                                                            <input class="layui-input" name="HQty" lay-verify="HQty" id="HQty" autocomplete="off">
                                                        </div>
                                                    </div>
                                                </div>
@@ -996,6 +1003,78 @@
                    }
                });
            }
            //#region ç›‘听输入框改变值
            //输入框的值改变时触发
            $("#HBadCount").on("input", function (e) {
                //获取input输入的值
                var HBadCount = e.delegateTarget.value == '' ? '0' : e.delegateTarget.value;
                //获取采集数量
                var GatherQty = $("#GatherQty").val() == '' ? '0' : $("#GatherQty").val();
                //获取合格数量
                var Hqy = $("#HQty").val() == '' ? '0' : $("#HQty").val();//parseFloat($("#HQty").val())
                //因工报废数
                var HWasterQty = $("#HWasterQty").val() == '' ? '0' : $("#HWasterQty").val();
                //因料报废数
                var HWasterQty2 = $("#HWasterQty2").val() == '' ? '0' : $("#HWasterQty2").val();
                //合格=采集-(不良+报废)GatherQty
                Hqy = parseFloat(GatherQty) - (parseFloat(HBadCount) + parseFloat(HWasterQty) + parseFloat(HWasterQty2));
                if (Hqy < 0)
                {
                    layer.msg("合格数量不能为负数!");
                    HBadCount = 0;
                    Hqy = parseFloat(GatherQty) - (parseFloat(HBadCount) + parseFloat(HWasterQty) + parseFloat(HWasterQty2));
                    $("#HBadCount").val(HBadCount);
                    $("#HBadCount").focus();
                }
                $("#HQty").val(Hqy);
            });
            $("#HWasterQty").on("input", function (e) {
                //获取input输入的值
                var HWasterQty = e.delegateTarget.value == '' ? '0' : e.delegateTarget.value;
                //获取采集数量
                var GatherQty = $("#GatherQty").val() == '' ? '0' : $("#GatherQty").val();
                //获取合格数量
                var Hqy = $("#HQty").val() == '' ? '0' : $("#HQty").val();//parseFloat($("#HQty").val())
                //不良数量
                var HBadCount = $("#HBadCount").val() == '' ? '0' : $("#HBadCount").val();
                //因料报废数
                var HWasterQty2 = $("#HWasterQty2").val() == '' ? '0' : $("#HWasterQty2").val();
                //合格=采集-(不良+报废)GatherQty
                Hqy = parseFloat(GatherQty) - (parseFloat(HBadCount) + parseFloat(HWasterQty) + parseFloat(HWasterQty2));
                if (Hqy < 0) {
                    layer.msg("合格数量不能为负数!");
                    HWasterQty = 0;
                    Hqy = parseFloat(GatherQty) - (parseFloat(HBadCount) + parseFloat(HWasterQty) + parseFloat(HWasterQty2));
                    $("#HWasterQty").val(HWasterQty);
                    $("#HWasterQty").focus();
                }
                $("#HQty").val(Hqy);
            });
            $("#HWasterQty2").on("input", function (e) {
                //获取input输入的值
                var HWasterQty2 = e.delegateTarget.value == '' ? '0' : e.delegateTarget.value;
                //获取采集数量
                var GatherQty = $("#GatherQty").val() == '' ? '0' : $("#GatherQty").val();
                //获取合格数量
                var Hqy = $("#HQty").val() == '' ? '0' : $("#HQty").val();//parseFloat($("#HQty").val())
                //不良数量
                var HBadCount = $("#HBadCount").val() == '' ? '0' : $("#HBadCount").val();
                //因工报废数
                var HWasterQty = $("#HWasterQty").val() == '' ? '0' : $("#HWasterQty").val();
                //合格=采集-(不良+报废)GatherQty
                Hqy = parseFloat(GatherQty) - (parseFloat(HBadCount) + parseFloat(HWasterQty) + parseFloat(HWasterQty2));
                if (Hqy < 0) {
                    layer.msg("合格数量不能为负数!");
                    HWasterQty2 = 0;
                    Hqy = parseFloat(GatherQty) - (parseFloat(HBadCount) + parseFloat(HWasterQty) + parseFloat(HWasterQty2));
                    $("#HWasterQty2").val(HWasterQty2);
                    $("#HWasterQty2").focus();
                }
                $("#HQty").val(Hqy);
            });
            //#endregion
            //以上为layui模块
        });
@@ -1030,6 +1109,10 @@
                layer.msg("操作员不能为空!", { icon: 5, btn: ['确认'], time: 2000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示" });
                return Result = false;
            }
            if ($("#GatherQty").val() == '' || $("#GatherQty").val() == null) {
                layer.msg("采集数量不能为空!", { icon: 5, btn: ['确认'], time: 2000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示" });
                return Result = false;
            }
            if ($("#HQty").val() == '' || $("#HQty").val() == null) {
                layer.msg("报工数量不能为空!", { icon: 5, btn: ['确认'], time: 2000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示" });
                return Result = false;
WebTM/views/Éú²ú¹ÜÀí/Éú²ú°ü×°µ¥/Sc_PackUnionBill.html
@@ -9,11 +9,6 @@
    <link rel="stylesheet" href="../../../layuiadmin/layui/css/layui.css" media="all">
    <link rel="stylesheet" href="../../../layuiadmin/style/admin.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>
    <style type="text/css">
        input.layui-input.layui-unselect {
            padding-right: 0;
@@ -40,15 +35,15 @@
                                    </div>
                                </div>
                                <div class="layui-inline">
                                    <label class="layui-form-label">开始日期</label>
                                    <label class="layui-form-label">日期</label>
                                    <div class="layui-input-block">
                                        <input type="date" class="layui-input" id="HBeginDate" style="width:190px;">
                                        <input type="date" class="layui-input" id="HDate" style="width:190px;">
                                    </div>
                                </div>
                                <div class="layui-inline">
                                    <label class="layui-form-label">结束日期</label>
                                    <label class="layui-form-label">部门名称</label>
                                    <div class="layui-input-block">
                                        <input type="date" class="layui-input" id="HEndDate" style="width:190px;">
                                        <input type="text" class="layui-input" id="HDepartName" style="width:190px;">
                                    </div>
                                </div>
@@ -57,12 +52,6 @@
                                </button>
                                <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnReSearch" id="btnReSearch" style="padding:0 5px">重置</button>
                                <div class="layui-colla-content">
                                    <div class="layui-inline">
                                        <label class="layui-form-label">部门名称</label>
                                        <div class="layui-input-block">
                                            <input type="text" class="layui-input" id="HDepartName" style="width:190px;">
                                        </div>
                                    </div>
                                    <div class="layui-inline">
                                        <label class="layui-form-label">物料代码</label>
                                        <div class="layui-input-block">
@@ -73,12 +62,6 @@
                                        <label class="layui-form-label">物料名称</label>
                                        <div class="layui-input-block">
                                            <input type="text" class="layui-input" id="HMaterName" style="width:190px;">
                                        </div>
                                    </div>
                                    <div class="layui-inline">
                                        <label class="layui-form-label">规格型号</label>
                                        <div class="layui-input-block">
                                            <input type="text" class="layui-input" id="HMaterModel" style="width:190px;">
                                        </div>
                                    </div>
                                    <div class="layui-inline">
@@ -109,7 +92,13 @@
            </div>
        </div>
    </div>
    <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>
        var cols_arr = []; //存储表格头的数组
        var table = null;
        layui.config({
            base: '../../../layuiadmin/' //静态资源所在路径
        }).extend({
@@ -125,17 +114,19 @@
                , laydate = layui.laydate
                , util = layui.util
            //查询条件
            var sWhere = " where 1 = 1 ";
            var sWhere = "";
            var resultTableHead = []; //获取列表头字段自定义列数组
            var option = [];
            var Name = "Sc_PackUnionBillMain";
            var pageCount = 50;//每页多少行
            var pageIndex = 1;//当前页码值
            //#region è¿›å…¥é¡µé¢æ—¢åŠ è½½
            //初始化表格
            set_InitGrid();
            //加载数据到网格
            get_Display(sWhere);
            //初始化界面
            set_ClearBill();
            //#endregion
            //#region ç‚¹å‡»äº‹ä»¶åŒ…括on form事件等
            //头工具栏事件
            table.on('toolbar(mainTable)', function (obj) {
                switch (obj.event) {
@@ -180,314 +171,92 @@
            });
            //查询按钮
            form.on('submit(btnSearch)', function (data) {
                get_FastQuery(table, option);
                get_FastQuery();
            });
            //初始化表格
            function set_InitGrid() {
                $("#HBeginDate").val(Format(new Date(new Date() - 1000 * 60 * 60 * 24 * 30), "yyyy-MM-dd"));
                $("#HEndDate").val(Format(new Date(), "yyyy-MM-dd"));
                var columns = [
                    { type: 'checkbox', fixed: 'left', totalRowText: '合计' }
                    , { field: 'hmainid', title: '单据ID', hide: true }
                    , { field: '日期', title: '日期', width: 160, templet: "<div>{{d.日期 ==null ?'':layui.util.toDateString(d.日期, 'yyyy-MM-dd')}}</div>" }
                    , { field: '单据号', title: '单据号', width: 160 }
                    , { field: '箱号条形码', title: '箱号条形码', width: 160 }
                    , { field: '净重', title: '净重', width: 160 }
                    , { field: '毛重', title: '毛重', width: 160 }
                    , { field: '皮重', title: '皮重', width: 160 }
            //初始化界面
            function set_ClearBill() {
                resultTableHead = []; //清空表头列,防止重复渲染
                //初始查询
                get_Display(sWhere);
                    , { field: 'HProdOrgID', title: 'HProdOrgID', width: 200, hide: true }
                    , { field: '生产组织', title: '生产组织', width: 160 }
                    , { field: 'HDeptID', title: 'HDeptID', width: 200, hide: true }
                    , { field: '部门', title: '部门', width: 160 }
                    , { field: 'HEmpID', title: 'HEmpID', width: 200, hide: true }
                    , { field: '操作员', title: '操作员', width: 160 }
                    , { field: '客户标签号', title: '客户标签号', width: 160 }
                    , { field: 'HMaterID', title: 'HMaterID', width: 200, hide: true }
                    , { field: '物料代码', title: '物料代码', width: 200 }
                    , { field: '物料名称', title: '物料名称', width: 200 }
                    , { field: 'hunitid', title: 'hunitid', width: 200, hide: true }
                    , { field: '计量单位代码', title: '计量单位代码', width: 200 }
                    , { field: '计量单位名称', title: '计量单位名称', width: 200 }
                    , { field: '数量', title: '数量', width: 115 }
                    , { field: '制单人', title: '制单人', width: 200 }
                    , { 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>" }
                ];
                option = {
                    elem: '#mainTable'
                    , toolbar: '#toolbarDemo'
                    , page: true
                    , cellMinWidth: 120
                    , totalRow: true
                    , limit: 10
                    , height: 'full-50'
                    , cols: [columns]
                    , limits: [50, 500, 1000, 5000]
                    , done: function (res, curr, count) {
                    }
                };
            }
            //加载网格
            function get_Display(sWhere) {
                var wait = layer.load();//遮罩
                var HBeginDate = $("#HBeginDate").val();//开始日期
                var HEndDate = $("#HEndDate").val();//结束日期
                if (HBeginDate) {
                    sWhere += " and CONVERT(varchar(100),日期, 23) >= '" + HBeginDate + "'";
                }
                if (HEndDate) {
                    sWhere += " and CONVERT(varchar(100),日期, 23) <= '" + HEndDate + "'";
                }
                $.ajax({
                    url: GetWEBURL() + '/Sc_PackUnionBill/Get_PackUnionBillList',
                    type: "GET",
                    data: { "sWhere": sWhere },
                    data: { "sWhere": sWhere, "page": 1, "limit": 10 },
                    datatype: "json",
                    success: function (data1) {
                        if (data1.count == 1) {
                            DataList = data1.data;
                            option.data = data1.data;
                            table.render(option);
                            layer.close(wait);
                        } else {
                            layer.close(wait);
                            layer.alert(data1.Message, { icon: 5 });
                        console.log(data1);
                        for (var key in data1.list) {
                            resultTableHead.push({ "id": data1.list[key].ColmCols, "name": data1.list[key].ColmCols, "Type": data1.list[key].ColmType });
                        }
                    }, error: function () {
                        layer.close(wait);
                        layer.alert("接口请求失败!", { icon: 5 });
                        set_InitGrid(sWhere);
                    }, error: function (err) {
                        layer.alert(err.Message, { icon: 5 });
                    }
                });
            }
            //新增
            function set_AddNew() {
                layer.open({
                    type: 2,
                    skin: 'layui-layer-rim', //加上边框
                    title: '新增生产领料单',
                    closeBtn: 1,
                    shift: 2,
                    area: ['100%', '100%'],
                    maxmin: true,
                    content: '../生产包装单/Sc_PackUnionBillEdit.html?OperationType=1&linterid=&HSouceBillType=0&closeType=1',
                    end: function () {
                        //刷新页面,
                        get_FastQuery(table, option);
            //初始化表格
            function set_InitGrid() {
                //填充表格头数组
                var data = resultTableHead;
                cols_arr[0] = [];
                cols_arr[0][0] = { checkbox: true, fixed: true, totalRowText: '合计' };
                for (var i = 0; i < data.length; i++) {
                    if (data[i].name == 'hmainid') {
                        cols_arr[0][i + 1] = { field: data[i].id, title: data[i].name, align: 'center', hide: true }; //隐藏id列
                    }
                    else {
                        switch (data[i].Type) {
                            //int
                            case 'Int32':
                                cols_arr[0][i + 1] = { field: data[i].id, title: data[i].name, align: 'center', totalRow: true, sort: true };
                                break;
                            //Decimal
                            case 'Decimal':
                                cols_arr[0][i + 1] = { field: data[i].id, title: data[i].name, align: 'center', totalRow: true, sort: true };
                                break;
                            default:
                                cols_arr[0][i + 1] = { field: data[i].id, title: data[i].name, align: 'center', sort: true };
                        }
                    }
                }
                //填充表格数据
                table.render({
                    elem: '#mainTable',
                    url: GetWEBURL() + '/Sc_PackUnionBill/Get_PackUnionBillList',
                    title: '组托单列表',
                    cols: cols_arr,    //填充表格头数据,
                    id: 'mainTable', //表格id
                    where: { sWhere: sWhere }, //扩展参数,可以传数据到后台
                    page: true,   //开启分页
                    totalRow: true, //开启合计
                    limit: 10,     //一页能够显示的最大数目
                    limits: [10, 20, 40, 60, 80, 100], //控制多少行一页(默认五条一页)
                    method: 'get',  //提交方式
                    layout: ['count', 'prev', 'page', 'next', 'limit', 'skip'],
                    response: {
                        statusCode: 1 //重新规定成功的状态码为 1,table ç»„件默认为 0
                    },
                    success: function (layero, index) {
                    done: function (res) {   //返回数据执行回调函数
                        layer.close(layer.index);    //返回数据关闭loading
                    }
                });
            }
            //编辑单据
            function set_ShowBill() {
                var checkStatus = table.checkStatus('mainTable')
                    , data = checkStatus.data;
                if (checkStatus.data.length === 1) {
                    var linterid = data[0].hmainid.toString();
                    //if (AllowLoadData(sSubStr) != false) {//非空验证
                    layer.open({
                        type: 2
                        , area: ['100%', '100%']
                        , title: '编辑生产领料单'
                        , closeBtn: 1
                        , shade: 0.6 //遮罩透明度
                        , maxmin: true //允许全屏最小化
                        , anim: 0 //0-6的动画形式,-1不开启
                        , content: '../生产包装单/Sc_PackUnionBillEdit.html?OperationType=3&linterid=' + linterid + '&HSouceBillType=0&closeType=1'
                        , resize: false,
                        end: function () {
                            get_FastQuery(table, option);
                        }
                        , cancel: function () {
                            //$(".layui-btn").removeClass("layui-btn-disabled");
                        }
                    })
                } else {
                    layer.msg('请选择一行数据编辑!');
                }
            }
            //删除
            function set_DeleteBill() {
                var checkStatus = table.checkStatus('mainTable')
                    , data = checkStatus.data;
                if (checkStatus.data.length === 1) {
                    var InterID = data[0].hmainid.toString();
                    //逻辑删除方法
                    layer.confirm("确认要删除吗,删除后不能恢复", { title: "删除确认" }, function (index) {
                        var wait = layer.load();
                        $.ajax({
                            type: "GET",
                            url: GetWEBURL() + "/Sc_PackUnionBill/set_DeleteBill", //方法所在页面和方法名
                            data: { "HInterID": InterID, "user": sessionStorage["HUserName"] },
                            success: function (result) {
                                if (result.count == 1) {
                                    layer.msg(result.Message, { time: 1 * 1000, icon: 1 }, function () {
                                        // å¾—到frame索引
                                        var index = layer.getFrameIndex(window.name);
                                        //关闭当前frame
                                        layer.close(index);
                                        //修改为功后刷新界面
                                        window.location.reload();
                                    });
                                } else {
                                    layer.alert(result.code + result.Message, { icon: 5 });
                                }
                                layer.close(wait);
                            }, error: function () {
                                layer.close(wait);
                                layer.alert("接口请求失败!", { icon: 5 });
                            }
                        });
                    })
                }
                else {
                    layer.msg('请选择一行数据删除!');
                }
            }
            //预览
            function get_ViewReport() {
                var checkStatus = table.checkStatus('mainTable')
                    , data = checkStatus.data;
                if (checkStatus.data.length === 1) {
                    layer.open({
                        type: 2
                        , area: ['50%', '50%']
                        , title: '打印模版选择'
                        , shade: 0.6 //遮罩透明度
                        , maxmin: false //允许全屏最小化
                        , 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
                    })
                }
                else {
                    layer.msg('请选择一行数据打印!');
                }
            }
            //打印
            function get_PrintReport() {
                var checkStatus = table.checkStatus('mainTable')
                    , data = checkStatus.data;
                if (checkStatus.data.length === 1) {
                    layer.open({
                        type: 2
                        , area: ['50%', '50%']
                        , title: '打印模版选择'
                        , shade: 0.6 //遮罩透明度
                        , maxmin: false //允许全屏最小化
                        , 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
                    })
                }
                else {
                    layer.msg('请选择一行数据打印!');
                }
            }
            //审核
            function set_CheckBill() {
                var checkStatus = table.checkStatus('mainTable')
                    , data = checkStatus.data;
                if (checkStatus.data.length === 1) {
                    var InterID = data[0].hmainid.toString();
                    //逻辑审核方法
                    var wait = layer.load();
                    $.ajax({
                        type: "GET",
                        url: GetWEBURL() + "/Sc_MouldProdInBill/set_CheckBill", //方法所在页面和方法名
                        data: { "HInterID": InterID, "CurUserName": sessionStorage["HUserName"] },
                        success: function (result) {
                            if (result.count == 1) {
                                layer.msg(result.Message, { time: 1 * 1000, icon: 1 }, function () {
                                    // å¾—到frame索引
                                    var index = layer.getFrameIndex(window.name);
                                    //关闭当前frame
                                    layer.close(index);
                                    //修改为功后刷新界面
                                    get_FastQuery(table, option);
                                });
                            } else {
                                layer.alert(result.Message, { icon: 5 });
                            }
                            layer.close(wait);
                        }, error: function () {
                            layer.close(wait);
                            layer.alert("接口请求失败!", { icon: 5 });
                        }
                    });
                }
                else {
                    layer.msg('请选择一行数据审核!');
                }
            }
            //反审核
            function set_AbandonCheck() {
                var checkStatus = table.checkStatus('mainTable')
                    , data = checkStatus.data;
                if (checkStatus.data.length === 1) {
                    var InterID = data[0].hmainid.toString();
                    //逻辑审核方法
                    var wait = layer.load();
                    $.ajax({
                        type: "GET",
                        url: GetWEBURL() + "/Sc_MouldProdInBill/set_AbandonCheck", //方法所在页面和方法名
                        data: { "HInterID": InterID, "CurUserName": sessionStorage["HUserName"] },
                        success: function (result) {
                            if (result.count == 1) {
                                layer.msg(result.Message, { time: 1 * 1000, icon: 1 }, function () {
                                    // å¾—到frame索引
                                    var index = layer.getFrameIndex(window.name);
                                    //关闭当前frame
                                    layer.close(index);
                                    //修改为功后刷新界面
                                    get_FastQuery(table, option);
                                });
                            } else {
                                layer.alert(result.code + result.Message, { icon: 5 });
                            }
                            layer.close(wait);
                        }, error: function () {
                            layer.close(wait);
                            layer.alert("接口请求失败!", { icon: 5 });
                        }
                    });
                }
                else {
                    layer.msg('请选择一行数据反审核!');
                }
            }
            //快速过滤
            function get_FastQuery(table, option) {
                var HBeginDate = $("#HBeginDate").val();//开始日期
                var HEndDate = $("#HEndDate").val();//结束日期
            function get_FastQuery() {
                var HDate = $("#HDate").val();//开始日期
                var HBillNo = $("#HBillNo").val(); //单据号
                var HDepartName = $("#HDepartName").val();
                var HMaterNumber = $("#HMaterNumber").val();
                var HMaterName = $("#HMaterName").val();
                var HMaterModel = $("#HMaterModel").val();
                var HMakerMan = $("#HMakerMan").val();
                if (HBeginDate) {
                    sWhere += " and CONVERT(varchar(100),日期, 23) >= '" + HBeginDate + "'";
                }
                if (HEndDate) {
                    sWhere += " and CONVERT(varchar(100),日期, 23) <= '" + HEndDate + "'";
                if (HDate) {
                    sWhere += " and CONVERT(varchar(100),日期, 23) >= '" + HDate + "'";
                }
                if (HBillNo) {
                    sWhere += " and å•据号 like '%" + HBillNo + "%'";
@@ -501,29 +270,22 @@
                if (HMaterName) {
                    sWhere += " and ç‰©æ–™åç§° like '%" + HMaterName + "%'";
                }
                if (HMaterModel) {
                    sWhere += " and è§„格型号 like '%" + HMaterModel + "%'";
                }
                if (HMakerMan) {
                    sWhere += " and åˆ¶å•人 like '%" + HMakerMan + "%'";
                }
                var index = layer.load(0);
                get_Display(sWhere);
                //调用接口后清空sWhere缓存
                sWhere = " where 1 = 1 ";
                set_ClearBill(sWhere);
                sWhere = "";
            }
            //重置过滤条件
            function set_ClearQuery() {
                $("#HBeginDate").val(Format(new Date(new Date() - 1000 * 60 * 60 * 24 * 30), "yyyy-MM-dd"));
                $("#HEndDate").val(Format(new Date(), "yyyy-MM-dd"));
                $("#HDate").val(Format(new Date(new Date() - 1000 * 60 * 60 * 24 * 30), "yyyy-MM-dd"));
                $("#HBillNo").val("");
                $("#HDepartName").val("");
                $("#HMaterNumber").val("");
                $("#HMaterName").val("");
                $("#HMaterModel").val("");
                $("#HMakerMan").val("");
                sWhere = " where 1 = 1 ";
                get_Display(sWhere);
                sWhere = " ";
                get_FastQuery();
            }
            //刷新
            function set_Refresh() {
WebTM/views/³µ¼ä¹ÜÀí/±¨±í·ÖÎö/Sc_StationInBillList.html
@@ -70,6 +70,7 @@
                                <!--<button type="button" class="layui-btn layui-btn-sm" lay-event="btn-audit"><i class="layui-icon layui-icon-repeat"></i>审核</button>
                                <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-Faudit"><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="SetExcel"><i class="layui-icon layui-icon-return"></i>Excel表格导出</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>
@@ -139,7 +140,8 @@
                    //优先级
                    case 'btn-yxj': set_Yxj();
                        break;
                    case 'btn-back': set_Back();
                    //Excel表格导出
                    case 'SetExcel': SetExcel();
                        break;
                };
            });
@@ -170,9 +172,7 @@
                    , { field: '进站时间', title: '进站时间', width: 160 }
                    , { field: '制单人', title: '制单人', width: 200 }
                    , { 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>" }
                ];
                option = {
                    elem: '#mainTable'
@@ -299,6 +299,36 @@
                    layer.msg('请选择一行数据删除!');
                }
            }
            //Excel表格导出
            function SetExcel() {
                layer.confirm("确定导出所有数据吗", { title: "导出确认" }, function (index) {
                    var wait = layer.load();
                    $.ajax({
                        type: "GET",
                        url: GetWEBURL() + "/Sc_PackUnionBill/Sc_StationInBillSetExcel",
                        success: function (result) {
                            if (result.count == 1) {
                                layer.msg(result.Message, { time: 1 * 1000, icon: 1 }, function () {
                                    // å¾—到frame索引
                                    var index = layer.getFrameIndex(window.name);
                                    //关闭当前frame
                                    layer.close(index);
                                    //修改为功后刷新界面
                                    window.location.reload();
                                });
                            } else {
                                layer.alert(result.code + result.Message, { icon: 5 });
                            }
                            layer.close(wait);
                        }, error: function () {
                            layer.close(wait);
                            layer.alert("接口请求失败!", { icon: 5 });
                        }
                    });
                })
            }
            //预览
            function get_ViewReport() {
                var checkStatus = table.checkStatus('mainTable')