智云SRM-LAYUI(夏宝服务器版本)
王 垚
2021-10-25 7715251bfcd0b0676431a6ac704cfa5f5abea7ab
采购订单 订单反馈状态 送货单 物流单号
1个文件已添加
5个文件已修改
575 ■■■■ 已修改文件
WebSRM/Scripts/webConfig.js 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebSRM/WebSRM.csproj 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebSRM/layuiAdmin.std-v1.2.1/src/views/PublicPage/OrderBackInfomation.html 251 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebSRM/layuiAdmin.std-v1.2.1/src/views/SRM/SRM_POInStockBill.html 59 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebSRM/layuiAdmin.std-v1.2.1/src/views/SRM/SRM_POInStockBillList.html 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebSRM/layuiAdmin.std-v1.2.1/src/views/SRM/SRM_POOrderBillList.html 260 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebSRM/Scripts/webConfig.js
@@ -1,9 +1,10 @@
function GetWEBURL()
{
    var WEBURL = "http://localhost:8083/WEB-API/";
    //var WEBURL = "http://localhost:8083/WEB-API/";
    //var WEBURL = "http://111.3.111.183:8083/WEB-API/";
    //var WEBURL = "http://10.0.2.11:8083/WEB-API/";
    //var WEBURL = "http://192.168.31.47:8083/WEB-API/";
    var WEBURL = "http://localhost:8082/srmAPI/";    //章紫柔本地配置
    
    return WEBURL
}
WebSRM/WebSRM.csproj
@@ -837,6 +837,7 @@
    <Content Include="layuiAdmin.std-v1.2.1\src\views\iframe\layer\iframe.html" />
    <Content Include="layuiAdmin.std-v1.2.1\src\views\index.html" />
    <Content Include="layuiAdmin.std-v1.2.1\src\layuiadmin\layui\JavaScript1.js" />
    <Content Include="layuiAdmin.std-v1.2.1\src\views\PublicPage\OrderBackInfomation.html" />
    <Content Include="layuiAdmin.std-v1.2.1\src\views\senior\echarts\bar.html" />
    <Content Include="layuiAdmin.std-v1.2.1\src\views\senior\echarts\line.html" />
    <Content Include="layuiAdmin.std-v1.2.1\src\views\senior\echarts\map.html" />
WebSRM/layuiAdmin.std-v1.2.1/src/views/PublicPage/OrderBackInfomation.html
New file
@@ -0,0 +1,251 @@
<!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 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/Scripts/json2.js"></script>
    <script src="../../layuiadmin/Scripts/jquery-1.4.1.js"></script>
    <script src="../../layuiadmin/layui/lay/modules/util.js"></script>
    <script src="../../../../Scripts/webConfig.js"></script>
    <style media="screen">
        .custom-tree-item-clicked {
            color: #FC9003
        }
    </style>
