From 24719b3e2e634b42f43560a4e924adafe165a69c Mon Sep 17 00:00:00 2001
From: llj <132905093+newwwwwwtree@users.noreply.github.com>
Date: 星期三, 19 十一月 2025 11:14:06 +0800
Subject: [PATCH] 条码变更

---
 WebTM/views/验收入库/其他入库/Kf_OtherInBill_Fast.html | 1128 ++++++++++++++++++++++++++++++++++++++++++++---------------
 1 files changed, 836 insertions(+), 292 deletions(-)

diff --git "a/WebTM/views/\351\252\214\346\224\266\345\205\245\345\272\223/\345\205\266\344\273\226\345\205\245\345\272\223/Kf_OtherInBill_Fast.html" "b/WebTM/views/\351\252\214\346\224\266\345\205\245\345\272\223/\345\205\266\344\273\226\345\205\245\345\272\223/Kf_OtherInBill_Fast.html"
index 3d621be..8b537d5 100644
--- "a/WebTM/views/\351\252\214\346\224\266\345\205\245\345\272\223/\345\205\266\344\273\226\345\205\245\345\272\223/Kf_OtherInBill_Fast.html"
+++ "b/WebTM/views/\351\252\214\346\224\266\345\205\245\345\272\223/\345\205\266\344\273\226\345\205\245\345\272\223/Kf_OtherInBill_Fast.html"
@@ -12,30 +12,61 @@
         .layui-col-xs4 {
             width: 12.333333%
         }
+
+         .layui-col-xs8 {
+            width: 55.666667%;
+        }
     </style>
 </head>
 <body>
-    <div class="layui-fluid">
-        <div class="layui-card" style="padding: 1px">
-            <div class="layui-card-body" style="padding: 1px;">
+    <div class="layui-fluid" style="padding: 0px">
+        <div class="layui-card">
+            <div class="layui-card-body" style="padding: 0px; height:800px;">
                 <form class="layui-form" action="" lay-filter="component-form-group">
+                    <div style="background-color:#0085E8;">
+                        <span style="color: white;"><i class="layui-icon layui-icon-form"></i>鍏朵粬鍏ュ簱鍗�</span>
+                    </div>
+                    <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" onkeyup="if(!this.value.match(/^[\+\-]?\d*?\.?\d*?$/)){if(!this.t_value>0){this.value=''}else{this.value=this.t_value;}}else this.t_value=this.value;if(this.value.match(/^(?:[\+\-]?\d+(?:\.\d+)?)?$/))this.o_value=this.value" autocomplete="off" class="layui-input" onfocus="this.select();">
+                                </div>
+                            </div>
+                        </div>
+                    </div>
                     <div class="layui-tab" lay-filter="tab-Kf_OtherInBill">
                         <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>
+                            <li lay-id="1" style="padding:1px;">婧愬崟淇℃伅</li>
+                            <li lay-id="2" style="padding:1px;">鍗曟嵁淇℃伅</li>
+                            <li lay-id="3" style="padding:1px;">鐗╂枡娓呭崟</li>
+                            <li lay-id="4" style="padding:1px;">鏃ュ織</li>
                         </ul>
                         <div class="layui-tab-content">
                             <div class="layui-tab-item layui-show">
                                 <div class="layui-form-item">
                                     <div class="layui-row">
-                                        <div class="layui-col-xs4">
+                                        <div class="layui-col-xs3">
                                             <label class="layui-form-label" style="width:60px;padding-left:0px;">婧愬崟绫诲瀷</label>
                                         </div>
                                         <div class="layui-col-xs8">
-                                            <select name=" HBillType" id="HBillType">
+                                            <select name="HBillType" id="HBillType">
+                                                <option value="1241">鍏ュ簱鐢宠鍗�</option>
                                                 <option value="-1">鎵嬪伐褰曞叆</option>
                                             </select>
                                         </div>
@@ -43,14 +74,36 @@
                                 </div>
                                 <div class="layui-form-item">
                                     <div class="layui-row">
-                                        <div class="layui-col-xs4">
+                                        <div class="layui-col-xs3">
                                             <label class="layui-form-label" style="width:60px;padding-left:0px;">婧愬崟鍙�</label>
                                         </div>
                                         <div class="layui-col-xs8">
-                                            <input type="text" name="HSourceBillNo" id="HSourceBillNo" lay-verify="HSourceBillNo" autocomplete="off" class="layui-input">
+                                            <input type="text" name="HSourceBillNo" id="HSourceBillNo" lay-verify="HSourceBillNo" autocomplete="off" class="layui-input" onfocus="this.select();">
                                         </div>
                                         <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">
+                                            <select name=" HBillSubType" id="HBillSubType">
+                                                <!--鍔ㄦ�佹覆鏌撶粍缁�-->
+                                            </select>
+                                        </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>
@@ -62,7 +115,7 @@
                                             <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">
+                                            <input type="text" name="HWHNAME" id="HWHNAME" lay-verify="HWHNAME" autocomplete="off" class="layui-input" onfocus="this.select();">
                                             <input type="hidden" name="HWHID" id="HWHID" lay-verify="HWHID" value="0" autocomplete="off" class="layui-input">
                                             <input type="hidden" name="HSTOCKORGID" id="HSTOCKORGID" lay-verify="HSTOCKORGID">
                                         </div>
@@ -77,7 +130,7 @@
                                             <label class="layui-form-label" style="width:30px;padding-left:0px;">浠撲綅</label>
                                         </div>
                                         <div class="layui-col-xs6">
-                                            <input type="text" name="HStockPlaceName" id="HStockPlaceName" lay-verify="HStockPlaceName" autocomplete="off" class="layui-input">
+                                            <input type="text" name="HStockPlaceName" id="HStockPlaceName" lay-verify="HStockPlaceName" autocomplete="off" class="layui-input" onfocus="this.select();">
                                             <input type="hidden" name="HStockPlaceID" id="HStockPlaceID" lay-verify="HStockPlaceID" value="0" autocomplete="off" class="layui-input">
                                         </div>
                                         <div class="layui-col-xs3">
@@ -86,26 +139,26 @@
                                     </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:45px;padding-left:0px;">渚涘簲鍟�</label>
-                                        </div>
-                                        <div class="layui-col-xs6">
-                                            <input type="text" name="HSupName" id="HSupName" lay-verify="HSupName" autocomplete="off" class="layui-input">
-                                            <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-row">
+                        <div class="layui-col-xs3">
+                            <label class="layui-form-label" style="width:45px;padding-left:0px;">渚涘簲鍟�</label>
+                        </div>
+                        <div class="layui-col-xs6">
+                            <input type="text" name="HSupName" id="HSupName" lay-verify="HSupName" autocomplete="off" class="layui-input">
+                            <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">
+                                            <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">
@@ -119,7 +172,7 @@
                                             <label class="layui-form-label" style="width:30px;padding-left:0px;">楠屾敹</label>
                                         </div>
                                         <div class="layui-col-xs6">
