From e376f3d5464ed80c0933da57a032cc9009d204bf Mon Sep 17 00:00:00 2001
From: yxj <1qaz@123>
Date: 星期二, 30 八月 2022 17:07:05 +0800
Subject: [PATCH] PDA其他出库模块,界面增加扫码类型(整托、单出、反向单出等),其他出库缓存列表完善

---
 WebTM/views/领料发货/其他出库/Kf_OtherOutBill_Fast.html     |  455 ++++++++++++++++++++++++++++++++-----------------
 WebTM/views/领料发货/其他出库/Kf_OtherOutBill_FastList.html |   34 +-
 2 files changed, 311 insertions(+), 178 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 44b8214..4b53ccb 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"
@@ -24,15 +24,38 @@
         <div class="layui-card" style="padding: 1px">
             <div class="layui-card-body" style="padding: 1px;">
                 <form class="layui-form" action="" lay-filter="component-form-group">
+                    <div class="layui-form-item" style="padding:15px;margin:0px">
+                        <div class="layui-row">
+                            <div class="layui-col-xs3">
+                                <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 class="layui-col-xs2">
+                                <button type="button" lay-submit="" class="layui-btn" lay-filter="QueDin">纭畾</button>
+                            </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:40px;padding-left:0px;">鏁伴噺</label>
+                                </div>
+                                <div class="layui-col-xs8">
+                                    <input type="text" name="HQty" id="HQty" lay-verify="HQty" autocomplete="off" class="layui-input">
+                                </div>
+                            </div>
+                        </div>
+                    </div>
                     <div class="layui-tab" lay-filter="tab-Kf_OtherOutBill">
                         <ul class="layui-tab-title" lay-filter="tab-all">
-                            <!-- <li lay-id="1">婧愬崟淇℃伅</li>-->
                             <li lay-id="1">婧愬崟淇℃伅</li>
                             <li lay-id="2">鍗曟嵁淇℃伅</li>
                             <li lay-id="3">鐗╂枡娓呭崟</li>
                             <li lay-id="4">鏃ュ織</li>
                         </ul>
                         <div class="layui-tab-content">
+                            <!--婧愬崟淇℃伅-->
                             <div class="layui-tab-item layui-show">
                                 <div class="layui-form-item">
                                     <div class="layui-row">
@@ -42,6 +65,21 @@
                                         <div class="layui-col-xs8">
                                             <select name=" HBillType" id="HBillType">
                                                 <option value="-1">鎵嬪伐褰曞叆</option>
+                                            </select>
+                                        </div>
+                                    </div>
+                                </div>
+                                <div class="layui-form-item">
+                                    <div class="layui-row">
+                                        <div class="layui-col-xs4">
+                                            <label class="layui-form-label" style="width:60px;padding-left:0px;">鎵弿绫诲瀷</label>
+                                        </div>
+                                        <div class="layui-col-xs8">
+                                            <select name=" HScanStyle" id="HScanStyle" disabled:"disabled">
+                                                <option value="鏁存墭鎵爜">鏁存墭鎵爜</option>
+                                                <option value="鍗曚釜鎷嗙爜">鍗曚釜鎷嗙爜</option>
+                                                <option value="鍙嶅悜鎷嗙爜">鍙嶅悜鎷嗙爜</option>
+                                                <option value="鏁存墭鍒犻櫎">鏁存墭鍒犻櫎</option>
                                             </select>
                                         </div>
                                     </div>
@@ -60,6 +98,7 @@
                                     </div>
                                 </div>
                             </div>
+                            <!--鍗曟嵁淇℃伅-->
                             <div class="layui-tab-item">
                                 <div class="layui-form-item" style="padding:0px;margin:0px">
                                     <div class="layui-row">
@@ -157,34 +196,36 @@
                                     </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-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="HQty" id="HQty" lay-verify="HQty" autocomplete="off" class="layui-input">
