1
pzy
2024-08-13 4f4a5a073bed3688ddead42557829fc8610db86b
WebTM/views/²É¹º¹ÜÀí/²É¹º¶©µ¥/Cg_POOrderBillEdit.html
@@ -650,16 +650,22 @@
                        var HPrice = obj.data.HPrice * 1;               //单价
                        var HMoney = HQty * HPrice;                     //金额=数量*单价
                        var HTaxRate = obj.data.HTaxRate * 0.01;           //税率 
                        var HTaxMoney = Number((HMoney * HTaxRate).toFixed(4));         //税额=金额*税率
                        var HTaxMoney = Number((HMoney * HTaxRate));         //税额=金额*税率
                        var HlineTotal = HMoney + HTaxMoney;            //价税合计=金额+税额
                        var HExRate = $("#HExRate").val();                      //汇率
                        var HlineTotalBB = Number(((HMoney + HTaxMoney) * HExRate).toFixed(4));      //本位币价税合计=(税额+金额)*汇率
                        var HlineTotalBB = Number(((HMoney + HTaxMoney) * HExRate));      //本位币价税合计=(税额+金额)*汇率
                        //数字精度
                        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));
                        HlineTotalBB = Number(HlineTotalBB.toFixed(HMoneyDec));
                        //同步更新表格和缓存对应的值
                        obj.update({     //更新表格数据                æ–¹æ³•是该对象提供的一个方法,用于更新其内部状态或与之关联的数据源
                            HQty: Number(HQty.toFixed(HQtyDec))                            //更新HQty字段,其值来自变量HQty
                            , HPrice: Number(HPrice.toFixed(HPriceDec))                             //更新HPrice字段,其值来自变量HPrice
                            , HMoney: Number(HMoney.toFixed(HMoneyDec))                         //更新HMoney字段,其值来自变量HMoney
                            HQty: HQty                 //更新HQty字段,其值来自变量HQty
                            , HPrice: HPrice                           //更新HPrice字段,其值来自变量HPrice
                            , HMoney: HMoney                       //更新HMoney字段,其值来自变量HMoney
                            , HTaxMoney: HTaxMoney                       //更新HTaxMoney字段,HTaxMoney
                            , HlineTotal: HlineTotal                         //更新HlineTotal字段,其值来自变量HlineTotal
                            , HlineTotalBB: HlineTotalBB                     //更新HlineTotalBB字段,其值来自变量HlineTotalBB
@@ -685,19 +691,27 @@
                        var HPrice = value * 1;
                        var HMoney = HQty * HPrice;                     //金额=数量*单价
                        var HTaxRate = obj.data.HTaxRate * 0.01;           //税率 
                        var HTaxMoney = Number((HMoney * HTaxRate).toFixed(4));         //税额=金额*税率
                        var HTaxMoney = Number((HMoney * HTaxRate));         //税额=金额*税率
                        var HlineTotal = HMoney + HTaxMoney;            //价税合计=金额+税额
                        var HTaxPrice = Number((HPrice * (1 + HTaxRate)).toFixed(HPriceDec));        //含税单价=单价*(1+税率)
                        var HTaxPrice = Number((HPrice * (1 + HTaxRate)));        //含税单价=单价*(1+税率)
                        var HDiscountRate = obj.data.HDiscountRate * 1;   //折扣率
                        var HRelTaxPrice = Number((HTaxPrice * HDiscountRate).toFixed(HPriceDec));   //实际含税单价=含税单价*折扣率
                        var HRelTaxPrice = Number((HTaxPrice * HDiscountRate));   //实际含税单价=含税单价*折扣率
                        var HExRate = $("#HExRate").val();                      //汇率
                        var HlineTotalBB = Number(((HMoney + HTaxMoney) * HExRate).toFixed(4));     //本位币价税合计=(税额+金额)*汇率
                        var HlineTotalBB = Number(((HMoney + HTaxMoney) * HExRate));     //本位币价税合计=(税额+金额)*汇率
                        //数字精度
                        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));
                        HRelTaxPrice = Number(HRelTaxPrice.toFixed(HPriceDec));
                        HlineTotalBB = Number(HlineTotalBB.toFixed(HMoneyDec));
                        //同步更新表格和缓存对应的值
                        obj.update({                    //更新表格数据                æ–¹æ³•是该对象提供的一个方法,用于更新其内部状态或与之关联的数据源
                            HQty: Number(HQty.toFixed(HQtyDec))                                //更新HQty字段,HQty
                            , HPrice: Number(HPrice.toFixed(HPriceDec))                       //更新HPrice字段,HPrice
                            , HMoney: Number(HMoney.toFixed(HMoneyDec))                      //更新HMoney字段,HMoney
                            HQty: HQty                          //更新HQty字段,HQty
                            , HPrice: HPrice                     //更新HPrice字段,HPrice
                            , HMoney: HMoney                      //更新HMoney字段,HMoney
                            , HTaxMoney: HTaxMoney                  //更新HTaxMoney字段,HTaxMoney
                            , HlineTotal: HlineTotal             //更新HlineTotal字段,HlineTotal
                            , HTaxPrice, HTaxPrice                   //更新HTaxPrice字段,HTaxPrice
@@ -725,20 +739,28 @@
                        var HQty = obj.data.HQty * 1;                   //数量
                        var HPrice = obj.data.HPrice * 1;                   //单价
                        var HMoney = HQty * HPrice;                     //金额=数量*单价
                        var HTaxMoney = Number((HMoney * HTaxRate).toFixed(4));         //税额=金额*税率
                        var HTaxPrice = Number((HPrice * (1 + HTaxRate)).toFixed(HPriceDec));        //含税单价=单价*(1+税率)
                        var HTaxMoney = Number((HMoney * HTaxRate));         //税额=金额*税率
                        var HTaxPrice = Number((HPrice * (1 + HTaxRate)));        //含税单价=单价*(1+税率)
                        var HlineTotal = HMoney + HTaxMoney;            //价税合计=金额+税额
                        var HDiscountRate = obj.data.HDiscountRate * 1;   //折扣率
                        var HRelTaxPrice = Number((HTaxPrice * HDiscountRate).toFixed(HPriceDec));   //实际含税单价=含税单价*折扣率
                        var HRelTaxPrice = Number((HTaxPrice * HDiscountRate));   //实际含税单价=含税单价*折扣率
                        var HExRate = $("#HExRate").val();                       //汇率
                        var HlineTotalBB = Number(((HMoney + HTaxMoney) * HExRate).toFixed(4));       //本位币价税合计=(税额+金额)*汇率
                        var HlineTotalBB = Number(((HMoney + HTaxMoney) * HExRate));       //本位币价税合计=(税额+金额)*汇率
                        //数字精度
                        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));
                        HRelTaxPrice = Number(HRelTaxPrice.toFixed(HPriceDec));
                        HlineTotalBB = Number(HlineTotalBB.toFixed(HMoneyDec));
                        //同步更新表格和缓存对应的值
                        obj.update({   //更新表格数据
                            HTaxRate: HTaxRate * 100
                            , HQty: Number(HQty.toFixed(HQtyDec))
                            , HPrice: Number(HPrice.toFixed(HPriceDec))
                            , HMoney: Number(HMoney.toFixed(HMoneyDec))
                            , HQty: HQty
                            , HPrice: HPrice
                            , HMoney: HMoney
                            , HTaxMoney: HTaxMoney
                            , HTaxPrice: HTaxPrice
                            , HlineTotal: HlineTotal
@@ -767,25 +789,30 @@
                        var HQty = obj.data.HQty * 1;                   //数量
                        var HPrice = obj.data.HPrice * 1;
                        var HMoney = HQty * HPrice;                     //金额=数量*单价
                        var HTaxMoney = Number((HMoney * HTaxRate).toFixed(4));         //税额=金额*税率
                        var HTaxPrice = Number((HPrice * (1 + HTaxRate)).toFixed(HPriceDec));        //含税单价=单价*(1+税率)
                        var HTaxMoney = Number((HMoney * HTaxRate));         //税额=金额*税率
                        var HTaxPrice = Number((HPrice * (1 + HTaxRate)));        //含税单价=单价*(1+税率)
                        var HDiscountRate = obj.data.HDiscountRate * 1;     //折扣率
                        var HRelTaxPrice = Number((HTaxPrice * HDiscountRate).toFixed(HPriceDec));   //实际含税单价=含税单价*折扣率
                        var HRelTaxPrice = Number((HTaxPrice * HDiscountRate));   //实际含税单价=含税单价*折扣率
                        //数字精度
                        HQty = Number(HQty.toFixed(HQtyDec));
                        HPrice = Number(HPrice.toFixed(HPriceDec));
                        HMoney = Number(HMoney.toFixed(HMoneyDec));
                        HTaxMoney = Number(HTaxMoney.toFixed(HMoneyDec));
                        HTaxPrice = Number(HTaxPrice.toFixed(HPriceDec));
                        HRelTaxPrice = Number(HRelTaxPrice.toFixed(HPriceDec));
                        //同步更新表格和缓存对应的值
                        obj.update({
                            HTaxRate: HTaxRate * 100                //将HTaxRate属性的值乘以100,并更新为新的值    ç¨ŽçŽ‡ä¹˜100  ä»Žå°æ•°ç±»åž‹å˜ä¸ºæ•´æ•°æˆ–浮点型      
                            , HQty: Number(HQty.toFixed(HQtyDec))                   //更新HQty字段,,其值来自变量HQty
                            , HPrice: Number(HPrice.toFixed(HPriceDec))                 //更新HPrice字段,其值来自变量HPrice
                            , HMoney: Number(HMoney.toFixed(HMoneyDec))                        //更新HMoney字段,其值来自变量HMoney
                            , HQty: HQty                //更新HQty字段,,其值来自变量HQty
                            , HPrice: HPrice                 //更新HPrice字段,其值来自变量HPrice
                            , HMoney: HMoney                       //更新HMoney字段,其值来自变量HMoney
                            , HTaxMoney: HTaxMoney                  //更新HTaxMoney字段,其值来自变量HTaxMoney
                            , HTaxPrice: HTaxPrice                  //更新HTaxPrice字段,其值来自变量HTaxPrice
                            , HDiscountRate: HDiscountRate                  //更新HDiscountRate字段,其值来自变量HDiscountRate
                            , HRelTaxPrice: HRelTaxPrice                  //更新HRelTaxPrice字段,其值来自变量HRelTaxPrice
                        });
                        break;
                    case "HTaxPrice":                                         //含税单价
                        //数据格式校验  
                        temp = value + "";     //修改后的值 è½¬ä¸ºå­—符串 èµ‹å€¼ç»™  å˜é‡temp
@@ -804,23 +831,31 @@
                        var HQty = obj.data.HQty * 1;                   //数量
                        var HTaxPrice = value * 1;                    //含税单价
                        var HTaxRate = obj.data.HTaxRate * 0.01;           //税率 
                        var HPrice = Number((HTaxPrice / (1 + HTaxRate)).toFixed(HPriceDec));                         //单价 = å«ç¨Žå•ä»·/(1+税率)
                        var HPrice = Number((HTaxPrice / (1 + HTaxRate)));                         //单价 = å«ç¨Žå•ä»·/(1+税率)
                        var HMoney = HQty * HPrice;                     //金额=数量*单价
                        var HTaxMoney = Number((HMoney * HTaxRate).toFixed(4));         //税额=金额*税率
                        var HTaxMoney = Number((HMoney * HTaxRate));         //税额=金额*税率
                        var HlineTotal = HMoney + HTaxMoney;            //价税合计=金额+税额
                        var HDiscountRate = obj.data.HDiscountRate * 1;   //折扣率
                        var HRelTaxPrice = Number((HTaxPrice * HDiscountRate).toFixed(HPriceDec));   //实际含税单价=含税单价*折扣率
                        var HRelTaxPrice = Number((HTaxPrice * HDiscountRate));   //实际含税单价=含税单价*折扣率
                        var HExRate = $("#HExRate").val();                      //汇率
                        var HlineTotalBB = Number(((HMoney + HTaxMoney) * HExRate).toFixed(4));     //本位币价税合计=(税额+金额)*汇率
                        var HlineTotalBB = Number(((HMoney + HTaxMoney) * HExRate));     //本位币价税合计=(税额+金额)*汇率
                        //数字精度
                        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));
                        HRelTaxPrice = Number(HRelTaxPrice.toFixed(HPriceDec));
                        HlineTotalBB = Number(HlineTotalBB.toFixed(HMoneyDec));
                        //同步更新表格和缓存对应的值
                        obj.update({                    //更新表格数据                æ–¹æ³•是该对象提供的一个方法,用于更新其内部状态或与之关联的数据源
                            HQty: Number(HQty.toFixed(HQtyDec))                                //更新HQty字段,HQty
                            HQty: HQty                               //更新HQty字段,HQty
                            , HPrice: HPrice                         //更新HPrice字段,HPrice
                            , HMoney: Number(HMoney.toFixed(HMoneyDec))                        //更新HMoney字段,HMoney
                            , HMoney: HMoney                       //更新HMoney字段,HMoney
                            , HTaxMoney: HTaxMoney                  //更新HTaxMoney字段,HTaxMoney
                            , HlineTotal: HlineTotal             //更新HlineTotal字段,HlineTotal
                            , HTaxPrice :Number(HTaxPrice.toFixed(HPriceDec))                    //更新HTaxPrice字段,HTaxPrice
                            , HTaxPrice :HTaxPrice                   //更新HTaxPrice字段,HTaxPrice
                            , HRelTaxPrice: HRelTaxPrice            //更新HRelTaxPrice字段,其值来自变量HRelTaxPrice
                            , HlineTotalBB: HlineTotalBB              //更新HlineTotalBB字段,其值来自变量HlineTotalBB
                        });
