YL
2021-07-20 662404011a6a1d4e6d18f354476ad7ea695f09c4
WebTM/views/ÑéÊÕÈë¿â/ίÍâÈë¿â/Kf_EntrustInBill_Fast.html
@@ -236,7 +236,7 @@
    <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/timeFormat/timeFormat.js"></script>
    <script src="../../../layuiadmin/zgqCustom/zgqCustom.js"></script>
    <script>
        layui.config({
            base: '../../../layuiadmin/' //静态资源所在路径
@@ -244,11 +244,11 @@
            index: 'lib/index' //主入口模块
        }).use(['index', 'form', 'laydate', 'table', 'element'], function () {
            var $ = layui.$
            , admin = layui.admin
            , layer = layui.layer
            , table = layui.table
            , form = layui.form
            , element = layui.element;
                , admin = layui.admin
                , layer = layui.layer
                , table = layui.table
                , form = layui.form
                , element = layui.element;
            var RZ = "";
            var Flag = sessionStorage["SourceFlag"];
@@ -289,10 +289,9 @@
            var params = getUrlVars();
            var linterid = params[params[0]]; //从参数中获取 å•据内码
            var lSourceBillType = params[params[2]];  //从单据获取 æºå•类型
            //加载表头
            function  RoadBillMain(linterid)
            {
            function RoadBillMain(linterid) {
                $.ajax({
                    url: GetWEBURL() + "/Web/GetPonderationBill",
                    type: "GET",
@@ -314,8 +313,7 @@
            }
            //加载表体
            function RoadBillSub(linterid)
            {
            function RoadBillSub(linterid) {
                table.render({
                    elem: '#wl-table'
                    , url: GetWEBURL() + '/Kf_EntrustInBill/DisBillEntryList_Webs_Json'
@@ -323,15 +321,15 @@
                    , where: { HBillID: linterid, HBillType: '1210', sWhere: '' }
                    , cols: [[
                        { type: 'radio' }
                    , { 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: '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 }
                    ]]
                    , height: 500
                    , done: function () {
@@ -339,21 +337,21 @@
                    }
                });
            }
            //动态加载源单类型列表 new
            //判断是否新增
            if (linterid == null || linterid == 0) {
                //获取最大单据号 new
                $("#HInterID").val("");
                $("#HBillNo").val("");
                $.ajax({
                $("#HBillNo").val("");
                $.ajax({
                    url: GetWEBURL() + "/Web/GetMAXNum",
                    type: "GET",
                    data: { "HBillType": '1210' },
@@ -514,40 +512,40 @@
                {
                    layer.load(3);
                    $.ajax(
                    {
                        type: "POST",
                        //url: "http://61.130.49.162:9090/WMSAPI///Kf_EntrustInBill/set_SaveEntrustInBill_Json", //方法所在页面和方法名
                        //url: GetWEBURL() + "/Kf_EntrustInBill/set_SaveEntrustInBill_Json",
                        url: GetWEBURL() + "/Kf_EntrustInBill/set_SaveEntrustInBill_New_Json",
                        async: true,
                        data: { "oMain": sMainStr },
                        dataType: "json",
                        success: function (data) {
                            if (data.count == 1) { // è¯´æ˜ŽéªŒè¯æˆåŠŸäº†
                                layer.confirm("生成委外入库单" + data.Message + $("#HBillNo").val(), {
                                    icon: 1,
                                    skin: 'layui-layer-lan',
                                    closeBtn: 0,
                                    btn: ['新增'],
                                    btn2: function () {
                                        //parent.layui.admin.events.closeThisTabs();关闭页签
                                        //window.close();//关闭页面,浏览器有效,PDA无效
                                        parent.location.href = "../../../views/index.html"
                                    }//关闭
                        {
                            type: "POST",
                            //url: "http://61.130.49.162:9090/WMSAPI///Kf_EntrustInBill/set_SaveEntrustInBill_Json", //方法所在页面和方法名
                            //url: GetWEBURL() + "/Kf_EntrustInBill/set_SaveEntrustInBill_Json",
                            url: GetWEBURL() + "/Kf_EntrustInBill/set_SaveEntrustInBill_New_Json",
                            async: true,
                            data: { "oMain": sMainStr },
                            dataType: "json",
                            success: function (data) {
                                if (data.count == 1) { // è¯´æ˜ŽéªŒè¯æˆåŠŸäº†
                                    layer.confirm("生成委外入库单" + data.Message + $("#HBillNo").val(), {
                                        icon: 1,
                                        skin: 'layui-layer-lan',
                                        closeBtn: 0,
                                        btn: ['新增'],
                                        btn2: function () {
                                            //parent.layui.admin.events.closeThisTabs();关闭页签
                                            //window.close();//关闭页面,浏览器有效,PDA无效
                                            parent.location.href = "../../../views/index.html"
                                        }//关闭
                                    }
                                        , function () { window.location.reload(); }//新增
                                    );
                                }
                                , function () { window.location.reload(); }//新增
                                );
                                else {
                                    layer.msg(data.Message, { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示" });
                                }
                                layer.closeAll("loading");
                                layui.form.render();
                            },
                            error: function (err) {
                                layer.msg("错误:" + err, { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示" });
                            }
                            else {
                                layer.msg(data.Message, { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示" });
                            }
                            layer.closeAll("loading");
                            layui.form.render();
                        },
                        error: function (err) {
                            layer.msg("错误:" + err, { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示" });
                        }
                    });
                        });
                    return false;
                }
            });
@@ -564,7 +562,7 @@
            });
            //扫条码
            $('#HBarCode').on('keydown', function (event) {
            $('#HBarCode').on('keydown', function (event) {
                var sSubStr = table.cache['wl-table'];
                var sBarCode = $('#HBarCode').val()
                var sInterID = $("#HInterID").val()
@@ -672,8 +670,8 @@
                                        element.tabChange('tab-Kf_EntrustInBill', '3');
                                    }
                                    else {
                                        $("#HSupName").val(result.data.HSupName);
                                        $("#HSupID").val(result.data.HSupID);
                                        //$("#HSupName").val(result.data.HSupName);                20210719修改
                                        //$("#HSupID").val(result.data.HSupID);                    20210719修改
                                        //$("#HDeptName").val(result.data.HDeptName);
                                        //$("#HDeptID").val(result.data.HDeptID);
                                        $("#HSourceBillNo").val(result.data.HSourceBillNo);
@@ -700,13 +698,13 @@
                                //$("#HDeptName").val(result.data.HDeptName);
                                layer.load(3)
                                table.render({
                                    elem: '#wl-table'
                                      , url: GetWEBURL() + '/Kf_EntrustInBill/DisBillEntryList_Webs_Json'
                                      , toolbar: '#toolbarDemo'
                                      , where: { HBillID: sInterID, HBillType: '1210', sWhere: '' }
                                      , cellMinWidth: 90
                                      , cols: [[
                                          { type: 'radio' }
                                    elem: '#wl-table'
                                    , url: GetWEBURL() + '/Kf_EntrustInBill/DisBillEntryList_Webs_Json'
                                    , toolbar: '#toolbarDemo'
                                    , where: { HBillID: sInterID, HBillType: '1210', sWhere: '' }
                                    , cellMinWidth: 90
                                    , cols: [[
                                        { type: 'radio' }
                                        , { field: 'HQty', title: '数量', width: 150 }
                                        , { field: 'HQtyMust', title: '应收数量', width: 150 }
                                        , { field: 'HMaterNumber', title: '物料代码', width: 150 }
@@ -716,11 +714,11 @@
                                        , { field: 'HSourceEntryID', title: '源单子内码', width: 150 }
                                        , { field: 'HSourceBillNo', title: '源单单号', width: 150 }
                                        , { field: 'HBatchNo', title: '批次', width: 150 }
                                      ]]
                                      , height: 500
                                      , done: function () {
                                          layer.closeAll("loading");
                                      }
                                    ]]
                                    , height: 500
                                    , done: function () {
                                        layer.closeAll("loading");
                                    }
                                });
                            }
                            else {
@@ -744,7 +742,7 @@
            });
            //扫源单方法
            $('#HSourceBillNo').on('keydown', function (event) {
            $('#HSourceBillNo').on('keydown', function (event) {
                var HSourceBillNo = $('#HSourceBillNo').val()
                var sInterID = $("#HInterID").val()
                var sBillNo = $("#HBillNo").val()
@@ -768,27 +766,27 @@
                                table.render({
                                    elem: '#wl-table'
                                    //, url: 'http://61.130.49.162:9090/WMSAPI///Kf_EntrustInBill/DisBillEntryList_Webs_Json'
                                  , url: GetWEBURL() + '/Kf_EntrustInBill/DisBillEntryList_Webs_Json'
                                  , toolbar: '#toolbarDemo'
                                  , where: { HBillID: sInterID, HBillType: '1210', sWhere: '' }
                                  , cols: [[
                                      { type: 'radio' }
                                    , { 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 }
                                  ]]
                                    , url: GetWEBURL() + '/Kf_EntrustInBill/DisBillEntryList_Webs_Json'
                                    , toolbar: '#toolbarDemo'
                                    , where: { HBillID: sInterID, HBillType: '1210', sWhere: '' }
                                    , cols: [[
                                        { type: 'radio' }
                                        , { 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 }
                                    ]]
                                    // , data: [linterid]
                                    // , page: true
                                  , height: 500
                                  , done: function () {
                                      layer.closeAll("loading");
                                  }
                                    , height: 500
                                    , done: function () {
                                        layer.closeAll("loading");
                                    }
                                });
                            }
                            else {
@@ -804,7 +802,7 @@
            });
            //扫仓位
            $('#HStockPlaceName').on('keydown', function (event) {
            $('#HStockPlaceName').on('keydown', function (event) {
                var HBarCode = $('#HStockPlaceName').val()
                if (event.keyCode == 13) {
                    //判断文本框是否有数据    new
@@ -833,13 +831,13 @@
                // , url: 'http://localhost:8083/Kf_EntrustInBill/GetHBarCodeShowBillSub'
                //, toolbar: '#toolbarDemo'
                // , where: { sMsg: linterid, sMsg2: lentryid }
             , cols: [[
               , { field: 'HMaterID', title: '物料ID', width: 100, hide: true }
             ]]
             , page: true
             , height: 500
             , done: function () {
             }
                , cols: [[
                    , { field: 'HMaterID', title: '物料ID', width: 100, hide: true }
                ]]
                , page: true
                , height: 500
                , done: function () {
                }
            });
            //扫MES仓位
@@ -882,7 +880,7 @@
                }
            });
        //以上为layui模块
            //以上为layui模块
        });
        //清空表头
        //function f_ClearTitle() {