-                                        </div>
-                                    </div>
-                                </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="fj-table-qd" lay-filter="fj-table-qd"></table>
+                                <div class="layui-row">
+                                    <div class="layui-col-xs3">
+                                        <label class="layui-form-label" style="width:60px;padding-left:0px;">鏉$爜鏁伴噺</label>
+                                    </div>
+                                    <div class="layui-col-xs8 layui-input-inline mobile">
+                                        <input type="text" name="HBarcodeQtys" id="HBarcodeQtys" lay-verify="HBarcodeQtys" autocomplete="off" class="layui-input">
+                                    </div>
+                                </div>
+                                <div class="layui-row">
+                                    <div class="layui-col-xs3">
+                                        <label class="layui-form-label" style="width:60px;padding-left:0px;">鎬绘暟閲�</label>
+                                    </div>
+                                    <div class="layui-col-xs8 layui-input-inline mobile">
+                                        <input type="text" name="HSumQtys" id="HSumQtys" lay-verify="HSumQtys" value="0" autocomplete="off" class="layui-input">
+                                    </div>
+                                </div>
+                                <div class="layui-row">
+                                    <div class="layui-col-xs3">
+                                        <label class="layui-form-label" style="width:60px;padding-left:0px;">鏃ュ織</label>
+                                    </div>
+                                    <div class="layui-col-xs8 layui-input-inline mobile">
+                                        <input type="text" name="HNote" id="HNote" lay-verify="HNote" autocomplete="off" class="layui-input">
+                                    </div>
+                                </div>
                             </div>
                         </div>
                         <div class="layer-footer" style="z-index: 10; position: fixed; text-align: center; bottom: 0; width:100%; height:50px">
