From c6576d875f3f55813b2812d6dc37d87a045f8a6b Mon Sep 17 00:00:00 2001
From: pzy <2829717936@qq.com>
Date: 星期一, 30 九月 2024 10:35:58 +0800
Subject: [PATCH] 1

---
 WebSRM/layuiAdmin.std-v1.2.1/src/views/SRM/SRM_BarCodeBill.html        |  239 +++++++++++++++++++++++++++++++++++------------
 WebSRM/layuiAdmin.std-v1.2.1/src/views/SRM/SRM_POInStockBill_Edit.html |   34 ++++++
 2 files changed, 207 insertions(+), 66 deletions(-)

diff --git a/WebSRM/layuiAdmin.std-v1.2.1/src/views/SRM/SRM_BarCodeBill.html b/WebSRM/layuiAdmin.std-v1.2.1/src/views/SRM/SRM_BarCodeBill.html
index 9554a58..1ac3614 100644
--- a/WebSRM/layuiAdmin.std-v1.2.1/src/views/SRM/SRM_BarCodeBill.html
+++ b/WebSRM/layuiAdmin.std-v1.2.1/src/views/SRM/SRM_BarCodeBill.html
@@ -291,6 +291,7 @@
         var linterid = params[params[0]];
         var lentryid = params[params[1]];
         var type = params[params[2]];
+        var mergeTags = params[params[3]];
         //鍘熺敓鎴愭潯鐮佹柟娉�(閫佽揣鍗曢粯璁�)
         var mainUrl = "GetHBarCodeShowBillMain"; //琛ㄥご鏁版嵁鍔犺浇ajax
         var subUrl = "GetHBarCodeShowBillSub";//琛ㄤ綋鏁版嵁鍔犺浇ajax h_v_SRM_POInStockBillSub_ForWeb2
@@ -346,6 +347,68 @@
                 , layer = layui.layer
                 , laydate = layui.laydate
                 , element = layui.element; //Tab鐨勫垏鎹㈠姛鑳斤紝鍒囨崲浜嬩欢鐩戝惉绛夛紝闇�瑕佷緷璧杄lement妯″潡
