From 9da1abfbd83d0f72f82f205ea92ce16154cd4cb9 Mon Sep 17 00:00:00 2001 From: "DESKTOP-GMUNQ1B\\k" <1154079537@qq.com> Date: Wed, 13 Mar 2024 11:52:35 +0800 Subject: [PATCH] =?UTF-8?q?=E5=95=86=E5=93=81=E9=AB=98=E4=BA=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/product/productExamine/index.vue | 291 ++++++++++++--------- 1 file changed, 165 insertions(+), 126 deletions(-) diff --git a/src/views/product/productExamine/index.vue b/src/views/product/productExamine/index.vue index d9173b6..4670504 100644 --- a/src/views/product/productExamine/index.vue +++ b/src/views/product/productExamine/index.vue @@ -3,10 +3,12 @@
- + - + @@ -17,74 +19,86 @@ - + - - - + + + - + - + - - - - - - - - - - - - - - - - - - - - - 搜索 - 重置 - - -
+ + + + + + + + + + + + + + + + + + + + + 搜索 + 重置 + + + - - + +
- 批量审核 - 批量强制下架 - 批量不显示 - 批量显示 - 批量设置标签 - 批量设置推荐 + 批量审核 + 批量强制下架 + 批量不显示 + 批量显示 + 批量设置标签 + 批量设置推荐
- - + + @@ -259,7 +269,7 @@ // +---------------------------------------------------------------------- // | CRMEB [ CRMEB赋能开发者,助力企业发展 ] // +---------------------------------------------------------------------- -// | Copyright (c) 2016~2024 https://www.crmeb.com All rights reserved. +// | Copyright (c) 2016~2023 https://www.crmeb.com All rights reserved. // +---------------------------------------------------------------------- // | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权 // +---------------------------------------------------------------------- @@ -422,8 +432,15 @@ export default { this.getLabelLst() }, methods: { + + tableRowClassName({ row, rowIndex }) { + if (this.product_id == row.product_id) { + return "success-row" + } + }, + /**重置 */ - searchReset(){ + searchReset() { this.$refs.searchForm.resetFields() this.getList(1) }, @@ -446,6 +463,7 @@ export default { }, // 预览 handlePreview(id) { + this.product_id = id; this.previewVisible = true this.goodsId = id this.previewKey = '' @@ -490,13 +508,13 @@ export default { }).catch(res => { this.$message.error(res.message) }) : - updatetProductLabel(this.product_id, this.labelForm).then(({ message }) => { - this.$message.success(message) - this.getList('') - this.dialogLabel = false - }).catch(res => { - this.$message.error(res.message) - }) + updatetProductLabel(this.product_id, this.labelForm).then(({ message }) => { + this.$message.success(message) + this.getList('') + this.dialogLabel = false + }).catch(res => { + this.$message.error(res.message) + }) } else { return } @@ -532,10 +550,10 @@ export default { rank: info.rank, star: info.star } - if(info.is_benefit === 1) this.checkboxGroup.push('is_benefit') - if(info.is_hot === 1) this.checkboxGroup.push('is_hot') - if(info.is_best === 1) this.checkboxGroup.push('is_best') - if(info.is_new === 1) this.checkboxGroup.push('is_new') + if (info.is_benefit === 1) this.checkboxGroup.push('is_benefit') + if (info.is_hot === 1) this.checkboxGroup.push('is_hot') + if (info.is_best === 1) this.checkboxGroup.push('is_best') + if (info.is_new === 1) this.checkboxGroup.push('is_new') this.fullscreenLoading = false }).catch(res => { this.$message.error(res.message) @@ -543,6 +561,7 @@ export default { }) }, onEdit(id) { + this.product_id = id; this.productId = id this.getInfo(id) this.dialogVisible = true @@ -555,7 +574,7 @@ export default { handleSubmit(name) { console.log(this.formValidate) this.$refs[name].validate((valid) => { - if(valid) { + if (valid) { productUpdateApi(this.productId, this.formValidate).then(async res => { this.fullscreenLoading = false this.$message.success(res.message) @@ -589,7 +608,7 @@ export default { }, // 批量下架 batchOff() { - if(this.multipleSelection.length === 0) return this.$message.warning('请先选择商品') + if (this.multipleSelection.length === 0) return this.$message.warning('请先选择商品') this.toOff(this.OffId) }, // 批量设置标签 @@ -603,15 +622,15 @@ export default { }, // 批量显示不显示 batchShow(status) { - if(this.multipleSelection.length === 0) return this.$message.warning('请先选择商品') - let data = {status: status,ids: this.OffId} - batchesOnOffApi(data).then(res => { + if (this.multipleSelection.length === 0) return this.$message.warning('请先选择商品') + let data = { status: status, ids: this.OffId } + batchesOnOffApi(data).then(res => { this.$message.success(res.message) this.getList('') }) - .catch(res => { - this.$message.error(res.message) - }) + .catch(res => { + this.$message.error(res.message) + }) }, // 下架 toOff(id) { @@ -622,7 +641,7 @@ export default { inputType: 'textarea', inputPlaceholder: '请输入强制下架原因', inputValidator: (value) => { - if(!value) { + if (!value) { return '请输入强制下架原因' } } @@ -667,7 +686,7 @@ export default { }) }, batch() { - if(this.multipleSelection.length === 0) return this.$message.warning('请先选择商品') + if (this.multipleSelection.length === 0) return this.$message.warning('请先选择商品') this.$refs.infoFrom.dialogVisible = true this.isShow = false }, @@ -680,6 +699,7 @@ export default { this.OffId = data }, toExamine(id) { + this.product_id = id; this.$refs.infoFrom.dialogVisible = true this.isShow = true this.$refs.infoFrom.getInfo(id) @@ -718,15 +738,18 @@ export default {