@@ -677,171 +718,263 @@
      
             //鎵潯鐮�
             function GetMeesageByBarCode(obj) {  //杩斿洖宸ヤ綔涓績
-                var sSubStr = table.cache['wl-table'];
-                var sBarCode = $('#HBarCode').val()
+                var sOldBarCode = $('#HBarCode').val()
+                var HDeleteFlag = sOldBarCode.substring(0, 1);
+                var sBarCode = sOldBarCode.slice(1);
                 var sInterID = $("#HInterID").val()
+                var sBillType = '1206'
                 var sBillNo = $("#HBillNo").val()
+                var sMaker = sessionStorage["HUserName"];
+                var sHWHID = $("#HWHID").val();//浠撳簱ID
+                var sHSPID = $("#HStockPlaceID").val();//浠撲綅ID
                 var sQty = $("#HQty").val()
                 var sHBillType = $("#HBillType").val()
-                var sHWHID = $("#HWHID").val()
-                var sHSPID = $("#HStockPlaceID").val()
                 var sSourceBillNo = $("#HSourceBillNo").val()
                 var sMouldManagerCtl = "N";  //鏄惁鍚敤鍣ㄥ叿绠$悊
                 var sFIFOCtl = "N";          //鏄惁鍚敤鍏堣繘鍏堝嚭绠$悊
-                if (sBarCode == '') {
-                    playSound();
-                    layer.msg("鏉$爜涓虹┖锛屼笉鑳芥壂鎻忥紒", { icon: 5, btn: ['纭畾'], time: 100000, offset: 't' });
-                    return false;
-                }
+                var HScanStyle = $("#HScanStyle").val();
                 if (sQty == "") {
                     sQty = 0;
                 }
-                var sBillType = '1206'
-                if (sBarCode != "") {
-                    $('#HBarCode').val("");
-                }
-                if (sQty != "") {
-                    $('#HQty').val("");
-                }
-                sessionStorage["SourceFlag"] = false;
-                $.ajax({
-                    url: GetWEBURL() + "/OtherOutBill/get_CheckTypeByBarCode_Out_Json",
-                    type: "GET",
-                    data: { "sCode": sBarCode, "sInterID": sInterID, "HBillType": sBillType, "sBillNo": sBillNo, "sMaker": sessionStorage["HUserName"], "WhID": sHWHID, "SPID": sHSPID, "sQty": sQty, "sRedBlue": false, "SourceFlag": sessionStorage["SourceFlag"], "sSourceBillNo": sSourceBillNo, "sSourceType": sHBillType, "HOWNERID": sessionStorage["OrganizationID"]},
-                    success: function (result) {
-                        if (result.count == 1) {
-                            if (result.data.HBarType == '浠撳簱鏉$爜') {
-                                $("#HWHNAME").val(result.data.HWhName);
-                                $("#HWHID").val(result.data.HWhID);
-                                $("#HStockPlaceName").val("");
-                                $("#HNote").val(";涓�閿壂鐮佷粨搴撴潯鐮�");
-                                element.tabChange('tab-Kf_OtherOutBill', '2');  //璺宠浆椤电
-                            }
-                            else if (result.data.HBarType == '浠撲綅鏉$爜') {
-                                $("#HStockPlaceName").val(result.data.HSPName);
-                                $("#HStockPlaceID").val(result.data.HSPID);
-                                $("#HWHNAME").val(result.data.HWhName);
-                                $("#HWHID").val(result.data.HWhID);
-                                $("#HNote").val(";涓�閿壂鐮佷粨浣嶆潯鐮�");
-                                element.tabChange('tab-Kf_OtherOutBill', '2');//璺宠浆椤电
-                            }
-                            else if (result.data.HBarType == '閮ㄩ棬鏉$爜') {
-                                $("#HDeptName").val(result.data.HDeptName);
-                                $("#HDeptID").val(result.data.HDeptID);
-                                $("#HNote").val(";涓�閿壂鐮侀儴闂ㄦ潯鐮�");
-                                element.tabChange('tab-Kf_OtherOutBill', '2');//璺宠浆椤电
-                            }
-                            else if (result.data.HBarType == '婧愬崟鏉$爜') {
-                                $("#HSupName").val(result.data.HSupName);
-                                $("#HSupID").val(result.data.HSupID);
-                                $("#HDeptName").val(result.data.HDeptName);
-                                $("#HDeptID").val(result.data.HDeptID);
-                                $("#HSourceBillNo").val(result.data.HSourceBillNo);
-                                sessionStorage["SourceFlag"] = true;
-                                //鑾峰彇婧愬崟绫诲瀷銆佹簮鍗曞崟鍙�
-                                if (result.data.HSourceBillType == "1206") {
-                                    $("#HBillType").val("1206");
+
+                if (HDeleteFlag == "*") {
+                    if (sBarCode != "") {
+                        $('#HBarCode').val("");
+                    }
+                    $.ajax(
+                        {
+                            type: "Get",
+                            url: GetWEBURL() + "/ProductIn/Delete_Json",
+                            async: true,
+                            data: { "HInterID": sInterID, "HBillNo": sBillNo, "HBillType": sBillType, "HBarCode": sBarCode },
+                            dataType: "json",
+                            success: function (data) {
+                                if (data.count == 1) { // 璇存槑楠岃瘉鎴愬姛浜�
+                                    playSound1();
+                                    table.reload('wl-table', {
+                                        where: { HBillID: sInterID, HBillType: '1206', sWhere: '' }
+                                    });
+                                }
+                                else {
+                                    playSound();
+                                    layer.msg(data.Message, { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
 
                                 }
-                                else {
-                                    $("#HBillType").val("鎵嬪伐褰曞叆");
-                                }
-                                $("#HNote").val(";涓�閿壂鐮佹簮鍗曟潯鐮�");
-                                element.tabChange('tab-Kf_OtherOutBill', '3');
+                            },
+                            error: function (err) {
+                                playSound();
+                                layer.msg('閿欒' + err, { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
+
                             }
-                            else {
-                                if (sessionStorage["SourceFlag"] == "true") {
-                                    element.tabChange('tab-Kf_OtherOutBill', '3');
+                        });
+                }
+                else if (HScanStyle == "鏁存墭鍒犻櫎") {
+                    var HBarCode = $('#HBarCode').val();
+                    var HInterID = $('#HInterID').val();
+                    if (HBarCode == "") {
+                        layer.msg("鏁存墭鍒犻櫎鏉$爜涓嶈兘涓虹┖", { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
+                        return;
+                    }
+                    $.ajax(
+                        {
+                            type: "Get",
+                            url: GetWEBURL() + "/OtherOutBillList/OtherOutBillSDeleCode",
+                            async: true,
+                            data: { "HBarCode": HBarCode, "HInterID": HInterID },
+                            dataType: "json",
+                            success: function (data) {
+                                if (data.count == 1) { // 璇存槑楠岃瘉鎴愬姛浜�
+                                    layer.msg(data.Message, { icon: 1, btn: ['纭'], time: 100000, title: "娓╅Θ鎻愮ず" });
+                                    table.render({
+                                        elem: '#wl-table'
+                                        , url: GetWEBURL() + '/SellOut/DisBillEntryList_Webs_Json'
+                                        , cellMinWidth: 80
+                                        , toolbar: '#toolbarDemo'
+                                        , 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 {
-                                    //$("#HSupName").val(result.data.HSupName);
-                                    //$("#HSupID").val(result.data.HSupID);
-                                    //$("#HDeptName").val(result.data.HDeptName);
-                                    //$("#HDeptID").val(result.data.HDeptID);
-                                    //$("#HSourceBillNo").val(result.data.HSourceBillNo);
+                                    layer.msg(data.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: "娓╅Θ鎻愮ず" });
+                            }
+                        });
+                }
+                else {
+
+                    var sBarCode = $('#HBarCode').val()
+                    if (sBarCode == '') {
+                        playSound();
+                        layer.msg("鏉$爜涓虹┖锛屼笉鑳芥壂鎻忥紒", { icon: 5, btn: ['纭畾'], time: 100000, offset: 't' });
+                        return false;
+                        }
+
+                    if (sBarCode != "") {
+                        $('#HBarCode').val("");
+                    }
+                    if (sQty != "") {
+                        $('#HQty').val("");
+                    }
+                    sessionStorage["SourceFlag"] = false;
+                    $.ajax({
+                        url: GetWEBURL() + "/OtherOutBill/get_CheckTypeByBarCode_Out_Json",
+                        type: "GET",
+                        data: { "sCode": sBarCode, "sInterID": sInterID, "HBillType": sBillType, "sBillNo": sBillNo, "sMaker": sessionStorage["HUserName"], "WhID": sHWHID, "SPID": sHSPID, "sQty": sQty, "sRedBlue": false, "SourceFlag": sessionStorage["SourceFlag"], "sSourceBillNo": sSourceBillNo, "sSourceType": sHBillType, "HOWNERID": sessionStorage["OrganizationID"], "HScanStyle": HScanStyle },
+                        success: function (result) {
+                            if (result.count == 1) {
+                                if (result.data.HBarType == '浠撳簱鏉$爜') {
+                                    $("#HWHNAME").val(result.data.HWhName);
+                                    $("#HWHID").val(result.data.HWhID);
+                                    $("#HStockPlaceName").val("");
+                                    $("#HNote").val(";涓�閿壂鐮佷粨搴撴潯鐮�");
+                                    element.tabChange('tab-Kf_OtherOutBill', '2');  //璺宠浆椤电
+                                }
+                                else if (result.data.HBarType == '浠撲綅鏉$爜') {
+                                    $("#HStockPlaceName").val(result.data.HSPName);
+                                    $("#HStockPlaceID").val(result.data.HSPID);
+                                    $("#HWHNAME").val(result.data.HWhName);
+                                    $("#HWHID").val(result.data.HWhID);
+                                    $("#HNote").val(";涓�閿壂鐮佷粨浣嶆潯鐮�");
+                                    element.tabChange('tab-Kf_OtherOutBill', '2');//璺宠浆椤电
+                                }
+                                else if (result.data.HBarType == '閮ㄩ棬鏉$爜') {
+                                    $("#HDeptName").val(result.data.HDeptName);
+                                    $("#HDeptID").val(result.data.HDeptID);
+                                    $("#HNote").val(";涓�閿壂鐮侀儴闂ㄦ潯鐮�");
+                                    element.tabChange('tab-Kf_OtherOutBill', '2');//璺宠浆椤电
+                                }
+                                else if (result.data.HBarType == '婧愬崟鏉$爜') {
+                                    $("#HSupName").val(result.data.HSupName);
+                                    $("#HSupID").val(result.data.HSupID);
+                                    $("#HDeptName").val(result.data.HDeptName);
+                                    $("#HDeptID").val(result.data.HDeptID);
+                                    $("#HSourceBillNo").val(result.data.HSourceBillNo);
                                     sessionStorage["SourceFlag"] = true;
                                     //鑾峰彇婧愬崟绫诲瀷銆佹簮鍗曞崟鍙�
                                     if (result.data.HSourceBillType == "1206") {
                                         $("#HBillType").val("1206");
 
                                     }
-                                    else if (result.data.HSourceBillType == "1601") {
-                                        $("#HBillType").val("1601");
+                                    else {
+                                        $("#HBillType").val("鎵嬪伐褰曞叆");
                                     }
-                                    $("#HNote").val(";鐗╂枡鏉$爜");
+                                    $("#HNote").val(";涓�閿壂鐮佹簮鍗曟潯鐮�");
                                     element.tabChange('tab-Kf_OtherOutBill', '3');
                                 }
-                            }
-                            //$("#HSupID").val(result.data.HSupID);
-                            //$("#HSupName").val(result.data.HSupName);
-                            //$("#HDeptID").val(result.data.HDeptID);
-                            //$("#HDeptName").val(result.data.HDeptName);
-                            layer.load(3)
-                            //table.render({
-                            //    elem: '#wl-table'
-                            //    //, url: GetWEBURL() + '/OtherOutBill/DisBillEntryList_Webs_Json'
-                            //    ,url: GetWEBURL() + '/MateOutBill/DisBillEntryList_Webs_New_Json1'
-                            //    , toolbar: '#toolbarDemo'
-                            //    //, where: { HBillID: sInterID, HBillType: '1206', sWhere: '' }
-                            //    ,data: { HBillID: sInterID, HBillNo: sBillNo, HBillType: '1206', sMouldManagerCtl: sMouldManagerCtl, sFIFOCtl: sFIFOCtl }
-                            //    , cellMinWidth: 90
-                            //    , cols: [[
-                            //        { type: 'radio' }
-                            //        , { field: 'HQty', title: '鏁伴噺', width: 150 }
-                            //        , { 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 }
-                            //    ]]
-                            //    // , data: [linterid]
-                            //    // , page: true
-                            //    , height: 500
-                            //    , done: function () {
-                            //        layer.closeAll("loading");
-                            //    }
-                            //});
-                            $.ajax({
-                                url: GetWEBURL() + '/OtherInStockBill/DisBillEntryList_Webs_New_Json1',
-                                type: "GET",
-                                data: { HBillID: sInterID, HBillNo: sBillNo, HBillType: '1206', sMouldManagerCtl: sMouldManagerCtl, sFIFOCtl: sFIFOCtl },
-                                success: function (result) {
-                                    if (result.count == 1) { // 璇存槑楠岃瘉鎴愬姛浜嗭紝
-                                        listOption.data = result.data.list;
-                                        table.render(listOption);
-                                        listOption1.data = result.data.list2;
-                                        table.render(listOption1);
-
-                                        //console.log(result.data.list2);
-                                        var count = 0;
-                                        var count1 = 0;
-                                        for (var i = 0; i < result.data.list.length; i++) {
-                                            count += result.data.list[i].HQty;
-                                            count1 += result.data.list[i].HPieceQty;
-                                        }
-                                        $("#HSumQtys").val(count);
-                                        $("#HBarCodeQtys").val(count1);
-                                        //return;
+                                else {
+                                    if (sessionStorage["SourceFlag"] == "true") {
+                                        element.tabChange('tab-Kf_OtherOutBill', '3');
                                     }
                                     else {
-                                        layer.msg(result.Message);
+                                        //$("#HSupName").val(result.data.HSupName);
+                                        //$("#HSupID").val(result.data.HSupID);
+                                        //$("#HDeptName").val(result.data.HDeptName);
+                                        //$("#HDeptID").val(result.data.HDeptID);
+                                        //$("#HSourceBillNo").val(result.data.HSourceBillNo);
+                                        sessionStorage["SourceFlag"] = true;
+                                        //鑾峰彇婧愬崟绫诲瀷銆佹簮鍗曞崟鍙�
+                                        if (result.data.HSourceBillType == "1206") {
+                                            $("#HBillType").val("1206");
+
+                                        }
+                                        else if (result.data.HSourceBillType == "1601") {
+                                            $("#HBillType").val("1601");
+                                        }
+                                        $("#HNote").val(";鐗╂枡鏉$爜");
+                                        element.tabChange('tab-Kf_OtherOutBill', '3');
                                     }
-                                    layer.closeAll("loading");
                                 }
-                            });
+                                //$("#HSupID").val(result.data.HSupID);
+                                //$("#HSupName").val(result.data.HSupName);
+                                //$("#HDeptID").val(result.data.HDeptID);
+                                //$("#HDeptName").val(result.data.HDeptName);
+                                layer.load(3)
+                                //table.render({
+                                //    elem: '#wl-table'
+                                //    //, url: GetWEBURL() + '/OtherOutBill/DisBillEntryList_Webs_Json'
+                                //    ,url: GetWEBURL() + '/MateOutBill/DisBillEntryList_Webs_New_Json1'
+                                //    , toolbar: '#toolbarDemo'
+                                //    //, where: { HBillID: sInterID, HBillType: '1206', sWhere: '' }
+                                //    ,data: { HBillID: sInterID, HBillNo: sBillNo, HBillType: '1206', sMouldManagerCtl: sMouldManagerCtl, sFIFOCtl: sFIFOCtl }
+                                //    , cellMinWidth: 90
+                                //    , cols: [[
+                                //        { type: 'radio' }
+                                //        , { field: 'HQty', title: '鏁伴噺', width: 150 }
+                                //        , { 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 }
+                                //    ]]
+                                //    // , data: [linterid]
+                                //    // , page: true
+                                //    , height: 500
+                                //    , done: function () {
+                                //        layer.closeAll("loading");
+                                //    }
+                                //});
+                                $.ajax({
+                                    url: GetWEBURL() + '/OtherInStockBill/DisBillEntryList_Webs_New_Json1',
+                                    type: "GET",
+                                    data: { HBillID: sInterID, HBillNo: sBillNo, HBillType: '1206', sMouldManagerCtl: sMouldManagerCtl, sFIFOCtl: sFIFOCtl },
+                                    success: function (result) {
+                                        if (result.count == 1) { // 璇存槑楠岃瘉鎴愬姛浜嗭紝
+                                            listOption.data = result.data.list;
+                                            table.render(listOption);
+                                            listOption1.data = result.data.list2;
+                                            table.render(listOption1);
+
+                                            //console.log(result.data.list2);
+                                            var count = 0;
+                                            var count1 = 0;
+                                            for (var i = 0; i < result.data.list.length; i++) {
+                                                count += result.data.list[i].HQty;
+                                                count1 += result.data.list[i].HPieceQty;
+                                            }
+                                            $("#HSumQtys").val(count);
+                                            $("#HBarCodeQtys").val(count1);
+                                            //return;
+                                        }
+                                        else {
+                                            layer.msg(result.Message);
+                                        }
+                                        layer.closeAll("loading");
+                                    }
+                                });
+                            }
+                            else {
+                                // $("#verifycode").click();
+                                //layer.msg(result.Message, { icon: 5 });
+                                playSound();
+                                layer.msg(result.Message, { icon: 5, btn: ['閫�鍑�'], time: 100000, offset: 't' });
+                            }
+                            layer.closeAll("loading");
                         }
-                        else {
-                            // $("#verifycode").click();
-                            //layer.msg(result.Message, { icon: 5 });
-                            playSound();
-                            layer.msg(result.Message, { icon: 5, btn: ['閫�鍑�'], time: 100000, offset: 't' });
-                        }
-                        layer.closeAll("loading");
-                    }
-                });
+                    });
+                }
             }
 
             var listOption = {
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_FastList.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_FastList.html"
index f073b7f..6ed576c 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_FastList.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_FastList.html"
@@ -163,23 +163,23 @@
             table.render({
                 elem: '#dj-table'
                 , url: GetWEBURL() + '/Web/chanpinruk'
-                    ,toolbar: '#toolbarDemo'
-                    , where: { HBillType: sBillType,sWhere:''}
-                    , 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");
-                      }
+                , 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");
+                    }
             });
             table.render({
                 elem: '#yd-table'

--
Gitblit v1.9.1