From 55e205da04b7f3420974a21fc0459e285d0df323 Mon Sep 17 00:00:00 2001 From: lwh <2679599887@qq.com> Date: Wed, 28 Jun 2023 14:47:13 +0800 Subject: [PATCH] =?UTF-8?q?feat=20=E6=B7=BB=E5=8A=A0=E5=95=86=E5=93=81?= =?UTF-8?q?=E4=B8=8A=E4=B8=8B=E6=9E=B6=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/business/GoodsManager/Goodss/goods.js | 9 ++++ .../Goodss/components/AddDialog.vue | 19 ++++++- .../Goodss/components/EditDialog.vue | 36 ++++++++++++- .../business/GoodsManager/Goodss/index.vue | 51 ++++++++++++++++++- .../components/EditDialog.vue | 5 +- 5 files changed, 111 insertions(+), 9 deletions(-) diff --git a/src/api/business/GoodsManager/Goodss/goods.js b/src/api/business/GoodsManager/Goodss/goods.js index 9ff5b6d..935c966 100644 --- a/src/api/business/GoodsManager/Goodss/goods.js +++ b/src/api/business/GoodsManager/Goodss/goods.js @@ -45,6 +45,15 @@ export function addOrUpdateGoods(data) { }) } +// 上下架商品 +export function shelfGoods(data) { + return request({ + url: '/business/Goods/shelfGoods', + method: 'put', + data: data, + }) +} + // 商品删除 export function delGoods(ids) { return request({ diff --git a/src/views/business/GoodsManager/Goodss/components/AddDialog.vue b/src/views/business/GoodsManager/Goodss/components/AddDialog.vue index d133cb9..fb159b1 100644 --- a/src/views/business/GoodsManager/Goodss/components/AddDialog.vue +++ b/src/views/business/GoodsManager/Goodss/components/AddDialog.vue @@ -52,7 +52,7 @@ - @@ -173,6 +173,9 @@ +
+ 获取富文本内容 +
@@ -503,6 +506,12 @@ async function getGoodsServicesList() { }) } +async function handleCopyRichText() { + let text = await navigator.clipboard.writeText(formData.goodsDetails); + modal.msgSuccess("富文本内容复制成功") +} + + // 基础信息表单 const baseFormRef = ref(); @@ -646,4 +655,12 @@ const handleResetClick = async (formElList) => { .el-divider { margin: 50px 0; } + + +.copy-btn-box{ + width: 100%; + display: flex; + justify-content: right; + margin-bottom: 15px; +} \ No newline at end of file diff --git a/src/views/business/GoodsManager/Goodss/components/EditDialog.vue b/src/views/business/GoodsManager/Goodss/components/EditDialog.vue index a2177a9..4bfd06a 100644 --- a/src/views/business/GoodsManager/Goodss/components/EditDialog.vue +++ b/src/views/business/GoodsManager/Goodss/components/EditDialog.vue @@ -48,7 +48,7 @@ - @@ -169,6 +169,9 @@ +
+ 获取富文本内容 +
@@ -199,7 +202,7 @@
-
建议视频宽高比19:9,建议时长8-45秒
@@ -504,6 +507,11 @@ async function getGoodsSkuListFun() { }) } +async function handleCopyRichText() { + let text = await navigator.clipboard.writeText(formData.goodsDetails); + modal.msgSuccess("富文本内容复制成功") +} + // -基础参数 const props = defineProps({ @@ -615,3 +623,27 @@ const closeDialog = () => { }; + + + diff --git a/src/views/business/GoodsManager/Goodss/index.vue b/src/views/business/GoodsManager/Goodss/index.vue index 761a680..e1db63e 100644 --- a/src/views/business/GoodsManager/Goodss/index.vue +++ b/src/views/business/GoodsManager/Goodss/index.vue @@ -56,6 +56,16 @@ {{ $t('btn.add') }}
+ + + 上架 + + + + + 下架 + + @@ -110,6 +120,10 @@ v-hasPermi="['business:goods:addOrUpdate']">编辑 删除 + 上架 + 下架 @@ -131,7 +145,7 @@