diff --git a/src/views/pms/product/AddProduct.vue b/src/views/pms/product/AddProduct.vue index a56961c..0b447b3 100644 --- a/src/views/pms/product/AddProduct.vue +++ b/src/views/pms/product/AddProduct.vue @@ -268,6 +268,10 @@ export default { if(this.form.categoryId && Array.isArray(this.form.categoryId)){ this.form.categoryId = this.form.categoryId.pop() } + //商品价格没填时取sku的最低价 + if (!this.form.price){ + this.form.price = Math.min.apply(Math, this.form.skuList.map(it => it.price)) + } if (this.form.id != null) { updatePmsProduct(this.form).then(response => { this.$modal.msgSuccess("修改成功");