From d74d2457b1073b1db7cf03ba240ac64f553f3083 Mon Sep 17 00:00:00 2001 From: czc Date: Fri, 28 Jul 2023 10:45:26 +0800 Subject: [PATCH] =?UTF-8?q?=E5=95=86=E5=93=81=E4=BB=B7=E6=A0=BC=E6=9C=AA?= =?UTF-8?q?=E5=86=99=E5=A1=AB=E5=85=85sku=E6=9C=80=E4=BD=8E=E4=BB=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/pms/product/AddProduct.vue | 4 ++++ 1 file changed, 4 insertions(+) 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("修改成功");