chenhaozhe
2025-10-22 cbd3c6396a01e2f78ed4dc82154cdb913abecfa7
WebTM/views/³µ¼ä¹ÜÀí/²úÏß/RetrospectionCustomerReport.html
@@ -1,15 +1,21 @@
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>客诉追溯流程报表</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>客诉追溯流程报表</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <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/zgqCustom/zgqCustom.js"></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>
    <script src="../../../layuiadmin/Scripts/webConfig.js"></script>
    <script src="../../../layuiadmin/MESLanguage.js"></script>
</head>
<body>
    <div class="layui-fluid">
@@ -27,13 +33,13 @@
                                <div class="layui-inline">
                                    <label class="layui-form-label">开始时间</label>
                                    <div class="layui-input-block">
                                        <input type="date" class="layui-input" name="开始时间" id="开始时间">
                                        <input type="date" class="layui-input" name="HBeginDate" id="HBeginDate">
                                    </div>
                                </div>
                                <div class="layui-inline">
                                    <label class="layui-form-label">结束时间</label>
                                    <div class="layui-input-block">
                                        <input type="date" class="layui-input" name="结束时间" id="结束时间">
                                        <input type="date" class="layui-input" name="HEndDate" id="HEndDate">
                                    </div>
                                </div>
                                <div class="layui-inline">
