1
xuxueyang
2024-07-15 2a9f0e7497d60d94795ce795863e0e24be5d44f9
sub_pages/supplier/flower-manage/flower-add.vue
@@ -520,11 +520,22 @@
               this.$message.showToast('商品价格未设置')
               return
            }
            var tmp = parseFloat(this.dto.price)
            if (isNaN(tmp) || ('' + tmp.toFixed(2)) !== ('' + this.dto.price)) {
               this.$message.showToast('商品价格格式错误,精确到分')
               return
            }
            if (this.dto.price <= 0) {
               this.$message.showToast('商品价格不能小于等于0')
               return
            }
            tmp = parseFloat(this.dto.stock)
            if (isNaN(tmp) || ('' + tmp.toFixed(0)) !== ('' + this.dto.stock) || tmp < 0) {
               this.$message.showToast('商品库存格式错误,需要大于等于0')
               return
            }
            for (var field of this.requireFields) {
               if (!this.dto[field.key]) {
                  this.$message.showToast(`${field.name}信息未填写`)