-                                            <input type="text" name="HSecManager" id="HSecManager" lay-verify="HSecManager" autocomplete="off" class="layui-input">
+                                            <input type="text" name="HSecManager" id="HSecManager" lay-verify="HSecManager" autocomplete="off" class="layui-input" onfocus="this.select();">
                                             <input type="hidden" name="HSecManagerID" id="HSecManagerID" lay-verify="HSecManagerID" value="0" autocomplete="off" class="layui-input">
                                         </div>
                                         <div class="layui-col-xs3">
@@ -146,7 +199,7 @@
                                             <label class="layui-form-label" style="width:30px;padding-left:0px;">閮ㄩ棬</label>
                                         </div>
                                         <div class="layui-col-xs6">
-                                            <input type="text" name="HDeptName" id="HDeptName" lay-verify="HDeptName" autocomplete="off" class="layui-input">
+                                            <input type="text" name="HDeptName" id="HDeptName" lay-verify="HDeptName" autocomplete="off" class="layui-input" onfocus="this.select();">
                                             <input type="hidden" name="HDeptID" id="HDeptID" lay-verify="HDeptID" value="0" autocomplete="off" class="layui-input">
                                         </div>
                                         <div class="layui-col-xs3">
@@ -169,29 +222,6 @@
                                 </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 class="layui-col-xs2">
-                                            <button type="button" lay-submit="" class="layui-btn" lay-filter="QueDin">纭畾</button>
-                                        </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">
@@ -201,23 +231,15 @@
                                 <table class="layui-hide" id="fj-table-qd" lay-filter="fj-table-qd"></table>
                             </div>
                         </div>
-                        <div class="layui-form-item" style="margin-bottom: 20px;">
-                            <div class="layui-row">
-                                <div class="layui-col-xs3">
-                                    <button type="button" lay-submit="" class="layui-btn" lay-filter="Saver" id="Saver">鎻愪氦</button>
-                                </div>
-                                <div class="layui-col-xs3">
-                                    <button type="button" lay-submit="" class="layui-btn" lay-filter="cmdModify">缂栬緫</button>
-                                </div>
-                                <div class="layui-col-xs3">
-                                    <button type="button" lay-submit="" class="layui-btn" lay-filter="cmdDelete">鍒犻櫎</button>
-                                </div>
-                                <div class="layui-col-xs3">
-                                    <button type="button" lay-submit="" class="layui-btn" lay-filter="Cancel">閫�鍑�</button>
-                                </div>
-                            </div>
-                        </div>
                     </div>
+                    <div class="layer-footer" style="z-index: 10; position: fixed; text-align: center; bottom: 0; width:100%; height:50px">
+                        <button type="button" lay-submit="" class="layui-btn" id="Saver" lay-filter="Saver">鎻愪氦</button>
+                        <button type="button" lay-submit="" class="layui-btn" lay-filter="cmdModify">缂栬緫</button>
+                      <!--  <button type="button" lay-submit="" class="layui-btn" lay-filter="cmdRefresh">鍒锋柊</button>-->
+                        <button type="button" lay-submit="" class="layui-btn" lay-filter="cmdDelete">鍒犻櫎</button>
+                        <button type="button" lay-submit="" class="layui-btn" lay-filter="Cancel">閫�鍑�</button>
+                    </div>
+
                 </form>
             </div>
         </div>
@@ -237,13 +259,14 @@
                 , layer = layui.layer
                 , table = layui.table
                 , form = layui.form
+                , laydate = layui.laydate
                 , element = layui.element;
 
             //琛ㄥご鍒濆鍖栬祴鍊硷紙鏍规嵁鐧诲綍鐢ㄦ埛鑾峰彇 榛樿浠撳簱銆侀儴闂ㄣ�侀獙鏀躲�佷繚绠°�侀噾铦剁敤鎴凤級 new
-            $("#HWHID").val(sessionStorage["HWHID"]);
-            $("#HWHNAME").val(sessionStorage["HWHName"]);
-            $("#HStockPlaceID").val(sessionStorage["HSPID"]);
-            $("#HStockPlaceName").val(sessionStorage["HSPName"]);
+            //$("#HWHID").val(sessionStorage["HWHID"]);
+            //$("#HWHNAME").val(sessionStorage["HWHName"]);
+            //$("#HStockPlaceID").val(sessionStorage["HSPID"]);
+            //$("#HStockPlaceName").val(sessionStorage["HSPName"]);
             //$("#HSupID").val(sessionStorage["HSupID"]);
             //$("#HSupName").val(sessionStorage["HSupName"]);
             $("#HDeptID").val(sessionStorage["HDeptID"]);
@@ -259,7 +282,24 @@
             $("#HBillerID").hide();
             $("#HOrgID").val(sessionStorage["OrganizationID"]);
             $("#HOrgID").hide();
+            $("#HBillSubType").val(sessionStorage["HBillSubType"]);
+            $("#HDate").val(formatDate(sessionStorage["HDate"]));
+            var HSourceFlag = sessionStorage["SourceFlag"];
             //榛樿甯﹀叆鐨勪粨搴擄紝濡傛灉鍚敤浠撲綅鍒欎粨浣嶆湁鏁堬紝濡傛灉娌℃湁鍚敤鍒欎粨浣嶇伆搴� new
+
+
+            // 缂栬緫鑾峰彇琛ㄥご鏃舵椂闂存牸寮忕煫姝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('-');
+            }
 
 
             //鑾峰彇鍙傛暟
@@ -277,6 +317,17 @@
             var linterid = params[params[0]]; //浠庡弬鏁颁腑鑾峰彇 鍗曟嵁鍐呯爜
             var lSourceBillType = params[params[2]];  //浠庡崟鎹幏鍙� 婧愬崟绫诲瀷
 
