From e2e7197eae573757ecb94119ebc1943258faa57d Mon Sep 17 00:00:00 2001
From: black-goat-me <226547893@qq.com>
Date: 星期三, 26 四月 2023 11:04:30 +0800
Subject: [PATCH] Kf_POSTockInBillList.html文件和Kf_MoveStockBillList.html文件添加 条码明细 按钮,并绑定触发事件。 新建Kf_BarCodeDetailQuery.html文件作为条码明细的展示页面。

---
 WebTM/views/验收入库/产品入库/Kf_ProductInBill_Fast.html |  258 +++++++++++++++++++++++++++++++++++++++-----------
 1 files changed, 199 insertions(+), 59 deletions(-)

diff --git "a/WebTM/views/\351\252\214\346\224\266\345\205\245\345\272\223/\344\272\247\345\223\201\345\205\245\345\272\223/Kf_ProductInBill_Fast.html" "b/WebTM/views/\351\252\214\346\224\266\345\205\245\345\272\223/\344\272\247\345\223\201\345\205\245\345\272\223/Kf_ProductInBill_Fast.html"
index be596dd..f207774 100644
--- "a/WebTM/views/\351\252\214\346\224\266\345\205\245\345\272\223/\344\272\247\345\223\201\345\205\245\345\272\223/Kf_ProductInBill_Fast.html"
+++ "b/WebTM/views/\351\252\214\346\224\266\345\205\245\345\272\223/\344\272\247\345\223\201\345\205\245\345\272\223/Kf_ProductInBill_Fast.html"
@@ -9,7 +9,7 @@
     <link rel="stylesheet" href="../../../layuiadmin/layui/css/layui.css" media="all">
     <link rel="stylesheet" href="../../../layuiadmin/style/admin.css" media="all">
     <style>
-       
+
         .layui-col-xs8 {
             width: 55.666667%;
         }
@@ -47,14 +47,14 @@
                     </div>
                     <div class="layui-tab layui-col-xs12" lay-filter="tab-ProductlnBill">
                         <ul class="layui-tab-title" lay-filter="tab-all">
-                            <li lay-id="1" style="padding:1px;" class="layui-this">婧愬崟淇℃伅</li>
-                            <li lay-id="2" style="padding:1px;">鍗曟嵁淇℃伅</li>
+                            <li lay-id="1" style="padding:1px;">婧愬崟淇℃伅</li>
+                            <li lay-id="2" style="padding:1px;" class="layui-this">鍗曟嵁淇℃伅</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>
                         </ul>
                         <div class="layui-tab-content">
-                            <div class="layui-tab-item layui-show">
+                            <div class="layui-tab-item ">
                                 <div class="layui-form-item">
                                     <!--<div class="layui-row">
             <div class="layui-col-xs3">
@@ -79,8 +79,9 @@
                                         </div>
                                         <div class="layui-col-xs8">
                                             <select name="HBillType" id="HBillType">
-                                                <option value="3710">鐢熶骇璁㈠崟</option>
+                                                <option value="3714">宸ュ簭姹囨姤鍗�</option>
                                                 <option value="3711">鐢熶骇姹囨姤鍗�</option>
+                                                <option value="3710" selected>鐢熶骇璁㈠崟</option>
                                             </select>
                                         </div>
                                     </div>
@@ -96,20 +97,30 @@
                                         <div class="layui-col-xs8">
                                             <input type="text" name="HSourceBillNo" id="HSourceBillNo" lay-verify="HSourceBillNo" autocomplete="off" class="layui-input">
                                         </div>
-                                        <div class="layui-col-xs2">
+                                        <!--<div class="layui-col-xs2">
                                             <button type="button" lay-submit="" class="layui-btn" lay-filter="QueDin2">纭畾</button>
