报价单 新建编辑操作的时候 成本单价调用接口之前的校验修改,不填写不校验,填写了校验大于0的2位小数
1个文件已修改
4 ■■■■ 已修改文件
src/views/sales/quotation/AddQuotationDialog.vue 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/sales/quotation/AddQuotationDialog.vue
@@ -527,8 +527,8 @@
            this.$message.error("产品名称不能为空")
          } else {
            for (let i = 0; i < this.tableData.length; i++) {
              if (this.tableData[i].cost || Number(this.tableData[i].cost) == 0) {
                let reg = /^\+?[1-9]\d*$/
              if (this.tableData[i].cost) {
                let reg =/(^[1-9]([0-9]+)?(\.[0-9]{1,2})?$)|(^(0){1}$)|(^[0-9]\.[0-9]([0-9])?$)/;
                if (!reg.test(this.tableData[i].cost)) {
                  this.$message.error("成本单价需要填写大于0的2位小数!")
                  return true