From 8a36bbee40f5e1069b15a98b1e64ac9719ee8a46 Mon Sep 17 00:00:00 2001
From: zrg <z18737863051@163.com>
Date: 星期二, 23 四月 2024 17:17:13 +0800
Subject: [PATCH] 1.销售出库单 增加 反写源单 销售订单和发货通知单   超出 关联数量  关闭源单 2.应收单 增加  反写源单 销售出库单 和 销售订单  超出关联数量  关闭源单 3.动态获取源单增加参数 Num 0蓝单   1红单  2全部 4.销售流程的测试并完善功能; 销售订单-》发货通知单-》销售出库单-》应收单 (注意: 源单类型的下拉框 需要 根据数据库 表动态加载, 关联数量 要准确 , 审核 且 未关闭 未行关闭的行 才能下推 ,关联数量超额后,要 反写 关闭 源单 )

---
 WebTM/views/销售管理/发货通知单/Add_Edit_Xs_SeOutStockBillList.html    |    7 
 WebTM/views/销售管理/退货通知单/Xs_SeOutStockBackBill.html             |    2 
 WebTM/views/领料发货/销售出库/Kf_SellOutBill.html                     |  187 +++++++++++++++++++++++++++++++++++++
 WebTM/views/采购管理/收料通知单/Add_Edit_Cg_POInStockBillList.html     |    2 
 WebTM/views/采购管理/退料通知单/Add_Edit_Cg_POInStockBackBillList.html |    2 
 WebTM/views/验收入库/外购入库/Kf_POStockInBackBill_Add_Up.html        |    2 
 WebTM/views/销售管理/应收单/Xs_ReceivableBill.html                   |   37 +++++++
 WebTM/views/仓存管理/仓库调拨/Add_Edit_Kf_MoveStockBill.html          |    2 
 WebTM/views/验收入库/其他入库/Add_Edit_Kf_OtherInBill.html            |    2 
 WebTM/views/验收入库/产品入库/Kf_ProductInBillEdit.html               |    2 
 WebTM/views/领料发货/其他出库/Add_Edit_Kf_OtherOutBill.html           |    2 
 WebTM/views/仓存管理/分步式调入单/Fb_StepFoldinBillEdit.html            |    2 
 WebTM/views/验收入库/外购入库/Add_Edit_Kf_POStockInBillList.html      |    2 
 WebTM/views/生产管理/生产退库单/Sc_ProductionReturnEdit.html           |    2 
 14 files changed, 235 insertions(+), 18 deletions(-)

