zgq
2021-03-29 9451b3f86064ca3c94e1eca0c7e2b4cdba648842
WebTM/views/ÁìÁÏ·¢»õ/ÏúÊÛ³ö¿â/Kf_SellOutBill_Fast.html
@@ -35,9 +35,11 @@
                            <li lay-id="2" style="padding:1px;">单据信息</li>
                            <li lay-id="3" style="padding:1px;">物料清单</li>
                            <li lay-id="4" style="padding:1px;">明细清单</li>
                            <li lay-id="5" style="padding:1px;">日志</li>
                            <li lay-id="5" style="padding:1px;">源单找货</li>
                            <li lay-id="6" style="padding:1px;">日志</li>
                        </ul>
                        <div class="layui-tab-content">
                            <!--源单信息-->
                            <div class="layui-tab-item layui-show">
                                <div class="layui-form-item">
                                    <div class="layui-row">
@@ -63,6 +65,7 @@
                                    </div>
                                </div>
                            </div>
                            <!--单据信息-->
                            <div class="layui-tab-item">
                                <div class="layui-form-item" style="padding:0px;margin:0px">
                                    <div class="layui-row">
@@ -174,17 +177,18 @@
                                    </div>
                                </div>
                            </div>
                            <!--物料清单-->
                            <div class="layui-tab-item">
                                <!--<div class="layui-form-item" style="padding:0px;margin:0px">
                            <div class="layui-row">
                                <div class="layui-col-xs4">
                                    <label class="layui-form-label" style="width:40px;padding-left:0px;">条码</label>
                                </div>
                                <div class="layui-col-xs8">
                                    <input type="text" name="HBarCode" id="HBarCode" lay-verify="HBarCode" autocomplete="off" class="layui-input">
                                </div>
                            </div>
                        </div>-->
            <div class="layui-row">
                <div class="layui-col-xs4">
                    <label class="layui-form-label" style="width:40px;padding-left:0px;">条码</label>
                </div>
                <div class="layui-col-xs8">
                    <input type="text" name="HBarCode" id="HBarCode" lay-verify="HBarCode" autocomplete="off" class="layui-input">
                </div>
            </div>
        </div>-->
                                <div class="layui-form-item" style="padding:0px;margin:0px">
                                    <div class="layui-row">
                                        <div class="layui-col-xs3">
@@ -197,9 +201,15 @@
                                </div>
                                <table class="layui-hide" id="wl-table" lay-filter="wl-table"></table>
                            </div>
                            <!--明细清单-->
                            <div class="layui-tab-item">
                                <table class="layui-hide" id="mx-table" lay-filter="mx-table"></table>
                            </div>
                            <!--源单找货-->
                            <div class="layui-tab-item">
                                <table class="layui-hide" id="zh-table" lay-filter="zh-table"></table>
                            </div>
                            <!--日志-->
                            <div class="layui-tab-item">
                                <table class="layui-hide" id="fj-table-qd" lay-filter="fj-table-qd"></table>
                            </div>
@@ -247,6 +257,29 @@
            , table = layui.table
            , form = layui.form
            , element = layui.element;
            //源单找货列表
            var ZHOption = {
                elem: '#zh-table'
                //, toolbar: '#toolbarDemo'
                , height: 'full-50'
                , page: true
                , cellMinWidth: 90
                , cols: [[
                    { field: '在库状态', title: '在库状态',width:180 }
                    , { field: '物料名称', title: '物料名称' }
                    , { field: '批次', title: '批次' }
                    , { field: '数量', title: '数量' }
                    , { field: '物料代码', title: '物料代码' }
                    , { field: '规格型号', title: '规格型号' }
                ]]
                , text: {
                    none: '暂无相关数据,请先扫描源单号!'
                }
            };
            //初始加载表格
            ZHOption.data = [];
            table.render(ZHOption);
            //表头初始化赋值(根据登录用户获取 é»˜è®¤ä»“库、部门、验收、保管、金蝶用户) new