</head>
<body>
    <div class="layui-fluid">
        <div class="layui-col-md12">
            <div class="layui-card" style="padding: 1px">
                <div class="layui-card-body" style="padding: 1px;">
                    <form class="layui-form" action="" lay-filter="component-form-group">
                        <div class="layui-collapse">
                            <div class="layui-colla-item">
                                <div class="layui-form-item" style="border-top: solid 1px #F6F6F6;">
                                    <div class="layui-row" style="padding:10px 0">
                                        <div class="layui-col-xs3 layui-inline" style="width: 23%;display:none;">
                                            <div id="treeDepartment" lay-filter="treeDepartment" class="demo-tree demo-tree-box" style="height: 580px; overflow: scroll;"></div>
                                        </div>
                                        <div class="layui-col-xs12 layui-inline">
                                            <div class="layui-row">
                                                <div class="layui-inline">
                                                    <label class="layui-form-label">代码</label>
                                                    <div class="layui-input-block">
                                                        <input type="text" class="layui-input" name="HNumber" id="HNumber">
                                                    </div>
                                                </div>
                                                <div class="layui-inline">
                                                    <label class="layui-form-label">名称</label>
                                                    <div class="layui-input-block">
                                                        <input type="text" class="layui-input" name="HName" id="HName">
                                                    </div>
                                                </div>
                                                <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnSearch" id="btnSearch">
                                                    <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i>
                                                </button>
                                            </div>
                                            <div>
                                                <table class="" id="mainTable" lay-filter="mainTable"></table>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
    <script>
        var treeCkData = { id: 0 };
        var TagId = "";
        var TagParentId = "";
        layui.config({
            base: '../../layuiadmin/' //静态资源所在路径
        }).extend({
            index: 'lib/index', //主入口模块
        }).use(['tree', 'index', 'form', 'table', 'element', 'laypage', 'laydate'], function () {
            var $ = layui.$
                , admin = layui.admin
                , layer = layui.layer
                , table = layui.table
                , form = layui.form
                , element = layui.element
                , laypage = layui.laypage
                , laydate = layui.laydate
                , util = layui.util
                , tree = layui.tree
            var sWhere = " where HStopFlag=0 and HEndFlag<>'1' "; //树型100046  sessionStorage["OrganizationID"]
            var sWhere1 = " where HStopFlag=0 and HEndFlag=1 ";  //列表
            //tree.render({
            //    elem: '#treeDepartment',
            //    data: getData(sWhere),
            //    showCheckbox: false,     //是否显示复选框
            //    id: 'demoId',
            //    isJump: false, //是否允许点击节点时弹出新窗口跳转
            //    showLine: true,//是否开启连接线
            //    onlyIconControl: true,   //点击后不收缩
            //    click: function (obj) {
            //        //点击高光
            //        if (obj.data.id !== treeCkData.id) {
            //            $('div[data-id="' + obj.data.id + '"] span').eq(1).last().addClass("custom-tree-item-clicked");
            //            $('div[data-id="' + treeCkData.id + '"] span').eq(1).last().removeClass('custom-tree-item-clicked');
            //            treeCkData = obj.data;
            //            TagId = obj.data.id;
            //            TagParentId = obj.data.ParentID;
            //        }
            //        else {
            //            $('div[data-id="' + treeCkData.id + '"] span').eq(1).last().removeClass('custom-tree-item-clicked');
            //            treeCkData = { id: 0 };
            //            TagId = "";
            //            TagParentId = "";
            //        }
            //        $.ajax({
            //            url: GetWEBURL() + '/Gy_MaintenanceMode/OrderBackInfoCX',
            //            type: "GET",
            //            data: { "HInterID": obj.data.id },
            //            success: function (data1) {
            //                if (data1.count == 1) {
            //                    option.data = data1.data;
            //                    table.render(option);
            //                    layer.close(index);
            //                } else {
            //                    layer.close(index);
            //                    layer.alert(data1.code + data1.Message, { icon: 5 });
            //                }
            //            }, error: function () {
            //                layer.close(index);
            //                layer.alert("接口请求失败!", { icon: 5 });
            //            }
            //        });
            //    }
            //});
            var option = {
                elem: '#mainTable'
                //, toolbar: '#toolbarDemo'
                , height: 'full-120'
                , page: true
                , cellMinWidth: 90
                , cols: [[
                    { type: 'radio', fixed: 'left' }
                    , { field: 'HItemID', title: 'HItemID', sort: true, hide: true }
                    , { field: 'ParentID', title: 'ParentID', sort: true, hide: true }
                    , { field: 'HNumber', title: '订单反馈状态代码' }
                    , { field: 'HName', title: '订单反馈状态' }
                ]]
            };
            var index = layer.load(0, { shade: false });
            //进入页面显示的缓存列表
            $.ajax({
                url: GetWEBURL() + '/PublicPageMethod/OrderBackInfoList',
                type: "GET",
                data: { "sWhere": SeachFilter(sWhere1) },
                success: function (data1) {
                    if (data1.count == 1) {
                        option.data = data1.data;
                        table.render(option);
                        layer.close(index);
                    } else {
                        layer.close(index);
                        layer.alert(data1.code + data1.Message, { icon: 5 });
                    }
                }, error: function () {
                    layer.close(index);
                    layer.alert("接口请求失败!", { icon: 5 });
                }
            });
            //查询按钮
            form.on('submit(btnSearch)', function (data) {
                $.ajax({
                    url: GetWEBURL() + '/PublicPageMethod/OrderBackInfoList',
                    type: "GET",
                    data: { "sWhere": SeachFilter(sWhere1) },
                    success: function (data1) {
                        if (data1.count == 1) {
                            option.data = data1.data;
                            table.render(option);
                            layer.alert("查询成功", { icon: 1 });
                        } else {
                            layer.alert(data1.code + data1.Message, { icon: 5 });
                        }
                    }, error: function () {
                        layer.alert("接口请求失败!", { icon: 5 });
                    }
                });
                sWhere1 = "";//调用接口后清空sWhere缓存
            });
            //以上是layui模块
        });
        //查询树状数据
        function getData(sWhere) {
            var treeData;
            $.ajax({
                url: GetWEBURL() + '/Gy_MaintenanceMode/OrderBackInfoLoadTree',
                type: "GET",
                data: { "sWhere": sWhere },
                async: false,
                success: function (result) {
                    var data = result.data;
                    //生成数据对象集合
                    treeData = LoadTree(data);
                }
            });
            return treeData;
        }
        /**处理树形展示数据,要求有ID和ParentID、title字段**/
        function LoadTree(data) {
            let map = {};
            let treeData = [];
            data.forEach(it => {
                map[it.id] = it;    //ID为每个节点的id
            })
            //生成结果集
            data.forEach(it => {
                const parent = map[it.ParentID];   //ParentID为父节点的id
                if (parent) {
                    if (!Array.isArray(parent.children)) parent.children = [];
                    parent.children.push(it);
                } else {
                    treeData.push(it)
                }
            })
            return treeData;
        }
        function SeachFilter(sWhere1) {
            var HNumber = $("#HNumber").val();
            var HName = $("#HName").val();
            if (HNumber) {
                sWhere1 += " and HNumber like '%" + HNumber + "%'";
            }
            if (HName) {
                sWhere1 += " and HName like '%" + HName + "%'";
            }
            return sWhere1;
        }
    </script>