+            //鍒濆鍖栬〃鍗曟彃浠�
+            set_InitFrom();
+
+            //鍒濆鍖栬〃鍗曟彃浠�
+            function set_InitFrom() {
+                //甯歌鐢ㄦ硶
+                laydate.render({
+                    elem: '#HDate'
+                });
+            }
+
             function RoadBillMain(linterid)//鍔犺浇琛ㄥご
             {
                 $.ajax({
@@ -287,14 +338,54 @@
                         // 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 ? "1241" : d.data[0].HSourceBillType);
+                        //鑾峰彇婧愬崟绫诲瀷銆佹簮鍗曞崟鍙�
+                        if (d.data[0].HSourceBillType == "1241") {
+                            $("#HBillType").empty();
+                            $("#HBillType").val("1241");
+                            var optionHtml = '';
+                            optionHtml += "<option value = '" + d.data[0].HSourceBillType + "' >" + '鍏ュ簱鐢宠鍗�' + "</option>";
+                            $("#HBillType").append(optionHtml);
+                            layui.form.render('select');
+                            $("#HBillType").attr("readonly", "readonly");
+                        }
+                        else {
+                            $("#HBillType").empty();
+                            $("#HBillType").val("-1");
+                            var optionHtml = '';
+                            optionHtml += "<option value = '" + d.data[0].HSourceBillType + "' >" + '鎵嬪伐褰曞叆' + "</option>";
+                            $("#HBillType").append(optionHtml);
+                            layui.form.render('select');
+                            $("#HBillType").attr("readonly", "readonly");
+                        }
                         $("#HSourceBillNo").val(d.data[0].HSourceBillNo);
+                        $("#HSourceBillNo").attr("disabled", "true");
+                        $("#HDate").val(formatDate(new Date(), "yyyy-MM-dd"));
                         //$("#HWHID").val(d.data[0].HWhID);
                         //$("#HKeeperID").val(d.data[0].HKeeperID);
                         //$("#HSecManagerID").val(d.data[0].HSecManagerID);
                         //$("#HDeptID").val(d.data[0].HDeptID);
                         //$("#HBarCode").val(d.data[0].HBarCode);
                         //$("#HQty").val(d.data[0].HQty);
+                        HSourceFlag = true;
+                    }
+                })
+                //鑾峰彇鍗曟嵁瀛愮被鍨�
+                var HBillSubType = '';
+                $.ajax({
+                    url: GetWEBURL() + "/WEBSController/GetBillSubType_Json",
+                    type: "GET",
+                    data: { "HBillType": '1203', "HStockOrgID": sessionStorage["OrganizationID"] },
+                    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");
                     }
                 })
             }
