wtt
2024-11-05 0152b864f47e5e1bfe0414663cc03208d7e6f5cb
单据可编辑
5个文件已修改
116 ■■■■ 已修改文件
WebTM/views/工资管理/考勤汇报单/Pay_WorkTimesSumQueryBillList.html 26 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/views/采购管理/付款单/YF_PayMentBill.html 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/views/销售管理/应收单/Xs_ReceivableBill.html 80 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/views/销售管理/销售订单/Add_Edit_Xs_SeOrderBillList.html 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/views/领料发货/销售出库/Kf_SellOutBill.html 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/views/¹¤×ʹÜÀí/¿¼Çڻ㱨µ¥/Pay_WorkTimesSumQueryBillList.html
@@ -65,6 +65,7 @@
                        <script type="text/html" id="toolbarDemo">
                            <div class="layui-btn-container">
                                <button type="button" class="layui-btn layui-btn-sm" lay-event="get_Exit"><i class="layui-icon layui-icon-logout"></i>退出</button>
                                <button type="button" class="layui-btn layui-btn-sm" lay-event="btn_Export" id="btn_Export"><i class="layui-icon layui-icon-export"></i>导出</button>
                                <button type="button" class="layui-btn layui-btn-sm" lay-event="set_HideColumn"><i class="layui-icon layui-icon-form"></i>列设置</button>
                            </div>
                        </script>
@@ -91,7 +92,7 @@
            var option = [];
            var sWhere = "";
            var HModName = "Pay_WorkTimesReportBill";
            var ins;
            //不需要显示的字段 å¯æ‰©å±•
            var titleData = ["hmainid", "HDeptID", "HGroupID","HMangerID","HLeaveID","hsubid","HMaterID","HProcID","hEmpid"];
            //#endregion
@@ -115,6 +116,9 @@
                        break;
                    //列设置
                    case 'set_HideColumn': get_HideColumn();
                        break;
                    //导出按钮
                    case 'btn_Export': btn_Export();
                        break;
                };
            });
@@ -304,6 +308,24 @@
            }
            //#endregion
            //#region å¯¼å‡ºExecel
            function btn_Export() {
                var data = option.data
                data.forEach((item) => {
                    for (let itemobj in item) {
                        if (item[itemobj] == null) {
                            item[itemobj] = "";
                        }
                        if (item[itemobj].length > 0) {  // å‡è®¾å­—段名为field
                            item[itemobj] = item[itemobj].toString().replaceAll(/[\r\n]+/g, '');  // å°†æ¢è¡Œç¬¦æ›¿æ¢ä¸ºç©ºå­—符串
                        }
                    }
                });
                table.exportFile(ins.config.id, option.data, "xls");
            }
            //#endregion
            //#region åˆ·æ–°
            function get_Refresh() {
                set_ClearQuery();
@@ -419,8 +441,10 @@
                                }
                            }
                            table.render(option);
                            ins = table.render(option);
                        } else {
                            table.render(option);
                            ins = table.render(option);
                        }
                    }, error: function () {
                        layer.alert("接口请求失败!", { icon: 5 });
WebTM/views/²É¹º¹ÜÀí/¸¶¿îµ¥/YF_PayMentBill.html
@@ -1070,7 +1070,7 @@
                            , "HQty": dealDoubleToFixed(dataArray[i].数量, 1)
                            , "HPrice": dealDoubleToFixed(dataArray[i].单价, 3)                                                   //
                            , "HMoney": dealDoubleToFixed(dataArray[i].金额, 2)
                            , "HInvoiceBillNo_Sub": dataArray[i].发票编号
                            , "HInvoiceBillNo_Sub": dataArray[i].发票编号 ? "" : dataArray[i].发票编号
                            , "HReceiveBillInterID": dataArray[i].hmainid
                            , "HReceiveBillEntryID": dataArray[i].hsubid
                            , "HReceiveBillNo": dataArray[i].单据号
@@ -1355,7 +1355,7 @@
                                , "HRelSumMoney": data.折扣后金额
                                , "HAccDate": formatDate(data.财务日期)
                                , "HCreditRating_Now": data.HCreditRating_Now
                                , "HInvoiceBillNo": data.发票编号
                                , "HInvoiceBillNo": data.发票编号 ? "" : data.发票编号
                                , "HBigMoney": data.大写金额
                                , "HReason": data.付款事由
                                , "HMaker": data.制单人
@@ -1387,7 +1387,7 @@
                                            , "HQty": dealDoubleToFixed(result.data[i].数量, 1)
                                            , "HPrice": dealDoubleToFixed(result.data[i].单价, 3)                                                   //
                                            , "HMoney": dealDoubleToFixed(result.data[i].结算金额, 2)
                                            , "HInvoiceBillNo_Sub": result.data[i].发票号码
                                            , "HInvoiceBillNo_Sub": result.data[i].发票号码 ? "" : result.data[i].发票号码
                                            , "HReceiveBillInterID": result.data[i].源单主内码
                                            , "HReceiveBillEntryID": result.data[i].源单子内码
                                            , "HReceiveBillNo": result.data[i].源单单号
WebTM/views/ÏúÊÛ¹ÜÀí/Ó¦ÊÕµ¥/Xs_ReceivableBill.html
@@ -136,8 +136,9 @@
                                            <label class="layui-form-label">单价类型</label>
                                            <div class="layui-input-inline">
                                                <select name="HPriceType" id="HPriceType" lay-filter="HPriceType" style="width: 190px; ">
                                                    <option value="成本价" selected="selected">成本价</option>
                                                    <option value="去税价" selected="selected">去税价</option>
                                                    <option value="结算价">结算价</option>
                                                    <option value="含税价">含税价</option>
                                                </select>
                                            </div>
                                        </div>
@@ -1286,6 +1287,69 @@
                }
            });
            //#endregion
            //#region ä¸‹æ‹‰æ¡†äº‹ä»¶
            // ç›‘听下拉框选择
            form.on('select(HPriceType)', function (data) {
                console.log(data.value); // å¾—到被选中的值
                // æ‰§è¡Œç›¸å…³æ“ä½œ
                //#region å­è¡¨ æ•°æ®æ£€éªŒ
                for (var i = 0; i < option.data.length; i++) {
                    if (option.data[i]["HMaterID"] == "0") {
                        layer.msg("第" + (i + 1) + "行:物料未选择!");
                        return false;
                    } else {
                        var HPrice = option.data[i]["HPrice"];
                        var HMaterID = option.data[i]["HMaterID"];
                        var HType = data.value.toString();
                        //获取物料对应单价类型的单价
                        $.ajax({
                            url: GetWEBURL() + "/Xs_ReceivableBill/getPriceByType",
                            type: "GET",
                            async: false,
                            data: { "HMaterID": HMaterID, HType: HType },
                            success: function (d) {
                                HPrice = Number(d.data);
                            }, error: function () {
                                layer.alert("发生错误!" + d.Message, { icon: 5 });
                            }
                        });
                        var Dec = getDecByMaterID(option.data[i]["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 HTaxRate = option.data[i]["HTaxRate"] * 0.01;
                        var HExRate = $("#HExRate").val();                      //汇率
                        var HQty = option.data[i]["HQty"] * 1;                           //数量
                        var HMoney = HQty * HPrice;                     //金额=数量*单价
                        var HTaxMoney = Number((HMoney * HTaxRate));         //税额=金额*税率
                        var HlineTotal = HMoney + HTaxMoney;            //价税合计=金额+税额
                        var HTaxPrice = Number((HPrice * (1 + HTaxRate)));        //含税单价=单价*(1+税率)
                        var HlineTotalBB = Number(((HMoney + HTaxMoney) * HExRate));     //本位币价税合计=(税额+金额)*汇率
                        var HDiscountRate = option.data[i]["HDiscountRate"] * 1;   //折扣率
                        var HRelTaxPrice = Number((HTaxPrice * HDiscountRate));   //实际含税单价=含税单价*折扣率
                        var HExRate = $("#HExRate").val();                      //汇率
                        var HMoneyBB = HMoney * HExRate;
                        ///数字精度
                        option.data[i]["HQty"] = Number(HQty.toFixed(HQtyDec));
                        option.data[i]["HPrice"] = Number(HPrice.toFixed(HPriceDec));
                        option.data[i]["HMoney"] = Number(HMoney.toFixed(HMoneyDec));
                        option.data[i]["HTaxMoney"] = Number(HTaxMoney.toFixed(HMoneyDec));
                        option.data[i]["HMoneyBB"] = Number(HMoneyBB.toFixed(HMoneyDec));
                        option.data[i]["HlineTotal"] = Number(HlineTotal.toFixed(HMoneyDec));
                        option.data[i]["HTaxPrice"] = Number(HTaxPrice.toFixed(HPriceDec));
                        option.data[i]["HRelTaxPrice"] = Number(HRelTaxPrice.toFixed(HPriceDec));
                        option.data[i]["HlineTotalBB"] = Number(HlineTotalBB.toFixed(HMoneyDec));
                    }
                }
                table.render(option);
                //#endregion
            });
            //#endregion
            //#endregion
            //#endregion
@@ -2372,12 +2436,7 @@
                                        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 HPrice = 0;
                                        if ($("#HPriceType").val() == "成本价") {
                                            HPrice = OptionData.含税成本价 * 1;//单价
                                        } else {
                                            HPrice = OptionData.结算价 * 1;//单价
                                        }
                                        var HPrice = obj.data.HPrice * 1;
                                        var HTaxRate = obj.data.HTaxRate*0.01;
                                        if (HSupID != 0) {
                                            $.ajax({
@@ -2511,12 +2570,7 @@
                                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 HPrice = 0;
                                if ($("#HPriceType").val() == "成本价") {
                                    HPrice = OptionData.含税成本价 * 1;//单价
                                } else {
                                    HPrice = OptionData.结算价 * 1;//单价
                                }
                                var HPrice = obj.data.HPrice * 1;
                                var HTaxRate = obj.data.HTaxRate*0.01;
                                if (HSupID != 0) {
                                    $.ajax({
WebTM/views/ÏúÊÛ¹ÜÀí/ÏúÊÛ¶©µ¥/Add_Edit_Xs_SeOrderBillList.html
@@ -1555,7 +1555,7 @@
                                        "仓库": result.data[i]["子仓库"],
                                        "HQty": dealDoubleToFixed(result.data[i]["数量"], 1),
                                        "HPrice": dealDoubleToFixed(result.data[i]["单价"], 3),
                                        "HTaxPrice": dealDoubleToFixed(result.data[i]["含税单价"], 3),
                                        "HTaxPrice": dealDoubleToFixed(result.data[i]["HTaxPrice"], 3),
                                        "HMoney": dealDoubleToFixed(result.data[i]["金额"],2),
                                        "HDiscountRate": result.data[i]["折扣率"],
                                        "HRelTaxPrice": result.data[i]["实际含税单价"],
WebTM/views/ÁìÁÏ·¢»õ/ÏúÊÛ³ö¿â/Kf_SellOutBill.html
@@ -66,7 +66,7 @@
                                        <div class="layui-inline">
                                            <label class="layui-form-label">单据编号</label>
                                            <div class="layui-input-inline">
                                                <input type="text" class="layui-input" name="HBillNo" id="HBillNo" style="background-color:#efefef4d;" readonly>
                                                <input type="text" class="layui-input" name="HBillNo" id="HBillNo" style="background-color:#efefef4d;">
                                                <input type="hidden" name="HInterID" id="HInterID" value="0">
                                            </div>
                                        </div>