diff --git "a/WebTM/views/\344\273\223\345\255\230\347\256\241\347\220\206/\344\273\223\345\272\223\350\260\203\346\213\250/Add_Edit_Kf_MoveStockBill.html" "b/WebTM/views/\344\273\223\345\255\230\347\256\241\347\220\206/\344\273\223\345\272\223\350\260\203\346\213\250/Add_Edit_Kf_MoveStockBill.html"
index 154f117..a0314a6 100644
--- "a/WebTM/views/\344\273\223\345\255\230\347\256\241\347\220\206/\344\273\223\345\272\223\350\260\203\346\213\250/Add_Edit_Kf_MoveStockBill.html"
+++ "b/WebTM/views/\344\273\223\345\255\230\347\256\241\347\220\206/\344\273\223\345\272\223\350\260\203\346\213\250/Add_Edit_Kf_MoveStockBill.html"
@@ -1637,7 +1637,7 @@
                 $.ajax({
                     type: "get",
                     async: false,
-                    data: { "HName": HName },
+                    data: { "HName": HName, "Num": 2 },       //0钃濆崟 1绾㈠崟 2涓嶅垎绾㈣摑鍗�
                     url: GetWEBURL() + "/Web/GetHSourceBillType",
                     success: function (result) {
                         var HSourceBillTypes = "";
diff --git "a/WebTM/views/\344\273\223\345\255\230\347\256\241\347\220\206/\345\210\206\346\255\245\345\274\217\350\260\203\345\205\245\345\215\225/Fb_StepFoldinBillEdit.html" "b/WebTM/views/\344\273\223\345\255\230\347\256\241\347\220\206/\345\210\206\346\255\245\345\274\217\350\260\203\345\205\245\345\215\225/Fb_StepFoldinBillEdit.html"
index 79f5a4e..1582188 100644
--- "a/WebTM/views/\344\273\223\345\255\230\347\256\241\347\220\206/\345\210\206\346\255\245\345\274\217\350\260\203\345\205\245\345\215\225/Fb_StepFoldinBillEdit.html"
+++ "b/WebTM/views/\344\273\223\345\255\230\347\256\241\347\220\206/\345\210\206\346\255\245\345\274\217\350\260\203\345\205\245\345\215\225/Fb_StepFoldinBillEdit.html"
@@ -1254,7 +1254,7 @@
                 $.ajax({
                     type: "get",
                     async: false,
-                    data: { "HName": HName },
+                    data: { "HName": HName, "Num": 2 },       //0钃濆崟 1绾㈠崟 2涓嶅垎绾㈣摑鍗�
                     url: GetWEBURL() + "/Web/GetHSourceBillType",
                     success: function (result) {
                         var HSourceBillTypes = "";
diff --git "a/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\347\224\237\344\272\247\351\200\200\345\272\223\345\215\225/Sc_ProductionReturnEdit.html" "b/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\347\224\237\344\272\247\351\200\200\345\272\223\345\215\225/Sc_ProductionReturnEdit.html"
index 173177b..baef45f 100644
--- "a/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\347\224\237\344\272\247\351\200\200\345\272\223\345\215\225/Sc_ProductionReturnEdit.html"
+++ "b/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\347\224\237\344\272\247\351\200\200\345\272\223\345\215\225/Sc_ProductionReturnEdit.html"
@@ -1715,7 +1715,7 @@
                 $.ajax({
                     type: "get",
                     async: false,
-                    data: { "HName": HName },
+                    data: { "HName": HName, "Num": 2 },       //0钃濆崟 1绾㈠崟 2涓嶅垎绾㈣摑鍗�
                     url: GetWEBURL() + "/Web/GetHSourceBillType",
                     success: function (result) {
                         var HSourceBillTypes = "";
diff --git "a/WebTM/views/\351\207\207\350\264\255\347\256\241\347\220\206/\346\224\266\346\226\231\351\200\232\347\237\245\345\215\225/Add_Edit_Cg_POInStockBillList.html" "b/WebTM/views/\351\207\207\350\264\255\347\256\241\347\220\206/\346\224\266\346\226\231\351\200\232\347\237\245\345\215\225/Add_Edit_Cg_POInStockBillList.html"
index 1329403..47a5695 100644
--- "a/WebTM/views/\351\207\207\350\264\255\347\256\241\347\220\206/\346\224\266\346\226\231\351\200\232\347\237\245\345\215\225/Add_Edit_Cg_POInStockBillList.html"
+++ "b/WebTM/views/\351\207\207\350\264\255\347\256\241\347\220\206/\346\224\266\346\226\231\351\200\232\347\237\245\345\215\225/Add_Edit_Cg_POInStockBillList.html"
@@ -1864,7 +1864,7 @@
                 $.ajax({
                     type: "get",
                     async: false,
-                    data: { "HName": HName },
+                    data: { "HName": HName, "Num": 2 },       //0钃濆崟 1绾㈠崟 2涓嶅垎绾㈣摑鍗�
                     url: GetWEBURL() + "/Web/GetHSourceBillType",
                     success: function (result) {
                         var HSourceBillTypes = "";
diff --git "a/WebTM/views/\351\207\207\350\264\255\347\256\241\347\220\206/\351\200\200\346\226\231\351\200\232\347\237\245\345\215\225/Add_Edit_Cg_POInStockBackBillList.html" "b/WebTM/views/\351\207\207\350\264\255\347\256\241\347\220\206/\351\200\200\346\226\231\351\200\232\347\237\245\345\215\225/Add_Edit_Cg_POInStockBackBillList.html"
index 502a3f5..7c73c46 100644
--- "a/WebTM/views/\351\207\207\350\264\255\347\256\241\347\220\206/\351\200\200\346\226\231\351\200\232\347\237\245\345\215\225/Add_Edit_Cg_POInStockBackBillList.html"
+++ "b/WebTM/views/\351\207\207\350\264\255\347\256\241\347\220\206/\351\200\200\346\226\231\351\200\232\347\237\245\345\215\225/Add_Edit_Cg_POInStockBackBillList.html"
@@ -1619,7 +1619,7 @@
                 $.ajax({
                     type: "get",
                     async: false,
-                    data: { "HName": HName },
+                    data: { "HName": HName, "Num": 2 },       //0钃濆崟 1绾㈠崟 2涓嶅垎绾㈣摑鍗�
                     url: GetWEBURL() + "/Web/GetHSourceBillType",
                     success: function (result) {
                         var HSourceBillTypes = "";
diff --git "a/WebTM/views/\351\224\200\345\224\256\347\256\241\347\220\206/\345\217\221\350\264\247\351\200\232\347\237\245\345\215\225/Add_Edit_Xs_SeOutStockBillList.html" "b/WebTM/views/\351\224\200\345\224\256\347\256\241\347\220\206/\345\217\221\350\264\247\351\200\232\347\237\245\345\215\225/Add_Edit_Xs_SeOutStockBillList.html"
index 06c0b86..ef0f308 100644
--- "a/WebTM/views/\351\224\200\345\224\256\347\256\241\347\220\206/\345\217\221\350\264\247\351\200\232\347\237\245\345\215\225/Add_Edit_Xs_SeOutStockBillList.html"
+++ "b/WebTM/views/\351\224\200\345\224\256\347\256\241\347\220\206/\345\217\221\350\264\247\351\200\232\347\237\245\345\215\225/Add_Edit_Xs_SeOutStockBillList.html"
@@ -637,6 +637,7 @@
             function getSupType() {
                 var type = $("#HSourceBillType").val();
                 var data = [];
+                var HOrgID = sessionStorage["OrganizationID"];
                 //鑾峰彇缂栫爜瀵瑰簲鍗曟嵁鍚嶇О
                 $.ajax({
                     type: "get",
@@ -649,7 +650,8 @@
                 })
                 switch (type) {
                     case '1401':
-                        return { url: "../../閿�鍞鐞�/閿�鍞鍗�/Xs_SeOrderBillList.html", name: data[0]["HName"] };
+                        return {
+                            url: "../../閿�鍞鐞�/閿�鍞鍗�/Xs_SeOrderBillList.html?openType=2&HOrgID=" + HOrgID, name: data[0]["HName"] };
                         break;
                 }
 
@@ -684,7 +686,6 @@
                         if (checkStatus.data.length == 0) {
                             return layer.msg("璇疯嚦灏戦�夋嫨涓�鏉℃暟鎹�!");
                         }
-                        //layer.alert("浣犲凡閫夋嫨" + checkStatus.data.length + "鏉℃暟鎹�");
                         //鑾峰彇閿�鍞鍗曚唬鐮�
                         var ProcessNumber = [];
                         for (var i = 0; i < checkStatus.data.length; i++) {
@@ -1262,7 +1263,7 @@
                 $.ajax({
                     type: "get",
                     async: false,
-                    data: { "HName": HName },
+                    data: { "HName": HName, "Num":2 },       //0钃濆崟 1绾㈠崟 2涓嶅垎绾㈣摑鍗�
                     url: GetWEBURL() + "/Web/GetHSourceBillType",
                     success: function (result) {
                         var HSourceBillTypes = "";
diff --git "a/WebTM/views/\351\224\200\345\224\256\347\256\241\347\220\206/\345\272\224\346\224\266\345\215\225/Xs_ReceivableBill.html" "b/WebTM/views/\351\224\200\345\224\256\347\256\241\347\220\206/\345\272\224\346\224\266\345\215\225/Xs_ReceivableBill.html"
index c45c9f1..4c36e12 100644
--- "a/WebTM/views/\351\224\200\345\224\256\347\256\241\347\220\206/\345\272\224\346\224\266\345\215\225/Xs_ReceivableBill.html"
+++ "b/WebTM/views/\351\224\200\345\224\256\347\256\241\347\220\206/\345\272\224\346\224\266\345\215\225/Xs_ReceivableBill.html"
@@ -77,10 +77,13 @@
                                         <div class="layui-inline">
                                             <label class="layui-form-label">婧愬崟绫诲瀷</label>
                                             <div class="layui-input-inline">
-                                                <select name="BillType" id="BillType" lay-filter="BillType" style="width: 180px; ">
+                                                <select name="BillType" id="BillType" lay-verify="BillType" style="width: 180px; ">
+                                                    <!--鍔ㄦ�佹覆鏌撴簮鍗曠被鍨�-->
+                                                </select>
+                                                <!--<select name="BillType" id="BillType" lay-filter="BillType" style="width: 180px; ">
                                                     <option style="color:blue;" selected="selected" value="1401">閿�鍞鍗�</option>
                                                     <option style="color:blue;" value="1205">閿�鍞嚭搴撳崟</option>
-                                                </select>
+                                                </select>-->
                                             </div>
                                         </div>
                                         <div class="layui-inline">
@@ -414,6 +417,9 @@
 
             //鍒濆鍖栫粍缁�
             Organ();
+
+            //鑾峰彇婧愬崟绫诲瀷
+            HBillType();
 
             //#endregion
 
@@ -1103,6 +1109,8 @@
                 })
             }
             //#endregion
+
+            
 
             //#region 閫夋嫨婧愬崟
             function get_checkMainSource() {
@@ -2063,6 +2071,31 @@
             }
             //#endregion
 
+
+            //#region 鑾峰彇婧愬崟绫诲瀷
+            function HBillType() {
+                var HName = '搴旀敹鍗�';
+                //鑾峰彇鐧诲綍椤电粍缁囧垪
+                $.ajax({
+                    type: "get",
+                    async: false,
+                    data: { "HName": HName, "Num": 2 },       //0钃濆崟 1绾㈠崟 2涓嶅垎绾㈣摑鍗�
+                    url: GetWEBURL() + "/Web/GetHSourceBillType",
+                    success: function (result) {
+                        var HSourceBillTypes = "";
+                        if (result.count == 1) { // 璇存槑楠岃瘉鎴愬姛浜嗭紝
+                            var data = result.data;
+                            for (var i = 0; i < data.length; i++) {
+                                HSourceBillTypes += '<option  style="color:blue;" value="' + data[i].HSourceBillType + '">' + data[i].HSourceBillTypeName + '</option>';
+                            }
+                            $("#BillType").append(HSourceBillTypes);
+                            form.render('select');
+                        }
+                    }
+                })
+            }
+            //#endregion
+
             //#region 閫夋嫨婧愬崟-閿�鍞鍗�
             function setInitBySeOrderBill(checkStatus) {
                 var dataArray = [];
diff --git "a/WebTM/views/\351\224\200\345\224\256\347\256\241\347\220\206/\351\200\200\350\264\247\351\200\232\347\237\245\345\215\225/Xs_SeOutStockBackBill.html" "b/WebTM/views/\351\224\200\345\224\256\347\256\241\347\220\206/\351\200\200\350\264\247\351\200\232\347\237\245\345\215\225/Xs_SeOutStockBackBill.html"
index e83a6de..64b6f23 100644
--- "a/WebTM/views/\351\224\200\345\224\256\347\256\241\347\220\206/\351\200\200\350\264\247\351\200\232\347\237\245\345\215\225/Xs_SeOutStockBackBill.html"
+++ "b/WebTM/views/\351\224\200\345\224\256\347\256\241\347\220\206/\351\200\200\350\264\247\351\200\232\347\237\245\345\215\225/Xs_SeOutStockBackBill.html"
@@ -1258,7 +1258,7 @@
                 $.ajax({
                     type: "get",
                     async: false,
-                    data: { "HName": HName },
+                    data: { "HName": HName, "Num": 2 },       //0钃濆崟 1绾㈠崟 2涓嶅垎绾㈣摑鍗�
                     url: GetWEBURL() + "/Web/GetHSourceBillType",
                     success: function (result) {
                         var HSourceBillTypes = "";
diff --git "a/WebTM/views/\351\242\206\346\226\231\345\217\221\350\264\247/\345\205\266\344\273\226\345\207\272\345\272\223/Add_Edit_Kf_OtherOutBill.html" "b/WebTM/views/\351\242\206\346\226\231\345\217\221\350\264\247/\345\205\266\344\273\226\345\207\272\345\272\223/Add_Edit_Kf_OtherOutBill.html"
index c365538..d04c83f 100644
--- "a/WebTM/views/\351\242\206\346\226\231\345\217\221\350\264\247/\345\205\266\344\273\226\345\207\272\345\272\223/Add_Edit_Kf_OtherOutBill.html"
+++ "b/WebTM/views/\351\242\206\346\226\231\345\217\221\350\264\247/\345\205\266\344\273\226\345\207\272\345\272\223/Add_Edit_Kf_OtherOutBill.html"
@@ -1444,7 +1444,7 @@
                 $.ajax({
                     type: "get",
                     async: false,
-                    data: { "HName": HName },
+                    data: { "HName": HName, "Num": 2 },       //0钃濆崟 1绾㈠崟 2涓嶅垎绾㈣摑鍗�
                     url: GetWEBURL() + "/Web/GetHSourceBillType",
                     success: function (result) {
                         var HSourceBillTypes = "";
diff --git "a/WebTM/views/\351\242\206\346\226\231\345\217\221\350\264\247/\351\224\200\345\224\256\345\207\272\345\272\223/Kf_SellOutBill.html" "b/WebTM/views/\351\242\206\346\226\231\345\217\221\350\264\247/\351\224\200\345\224\256\345\207\272\345\272\223/Kf_SellOutBill.html"
index 4270f38..60b0219 100644
--- "a/WebTM/views/\351\242\206\346\226\231\345\217\221\350\264\247/\351\224\200\345\224\256\345\207\272\345\272\223/Kf_SellOutBill.html"
+++ "b/WebTM/views/\351\242\206\346\226\231\345\217\221\350\264\247/\351\224\200\345\224\256\345\207\272\345\272\223/Kf_SellOutBill.html"
@@ -78,8 +78,12 @@
                                         <div class="layui-inline">
                                             <label class="layui-form-label">婧愬崟绫诲瀷</label>
                                             <div class="layui-input-inline">
+                                                <!--<select name="BillType" id="BillType" lay-filter="BillType" style="width: 180px; ">-->
+                                                    <!--鍔ㄦ�佽幏鍙栨簮鍗�-->
+                                                <!--</select>-->
                                                 <select name="BillType" id="BillType" lay-filter="BillType" style="width: 180px; ">
                                                     <option style="color:blue;" selected="selected" value="1401">閿�鍞鍗�</option>
+                                                    <option style="color:blue;"  value="1402">鍙戣揣閫氱煡鍗�</option>
                                                 </select>
                                             </div>
                                         </div>
@@ -555,6 +559,9 @@
 
             //鍒濆鍖栫粍缁�
             Organ();
+
+            //鍔ㄦ�佽幏鍙栨簮鍗�
+            //HBillType
 
             //#region 椤甸潰鍒濆鍖栧悗锛屾牴鎹鎴疯幏鍙栧鎴蜂綑棰�
             getCustomerBalance($("#HSupID").val());
@@ -1490,13 +1497,39 @@
             }
             //#endregion
 
+            //#region 鑾峰彇婧愬崟绫诲瀷
+            function HBillType() {
+                var HName = '閿�鍞嚭搴撳崟';
+                //鑾峰彇鐧诲綍椤电粍缁囧垪
+                $.ajax({
+                    type: "get",
+                    async: false,
+                    data: { "HName": HName, "Num":0},       //0钃濆崟 1绾㈠崟 2涓嶅垎绾㈣摑鍗�
+                    url: GetWEBURL() + "/Web/GetHSourceBillType",
+                    success: function (result) {
+                        var HSourceBillTypes = "";
+                        if (result.count == 1) { // 璇存槑楠岃瘉鎴愬姛浜嗭紝
+                            var data = result.data;
+                            for (var i = 0; i < data.length; i++) {
+                                HSourceBillTypes += '<option  style="color:blue;" value="' + data[i].HSourceBillType + '">' + data[i].HSourceBillTypeName + '</option>';
+                            }
+                            $("#BillType").append(HSourceBillTypes);
+                            form.render('select');
+                        }
+                    }
+                })
+            }
+            //#endregion
+
             //#region 閫夋嫨婧愬崟
             function get_checkMainSource() {
                 var HOrgID = $("#HOrgID").val();
                 var url = "";
                 if ($("#BillType").val() == "1401") {
                     url = "../../閿�鍞鐞�/閿�鍞鍗�/Xs_SeOrderBillList.html?openType=2&HOrgID=" + HOrgID;
-                } else {
+                } else if ($("#BillType").val() == "1402") {
+                    url = "../../閿�鍞鐞�/鍙戣揣閫氱煡鍗�/Xs_SeOutStockBillList.html?openType=2&HOrgID=" + HOrgID;
+                }else {
                     return layer.msg('褰撳墠涓嶆敮鎸佹敼婧愬崟閫夋嫨锛侊紒');
                 }
 
@@ -1514,9 +1547,11 @@
                         if (checkStatus.data.length === 0) {
                             return layer.msg('璇烽�夋嫨鏁版嵁');
                         }
-
+                        
                         if ($("#BillType").val() == "1401") {
                             setInitBySeOrderBill(checkStatus);
+                        } else if ($("#BillType").val() == "1402") {
+                            setInitBySeOutStockBill(checkStatus)
                         }
                         layer.close(index); //瀹冭幏鍙栫殑濮嬬粓鏄渶鏂板脊鍑虹殑鏌愪釜灞傦紝鍊兼槸鐢眑ayer鍐呴儴鍔ㄦ�侀�掑璁$畻鐨�
                     }
@@ -2713,6 +2748,127 @@
             }
             //#endregion
 
+            //#region 閫夋嫨婧愬崟-鍙戣揣閫氱煡鍗�
+            function setInitBySeOutStockBill(checkStatus) {
+                var dataArray = [];
+
+                for (var i = 0; i < checkStatus.data.length; i++) {
+                    var temp = getPushSeOutStockBillInit(checkStatus.data[i].hmainid, checkStatus.data[i].hsubid);
+                    if (temp != "none") {
+                        dataArray.push(temp);
+                        if (temp.瀹℃牳浜� != "") {
+                            layer.msg("涓嬫帹澶辫触!鍗曟嵁鍙枫��" + temp.鍗曟嵁鍙� + "銆戝崟鎹姸鎬佷笉涓哄凡瀹℃牳鐘舵��!");
+                            return;
+                        }
+
+                        if (temp.鍏抽棴浜� != "") {
+                            layer.msg("涓嬫帹澶辫触!鍗曟嵁鍙枫��" + temp.鍗曟嵁鍙� + "銆戜笅閫変腑鐨勮褰曚腑瀛樺湪宸插叧闂姸鎬佺殑璁板綍!");
+                            return;
+                        }
+
+                     
+                    } else {
+                        return;
+                    }
+                }
+
+                form.val("component-form-group", { //formTest 鍗� class="layui-form" 鎵�鍦ㄥ厓绱犲睘鎬� lay-filter="" 瀵瑰簲鐨勫��
+                    "HDeptID": dataArray[0].HDeptID
+                    , "HDeptName": dataArray[0].閮ㄩ棬
+                    , "HEmpID": dataArray[0].HEmpID
+                    , "HEmpName": dataArray[0].涓氬姟鍛�
+                    , "HManagerID": dataArray[0].HManagerID
+                    , "HManagerName": dataArray[0].涓荤
+                    , "HMainSourceInterID": "0"
+                    , "HMainSourceEntryID": "0"
+                    , "HMainSourceBillNo": ""
+                    , "HMainSourceBillType": $("#BillType").val()
+                    , "HSupID": dataArray[0].HCusID
+                    , "HSupName": dataArray[0].瀹㈡埛
+                    , "HLinkMan": dataArray[0].鑱旂郴浜�
+                    , "HLinkPhone": dataArray[0].鑱旂郴鐢佃瘽
+                    , "HSellSID": "0"
+                    , "HSellSName": dataArray[0].閿�鍞柟寮�
+                    , "HCurID": dataArray[0].HCurID
+                    , "HCurName": dataArray[0].甯佸埆
+                    , "HExRate": dataArray[0].姹囩巼
+                    , "HProjectID": dataArray[0].HProjectID
+                    , "HProjectNumber": dataArray[0].椤圭洰缂栫爜
+                    , "HProjectName": dataArray[0].椤圭洰鍚嶇О
+                });
+
+                //瀛愯〃  璧嬪��
+                var rowdata = [];
+                for (var i = 0; i < dataArray.length; i++) {
+                    rowdata.push(
+                        {
+                            "HMaterID": dataArray[i].HMaterID
+                            , "鐗╂枡浠g爜": dataArray[i].鐗╂枡浠g爜
+                            , "鐗╂枡鍚嶇О": dataArray[i].鐗╂枡鍚嶇О
+                            , "瑙勬牸鍨嬪彿": dataArray[i].瑙勬牸鍨嬪彿
+                            , "HUnitID": dataArray[i].HUnitID
+                            , "璁¢噺鍗曚綅": dataArray[i].璁¢噺鍗曚綅
+                            , "HQtyMust": dealDoubleToFixed(dataArray[i].鏁伴噺, 1)
+                            , "HQty": dealDoubleToFixed(dataArray[i].鏁伴噺, 1)
+                            , "HPieceQty": "0"
+                            , "HPrice": dealDoubleToFixed(dataArray[i].鍗曚环, 3)
+                            , "HTaxPrice": "0"
+                            , "HTaxRate": dataArray[i].绋庣巼
+                            , "HMoney": dealDoubleToFixed(dataArray[i].閲戦, 2)
+                            , "HTaxMoney": "0"
+                            , "HWHID": $("#HWHID").val()
+                            , "鍙戣揣浠撳簱": $("#HWHName").val()
+                            , "HRemark": ""
+
+                            , "HQty_Full": "0"
+                            , "HQty_Empty": "0"
+                            , "HQty_Back": "0"
+                            , "HCostPrice": "0"
+                            , "HCostMoney": "0"
+                            , "HSalePrice": "0"
+
+                            , "HSeOrderInterID": dataArray[i].hmainid
+                            , "HSeOrderEntryID": dataArray[i].hsubid
+                            , "HSeOrderBillNo": dataArray[i].鍗曟嵁鍙�
+
+                            , "HSourceInterID": dataArray[i].hmainid
+                            , "HSourceEntryID": dataArray[i].hsubid
+                            , "HSourceBillNo": dataArray[i].鍗曟嵁鍙�
+                            , "HSourceBillType": dataArray[i].HBillType
+                            , "HRelationQty": "0"
+                            , "HRelationMoney": "0"
+
+                            , 'HSPID': "0"
+                            , 'HSPName': ""
+                            , 'HSPGroupID': "0"
+                            , "HSPGroupName": ""
+                            , 'HSCWHID': "0"
+                            , 'HSCWHName': ""
+                            , 'HSCSPID': "0"
+                            , 'HSCSPName': ""
+                            , 'HBatchNo': ""
+                            , 'HPOOrderInterID': "0"
+                            , 'HPOOrderEntryID': "0"
+                            , 'HPOOrderBillNo': ""
+
+                            , 'HPropertyID': "0"
+                            , 'HPropertyName': ""
+                            , 'HSecUnitID': "0"
+                            , 'HSecUnitName': ""
+                            , 'HSecUnitRate': "0"
+
+
+                            , 'HEngineNum': ""
+                            , 'HUnderPanNum': ""
+                            , 'HLeaveFactCard': ""
+                        }
+                    );
+                }
+                option.data = rowdata;
+                table.render(option);
+            }
+            //#endregion
+
             //#region 鍙嶅鏍�/瀹℃牳鏁版嵁
             function set_CheckBill(num) {
                 var InterID = $("#HInterID").val();
@@ -2814,6 +2970,33 @@
             }
             //#endregion
 
+            //#region 鏍规嵁涓诲唴鐮佷笌瀛愬唴鐮佽幏鍙栨簮鍗曞彂璐ч�氱煡鍗曟暟鎹�
+            function getPushSeOutStockBillInit(HSourceInterID, HSourceEntryID) {
+                var res = "none";
+                $.ajax({
+                    url: GetWEBURL() + "/Kf_SellOutBill/loadXs_SeOutStockBill_Push",
+                    async: false,
+                    type: "GET",
+                    data: {
+                        "HInterID": HSourceInterID
+                        , "HSubID": HSourceEntryID
+                    },
+                    success: function (result) {
+                        if (result.code == 1) { // 璇存槑楠岃瘉鎴愬姛浜嗭紝
+                            res = result.data[0];
+                        } else {
+                            res = result.data;
+                            //layer.alert(result.msg, { icon: 5, btn: ['閫�鍑�'], time: 100000, offset: 't' });
+                        }
+                    }, error: function () {
+                        res = "none";
+                        layer.alert("鍙戠敓閿欒!", { icon: 5 });
+                    }
+                });
+                return res;
+            }
+            //#endregion
+
             //#region 鑾峰彇閿�鍞嚭搴撳崟鍗曟嵁鐘舵��
             function getSourceBillStatus_SellOutBill() {
                 var HSourceBillData = "none";
diff --git "a/WebTM/views/\351\252\214\346\224\266\345\205\245\345\272\223/\344\272\247\345\223\201\345\205\245\345\272\223/Kf_ProductInBillEdit.html" "b/WebTM/views/\351\252\214\346\224\266\345\205\245\345\272\223/\344\272\247\345\223\201\345\205\245\345\272\223/Kf_ProductInBillEdit.html"
index 2315ea8..e67ab74 100644
--- "a/WebTM/views/\351\252\214\346\224\266\345\205\245\345\272\223/\344\272\247\345\223\201\345\205\245\345\272\223/Kf_ProductInBillEdit.html"
+++ "b/WebTM/views/\351\252\214\346\224\266\345\205\245\345\272\223/\344\272\247\345\223\201\345\205\245\345\272\223/Kf_ProductInBillEdit.html"
@@ -1715,7 +1715,7 @@
                 $.ajax({
                     type: "get",
                     async: false,
-                    data: { "HName": HName },
+                    data: { "HName": HName, "Num": 2 },       //0钃濆崟 1绾㈠崟 2涓嶅垎绾㈣摑鍗�
                     url: GetWEBURL() + "/Web/GetHSourceBillType",
                     success: function (result) {
                         var HSourceBillTypes = "";
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/Add_Edit_Kf_OtherInBill.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/Add_Edit_Kf_OtherInBill.html"
index c224e6f..7cf0130 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/Add_Edit_Kf_OtherInBill.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/Add_Edit_Kf_OtherInBill.html"
@@ -1408,7 +1408,7 @@
                 $.ajax({
                     type: "get",
                     async: false,
-                    data: { "HName": HName },
+                    data: { "HName": HName, "Num": 2 },       //0钃濆崟 1绾㈠崟 2涓嶅垎绾㈣摑鍗�
                     url: GetWEBURL() + "/Web/GetHSourceBillType",
                     success: function (result) {
                         var HSourceBillTypes = "";
diff --git "a/WebTM/views/\351\252\214\346\224\266\345\205\245\345\272\223/\345\244\226\350\264\255\345\205\245\345\272\223/Add_Edit_Kf_POStockInBillList.html" "b/WebTM/views/\351\252\214\346\224\266\345\205\245\345\272\223/\345\244\226\350\264\255\345\205\245\345\272\223/Add_Edit_Kf_POStockInBillList.html"
index 3fbe753..bd92cde 100644
--- "a/WebTM/views/\351\252\214\346\224\266\345\205\245\345\272\223/\345\244\226\350\264\255\345\205\245\345\272\223/Add_Edit_Kf_POStockInBillList.html"
+++ "b/WebTM/views/\351\252\214\346\224\266\345\205\245\345\272\223/\345\244\226\350\264\255\345\205\245\345\272\223/Add_Edit_Kf_POStockInBillList.html"
@@ -1928,7 +1928,7 @@
                 $.ajax({
                     type: "get",
                     async: false,
-                    data: { "HName": HName },
+                    data: { "HName": HName, "Num": 2 },       //0钃濆崟 1绾㈠崟 2涓嶅垎绾㈣摑鍗�
                     url: GetWEBURL() + "/Web/GetHSourceBillType",
                     success: function (result) {
                         var HSourceBillTypes = "";
diff --git "a/WebTM/views/\351\252\214\346\224\266\345\205\245\345\272\223/\345\244\226\350\264\255\345\205\245\345\272\223/Kf_POStockInBackBill_Add_Up.html" "b/WebTM/views/\351\252\214\346\224\266\345\205\245\345\272\223/\345\244\226\350\264\255\345\205\245\345\272\223/Kf_POStockInBackBill_Add_Up.html"
index de1656a..7b83378 100644
--- "a/WebTM/views/\351\252\214\346\224\266\345\205\245\345\272\223/\345\244\226\350\264\255\345\205\245\345\272\223/Kf_POStockInBackBill_Add_Up.html"
+++ "b/WebTM/views/\351\252\214\346\224\266\345\205\245\345\272\223/\345\244\226\350\264\255\345\205\245\345\272\223/Kf_POStockInBackBill_Add_Up.html"
@@ -1649,7 +1649,7 @@
                 $.ajax({
                     type: "get",
                     async: false,
-                    data: { "HName": HName },
+                    data: { "HName": HName, "Num": 2 },       //0钃濆崟 1绾㈠崟 2涓嶅垎绾㈣摑鍗�
                     url: GetWEBURL() + "/Web/GetHSourceBillType",
                     success: function (result) {
                         var HSourceBillTypes = "";

--
Gitblit v1.9.1