</body>
</html>
WebSRM/layuiAdmin.std-v1.2.1/src/views/SRM/SRM_POInStockBill.html
@@ -90,7 +90,12 @@
                                                        <input id="HDeptID" name="HDeptID" type="hidden" />
                                                    </div>
                                                </div>
                                                <div class="layui-col-xs3">
                                                    <label class="layui-form-label"> 物流单号:</label>
                                                    <div class="layui-input-inline">
                                                        <input class="layui-input" name="HDeliveryNo" id="HDeliveryNo"   autocomplete="off">
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
@@ -169,6 +174,7 @@
                    <table class="layui-hide" 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-Save"><i class="layui-icon layui-icon-tips"></i>保存</button>
                            <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-view"><i class="layui-icon layui-icon-tips"></i>预览</button>
                            <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-print"><i class="layui-icon layui-icon-print"></i>打印</button>
                            <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-reload"><i class="layui-icon layui-icon-refresh"></i>刷新</button>
@@ -240,6 +246,7 @@
                    $("#HEmpName").val(d.data[0].HEmpName);
                    $("#HManagerID").val(d.data[0].HManagerID);
                    $("#HManagerName").val(d.data[0].HManagerName);
                    $("#HDeliveryNo").val(d.data[0].HDeliveryNo);
                }
            });
        }
@@ -342,6 +349,30 @@
                        parent.layer.close(index); //再执行关闭
                        //layer.close(layer.index);
                        break;
                    case 'btn-Save':
                        var HDeliveryNo = $("#HDeliveryNo").val();
                        $.ajax(
                            {
                                type: "GET",
                                url: GetWEBURL() + "SavePOInStock", //方法所在页面和方法名
                                async: true,
                                data: { "HmainId": linterid, "HDeliveryNo": HDeliveryNo },
                                dataType: "json",
                                success: function (data) {
                                    if (data.Message.indexOf("成功") > 0) { // 说明验证成功了,
                                        layer.msg(data.Message, { icon: 1 });
                                    }
                                    else {
                                        layer.msg(data.Message, { icon: 5 });
                                    }
                                    layer.closeAll("loading");
                                },
                                error: function (err) {
                                    f_alert("错误:" + err);
                                }
                            });
                        break;
                };
        });
            form.on('submit(Saver)', function (data) {//保存
@@ -373,7 +404,31 @@
                });
                return false;
            });
            form.on('submit(Save)', function (data) {//更新物流单号
                //debugger;
                var HDeliveryNo = $("#HDeliveryNo").val();
                $.ajax(
                    {
                        type: "POST",
                        url: GetWEBURL() + "SavePOInStock", //方法所在页面和方法名
                        async: true,
                        data: { "HmainId": linterid, "HDeliveryNo": HDeliveryNo },
                        dataType: "json",
                        success: function (data) {
                            if (data.Message.indexOf("成功") > 0) { // 说明验证成功了,
                                layer.msg(data.Message, { icon: 1 });
                            }
                            else {
                                layer.msg(data.Message, { icon: 5 });
                            }
                            layer.closeAll("loading");
                        },
                        error: function (err) {
                            f_alert("错误:" + err);
                        }
                    });
                return false;
            });