@@ -357,7 +390,7 @@
            {
                table.render({
                    elem: '#wl-table'
                    , url: GetWEBURL1() + '/SellOut/DisBillEntryList_Webs_Json'
                    , url: GetWEBURL() + '/SellOut/DisBillEntryList_Webs_Json'
                    , cellMinWidth: 80
                    , toolbar: '#toolbarDemo'
                    , where: { HBillID: linterid, HBillType: '1205', sWhere: '' }
@@ -555,7 +588,7 @@
                           if (data.count == 1) { // è¯´æ˜ŽéªŒè¯æˆåŠŸäº†
                               table.render({
                                   elem: '#wl-table' 
                                   , url: GetWEBURL1() + '/SellOut/DisBillEntryList_Webs_Json'
                                   , url: GetWEBURL() + '/SellOut/DisBillEntryList_Webs_Json'
                                   , cellMinWidth: 80
                                   , toolbar: '#toolbarDemo'
                                   , where: { HBillID: sInterID, HBillType: '1205', sWhere: '' }
@@ -768,7 +801,7 @@
                                table.render({
                                    elem: '#wl-table'
                                    // , url: 'http://61.130.49.162:9090/WMSAPI///OtherInStockBill/DisBillEntryList_Webs_Json'
                              , url: GetWEBURL1() + '/SellOut/DisBillEntryList_Webs_Json'
                              , url: GetWEBURL() + '/SellOut/DisBillEntryList_Webs_Json'
                              , toolbar: '#toolbarDemo'
                              , where: { HBillID: sInterID, HBillType: '1205', sWhere: '' }
                              , cols: [[
@@ -872,7 +905,7 @@
            //                    table.render({
            //                        elem: '#wl-table'
            //                        //, url: 'http://61.130.49.162:9090/WMSAPI///SellOut/DisBillEntryList_Webs_Json'
            //                        , url: GetWEBURL1() + '/SellOut/DisBillEntryList_Webs_Json'
            //                        , url: GetWEBURL() + '/SellOut/DisBillEntryList_Webs_Json'
            //                  , toolbar: '#toolbarDemo'
            //                  , where: { HBillID: sInterID, HBillType: '1205', sWhere: '' }
            //                  , cellMinWidth: 90
@@ -912,8 +945,10 @@
                var sBillNo = $("#HBillNo").val()
                var HSourceBillType = $("#HBillType").val()
                if (event.keyCode == 13) {
                    var index = layer.load(0);
                    //判断文本框是否有数据    new
                    if (HSourceBillNo == "" || sInterID <= 0) {
                        layer.close(index);
                        layer.msg("源单号为空,或者内码不存在!", { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示" });
                        return;
                    }
@@ -928,12 +963,10 @@
                                //$("#HDeptID").val(result.data[0].HDeptID);
                                //$("#HDeptName").val(result.data[0].HDeptName);
                                HSourceFlag = true;
                                element.tabChange('tab-SellOutBill', '2');
                                layer.load(3);
                                element.tabChange('tab-SellOutBill', '3');
                                table.render({
                                    elem: '#wl-table'
                                    , url: GetWEBURL1() + '/SellOut/DisBillEntryList_Webs_Json'
                                    , url: GetWEBURL() + '/SellOut/DisBillEntryList_Webs_Json'
                                  , toolbar: '#toolbarDemo'
                                  , where: { HBillID: sInterID, HBillType: '1205', sWhere: '' }
                                  , cols: [[
@@ -952,14 +985,16 @@
                                    // , page: true
                                  //, height: 500
                                  , done: function () {
                                      layer.closeAll("loading");
                                      layer.close(index);
                                  }
                                });
                                layer.close(index);
                            }
                            else {
                                layer.close(index);
                                layer.msg(result.Message, { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示" });
                            }
                            layer.closeAll("loading");
                            layer.close(index);
                        }
                    });
                }
@@ -978,6 +1013,36 @@
             , done: function () {
             }
            });
            //扫源单查货
            $('#HSourceBillNo').on('keydown', function (event) {
                var HSourceBillNo = $('#HSourceBillNo').val();
                if (event.keyCode == 13) {
                    var index = layer.load(0);
                    $.ajax({
                        url: GetWEBURL() + "/LookingFor/GetSellOutFindSP",
                        type: "GET",
                        data: { "HbillNo": HSourceBillNo },
                        success: function (result) {
                            if (result.count == 1) {
                                ZHOption.data = result.data;
                                table.render(ZHOption);
                                layer.close(index);
                                element.tabChange('tab-SellOutBill', '5');
                            }
                            else {
                                layer.close(index);
                                layer.msg(result.Message, { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示" });
                            }
                        }, error: function () {
                            layer.close(index);
                            layer.alert("接口请求失败!", { icon: 5 });
                        }
                    });
                }
            });
        //以上为layui模块
        });
        function GetHWHValue(obj)  //返回仓库
        {