From cb2fc709d4e2aec6bbea3e6f4e8ccc24f3d27756 Mon Sep 17 00:00:00 2001
From: wtt <1985833171@qq.com>
Date: 星期日, 06 十月 2024 17:27:08 +0800
Subject: [PATCH] 工艺路线工价

---
 WebTM/views/销售管理/销售订单/Add_Edit_Xs_SeOrderBillList.html |  245 ++++++++++++++++++++++++++++++++++++++++--------
 1 files changed, 202 insertions(+), 43 deletions(-)

diff --git "a/WebTM/views/\351\224\200\345\224\256\347\256\241\347\220\206/\351\224\200\345\224\256\350\256\242\345\215\225/Add_Edit_Xs_SeOrderBillList.html" "b/WebTM/views/\351\224\200\345\224\256\347\256\241\347\220\206/\351\224\200\345\224\256\350\256\242\345\215\225/Add_Edit_Xs_SeOrderBillList.html"
index e8c1929..f8dbfd1 100644
--- "a/WebTM/views/\351\224\200\345\224\256\347\256\241\347\220\206/\351\224\200\345\224\256\350\256\242\345\215\225/Add_Edit_Xs_SeOrderBillList.html"
+++ "b/WebTM/views/\351\224\200\345\224\256\347\256\241\347\220\206/\351\224\200\345\224\256\350\256\242\345\215\225/Add_Edit_Xs_SeOrderBillList.html"
@@ -458,6 +458,8 @@
             //瀛愯〃娓叉煋鍙傛暟
             window.option = {};
 
+            var titleData = ["HMaterID", "HUnitID", "鎶樻墸鐜�", "瀹為檯鍚◣鍗曚环", "绋庨", "鏈綅甯佷环绋庡悎璁�", "鍑哄簱鏁伴噺", "寮�绁ㄦ暟閲�", "HOrderLevID", "璁㈠崟绛夌骇浠g爜", "閿�鍞嚭搴撴暟閲�", "閿�鍞嚭搴撳鏍告暟閲�", "閿�鍞嚭搴撳鏍搁噾棰�", "鐢熶骇鏁伴噺", "閿�鍞��搴撴暟閲�", "閿�鍞��搴撳鏍告暟閲�"];//涓嶉渶瑕佹樉绀虹殑瀛楁 鍙墿灞�
+
             //璁板綍缁勭粐鐨勫��
             var HOrgIDBar = 0;
 
@@ -478,7 +480,8 @@
 
 
             //#region 杩涘叆椤甸潰鍗冲姞杞�
-
+            //妫�娴嬫槸鍚﹀叿澶囨煡鐪嬮噾棰濇潈闄愶紝璁剧疆闅愯棌鍒�
+            checkRight_Money();
             //#region 鍒ゆ柇鏄惁鐧诲綍 鏈櫥褰曞垯璺冲埌鐧诲綍椤�
             get_LoginIs();
 
@@ -744,7 +747,10 @@
                 //鏁板�兼牸寮忔牎楠屽伐鍏�
                 var ref = /^\d+(\.\d+)?$/;          //闈炶礋鏁版鍒欒〃杈惧紡
                 var temp = "";
-
+                var Dec = getDecByMaterID(obj.data.HMaterID) //鑾峰彇绮惧害
+                var HQtyDec = (Dec["HQtyDec"] == null || Dec["HQtyDec"] == 0) ? 4 : Dec["HQtyDec"];  //鏁伴噺绮惧害
+                var HPriceDec = (Dec["HPriceDec"] == null || Dec["HPriceDec"] == 0) ? 4 : Dec["HPriceDec"];  //鍗曚环绮惧害
+                var HMoneyDec = (Dec["HMoneyDec"] == null || Dec["HMoneyDec"] == 0) ? 2 : Dec["HMoneyDec"];  //閲戦绮惧害
                 // 鍗曞厓鏍肩紪杈戜箣鍓嶇殑鍊�
                 var oldText = $(this).prev().text();
                 var value = obj.value //寰楀埌淇敼鍚庣殑鍊�
