From 7f99b5ba49f0fc931038bfc50c943b31e79872ab Mon Sep 17 00:00:00 2001
From: yxj <yxj@hz-kingdee.com>
Date: 星期二, 12 九月 2023 14:53:53 +0800
Subject: [PATCH] 1、新增项目人天耗用明细分析报表、项目人天耗用统计分析报表模块;2、PDA其他出库扫码模块、缓存列表模块修改

---
 WebTM/views/领料发货/其他出库/Kf_OtherOutBill_Fast.html |  708 +++++++++++++++++++++++++++++++++++-----------------------
 1 files changed, 427 insertions(+), 281 deletions(-)

diff --git "a/WebTM/views/\351\242\206\346\226\231\345\217\221\350\264\247/\345\205\266\344\273\226\345\207\272\345\272\223/Kf_OtherOutBill_Fast.html" "b/WebTM/views/\351\242\206\346\226\231\345\217\221\350\264\247/\345\205\266\344\273\226\345\207\272\345\272\223/Kf_OtherOutBill_Fast.html"
index 502eecb..707bade 100644
--- "a/WebTM/views/\351\242\206\346\226\231\345\217\221\350\264\247/\345\205\266\344\273\226\345\207\272\345\272\223/Kf_OtherOutBill_Fast.html"
+++ "b/WebTM/views/\351\242\206\346\226\231\345\217\221\350\264\247/\345\205\266\344\273\226\345\207\272\345\272\223/Kf_OtherOutBill_Fast.html"
@@ -175,10 +175,24 @@
                                 <div class="layui-form-item" style="padding:0px;margin:0px">
                                     <div class="layui-row">
                                         <div class="layui-col-xs3">
+                                            <label class="layui-form-label" style="width:30px;padding-left:0px;">瀹㈡埛</label>
+                                        </div>
+                                        <div class="layui-col-xs6">
+                                            <input type="text" name="HSupName" id="HSupName" lay-verify="HSupName" onkeyup="value=value.replace(/\s+/g,'')" autocomplete="off" class="layui-input" onfocus="this.select();">
+                                            <input type="hidden" name="HSupID" id="HSupID" lay-verify="HSupID" value="0" autocomplete="off" class="layui-input">
+                                        </div>
+                                        <div class="layui-col-xs3">
+                                            <button type="button" lay-submit="" class="layui-btn" lay-filter="HSupID-BT">...</button>
+                                        </div>
+                                    </div>
+                                </div>
+                                <div class="layui-form-item" style="padding:0px;margin:0px">
+                                    <div class="layui-row">
+                                        <div class="layui-col-xs3">
                                             <label class="layui-form-label" style="width:30px;padding-left:0px;">淇濈</label>
                                         </div>
                                         <div class="layui-col-xs6">
-                                            <input type="text" name="HKeeper" id="HKeeper" lay-verify="HKeeper" autocomplete="off" class="layui-input" onfocus="this.select();"> 
+                                            <input type="text" name="HKeeper" id="HKeeper" lay-verify="HKeeper" autocomplete="off" class="layui-input" onfocus="this.select();">
                                             <input type="hidden" name="HKeeperID" id="HKeeperID" lay-verify="HKeeperID" value="0" autocomplete="off" class="layui-input">
                                         </div>
                                         <div class="layui-col-xs3">
@@ -314,13 +328,19 @@
                 , form = layui.form
                 , laydate = layui.laydate
                 , element = layui.element;
+            var HInterID = $('#HInterID').val()
+            var HBillNo = $('#HBillNo').val()
+            var HBillType = '1206'
+            var HMaker = sessionStorage["HUserName"]
             var HStockOrgID = sessionStorage["OrganizationID"]
             var HSourceFlag = sessionStorage["SourceFlag"];
+            var OperationType = 0;//鎿嶄綔绫诲瀷
+            var option = [];
 
 
             //琛ㄥご鍒濆鍖栬祴鍊硷紙鏍规嵁鐧诲綍鐢ㄦ埛鑾峰彇 榛樿浠撳簱銆侀儴闂ㄣ�侀獙鏀躲�佷繚绠°�侀噾铦剁敤鎴凤級 new
-            //$("#HWHID").val(sessionStorage["HWHID"]);
-            //$("#HWHNAME").val(sessionStorage["HWHName"]);
+            $("#HWHID").val(sessionStorage["HWHID"]);
+            $("#HWHNAME").val(sessionStorage["HWHName"]);
             //$("#HStockPlaceID").val(sessionStorage["HSPID"]);
             //$("#HStockPlaceName").val(sessionStorage["HSPName"]);
             //$("#HSupID").val(sessionStorage["HSupID"]);
@@ -355,6 +375,110 @@
                 return [year, month, day].join('-');
             }
 
