wtt
2024-09-02 94daa18047880219aaafba8228d242d8a2a5e5ac
采购模块自动计算,过滤功能测试修改
9个文件已修改
101 ■■■■ 已修改文件
WebTM/views/采购管理/付款单/YF_PayMentBill.html 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/views/采购管理/应付单/Cg_PayableBill.html 18 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/views/采购管理/报价单/Sup_QuotePriceBillEdit.html 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/views/采购管理/收料通知单/Add_Edit_Cg_POInStockBillList.html 50 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/views/采购管理/退料通知单/Add_Edit_Cg_POInStockBackBillList.html 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/views/采购管理/采购合同/Add_Edit_Cg_ContractBillList.html 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/views/采购管理/采购订单/Cg_POOrderBillEdit.html 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/views/验收入库/外购入库/Add_Edit_Kf_POStockInBillList.html 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/views/验收入库/外购入库/Kf_POStockInBackBill_Add_Up.html 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/views/²É¹º¹ÜÀí/¸¶¿îµ¥/YF_PayMentBill.html
@@ -709,7 +709,7 @@
                        , { field: '规格型号', title: '规格型号', width: 100, style: 'background-color:#efefef4d;' }
                        , { field: 'HUnitID', title: 'HUnitID', width: 100, hide: true, style: 'background-color:#efefef4d;' }
                        , { field: '计量单位', title: '计量单位', width: 100, style: 'background-color:#efefef4d;'}
                        , { field: 'HQty', title: '数量', width: 100, totalRow: true,edit:'text' }
                        , { field: 'HQty', title: '数量', width: 100, totalRow: true, style: 'background-color:#efefef4d;' }
                        , { field: 'HPrice', title: '单价', width: 100, style: 'background-color:#efefef4d;' }
                        , { field: 'HMoney', title: '结算金额', width: 100, totalRow: true, style: 'background-color:#efefef4d;' }
                        , { field: 'HReceiveBillInterID', title: '接收源单内码', width: 100, hide: true, style: 'background-color:#efefef4d;' }
WebTM/views/²É¹º¹ÜÀí/Ó¦¸¶µ¥/Cg_PayableBill.html
@@ -1274,7 +1274,7 @@
                            obj.update({
                                HPrice: oldText
                            });
                            table.render(option);
                            layer.msg("单价请输入大于0的数字!");
                            return;
                        }
@@ -1297,8 +1297,8 @@
                        HPrice = Number(HPrice.toFixed(HPriceDec));
                        HMoney = Number(HMoney.toFixed(HMoneyDec));
                        HlineTotal = Number(HlineTotal.toFixed(HMoneyDec));
                        HTaxPrice = Number(HPrice.toFixed(HPriceDec));
                        HRelTaxPrice = Number(HPrice.toFixed(HPriceDec));
                        HTaxPrice = Number(HTaxPrice.toFixed(HPriceDec));
                        HRelTaxPrice = Number(HRelTaxPrice.toFixed(HPriceDec));
                        HlineTotalBB = Number(HlineTotalBB.toFixed(HMoneyDec));
                        HTaxMoney = Number(HTaxMoney.toFixed(HMoneyDec));
                        //同步更新表格和缓存对应的值
@@ -1322,7 +1322,7 @@
                            obj.update({
                                HTaxRate: oldText
                            });
                            table.render(option);
                            layer.msg("税率请输入不小于0的数字!");
                            return;
                        }
@@ -1346,8 +1346,8 @@
                        HPrice = Number(HPrice.toFixed(HPriceDec));
                        HMoney = Number(HMoney.toFixed(HMoneyDec));
                        HlineTotal = Number(HlineTotal.toFixed(HMoneyDec));
                        HTaxPrice = Number(HPrice.toFixed(HPriceDec));
                        HRelTaxPrice = Number(HPrice.toFixed(HPriceDec));
                        HTaxPrice = Number(HTaxPrice.toFixed(HPriceDec));
                        HRelTaxPrice = Number(HRelTaxPrice.toFixed(HPriceDec));
                        HlineTotalBB = Number(HlineTotalBB.toFixed(HMoneyDec));
                        HTaxMoney = Number(HTaxMoney.toFixed(HMoneyDec));
                        //同步更新表格和缓存对应的值
@@ -1373,7 +1373,7 @@
                            obj.update({
                                HDiscountRate: oldText
                            });
                            table.render(option);
                            layer.msg("折扣率请输入不小于0的数字!");
                            return;
                        }