WebSRM/layuiAdmin.std-v1.2.1/src/views/SRM/SRM_POInStockBillList.html
@@ -249,6 +249,7 @@
                , { field: '状态', title: '状态', width: 100, sort: true, fixed: true }
                , { field: '单据号', title: '单据号', width: 180, sort: true, fixed: true }
                , { field: '送货单号', title: '送货单号', width: 180, sort: true, fixed: true }
                , { field: '物流单号', title: '物流单号', width: 180, sort: true, fixed: true }
                , { field: '物料代码', title: '物料代码', width: 180, sort: true  }
                , { field: '物料名称', title: '物料名称', width: 180, sort: true  }
                , { field: '规格型号', title: '规格型号', width: 180, sort: true  }
WebSRM/layuiAdmin.std-v1.2.1/src/views/SRM/SRM_POOrderBillList.html
@@ -104,12 +104,12 @@
                                <div class="layui-inline">
                                    <label class="layui-form-label">采购组织</label>
                                    <div class="layui-input-block">
                                            <select id="HPURCHASEORGID" name="HPURCHASEORGID" lay-filter="">
                                                <option value="">组织1</option>
                                                <option value="">组织2</option>
                                            </select>
                                        </div>
                                        <select id="HPURCHASEORGID" name="HPURCHASEORGID" lay-filter="">
                                            <option value="">组织1</option>
                                            <option value="">组织2</option>
                                        </select>
                                    </div>
                                </div>
                                <div class="layui-inline">
                                    <label class="layui-form-label">是否已下推送货单</label>
                                    <div class="layui-input-block">
@@ -125,7 +125,7 @@
                                        <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i>
                                    </button>
                                </div>
                                </div>
                            </div>
                        </form>
                        <!--</div>-->
@@ -139,6 +139,7 @@
                            <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-report" id="btn_report"><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>