@@ -305,7 +396,9 @@
                 table.render({
                     elem: '#wl-table'
                     , url: GetWEBURL() + '/OtherInStockBill/DisBillEntryList_Webs_Json'
-                    , toolbar: '#toolbarDemo'
+                    //, toolbar: '#toolbarDemo'
+                    , page: true
+                    , limit: 100
                     , where: { HBillID: linterid, HBillType: '1203', sWhere: '' }
                     , cols: [[
                         { type: 'radio' }
@@ -341,15 +434,34 @@
                 $("#HBillNo").val("");
 
                 $.ajax({
-                    url: GetWEBURL() + "/Web/GetMAXNum",
+                    url: GetWEBURL() + "/Web/GetMAXNumPDA",
                     type: "GET",
                     data: { "HBillType": '1203' },
                     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": '1203', "HStockOrgID": sessionStorage["OrganizationID"] },
+                    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);
@@ -359,10 +471,10 @@
             //
             function Sub_ClearBill() {
                 //琛ㄥご鍒濆鍖栬祴鍊硷紙鏍规嵁鐧诲綍鐢ㄦ埛鑾峰彇 榛樿浠撳簱銆侀儴闂ㄣ�侀獙鏀躲�佷繚绠°�侀噾铦剁敤鎴凤級 new
-                $("#HWHID").val(sessionStorage["HWHID"]);
-                $("#HWHNAME").val(sessionStorage["HWHName"]);
-                $("#HStockPlaceID").val(sessionStorage["HSPID"]);
-                $("#HStockPlaceName").val(sessionStorage["HSPName"]);
+                //$("#HWHID").val(sessionStorage["HWHID"]);
+                //$("#HWHNAME").val(sessionStorage["HWHName"]);
+                //$("#HStockPlaceID").val(sessionStorage["HSPID"]);
+                //$("#HStockPlaceName").val(sessionStorage["HSPName"]);
                 //$("#HSupID").val(sessionStorage["HSupID"]);
                 //$("#HSupName").val(sessionStorage["HSupName"]);
                 $("#HDeptID").val(sessionStorage["HDeptID"]);
@@ -402,7 +514,9 @@
                 table.render({
                     elem: '#wl-table'
                     , url: GetWEBURL() + '/OtherInStockBill/DisBillEntryList_Webs_Json'
-                    , toolbar: '#toolbarDemo'
+                    //, toolbar: '#toolbarDemo'
+                    , page: true
+                    , limit: 100
                     , where: { HBillID: linterid, HBillType: '1203', sWhere: '' }
                     , cols: [[
                         { type: 'radio' }
@@ -424,6 +538,35 @@
             }
             //
 
+
+            form.on('submit(cmdRefresh)', function () {
+                var sInterID = $("#HInterID").val()
+                table.render({
+                    elem: '#wl-table'
+                    , url: GetWEBURL() + '/OtherInStockBill/DisBillEntryList_Webs_Json'
+                    //, toolbar: '#toolbarDemo'
+                    , page: true
+                    , limit: 100
+                    , where: { HBillID: sInterID, HBillType: '1203', sWhere: '' }
+                    , 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 }
+                    ]]
+                    , height: 500
+                    , done: function () {
+                        layer.closeAll("loading");
+                    }
+                });
+            });
+
             form.on('submit(HWHID-BT)', function () {//閫夋嫨浠撳簱
                 layer.open({
                     type: 2
@@ -432,13 +575,27 @@
                     , 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=' + sessionStorage["OrganizationID"] + '', '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 () {//閫夋嫨浠撲綅
                 layer.open({
                     type: 2
@@ -567,12 +724,59 @@
 
             form.on('submit(Cancel)', function () {
                 sessionStorage["SourceFlag"] = false;
-                parent.location.href = "../../../views/index.html"
+                //parent.location.href = "../../../views/index.html"
                 //window.close();//鍏抽棴褰撳墠椤�
+                layer.confirm('鎮ㄧ‘瀹氳閫�鍑哄悧锛�', { icon: 3, title: '鎻愮ず' }, function (index) {
+                    parent.location.href = "../../../views/index_Mobile.html";
+                });
             })
 
+            //form.on('submit(cmdModify)', function () {//缂栬緫
+            //    var sSubStr = table.cache['wl-table'];
+            //    //if (AllowLoadData(sSubStr) != false) {//闈炵┖楠岃瘉
+            //    layer.open({
+            //        type: 2
+            //        , area: ['100%', '100%']
+            //        , title: '鏄庣粏鍒楄〃'
+            //        , shade: 0.6 //閬僵閫忔槑搴�
+            //        , maxmin: true //鍏佽鍏ㄥ睆鏈�灏忓寲
+            //        , anim: 0 //0-6鐨勫姩鐢诲舰寮忥紝-1涓嶅紑鍚�
+            //        , content: ['../../../views/鍏叡椤甸潰/Kf_BarCodeEditDlg.html?table=' + JSON.stringify(sSubStr), 'yes']
+            //        , resize: false
+            //        , cancel: function () {
+            //            //$(".layui-btn").removeClass("layui-btn-disabled");
+            //        }
+            //    })
+            //    // }
+            //});
+
+
+            //form.on('submit(cmdModify)', function () {//缂栬緫
+            //    //var sSubStr = table.cache['wl-table'];
+            //    var checkStatus = table.checkStatus('wl-table')
+            //        , data = checkStatus.data;
+            //    //if (AllowLoadData(sSubStr) != false) {//闈炵┖楠岃瘉
+            //    layer.open({
+            //        type: 2
+            //        , area: ['100%', '100%']
+            //        , title: '鏄庣粏鍒楄〃'
+            //        , shade: 0.6 //閬僵閫忔槑搴�
+            //        , maxmin: true //鍏佽鍏ㄥ睆鏈�灏忓寲
+            //        , anim: 0 //0-6鐨勫姩鐢诲舰寮忥紝-1涓嶅紑鍚�
+            //        , content: ['../../../views/鍏叡椤甸潰/Kf_BarCodeEditDlg.html?HInterID=' + data[0].HInterID + '&HMaterID =' + data[0].HMaterID + '& HAuxPropID = ' + data[0].HAuxPropID + '& HMTONo = ' + data[0].HMTONo + '& HSourceInterID = ' + data[0].HSourceInterID + '& HSourceEntryID = ' + data[0].HSourceEntryID + '& HQty = ' + data[0].HQtyMust + '& HBillType = ' + data[0].HBillType + '', 'yes']
+            //        , resize: false
+            //        , cancel: function () {
+            //            //$(".layui-btn").removeClass("layui-btn-disabled");
+            //        }
+            //    })
+            //    // }
+            //});
+
+
             form.on('submit(cmdModify)', function () {//缂栬緫
-                var sSubStr = table.cache['wl-table'];
+                //var sSubStr = table.cache['wl-table'];
+                var checkStatus = table.checkStatus('wl-table')
+                    , data = checkStatus.data;
                 //if (AllowLoadData(sSubStr) != false) {//闈炵┖楠岃瘉
                 layer.open({
                     type: 2
@@ -581,74 +785,145 @@
                     , shade: 0.6 //閬僵閫忔槑搴�
                     , maxmin: true //鍏佽鍏ㄥ睆鏈�灏忓寲
                     , anim: 0 //0-6鐨勫姩鐢诲舰寮忥紝-1涓嶅紑鍚�
-                    , content: ['../../../views/鍏叡椤甸潰/Kf_BarCodeEditDlg.html?table=' + JSON.stringify(sSubStr), 'yes']
+                    , content: ['../../../views/鍏叡椤甸潰/Kf_BarCodeEditDlg.html?HInterID=' + data[0].HInterID + '&HMaterID =' + data[0].HMaterID + '&HBillType =' + data[0].HBillType, 'yes']
                     , resize: false
                     , cancel: function () {
                         //$(".layui-btn").removeClass("layui-btn-disabled");
+                    }
+                    , end: function () {
+                        //鍒锋柊椤甸潰,
+                        //location.reload();
+                        var sInterID = $("#HInterID").val()
+                        table.render({
+                            elem: '#wl-table'
+                            , url: GetWEBURL() + '/OtherInStockBill/DisBillEntryList_Webs_Json'
+                            //, toolbar: '#toolbarDemo'
+                            , page: true
+                            , limit: 100
+                            , where: { HBillID: sInterID, HBillType: '1203', sWhere: '' }
+                            , 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 }
+                            ]]
+                            , height: 500
+                            , done: function () {
+                                layer.closeAll("loading");
+                            }
+                        });
                     }
                 })
                 // }
             });
 
             form.on('submit(cmdDelete)', function () {//鍒犻櫎
-                var checkStatus = table.checkStatus('wl-table')
-                    , data = checkStatus.data;
-                // console.log(data);
-                var sInterID = $('#HInterID').val()
-                var sMaterID = data[0].HMaterID
-                var sBillType = '1203'
-                var sAuxPropID = data[0].HAuxPropID
-                //var sMTONo = data[0].HMTONo
-                var sMTONo = ''
-                var sSourceInterID = data[0].HSourceInterID
-                var sSourceEntryID = data[0].HSourceEntryID
-                $.ajax(
-                    {
-                        type: "Get",
-                        //url: "http://61.130.49.162:9090/WMSAPI///POStockInBill/Delete_Json", //鏂规硶鎵�鍦ㄩ〉闈㈠拰鏂规硶鍚�
-                        url: GetWEBURL() + "/OtherInBill/Delete_Json",
-                        async: true,
-                        data: { "HInterID": sInterID, "HMaterID": sMaterID, "HAuxPropID": sAuxPropID, "HMTONo": sMTONo, "HSourceInterID": sSourceInterID, "HSourceEntryID": sSourceEntryID, "sHBillType": sBillType, },
-                        dataType: "json",
-                        success: function (data) {
-                            if (data.count == 1) { // 璇存槑楠岃瘉鎴愬姛浜嗭紝
-                                table.render({
-                                    elem: '#wl-table'
-                                    , url: GetWEBURL() + '/OtherInStockBill/DisBillEntryList_Webs_Json'
-                                    , toolbar: '#toolbarDemo'
-                                    , where: { HBillID: sInterID, HBillType: '1203', sWhere: '' }
-                                    , 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 }
-                                    ]]
-                                    , height: 500
-                                    , done: function () {
-                                        layer.closeAll("loading");
-                                    }
-                                });
-                            }
-                            else {
-                                layer.msg(data.Message, { icon: 2 });
-                            }
-                        },
-                        error: function (err) {
-                            layer.msg('閿欒' + err, {
-                                icon: 5,
-                                time: 20000
-                            }, function () {
-                                //do something
-                            });
-                        }
-                    });
+                //var checkStatus = table.checkStatus('wl-table')
+                //    , data = checkStatus.data;
+                //// console.log(data);
+                //var sInterID = $('#HInterID').val()
+                //var sMaterID = data[0].HMaterID
+                //var sBillType = '1203'
+                //var sAuxPropID = data[0].HAuxPropID
+                ////var sMTONo = data[0].HMTONo
+                //var sMTONo = ''
+                //var sSourceInterID = data[0].HSourceInterID
+                //var sSourceEntryID = data[0].HSourceEntryID
+                //$.ajax(
+                //    {
+                //        type: "Get",
+                //        //url: "http://61.130.49.162:9090/WMSAPI///POStockInBill/Delete_Json", //鏂规硶鎵�鍦ㄩ〉闈㈠拰鏂规硶鍚�
+                //        url: GetWEBURL() + "/OtherInBill/Delete_Json",
+                //        async: true,
+                //        data: { "HInterID": sInterID, "HMaterID": sMaterID, "HAuxPropID": sAuxPropID, "HMTONo": sMTONo, "HSourceInterID": sSourceInterID, "HSourceEntryID": sSourceEntryID, "sHBillType": sBillType, },
+                //        dataType: "json",
+                //        success: function (data) {
+                //            if (data.count == 1) { // 璇存槑楠岃瘉鎴愬姛浜嗭紝
+                //                table.render({
+                //                    elem: '#wl-table'
+                //                    , url: GetWEBURL() + '/OtherInStockBill/DisBillEntryList_Webs_Json'
+                //                    //, toolbar: '#toolbarDemo'
+                //                    , where: { HBillID: sInterID, HBillType: '1203', sWhere: '' }
+                //                    , 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 }
+                //                    ]]
+                //                    , height: 500
+                //                    , done: function () {
+                //                        layer.closeAll("loading");
+                //                    }
+                //                });
+                //            }
+                //            else {
+                //                layer.msg(data.Message, { icon: 2 });
+                //            }
+                //        },
+                //        error: function (err) {
+                //            layer.msg('閿欒' + err, {
+                //                icon: 5,
+                //                time: 20000
+                //            }, function () {
+                //                //do something
+                //            });
+                //        }
+                //    });
             });
+
+            //form.on('submit(Saver)', function (data) {//鎻愪氦
+            //    //鐏板害鎻愪氦鎸夐挳Saver
+            //    document.getElementById("Saver").disabled = true;
+            //    //debugger;
+            //    data.field.HSTOCKORGID = sessionStorage["OrganizationID"];//缁勭粐
+            //    var sMainStr = JSON.stringify(data.field);
+            //    //var hOrgID = sessionStorage["OrganizationID"];
+            //    var sMain = sMainStr;
+            //    var sSubStr = table.cache['wl-table'];
+            //    var sSourceType = $("#HBillType").val();
+            //    $.ajax(
+            //        {
+            //            type: "POST",
+            //            url: GetWEBURL() + "/OtherInStockBill/set_SaveOtherInStockBill_Json",
+            //            //url: "http://localhost:12761/OtherInStockBill/set_SaveOtherInStockBill_Json", //鏂规硶鎵�鍦ㄩ〉闈㈠拰鏂规硶鍚�
+            //            async: true,
+            //            data: { "oMain": sMain },
+            //            dataType: "json",
+            //            success: function (data) {
+            //                if (data.count == 1) { // 璇存槑楠岃瘉鎴愬姛浜嗭紝
+            //                    layer.msg(data.Message , { icon: 1 });
+            //                    //
+            //                    //Sub_ClearBill();
+            //                    //
+            //                    //鐏板害鎻愪氦鎸夐挳Saver
+            //                    document.getElementById("Saver").disabled = false;
+            //                }
+            //                else {
+            //                    layer.msg(data.Message, { icon: 5 });
+            //                    //鐏板害鎻愪氦鎸夐挳Saver
+            //                    document.getElementById("Saver").disabled = false;
+            //                }
+            //                layer.closeAll("loading");
+            //            },
+            //            error: function (err) {
+            //                layer.msg("閿欒:" + err, { icon: 5 });
+            //                //鐏板害鎻愪氦鎸夐挳Saver
+            //                document.getElementById("Saver").disabled = false;
+            //            }
+            //        });
+            //});
 
             form.on('submit(Saver)', function (data) {//鎻愪氦
                 //鐏板害鎻愪氦鎸夐挳Saver
@@ -673,29 +948,32 @@
                             dataType: "json",
                             success: function (data) {
                                 if (data.count == 1) { // 璇存槑楠岃瘉鎴愬姛浜嗭紝
-                                    layer.msg(data.Message + $("#HBillNo").val(), { icon: 1 });
-                                    //
-                                    //Sub_ClearBill();
-                                    //
-                                    //鐏板害鎻愪氦鎸夐挳Saver
-                                    document.getElementById("Saver").disabled = false;
+                                    layer.confirm(data.Message, {
+                                    //layer.confirm("鐢熸垚鍏朵粬鍏ュ簱鍗�" + data.Message + $("#HBillNo").val(), {
+                                        icon: 1, skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず", closeBtn: 0, btn: ['鏂板'],
+                                        btn2: function () {
+                                            //parent.layui.admin.events.closeThisTabs();鍏抽棴椤电
+                                            //window.close();//鍏抽棴椤甸潰锛屾祻瑙堝櫒鏈夋晥锛孭DA鏃犳晥
+                                            parent.location.href = "../../../views/index.html"
+                                        }//鍏抽棴
+                                    }, function () { window.location.reload(); });//鏂板
                                 }
                                 else {
-                                    layer.msg(data.Message, { icon: 5 });
+                                    layer.confirm(data.Message, { icon: 5 });
                                     //鐏板害鎻愪氦鎸夐挳Saver
                                     document.getElementById("Saver").disabled = false;
                                 }
                                 layer.closeAll("loading");
                             },
                             error: function (err) {
-                                layer.msg("閿欒:" + err, { icon: 5 });
+                                layer.confirm("閿欒:" + err, { icon: 5 });
                                 //鐏板害鎻愪氦鎸夐挳Saver
                                 document.getElementById("Saver").disabled = false;
                             }
                         });
                 }
                 else {
-                    layer.msg("鏁版嵁涓嶅畬鏁达紝涓嶅厑璁告彁浜�:", { icon: 5 });
+                    layer.confirm("鏁版嵁涓嶅畬鏁达紝涓嶅厑璁告彁浜�:", { icon: 5 });
                     //鐏板害鎻愪氦鎸夐挳Saver
                     document.getElementById("Saver").disabled = false;
                 }
@@ -727,12 +1005,46 @@
                                 $("#HStockPlaceName").val(result.data[0].HName);
                                 $("#HWHID").val(result.data[0].HWHID);
                                 $("#HWHNAME").val(result.data[0].HWhName);
+                                $("#HStockPlaceID").val(result.data[0].HItemID);
                                 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' });
+                            }
+                            layer.closeAll("loading");
+                        }
+                    });
+                    // layer.msg($('#HSourceBillNo').val(), { icon: 1 });
+                }
+            });
+
+            //鎵粨搴�
+            $('#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);
+                                $("#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");
                         }