@@ -783,13 +789,12 @@
                         var HTaxMoney = HMoney * HTaxRate;              //绋庨=閲戦*绋庣巼
                         var HlineTotal = HMoney + HTaxMoney;            //浠风◣鍚堣=閲戦+绋庨
 
-                        //璁剧疆鏁版嵁灏忔暟浣嶆暟
-                        HQty = dealDoubleToFixed(HQty, 1);
-                        HPrice = dealDoubleToFixed(HPrice, 3);
-                        HTaxRate = HTaxRate;
-                        HTaxPrice = dealDoubleToFixed(HTaxPrice, 3);
-                        HMoney = dealDoubleToFixed(HMoney, 2);
-                        HlineTotal = dealDoubleToFixed(HlineTotal, 2);
+                        //鏁板瓧绮惧害
+                        HQty = Number(HQty.toFixed(HQtyDec));
+                        HPrice = Number(HPrice.toFixed(HPriceDec));
+                        HMoney = Number(HMoney.toFixed(HMoneyDec));
+                        HlineTotal = Number(HlineTotal.toFixed(HMoneyDec));
+                        HTaxPrice = Number(HPrice.toFixed(HPriceDec));
 
                         //鍚屾鏇存柊琛ㄦ牸鍜岀紦瀛樺搴旂殑鍊�
                         obj.update({
@@ -800,7 +805,7 @@
                             , HMoney: HMoney
                             , HlineTotal: HlineTotal
                         });
-                        //table.render(option);
+                        table.render(option);
 
                         //鍒锋柊琛ㄦ牸鍚屾椂鏍规嵁option涓璈isStockGoods鍊艰缃笅鎷夊垪琛�
                         setSelectHisStockGoodsByTableRender();
@@ -867,13 +872,12 @@
                         var HTaxMoney = HMoney * HTaxRate;              //绋庨=閲戦*绋庣巼
                         var HlineTotal = HMoney + HTaxMoney;            //浠风◣鍚堣=閲戦+绋庨
 
-                        //璁剧疆鏁版嵁灏忔暟浣嶆暟
-                        HQty = dealDoubleToFixed(HQty, 1);
-                        HPrice = dealDoubleToFixed(HPrice, 3);
-                        HTaxRate = HTaxRate;
-                        HTaxPrice = dealDoubleToFixed(HTaxPrice, 3);
-                        HMoney = dealDoubleToFixed(HMoney, 2);
-                        HlineTotal = dealDoubleToFixed(HlineTotal, 2);
+                        //鏁板瓧绮惧害
+                        HQty = Number(HQty.toFixed(HQtyDec));
+                        HPrice = Number(HPrice.toFixed(HPriceDec));
+                        HMoney = Number(HMoney.toFixed(HMoneyDec));
+                        HlineTotal = Number(HlineTotal.toFixed(HMoneyDec));
+                        HTaxPrice = Number(HTaxPrice.toFixed(HPriceDec));
 
                         //鍚屾鏇存柊琛ㄦ牸鍜岀紦瀛樺搴旂殑鍊�
                         obj.update({
@@ -884,7 +888,7 @@
                             , HMoney: HMoney
                             , HlineTotal: HlineTotal
                         });
-                        //table.render(option);
+                        table.render(option);
 
                         //鍒锋柊琛ㄦ牸鍚屾椂鏍规嵁option涓璈isStockGoods鍊艰缃笅鎷夊垪琛�
                         setSelectHisStockGoodsByTableRender();
@@ -922,13 +926,12 @@
                         var HTaxMoney = HMoney * HTaxRate;              //绋庨=閲戦*绋庣巼
                         var HlineTotal = HMoney + HTaxMoney;            //浠风◣鍚堣=閲戦+绋庨
 
