From 8329d9cfad5d684ab01f7807e9dfb90891326433 Mon Sep 17 00:00:00 2001 From: YeMingfei666 <1619116647@qq.com> Date: Thu, 10 Oct 2024 09:39:22 +0800 Subject: [PATCH 01/33] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=95=86=E5=93=81?= =?UTF-8?q?=E8=A7=84=E6=A0=BC=E6=9D=83=E9=99=90=E9=AA=8C=E8=AF=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .hbuilderx/launch.json | 23 ++++++++---------- pageProduct/index/components/edit-guige.vue | 27 ++++++++++++++++++--- 2 files changed, 33 insertions(+), 17 deletions(-) diff --git a/.hbuilderx/launch.json b/.hbuilderx/launch.json index 69faf69..179fe2d 100644 --- a/.hbuilderx/launch.json +++ b/.hbuilderx/launch.json @@ -4,19 +4,16 @@ "version" : "0.0", "configurations" : [ { - "app-plus" : - { - "launchtype" : "local" - }, - "default" : - { - "launchtype" : "local" - }, - "mp-weixin" : - { - "launchtype" : "local" - }, - "type" : "uniCloud" + "app-plus" : { + "launchtype" : "local" + }, + "default" : { + "launchtype" : "local" + }, + "mp-weixin" : { + "launchtype" : "local" + }, + "type" : "uniCloud" }, { "playground" : "custom", diff --git a/pageProduct/index/components/edit-guige.vue b/pageProduct/index/components/edit-guige.vue index 2cec517..965057b 100644 --- a/pageProduct/index/components/edit-guige.vue +++ b/pageProduct/index/components/edit-guige.vue @@ -10,18 +10,20 @@ 当前状态 - + + - + 售罄 + @@ -44,6 +46,7 @@ $updateProductStatus,$updateProductData, $tbProskuConV2 } from '@/http/yskApi/goods.js' + import {hasPermission} from '@/commons/utils/hasPermission.js' import infoBox from '@/commons/utils/infoBox.js' const props = defineProps({ show: { @@ -98,7 +101,8 @@ } function open() { - + hasShangXiajia() + hasShouQing() } function save() { @@ -113,8 +117,20 @@ ...par }]) } - + + let canShangXiaJia=ref(false) + async function hasShangXiajia(tips=false){ + canShangXiaJia.value=await hasPermission({text:'允许上下架商品',tips}) + } + let canShouQing=ref(false) + async function hasShouQing(tips=false){ + canShouQing.value=await hasPermission({text:'允许售罄商品',tips}) + } + async function isGroundingChange(e) { + if(!canShangXiaJia.value){ + return + } await upDateGoods({ key:'grounding', value: e @@ -124,6 +140,9 @@ } async function isPauseSaleChange(e) { + if(!canShouQing.value){ + return + } console.log(e); await upDateGoods({ key:'pauseSale', From 09781b82e19f07aeab46a6064c6d579381df66f8 Mon Sep 17 00:00:00 2001 From: YeMingfei666 <1619116647@qq.com> Date: Thu, 10 Oct 2024 11:46:00 +0800 Subject: [PATCH 02/33] =?UTF-8?q?=E5=8F=B0=E6=A1=8C=E5=88=97=E8=A1=A8?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=20=E5=BD=93=E5=8F=B0=E6=A1=8C=E7=8A=B6?= =?UTF-8?q?=E6=80=81=E4=B8=BA=E5=BC=80=E5=8F=B0=E4=B8=AD=E6=97=B6=20?= =?UTF-8?q?=E5=A6=82=E6=9E=9C=E5=8F=B0=E6=A1=8C=E6=B2=A1=E6=9C=89=E8=BF=94?= =?UTF-8?q?=E5=9B=9E=E4=B8=8B=E5=8D=95=E7=94=9F=E6=88=90=E8=AE=A2=E5=8D=95?= =?UTF-8?q?id=EF=BC=8C=20=E5=B0=86=E5=8F=B0=E6=A1=8C=E5=BD=93=E5=81=9A?= =?UTF-8?q?=E7=A9=BA=E9=97=B2=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pageTable/index/components/table-item.vue | 42 ++++++++++++++++------- 1 file changed, 30 insertions(+), 12 deletions(-) diff --git a/pageTable/index/components/table-item.vue b/pageTable/index/components/table-item.vue index 1d61d8d..0e72eb1 100644 --- a/pageTable/index/components/table-item.vue +++ b/pageTable/index/components/table-item.vue @@ -1,5 +1,5 @@