+            //鍒濆鍖栬〃鍗曟彃浠�
+            set_InitFrom();
+
+            //鍒濆鍖栬〃鍗曟彃浠�
+            function set_InitFrom() {
+                //甯歌鐢ㄦ硶
+                laydate.render({
+                    elem: '#HDate'
+                });
+            }
+
+            var listOption = {
+                elem: '#wl-table'
+                , toolbar: '#toolbarDemo'
+                , cellMinWidth: 90
+                , limit: 3000
+                , totalRow: true
+                , cols: [[
+                    { type: 'radio' }
+                    , { field: 'HQty', title: '鏁伴噺', width: 150, totalRow: true }
+                    , { field: 'HQtyMust', title: '搴旀敹鏁伴噺', width: 150, totalRow: true }
+                    , { field: 'HMaterNumber', title: '鐗╂枡浠g爜', width: 150 }
+                    , { field: 'HMaterName', title: '鐗╂枡鍚嶇О', width: 150 }
+                    , { field: 'HMaterModel', title: '瑙勬牸鍨嬪彿', width: 150 }
+                    , { field: 'HAuxPropName', title: '杈呭姪灞炴��', width: 150 }
+                    , { field: 'HSourceBillNo', title: '婧愬崟鍗曞彿', width: 150 }
+                    //, { field: 'HBatchNo', title: '鎵规', width: 150, hide: true }
+                    , { field: 'HPieceQty', title: '鏉$爜鏁伴噺', width: 150, totalRow: true }
+                    , { field: 'HMaterID', title: 'HMaterID', width: 150, hide: true }
+                    , { field: 'HAuxPropID', title: 'HAuxPropID', width: 150, hide: true }
+                    , { field: 'HSourceInterID', title: 'HSourceInterID', width: 150, hide: true }
+                    , { field: 'HSourceEntryID', title: 'HSourceEntryID', width: 150, hide: true }
+                    , { fixed: 'right', title: '鎿嶄綔', toolbar: '#barDemo', width: 70 }
+                ]]
+                , height: 500
+                , done: function () {
+                    layer.closeAll("loading");
+                }
+            }
+            var FIFOlistOption = {
+                elem: '#FIFOlist-table'
+                , toolbar: '#toolbarDemo'
+                , cellMinWidth: 90
+                , limit: 3000
+                , totalRow: true
+                , cols: [[
+                    { field: 'HQty', title: '鏁伴噺', width: 150, totalRow: true }
+                    , { field: 'HQtyMust', title: '涓嬫灦鏁伴噺', width: 150, totalRow: true }
+                    , { field: 'HWhName', title: '浠撳簱', width: 150 }
+                    , { field: 'HSPName', title: '浠撲綅', width: 150 }
+                    , { field: 'HMaterName', title: '鐗╂枡鍚嶇О', width: 150 }
+                    , { field: 'HMaterModel', title: '瑙勬牸鍨嬪彿', width: 150 }
+                    //, { field: 'HBatchNo', title: '鎵规', width: 150 }
+                    , { field: 'HAuxPropName', title: '杈呭姪灞炴��', width: 150 }
+                ]]
+                , height: 500
+                , done: function () {
+                    layer.closeAll("loading");
+                }
+            }
+            //妫シ鍒楄〃鏄剧ず
+            //var listOption = {
+            //    elem: '#wl-table'
+            //    , toolbar: '#toolbarDemo'
+            //    , cellMinWidth: 90
+            //    , totalRow: true
+            //    , cols: [[
+            //        { type: 'radio' }
+            //        , { field: 'HQty', title: '閲嶉噺', width: 150, totalRow: true }
+            //        , { field: 'HAuxQty', title: '绠辨暟', width: 150, totalRow: true }
+            //        , { field: 'HQtyMust', title: '搴斿彂鏁伴噺', width: 150 }
+            //        , { field: 'HMaterNumber', title: '鐗╂枡浠g爜', 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: 'HPieceQty', title: '鏉$爜鏁伴噺', width: 150 }
+            //    ]]
+            //    , height: 500
+            //    , done: function () {
+            //        layer.closeAll("loading");
+            //    }
+            //}
+
+
+            //鍒ゆ柇鏄惁鐧诲綍 鏈櫥褰曞垯璺冲埌鐧诲綍椤�
+            if (sessionStorage.login != "login") {
+                layer.confirm("鐧诲綍澶辨晥锛岃閲嶆柊鐧诲綍锛�", {
+                    icon: 4, skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず", closeBtn: 0, btn: ['閲嶆柊鐧诲綍']
+                }, function () { window.location.href = "../../user/login.html"; });
+            }
+
+            function playSound() {
+                console.log("playSound");
+                var audio = document.getElementById("cs");
+                audio.play();
+            }
+            function playSound1() {
+                console.log("playSound1");
+                var audio = document.getElementById("cs2");
+                audio.play();
+            }
 
             //鑾峰彇鍙傛暟
             function getUrlVars() {
@@ -367,27 +491,61 @@
                 }
                 return vars;
             }
+            //var params = getUrlVars();
+            //var linterid = params[params[0]]; //浠庡弬鏁颁腑鑾峰彇 鍗曟嵁鍐呯爜
+            //var lSourceBillType = params[params[2]];  //浠庡崟鎹幏鍙� 婧愬崟绫诲瀷
             var params = getUrlVars();