@@ -1393,8 +1393,8 @@
                        HQty = Number(HQty.toFixed(HQtyDec));
                        HPrice = Number(HPrice.toFixed(HPriceDec));
                        HMoney = Number(HMoney.toFixed(HMoneyDec));
                        HTaxPrice = Number(HPrice.toFixed(HPriceDec));
                        HRelTaxPrice = Number(HPrice.toFixed(HPriceDec));
                        HTaxPrice = Number(HTaxPrice.toFixed(HPriceDec));
                        HRelTaxPrice = Number(HRelTaxPrice.toFixed(HPriceDec));
                        HTaxMoney = Number(HTaxMoney.toFixed(HMoneyDec));
                        //同步更新表格和缓存对应的值
                        obj.update({
WebTM/views/²É¹º¹ÜÀí/±¨¼Ûµ¥/Sup_QuotePriceBillEdit.html
@@ -707,7 +707,7 @@
                    HMoney = Number(HMoney.toFixed(HMoneyDec));
                    HTaxMoney = Number(HTaxMoney.toFixed(HMoneyDec));
                    HlineTotal = Number(HlineTotal.toFixed(HMoneyDec));
                    HTaxPrice = Number(HPrice.toFixed(HPriceDec));
                    HTaxPrice = Number(HTaxPrice.toFixed(HPriceDec));
                    //同步更新表格和缓存对应的值
                    obj.update({                    //更新表格数据                æ–¹æ³•是该对象提供的一个方法,用于更新其内部状态或与之关联的数据源
                        HQty: HQty                               //更新HQty字段,HQty
@@ -750,7 +750,7 @@
                    HMoney = Number(HMoney.toFixed(HMoneyDec));
                    HTaxMoney = Number(HTaxMoney.toFixed(HMoneyDec));
                    HlineTotal = Number(HlineTotal.toFixed(HMoneyDec));
                    HTaxPrice = Number(HPrice.toFixed(HPriceDec));
                    HTaxPrice = Number(HTaxPrice.toFixed(HPriceDec));
                    //同步更新表格和缓存对应的值
                    obj.update({   //更新表格数据
                        HTaxRate: HTaxRate * 100
@@ -790,7 +790,7 @@
                    HMoney = Number(HMoney.toFixed(HMoneyDec));
                    HTaxMoney = Number(HTaxMoney.toFixed(HMoneyDec));
                    HlineTotal = Number(HlineTotal.toFixed(HMoneyDec));
                    HTaxPrice = Number(HPrice.toFixed(HPriceDec));
                    HTaxPrice = Number(HTaxPrice.toFixed(HPriceDec));
                    //同步更新表格和缓存对应的值
                    obj.update({                    //更新表格数据                æ–¹æ³•是该对象提供的一个方法,用于更新其内部状态或与之关联的数据源
                        HQty: HQty                               //更新HQty字段,HQty
@@ -930,8 +930,8 @@
                , { field: 'HMoney', title: '金额', event: 'inputHMoney', width: 90, totalRow: true  }
                , { field: 'HTaxPrice', title: '含税单价', edit: 'text', event: 'inputHTaxPrice', width:90 }
                , { field: 'HTaxRate', title: '税率%', edit: 'text', event: 'inputHTaxRate', width:90 }
                , { field: 'HTaxMoney', title: '税额', edit: 'text', event: 'inputHTaxMoney', width:90 }
                , { field: 'HlineTotal', title: '价税合计', edit: 'text', event: 'inputHlineTotal', width:90 }
                , { field: 'HTaxMoney', title: '税额', event: 'inputHTaxMoney', width:90 }
                , { field: 'HlineTotal', title: '价税合计',  event: 'inputHlineTotal', width:90 }
                , { field: 'HlineTotalBB', title: '本位币价税合计', edit: 'text', event: 'inputHlineTotalBB', width:125 }
                , { field: 'HDate', title: '预计交货日期', width: 120, templet: "<div>{{d.HDate ==null ?'':layui.util.toDateString(d.HDate, 'yyyy-MM-dd')}}</div>", event: 'HDate' }
                , { field: 'HBagType', title: '包装方式', edit: 'text', width: 120 }
WebTM/views/²É¹º¹ÜÀí/ÊÕÁÏ֪ͨµ¥/Add_Edit_Cg_POInStockBillList.html
@@ -647,7 +647,7 @@
                            obj.update({
                                HPrice: oldText
                            });
                            table.render(option)
                            layer.msg("单价请输入大于0的数字!");
                            return;
                        }
@@ -676,7 +676,7 @@
                        });
                        table.render(option)
                        break;
                    case "HTaxRate":                                                       //数量
                    case "HTaxRate":                                                       //税率
                        //数据格式校验
                        temp = value + "";
                        if (!ref.test(temp)) {
@@ -684,7 +684,7 @@
                            obj.update({
                                HTaxRate: oldText
                            });
                            table.render(option)
                            layer.msg("税率请输入不小于0的数字!");
                            return;
                        }
@@ -724,7 +724,7 @@
                            obj.update({
                                HDiscountRate: oldText
                            });
                            table.render(option)
                            layer.msg("折扣率请输入不小于0的数字!");
                            return;
                        }
@@ -757,7 +757,7 @@
                        });
                        table.render(option);
                        break;       
                    case "HTaxPrice":                                         //单价
                    case "HTaxPrice":                                         //含税单价
                        //数据格式校验  
                        temp = value + "";     //修改后的值 è½¬ä¸ºå­—符串 èµ‹å€¼ç»™  å˜é‡temp
                        // ref很可能是一个正则表达式对象,用于匹配特定的字符串模式。ref.test(temp)会检查变量temp(即转换后的单价字符串)是否符合ref定义的模式。如果test方法返回false
@@ -795,6 +795,46 @@
                        });
                        table.render(option)
                        break;
                    case "HMoney":                                         //金额
                        //数据格式校验
                        temp = value + "";     //修改后的值 è½¬ä¸ºå­—符串 èµ‹å€¼ç»™  å˜é‡temp
                        // ref很可能是一个正则表达式对象,用于匹配特定的字符串模式。ref.test(temp)会检查变量temp(即转换后的单价字符串)是否符合ref定义的模式。如果test方法返回false
                        if (!ref.test(temp)) { //检查单价字符串是否符合预期的格式
                            //恢复数据到编辑前
                            obj.update({            //更新表格某一行数据
                                HMoney: oldText     //将hprice字段恢复到保存前的值
                            });
                            table.render(option);
                            layer.msg("金额请输入数字!");   //请输入单价的数值
                            return;
                        }
                        //数据校验合格,重算记录
                        var HQty = obj.data.HQty * 1;                   //数量
                        var HMoney = value * 1;                     //金额
                        var HTaxRate = obj.data.HTaxRate * 0.01;           //税率
                        var HPrice = Number((HMoney / HQty));                         //单价 = é‡‘额/(数量)
                        var HTaxPrice = Number(HPrice * (1 + HTaxRate));        //含税单价=单价*(1+税率)
                        var HTaxMoney = Number((HMoney * HTaxRate));         //税额=金额*税率
                        var HDiscountRate = obj.data.HDiscountRate * 1;   //折扣率
                        //数字精度
                        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));
                        //同步更新表格和缓存对应的值
                        obj.update({                    //更新表格数据                æ–¹æ³•是该对象提供的一个方法,用于更新其内部状态或与之关联的数据源
                            HQty: Number(HQty.toFixed(HQtyDec))
                            , HPrice: Number(HPrice.toFixed(HPriceDec))
                            , HMoney: Number(HMoney.toFixed(HMoneyDec))
                            , HTaxMoney: HTaxMoney                  //更新HTaxMoney字段,HTaxMoney
                            , HTaxPrice: Number(HTaxPrice.toFixed(HPriceDec))                    //更新HTaxPrice字段,HTaxPrice
                        });
                        table.render(option)
                        break;
                    default:
                }
            });
