yxj
2023-07-06 6dc0ba931520275a17bccd10139e83c81805f46e
WebTM/views/ÑéÊÕÈë¿â/Í⹺Èë¿â/Kf_POStockInBill_FastList.html
@@ -135,7 +135,7 @@
            //退出
            form.on('submit(cmdCancel)', function () {
                layer.confirm('您确定要退出吗?', { icon: 3, title: '提示' }, function (index) {
                    parent.location.href = "../../../views/index.html";
                    parent.location.href = "../../../views/index_Mobile.html"
                });
                //parent.location.href = "../../../views/index.html"
                //window.close();//关闭当前页
@@ -144,27 +144,61 @@
            form.on('submit(cmdModify)', function () {
                var checkStatus = table.checkStatus('dj-table')
                    , data = checkStatus.data;
                //ajaxLabelData = data;
                //layer.alert(rows);
                layer.open({
                    type: 2
                    , area: ['100%', '100%']
                    , title: '外购入库单'
                    , shade: 0.6 //遮罩透明度
                    , maxmin: false //允许全屏最小化
                    , anim: 0 //0-6的动画形式,-1不开启
                    , content: ['../../验收入库/外购入库/Kf_POStockInBill_Fast.html?linterid=' + data[0].HInterID, 'yes']
                    , resize: false
                    , cancel: function () {
                        $(".layui-btn").removeClass("layui-btn-disabled");
                $.ajax({
                    type: "GET",
                    url: GetWEBURL() + "/WEBSController/TempList_Modify_Json",
                    async: false,    //async用于控制(false)同步和(true)异步,默认的是true,即请求默认的是异步请求
                    data: { "HInterID": data[0].HInterID, "HBillNo": data[0].HBillNo, "HBillType": sBillType },
                    success: function (result) {
                        if (result.count == 1) { // è¯´æ˜ŽéªŒè¯æˆåŠŸäº†ï¼Œ
                            layer.open({
                                type: 2
                                , area: ['100%', '100%']
                                , title: '采购入库单'
                                , shade: 0.6 //遮罩透明度
                                , maxmin: false //允许全屏最小化
                                , anim: 0 //0-6的动画形式,-1不开启
                                , content: ['../../验收入库/外购入库/Kf_POStockInBill_Fast.html?OperationType=2&HInterID=' + data[0].HInterID, 'yes']
                                , resize: false
                                , cancel: function () {
                                    $(".layui-btn").removeClass("layui-btn-disabled");
                                }
                            })
                        }
                        else {
                            layer.msg(result.Message, { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示" });
                        }
                    },
                    error: function (err) {
                        layer.msg("错误" + err, { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示" });
                    }
                })
                });
            });
            ////编辑
            //form.on('submit(cmdModify)', function () {
            //    var checkStatus = table.checkStatus('dj-table')
            //        , data = checkStatus.data;
            //    //ajaxLabelData = data;
            //    //layer.alert(rows);
            //    layer.open({
            //        type: 2
            //        , area: ['100%', '100%']
            //        , title: '外购入库单'
            //        , shade: 0.6 //遮罩透明度
            //        , maxmin: false //允许全屏最小化
            //        , anim: 0 //0-6的动画形式,-1不开启
            //        , content: ['../../验收入库/外购入库/Kf_POStockInBill_Fast.html?linterid=' + data[0].HInterID, 'yes']
            //        , resize: false
            //        , cancel: function () {
            //            $(".layui-btn").removeClass("layui-btn-disabled");
            //        }
            //    })
            //});
            //刷新
            form.on('submit(cmdRefresh)', function () {//
                var sBillType = '1201'
                //动态列-刷新缓存列表
                table.render(option);
                ////动态列-刷新缓存列表
                //table.render(option);
                table.render({
                    elem: '#yd-table'
                    , url: GetWEBURL() + '/Web/DisBillUpdateLoad_Json'
@@ -311,108 +345,108 @@
                });
            });
            ////缓存列表
            //table.render({
            //    elem: '#dj-table'
            //    , url: GetWEBURL() + '/Web/DisBillEntryList_Mate_Webs_Json'
            //    , toolbar: '#toolbarDemo'
            //    , where: { HBillType: sBillType, sHMaker: sessionStorage["HUserName"], HOrgID: sessionStorage["OrganizationID"] }
            //    , cols: [[
            //        { type: 'radio' }
            //        , { field: 'HInterID', title: '单据内码', width: 120 }
            //        , { field: 'HBillNo', title: '单据号', width: 150 }
            //        , { field: 'HMaker', title: '制单人', width: 120 }
            //        , { field: 'HMakeDate', title: '制单日期', width: 150 }
            //        , { field: 'HQty', title: '数量', width: 100 }
            //        , { field: 'HSourceBillNo', title: '源单单号', width: 150 }
            //        , { field: 'HRedBlueFlag', title: '红蓝字', width: 120 }
            //        , { field: 'HSourceBillType', title: '源单类型', width: 100 }
            //    ]]
            //    , height: 500
            //    , done: function () {
            //        layer.closeAll("loading");
            //    }
            //})
            //动态列-缓存列表
            $.ajax({
                url: GetWEBURL() + "/Web/DisBillEntryList_Mate_Webs_Json",
                type: "GET",
                async: false,
                data: { HBillType: sBillType, sWhere: '' },
                //async: false,
                success: function (data1) {
                    if (data1.count == 1) {
                        var data = [];
                        var col = [];
                        //给空的数组赋值
                        for (var key in data1.list) {
                            data.push({ "id": data1.list[key].ColmCols, "name": data1.list[key].ColmCols, "Type": data1.list[key].ColmType });
                        }
                        //在列表左边添加勾选框
                        col.push({ type: 'radio', fixed: 'left' });
                        for (var i = 0; i < data.length; i++) {
                            if ($.inArray(data[i].name, "") > -1) {
                                col.push({ field: data[i].id, title: data[i].name, align: 'center', hide: true }); //隐藏id列
                            }
                            else {
                                switch (data[i].Type) {
                                    //int
                                    case 'DateTime':
                                        col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: true, templet: "<div>{{d." + data[i].name + " ==null ?'':layui.util.toDateString(d." + data[i].name + ", 'yyyy-MM-dd HH:mm:ss')}}</div>", width: 200 });
                                        break;
                                    default:
                                        col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: true, width: 200 });
                                }
                            }
                        }
                        option = {
                            elem: '#dj-table'
                            , toolbar: '#toolbarDemo'
                            , height: 500
                            , page: true //开启分页
                            , limit: 50
                            , limits: [50, 500, 5000, 20000]
                            , cols: [col]
                            , data: data1.data
                        };
                        table.render(option);
                    } else {
                        option = {
                            elem: '#dj-table'
                            , toolbar: '#toolbarDemo'
                            , height: 500
                            , page: true //开启分页
                            , limit: 50
                            , limits: [50, 500, 5000, 20000]
                            , cols: [[
                                { type: 'radio' }
                                , { field: 'HMakeDate', title: '制单日期', width: 150 }
                                , { field: 'HBillNo', title: '单据号', width: 150 }
                                , { field: 'HMaterName', title: '物料名称', width: 150 }
                                , { field: 'HQty', title: '数量', width: 100 }
                            ]]
                            , data: []
                        };
                        table.render(option);
                    }
                },
                error: function (err) {
                    layer.msg('错误' + err, {
                        icon: 5,
                        time: 20000
                    }, function () {
                        //do something
                    });
            //缓存列表
            table.render({
                elem: '#dj-table'
                , url: GetWEBURL() + '/Web/chanpinruk'
                , toolbar: '#toolbarDemo'
                , where: { HBillType: sBillType, sHMaker: sessionStorage["HUserName"], HOrgID: sessionStorage["OrganizationID"] }
                , cols: [[
                    { type: 'radio' }
                    , { field: '单据内码', title: '单据内码', width: 120 }
                    , { field: '单据号', title: '单据号', width: 150 }
                    , { field: '制单人', title: '制单人', width: 120 }
                    , { field: '制单日期', title: '制单日期', width: 150 }
                    , { field: '数量', title: '数量', width: 100 }
                    , { field: '源单单号', title: '源单单号', width: 150 }
                    , { field: '红蓝字', title: '红蓝字', width: 120 }
                    , { field: '源单类型', title: '源单类型', width: 100 }
                ]]
                , height: 500
                , done: function () {
                    layer.closeAll("loading");
                }
            })
            ////动态列-缓存列表
            //$.ajax({
            //    url: GetWEBURL() + "/Web/DisBillEntryList_Mate_Webs_Json",
            //    type: "GET",
            //    async: false,
            //    data: { HBillType: sBillType, sWhere: '' },
            //    //async: false,
            //    success: function (data1) {
            //        if (data1.count == 1) {
            //            var data = [];
            //            var col = [];
            //            //给空的数组赋值
            //            for (var key in data1.list) {
            //                data.push({ "id": data1.list[key].ColmCols, "name": data1.list[key].ColmCols, "Type": data1.list[key].ColmType });
            //            }
            //            //在列表左边添加勾选框
            //            col.push({ type: 'radio', fixed: 'left' });
            //            for (var i = 0; i < data.length; i++) {
            //                if ($.inArray(data[i].name, "") > -1) {
            //                    col.push({ field: data[i].id, title: data[i].name, align: 'center', hide: true }); //隐藏id列
            //                }
            //                else {
            //                    switch (data[i].Type) {
            //                        //int
            //                        case 'DateTime':
            //                            col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: true, templet: "<div>{{d." + data[i].name + " ==null ?'':layui.util.toDateString(d." + data[i].name + ", 'yyyy-MM-dd HH:mm:ss')}}</div>", width: 200 });
            //                            break;
            //                        default:
            //                            col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: true, width: 200 });
            //                    }
            //                }
            //            }
            //            option = {
            //                elem: '#dj-table'
            //                , toolbar: '#toolbarDemo'
            //                , height: 500
            //                , page: true //开启分页
            //                , limit: 50
            //                , limits: [50, 500, 5000, 20000]
            //                , cols: [col]
            //                , data: data1.data
            //            };
            //            table.render(option);
            //        } else {
            //            option = {
            //                elem: '#dj-table'
            //                , toolbar: '#toolbarDemo'
            //                , height: 500
            //                , page: true //开启分页
            //                , limit: 50
            //                , limits: [50, 500, 5000, 20000]
            //                , cols: [[
            //                    { type: 'radio' }
            //                    , { field: 'HMakeDate', title: '制单日期', width: 150 }
            //                    , { field: 'HBillNo', title: '单据号', width: 150 }
            //                    , { field: 'HMaterName', title: '物料名称', width: 150 }
            //                    , { field: 'HQty', title: '数量', width: 100 }
            //                ]]
            //                , data: []
            //            };
            //            table.render(option);
            //        }
            //    },
            //    error: function (err) {
            //        layer.msg('错误' + err, {
            //            icon: 5,
            //            time: 20000
            //        }, function () {
            //            //do something
            //        });
            //    }
            //})
            //已上传列表
            table.render({
                elem: '#yd-table'