@@ -1194,7 +1229,6 @@
                        //物料
                        if (obj.event == "HMaterID") {//判断传入的obj对象的event属性是否等于字符串"HMaterID"
                            var HOrgID = $("#HOrgID").val();  //获取id="HOrgID"的元素中获取其值,并将该值存储在变量HOrgID中
                            layer.open({  //打开层
                                type: 2         // //表示弹出层的内容是一个 iframe       ç±»åž‹ä¸º2
                                , skin: "layui-layer-rim" //加上边框
@@ -1209,8 +1243,8 @@
                                    //按钮一  çš„回调
                                    var iframeWindow = window["layui-layer-iframe" + index];//获取弹框页面
                                    var checkStatus = iframeWindow.layui.table.checkStatus("mainTable");//获取选中的数据
                                    OptionData = checkStatus.data[0];  //把选中数据的第一条赋值给OptionData变量
                                    var TaxRate = getHTaxRateByHSupID();
                                    //选中多行时
                                    if (checkStatus.data.length > 1) {
                                        var rowIndex = $(obj.tr).attr("data-index") * 1;  //attr("data-index")用于获取该tr元素上data-index属性的值*1转换类型然后赋值给rowIndex
@@ -1226,9 +1260,6 @@
                                                table.render(option);//渲染界面
                                            }
                                            var HMaterID = checkStatus.data[i].HItemID; //checkStatus.data数组中的当前元素(索引为i)中获取HItemID属性的值 å¹¶èµ‹å€¼ç»™HMaterID
                                            var resultData = getMaterialByMaterID(HMaterID);  //使用HMaterID作为参数来调用getMaterialByMaterID函数来获取该物料的详细信息
                                            option.data[rowIndex + i].HMaterID = resultData.HMaterID;  //将option.data数组中对应行的HMaterID属性更新为从resultData对象中获取的物料ID
@@ -1238,6 +1269,7 @@
                                            option.data[rowIndex + i].HUnitID = resultData.HUnitID; //将option.data数组中对应行的 HUnitID å±žæ€§æ›´æ–°ä¸ºä»ŽresultData对象中获取的物料ID
                                            option.data[rowIndex + i].计量单位 = resultData.HUnitName; //将option.data数组中对应行的 è®¡é‡å•位 å±žæ€§æ›´æ–°ä¸ºä»ŽresultData对象中获取的物料ID   æ›´æ–°è®¡é‡å•位属性
                                            option.data[rowIndex + i].HQty = 1;  //将对应行的HQty属性(可能代表数量)设置为1。这表示对于每个选中的物料,其默认数量被设置为1
                                            option.data[rowIndex + i].HTaxRate = TaxRate;
                                        }
                                        table.render(option); //重新渲染表格以显示更新后的数据
                                    }
@@ -1252,7 +1284,11 @@
                                end: function () {
                                    //通过供应商id获取税率
                                    var HSupID = $("#HSupID").val();
                                    if (HSupID != 0) {
                                    if (HSupID != 0 && typeof (OptionData.HItemID) != "undefined") {
                                        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"];  //金额精度
                                        $.ajax({
                                            url: GetWEBURL() + "/Gy_Supplier/xg",
                                            //url: "http://localhost:12761/Gy_Supplier/xg",
@@ -1267,12 +1303,21 @@
                                                var HQty = obj.data.HQty * 1;                           //数量
                                                var HPrice = obj.data.HPrice * 1;               //单价
                                                var HMoney = HQty * HPrice;                     //金额=数量*单价
                                                var HTaxMoney = Number((HMoney * HTaxRate).toFixed(4));         //税额=金额*税率
                                                var HTaxMoney = Number((HMoney * HTaxRate));         //税额=金额*税率
                                                var HlineTotal = HMoney + HTaxMoney;            //价税合计=金额+税额
                                                var HTaxPrice = Number((HPrice * (1 + HTaxRate)).toFixed(4));        //含税单价=单价*(1+税率)
                                                var HTaxPrice = Number((HPrice * (1 + HTaxRate)));        //含税单价=单价*(1+税率)
                                                var HDiscountRate = obj.data.HDiscountRate * 1;   //折扣率
                                                var HRelTaxPrice = Number((HTaxPrice * HDiscountRate).toFixed(4));   //实际含税单价=含税单价*折扣率
                                                var HlineTotalBB = Number(((HMoney + HTaxMoney) * HExRate).toFixed(4));     //本位币价税合计=(税额+金额)*汇率
                                                var HRelTaxPrice = Number((HTaxPrice * HDiscountRate));   //实际含税单价=含税单价*折扣率
                                                var HlineTotalBB = Number(((HMoney + HTaxMoney) * HExRate));     //本位币价税合计=(税额+金额)*汇率
                                                //数字精度
                                                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));
                                                HRelTaxPrice = Number(HRelTaxPrice.toFixed(HPriceDec));
                                                HlineTotalBB = Number(HlineTotalBB.toFixed(HMoneyDec));
                                                obj.update({ //更新表格数据
                                                    "HMaterID": OptionData.HItemID             //设置HItemID的值为“HBillNo”字段的值HItemID`的值
                                                    , "物料代码": OptionData.物料代码
@@ -1400,8 +1445,8 @@
                            //按钮一  çš„回调
                            var iframeWindow = window["layui-layer-iframe" + index];//获取弹框页面
                            var checkStatus = iframeWindow.layui.table.checkStatus("mainTable");//获取选中的数据
                            OptionData = checkStatus.data[0];  //把选中数据的第一条赋值给OptionData变量
                            var TaxRate = getHTaxRateByHSupID();
                            //选中多行时
                            if (checkStatus.data.length > 1) {
                                var rowIndex = $(obj.tr).attr("data-index") * 1;  //attr("data-index")用于获取该tr元素上data-index属性的值*1转换类型然后赋值给rowIndex
@@ -1417,9 +1462,6 @@
                                        table.render(option);//渲染界面
                                    }
                                    var HMaterID = checkStatus.data[i].HItemID; //checkStatus.data数组中的当前元素(索引为i)中获取HItemID属性的值 å¹¶èµ‹å€¼ç»™HMaterID
                                    var resultData = getMaterialByMaterID(HMaterID);  //使用HMaterID作为参数来调用getMaterialByMaterID函数来获取该物料的详细信息
                                    option.data[rowIndex + i].HMaterID = resultData.HMaterID;  //将option.data数组中对应行的HMaterID属性更新为从resultData对象中获取的物料ID
@@ -1429,8 +1471,11 @@
                                    option.data[rowIndex + i].HUnitID = resultData.HUnitID; //将option.data数组中对应行的 HUnitID å±žæ€§æ›´æ–°ä¸ºä»ŽresultData对象中获取的物料ID
                                    option.data[rowIndex + i].计量单位 = resultData.HUnitName; //将option.data数组中对应行的 è®¡é‡å•位 å±žæ€§æ›´æ–°ä¸ºä»ŽresultData对象中获取的物料ID   æ›´æ–°è®¡é‡å•位属性
                                    option.data[rowIndex + i].HQty = 1;  //将对应行的HQty属性(可能代表数量)设置为1。这表示对于每个选中的物料,其默认数量被设置为1
                                    option.data[rowIndex + i].HTaxRate = TaxRate;
                                }
                                table.render(option); //重新渲染表格以显示更新后的数据
                            }
                            layer.closeAll();  //关闭所有通过layer
                            //layer.close(layer.index); //它获取的始终是最新弹出的某个层,值是由layer内部动态递增计算的
                        }
@@ -1441,7 +1486,11 @@
                        end: function () {
                            //通过供应商id获取税率
                            var HSupID = $("#HSupID").val();
                            if (HSupID != 0) {
                            if (HSupID != 0 && typeof (OptionData.HItemID) != "undefined") {
                                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"];  //金额精度
                                $.ajax({
                                    url: GetWEBURL() + "/Gy_Supplier/xg",
                                    //url: "http://localhost:12761/Gy_Supplier/xg",
@@ -1450,18 +1499,27 @@
                                        "HInterID": HSupID
                                    },
                                    success: function (d) {
                                        var HTaxRate = parseInt(d.data[0].增值税率)*0.01;
                                        var HTaxRate = parseInt(d.data[0].增值税率) * 0.01;
                                        var HExRate = $("#HExRate").val();                      //汇率
                                        //数据校验合格,重算记录
                                        var HQty = obj.data.HQty * 1;                           //数量
                                        var HPrice = obj.data.HPrice * 1;               //单价
                                        var HMoney = HQty * HPrice;                     //金额=数量*单价
                                        var HTaxMoney = Number((HMoney * HTaxRate).toFixed(4));         //税额=金额*税率
                                        var HTaxMoney = Number((HMoney * HTaxRate));         //税额=金额*税率
                                        var HlineTotal = HMoney + HTaxMoney;            //价税合计=金额+税额
                                        var HTaxPrice = Number((HPrice * (1 + HTaxRate)).toFixed(4));        //含税单价=单价*(1+税率)
                                        var HTaxPrice = Number((HPrice * (1 + HTaxRate)));        //含税单价=单价*(1+税率)
                                        var HDiscountRate = obj.data.HDiscountRate * 1;   //折扣率
                                        var HRelTaxPrice = Number((HTaxPrice * HDiscountRate).toFixed(4));   //实际含税单价=含税单价*折扣率
                                        var HlineTotalBB = Number(((HMoney + HTaxMoney) * HExRate).toFixed(4));     //本位币价税合计=(税额+金额)*汇率
                                        var HRelTaxPrice = Number((HTaxPrice * HDiscountRate));   //实际含税单价=含税单价*折扣率
                                        var HlineTotalBB = Number(((HMoney + HTaxMoney) * HExRate));     //本位币价税合计=(税额+金额)*汇率
                                        //数字精度
                                        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));
                                        HRelTaxPrice = Number(HRelTaxPrice.toFixed(HPriceDec));
                                        HlineTotalBB = Number(HlineTotalBB.toFixed(HMoneyDec));
                                        obj.update({ //更新表格数据
                                            "HMaterID": OptionData.HItemID             //设置HItemID的值为“HBillNo”字段的值HItemID`的值
                                            , "物料代码": OptionData.物料代码
@@ -1469,7 +1527,7 @@
                                            , "规格型号": OptionData.规格型号
                                            , "HUnitID": OptionData.HUnitID
                                            , "计量单位": OptionData.计量单位名称
                                            , "HTaxRate": HTaxRate*100
                                            , "HTaxRate": HTaxRate * 100
                                            , HQty: HQty                               //更新HQty字段,HQty
                                            , HPrice: HPrice                         //更新HPrice字段,HPrice
                                            , HMoney: HMoney                      //更新HMoney字段,HMoney
@@ -1491,7 +1549,6 @@
                                    , "计量单位": OptionData.计量单位名称
                                })
                            }
                        }
                    });
                });
@@ -1802,6 +1859,29 @@
            }
            //#endregion
            //#region é€šè¿‡ä¾›åº”商id获取税率
            function getHTaxRateByHSupID() {
                var HTaxRate;
                //通过供应商id获取税率
                var HSupID = $("#HSupID").val();
                if (HSupID != 0) {
                    $.ajax({
                        url: GetWEBURL() + "/Gy_Supplier/xg",
                        type: "GET",
                        async: false,
                        data: {
                            "HInterID": HSupID
                        },
                        success: function (d) {
                            HTaxRate = parseInt(d.data[0].增值税率);
                        }
                    });
                } else {
                    HTaxRate = 0;
                }
                return HTaxRate;
            }
            //#endregion
            
            //#region ä¿å­˜åŽæµè§ˆæ–¹æ³•
            function ReRoadBillMain() {