@@ -204,12 +205,12 @@
            index: 'lib/index' //主入口模块
        }).use(['index', 'form', 'laydate', 'code', 'table', 'element', 'layer'], function () {
            var $ = layui.$
            , admin = layui.admin
            , layer = layui.layer
            , laydate = layui.laydate
            , table = layui.table
            , form = layui.form
            , element = layui.element;
                , admin = layui.admin
                , layer = layui.layer
                , laydate = layui.laydate
                , table = layui.table
                , form = layui.form
                , element = layui.element;
            //常规用法
            laydate.render({
                elem: '#HDate1'
@@ -230,49 +231,50 @@
                , toolbar: '#toolbarDemo' //开启头部工具栏,并为其绑定左侧模板
                , defaultToolbar: ['filter', 'exports', 'print']
                // , where: { msg: "", NowPage: 1, OnePage: 10 }
              , cellMinWidth: 100
              , cols: [[
                //{ checkbox: true, fixed: true }
                 { type: 'checkbox', fixed: 'left' }
                //{ type: 'radio', fixed: true }
                , { field: 'sorderid', title: '序号', width: 80, fixed: true }
                , { field: 'hmainid', title: 'hmainid', sort: true, fixed: true, hide: true }
                , { field: 'hsubid', title: 'hsubid', sort: true, fixed: true, hide: true }
                , { field: '状态', title: '状态', sort: true, fixed: true }
                , { field: '单据号', title: '单据号', width: 180, sort: true, fixed: 'left' }
                , { field: '日期', title: '日期', width: 180, sort: true, fixed: 'left' }
                , { field: '供应商', title: '供应商', width: 180, sort: true, fixed: 'left' }
                , { field: '计划跟踪单号', title: '计划跟踪单号', sort: true, hide: true }
                , { field: '物料代码', title: '物料代码', width: 180, sort: true }
                , { field: '物料名称', title: '物料名称', width: 180, sort: true }
                , { field: '规格型号', title: '规格型号', width: 180, sort: true }
                , { field: '计量单位', title: '计量单位', width: 80, sort: true }
                , { field: '数量', title: '订货数量', sort: true }
                , { field: '交货地点', title: '交货地点', sort: true }
                , { field: '交货日期', title: '交货日期', width: 180, sort: true }
                , { field: '关联数量', title: '关联数量', sort: true }
                , { field: '未关联数量', title: '未关联数量', sort: true }
                , { field: '剩余入库数量', title: '剩余入库数量', sort: true }
                , { field: '剩余收料数量', title: '剩余收料数量', sort: true }
                , { field: '关闭状态', title: '关闭状态', sort: true }
                , { field: '变更状态', title: '变更状态', sort: true }
                , { field: '采购组织', title: '采购组织', sort: true }
                , { field: '确认人', title: '确认人', sort: true, hide: true }
                , { field: '确认日期', title: '确认日期', sort: true, hide: true }
                , { field: '驳回人', title: '驳回人', sort: true, hide: true }
                , { field: '驳回日期', title: '驳回日期', sort: true, hide: true }
                , { field: '驳回理由', title: '驳回理由', sort: true, hide: true }
              ]]
                , cellMinWidth: 100
                , cols: [[
                    //{ checkbox: true, fixed: true }
                    { type: 'checkbox', fixed: 'left' }
                    //{ type: 'radio', fixed: true }
                    , { field: 'sorderid', title: '序号', width: 80, fixed: true }
                    , { field: 'hmainid', title: 'hmainid', sort: true, fixed: true, hide: true }
                    , { field: 'hsubid', title: 'hsubid', sort: true, fixed: true, hide: true }
                    , { field: '状态', title: '状态', sort: true, fixed: true }
                    , { field: '反馈状态', title: '反馈状态', width: 100, fixed: true }
                    , { field: '单据号', title: '单据号', width: 180, sort: true, fixed: 'left' }
                    , { field: '日期', title: '日期', width: 180, sort: true, fixed: 'left' }
                    , { field: '供应商', title: '供应商', width: 180, sort: true, fixed: 'left' }
                    , { field: '计划跟踪单号', title: '计划跟踪单号', sort: true, hide: true }
                    , { field: '物料代码', title: '物料代码', width: 180, sort: true }
                    , { field: '物料名称', title: '物料名称', width: 180, sort: true }
                    , { field: '规格型号', title: '规格型号', width: 180, sort: true }
                    , { field: '计量单位', title: '计量单位', width: 80, sort: true }
                    , { field: '数量', title: '订货数量', sort: true }
                    , { field: '交货地点', title: '交货地点', sort: true }
                    , { field: '交货日期', title: '交货日期', width: 180, sort: true }
                    , { field: '关联数量', title: '关联数量', sort: true }
                    , { field: '未关联数量', title: '未关联数量', sort: true }
                    , { field: '剩余入库数量', title: '剩余入库数量', sort: true }
                    , { field: '剩余收料数量', title: '剩余收料数量', sort: true }
                    , { field: '关闭状态', title: '关闭状态', sort: true }
                    , { field: '变更状态', title: '变更状态', sort: true }
                    , { field: '采购组织', title: '采购组织', sort: true }
                    , { field: '确认人', title: '确认人', sort: true, hide: true }
                    , { field: '确认日期', title: '确认日期', sort: true, hide: true }
                    , { field: '驳回人', title: '驳回人', sort: true, hide: true }
                    , { field: '驳回日期', title: '驳回日期', sort: true, hide: true }
                    , { field: '驳回理由', title: '驳回理由', sort: true, hide: true }
                ]]
                //, skin: 'row' //表格风格
                // , even: true
            , page: true //是否显示分页
            , limits: [10, 20, 50, 100]
            , limit: 50 //每页默认显示的数量
                , page: true //是否显示分页
                , limits: [10, 20, 50, 100]
                , limit: 50 //每页默认显示的数量
                //, height: 500
            , done: function (res, curr, count) {
                _cur_page = curr;
                layer.closeAll("loading");
            }
                , done: function (res, curr, count) {
                    _cur_page = curr;
                    layer.closeAll("loading");
                }
            });
            //头工具栏事件
@@ -283,28 +285,28 @@
                        var data = checkStatus.data;
                        layer.alert(JSON.stringify(data));
                        break;
                        //case 'getCheckLength':
                        //    var data = checkStatus.data;
                        //    layer.msg('选中了:' + data.length + ' 个');
                        //    break;
                        //case 'isAll':
                        //    layer.msg(checkStatus.isAll ? '全选' : '未全选');
                        //    break;
                    //case 'getCheckLength':
                    //    var data = checkStatus.data;
                    //    layer.msg('选中了:' + data.length + ' 个');
                    //    break;
                    //case 'isAll':
                    //    layer.msg(checkStatus.isAll ? '全选' : '未全选');
                    //    break;
                        //自定义头工具栏右侧图标 - 提示
                    //自定义头工具栏右侧图标 - 提示
                    case 'btn-reload':
                        _cur_page = $(".layui-laypage-em").next().html();
                        RoadHBillNo(sql);
                        break;
                    case 'btn-confirm':
                        var checkStatus = table.checkStatus('mainTable')
                         , data = checkStatus.data;
                            , data = checkStatus.data;
                        _cur_page = $(".layui-laypage-em").next().html();
                        if (data[0]["状态"] == "未确认") {
                            layer.confirm('是否确认单据?', { icon: 3, title: '提示' }, function (index) {
                                $.ajax({
                                    type: "get",
                                    url: GetWEBURL()+"POOrderAccept",
                                    url: GetWEBURL() + "POOrderAccept",
                                    data: { "HInterID": data[0]["hmainid"].toString(), "HBillNo": data[0]["单据号"].toString(), "HUser": sessionStorage["HUserName"] },
                                    success: function (result) {
                                        if (result.count == 1) { // 说明验证成功了,
@@ -329,7 +331,7 @@
                        break;
                    case 'btn-back':
                        var checkStatus = table.checkStatus('mainTable')
                       , data = checkStatus.data;
                            , data = checkStatus.data;
                        _cur_page = $(".layui-laypage-em").next().html();
                        var HBackRemark;
                        if (data[0]["状态"] == "未确认") {
@@ -343,7 +345,7 @@
                                HBackRemark = value.toString();
                                $.ajax({
                                    type: "get",
                                    url: GetWEBURL()+"POOrderRefuse",
                                    url: GetWEBURL() + "POOrderRefuse",
                                    data: { "HInterID": data[0]["hmainid"].toString(), "HBillNo": data[0]["单据号"].toString(), "HUser": sessionStorage["HUserName"], "HBackRemark": HBackRemark },
                                    success: function (result) {
                                        if (result.count == 1) { // 说明验证成功了,
@@ -368,7 +370,7 @@
                        break;
                    case 'btn-details':
                        var checkStatus = table.checkStatus('mainTable')
                       , data = checkStatus.data;
                            , data = checkStatus.data;
                        var linterid = data[0].hmainid.toString();
                        //if (AllowLoadData(sSubStr) != false) {//非空验证
@@ -388,7 +390,7 @@
                        break;
                    case 'btn-generate':
                        var checkStatus = table.checkStatus('mainTable')
                        , data = checkStatus.data;
                            , data = checkStatus.data;
                        ajaxLabelData = data;
                        var rows = '';
                        var HEntry = '';
@@ -404,20 +406,20 @@
                            HEntry = HEntry.substring(0, HEntry.length - 1);
                            layer.msg("第" + HEntry + "行未确认!", { icon: 5 });
                        }
                        else{
                        layer.open({
                            type: 2
                            , area: ['100%', '100%']
                            , title: '送货单'
                            , shade: 0.6 //遮罩透明度
                            , maxmin: false //允许全屏最小化
                            , anim: 0 //0-6的动画形式,-1不开启
                            , content: ['../../views/SRM/SRM_POInStockBill_Edit.html?linterid=' + data[0].hmainid.toString() + '&lentryid=' + rows.toString() + '&lSourceBillType=1102', 'yes']
                            , resize: false
                            //, cancel: function () {
                            //    $(".layui-btn").removeClass("layui-btn-disabled");
                            //}
                        })
                        else {
                            layer.open({
                                type: 2
                                , area: ['100%', '100%']
                                , title: '送货单'
                                , shade: 0.6 //遮罩透明度
                                , maxmin: false //允许全屏最小化
                                , anim: 0 //0-6的动画形式,-1不开启
                                , content: ['../../views/SRM/SRM_POInStockBill_Edit.html?linterid=' + data[0].hmainid.toString() + '&lentryid=' + rows.toString() + '&lSourceBillType=1102', 'yes']
                                , resize: false
                                //, cancel: function () {
                                //    $(".layui-btn").removeClass("layui-btn-disabled");
                                //}
                            })
                        }
                        break;
                    case 'btn-exit':
@@ -425,6 +427,97 @@
                        //element.tabDelete('layadmin-layout-tabs', this);
                        parent.layui.admin.events.closeThisTabs();
                        //parent.layer.close(index);
                        break;
                    case 'btn-report':
                        var checkStatus = table.checkStatus('mainTable')
                            , data = checkStatus.data;
                        _cur_page = $(".layui-laypage-em").next().html();
                        var arr = new Array();
                        var checkStatus = table.checkStatus('mainTable'),
                            data = checkStatus.data;
                        if (checkStatus.data.length == 0) {
                            return layer.msg('请选择数据');
                        }
                        for (var i = 0; i < data.length; i++) {
                            arr.push(data[i].hmainid + '-' + data[i].hsubid);
                        }
                        var OrderBackId = "";
                        layer.open({
                            type: 2,
                            skin: 'layui-layer-rim', //加上边框
                            title: '订单反馈状态',
                            closeBtn: 1,
                            shift: 2,
                            area: ['80%', '80%'],
                            maxmin: true,
                            content: ['../PublicPage/OrderBackInfomation.html', 'yes'],
                            btn: ['确定', '取消']
                            , btn1: function (index, layero) {
                                //按钮【按钮一】的回调
                                var iframeWindow = window['layui-layer-iframe' + index]  //获取弹框页面
                                var checkStatus = iframeWindow.layui.table.checkStatus('mainTable');//获取table的elem:"#test"
                                if (checkStatus.data.length === 0) {
                                    return layer.msg('请选择数据');
                                }
                                OrderBackId = checkStatus.data[0].HItemID.toString();
                                $.ajax({
                                    url: GetWEBURL() + 'POOrderBack',
                                    //url: 'http://localhost:8082/LuBaoAPI/' + 'POOrderBack',
                                    async: false,
                                    type: "GET",
                                    dataType: "json",
                                    data: { "HmainidList": arr.toString(), "OrderBackId": OrderBackId },
                                    success: function (data1) {
                                        if (data1.Message.indexOf("成功") > 0) {
                                            layer.msg("操作成功", { time: 3 * 1000, icon: 1 }, function () {
                                                var index = layer.getFrameIndex(window.name);
                                                //关闭当前frame
                                                layer.close(index);
                                                //修改为功后刷新界面
                                                window.location.reload();
                                            });
                                        } else {
                                            layer.alert(data1.Message, { icon: 5 });
                                        }
                                    }, error: function (e) {
                                        layer.alert(data1.Message, { icon: 5 });
                                    }
                                });
                            }
                            , btn2: function (index, layero) {
                                //按钮【按钮二】的回调
                                //return false 开启该代码可禁止点击该按钮关闭
                            },
                            end: function () {
                            },
                            success: function (layero, index) {
                            }
                        });
                        //layer.confirm('是否确认单据?', { icon: 3, title: '提示' }, function (index) {
                        //    $.ajax({
                        //        type: "get",
                        //        url: GetWEBURL() + "POOrderAccept",
                        //        data: { "HInterID": data[0]["hmainid"].toString(), "HBillNo": data[0]["单据号"].toString(), "HUser": sessionStorage["HUserName"] },
                        //        success: function (result) {
                        //            if (result.count == 1) { // 说明验证成功了,
                        //                layer.msg(result.Message, { icon: 1 });
                        //                RoadHBillNo(sql);
                        //            }
                        //            else {
                        //                // $("#verifycode").click();
                        //                layer.msg(result.Message, { icon: 5 });
                        //            }
                        //            layer.closeAll("loading");
                        //        }
                        //    })
                        //    layer.close(index);
                        //});
                        break;
                };
            });
@@ -436,7 +529,7 @@
                where = sqlWhere;
                $.ajax({
                    type: "get",
                    url: GetWEBURL()+"GetPOOrderBill",
                    url: GetWEBURL() + "GetPOOrderBill",
                    async: true,
                    data: { "HSupNo": sessionStorage["HUserName"], "sqlWhere": sqlWhere },
                    success: function (result) {
@@ -482,15 +575,14 @@
                    sqlWhere += " and 日期 <= ^^" + $("#HDate2").val() + "^^";
                }
                if ($("#HISGenerate").val() != "") {
                    if ($("#HISGenerate").val() == "是")
                    {
                    if ($("#HISGenerate").val() == "是") {
                        sqlWhere += " and 未关联数量 <= 0";
                    }
                    else if ($("#HISGenerate").val() == "否") {
                        sqlWhere += " and 未关联数量 > 0";
                    }
                }
                var Time = $("#Time").val();
                var dd = new Date();