+                                        </div>-->
+                                    </div>
+                                </div>
+                                <div class="layui-form-item">
+                                    <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">
+                                            <input name="HDate" id="HDate" autocomplete="off" class="layui-input">
                                         </div>
                                     </div>
                                 </div>
                             </div>
-                            <div class="layui-tab-item">
+                            <div class="layui-tab-item layui-show" >
                                 <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="HWHNAME" id="HWHNAME" lay-verify="HWHNAME" autocomplete="off" class="layui-input" readonly>
+                                            <input type="text" name="HWHNAME" id="HWHNAME" lay-verify="HWHNAME" autocomplete="off" class="layui-input">
                                             <input type="hidden" name="HWHID" id="HWHID" lay-verify="HWHID" value="0" autocomplete="off" class="layui-input">
                                         </div>
                                         <div class="layui-col-xs3">
@@ -316,9 +327,9 @@
                 , layer = layui.layer
                 , table = layui.table
                 , form = layui.form
+                , laydate = layui.laydate
                 , element = layui.element;
-
-
+            var HStockOrgID = sessionStorage["OrganizationID"]
             var option = [];
 
 
@@ -342,12 +353,24 @@
             $("#HMakerID").hide();
             $("#HBillerID").val(sessionStorage["HBillerID"]);
             $("#HBillerID").hide();
+            $("#HDate").val(formatDate(sessionStorage["HDate"]));
             var HSourceFlag = sessionStorage["SourceFlag"];
             //榛樿甯﹀叆鐨勪粨搴擄紝濡傛灉鍚敤浠撲綅鍒欎粨浣嶆湁鏁堬紝濡傛灉娌℃湁鍚敤鍒欎粨浣嶇伆搴� new
 
-            $("#HBarCode").focus();
+            $("#HWHNAME").focus();                 
 