-            var linterid = params[params[0]]; //浠庡弬鏁颁腑鑾峰彇 鍗曟嵁鍐呯爜
-            var lSourceBillType = params[params[2]];  //浠庡崟鎹幏鍙� 婧愬崟绫诲瀷
+            var OperationType = params[params[0]];  //浠庣紦瀛樺垪琛ㄤ腑杩斿洖鏁版嵁绫诲瀷  1鏂板  2浠庣紦瀛樺垪琛ㄤ腑杩斿洖
+            var HInterID_Temp = params[params[1]];  //浠庣紦瀛樺垪琛ㄤ腑杩斿洖鍗曟嵁ID
 
-            //鍒濆鍖栬〃鍗曟彃浠�
-            set_InitFrom();
 
-            //鍒濆鍖栬〃鍗曟彃浠�
-            function set_InitFrom() {
-                //甯歌鐢ㄦ硶
-                laydate.render({
-                    elem: '#HDate'
+
+            //鍒ゆ柇鏄惁鏂板
+            if (HInterID != 0) {
+                HSourceFlag = true;
+            }
+            //浠庣紦瀛樺垪琛ㄧ紪杈戝姛鑳借烦杞嚦鍗曟嵁妯″潡
+            else if (OperationType == 2) {
+                RoadBillMain(HInterID_Temp);
+                $("#HBarCode").select();
+                $("#HBarCode").focus();     //鑾峰彇鍏夋爣
+                //$('#QueDin2').addClass("layui-btn-disabled").attr("disabled", true);//鎸夐挳绂佺敤
+                //document.getElementById("QueDin2").disabled = true;   //鎸夐挳鍙樹负涓嶅彲缂栬緫鐘舵��
+                //鏄剧ず琛ㄤ綋鏄庣粏
+                DisBillEntryList();
+                HSourceFlag = true;
+            }
+            else {
+                OperationType = 1;
+                //鑾峰彇鏈�澶у崟鎹甀D銆佸崟鎹彿
+                $.ajax({
+                    type: "GET",
+                    url: GetWEBURL() + "/WEBSController/GetMaxBillNoAndID_Json",
+                    async: false,    //async鐢ㄤ簬鎺у埗锛坒alse锛夊悓姝ュ拰锛坱rue锛夊紓姝ワ紝榛樿鐨勬槸true锛屽嵆璇锋眰榛樿鐨勬槸寮傛璇锋眰
+                    data: { "HBillType": HBillType },
+                    success: function (d) {
+                        if (d.count == 1) {
+                            $("#HInterID").val(d.data[0].HInterID);
+                            $("#HBillNo").val(d.data[0].HBillNo);
+                            $("#HDate").val(formatDate(new Date(), "yyyy-MM-dd"));
+                            HInterID = $('#HInterID').val()
+                            HBillNo = $('#HBillNo').val()
+                        }
+                        else {
+                            layer.msg(d.Message, { icon: 5, btn: ['閫�鍑�'], time: 100000, offset: 't' });
+                        }
+                    }
                 });
+                HSourceFlag = false;
             }
 
             function RoadBillMain(linterid)//鍔犺浇琛ㄥご
             {
                 $.ajax({
-                    url: GetWEBURL() + "/Web/GetPonderationBill",
                     type: "GET",
-                    data: { "HInterID": linterid },
+                    url: GetWEBURL() + '/WEBSController/GetSourceBill_Temp_Json',
+                    async: false,    //async鐢ㄤ簬鎺у埗锛坒alse锛夊悓姝ュ拰锛坱rue锛夊紓姝ワ紝榛樿鐨勬槸true锛屽嵆璇锋眰榛樿鐨勬槸寮傛璇锋眰
+                    data: { "HInterID": HInterID_Temp, "HBillType": HBillType },
                     success: function (d) {
                         // console.log(d.data);
                         $("#HInterID").val(d.data[0].HInterID);
@@ -445,33 +603,33 @@
             }
 
 
-            function RoadBillSub(linterid)//鍔犺浇琛ㄤ綋
-            {
-                table.render({
-                    elem: '#wl-table'
-                    , url: GetWEBURL() + '/OtherOutBill/DisBillEntryList_Webs_Json'
-                    //, toolbar: '#toolbarDemo'
-                    , page: true
-                    , limit: 100
-                    , where: { HBillID: linterid, HBillType: '1206', sWhere: '' }
-                    , cols: [[
-                        { type: 'radio' }
-                        , { field: 'HQty', title: '閲嶉噺', width: 150 }
-                        , { field: 'HAuxQty', title: '绠辨暟', width: 150, totalRow: true }
-                        , { field: 'HMaterNumber', title: '鐗╂枡浠g爜', 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 () {
-                        layer.closeAll("loading");
-                    }
-                });
-            }
+            //function RoadBillSub(linterid)//鍔犺浇琛ㄤ綋
+            //{
+            //    table.render({
+            //        elem: '#wl-table'
+            //        , url: GetWEBURL() + '/OtherOutBill/DisBillEntryList_Webs_Json'
+            //        //, toolbar: '#toolbarDemo'
+            //        , page: true
+            //        , limit: 100
+            //        , where: { HBillID: linterid, HBillType: '1206', sWhere: '' }
+            //        , cols: [[
+            //            { type: 'radio' }
+            //            , { field: 'HQty', title: '閲嶉噺', width: 150 }
+            //            , { field: 'HAuxQty', title: '绠辨暟', width: 150, totalRow: true }
+            //            , { field: 'HMaterNumber', title: '鐗╂枡浠g爜', 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 () {
+            //            layer.closeAll("loading");
+            //        }
+            //    });
+            //}
 
             //鍔ㄦ�佸姞杞芥簮鍗曠被鍨嬪垪琛� new
 
@@ -481,45 +639,48 @@
 
 
 
-            //鍒ゆ柇鏄惁鏂板
-            if (linterid == null || linterid == 0) {
-                //鑾峰彇鏈�澶у崟鎹彿 new
-                $("#HInterID").val("");
-                $("#HBillNo").val("");
-                $.ajax({
-                    url: GetWEBURL() + "/Web/GetMAXNumPDA",
-                    type: "GET",
-                    data: { "HBillType": '1206' },
-                    success: function (d) {
-                        //console.log(d.data);
-                        $("#HInterID").val(d.data[0].HInterID);
-                        $("#HBillNo").val(d.data[0].HBillNo);
-                        $("#HDate").val(formatDate(new Date(), "yyyy-MM-dd"));
-                    }
-                });
-                //鑾峰彇鍗曟嵁瀛愮被鍨�
-                var HBillSubType = '';
-                $.ajax({
-                    url: GetWEBURL() + "/WEBSController/GetBillSubType_Json",
-                    type: "GET",
-                    data: { "HBillType": '1206', "HStockOrgID": HStockOrgID },
-                    success: function (result) {
-                        if (result.count == 1) { // 璇存槑楠岃瘉鎴愬姛浜嗭紝
-                            var data = result.data;
-                            for (var i = 0; i < data.length; i++) {
-                                HBillSubType += '<option value="' + data[i].HNumber + '">' + data[i].HName + '</option>';
-                            }
-                            $("#HBillSubType").append(HBillSubType);
-                            form.render('select');
-                        }
-                        layer.closeAll("loading");
-                    }
-                })
-            }
-            else {//濡傛灉淇敼鍒欒蛋涓嬮潰 new
-                RoadBillMain(linterid);
-                RoadBillSub(linterid);
-            }
+            ////鍒ゆ柇鏄惁鏂板
+            //if (linterid == null || linterid == 0) {
+            //    //鑾峰彇鏈�澶у崟鎹彿 new
+            //    $("#HInterID").val("");
+            //    $("#HBillNo").val("");
+            //    $.ajax({
+            //        url: GetWEBURL() + "/Web/GetMAXNumPDA",
+            //        type: "GET",
+            //        data: { "HBillType": '1206' },
+            //        success: function (d) {
+            //            //console.log(d.data);
+            //            $("#HInterID").val(d.data[0].HInterID);
+            //            $("#HBillNo").val(d.data[0].HBillNo);
+            //            $("#HDate").val(formatDate(new Date(), "yyyy-MM-dd"));
+            //        }
+            //    });
+            //    //鑾峰彇鍗曟嵁瀛愮被鍨�
+            //    var HBillSubType = '';
+            //    $.ajax({
+            //        url: GetWEBURL() + "/WEBSController/GetBillSubType_Json",
+            //        type: "GET",
+            //        data: { "HBillType": '1206', "HStockOrgID": HStockOrgID },
+            //        success: function (result) {
+            //            if (result.count == 1) { // 璇存槑楠岃瘉鎴愬姛浜嗭紝
+            //                var data = result.data;
+            //                for (var i = 0; i < data.length; i++) {
+            //                    HBillSubType += '<option value="' + data[i].HNumber + '">' + data[i].HName + '</option>';
+            //                }
+            //                $("#HBillSubType").append(HBillSubType);
+            //                form.render('select');
+            //            }
+            //            layer.closeAll("loading");
+            //        }
+            //    })
+            //}
+            //else {//濡傛灉淇敼鍒欒蛋涓嬮潰 new
+            //    RoadBillMain(linterid);
+            //    //RoadBillSub(linterid);
+
+            //    //鏄剧ず琛ㄤ綋鏄庣粏
+            //    DisBillEntryList();
+            //}
 
             $('#HStockPlaceName').on('keydown', function (event) {      //鎵粨浣�
                 var HBarCode = $('#HStockPlaceName').val()
@@ -593,21 +754,25 @@
                     }
                 })
             });
-            form.on('submit(HSupID-BT)', function () {//閫夋嫨渚涘簲鍟�
+
+            //#region 瀹㈡埛
+            form.on('submit(HSupID-BT)', function () {//閫夋嫨瀹㈡埛
                 layer.open({
                     type: 2
                     , area: ['100%', '100%']
-                    , title: '渚涘簲鍟嗗垪琛�'
+                    , title: '瀹㈡埛鍒楄〃'
                     , shade: 0.6 //閬僵閫忔槑搴�
                     , maxmin: true //鍏佽鍏ㄥ睆鏈�灏忓寲
                     , anim: 0 //0-6鐨勫姩鐢诲舰寮忥紝-1涓嶅紑鍚�
-                    , content: ['../../../views/Baseset/鍩虹璧勬枡/Gy_SupplierList.html', 'yes']
+                    , content: ['../../../views/Baseset/鍩虹璧勬枡/Gy_CustomerListNew.html?HOrgID=' + HStockOrgID + '', 'yes']
                     , resize: false
                     , cancel: function () {
                         //$(".layui-btn").removeClass("layui-btn-disabled");
                     }
                 })
             });
+
+            //#endregion
 
 
             //form.on('submit(HKeeperID-BT)', function () {//閫夋嫨淇濈
@@ -777,34 +942,37 @@
                                 success: function (data) {
                                     if (data.count == 1) { // 璇存槑楠岃瘉鎴愬姛浜嗭紝
                                         //鏄剧ず琛ㄤ綋鏄庣粏
-                                        $.ajax({
-                                            url: GetWEBURL() + '/WEBSController/GetBillEntryTmpList_Json',
-                                            type: "GET",
-                                            data: { "HInterID": sInterID, "HBillNo": sBillNo, "HBillType": HBillType, "HStockOrgID": HStockOrgID },
-                                            success: function (result) {
-                                                if (result.count == 1) { // 璇存槑楠岃瘉鎴愬姛浜嗭紝
-                                                    listOption.data = result.data.Materlist;
-                                                    table.render(listOption);
-                                                    FIFOlistOption.data = result.data.FIFOlist;
-                                                    table.render(FIFOlistOption);
+                                        DisBillEntryList();
 
-                                                    //console.log(result.data.list2);
-                                                    var count = 0;
-                                                    var count1 = 0;
-                                                    for (var i = 0; i < result.data.Materlist.length; i++) {
-                                                        count += result.data.Materlist[i].HQty;
-                                                        count1 += result.data.Materlist[i].HPieceQty;
-                                                    }
-                                                    $("#HSumQtys").val(count);
-                                                    $("#HBarCodeQtys").val(count1);
-                                                    //return;
-                                                }
-                                                else {
-                                                    layer.msg(result.Message);
-                                                }
-                                                layer.closeAll("loading");
-                                            }
-                                        });
+                                        ////鏄剧ず琛ㄤ綋鏄庣粏
+                                        //$.ajax({
+                                        //    url: GetWEBURL() + '/WEBSController/GetBillEntryTmpList_Json',
+                                        //    type: "GET",
+                                        //    data: { "HInterID": sInterID, "HBillNo": sBillNo, "HBillType": HBillType, "HStockOrgID": HStockOrgID },
+                                        //    success: function (result) {
+                                        //        if (result.count == 1) { // 璇存槑楠岃瘉鎴愬姛浜嗭紝
+                                        //            listOption.data = result.data.Materlist;
+                                        //            table.render(listOption);
+                                        //            FIFOlistOption.data = result.data.FIFOlist;
+                                        //            table.render(FIFOlistOption);
+
+                                        //            //console.log(result.data.list2);
+                                        //            var count = 0;
+                                        //            var count1 = 0;
+                                        //            for (var i = 0; i < result.data.Materlist.length; i++) {
+                                        //                count += result.data.Materlist[i].HQty;
+                                        //                count1 += result.data.Materlist[i].HPieceQty;
+                                        //            }
+                                        //            $("#HSumQtys").val(count);
+                                        //            $("#HBarcodeQtys").val(count1);
+                                        //            //return;
+                                        //        }
+                                        //        else {
+                                        //            layer.msg(result.Message);
+                                        //        }
+                                        //        layer.closeAll("loading");
+                                        //    }
+                                        //});
                                     }
                                     else {
                                         layer.msg(data.Message, { icon: 2 });
@@ -844,15 +1012,22 @@
                             dataType: "json",
                             success: function (data) {
                                 if (data.count == 1) { // 璇存槑楠岃瘉鎴愬姛浜嗭紝
-                                    layer.msg(data.Message, { icon: 1 });
+                                    layer.confirm(data.Message, {
+                                        icon: 1, skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず", closeBtn: 0, btn: ['鏂板'],
+                                        btn2: function () {
+                                            parent.location.href = "../../../views/index.html"
+                                        }//鍏抽棴
+                                    }, function () {
+                                        location.replace('Kf_OtherOutBill_Fast.html?OperationType=1&HInterID=0');
+                                    });//鏂板
                                 }
                                 else {
-                                    layer.msg(data.Message, { icon: 5 });
+                                    layer.msg(data.Message, { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
                                 }
                                 layer.closeAll("loading");
                             },
                             error: function (err) {
-                                layer.msg("閿欒:" + err, { icon: 5 });
+                                layer.msg("閿欒:" + err, { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
                             }
                         });
                     return false;
@@ -950,34 +1125,37 @@
                             layer.load(3);
                             element.tabChange('tab-Kf_OtherOutBill', '2');
 
-                            $.ajax({
-                                url: GetWEBURL() + '/WEBSController/GetBillEntryTmpList_Json',
-                                type: "GET",
-                                data: { "HInterID": sInterID, "HBillNo": sBillNo, "HBillType": HBillType, "HStockOrgID": HStockOrgID },
-                                success: function (result) {
-                                    if (result.count == 1) { // 璇存槑楠岃瘉鎴愬姛浜嗭紝
-                                        listOption.data = result.data.Materlist;
-                                        table.render(listOption);
-                                        FIFOlistOption.data = result.data.FIFOlist;
-                                        table.render(FIFOlistOption);
+                            //鏄剧ず琛ㄤ綋鏄庣粏
+                            DisBillEntryList();
 
-                                        //console.log(result.data.list2);
-                                        var count = 0;
-                                        var count1 = 0;
-                                        for (var i = 0; i < result.data.Materlist.length; i++) {
-                                            count += result.data.Materlist[i].HQty;
-                                            count1 += result.data.Materlist[i].HPieceQty;
-                                        }
-                                        $("#HSumQtys").val(count);
-                                        $("#HBarCodeQtys").val(count1);
-                                        //return;
-                                    }
-                                    else {
-                                        layer.msg(result.Message);
-                                    }
-                                    layer.closeAll("loading");
-                                }
-                            });
+                            //$.ajax({
+                            //    url: GetWEBURL() + '/WEBSController/GetBillEntryTmpList_Json',
+                            //    type: "GET",
+                            //    data: { "HInterID": sInterID, "HBillNo": sBillNo, "HBillType": HBillType, "HStockOrgID": HStockOrgID },
+                            //    success: function (result) {
+                            //        if (result.count == 1) { // 璇存槑楠岃瘉鎴愬姛浜嗭紝
+                            //            listOption.data = result.data.Materlist;
+                            //            table.render(listOption);
+                            //            FIFOlistOption.data = result.data.FIFOlist;
+                            //            table.render(FIFOlistOption);
+
+                            //            //console.log(result.data.list2);
+                            //            var count = 0;
+                            //            var count1 = 0;
+                            //            for (var i = 0; i < result.data.Materlist.length; i++) {
+                            //                count += result.data.Materlist[i].HQty;
+                            //                count1 += result.data.Materlist[i].HPieceQty;
+                            //            }
+                            //            $("#HSumQtys").val(count);
+                            //            $("#HBarcodeQtys").val(count1);
+                            //            //return;
+                            //        }
+                            //        else {
+                            //            layer.msg(result.Message);
+                            //        }
+                            //        layer.closeAll("loading");
+                            //    }
+                            //});
                         }
                         else {
                             playSound();
@@ -1053,9 +1231,13 @@
                                     playSound1();
                                     //娓呯┖鏁伴噺
                                     $("#HQty").val("");
-                                    table.reload('wl-table', {
-                                        where: { HBillID: sInterID, HBillType: '1206', sWhere: '' }
-                                    });
+
+                                    //鏄剧ず琛ㄤ綋鏄庣粏
+                                    DisBillEntryList();
+
+                                    //table.reload('wl-table', {
+                                    //    where: { HBillID: sInterID, HBillType: '1206', sWhere: '' }
+                                    //});
                                 }
                                 else {
                                     playSound();
@@ -1089,33 +1271,37 @@
                                     layer.msg(data.Message, { icon: 1, btn: ['纭'], time: 100000, title: "娓╅Θ鎻愮ず" });
                                     //娓呯┖鏁伴噺
                                     $("#HQty").val("");
-                                    table.render({
-                                        elem: '#wl-table'
-                                        , url: GetWEBURL() + '/SellOut/DisBillEntryList_Webs_Json'
-                                        , cellMinWidth: 80
-                                        //, toolbar: '#toolbarDemo'
-                                        , page: true
-                                        , limit: 100
-                                        , defaultToolbar: []
-                                        , where: { HBillID: sInterID, HBillType: '1206', sWhere: '' }
-                                        , cols: [[
-                                            { type: 'radio' }
-                                            , { field: 'HQty', title: '鏁伴噺', width: 80 }
-                                            , { field: 'HAuxQty', title: '杈呭姪鏁伴噺', width: 80 }
-                                            , { field: 'HQtyMust', title: '搴旀敹鏁伴噺', width: 80 }
-                                            , { field: 'HMaterNumber', title: '鐗╂枡浠g爜', width: 100 }
-                                            , { field: 'HMaterName', title: '鐗╂枡鍚嶇О', width: 150 }
-                                            , { 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 }
-                                            , { field: 'HWHID', title: 'ck', width: 100 }
-                                        ]]
-                                        //, height: 500
-                                    })
+
+                                    //鏄剧ず琛ㄤ綋鏄庣粏
+                                    DisBillEntryList();
+
+                                    //table.render({
+                                    //    elem: '#wl-table'
+                                    //    , url: GetWEBURL() + '/SellOut/DisBillEntryList_Webs_Json'
+                                    //    , cellMinWidth: 80
+                                    //    //, toolbar: '#toolbarDemo'
+                                    //    , page: true
+                                    //    , limit: 100
+                                    //    , defaultToolbar: []
+                                    //    , where: { HBillID: sInterID, HBillType: '1206', sWhere: '' }
+                                    //    , cols: [[
+                                    //        { type: 'radio' }
+                                    //        , { field: 'HQty', title: '鏁伴噺', width: 80 }
+                                    //        , { field: 'HAuxQty', title: '杈呭姪鏁伴噺', width: 80 }
+                                    //        , { field: 'HQtyMust', title: '搴旀敹鏁伴噺', width: 80 }
+                                    //        , { field: 'HMaterNumber', title: '鐗╂枡浠g爜', width: 100 }
+                                    //        , { field: 'HMaterName', title: '鐗╂枡鍚嶇О', width: 150 }
+                                    //        , { 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 }
+                                    //        , { field: 'HWHID', title: 'ck', width: 100 }
+                                    //    ]]
+                                    //    //, height: 500
+                                    //})
                                 }
                                 else {
                                     layer.msg(data.Message, { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
@@ -1225,34 +1411,38 @@
                                     }
                                 }
                                 layer.load(3)
-                                $.ajax({
-                                    url: GetWEBURL() + '/WEBSController/GetBillEntryTmpList_Json',
-                                    type: "GET",
-                                    data: { "HInterID": sInterID, "HBillNo": sBillNo, "HBillType": sBillType, "HStockOrgID": HStockOrgID },
-                                    success: function (result) {
-                                        if (result.count == 1) { // 璇存槑楠岃瘉鎴愬姛浜嗭紝
-                                            listOption.data = result.data.Materlist;
-                                            table.render(listOption);
-                                            FIFOlistOption.data = result.data.FIFOlist;
-                                            table.render(FIFOlistOption);
 
-                                            //console.log(result.data.list2);
-                                            var count = 0;
-                                            var count1 = 0;
-                                            for (var i = 0; i < result.data.Materlist.length; i++) {
-                                                count += result.data.Materlist[i].HQty;
-                                                count1 += result.data.Materlist[i].HPieceQty;
-                                            }
-                                            $("#HSumQtys").val(count);
-                                            $("#HBarCodeQtys").val(count1);
-                                            //return;
-                                        }
-                                        else {
-                                            layer.msg(result.Message);
-                                        }
-                                        layer.closeAll("loading");
-                                    }
-                                });
+                                //鏄剧ず琛ㄤ綋鏄庣粏
+                                DisBillEntryList();
+
+                                //$.ajax({
+                                //    url: GetWEBURL() + '/WEBSController/GetBillEntryTmpList_Json',
+                                //    type: "GET",
+                                //    data: { "HInterID": sInterID, "HBillNo": sBillNo, "HBillType": sBillType, "HStockOrgID": HStockOrgID },
+                                //    success: function (result) {
+                                //        if (result.count == 1) { // 璇存槑楠岃瘉鎴愬姛浜嗭紝
+                                //            listOption.data = result.data.Materlist;
+                                //            table.render(listOption);
+                                //            FIFOlistOption.data = result.data.FIFOlist;
+                                //            table.render(FIFOlistOption);
+
+                                //            //console.log(result.data.list2);
+                                //            var count = 0;
+                                //            var count1 = 0;
+                                //            for (var i = 0; i < result.data.Materlist.length; i++) {
+                                //                count += result.data.Materlist[i].HQty;
+                                //                count1 += result.data.Materlist[i].HPieceQty;
+                                //            }
+                                //            $("#HSumQtys").val(count);
+                                //            $("#HBarcodeQtys").val(count1);
+                                //            //return;
+                                //        }
+                                //        else {
+                                //            layer.msg(result.Message);
+                                //        }
+                                //        layer.closeAll("loading");
+                                //    }
+                                //});
                                 playSound1();
                                 //娓呯┖鏁伴噺
                                 $("#HQty").val("");
@@ -1269,92 +1459,48 @@
 
             //#endregion
 
-            var listOption = {
-                elem: '#wl-table'
-                , toolbar: '#toolbarDemo'
-                , cellMinWidth: 90
-                , limit: 3000
-                , totalRow: true
-                , cols: [[
-                    { type: 'radio' }
-                    , { field: 'HQty', title: '鏁伴噺', width: 150, totalRow: true }
-                    , { field: 'HQtyMust', title: '搴旀敹鏁伴噺', width: 150, totalRow: true }
-                    , { field: 'HMaterNumber', title: '鐗╂枡浠g爜', width: 150 }
-                    , { field: 'HMaterName', title: '鐗╂枡鍚嶇О', width: 150 }
-                    , { field: 'HMaterModel', title: '瑙勬牸鍨嬪彿', width: 150 }
-                    , { field: 'HAuxPropName', title: '杈呭姪灞炴��', width: 150 }
-                    , { field: 'HSourceBillNo', title: '婧愬崟鍗曞彿', width: 150 }
-                    //, { field: 'HBatchNo', title: '鎵规', width: 150, hide: true }
-                    , { field: 'HPieceQty', title: '鏉$爜鏁伴噺', width: 150, hide: true }
-                    , { field: 'HMaterID', title: 'HMaterID', width: 150, hide: true }
-                    , { field: 'HAuxPropID', title: 'HAuxPropID', width: 150, hide: true }
-                    , { field: 'HSourceInterID', title: 'HSourceInterID', width: 150, hide: true }
-                    , { field: 'HSourceEntryID', title: 'HSourceEntryID', width: 150, hide: true }
-                    , { fixed: 'right', title: '鎿嶄綔', toolbar: '#barDemo', width: 70 }
-                ]]
-                , height: 500
-                , done: function () {
-                    layer.closeAll("loading");
-                }
-            }
-            var FIFOlistOption = {
-                elem: '#FIFOlist-table'
-                , toolbar: '#toolbarDemo'
-                , cellMinWidth: 90
-                , limit: 3000
-                , totalRow: true
-                , cols: [[
-                    { field: 'HQty', title: '鏁伴噺', width: 150, totalRow: true }
-                    , { field: 'HQtyMust', title: '涓嬫灦鏁伴噺', width: 150, totalRow: true }
-                    , { field: 'HWhName', title: '浠撳簱', width: 150 }
-                    , { field: 'HSPName', title: '浠撲綅', width: 150 }
-                    , { field: 'HMaterName', title: '鐗╂枡鍚嶇О', width: 150 }
-                    , { field: 'HMaterModel', title: '瑙勬牸鍨嬪彿', width: 150 }
-                    //, { field: 'HBatchNo', title: '鎵规', width: 150 }
-                    , { field: 'HAuxPropName', title: '杈呭姪灞炴��', width: 150 }
-                ]]
-                , height: 500
-                , done: function () {
-                    layer.closeAll("loading");
-                }
-            }
-            //妫シ鍒楄〃鏄剧ず
-            //var listOption = {
-            //    elem: '#wl-table'
-            //    , toolbar: '#toolbarDemo'
-            //    , cellMinWidth: 90
-            //    , totalRow: true
-            //    , cols: [[
-            //        { type: 'radio' }
-            //        , { field: 'HQty', title: '閲嶉噺', width: 150, totalRow: true }
-            //        , { field: 'HAuxQty', title: '绠辨暟', width: 150, totalRow: true }
-            //        , { field: 'HQtyMust', title: '搴斿彂鏁伴噺', width: 150 }
-            //        , { field: 'HMaterNumber', title: '鐗╂枡浠g爜', 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: 'HPieceQty', title: '鏉$爜鏁伴噺', width: 150 }
-            //    ]]
-            //    , height: 500
-            //    , done: function () {
-            //        layer.closeAll("loading");
-            //    }
-            //}
 
+            //#region 鏄剧ず鐗╂枡鍒楄〃淇℃伅
 
-            function playSound() {
-                console.log("playSound");
-                var audio = document.getElementById("cs");
-                audio.play();
+            function DisBillEntryList() {
+                var sInterID = $("#HInterID").val()
+                var sBillNo = $("#HBillNo").val()
+                var HBillType = '1206'
+                var sHStockOrgID = sessionStorage["OrganizationID"];
+
+                //鍒锋柊鍒楄〃淇℃伅
+                $.ajax({
+                    type: "GET",
+                    url: GetWEBURL() + '/WEBSController/GetBillEntryTmpList_Json',
+                    async: false,    //async鐢ㄤ簬鎺у埗锛坒alse锛夊悓姝ュ拰锛坱rue锛夊紓姝ワ紝榛樿鐨勬槸true锛屽嵆璇锋眰榛樿鐨勬槸寮傛璇锋眰
+                    data: { "HInterID": sInterID, "HBillNo": sBillNo, "HBillType": HBillType, "HStockOrgID": sHStockOrgID },
+                    success: function (result) {
+                        if (result.count == 1) { // 璇存槑楠岃瘉鎴愬姛浜嗭紝
+                            listOption.data = result.data.Materlist;
+                            table.render(listOption);
+                            FIFOlistOption.data = result.data.FIFOlist;
+                            table.render(FIFOlistOption);
+
+                            //console.log(result.data.list2);
+                            var count = 0;
+                            var count1 = 0;
+                            for (var i = 0; i < result.data.Materlist.length; i++) {
+                                count += result.data.Materlist[i].HQty;
+                                count1 += result.data.Materlist[i].HPieceQty;
+                            }
+                            $("#HSumQtys").val(count);
+                            $("#HBarcodeQtys").val(count1);
+                            //return;
+                        }
+                        else {
+                            layer.msg(result.Message);
+                        }
+                    }
+                });
             }
-            function playSound1() {
-                console.log("playSound1");
-                var audio = document.getElementById("cs2");
-                audio.play();
-            }
+
+            //#endregion
+
 
             //function playSound() {
             //    var audio = document.getElementById("cs");
@@ -1442,7 +1588,7 @@
             $("#HWHNAME").val(obj[0].HWhName);
             $("#HWHID").val(obj[0].HWHID);
         }
-        function GetHSupValue(obj) {  //杩斿洖渚涘簲鍟�
+        function GetHSupValue(obj) {  //杩斿洖瀹㈡埛
             $("#HSupName").val(obj[0].HName);
             $("#HSupID").val(obj[0].HItemID);
         }

--
Gitblit v1.9.1