+
+            var option;
+
+            option = {
+                elem: '#mainTable'
+                , toolbar: '#toolbarDemo'
+                , limit: 500
+                , height: 500
+                , loading: false
+                , cols: [[
+                    { type: 'checkbox', fixed: 'left' }
+                    , { field: 'HMaterID', title: '鐗╂枡ID', width: 100, hide: true }
+                    , { field: 'HMaterNumber', title: '鐗╂枡缂栫爜', width: 120 }
+                    , { field: 'HOldMaterNumber', title: '鏃х墿鏂欑紪鐮�', width: 120, hide: true }
+                    , { field: 'HMaterShortNumber', title: '鐗╂枡浠g爜', width: 120, hide: true }
+                    , { field: 'HSubjoin', title: '鐗╂枡浠g爜', width: 120, hide: true }
+                    , { field: 'HMaterName', title: '鐗╂枡鍚嶇О', width: 120 }
+                    , { field: 'HMaterModel', title: '瑙勬牸鍨嬪彿', width: 120 }
+                    , { field: 'HUnitName', title: '璁¢噺鍗曚綅', width: 100 }
+                    , { field: 'HUnitNumber', title: '璁¢噺鍗曚綅浠g爜', width: 100, hide: true }
+                    , { field: 'HUnitID', title: '璁¢噺鍗曚綅ID', width: 100, hide: true }
+                    , { field: 'HDDQty', title: '璁㈠崟鏁伴噺', width: 100 }
+                    , { field: 'HMrbQty', title: '閫�鏂欐暟閲�', width: 100, hide: true }
+                    , { field: 'HBarcodeCount', title: '宸茬敓鎴愭潯鐮佹暟閲�', width: 135 }
+                    , { field: 'HNotBarcodeCount', title: '鍙敓鎴愭潯鐮佹暟閲�', width: 135 }
+                    , { field: 'HQty', title: '鏈鐢熸垚鏉$爜鏁伴噺', width: 135, edit: 'text', event: "inputHQty" }
+                    , { field: 'HMinQty', title: '鍐呯鍖呰鏁�', width: 100, edit: 'text', event: "inputHMinQty" }
+                    , { field: 'HBQty', title: '鍐呯鏁�', width: 100 }
+                    , { field: 'HWXQty', title: '澶栫鍖呰鏁�', width: 100, edit: 'text', event: "inputHWXQty" }
+                    , { field: 'HWBQty', title: '澶栫鏁�', width: 100 }
+                    , { field: 'HPrice', title: '鍗曚环', width: 100, hide: true }
+                    , { field: 'HMoney', title: '閲戦', width: 100, hide: true }
+                    , { field: 'HMTONO', title: '璁″垝璺熻釜鍗曞彿', width: 100, hide: true }
+                    , { field: 'HBatchNo', title: '鎵瑰彿', width: 100, edit: 'text' }
+                    , { field: 'HBatchManager', title: '鍚敤鎵瑰彿', width: 100, hide: true }
+                    , { field: 'HISKFPERIOD', title: '鏄惁鍚敤淇濊川鏈�', width: 100, edit: 'text', hide: true }
+                    , { field: 'HEXPUNIT', title: '淇濊川鏈熷崟浣�', width: 100, edit: 'text', hide: true }
+                    , { field: 'HKFDate', title: '鐢熶骇鏃ユ湡', align: 'center', width: 150, data_field: 'HKFDate', event: "chooseHKFDate" }//, event: "chooseHKFDate"
+                    , { field: 'HKFPeriod', title: '淇濊川鏈�', width: 100 }//
+                    , { field: 'HKFDQDate', title: '鍒版湡鏃ユ湡', align: 'center', width: 150, data_field: 'HKFDQDate' }//, event: "chooseHKFDQDate"
+                    , { field: 'HSupMaterNumber', title: '渚涘簲鍟嗘枡鍙�', width: 100, edit: 'text' }
+                    , { field: 'HSupBatchNo', title: '渚涘簲鍟嗘壒娆�', width: 100, edit: 'text' }
+                    //, { field: 'HBeginDate', title: '鐢熶骇鏃ユ湡', width: 120, data_field: 'HBeginDate', event: "chooseHBeginDate" }
+                    //, { field: 'HEndDate', title: '澶辨晥鏃ユ湡', width: 120, data_field: 'HEndDate', event: "chooseHEndDate" }
+                    //, { field: 'HDate', title: '瑕佹眰浜よ揣鏃ユ湡', width: 150 }
+                    , { field: 'HPOOrderInterID', title: '閲囪喘璁㈠崟涓诲唴鐮�', width: 150, hide: true }
+                    , { field: 'HPOOrderEntryID', title: '閲囪喘璁㈠崟瀛愬唴鐮�', width: 150, hide: true }
+                    , { field: 'HPOOrderBillNo', title: '閲囪喘璁㈠崟鍙�', width: 200 }
+                    , { field: 'HWWOrderInterID', title: '濮斿璁㈠崟涓诲唴鐮�', width: 150, hide: true }
+                    , { field: 'HWWOrderEntryID', title: '濮斿璁㈠崟瀛愬唴鐮�', width: 150, hide: true }
+                    , { field: 'HWWOrderDetaiLID	', title: '濮斿璁㈠崟鏄庣粏鍐呯爜', width: 150, hide: true }
+                    , { field: 'HWWOrderBillNo', title: '濮斿璁㈠崟鍗曞彿', width: 200, hide: true }
+                    , { field: 'HSourceBillType', title: '婧愬崟绫诲瀷', width: 100 }
+                    , { field: 'HSourceBillNo', title: '婧愬崟鍗曞彿', width: 200 }
+                    , { field: 'HSourceEntryID', title: '婧愬崟瀛愬唴鐮�', width: 150, hide: true }
+                    , { field: 'HSourceInterID', title: '婧愬崟涓诲唴鐮�', width: 150, hide: true }
+                    , { field: 'HSupID', title: '渚涘簲鍟咺D', width: 150, hide: true }
+                    , { field: 'HSupName', title: '渚涘簲鍟嗗悕绉�', width: 150, hide: true }
+                    , { field: 'HIsSplit', title: '鏄惁鎷嗗垎', width: 150, hide: true } //0鍚︼紝1鏄�
+
+                ]]
+            }
 
             //鐢熸垚鍝佺鐮�
             form.on('submit(HBarcodeSaverPZ)', function (data) {//淇濆瓨
@@ -938,69 +1001,121 @@
             });
 
             //杩涘叆椤甸潰鏌ヨ琛ㄤ綋鐗╂枡淇℃伅
