Commit 2ae4ecb3 authored by lvweichao's avatar lvweichao

update: 商品原价改为string

parent e57c8e76
...@@ -1176,13 +1176,13 @@ export default { ...@@ -1176,13 +1176,13 @@ export default {
2 2
); );
this.goodsObj.original_price = Number(parseOriginalPrice); this.goodsObj.original_price = Number(parseOriginalPrice);
if ( // if (
typeof this.goodsObj.original_price === "number" && // typeof this.goodsObj.original_price === "number" &&
isNaN(this.goodsObj.original_price) // isNaN(this.goodsObj.original_price)
) { // ) {
this.goodsObj.original_price = ""; // this.goodsObj.original_price = "";
return this.$message.error("原价价格必为数字"); // return this.$message.error("原价价格必为数字");
} // }
}, },
// 审核通过 // 审核通过
...@@ -1285,9 +1285,9 @@ export default { ...@@ -1285,9 +1285,9 @@ export default {
if (query.price == 0) { if (query.price == 0) {
return this.$message.error("售价价格不得为0"); return this.$message.error("售价价格不得为0");
} }
if (query.original_price && typeof query.original_price !== "number") { // if (query.original_price && typeof query.original_price !== "number") {
return this.$message.error("原价价格必须为数字"); // return this.$message.error("原价价格必须为数字");
} // }
if (typeof query.price !== "number") { if (typeof query.price !== "number") {
return this.$message.error("售价价格必须为数字格式"); return this.$message.error("售价价格必须为数字格式");
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment