zzr99
2021-12-23 906536fbd9345db84adc1e18dc14596d8a6213bb
WebTM/views/ÁìÁÏ·¢»õ/ÏúÊÛ³ö¿â/Kf_SellOutBill_Fast.html
@@ -258,6 +258,10 @@
            , form = layui.form
            , element = layui.element;
            var option = [];
            //源单找货列表
            var ZHOption = {
                elem: '#zh-table'
@@ -302,6 +306,44 @@
            $("#HBillerID").hide();
            var HSourceFlag = sessionStorage["SourceFlag"];
            //初始化明细表格
            function set_InitGrid() {
                columns = [
                    { type: 'checkbox', fixed: 'left' }
                    , { templet: '#xuhao', title: '序号', sort: true, fixed: 'left', event: "qwe", width: 100 }
                    , { field: 'HQty', title: '数量', width: 150 }
                    , { field: 'HQtyMust', title: '应收数量', width: 150 }
                    , { field: 'HMaterNumber', title: '物料代码', width: 150 }
                    , { field: 'HMaterName', title: '物料名称', width: 150 }
                    , { field: 'HMaterModel', title: '规格型号', width: 150 }
                    , { field: 'HSourceInterID', title: '源单主内码', width: 150 }
                    , { field: 'HSourceEntryID', title: '源单子内码', width: 150 }
                    , { field: 'HSourceBillNo', title: '源单单号', width: 150 }
                    , { field: 'HBatchNo', title: '批次', width: 150 }
                    , { field: 'HInterID', title: '单据ID', width: 150, hide: true }
                    , { field: 'HBilltype', title: '单据类型', width: 150, hide: true }
                    , { field: 'Hbarcode', title: '条码编号', width: 150, hide: true }
                    , { field: 'HSCWHID', title: '调出仓库ID', width: 150, hide: true }
                    , { field: 'HSCSPID', title: '调出仓位ID', width: 150, hide: true }
                    , { field: 'HAuxPropID', title: '辅助属性ID', width: 150, hide: true }
                    , { field: 'HMTONo', title: 'MTO号', width: 150, hide: true }
                    , { field: 'HMaterID', title: '物料ID', width: 150, hide: true }
                ];
                option = {
                    id: 'wl-table'
                    , elem: '#wl-table'
                    , toolbar: '#toolbarDemo'
                    , page: false
                    , cellMinWidth: 120
                    , height: 500
                    , cols: [columns]
                    , limit: 500 //每页默认显示的数量
                    , done: function (res, curr, count) {
                    }
                };
            }
            //判断是否登录 æœªç™»å½•则跳到登录页
            if (sessionStorage.login != "login") {
                layer.confirm("登录失效,请重新登录!", {
@@ -339,12 +381,10 @@
                        $("#HBillNo").val(d.data[0].HBillNo);
                        $("#HBillType").val(d.data[0].HSourceBillType);
                        $("#HSourceBillNo").val(d.data[0].HSourceBillNo);
                        //$("#HWHID").val(d.data[0].HWhID);
                        //$("#HKeeperID").val(d.data[0].HKeeperID);
                        //$("#HSecManagerID").val(d.data[0].HSecManagerID);
                        //$("#HDeptID").val(d.data[0].HDeptID);
                        //$("#HBarCode").val(d.data[0].HBarCode);
                        //$("#HQty").val(d.data[0].HQty);
                        $("#HWHID").val(d.data[0].HWhID);
                        $("#HStockPlaceID").val(d.data[0].HSPID);
                        $("#HKeeperID").val(d.data[0].HKeeperID);
                        $("#HSecManagerID").val(d.data[0].HSecManagerID);
                        RoadSup();
                    }
                })
@@ -372,7 +412,7 @@
                                $("#HSupID").val(result.data[0].HSupID);
                                $("#HSupName").val(result.data[0].HSupName);
                                $("#HDeptID").val(result.data[0].HDeptID);
                                //$("#HDeptName").val(result.data[0].HDeptName);
                                $("#HDeptName").val(result.data[0].HDeptName);
                                //sessionStorage["SourceFlag"] = true;
                                element.tabChange('tab-SellOutBill', '2');
                                layer.load(3);
@@ -388,28 +428,46 @@
            function RoadBillSub(linterid)//加载表体-----不会走
            {
                table.render({
                    elem: '#wl-table'
                    , url: GetWEBURL() + '/SellOut/DisBillEntryList_Webs_Json'
                    , cellMinWidth: 80
                    , toolbar: '#toolbarDemo'
                    , where: { HBillID: linterid, HBillType: '1205', sWhere: '' }
                    , cols: [[
                        { type: 'radio' }
                    , { field: 'HQty', title: '数量', width: 80 }
                    , { field: 'HQtyMust', title: '应收数量', width: 80 }
                    , { field: 'HMaterNumber', title: '物料代码', width: 100 }
                    , { field: 'HMaterName', title: '物料名称', width: 100 }
                    , { field: 'HMaterModel', title: '规格型号', width: 100 }
                    , { field: 'HSourceInterID', title: '源单主内码', width: 100 }
                    , { field: 'HSourceEntryID', title: '源单子内码', width: 100 }
                    , { field: 'HSourceBillNo', title: '源单单号', width: 100 }
                    , { field: 'HBatchNo', title: '批次', width: 100 }
                    , { field: 'HAuxPropID', title: '辅助属性', width: 100 }
                    , { field: 'HMTONo', title: '计划跟踪号', width: 100 }
                    ]]
                    //, height: 500
                })
                $("#HInterID").val(linterid);//修改时主表ID
                //编辑加载数据
                $.ajax({
                    url: GetWEBURL() + 'SellOut/SellOutDetaiNew',
                    type: "GET",
                    data: { "HInterID": linterid },
                    success: function (result) {
                        if (result.count == 1) {
                            option.data = result.list[0];
                            table.render(option);
                        } else {
                            layer.alert(result.code + result.Message, { icon: 5 });
                        }
                    }, error: function () {
                        layer.close(index0);
                        layer.alert("接口请求失败!", { icon: 5 });
                    }
                });
                //table.render({
                //    elem: '#wl-table'
                //    , url: GetWEBURL() + '/SellOut/DisBillEntryList_Webs_Json'
                //    , cellMinWidth: 80
                //    , toolbar: '#toolbarDemo'
                //    , where: { HBillID: linterid, HBillType: '1205', sWhere: '' }
                //    , cols: [[
                //        { type: 'radio' }
                //    , { field: 'HQty', title: '数量', width: 80 }
                //    , { field: 'HQtyMust', title: '应收数量', width: 80 }
                //    , { field: 'HMaterNumber', title: '物料代码', width: 100 }
                //    , { field: 'HMaterName', title: '物料名称', width: 100 }
                //    , { field: 'HMaterModel', title: '规格型号', width: 100 }
                //    , { field: 'HSourceInterID', title: '源单主内码', width: 100 }
                //    , { field: 'HSourceEntryID', title: '源单子内码', width: 100 }
                //    , { field: 'HSourceBillNo', title: '源单单号', width: 100 }
                //    , { field: 'HBatchNo', title: '批次', width: 100 }
                //    , { field: 'HAuxPropID', title: '辅助属性', width: 100 }
                //    , { field: 'HMTONo', title: '计划跟踪号', width: 100 }
                //    ]]
                //    //, height: 500
                //})
            }
             
            //动态加载源单类型列表 new
@@ -435,6 +493,7 @@
                        $("#HBillNo").val(d.data[0].HBillNo);
                        //$("#HInterID").val('132522535');
                        //$("#HBillNo").val('421458026');
                        set_InitGrid();
                    }
                }); 
            }