-                        //璁剧疆鏁版嵁灏忔暟浣嶆暟
-                        HQty = dealDoubleToFixed(HQty, 1);
-                        HPrice = dealDoubleToFixed(HPrice, 3);
-                        HTaxRate = HTaxRate;
-                        HTaxPrice = dealDoubleToFixed(HTaxPrice, 3);
-                        HMoney = dealDoubleToFixed(HMoney, 2);
-                        HlineTotal = dealDoubleToFixed(HlineTotal, 2);
+                        //鏁板瓧绮惧害
+                        HQty = Number(HQty.toFixed(HQtyDec));
+                        HPrice = Number(HPrice.toFixed(HPriceDec));
+                        HMoney = Number(HMoney.toFixed(HMoneyDec));
+                        HlineTotal = Number(HlineTotal.toFixed(HMoneyDec));
+                        HTaxPrice = Number(HTaxPrice.toFixed(HPriceDec));
 
                         //鍚屾鏇存柊琛ㄦ牸鍜岀紦瀛樺搴旂殑鍊�
                         obj.update({
@@ -939,7 +942,7 @@
                             , HMoney: HMoney
                             , HlineTotal: HlineTotal
                         });
-                        //table.render(option);
+                        table.render(option);
 
                         //鍒锋柊琛ㄦ牸鍚屾椂鏍规嵁option涓璈isStockGoods鍊艰缃笅鎷夊垪琛�
                         setSelectHisStockGoodsByTableRender();
@@ -1007,13 +1010,12 @@
                         var HTaxMoney = HMoney * HTaxRate;              //绋庨=閲戦*绋庣巼
                         var HlineTotal = HMoney + HTaxMoney;            //浠风◣鍚堣=閲戦+绋庨
 
-                        //璁剧疆鏁版嵁灏忔暟浣嶆暟
-                        HQty = dealDoubleToFixed(HQty, 1);
-                        HPrice = dealDoubleToFixed(HPrice, 3);
-                        HTaxRate = HTaxRate;
-                        HTaxPrice = dealDoubleToFixed(HTaxPrice, 3);
-                        HMoney = dealDoubleToFixed(HMoney, 2);
-                        HlineTotal = dealDoubleToFixed(HlineTotal, 2);
+                        //鏁板瓧绮惧害
+                        HQty = Number(HQty.toFixed(HQtyDec));
+                        HPrice = Number(HPrice.toFixed(HPriceDec));
+                        HMoney = Number(HMoney.toFixed(HMoneyDec));
+                        HlineTotal = Number(HlineTotal.toFixed(HMoneyDec));
+                        HTaxPrice = Number(HTaxPrice.toFixed(HPriceDec));
 
                         //鍚屾鏇存柊琛ㄦ牸鍜岀紦瀛樺搴旂殑鍊�
                         obj.update({
@@ -1024,7 +1026,7 @@
                             , HMoney: HMoney
                             , HlineTotal: HlineTotal
                         });
-                        //table.render(option);
+                        table.render(option);
 
                         //鍒锋柊琛ㄦ牸鍚屾椂鏍规嵁option涓璈isStockGoods鍊艰缃笅鎷夊垪琛�
                         setSelectHisStockGoodsByTableRender();
@@ -1448,7 +1450,7 @@
                                         "浠撳簱": result.data[i]["瀛愪粨搴�"],
                                         "HQty": dealDoubleToFixed(result.data[i]["鏁伴噺"], 1),
                                         "HPrice": dealDoubleToFixed(result.data[i]["鍗曚环"], 3),
-                                        "HTaxPrice": dealDoubleToFixed(result.data[i]["HTaxPrice"], 3),
+                                        "HTaxPrice": dealDoubleToFixed(result.data[i]["鍚◣鍗曚环"], 3),
                                         "HMoney": dealDoubleToFixed(result.data[i]["閲戦"],2),
                                         "HDiscountRate": result.data[i]["鎶樻墸鐜�"],
                                         "HRelTaxPrice": result.data[i]["瀹為檯鍚◣鍗曚环"],
