智云SRM-LAYUI(夏宝服务器版本)
YL
2021-12-17 928efc9371c839b16d6de724eeb21dd29e4077e6
WebSRM/layuiAdmin.std-v1.2.1/src/views/SRM/SRM_POInStockBillList.html
@@ -75,10 +75,12 @@
                                    </div>
                                </div>
                                <div class="layui-inline">
                                    <label class="layui-form-label">关闭状态</label>
                                    <label class="layui-form-label">单据状态</label>
                                    <div class="layui-input-block">
                                        <select id="HClStatus" name="HClStatus" lay-filter="">
                                            <option value="">全部</option>
                                            <option value="审核">审核</option>
                                            <option value="审核">反审核</option>
                                            <option value="未关闭" selected="">未关闭</option>
                                            <option value="已关闭">已关闭</option>
                                        </select>
@@ -138,6 +140,7 @@
                        <div class="layui-btn-container">
                            <!--<button type="button" class="layui-btn layui-btn-sm" lay-event="btn-getCheckData"><i class="layui-icon layui-icon-tips"></i>预览</button>-->
                            <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-reload"><i class="layui-icon layui-icon-refresh"></i>刷新</button>
                            <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-Audit"><i class="layui-icon layui-icon-radio"></i>审核</button>
                            <!--<button type="button" class="layui-btn layui-btn-sm" lay-event="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"><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>
@@ -248,6 +251,7 @@
                , { field: 'hmainid', title: 'hmainid', sort: true, fixed: true, hide: true }
                , { field: 'hsubid', title: 'hsubid', sort: true, fixed: true, hide: true }
                , { field: '状态', title: '状态', width: 100, sort: true, fixed: true }
                    , { field: '单据状态', title: '单据状态', 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 }
@@ -271,7 +275,6 @@
                , { field: '源单类型', title: '源单类型', width: 80 }
                , { field: '采购订单号', title: '采购订单号', width: 180, sort: true, hide: true }
                , { field: '委外订单号', title: '委外订单号', width: 180, sort: true, hide: true }
                , { field: '关闭状态', title: '关闭状态', sort: true }
                , { field: '变更状态', title: '变更状态', sort: true }
                , { field: '收料组织', title: '收料组织', sort: true }
                , { field: '采购组织', title: '采购组织', sort: true }
@@ -303,7 +306,45 @@
                        //case 'isAll':
                        //    layer.msg(checkStatus.isAll ? '全选' : '未全选');
                        //    break;
                    //审核
                    case 'btn-Audit':
                        var checkStatus = table.checkStatus('mainTable')
                            , data = checkStatus.data;
                        var InterID = "";
                        if (checkStatus.data.length > 0) {
                            for (var i = 0; i < checkStatus.data.length; i++) {
                                InterID += data[i].hmainid.toString() + ",";
                            }
                            InterID = InterID.substring(0, InterID.length - 1);
                            //逻辑审核方法
                            $.ajax({
                                type: "GET",
                                // var WEBURL = "";    //章紫柔本地配置
                                //url: "http://localhost:8082/LuBaoAPI//AuditPOInStockBill", //方法所在页面和方法名
                                url: GetWEBURL() + "/AuditPOInStockBill",
                                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);
                                            //修改为功后刷新界面
                                            $("#btnSearch").trigger('click');
                                        });
                                    } else {
                                        layer.alert(result.code + result.Message, { icon: 5 });
                                    }
                                }, error: function () {
                                    layer.alert("接口请求失败!", { icon: 5 });
                                }
                            });
                        }
                        else {
                            layer.msg('请选择数据!');
                        }
                        //自定义头工具栏右侧图标 - 提示
                    case 'btn-reload':
                        _cur_page = $(".layui-laypage-em").next().html();
@@ -355,6 +396,16 @@
                    case 'btn-print':
                        var checkStatus = table.checkStatus('mainTable')
                        , data = checkStatus.data;
                        if (data.length == 0) {
                            layer.msg("请选择数据", { icon: 5 });
                            return;
                        }
                        for (var i = 0; i < data.length; i++) {
                            if (data[i].单据状态 != "审核") {
                                layer.msg("选中行未审核", { icon: 5 });
                                return;
                            }
                        }
                        layer.open({
                              type: 2
                            , area: ['50%', '50%']
@@ -376,8 +427,7 @@
                        if (data[0].未生成条码数量 <= 0) {
                            layer.msg("选中行已生成条码!", { icon: 5 });
                        }
                        else
                        {
                        else {
                        layer.open({
                            type: 2
                             , area: ['100%', '100%']
@@ -435,12 +485,10 @@
            form.on('submit(f_Query)', function (data) {//查询
                var sqlWhere = " and 1=1 ";
                if ($("#HStatus").val() != "")
                    if ($("#HStatus").val() == "未生成条码")
                    {
                    if ($("#HStatus").val() == "未生成条码") {
                        sqlWhere += " and 未生成条码数量 > 0";
                    }
                    else
                    {
                    else {
                        sqlWhere += " and 状态 like ^^%" + $("#HStatus").val() + "%^^";
                    }
@@ -455,7 +503,7 @@
                if ($("#HModel").val() != "")
                    sqlWhere += " and 规格型号 like ^^%" + $("#HModel").val() + "%^^";
                if ($("#HClStatus").val() != "")
                    sqlWhere += " and 关闭状态 like ^^%" + $("#HClStatus").val() + "%^^";
                    sqlWhere += " and 单据状态 like ^^%" + $("#HClStatus").val() + "%^^";
                if ($("#HPURCHASEORGID").val() != "")
                    sqlWhere += " and 采购组织 like ^^%" + $("#HPURCHASEORGID").val() + "%^^";
                if ($("#HDate1").val() != "") {