@@ -93,10 +99,7 @@
            </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/webConfig2.js"></script>
    <script>
        layui.config({
            base: '../../../layuiadmin/' //静态资源所在路径
@@ -111,94 +114,78 @@
                , element = layui.element
                , laypage = layui.laypage
                , laydate = layui.laydate
                , util = layui.util;
            //var sWhere = " äº§å“ä»£ç  = 'BX0002'";
                , util = layui.util;
            var sWhere = "";
            var option = {
                elem: '#mainTable'
                , toolbar: '#toolbarDemo'
                //, height: 'full-10'
                , page: true
                , limit: 50
                , limits: [50, 500, 5000, 20000]
                , cols: [[
                    {
                        field: '组托单日期', title: '组托单日期', sort: true,width:115, templet: function (d) {
                            if (d.组托单日期 == null) {
                                return "";
            //#region åˆå§‹åŒ–界面
            set_ClearBill();
            //#endregion
            // åˆå§‹åŒ–界面
            function set_ClearBill() {
                //初始化表格
                set_InitGrid();
                //初始化日期
                $("#HBeginDate").val(Format(new Date(new Date() - 1000 * 60 * 60 * 24 * 2), "yyyy-MM-dd"));
                $("#HEndDate").val(Format(new Date(), "yyyy-MM-dd"));
                get_FastQuery();
            }
            //表格数据
            function set_InitGrid() {
                var option = {
                    elem: '#mainTable'
                    , toolbar: '#toolbarDemo'
                    , page: true
                    , limit: 50
                    , limits: [50, 500, 5000, 20000]
                    , cols: [[
                        {
                            field: '组托单日期', title: '组托单日期', sort: true, width: 115, templet: function (d) {
                                if (d.组托单日期 == null) {
                                    return "";
                                }
                                return util.toDateString(d.组托单日期, "yyyy-MM-dd");
                            }
                            return util.toDateString(d.组托单日期, "yyyy-MM-dd");
                        }
                        , { field: '任务单', title: '任务单', width: 140 }
                        , { field: '物料编码', title: '物料编码', width: 140 }
                        , { field: '物料名称', title: '物料名称', width: 120 }
                        , { field: '规格型号', title: '规格型号', width: 120 }
                        , { field: '生产流转卡号', title: '生产流转卡号', width: 130 }
                        , { field: '托盘号', title: '托盘号', width: 160 }
                        , { field: '黑标号', title: '黑标号', width: 80 }
                        , { field: '白标号', title: '白标号', width: 100 }
                        , { field: '包装单号', title: '包装单号', width: 130 }
                        , { field: '包装单条码', title: '包装单条码', width: 170 }
                        , { field: '镭雕码包装子件条码', title: '镭雕码包装子件条码', width: 160 }
                    ]]
                    , text: {
                        none: '暂无相关数据!'
                    }
                    , { field: '任务单', title: '任务单', width: 140 }
                    , { field: '物料编码', title: '物料编码', width: 140 }
                    , { field: '物料名称', title: '物料名称', width: 120 }
                    , { field: '规格型号', title: '规格型号', width: 120 }
                    , { field: '生产流转卡号', title: '生产流转卡号', width: 130 }
                    , { field: '托盘号', title: '托盘号', width: 160 }
                    , { field: '黑标号', title: '黑标号', width: 80 }
                    , { field: '白标号', title: '白标号', width: 100 }
                    , { field: '包装单号', title: '包装单号', width: 130 }
                    , { field: '包装单条码', title: '包装单条码', width: 170 }
                    , { field: '镭雕码包装子件条码', title: '镭雕码包装子件条码', width: 160 }
                ]]
                , text: {
                    none: '暂无相关数据!'
                }
            };
                };
            option.data = [];
            table.render(option);
                option.data = [];
                table.render(option);
            }
            //进入页面显示的列表
            layer.load(3);
            $.ajax({
                //url: "http://61.130.49.162:9090/WMSAPI///Web/GetMAXNum",
                url: GetWEBURL() + '/Report/RetrospectionCustomerReport',
                type: "GET",
                data: { "sWhere": sWhere },
                success: function (data1) {
                    if (data1.count == 1) {
                        option.data = data1.data;
                        table.render(option);
                        layer.closeAll("loading");
                    } else {
                        layer.closeAll("loading");
                        layer.alert(data1.code + data1.Message, { icon: 5 });
                    }
                }, error: function () {
                    layer.alert("接口失效!", { icon: 5 });
                }
            });
            //重置按钮
            form.on('submit(btnReSearch)', function (data) {
                $("#开始时间").val("");
                $("#结束时间").val("");
                $("#黑标号").val("");
                $("#托盘号").val("");
                $("#包装单号").val("");
                $("#白标号").val("");
                $("#镭雕码").val("");
                $("#btnSearch").click();
            });
            //查询按钮
            form.on('submit(btnSearch)', function (data) {
                var å¼€å§‹æ—¶é—´ = $("#开始时间").val();
                var ç»“束时间 = $("#结束时间").val();
            // å¿«é€Ÿè¿‡æ»¤
            function get_FastQuery() {
                var HDate = $("#HBeginDate").val();//开始日期
                var HDate1 = $("#HEndDate").val();//结束日期
                var é»‘标号 = $("#黑标号").val();
                var æ‰˜ç›˜å· = $("#托盘号").val();
                var åŒ…装单号 = $("#包装单号").val();
                var ç™½æ ‡å· = $("#白标号").val();
                var é•­é›•码 = $("#镭雕码").val();
                if (开始时间) {
                    sWhere += " and ç»„托单日期 > '" + å¼€å§‹æ—¶é—´ + "'";
                if (HDate) {
                    sWhere += " and ç»„托单日期 >= '" + HDate + "'";
                }
                if (结束时间) {
                    sWhere += " and ç»„托单日期 < '" + ç»“束时间 + "'";
                if (HDate1) {
                    sWhere += " and ç»„托单日期 <='" + HDate1 + "'";
                }
                if (黑标号) {
                    sWhere += " and é»‘标号 like '%" + é»‘标号 + "%'";
@@ -215,6 +202,26 @@
                if (镭雕码) {
                    sWhere += " and é•­é›•码包装子件条码 like '%" + é•­é›•码 + "%'";
                }
                get_Display(sWhere);
                sWhere = "";//调用接口后清空sWhere缓存
            }
            // é‡ç½®è¿‡æ»¤æ¡ä»¶
            function set_ClearQuery() {
                $("#HBeginDate").val(Format(new Date(new Date() - 1000 * 60 * 60 * 24 * 2), "yyyy-MM-dd"));
                $("#HEndDate").val(Format(new Date(), "yyyy-MM-dd"));
                $("#黑标号").val("");
                $("#托盘号").val("");
                $("#包装单号").val("");
                $("#白标号").val("");
                $("#镭雕码").val("");
                get_FastQuery();
                sWhere = "";
            }
            //进入页面显示的缓存列表
            function get_Display(sWhere) {
                layer.load(3);
                $.ajax({
                    //url: "http://61.130.49.162:9090/WMSAPI///Web/GetMAXNum",
                    url: GetWEBURL() + '/Report/RetrospectionCustomerReport',
@@ -224,15 +231,25 @@
                        if (data1.count == 1) {
                            option.data = data1.data;
                            table.render(option);
                            //layer.alert("查询成功", { icon: 1 });
                            layer.closeAll("loading");
                        } else {
                            layer.closeAll("loading");
                            layer.alert(data1.code + data1.Message, { icon: 5 });
                        }
                    }, error: function () {
                        layer.alert("接口失效!", { icon: 5 });
                    }
                });
                sWhere = "";//调用接口后清空sWhere缓存
            }
            //重置按钮
            form.on('submit(btnReSearch)', function (data) {
                set_ClearQuery();
            });
            //查询按钮
            form.on('submit(btnSearch)', function (data) {
                get_FastQuery();
            });