+            // 缂栬緫鑾峰彇琛ㄥご鏃舵椂闂存牸寮忕煫姝f柟寮�
+            function formatDate(date) {
+                var d = new Date(date),
+                    month = '' + (d.getMonth() + 1),
+                    day = '' + d.getDate(),
+                    year = d.getFullYear();
 
+                if (month.length < 2) month = '0' + month;
+                if (day.length < 2) day = '0' + day;
+
+                return [year, month, day].join('-');
+            }
 
             //鍒濆鍖栨槑缁嗚〃鏍�
             function set_InitGrid() {
@@ -362,7 +385,7 @@
                     , { field: 'HSourceInterID', title: '婧愬崟涓诲唴鐮�', width: 150 }
                     , { field: 'HSourceEntryID', title: '婧愬崟瀛愬唴鐮�', width: 150 }
                     , { field: 'HSourceBillNo', title: '婧愬崟鍗曞彿', width: 150 }
-                    , { field: 'HBatchNo', title: '鎵规', width: 150 }
+                    //, { field: 'HBatchNo', title: '鎵规', width: 150 }
                     , { field: 'HInterID', title: '鍗曟嵁ID', width: 150, hide: true }
                     , { field: 'HBilltype', title: '鍗曟嵁绫诲瀷', width: 150, hide: true }
                     , { field: 'Hbarcode', title: '鏉$爜缂栧彿', width: 150, hide: true }
@@ -409,6 +432,17 @@
             var linterid = params[params[0]]; //浠庡弬鏁颁腑鑾峰彇 鍗曟嵁鍐呯爜
             var lSourceBillType = params[params[2]];  //浠庡崟鎹幏鍙� 婧愬崟绫诲瀷
 
+            //鍒濆鍖栬〃鍗曟彃浠�
+            set_InitFrom();
+
+            //鍒濆鍖栬〃鍗曟彃浠�
+            function set_InitFrom() {
+                //甯歌鐢ㄦ硶
+                laydate.render({
+                    elem: '#HDate'
+                });
+            }
+
             function RoadBillMain(linterid)//鍔犺浇琛ㄥご
             {
                 $.ajax({
@@ -419,8 +453,41 @@
                         // console.log(d.data);
                         $("#HInterID").val(d.data[0].HInterID);
                         $("#HBillNo").val(d.data[0].HBillNo);
-                        $("#HBillType").val(d.data[0].HSourceBillType);
+                        $("#HBillType").val(d.data[0].HSourceBillType == null ? "3714" : d.data[0].HSourceBillType);
+                        //鑾峰彇婧愬崟绫诲瀷銆佹簮鍗曞崟鍙�
+                        if (d.data[0].HSourceBillType == "3711") {
+                            $("#HBillType").empty();
+                            $("#HBillType").val("3711");
+                            var optionHtml = '';
+                            optionHtml += "<option value = '" + d.data[0].HSourceBillType + "' >" + '鐢熶骇姹囨姤鍗�' + "</option>";
+                            $("#HBillType").append(optionHtml);
+                            layui.form.render('select');
+                            $("#HBillType").attr("readonly", "readonly");
+                        }
+                        else if (d.data[0].HSourceBillType == "3710") {
+                            $("#HBillType").empty();
+                            $("#HBillType").val("3710");
+                            var optionHtml = '';
+                            optionHtml += "<option value = '" + d.data[0].HSourceBillType + "' >" + '鐢熶骇璁㈠崟' + "</option>";
+                            $("#HBillType").append(optionHtml);
+                            layui.form.render('select');
+                            $("#HBillType").attr("readonly", "readonly");
+                        }
+                        else if (d.data[0].HSourceBillType == "3714") {
+                            $("#HBillType").empty();
+                            $("#HBillType").val("3714");
+                            var optionHtml = '';
+                            optionHtml += "<option value = '" + d.data[0].HSourceBillType + "' >" + '宸ュ簭姹囨姤鍗�' + "</option>";
+                            $("#HBillType").append(optionHtml);
+                            layui.form.render('select');
+                            $("#HBillType").attr("readonly", "readonly");
+                        }
+                        else {
+                            //$("#HBillType").val("-1");
+                        }
                         $("#HSourceBillNo").val(d.data[0].HSourceBillNo);
+                        $("#HSourceBillNo").attr("disabled", "true");
+                        $("#HDate").val(formatDate(new Date(), "yyyy-MM-dd"));
                         //$("#HWHID").val(d.data[0].HWhID);
                         //$("#HStockPlaceID").val(d.data[0].HSPID);
                         //$("#HKeeperID").val(d.data[0].HKeeperID);
@@ -432,20 +499,13 @@
 
 
             function RoadBillSub(linterid)//鍔犺浇琛ㄤ綋
-            {
-                //var checkStatus = table.checkStatus('wl-table')
-                //    , data = checkStatus.data;
-                //var sInterID = $('#HInterID').val()
-                //var sBillNo = $("#HBillNo").val()
-                //var sMouldManagerCtl = 'N'
-                //var sFIFOCtl = 'N'
+            { 
 
                 $("#HInterID").val(linterid);//淇敼鏃朵富琛↖D
                 //缂栬緫鍔犺浇鏁版嵁
                 var sInterID = $("#HInterID").val();
                 table.render({
-                    elem: '#wl-table'
-                    //, url: 'http://61.130.49.162:9090/WMSAPI///ProductIn/DisBillEntryList_Webs_Json'
+                    elem: '#wl-table' 
                     , url: GetWEBURL() + '/ProductIn/DisBillEntryList_Webs_Json'
                     , toolbar: '#toolbarDemo'
                     , defaultToolbar: []
@@ -460,7 +520,7 @@
                         , { field: 'HSourceInterID', title: '婧愬崟涓诲唴鐮�', width: 150 }
                         , { field: 'HSourceEntryID', title: '婧愬崟瀛愬唴鐮�', width: 150 }
                         , { field: 'HSourceBillNo', title: '婧愬崟鍗曞彿', width: 150 }
-                        , { field: 'HBatchNo', title: '鎵规', width: 150 }
+                        //, { field: 'HBatchNo', title: '鎵规', width: 150 }
                     ]]
                     // , data: [linterid]
                     // , page: true
@@ -516,6 +576,8 @@
                 //鑾峰彇鏈�澶у崟鎹彿 new
                 $("#HInterID").val("");
                 $("#HBillNo").val("");
+                $("#HBillType").val("3710");
+                form.render('select');
                 $.ajax({
                     url: GetWEBURL() + "/Web/GetMAXNumPDA",
                     type: "GET",
@@ -524,6 +586,7 @@
                         //console.log(d.data);
                         $("#HInterID").val(d.data[0].HInterID);
                         $("#HBillNo").val(d.data[0].HBillNo);
+                        $("#HDate").val(formatDate(new Date(), "yyyy-MM-dd"));
                         set_InitGrid();
                     }
                 });
@@ -552,7 +615,6 @@
             //
             //
 
-            //閫夋嫨浠撳簱
             form.on('submit(HWHID-BT)', function () {//閫夋嫨浠撳簱
                 layer.open({
                     type: 2
@@ -561,13 +623,28 @@
                     , shade: 0.6 //閬僵閫忔槑搴�
                     , maxmin: true //鍏佽鍏ㄥ睆鏈�灏忓寲
                     , anim: 0 //0-6鐨勫姩鐢诲舰寮忥紝-1涓嶅紑鍚�
-                    , content: ['../../../views/Baseset/鍩虹璧勬枡/Gy_WarehouseList.html?Type=HWHID', 'yes']
+                    , content: ['../../../views/Baseset/鍩虹璧勬枡/Gy_WarehouseListNew.html?Type=HWHID&HOrgID=' + HStockOrgID + '', 'yes']
                     , resize: false
                     , cancel: function () {
-                        //$(".layui-btn").removeClass("layui-btn-disabled");
                     }
                 })
             });
+            ////閫夋嫨浠撳簱
+            //form.on('submit(HWHID-BT)', function () {//閫夋嫨浠撳簱
+            //    layer.open({
+            //        type: 2
+            //        , area: ['100%', '100%']
+            //        , title: '浠撳簱鍒楄〃'
+            //        , shade: 0.6 //閬僵閫忔槑搴�
+            //        , maxmin: true //鍏佽鍏ㄥ睆鏈�灏忓寲
+            //        , anim: 0 //0-6鐨勫姩鐢诲舰寮忥紝-1涓嶅紑鍚�
+            //        , content: ['../../../views/Baseset/鍩虹璧勬枡/Gy_WarehouseList.html?Type=HWHID', 'yes']
+            //        , resize: false
+            //        , cancel: function () {
+            //            //$(".layui-btn").removeClass("layui-btn-disabled");
+            //        }
+            //    })
+            //});
 
             //閫夋嫨浠撲綅
             form.on('submit(HSpID-BT)', function () {//閫夋嫨浠撲綅
@@ -743,7 +820,7 @@
                                 , { field: 'HSourceInterID', title: '婧愬崟涓诲唴鐮�', width: 150 }
                                 , { field: 'HSourceEntryID', title: '婧愬崟瀛愬唴鐮�', width: 150 }
                                 , { field: 'HSourceBillNo', title: '婧愬崟鍗曞彿', width: 150 }
-                                , { field: 'HBatchNo', title: '鎵规', width: 150 }
+                                //, { field: 'HBatchNo', title: '鎵规', width: 150 }
                                 , { field: 'HBarcodeQtys', title: '鏉$爜鏁伴噺', width: 150 }
                             ]]
                             // , data: [linterid]
@@ -759,11 +836,8 @@
             });
 
             form.on('submit(Cancel)', function () {
-                //sessionStorage["SourceFlag"] = false;
-                //parent.location.href = "../../../views/index.html"
-                //window.close();//鍏抽棴褰撳墠椤�
                 layer.confirm('鎮ㄧ‘瀹氳閫�鍑哄悧锛�', { icon: 3, title: '鎻愮ず' }, function (index) {
-                    window.close();
+                    parent.location.href = "../../../views/index_Mobile.html";
                 });
             })
 
@@ -933,7 +1007,7 @@
                 var sMainStr = JSON.stringify(data.field);
                 var sSubStr = table.cache['wl-table'];
                 //var sSourceType = $("#HBillType").val();
-                var sSourceType = "3711";
+                var sSourceType = "3714";
                 if (AllowLoadData(sSubStr) != false)//闈炵┖楠岃瘉
                 {
                     layer.load(3);
@@ -1076,6 +1150,40 @@
                 }
             });
 
+            //鎵粨搴�
+            $('#HWHNAME').on('keydown', function (event) {
+                var HBarCode = $('#HWHNAME').val()
+                if (event.keyCode == 13) {
+                    if (!HBarCode) {
+                        layer.msg('鏃犱粨搴撴潯鐮佷俊鎭紒');
+                        return;
+                    }
+                    //鍒ゆ柇鏂囨湰妗嗘槸鍚︽湁鏁版嵁    new
+                    $.ajax({
+                        url: GetWEBURL() + "/LookingFor/getWHName_Json",
+                        type: "GET",
+                        data: { "HBarCode": HBarCode },
+                        success: function (result) {
+                            if (result.count == 1) { // 璇存槑楠岃瘉鎴愬姛浜嗭紝
+                                //$("#HStockPlaceName").val(result.data[0].HName);
+                                //$("#HStockPlaceID").val(result.data[0].HItemID);
+                                $("#HBarCode").focus();      
+                                $("#HWHID").val(result.data[0].HItemID);
+                                $("#HWHNAME").val(result.data[0].HName);
+                                element.tabChange('tab-POStockInBill', '2');
+                            }
+                            else {
+                                // $("#verifycode").click();
+                                //layer.msg(result.Message, { icon: 5 });
+                                layer.msg(result.Message, { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
+                            }
+                            layer.closeAll("loading");
+                        }
+                    });
+                    // layer.msg($('#HSourceBillNo').val(), { icon: 1 });
+                }
+            });
+
             //鍒锋柊鏄庣粏椤电
             table.render({
                 elem: '#mx-table'
@@ -1124,8 +1232,7 @@
                                 if (data.count == 1) { // 璇存槑楠岃瘉鎴愬姛浜�
                                     playSound1();
                                     table.render({
-                                        elem: '#wl-table'
-                                        //, url: 'http://61.130.49.162:9090/WMSAPI///ProductIn/DisBillEntryList_Webs_Json'
+                                        elem: '#wl-table' 
                                         , url: GetWEBURL() + '/ProductIn/DisBillEntryList_Webs_Json'
                                         , toolbar: '#toolbarDemo'
                                         , defaultToolbar: []
@@ -1140,7 +1247,7 @@
                                             , { field: 'HSourceInterID', title: '婧愬崟涓诲唴鐮�', width: 150 }
                                             , { field: 'HSourceEntryID', title: '婧愬崟瀛愬唴鐮�', width: 150 }
                                             , { field: 'HSourceBillNo', title: '婧愬崟鍗曞彿', width: 150 }
-                                            , { field: 'HBatchNo', title: '鎵规', width: 150 }
+                                            //, { field: 'HBatchNo', title: '鎵规', width: 150 }
                                             , { field: 'HBarcodeQtys', title: '鏉$爜鏁伴噺', width: 150 }
                                         ]]
                                         // , data: [linterid]
@@ -1150,6 +1257,8 @@
                                             layer.closeAll("loading");
                                         }
                                     })
+                                    //娓呯┖鏁伴噺
+                                    $("#HQty").val("");
                                 }
                                 else {
                                     playSound();
@@ -1190,9 +1299,11 @@
                     //if (AllowLoadData(sSubStr, 'HBarCode') != false) {//闈炵┖楠岃瘉
                     $.ajax({
                         //url: "http://61.130.49.162:9090/WMSAPI///ProductIn/get_CheckTypeByBarCode_Json",
-                        url: GetWEBURL() + "/ProductIn/get_CheckTypeByBarCode_Json",
+                        url: GetWEBURL() + "/WEBSController/Get_BarCode_Json",
+                        //url: GetWEBURL() + "/ProductIn/get_CheckTypeByBarCode_Json",  //鏃�
                         type: "GET",
-                        data: { "sCode": sBarCode, "sInterID": sInterID, "sBillNo": sBillNo, "sBillType": sBillType, "sMaker": sessionStorage["HUserName"], "WhID": sHWHID, "SPID": sHSPID, "sQty": sQty, "sRedBlue": false, "SourceFlag": HSourceFlag, "sSourceBillNo": sSourceBillNo, "sSourceType": sHBillType, "HOWNERID": sessionStorage["OrganizationID"] },
+                        data: { "sBarCode": sBarCode, "HInterID": sInterID, "HBillType": sBillType, "HBillNo": sBillNo, "HMaker": sessionStorage["HUserName"], "HWhID": sHWHID, "HSPID": sHSPID, "HQty": sQty, "HRedBlueFlag": false, "SourceFlag": HSourceFlag, "HSourceBillNo": sSourceBillNo, "HSourceBillType": sHBillType, "HStockOrgID": sessionStorage["OrganizationID"], "HScanStyle": '', "HCustom1": '', "HCustom2": '' },
+                        //data: { "sCode": sBarCode, "sInterID": sInterID, "sBillNo": sBillNo, "sBillType": sBillType, "sMaker": sessionStorage["HUserName"], "WhID": sHWHID, "SPID": sHSPID, "sQty": sQty, "sRedBlue": false, "SourceFlag": HSourceFlag, "sSourceBillNo": sSourceBillNo, "sSourceType": sHBillType, "HOWNERID": sessionStorage["OrganizationID"] },  //鏃�
                         success: function (result) {
                             //debugger;
                             playSound1();
@@ -1219,10 +1330,14 @@
                                     element.tabChange('tab-ProductlnBill', '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);
+                                    //$("#HSupName").val(result.data.HSupName);
+                                    //$("#HSupID").val(result.data.HSupID);
+                                    //$("#HDeptName").val(result.data.HDeptName);
+                                    //$("#HDeptID").val(result.data.HDeptID);
+                                    if (result.data.hDeptIDField != 0) {
+                                        $("#HDeptID").val(result.data.hDeptIDField);
+                                        $("#HDeptName").val(result.data.hDeptNameField);
+                                    }
                                     $("#HSourceBillNo").val(result.data.hSourceBillNoField);
                                     HSourceFlag = true;
                                     //鑾峰彇婧愬崟绫诲瀷銆佹簮鍗曞崟鍙�
@@ -1241,12 +1356,16 @@
                                         $("#HSourceBillNo").attr("readonly", "readonly");
                                     }
                                     else {
-                                        $("#HSupName").val(result.data.HSupName);
-                                        $("#HSupID").val(result.data.HSupID);
+                                        //$("#HSupName").val(result.data.HSupName);
+                                        //$("#HSupID").val(result.data.HSupID);
                                         //$("#HDeptName").val(result.data.HDept);
                                         //$("#HDeptID").val(result.data.HDeptID);
+                                        if (result.data.hDeptIDField != 0) {
+                                            $("#HDeptID").val(result.data.hDeptIDField);
+                                            $("#HDeptName").val(result.data.hDeptNameField);
+                                        }
                                         $("#HSourceBillNo").val(result.data.hSourceBillNoField);
-                                        $("#HBillType").val(result.data.hSourceBillTypeField)
+                                        $("#HBillType").val(result.data.hSourceBillTypeField == null ? "3714" : result.data.hSourceBillTypeField);
                                         HSourceFlag = true;
                                         //鑾峰彇婧愬崟绫诲瀷銆佹簮鍗曞崟鍙�
                                         if (result.data.hSourceBillTypeField == "3711") {
@@ -1258,11 +1377,20 @@
                                             layui.form.render('select');
                                             $("#HBillType").attr("readonly", "readonly");
                                         }
-                                        if (result.data.hSourceBillTypeField == "3710") {
+                                        else if (result.data.hSourceBillTypeField == "3710") {
                                             $("#HBillType").empty();
                                             $("#HBillType").val("3710");
                                             var optionHtml = '';
                                             optionHtml += "<option value = '" + result.data.hSourceBillTypeField + "' >" + '鐢熶骇璁㈠崟' + "</option>";
+                                            $("#HBillType").append(optionHtml);
+                                            layui.form.render('select');
+                                            $("#HBillType").attr("readonly", "readonly");
+                                        }
+                                        else if (result.data.hSourceBillTypeField == "3714") {
+                                            $("#HBillType").empty();
+                                            $("#HBillType").val("3714");
+                                            var optionHtml = '';
+                                            optionHtml += "<option value = '" + result.data.hSourceBillTypeField + "' >" + '宸ュ簭姹囨姤鍗�' + "</option>";
                                             $("#HBillType").append(optionHtml);
                                             layui.form.render('select');
                                             $("#HBillType").attr("readonly", "readonly");
@@ -1339,6 +1467,8 @@
                                         layer.closeAll("loading");
                                     }
                                 });
+                                //娓呯┖鏁伴噺
+                                $("#HQty").val("");
                             }
                             else {
                                 playSound();
@@ -1358,18 +1488,19 @@
             var listOption = {
                 elem: '#wl-table'
                 , toolbar: '#toolbarDemo'
+                , totalRow: true
                 , cellMinWidth: 90
                 , cols: [[
                     { type: 'radio' }
-                    , { field: 'HQty', title: '鏁伴噺', width: 150 }
-                    , { field: 'HQtyMust', title: '搴旀敹鏁伴噺', width: 150 }
+                    , { 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: 'HSourceInterID', title: '婧愬崟涓诲唴鐮�', width: 150 }
                     , { field: 'HSourceEntryID', title: '婧愬崟瀛愬唴鐮�', width: 150 }
                     , { field: 'HSourceBillNo', title: '婧愬崟鍗曞彿', width: 150 }
-                    , { field: 'HBatchNo', title: '鎵规', width: 150 }
+                    //, { field: 'HBatchNo', title: '鎵规', width: 150 }
                     , { field: 'HPieceQty', title: '鏉$爜鏁伴噺', width: 150 }
                 ]]
                 , height: 500
@@ -1389,7 +1520,7 @@
                     , { field: 'HMaterNumber', title: '鐗╂枡浠g爜', width: 150 }
                     , { field: 'HMaterName', title: '鐗╂枡鍚嶇О', width: 150 }
                     , { field: 'HMaterModel', title: '瑙勬牸鍨嬪彿', width: 150 }
-                    , { field: 'HBatchNo', title: '鎵瑰彿', width: 150 }
+                    //, { field: 'HBatchNo', title: '鎵瑰彿', width: 150 }
                     //, { field: 'HSourceInterID', title: '婧愬崟涓诲唴鐮�', width: 150 }
                     //, { field: 'HSourceEntryID', title: '婧愬崟瀛愬唴鐮�', width: 150 }
                     , { field: 'HSourceBillNo', title: '婧愬崟鍗曞彿', width: 150 }
@@ -1415,36 +1546,44 @@
                 var HSourceBillNo = $('#HSourceBillNo').val()
                 var sInterID = $("#HInterID").val()
                 var sBillNo = $("#HBillNo").val()
+                var sBillType = '1202'
                 var HSourceBillType = $("#HBillType").val()
                 if (HSourceBillNo == "" || sInterID <= 0) {
                     layer.msg("婧愬崟鍙蜂负绌猴紝鎴栬�呭唴鐮佷笉瀛樺湪锛�", { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
                     return;
                 }
                 //
-                $.ajax({
-                    //url: "http://61.130.49.162:9090/WMSAPI///ProductIn/set_SavePonderationBillMain_Temp_Source_Fast_Json",
-                    url: GetWEBURL() + "/ProductIn/set_SavePonderationBillMain_Temp_Source_Fast_Json",
+                $.ajax({ 
+                    url: GetWEBURL() + "/WEBSController/Get_SourceBarCode_ProductIn_Json",
+                    //url: GetWEBURL() + "/ProductIn/set_SavePonderationBillMain_Temp_Source_Fast_Json",    //鏃�
                     type: "GET",
-                    data: { "HSourceBillType": HSourceBillType, "HSourceBillNo": HSourceBillNo, "sInterID": sInterID, "sBillNo": sBillNo },
+                    data: { "HInterID": sInterID, "HBillNo": sBillNo, "HBillType": sBillType, "HSourceBillNo": HSourceBillNo, "HSourceBillType": HSourceBillType, "HMaker": sessionStorage["HUserName"], "HStockOrgID": sessionStorage["OrganizationID"] },
+                    //data: { "HSourceBillType": HSourceBillType, "HSourceBillNo": HSourceBillNo, "sInterID": sInterID, "sBillNo": sBillNo },    //鏃�
                     success: function (result) {
                         if (result.count == 1) { // 璇存槑楠岃瘉鎴愬姛浜嗭紝
-                            $("#HDeptID").val(result.data[0].HDeptID);
-                            $("#HDeptName").val(result.data[0].HDeptName);
+                            if (result.data.hDeptIDField != 0) {
+                                $("#HDeptID").val(result.data.hDeptIDField);
+                                $("#HDeptName").val(result.data.hDeptNameField);
+                            }
+                            //if (result.data[0].HDeptID != 0) {
+                            //    $("#HDeptID").val(result.data[0].HDeptID);
+                            //    $("#HDeptName").val(result.data[0].HDeptName);
+                            //}
                             playSound1();
                             HSourceFlag = true;
                             layer.load(3)
                             element.tabChange('tab-ProductlnBill', '2');
                             table.render({
-                                elem: '#wl-table'
-                                //, url: 'http://61.130.49.162:9090/WMSAPI///ProductIn/DisBillEntryList_Webs_Json'
+                                elem: '#wl-table' 
                                 , url: GetWEBURL() + '/ProductIn/DisBillEntryList_Webs_Json'
                                 , toolbar: '#toolbarDemo'
+                                , totalRow: true
                                 , defaultToolbar: []
                                 , where: { HBillID: sInterID, HBillType: '1202', sWhere: '' }
                                 , cols: [[
                                     { type: 'radio' }
-                                    , { field: 'HQty', title: '鏁伴噺', width: 150 }
-                                    , { field: 'HQtyMust', title: '搴旀敹鏁伴噺', width: 150 }
+                                    , { 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 }
@@ -1452,6 +1591,7 @@
                                     , { field: 'HSourceEntryID', title: '婧愬崟瀛愬唴鐮�', width: 150 }
                                     , { field: 'HSourceBillNo', title: '婧愬崟鍗曞彿', width: 150 }
                                     , { field: 'HBatchNo', title: '鎵规', width: 150 }
+                                    , { field: 'HPieceQty', title: '鏉$爜鏁伴噺', width: 150 }
                                 ]]
                                 // , data: [linterid]
                                 // , page: true

--
Gitblit v1.9.1