duhe
2024-11-20 7badce4620b59134c7ed603de8f970dd6583bd7c
销售出库:实发数量不能为0,可为负数
2个文件已修改
64 ■■■■■ 已修改文件
WebTM/Properties/PublishProfiles/JFTM.pubxml.user 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/views/领料发货/销售出库/Kf_SellOutBill.html 60 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/Properties/PublishProfiles/JFTM.pubxml.user
@@ -7288,10 +7288,10 @@
      <publishTime>04/11/2023 16:34:43</publishTime>
    </File>
    <File Include="views/领料发货/销售出库/Kf_SellOutBill.html">
      <publishTime>11/11/2024 15:08:02</publishTime>
      <publishTime>11/20/2024 10:43:06</publishTime>
    </File>
    <File Include="views/领料发货/销售出库/Kf_SellOutBill.html">
      <publishTime>11/11/2024 15:08:02</publishTime>
      <publishTime>11/20/2024 10:43:06</publishTime>
    </File>
    <File Include="views/领料发货/销售出库/Kf_SellOutBillList.html">
      <publishTime>10/16/2024 14:22:54</publishTime>
WebTM/views/ÁìÁÏ·¢»õ/ÏúÊÛ³ö¿â/Kf_SellOutBill.html
@@ -1264,6 +1264,7 @@
            table.on('edit(mainTable)', function (obj) {
                //数值格式校验工具
                var ref = /^\d+(\.\d+)?$/;          //非负数正则表达式
                var ref1 = /^-?\d+(\.\d+)?$/;          //判断字符串是否为数字(包含整数、浮点数),正则表达式
                var temp = "";
                var Dec = getDecByMaterID(obj.data.HMaterID) //获取精度
                var HQtyDec = (Dec["HQtyDec"] == null || Dec["HQtyDec"] == 0) ? 4 : Dec["HQtyDec"];  //数量精度
@@ -1280,14 +1281,23 @@
                    case "HQty":                                                       //数量
                        //数据格式校验
                        temp = value + "";
                        if (!ref.test(temp)) {
                        if (!ref1.test(temp)) {
                            //恢复数据到编辑前
                            obj.update({
                                HQty: oldText
                            });
                            table.render(option);
                            layer.msg("数量请输入大于0的数字!");
                            layer.msg("数量请输入不为0的数字!");
                            return;
                        } else if (temp * 1 == 0) {
                            //恢复数据到编辑前
                            obj.update({
                                HQty: oldText
                            });
                            table.render(option);
                            layer.msg("数量请输入不为0的数字!");
                            return;
                        }
@@ -2473,6 +2483,7 @@
            function AllowLoadData(data) {
                //数值格式校验工具
                var ref = /^\d+(\.\d+)?$/;          //非负数正则表达式
                var ref1 = /^-?\d+(\.\d+)?$/;          //判断字符串是否为数字(包含整数、浮点数),正则表达式
                var temp = "";
                //#region è¡¨å¤´æ•°æ®æ£€éªŒ
@@ -2540,13 +2551,14 @@
                    //实发数量格式校验
                    temp = option.data[i]["HQty"] + "";
                    if (temp == "0") {
                        layer.msg("第" + (i + 1) + "行:实发数量不能为0!");
                    if (!ref1.test(temp)) {
                        layer.msg("第" + (i + 1) + "行:实发数量请输入不为0的数字!");
                        return false;
                    } else if (!ref.test(temp)) {
                        layer.msg("第" + (i + 1) + "行:实发数量请输入大于0的数字!");
                    } else if (temp * 1 == 0) {
                        layer.msg("第" + (i + 1) + "行:实发数量请输入不为0的数字!");
                        return false;
                    }
                    //单价格式校验
                    temp = option.data[i]["HPrice"] + "";
@@ -2572,25 +2584,25 @@
                        return false;
                    }
                    //金额格式校验
                    temp = option.data[i]["HMoney"] + "";
                    if (temp == "0") {
                        //layer.msg("第" + (i + 1) + "行:金额不能为0!");
                        //return false;
                    } else if (!ref.test(temp)) {
                        layer.msg("第" + (i + 1) + "行:金额请输入大于0的数字!");
                        return false;
                    }
                    ////金额格式校验
                    //temp = option.data[i]["HMoney"] + "";
                    //if (temp == "0") {
                    //    //layer.msg("第" + (i + 1) + "行:金额不能为0!");
                    //    //return false;
                    //} else if (!ref.test(temp)) {
                    //    layer.msg("第" + (i + 1) + "行:金额请输入大于0的数字!");
                    //    return false;
                    //}
                    //价税合计格式校验
                    temp = option.data[i]["HTaxMoney"] + "";
                    if (temp == "0") {
                        //layer.msg("第" + (i + 1) + "行:价税合计不能为0!");
                        //return false;
                    } else if (!ref.test(temp)) {
                        layer.msg("第" + (i + 1) + "行:价税合计请输入大于0的数字!");
                        return false;
                    }
                    ////价税合计格式校验
                    //temp = option.data[i]["HTaxMoney"] + "";
                    //if (temp == "0") {
                    //    //layer.msg("第" + (i + 1) + "行:价税合计不能为0!");
                    //    //return false;
                    //} else if (!ref.test(temp)) {
                    //    layer.msg("第" + (i + 1) + "行:价税合计请输入大于0的数字!");
                    //    return false;
                    //}
                    //发货仓库非空验证
                    if (option.data[i]["HWHID"] == "0") {