WebTM/views/²É¹º¹ÜÀí/ÍËÁÏ֪ͨµ¥/Add_Edit_Cg_POInStockBackBillList.html
@@ -612,7 +612,7 @@
                        , { field: '辅助单位', title: '辅助单位', width: 100, edit: 'text', event: "HSecUnitID" }//f7
                        , { field: 'HQty', title: '数量', width: 100, edit: 'text', totalRow: true}
                        , { field: 'HPrice', title: '单价', width: 100, edit: 'text' }
                        , { field: 'HMoney', title: '金额', width: 100, edit: 'text', totalRow: true }
                        , { field: 'HMoney', title: '金额', width: 100, totalRow: true, style: 'background-color:#efefef4d;' }
                        , { field: 'HTaxRate', title: '税率', width: 100, edit: 'text' }
                        , { field: 'HTaxMoney', title: '税额', width: 100, style: 'background-color:#efefef4d;'}
                        , { field: 'HBatchNo', title: '批号', width: 150, edit: 'text' }
@@ -804,7 +804,7 @@
                            obj.update({
                                HPrice: oldText
                            });
                            table.render(option);
                            layer.msg("单价请输入大于0的数字!");
                            return;
                        }
@@ -837,7 +837,7 @@
                            obj.update({
                                HTaxRate: oldText
                            });
                            table.render(option);
                            layer.msg("税率请输入不小于0的数字!");
                            return;
                        }