@@ -767,12 +1079,13 @@
             table.render({
                 elem: '#mx-table'
                 // , url: 'http://localhost:8083/OtherInStockBill/GetHBarCodeShowBillSub'
-                //, toolbar: '#toolbarDemo'
+                ////, toolbar: '#toolbarDemo'
                 // , where: { sMsg: linterid, sMsg2: lentryid }
                 , cols: [[
                     , { field: 'HMaterID', title: '鐗╂枡ID', width: 100, hide: true }
                 ]]
                 , page: true
+                , limit: 100
                 , height: 500
                 , done: function () {
                 }
@@ -780,6 +1093,13 @@
             //鎵潯鐮�
             function GetMeesageByBarCode(obj) {  //杩斿洖宸ヤ綔涓績
                 var sSubStr = table.cache['wl-table'];
+                //浠撳簱銆佷粨浣嶆枃鏈涓虹┖鏃讹紝娓呯┖瀵瑰簲ID
+                if ($("#HWHNAME").val() == '') {
+                    $("#HWHID").val("0");
+                }
+                if ($("#HStockPlaceName").val() == '') {
+                    $("#HStockPlaceID").val("0");
+                }
                 var sBarCode = $('#HBarCode').val()
                 var sInterID = $("#HInterID").val()
                 var sBillNo = $("#HBillNo").val()
@@ -792,140 +1112,319 @@
                 var sHSPID = $("#HStockPlaceID").val()
                 var sSourceBillNo = $("#HSourceBillNo").val()
                 var HOrgID = $("#HOrgID").val();//缁勭粐
-                //鍒ゆ柇鏉$爜鏄惁涓虹┖  new
-                if (sBarCode == '') {
-                    playSound();
-                    layer.msg("鏉$爜涓虹┖锛屼笉鑳芥壂鎻忥紒", { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
-                    return false;
-                }
-                if (sBarCode != "") {
-                    $('#HBarCode').val("");
-                    sessionStorage["SourceFlag"] = false;
-                }
-                //if (AllowLoadData(sSubStr, 'HBarCode') != false) {//闈炵┖楠岃瘉
-                $.ajax({
-                    //url: "http://localhost:12761/OtherInStockBill/get_InfoByBarCode_Source_Json", //鏂规硶鎵�鍦ㄩ〉闈㈠拰鏂规硶鍚�
-                    url: GetWEBURL() + "/OtherInStockBill/get_InfoByBarCode_Source_Json",
-                    type: "GET",
-                    data: { "sCode": sBarCode, "sInterID": sInterID, "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_OtherInBill', '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_OtherInBill', '2');//璺宠浆椤电
-                            }
-                            else if (result.data.HBarType == '閮ㄩ棬鏉$爜') {
-                                $("#HDeptName").val(result.data.HDeptName);
-                                $("#HDeptID").val(result.data.HDeptID);
-                                $("#HNote").val(";涓�閿壂鐮侀儴闂ㄦ潯鐮�");
-                                element.tabChange('tab-Kf_OtherInBill', '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 == "1203") {
-                                    $("#HBillType").val("1203");
+                var sMouldManagerCtl = 'N'
+                var sFIFOCtl = 'N'
+                var HBillType = '1203'
+                var HDeleteFlag = sBarCode.substring(0, 1);
 
+                if (HDeleteFlag == "*") {
+                    if (sBarCode != "") {
+                        $('#HBarCode').val("");
+                    }
+                    var sBarCode_Del = sBarCode.slice(1);
+                    $.ajax(
+                        {
+                            type: "Get",
+                            url: GetWEBURL() + "/ProductIn/Delete_Json",
+                            async: true,
+                            data: { "HInterID": sInterID, "HBillNo": sBillNo, "HBillType": HBillType, "HBarCode": sBarCode_Del },
+                            dataType: "json",
+                            success: function (data) {
+                                if (data.count == 1) { // 璇存槑楠岃瘉鎴愬姛浜�
+                                    playSound1();
+                                    table.render({
+                                        elem: '#wl-table'
+                                        , url: GetWEBURL() + '/ProductIn/DisBillEntryList_Webs_Json'
+                                        //, toolbar: '#toolbarDemo'
+                                        , defaultToolbar: []
+                                        , page: true
+                                        , limit: 3000
+                                        , totalRow: true
+                                        , where: { HBillID: sInterID, HBillType: '1203', sWhere: '' }
+                                        , 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: 'HBarcodeQtys', title: '鏉$爜鏁伴噺', width: 150 }
+                                        ]]
+                                        // , data: [linterid]
+                                        // , page: true
+                                        , height: 500
+                                        , done: function () {
+                                            layer.closeAll("loading");
+                                        }
+                                    })                                    
+                                    //娓呯┖鏁伴噺
+                                    $("#HQty").val("");
                                 }
                                 else {
-                                    $("#HBillType").val("鎵嬪伐褰曞叆");
+                                    playSound();
+                                    layer.msg(data.Message, { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
                                 }
-                                $("#HNote").val(";涓�閿壂鐮佹簮鍗曟潯鐮�");
-                                element.tabChange('tab-Kf_OtherInBill', '3');
+                            },
+                            error: function (err) {
+                                playSound();
+                                layer.msg('閿欒' + err, { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
+                            }
+                        });
+                } else {
+                    //鍒ゆ柇鏉$爜鏄惁涓虹┖  new
+                    if (sBarCode == '') {
+                        playSound();
+                        layer.msg("鏉$爜涓虹┖锛屼笉鑳芥壂鎻忥紒", { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
+                        return false;
+                    }
+                    if (sBarCode != "") {
+                        $('#HBarCode').val("");
+                        //sessionStorage["SourceFlag"] = false;
+                    }
+
+                    //if (AllowLoadData(sSubStr, 'HBarCode') != false) {//闈炵┖楠岃瘉
+                    $.ajax({
+                        //url: "http://localhost:12761/OtherInStockBill/get_InfoByBarCode_Source_Json", //鏂规硶鎵�鍦ㄩ〉闈㈠拰鏂规硶鍚�
+                        url: GetWEBURL() + "/WEBSController/Get_BarCode_Json",
+                        type: "GET",
+                        data: { "sBarCode": sBarCode, "HInterID": sInterID, "HBillType": HBillType, "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": "" },
+                        success: function (result) {
+                            if (result.count == 1) {
+                                if (result.data.hBarTypeField == '浠撳簱鏉$爜') {
+                                    $("#HWHNAME").val(result.data.hWhNameField);
+                                    $("#HWHID").val(result.data.hWhIDField);
+                                    $("#HStockPlaceName").val("");
+                                    $("#HNote").val(";涓�閿壂鐮佷粨搴撴潯鐮�");
+                                    element.tabChange('tab-Kf_OtherInBill', '2');  //璺宠浆椤电
+                                    return;
+                                }
+                                else if (result.data.hBarTypeField == '浠撲綅鏉$爜') {
+                                    $("#HStockPlaceName").val(result.data.hSPNameField);
+                                    $("#HStockPlaceID").val(result.data.hSPIDField);
+                                    $("#HWHNAME").val(result.data.hWhNameField);
+                                    $("#HWHID").val(result.data.hWhIDField);
+                                    $("#HNote").val(";涓�閿壂鐮佷粨浣嶆潯鐮�");
+                                    element.tabChange('tab-Kf_OtherInBill', '2');//璺宠浆椤电
+                                    return;
+                                }
+                                else if (result.data.hBarTypeField == '閮ㄩ棬鏉$爜') {
+                                    $("#HDeptName").val(result.data.hDeptNameField);
+                                    $("#HDeptID").val(result.data.hDeptIDField);
+                                    $("#HNote").val(";涓�閿壂鐮侀儴闂ㄦ潯鐮�");
+                                    element.tabChange('tab-Kf_OtherInBill', '2');//璺宠浆椤电
+                                    return;
+                                }
+                                else if (result.data.hBarTypeField == '婧愬崟鏉$爜') {
+                                    $("#HSupName").val(result.data.hSupNameField);
+                                    $("#HSupID").val(result.data.hSupIDField);
+                                    $("#HDeptName").val(result.data.hDeptNameField);
+                                    $("#HDeptID").val(result.data.hDeptIDField);
+                                    $("#HSourceBillNo").val(result.data.hSourceBillNoField);
+                                    HSourceFlag = true;
+                                    //鑾峰彇婧愬崟绫诲瀷銆佹簮鍗曞崟鍙�
+                                    if (result.data.hSourceBillType == "1241") {
+                                        $("#HBillType").val("1241");
+
+                                    }
+                                    else {
+                                        $("#HBillType").val("鎵嬪伐褰曞叆");
+                                    }
+                                    $("#HNote").val(";涓�閿壂鐮佹簮鍗曟潯鐮�");
+                                    element.tabChange('tab-Kf_OtherInBill', '3');
+                                }
+                                else {
+                                    if (HSourceFlag == true) {
+                                        element.tabChange('tab-Kf_OtherInBill', '3');
+                                    }
+                                    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);
+                                        //sessionStorage["SourceFlag"] = true;
+                                        //鑾峰彇婧愬崟绫诲瀷銆佹簮鍗曞崟鍙�
+                                        //if (result.data.HSourceBillType == "1241") {
+                                        //    $("#HBillType").val("1241");
+
+                                        //}
+                                        //else if (result.data.HSourceBillType == "1601") {
+                                        //    $("#HBillType").val("1601");
+                                        //}
+
+
+                                        HSourceFlag = true;
+                                        $("#HSourceBillNo").val(result.data.hSourceBillNoField);
+                                        $("#HBillType").val(result.data.hSourceBillTypeField == null ? "1241" : result.data.hSourceBillTypeField);
+                                        //鑾峰彇婧愬崟绫诲瀷銆佹簮鍗曞崟鍙�
+                                        if (result.data.hSourceBillTypeField == "1241") {
+                                            $("#HBillType").empty();
+                                            $("#HBillType").val("1241");
+                                            var optionHtml = '';
+                                            optionHtml += "<option value = '" + result.data.hSourceBillTypeField + "' >" + '鍏ュ簱鐢宠鍗�' + "</option>";
+                                            $("#HBillType").append(optionHtml);
+                                            layui.form.render('select');
+                                            $("#HBillType").attr("readonly", "readonly");
+                                        }
+                                        else {
+                                            //$("#HBillType").empty();
+                                            $("#HBillType").val("-1");
+                                            var optionHtml = '';
+                                            optionHtml += "<option value = '" + result.data.hSourceBillTypeField + "' >" + '鎵嬪伐褰曞叆' + "</option>";
+                                            $("#HBillType").append(optionHtml);
+                                            layui.form.render('select');
+                                            $("#HBillType").attr("readonly", "readonly");
+                                        }
+                                        $("#HSourceBillNo").attr("readonly", "readonly");
+                                        $("#HNote").val(";鐗╂枡鏉$爜");
+                                        element.tabChange('tab-Kf_OtherInBill', '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() + '/OtherInStockBill/DisBillEntryList_Webs_Json'
+                                //    //, toolbar: '#toolbarDemo'
+                                //    , where: { HBillID: sInterID, HBillType: '1203', sWhere: '' }
+                                //    , 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 }
+                                //        , { field: 'HAuxPropID', title: '杈呭姪灞炴��', width: 150 }
+                                //        , { field: 'HMTONo', title: 'MTO鍙�', width: 150 }
+                                //    ]]
+                                //    , height: 500
+                                //    , done: function () {
+                                //        layer.closeAll("loading");
+                                //    }
+                                //});
+                                $.ajax({
+                                    url: GetWEBURL() + '/OtherInStockBill/DisBillEntryList_Webs_New_Json1',
+                                    type: "GET",
+                                    data: { HBillID: sInterID, HBillNo: sBillNo, HBillType: HBillType, 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");
+                                    }
+                                });
+                                //娓呯┖鏁伴噺
+                                $("#HQty").val("");
                             }
                             else {
-                                if (sessionStorage["SourceFlag"] == "true") {
-                                    element.tabChange('tab-Kf_OtherInBill', '3');
-                                }
-                                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);
-                                    sessionStorage["SourceFlag"] = true;
-                                    //鑾峰彇婧愬崟绫诲瀷銆佹簮鍗曞崟鍙�
-                                    if (result.data.HSourceBillType == "1203") {
-                                        $("#HBillType").val("1203");
-
-                                    }
-                                    else if (result.data.HSourceBillType == "1601") {
-                                        $("#HBillType").val("1601");
-                                    }
-                                    $("#HNote").val(";鐗╂枡鏉$爜");
-                                    element.tabChange('tab-Kf_OtherInBill', '3');
-                                }
+                                // $("#verifycode").click();
+                                //layer.msg(result.Message, { icon: 5 });
+                                layer.msg(result.Message, { icon: 5, btn: ['閫�鍑�'], time: 100000, offset: 't' });
                             }
-                            //$("#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() + '/OtherInStockBill/DisBillEntryList_Webs_Json'
-                                , toolbar: '#toolbarDemo'
-                                , where: { HBillID: sInterID, HBillType: '1203', sWhere: '' }
-                                , 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 }
-                                ]]
-                                , height: 500
-                                , done: function () {
-                                    layer.closeAll("loading");
-                                }
-                            });
+                            layer.closeAll("loading");
                         }
-                        else {
-                            // $("#verifycode").click();
-                            //layer.msg(result.Message, { icon: 5 });
-                            layer.msg(result.Message, { icon: 5, btn: ['閫�鍑�'], time: 100000, offset: 't' });
-                        }
-                        layer.closeAll("loading");
-                    }
-                });
+                    });
+                }               
             }
             function playSound() {
-                var audio = document.getElementById("cs");
-                if (audio == null)
-                    $("body").append('<audio id="cs" hidden controls> <source src = "../../video/jingbao.wav" type = "audio/ogg"> </audio >');
-                var audio = document.getElementById("cs");
-                audio.play();
+                //var audio = document.getElementById("cs");
+                //if (audio == null)
+                //    $("body").append('<audio id="cs" hidden controls> <source src = "../../video/jingbao.wav" type = "audio/ogg"> </audio >');
+                //var audio = document.getElementById("cs");
+                //audio.play();
             }
             function playSound1() {
-                var audio = document.getElementById("cs2");
-                audio.play();
+                //var audio = document.getElementById("cs2");
+                //audio.play();
             }
+
+            var listOption = {
+                elem: '#wl-table'
+                //, toolbar: '#toolbarDemo'
+                , cellMinWidth: 90
+                ,limit:3000
+                , 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");
+                }
+            }
+            var listOption1 = {
+                elem: '#mx-table'
+                //, toolbar: '#toolbarDemo'
+                , cellMinWidth: 90
+                , cols: [[
+                    { type: 'radio' }
+                    , { field: 'HQty', title: '鏁伴噺', width: 150 }
+                    , { field: 'HQtyMust', title: '搴旀敹鏁伴噺', width: 150 }
+                    , { field: 'HBarCode', title: '鏉$爜缂栧彿', width: 150 }
+                    , { field: 'HMaterNumber', title: '鐗╂枡浠g爜', width: 150 }
+                    , { field: 'HMaterName', title: '鐗╂枡鍚嶇О', width: 150 }
+                    , { field: 'HMaterModel', title: '瑙勬牸鍨嬪彿', width: 150 }
+                    , { field: 'HBatchNo', title: '鎵瑰彿', width: 150 }
+                    //, { field: 'HSourceInterID', title: '婧愬崟涓诲唴鐮�', width: 150 }
+                    //, { field: 'HSourceEntryID', title: '婧愬崟瀛愬唴鐮�', width: 150 }
+                    , { field: 'HSourceBillNo', title: '婧愬崟鍗曞彿', width: 150 }
+                ]]
+                , height: 500
+                , done: function () {
+                    layer.closeAll("loading");
+                }
+            }
+
             //鎵簮鍗�
             function GetMeesageBySourceBillNo(obj) {
-                var HSourceBillNo = $('#HSourceBillNo').val()
+                var sSourceBillNo = $('#HSourceBillNo').val()
                 var sInterID = $("#HInterID").val()
                 var sBillNo = $("#HBillNo").val()
+                var HBillType = '1203'
+                var sSourceType = $("#HBillType").val()
+                var sMouldManagerCtl = 'N'
+                var sFIFOCtl = 'N'
                 if (HSourceBillNo == "" || sInterID <= 0) {
                     layer.msg("婧愬崟鍙蜂负绌猴紝鎴栬�呭唴鐮佷笉瀛樺湪锛�", { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
                     return;
@@ -935,32 +1434,69 @@
                     //url: "http://61.130.49.162:9090/WMSAPI///OtherInStockBill/set_SavePonderationBillMain_Temp_Source_Fast_Json",
                     url: GetWEBURL() + "/OtherInStockBill/set_SavePonderationBillMain_Temp_Source_Fast_Json",
                     type: "GET",
-                    data: { "HSourceBillNo": HSourceBillNo, "sInterID": sInterID, "sBillNo": sBillNo },
+                    data: { "sInterID": sInterID, "sBillNo": sBillNo, "HBillType": HBillType, "sSourceBillNo": sSourceBillNo, "sSourceType": sSourceType, "sMaker": sessionStorage["HUserName"],"sHOWNERID": sessionStorage["OrganizationID"] },
                     success: function (result) {
                         if (result.count == 1) { // 璇存槑楠岃瘉鎴愬姛浜嗭紝
+                            //$("#HDeptID").val(result.data[0].hDeptIDField);
+                            //$("#HDeptName").val(result.data[0].hDeptNameField);
+                            //$("#HWHID").val(result.data[0].HWHID);
+                            //$("#HWHName").val(result.data[0].HWHName);
+                            element.tabChange('tab-Kf_OtherInBill', '2'); 
+                            playSound1();
+                            HSourceFlag = true;
+                            //sessionStorage["SourceFlag"] = true;
                             layer.load(3)
-                            table.render({
-                                elem: '#wl-table'
-                                //, url: 'http://61.130.49.162:9090/WMSAPI///OtherInStockBill/DisBillEntryList_Webs_Json'
-                                , url: GetWEBURL() + '/OtherInStockBill/DisBillEntryList_Webs_Json'
-                                , toolbar: '#toolbarDemo'
-                                , where: { HBillID: sInterID, HBillType: '1203', sWhere: '' }
-                                , 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 () {
+                            //table.render({
+                            //    elem: '#wl-table'
+                            //    //, url: 'http://61.130.49.162:9090/WMSAPI///OtherInStockBill/DisBillEntryList_Webs_Json'
+                            //    , url: GetWEBURL() + '/OtherInStockBill/DisBillEntryList_Webs_Json'
+                            //    //, toolbar: '#toolbarDemo'
+                            //    , where: { HBillID: sInterID, HBillNo: sBillNo, HBillType: HBillType, sMouldManagerCtl: sMouldManagerCtl, sFIFOCtl: sFIFOCtl  }
+                            //    , 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: 'HSourceInterID', title: '婧愬崟涓诲唴鐮�', width: 150 }
+                            //        , { field: 'HSourceEntryID', title: '婧愬崟瀛愬唴鐮�', width: 150 }
+                            //        , { field: 'HSourceBillNo', title: '婧愬崟鍗曞彿', width: 150 }
+                            //        , { field: 'HBatchNo', title: '鎵规', width: 150 }
+                            //        , { field: 'HPieceQty', 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: HBillType, 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");
                                 }
                             });
@@ -985,6 +1521,8 @@
         function GetHSpValue(obj) {  //杩斿洖璋冨叆浠撲綅
             $("#HStockPlaceName").val(obj[0].HName);
             $("#HStockPlaceID").val(obj[0].HItemID);
+            $("#HWHNAME").val(obj[0].HWhName);
+            $("#HWHID").val(obj[0].HWHID);
         }
         //function GetHSupValue(obj) {  //杩斿洖渚涘簲鍟�
         //    $("#HSupName").val(obj[0].HName);
@@ -1003,6 +1541,12 @@
             $("#HDeptID").val(obj[0].HItemID);
         }
         function AllowLoadData(sSubStr) {  //闈炵┖楠岃瘉
+            //鏁板瓧姝e垯(鍖呭惈灏忔暟)
+            var reg = /^\d+(\.\d+)?$/;
+            //if (reg.test($("#HQty").val()) == false || $("#HQty").val() == '') {
+            //    layer.msg("鏁伴噺蹇呴』涓烘暟閲忔垨灏忔暟", { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
+            //    return false;
+            //}
             //if ($("#HSourceBillNo").val() == '') {
             //    layer.msg("璇峰厛鎵簮鍗�!", { icon: 5 });
             //    return false;

--
Gitblit v1.9.1