@@ -1864,6 +1866,11 @@
                     success: function (data) {
                         if (data.count == 1) { // 璇存槑楠岃瘉鎴愬姛浜嗭紝
                             layer.msg(data.Message, { icon: 1 });
+                            if (data.Verify == "Y") //鑷姩瀹℃牳
+                            {
+                                $("#HInterID").val(data.HInterID);//鑾峰彇鎻愪氦鎴愬姛杩斿洖鐨勫崟鎹富ID
+                                set_CheckBill(0); //瀹℃牳
+                            }
                             $('#add-btn').addClass("layui-btn-disabled").attr("disabled", true);
                             layer.close(index);
                         }
@@ -2575,13 +2582,17 @@
                                     var checkStatus = iframeWindow.layui.table.checkStatus("mainTable");//鑾峰彇閫変腑鐨勬暟鎹�
 
                                     var rowIndex = $(obj.tr).attr("data-index") * 1;
+                                    var Dec = getDecByMaterID(obj.data.HMaterID) //鑾峰彇绮惧害
+                                    var HQtyDec = (Dec["HQtyDec"] == null || Dec["HQtyDec"] == 0) ? 4 : Dec["HQtyDec"];  //鏁伴噺绮惧害
+                                    var HPriceDec = (Dec["HPriceDec"] == null || Dec["HPriceDec"] == 0) ? 4 : Dec["HPriceDec"];  //鍗曚环绮惧害
+                                    var HMoneyDec = (Dec["HMoneyDec"] == null || Dec["HMoneyDec"] == 0) ? 2 : Dec["HMoneyDec"];  //閲戦绮惧害
                                     for (var i = 0; i < checkStatus.data.length; i++) {
                                         if (rowIndex + i >= option.data.length) {
                                             var NewRow = {
                                                 "HMaterID": "0", "鐗╂枡浠g爜": "", "鐗╂枡鍚嶇О": "", "瑙勬牸鍨嬪彿": "", "HUnitID": "0", "璁¢噺鍗曚綅": "", "HQty": "0", "HPrice": "0", "HTaxPrice": "0"
                                                 , "HMoney": "0", "HDiscountRate": "0", "HRelTaxPrice": "0", "HTaxRate": "0", "HTaxMoney": "0", "HlineTotal": "0", "HlineTotalBB": "0"
                                                 , "HDate": Format(new Date(), 'yyyy-MM-dd'), "HOutStockQty": "0", "HInvoiceQty": "0", "HRemark": "", "HCusMaterNumber": "",
-                                                "HCusModel": "","HCusMaterName": ""
+                                                "HCusModel": "", "HCusMaterName": ""
                                             }
                                             btnAddLine(NewRow);
                                         }
@@ -2604,8 +2615,8 @@
                                         }
 
                                         //鏁版嵁鏍¢獙鍚堟牸锛岄噸绠楄褰�
-                                        var HQty = option.data[rowIndex + i].HQty;                  //鏁伴噺
-                                        var HPrice = option.data[rowIndex + i].HPrice;              //鍗曚环
+                                        var HQty = option.data[rowIndex + i].HQty * 1;                  //鏁伴噺
+                                        var HPrice = option.data[rowIndex + i].HPrice * 1;              //鍗曚环
                                         var HTaxRate = value * 0.01;                                //绋庣巼
                                         /*var HDiscountRate = obj.data.HDiscountRate * 1;           //鎶樻墸鐜�*/
                                         var HTaxPrice = HPrice * (1 + HTaxRate);                    //鍚◣鍗曚环=鍗曚环*(1+绋庣巼)
@@ -2614,7 +2625,13 @@
                                         var HMoney = HQty * HPrice;                                 //閲戦=鏁伴噺*鍗曚环
                                         var HTaxMoney = HMoney * HTaxRate;                          //绋庨=閲戦*绋庣巼
                                         var HlineTotal = HMoney + HTaxMoney;                        //浠风◣鍚堣=閲戦+绋庨
-
+                                        //鏁板瓧绮惧害
+                                        HQty = Number(HQty.toFixed(HQtyDec));
+                                        HPrice = Number(HPrice.toFixed(HPriceDec));
+                                        HMoney = Number(HMoney.toFixed(HMoneyDec));
+                                        HTaxMoney = Number(HTaxMoney.toFixed(HMoneyDec));
+                                        HlineTotal = Number(HlineTotal.toFixed(HMoneyDec));
+                                        HTaxPrice = Number(HTaxPrice.toFixed(HPriceDec));
 
                                         option.data[rowIndex + i].HMaterID = resultData.HItemID;
                                         option.data[rowIndex + i].鐗╂枡浠g爜 = resultData.鐗╂枡浠g爜;
@@ -2644,6 +2661,42 @@
                                 }
                                 , end: function () {
                                     if (typeof (HDataEmp.HItemID) != "undefined") {
+                                        var value = subHTaxRate;
+                                        //鏁板�兼牸寮忔牎楠屽伐鍏�
+                                        var ref = /^\d+(\.\d+)?$/;
+                                        //绋庣巼鏁版嵁鏍煎紡鏍¢獙锛岃嫢鏍规嵁瀹㈡埛鑾峰彇鐨勭◣鐜囦笉鍚堟硶锛屽垯浣跨敤璁板綍涓師鏈夌殑绋庣巼锛屽苟鎻愮ず
+                                        temp = value + "";
+                                        if (ref.test(temp)) {
+                                            var Dec = getDecByMaterID(obj.data.HMaterID) //鑾峰彇绮惧害
+                                            var HQtyDec = (Dec["HQtyDec"] == null || Dec["HQtyDec"] == 0) ? 4 : Dec["HQtyDec"];  //鏁伴噺绮惧害
+                                            var HPriceDec = (Dec["HPriceDec"] == null || Dec["HPriceDec"] == 0) ? 4 : Dec["HPriceDec"];  //鍗曚环绮惧害
+                                            var HMoneyDec = (Dec["HMoneyDec"] == null || Dec["HMoneyDec"] == 0) ? 2 : Dec["HMoneyDec"];  //閲戦绮惧害
+                                            //鏁版嵁鏍¢獙鍚堟牸锛岄噸绠楄褰�
+                                            var HQty = obj.data.HQty * 1;                           //鏁伴噺
+                                            var HPrice = obj.data.HPrice * 1;               //鍗曚环
+                                            var HTaxRate = value * 0.01;           //绋庣巼
+                                            var HTaxPrice = HPrice * (1 + HTaxRate);        //鍚◣鍗曚环=鍗曚环*(1+绋庣巼)
+                                            var HMoney = HQty * HPrice;                     //閲戦=鏁伴噺*鍗曚环
+                                            var HTaxMoney = HMoney * HTaxRate;              //绋庨=閲戦*绋庣巼
+                                            var HlineTotal = HMoney + HTaxMoney;            //浠风◣鍚堣=閲戦+绋庨
+
+                                            //鏁板瓧绮惧害
+                                            HQty = Number(HQty.toFixed(HQtyDec));
+                                            HPrice = Number(HPrice.toFixed(HPriceDec));
+                                            HMoney = Number(HMoney.toFixed(HMoneyDec));
+                                            HlineTotal = Number(HlineTotal.toFixed(HMoneyDec));
+                                            HTaxPrice = Number(HPrice.toFixed(HPriceDec));
+
+                                            //鍚屾鏇存柊琛ㄦ牸鍜岀紦瀛樺搴旂殑鍊�
+                                            obj.update({
+                                                HQty: HQty
+                                                , HPrice: HPrice
+                                                , HTaxRate: HTaxRate * 100
+                                                , HTaxPrice: HTaxPrice
+                                                , HMoney: HMoney
+                                                , HlineTotal: HlineTotal
+                                            });
+                                        }
                                         //鏇存柊琛ㄦ牸缂撳瓨鐨勬暟鎹�
                                         obj.update({
                                             "HMaterID": HDataEmp.HItemID
@@ -3166,6 +3219,10 @@
                             var checkStatus = iframeWindow.layui.table.checkStatus("mainTable");//鑾峰彇閫変腑鐨勬暟鎹�
 
                             var rowIndex = $(obj.tr).attr("data-index") * 1;
+                            var Dec = getDecByMaterID(obj.data.HMaterID) //鑾峰彇绮惧害
+                            var HQtyDec = (Dec["HQtyDec"] == null || Dec["HQtyDec"] == 0) ? 4 : Dec["HQtyDec"];  //鏁伴噺绮惧害
+                            var HPriceDec = (Dec["HPriceDec"] == null || Dec["HPriceDec"] == 0) ? 4 : Dec["HPriceDec"];  //鍗曚环绮惧害
+                            var HMoneyDec = (Dec["HMoneyDec"] == null || Dec["HMoneyDec"] == 0) ? 2 : Dec["HMoneyDec"];  //閲戦绮惧害
                             for (var i = 0; i < checkStatus.data.length; i++) {
                                 if (rowIndex + i >= option.data.length) {
                                     var NewRow = {
@@ -3195,8 +3252,8 @@
                                 }
 
                                 //鏁版嵁鏍¢獙鍚堟牸锛岄噸绠楄褰�
-                                var HQty = option.data[rowIndex + i].HQty;                  //鏁伴噺
-                                var HPrice = option.data[rowIndex + i].HPrice;              //鍗曚环
+                                var HQty = option.data[rowIndex + i].HQty * 1;                  //鏁伴噺
+                                var HPrice = option.data[rowIndex + i].HPrice * 1;              //鍗曚环
                                 var HTaxRate = value * 0.01;                                //绋庣巼
                                 /*var HDiscountRate = obj.data.HDiscountRate * 1;           //鎶樻墸鐜�*/
                                 var HTaxPrice = HPrice * (1 + HTaxRate);                    //鍚◣鍗曚环=鍗曚环*(1+绋庣巼)
@@ -3205,7 +3262,13 @@
                                 var HMoney = HQty * HPrice;                                 //閲戦=鏁伴噺*鍗曚环
                                 var HTaxMoney = HMoney * HTaxRate;                          //绋庨=閲戦*绋庣巼
                                 var HlineTotal = HMoney + HTaxMoney;                        //浠风◣鍚堣=閲戦+绋庨
-
+                                //鏁板瓧绮惧害
+                                HQty = Number(HQty.toFixed(HQtyDec));
+                                HPrice = Number(HPrice.toFixed(HPriceDec));
+                                HMoney = Number(HMoney.toFixed(HMoneyDec));
+                                HTaxMoney = Number(HTaxMoney.toFixed(HMoneyDec));
+                                HlineTotal = Number(HlineTotal.toFixed(HMoneyDec));
+                                HTaxPrice = Number(HTaxPrice.toFixed(HPriceDec));
 
                                 option.data[rowIndex + i].HMaterID = resultData.HItemID;
                                 option.data[rowIndex + i].鐗╂枡浠g爜 = resultData.鐗╂枡浠g爜;
@@ -3235,6 +3298,42 @@
                         }
                         , end: function () {
                             if (typeof (HDataEmp.HItemID) != "undefined") {
+                                var value = subHTaxRate;
+                                //鏁板�兼牸寮忔牎楠屽伐鍏�
+                                var ref = /^\d+(\.\d+)?$/;
+                                //绋庣巼鏁版嵁鏍煎紡鏍¢獙锛岃嫢鏍规嵁瀹㈡埛鑾峰彇鐨勭◣鐜囦笉鍚堟硶锛屽垯浣跨敤璁板綍涓師鏈夌殑绋庣巼锛屽苟鎻愮ず
+                                temp = value + "";
+                                if (ref.test(temp)) {
+                                    var Dec = getDecByMaterID(obj.data.HMaterID) //鑾峰彇绮惧害
+                                    var HQtyDec = (Dec["HQtyDec"] == null || Dec["HQtyDec"] == 0) ? 4 : Dec["HQtyDec"];  //鏁伴噺绮惧害
+                                    var HPriceDec = (Dec["HPriceDec"] == null || Dec["HPriceDec"] == 0) ? 4 : Dec["HPriceDec"];  //鍗曚环绮惧害
+                                    var HMoneyDec = (Dec["HMoneyDec"] == null || Dec["HMoneyDec"] == 0) ? 2 : Dec["HMoneyDec"];  //閲戦绮惧害
+                                    //鏁版嵁鏍¢獙鍚堟牸锛岄噸绠楄褰�
+                                    var HQty = obj.data.HQty * 1;                           //鏁伴噺
+                                    var HPrice = obj.data.HPrice * 1;               //鍗曚环
+                                    var HTaxRate = value * 0.01;           //绋庣巼
+                                    var HTaxPrice = HPrice * (1 + HTaxRate);        //鍚◣鍗曚环=鍗曚环*(1+绋庣巼)
+                                    var HMoney = HQty * HPrice;                     //閲戦=鏁伴噺*鍗曚环
+                                    var HTaxMoney = HMoney * HTaxRate;              //绋庨=閲戦*绋庣巼
+                                    var HlineTotal = HMoney + HTaxMoney;            //浠风◣鍚堣=閲戦+绋庨
+
+                                    //鏁板瓧绮惧害
+                                    HQty = Number(HQty.toFixed(HQtyDec));
+                                    HPrice = Number(HPrice.toFixed(HPriceDec));
+                                    HMoney = Number(HMoney.toFixed(HMoneyDec));
+                                    HlineTotal = Number(HlineTotal.toFixed(HMoneyDec));
+                                    HTaxPrice = Number(HPrice.toFixed(HPriceDec));
+
+                                    //鍚屾鏇存柊琛ㄦ牸鍜岀紦瀛樺搴旂殑鍊�
+                                    obj.update({
+                                        HQty: HQty
+                                        , HPrice: HPrice
+                                        , HTaxRate: HTaxRate * 100
+                                        , HTaxPrice: HTaxPrice
+                                        , HMoney: HMoney
+                                        , HlineTotal: HlineTotal
+                                    });
+                                }
                                 //鏇存柊琛ㄦ牸缂撳瓨鐨勬暟鎹�
                                 obj.update({
                                     "HMaterID": HDataEmp.HItemID
@@ -3342,13 +3441,14 @@
             function DisPlay_HideColumn() {
                 $.ajax({
                     url: GetWEBURL() + '/Xt_grdAlignment_WMES/grdAlignmentWMESList',
+                    async: false,
                     type: "GET",
                     data: { "HModName": HModName, "user": sessionStorage["HUserName"] },
                     async: false,
                     success: function (data1) {
                         if (data1.data.length != 0) {
                             var dataCol = [];//鏁版嵁搴撴煡璇㈠嚭鐨勫垪鏁版嵁
-                            var titleData = ["HMaterID", "HUnitID", "鎶樻墸鐜�", "瀹為檯鍚◣鍗曚环", "绋庨", "鏈綅甯佷环绋庡悎璁�", "鍑哄簱鏁伴噺", "寮�绁ㄦ暟閲�", "HOrderLevID","璁㈠崟绛夌骇浠g爜","閿�鍞嚭搴撴暟閲�","閿�鍞嚭搴撳鏍告暟閲�","閿�鍞嚭搴撳鏍搁噾棰�","鐢熶骇鏁伴噺","閿�鍞��搴撴暟閲�","閿�鍞��搴撳鏍告暟閲�"];//涓嶉渶瑕佹樉绀虹殑瀛楁 鍙墿灞�
+                            /*var titleData = ["HMaterID", "HUnitID", "鎶樻墸鐜�", "瀹為檯鍚◣鍗曚环", "绋庨", "鏈綅甯佷环绋庡悎璁�", "鍑哄簱鏁伴噺", "寮�绁ㄦ暟閲�", "HOrderLevID","璁㈠崟绛夌骇浠g爜","閿�鍞嚭搴撴暟閲�","閿�鍞嚭搴撳鏍告暟閲�","閿�鍞嚭搴撳鏍搁噾棰�","鐢熶骇鏁伴噺","閿�鍞��搴撴暟閲�","閿�鍞��搴撳鏍告暟閲�"];//涓嶉渶瑕佹樉绀虹殑瀛楁 鍙墿灞�*/
                             //titleData = [];
 
                             dataCol = data1.data[0].HGridString.split(',');
@@ -3379,6 +3479,10 @@
                                 if (dataCols[1] == 0 && $.inArray(option.cols[0][i + 1]["title"], titleData) == -1) {
                                     option.cols[0][i + 1]["hide"] = false;
                                 }
+                                if ($.inArray(option.cols[0][i + 1]["title"], titleData) > -1) {
+                                    option.cols[0][i + 1]["hide"] = true;
+                                }
+
                                 //瀛椾綋鎵�鍦ㄤ綅缃�(宸� 灞呬腑 鍙�)
                                 switch (dataCols[2]) {
                                     case "L":
@@ -3390,6 +3494,11 @@
                                     case "R":
                                         option.cols[0][i + 1]["align"] = "right";
                                         break;
+                                }
+
+                                //璁剧疆琛ㄦ牸title灞炴�ф樉绀哄埆鍚�
+                                if (dataCols[4] != null && dataCols[4] != "") {
+                                    option.cols[0][i + 1]["title"] = dataCols[4];
                                 }
                             }
 
@@ -3650,6 +3759,32 @@
             }
             //#endregion
 
+            //#region 鏍规嵁鐗╂枡ID鑾峰彇绮惧害
+            function getDecByMaterID(HMaterID) {
+                var resultData = {};
+                $.ajax({  // 寮傛璇锋眰
+                    url: GetWEBURL() + "Gy_Material/getDecByID",  //璇锋眰鍦板潃
+                    async: false,   //鏄惁寮�鍚紓姝�
+                    type: "GET",   //璇锋眰绫诲瀷
+                    data: {   //瀹氫箟鍙戦�佸埌鏈嶅姟鍣ㄧ殑鏁版嵁
+                        "HMaterID": HMaterID     //  灏唄materid浣滀负璇锋眰鍙傛暟鍙戦��
+                    },
+                    success: function (result) {   // 褰撹姹傛垚鍔熸椂锛屾墽琛岃繖涓嚱鏁�
+                        if (result.code == 1) { // 濡傛灉鏈嶅姟鍣ㄨ繑鍥炵殑鏁版嵁涓殑`code瀛楁绛変簬1锛岃繖鍙兘琛ㄧず瀹℃牳鎿嶄綔鎴愬姛鎵ц
+                            var data = result.data; //澹版槑data鍙橀噺锛屽苟灏嗗叾璧嬪�间负result瀵硅薄涓殑data灞炴��
+                            resultData = data[0];   //灏哾ata鏁扮粍锛堟垨绫绘暟缁勫璞★級鐨勭涓�涓厓绱犺祴鍊肩粰鍙橀噺resultData
+                        }
+                        //else {
+                        //    layer.alert(result.Message, { icon: 5, btn: ['閫�鍑�'], time: 100000, offset: 't' }); //result.msg瀵硅薄锛屾彁绀哄脊绐� 绫诲瀷涓�5锛� 鎸夐挳锛屽拰鎸夐挳鐨勫悕绉颁负閫�鍑�  鏃堕棿 涓�100绉掞紝浠ュ強鍋忕Щ閲忥紙`offset: 't'
+                        //}
+                    }, error: function () {
+                        layer.alert("鍙戠敓閿欒!", { icon: 5 });  //鎻愮ず寮圭獥 鍙戠敓閿欒 锛岃绀烘爣蹇椾负5鐨�
+                    }
+                });
+                return resultData;
+            }
+            //#endregion
+
             //#region 鍒锋柊琛ㄦ牸鍚屾椂鏍规嵁option涓璈isStockGoods鍊艰缃笅鎷夊垪琛�
             function setSelectHisStockGoodsByTableRender() {
                 for (var i = 1; i <= option.data.length; i++) {
@@ -3658,6 +3793,30 @@
                 form.render('select');
             }
             //#endregion
+
+            //#region 鏌ョ湅鏄惁鍏峰鏌ョ湅閲戦鏉冮檺锛岃缃噾棰濈瓑瀛楁鏄惁闇�瑕侀殣钘�
+            function checkRight_Money() {
+                $.ajax({
+                    type: "GET",
+                    async: false,
+                    url: GetWEBURL() + "/Xs_SeOrderBill/CheckRight_Money", //鏂规硶鎵�鍦ㄩ〉闈㈠拰鏂规硶鍚�
+                    data: { "user": sessionStorage["HUserName"] },
+                    success: function (result) {
+                        if (result.count == 1) {
+
+                        } else {
+                            var HideColumnList = ["鍓╀綑璁㈤噾", "鍗曚环", "绋庣巼%", "鍚◣鍗曚环", "閲戦", "浠风◣鍚堣"];
+                            for (var i = 0; i < HideColumnList.length; i++) {
+                                titleData.push(HideColumnList[i]);
+                            }
+                        }
+                    }, error: function (err) {
+                        layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
+                    }
+                });
+            }
+            //#endregion
+
             //#endregion
 
 

--
Gitblit v1.9.1