WebTM/views/²É¹º¹ÜÀí/²É¹ººÏͬ/Add_Edit_Cg_ContractBillList.html
@@ -809,7 +809,7 @@
                        , { field: 'HMoney', title: '金额', width: 100, totalRow: true, style: 'background-color:#efefef4d;' }
                        , { field: 'HTaxRate', title: '税率', width: 100, edit: 'text' }
                        , { field: 'HTaxMoney', title: '税额', width: 100, style: 'background-color:#efefef4d;' }
                        , { field: 'HlineTotal', title: '价税合计', width: 100, edit: 'text' }
                        , { field: 'HlineTotal', title: '价税合计', width: 100, style: 'background-color:#efefef4d;' }
                        , { field: 'HRemark', title: '备注', width: 100, edit: 'text' }
                        , { fixed: 'right', field: '操作', title: '操作', toolbar: '#barDemo', width: 70 }
                    ]]
WebTM/views/²É¹º¹ÜÀí/²É¹º¶©µ¥/Cg_POOrderBillEdit.html
@@ -1398,6 +1398,7 @@
                        //仓库
                        if (obj.event == "HWHID") {  //判断obj.event事件  çš„字符串是否==HWHID
                            var HOrgName = $('select[name="HOrgID"] option:selected').text();
                            layer.open({            //打开层
                                type: 2      //表示弹出层的内容是一个 iframe       ç±»åž‹ä¸º2
                                , skin: "layui-layer-rim" //加上边框
@@ -1406,7 +1407,7 @@
                                , shift: 2   //弹出动画
                                , area: ["90%", "90%"] //窗体大小
                                , maxmin: true //设置最大最小按钮是否显示
                                , content: ['../../基础资料/公用基础资料/Gy_Warehouse.html?type=Warehouse', 'yes']//设置 iframe çš„ URL,URL ä¸­åŒ…含了查询参数,来调用所需要的值
                                , content: ['../../基础资料/公用基础资料/Gy_Warehouse.html?type=Warehouse&HOrgName=' + HOrgName, 'yes']//设置 iframe çš„ URL,URL ä¸­åŒ…含了查询参数,来调用所需要的值
                                , btn: ["确定", "取消"]  //自定义选择按钮  å…¶æŒ‰é’®çš„名称为  ç¡®å®šï¼Œå–消 
                                , btn1: function (index, laero) {  //当为为确认时
                                    //按钮一  çš„回调
WebTM/views/ÑéÊÕÈë¿â/Í⹺Èë¿â/Add_Edit_Kf_POStockInBillList.html
@@ -723,7 +723,7 @@
                            obj.update({
                                HPrice: oldText
                            });
                            /* table.render(option);*/
                             table.render(option);
                            layer.msg("单价请输入大于0的数字!");
                            return;
@@ -765,7 +765,7 @@
                            obj.update({
                                HMoney: oldText
                            });
                            /* table.render(option);*/
                             table.render(option);
                            layer.msg("金额请输入大于0的数字!");
                            return;
@@ -775,7 +775,7 @@
                        var HQty = obj.data.HQty * 1;                   //数量
                        var HMoney = value * 1;
                        var HPrice = (HMoney / HQty);       //单价=金额/数量
                        var HTaxRate = value * 0.01;                       //税率
                        var HTaxRate = obj.data.HTaxRate * 0.01;                       //税率
                        var HTaxPrice = HPrice * (1 + HTaxRate);        //含税单价=单价*(1+税率)
                        var HTaxMoney = HMoney * HTaxRate;              //税额=金额*税率
                        var HlineTotal = HMoney + HTaxMoney;            //价税合计=金额+税额
WebTM/views/ÑéÊÕÈë¿â/Í⹺Èë¿â/Kf_POStockInBackBill_Add_Up.html
@@ -679,7 +679,7 @@
                            obj.update({
                                HMoney: oldText
                            });
                            /* table.render(option);*/
                             table.render(option);
                            layer.msg("金额请输入大于0的数字!");
                            return;
@@ -688,7 +688,7 @@
                        //数据校验合格,重算记录
                        var HQty = obj.data.HQty * 1;                   //数量
                        var HMoney = value * 1;
                        var HPrice = (HMoney / HQty).toFixed(2);       //单价=金额/数量
                        var HPrice = Number((HMoney / HQty).toFixed(2));       //单价=金额/数量
                        HQty = Number(HQty.toFixed(HQtyDec));
                        HPrice = Number(HPrice.toFixed(HPriceDec));
                        HMoney = Number(HMoney.toFixed(HMoneyDec));