-            layer.load(3)
-            table.render({
-                elem: '#mainTable'
-                , url: GetWEBURL() + subUrl
-                , toolbar: '#toolbarDemo' //寮�鍚ご閮ㄥ伐鍏锋爮锛屽苟涓哄叾缁戝畾宸︿晶妯℃澘
-                , defaultToolbar: ['filter', 'exports']
-                , where: { sMsg: linterid, sMsg2: lentryid }
-                , cols: [[
-                    { type: 'checkbox', fixed: 'left' }
-                    , { field: 'HMaterID', title: '鐗╂枡ID', width: 100, hide: true }
-                    , { field: 'HMaterNumber', title: '鐗╂枡缂栫爜', width: 120 }
-                    , { field: 'HOldMaterNumber', title: '鏃х墿鏂欑紪鐮�', width: 120, hide: true }
-                    , { field: 'HMaterShortNumber', title: '鐗╂枡浠g爜', width: 120, hide: true }
-                    , { field: 'HSubjoin', title: '鐗╂枡浠g爜', width: 120, hide: true }
-                    , { field: 'HMaterName', title: '鐗╂枡鍚嶇О', width: 120 }
-                    , { field: 'HMaterModel', title: '瑙勬牸鍨嬪彿', width: 120 }
-                    , { field: 'HUnitName', title: '璁¢噺鍗曚綅', width: 100 }
-                    , { field: 'HUnitNumber', title: '璁¢噺鍗曚綅浠g爜', width: 100, hide: true }
-                    , { field: 'HUnitID', title: '璁¢噺鍗曚綅ID', width: 100, hide: true }
-                    , { field: 'HDDQty', title: '璁㈠崟鏁伴噺', width: 100 }
-                    , { field: 'HMrbQty', title: '閫�鏂欐暟閲�', width: 100, hide: true }
-                    , { field: 'HBarcodeCount', title: '宸茬敓鎴愭潯鐮佹暟閲�', width: 135 }
-                    , { field: 'HNotBarcodeCount', title: '鍙敓鎴愭潯鐮佹暟閲�', width: 135 }
-                    , { field: 'HQty', title: '鏈鐢熸垚鏉$爜鏁伴噺', width: 135, edit: 'text', event: "inputHQty" }
-                    , { field: 'HMinQty', title: '鍐呯瑁呯鏁�', width: 100, edit: 'text', event: "inputHMinQty" }
-                    , { field: 'HBQty', title: '鍐呯鏁�', width: 100 }
-                    , { field: 'HWXQty', title: '澶栫瑁呯鏁�', width: 100, edit: 'text', event: "inputHWXQty" }
-                    , { field: 'HWBQty', title: '澶栫鏁�', width: 100 }
-                    , { field: 'HPrice', title: '鍗曚环', width: 100, hide: true }
-                    , { field: 'HMoney', title: '閲戦', width: 100, hide: true }
-                    , { field: 'HMTONO', title: '璁″垝璺熻釜鍗曞彿', width: 100, hide: true }
-                    , { field: 'HBatchNo', title: '鎵瑰彿', width: 100, edit: 'text' }
-                    , { field: 'HBatchManager', title: '鍚敤鎵瑰彿', width: 100, hide: true }
-                    , { field: 'HISKFPERIOD', title: '鏄惁鍚敤淇濊川鏈�', width: 100, edit: 'text', hide: true }
-                    , { field: 'HEXPUNIT', title: '淇濊川鏈熷崟浣�', width: 100, edit: 'text', hide: true }
-                    , { field: 'HKFDate', title: '鐢熶骇鏃ユ湡', align: 'center', width: 150, data_field: 'HKFDate', event: "chooseHKFDate" }//, event: "chooseHKFDate"
-                    , { field: 'HKFPeriod', title: '淇濊川鏈�', width: 100 }//
-                    , { field: 'HKFDQDate', title: '鍒版湡鏃ユ湡', align: 'center', width: 150, data_field: 'HKFDQDate' }//, event: "chooseHKFDQDate"
-                    , { field: 'HSupMaterNumber', title: '渚涘簲鍟嗘枡鍙�', width: 100, edit: 'text' }
-                    , { field: 'HSupBatchNo', title: '渚涘簲鍟嗘壒娆�', width: 100, edit: 'text' }
-                    //, { field: 'HBeginDate', title: '鐢熶骇鏃ユ湡', width: 120, data_field: 'HBeginDate', event: "chooseHBeginDate" }
-                    //, { field: 'HEndDate', title: '澶辨晥鏃ユ湡', width: 120, data_field: 'HEndDate', event: "chooseHEndDate" }
-                    //, { field: 'HDate', title: '瑕佹眰浜よ揣鏃ユ湡', width: 150 }
-                    , { field: 'HPOOrderInterID', title: '閲囪喘璁㈠崟涓诲唴鐮�', width: 150, hide: true }
-                    , { field: 'HPOOrderEntryID', title: '閲囪喘璁㈠崟瀛愬唴鐮�', width: 150, hide: true }
-                    , { field: 'HPOOrderBillNo', title: '閲囪喘璁㈠崟鍙�', width: 200 }
-                    , { field: 'HWWOrderInterID', title: '濮斿璁㈠崟涓诲唴鐮�', width: 150, hide: true }
-                    , { field: 'HWWOrderEntryID', title: '濮斿璁㈠崟瀛愬唴鐮�', width: 150, hide: true }
-                    , { field: 'HWWOrderDetaiLID	', title: '濮斿璁㈠崟鏄庣粏鍐呯爜', width: 150, hide: true }
-                    , { field: 'HWWOrderBillNo', title: '濮斿璁㈠崟鍗曞彿', width: 200, hide: true }
-                    , { field: 'HSourceBillType', title: '婧愬崟绫诲瀷', width: 100 }
-                    , { field: 'HSourceBillNo', title: '婧愬崟鍗曞彿', width: 200 }
-                    , { field: 'HSourceEntryID', title: '婧愬崟瀛愬唴鐮�', width: 150, hide: true }
-                    , { field: 'HSourceInterID', title: '婧愬崟涓诲唴鐮�', width: 150, hide: true }
-                    , { field: 'HSupID', title: '渚涘簲鍟咺D', width: 150, hide: true }
-                    , { field: 'HSupName', title: '渚涘簲鍟嗗悕绉�', width: 150, hide: true }
-                    , { field: 'HIsSplit', title: '鏄惁鎷嗗垎', width: 150, hide: true } //0鍚︼紝1鏄�
-                ]]
-                , done: function (res, curr, count) {
-                    layer.closeAll("loading");
-                },
-            });
+            if (mergeTags != 1) {
+                layer.load(3)
+                table.render({
+                    elem: '#mainTable'
+                    , url: GetWEBURL() + subUrl
+                    , toolbar: '#toolbarDemo' //寮�鍚ご閮ㄥ伐鍏锋爮锛屽苟涓哄叾缁戝畾宸︿晶妯℃澘
+                    , defaultToolbar: ['filter', 'exports']
+                    , where: { sMsg: linterid, sMsg2: lentryid }
+                    , cols: [[
+                        { type: 'checkbox', fixed: 'left' }
+                        , { field: 'HMaterID', title: '鐗╂枡ID', width: 100, hide: true }
+                        , { field: 'HMaterNumber', title: '鐗╂枡缂栫爜', width: 120 }
+                        , { field: 'HOldMaterNumber', title: '鏃х墿鏂欑紪鐮�', width: 120, hide: true }
+                        , { field: 'HMaterShortNumber', title: '鐗╂枡浠g爜', width: 120, hide: true }
+                        , { field: 'HSubjoin', title: '鐗╂枡浠g爜', width: 120, hide: true }
+                        , { field: 'HMaterName', title: '鐗╂枡鍚嶇О', width: 120 }
+                        , { field: 'HMaterModel', title: '瑙勬牸鍨嬪彿', width: 120 }
+                        , { field: 'HUnitName', title: '璁¢噺鍗曚綅', width: 100 }
+                        , { field: 'HUnitNumber', title: '璁¢噺鍗曚綅浠g爜', width: 100, hide: true }
+                        , { field: 'HUnitID', title: '璁¢噺鍗曚綅ID', width: 100, hide: true }
+                        , { field: 'HDDQty', title: '璁㈠崟鏁伴噺', width: 100 }
+                        , { field: 'HMrbQty', title: '閫�鏂欐暟閲�', width: 100, hide: true }
+                        , { field: 'HBarcodeCount', title: '宸茬敓鎴愭潯鐮佹暟閲�', width: 135 }
+                        , { field: 'HNotBarcodeCount', title: '鍙敓鎴愭潯鐮佹暟閲�', width: 135 }
+                        , { field: 'HQty', title: '鏈鐢熸垚鏉$爜鏁伴噺', width: 135, edit: 'text', event: "inputHQty" }
+                        , { field: 'HMinQty', title: '鍐呯鍖呰鏁�', width: 100, edit: 'text', event: "inputHMinQty" }
+                        , { field: 'HBQty', title: '鍐呯鏁�', width: 100 }
+                        , { field: 'HWXQty', title: '澶栫鍖呰鏁�', width: 100, edit: 'text', event: "inputHWXQty" }
+                        , { field: 'HWBQty', title: '澶栫鏁�', width: 100 }
+                        , { field: 'HPrice', title: '鍗曚环', width: 100, hide: true }
+                        , { field: 'HMoney', title: '閲戦', width: 100, hide: true }
+                        , { field: 'HMTONO', title: '璁″垝璺熻釜鍗曞彿', width: 100, hide: true }
+                        , { field: 'HBatchNo', title: '鎵瑰彿', width: 100, edit: 'text' }
+                        , { field: 'HBatchManager', title: '鍚敤鎵瑰彿', width: 100, hide: true }
+                        , { field: 'HISKFPERIOD', title: '鏄惁鍚敤淇濊川鏈�', width: 100, edit: 'text', hide: true }
+                        , { field: 'HEXPUNIT', title: '淇濊川鏈熷崟浣�', width: 100, edit: 'text', hide: true }
+                        , { field: 'HKFDate', title: '鐢熶骇鏃ユ湡', align: 'center', width: 150, data_field: 'HKFDate', event: "chooseHKFDate" }//, event: "chooseHKFDate"
+                        , { field: 'HKFPeriod', title: '淇濊川鏈�', width: 100 }//
+                        , { field: 'HKFDQDate', title: '鍒版湡鏃ユ湡', align: 'center', width: 150, data_field: 'HKFDQDate' }//, event: "chooseHKFDQDate"
+                        , { field: 'HSupMaterNumber', title: '渚涘簲鍟嗘枡鍙�', width: 100, edit: 'text' }
+                        , { field: 'HSupBatchNo', title: '渚涘簲鍟嗘壒娆�', width: 100, edit: 'text' }
+                        //, { field: 'HBeginDate', title: '鐢熶骇鏃ユ湡', width: 120, data_field: 'HBeginDate', event: "chooseHBeginDate" }
+                        //, { field: 'HEndDate', title: '澶辨晥鏃ユ湡', width: 120, data_field: 'HEndDate', event: "chooseHEndDate" }
+                        //, { field: 'HDate', title: '瑕佹眰浜よ揣鏃ユ湡', width: 150 }
+                        , { field: 'HPOOrderInterID', title: '閲囪喘璁㈠崟涓诲唴鐮�', width: 150, hide: true }
+                        , { field: 'HPOOrderEntryID', title: '閲囪喘璁㈠崟瀛愬唴鐮�', width: 150, hide: true }
+                        , { field: 'HPOOrderBillNo', title: '閲囪喘璁㈠崟鍙�', width: 200 }
+                        , { field: 'HWWOrderInterID', title: '濮斿璁㈠崟涓诲唴鐮�', width: 150, hide: true }
+                        , { field: 'HWWOrderEntryID', title: '濮斿璁㈠崟瀛愬唴鐮�', width: 150, hide: true }
+                        , { field: 'HWWOrderDetaiLID	', title: '濮斿璁㈠崟鏄庣粏鍐呯爜', width: 150, hide: true }
+                        , { field: 'HWWOrderBillNo', title: '濮斿璁㈠崟鍗曞彿', width: 200, hide: true }
+                        , { field: 'HSourceBillType', title: '婧愬崟绫诲瀷', width: 100 }
+                        , { field: 'HSourceBillNo', title: '婧愬崟鍗曞彿', width: 200 }
+                        , { field: 'HSourceEntryID', title: '婧愬崟瀛愬唴鐮�', width: 150, hide: true }
+                        , { field: 'HSourceInterID', title: '婧愬崟涓诲唴鐮�', width: 150, hide: true }
+                        , { field: 'HSupID', title: '渚涘簲鍟咺D', width: 150, hide: true }
+                        , { field: 'HSupName', title: '渚涘簲鍟嗗悕绉�', width: 150, hide: true }
+                        , { field: 'HIsSplit', title: '鏄惁鎷嗗垎', width: 150, hide: true } //0鍚︼紝1鏄�
 
+                    ]]
+                    , done: function (res, curr, count) {
+                        layer.closeAll("loading");
+                    }
+                });
+            }
+            else
+            {
+                layer.load(3)
+                $.ajax({
+                    type: "GET",
+                    url: GetWEBURL() + "/GetHBarCodeShowBillSub_Merge",
+                    async: true,
+                    data: { HInterID: linterid },
+                    dataType: "json",
+                    success: function (data) {
+                        if (data.count == 10000) {
+                            var data = data.data;
+                            var rowdata = [];
+
+                            for (var i = 0; i < data.length; i++) {
+                                rowdata.push({
+                                    "HMaterID": data[i].HMaterID, "HMaterNumber": data[i].HMaterNumber, "HOldMaterNumber": ""
+                                    , "HMaterShortNumber": "", "HSubjoin": "", "HMaterName": data[i].HMaterName
+                                    , "HMaterModel": data[i].HMaterModel, "HUnitName": data[i].HUnitName, "HUnitNumber": data[i].HUnitNumber
+                                    , "HUnitID": data[i].HUnitID, "HDDQty": data[i].HDDQty, "HMrbQty": 0, "HBarcodeCount": data[i].HBarcodeCount
+                                    , "HNotBarcodeCount": data[i].HNotBarcodeCount, "HQty": data[i].HQty, "HMinQty": data[i].HMinQty, "HBQty": data[i].HBQty
+                                    , "HWXQty": data[i].HWXQty, "HWBQty": data[i].HWBQty, "HPrice": data[i].HPrice, "HMoney": data[i].HMoney, "HMTONO": ""
+                                    , "HBatchNo": data[i].HBatchNo, "HBatchManager": data[i].HBatchManager, "HISKFPERIOD": data[i].HISKFPERIOD
+                                    , "HEXPUNIT": data[i].HEXPUNIT, "HKFDate": data[i].HKFDate, "HKFPeriod": data[i].HKFPeriod, "HKFDQDate": data[i].HKFDQDate
+                                    , "HSupMaterNumber": data[i].HSupMaterNumber, "HSupBatchNo": data[i].HSupBatchNo, "HPOOrderInterID": data[i].HPOOrderInterID
+                                    , "HPOOrderEntryID": data[i].HPOOrderEntryID, "HPOOrderBillNo": data[i].HPOOrderBillNo, "HWWOrderInterID": data[i].HWWOrderInterID
+                                    , "HWWOrderEntryID": data[i].HWWOrderEntryID, "HWWOrderDetaiLID": data[i].HWWOrderDetaiLID, "HWWOrderBillNo": data[i].HWWOrderBillNo
+                                    , "HSourceBillType": data[i].HSourceBillType, "HSourceBillNo": data[i].HSourceBillNo, "HSourceEntryID": data[i].HSourceEntryID
+                                    , "HSourceInterID": data[i].HSourceInterID, "HSupID": data[i].HSupID, "HSupName": "", "HIsSplit": data[i].HIsSplit
+                                });
+                            }
+
+                            option.data = rowdata;
+
+                            table.render(option);
+
+                        }
+                        else {
+                            // $("#verifycode").click();
+                            f_alert(data.Message);
+                        }
+                        layer.closeAll("loading");
+                    },
+                    error: function (err) {
+                        f_alert("閿欒:" + err);
+                        layer.closeAll("loading");
+                    }
+                });
+            }
+            
             //澶村伐鍏锋爮浜嬩欢
             table.on('toolbar(mainTable)', function (obj) {
                 var checkStatus = table.checkStatus(obj.config.id);
diff --git a/WebSRM/layuiAdmin.std-v1.2.1/src/views/SRM/SRM_POInStockBill_Edit.html b/WebSRM/layuiAdmin.std-v1.2.1/src/views/SRM/SRM_POInStockBill_Edit.html
index d894293..f5c1c3a 100644
--- a/WebSRM/layuiAdmin.std-v1.2.1/src/views/SRM/SRM_POInStockBill_Edit.html
+++ b/WebSRM/layuiAdmin.std-v1.2.1/src/views/SRM/SRM_POInStockBill_Edit.html
@@ -28,7 +28,9 @@
                                 <button type="button" id="aduit-btn" class="layui-btn layui-btn-normal layui-btn-radius" lay-submit="" lay-filter="Aduit">瀹℃牳</button>
                                 <button type="button" class="layui-btn layui-btn-normal layui-btn-radius" lay-submit="" lay-filter="Print">鎵撳嵃</button>
                                 <button type="button" class="layui-btn layui-btn-normal layui-btn-radius" lay-submit="" lay-filter="Print_Convenient">涓�閿墦鍗�</button>
-                                <button type="button" class="layui-btn layui-btn-normal layui-btn-radius" lay-submit="" lay-filter="ChooseSource">閫夋簮鍗�</button>
+                                <button type="button" id="ChooseSource-btn" class="layui-btn layui-btn-normal layui-btn-radius" lay-submit="" lay-filter="ChooseSource">閫夋簮鍗�</button>
+                                <!--<button type="button" class="layui-btn layui-btn-normal layui-btn-radius" lay-submit="" lay-filter="BuildBarcode">鐢熸垚鏉$爜</button>-->
+                                <button type="button" class="layui-btn layui-btn-normal layui-btn-radius" lay-submit="" lay-filter="MergeBuildBarcode">鍚堝苟鐢熸垚鏉$爜</button>
                                 <button type="button" class="layui-btn layui-btn-normal layui-btn-radius" lay-submit="" lay-filter="Exit">閫�鍑�</button>
                             </div>
                         </div>
@@ -47,6 +49,7 @@
                                                     <label class="layui-form-label">鍗� 鎹� 鍙凤細</label>
                                                     <div class="layui-input-inline">
                                                         <input class="layui-input" name="HBillNo" lay-verify="HBillNo" id="HBillNo" readonly="readonly" autocomplete="off">
+                                                        <input class="layui-input" name="HInterID" lay-verify="HInterID" id="HInterID" readonly="readonly" autocomplete="off" style="display:none;">
                                                     </div>
                                                 </div>
                                                 <div class="layui-col-xs3">
@@ -267,8 +270,10 @@
             url: GetWEBURL() + "GetNewPOInStockBillNo",
             type: "GET",
             data: { "sMsg": linterid, "sMsg3": lSourceBillType },
+            async: false,
             success: function (d) {
                 //console.log(d.data);
+                $("#HInterID").val(d.data[0].HInterID);
                 $("#HBillNo").val(d.data[0].HBillNo);
                 $("#HInnerBillNo").val(d.data[0].HInnerBillNo);
                 $("#HDate").val(d.data[0].HDate);
@@ -281,7 +286,7 @@
             success: function (d) {
                 //console.log(d.data);
                 //$("#HDate").val(d.)
-                $("#HInterID").val(d.data[0].HInterID);
+                //$("#HInterID").val(d.data[0].HInterID);
                 //$("#HBillNo").val(d.data[0].HBillNo);
                 $("#HRemark").val(d.data[0].HRemark);
                 //$("#HDate").val(d.data[0].HDateForWeb);
@@ -670,6 +675,7 @@
                             if (data.count == 1) { // 璇存槑楠岃瘉鎴愬姛浜嗭紝
                                 layer.msg(data.Message, { icon: 1 });
                                 $('#add-btn').addClass("layui-btn-disabled").attr("disabled", true);
+                                $('#ChooseSource-btn').addClass("layui-btn-disabled").attr("disabled", true);
                             }
                             else {
                                 f_alert(data.Message);
@@ -800,6 +806,26 @@
                     , resize: false
                     //, cancel: function () {
                     //    $(".layui-btn").removeClass("layui-btn-disabled");
+                    //}
+                })
+            });
+            
+            form.on('submit(MergeBuildBarcode)', function (data) {
+                if (HIsAduit == false) {
+                    layer.msg("璇峰鏍搁�佽揣鍗曞悗鍦ㄧ敓鎴愭潯鐮�( 麓鈼旓笌 鈥糕棓锔巂)", { icon: 5 });
+                    return;
+                }
+                layer.open({
+                    type: 2
+                    , area: ['95%', '95%']
+                    , title: '鏉$爜鐢熸垚'
+                    , shade: 0.6 //閬僵閫忔槑搴�
+                    , maxmin: false //鍏佽鍏ㄥ睆鏈�灏忓寲
+                    , anim: 0 //0-6鐨勫姩鐢诲舰寮忥紝-1涓嶅紑鍚�
+                    , content: ['../../views/SRM/SRM_BarCodeBill.html?linterid=' + $("#HInterID").val() + '&lentryid=0' + '&type=0' + '&mergeTags=1', 'yes']
+                    , resize: false
+                    //, done: function () {
+                    //    layer.closeAll("loading");
                     //}
                 })
             });
@@ -1039,8 +1065,8 @@
                     "sorderid": HSubLen, "HPOOrderInterID": obj[i].hmainid, "HPOOrderEntryID": obj[i].hsubid, "HPOOrderBillNo": obj[i].璁㈠崟鍗曞彿, "HWWOrderInterID": 0,
                     "HWWOrderEntryID": 0, "HWWOrderDetaiLID": 0., "HWWOrderBillNo": '', "HBillType": "1102", "HBatchNo": Batchno, "HMaterID": obj[i].hmaterid,
                     "HMaterNumber": obj[i].鐗╂枡浠g爜, "HOldMaterNumber": obj[i].鏃х墿鏂欑紪鐮�, "HMaterShortNumber": obj[i].鐗╂枡缂栫爜, "HMaterName": obj[i].鐗╂枡鍚嶇О,
-                    "HMaterModel": obj[i].瑙勬牸鍨嬪彿, "HUnitID": obj[i].hunitid, "HUnitNumber": obj[i].璁¢噺鍗曚綅浠g爜, "HUnitName": obj[i].閲囪喘鍗曚綅, "HQty": obj[i].鏈叧鑱旀暟閲�,
-                    "HRQty": obj[i].鏈叧鑱旀暟閲�, "HSQty": obj[i].閲囪喘鏁伴噺, "HPrice": obj[i].鍗曚环, "HMoney": obj[i].閲戦, "HDate": Format(new Date(), "yyyy-MM-dd"), "HKFDate": '',
+                    "HMaterModel": obj[i].瑙勬牸鍨嬪彿, "HUnitID": obj[i].hunitid, "HUnitName": obj[i].璁¢噺鍗曚綅, "HUnitNumber": obj[i].璁¢噺鍗曚綅浠g爜, "HUnitName": obj[i].閲囪喘鍗曚綅, "HQty": obj[i].鏈叧鑱旀暟閲�,
+                    "HRQty": obj[i].鏈叧鑱旀暟閲�, "HSQty": obj[i].閲囪喘鏁伴噺, "HPrice": obj[i].鍗曚环, "HMoney": obj[i].閲戦, "HDate": Format(new Date(), "yyyy-MM-dd"), "HKFDate": new Date().toISOString().slice(0, 10),
                     "HKFPeriod": 0, "HSourceInterID": obj[i].hmainid, "HSourceEntryID": obj[i].hsubid, "HSourceBillType": "1102", "HSourceBillNo": obj[i].璁㈠崟鍗曞彿,
                     "HMTONO": obj[i].HBatchNo, "F_xbkf_Combo": '', "FSHDD": '', "FPrintCount": obj[i].鎵撳嵃鏉$爜鏁伴噺, "HPlanArrivalDate": new Date(),
                     "HTAXPRICE_T": obj[i].鍚◣閲嶉噺鍗曚环鍚�

--
Gitblit v1.9.1