From 02eb974bcf9f85a4a6594540fab97007abef4291 Mon Sep 17 00:00:00 2001
From: Mr.Shi <1878285526@qq.com>
Date: 星期二, 19 九月 2023 09:19:24 +0800
Subject: [PATCH] 企业端
---
platform/src/views/business/goods.vue | 32 +++++++++++++++++---------------
1 files changed, 17 insertions(+), 15 deletions(-)
diff --git a/platform/src/views/business/goods.vue b/platform/src/views/business/goods.vue
index c7e81df..8992e61 100644
--- a/platform/src/views/business/goods.vue
+++ b/platform/src/views/business/goods.vue
@@ -58,18 +58,17 @@
<template slot-scope="{row}">
<div style="display: flex; align-items: center;">
<div style="width: 70px; height: 70px; flex-shrink: 0;">
- <el-image v-if="row.imgurl" style="width: 70px; height: 70px" :src="row.prefixUrl + row.imgurl"
- :preview-src-list="[row.prefixUrl + row.imgurl]" fit="cover"></el-image>
+ <el-image v-if="row.imgurl" style="width: 70px; height: 70px" :src="row.fullImgUrl"
+ :preview-src-list="[row.fullImgUrl]" fit="cover"></el-image>
</div>
- {{ row.name }}
+ <span style="margin-left: 15px">{{ row.name }}</span>
</div>
</template>
</el-table-column>
<el-table-column prop="brandName" label="鍝佺墝" min-width="100px"></el-table-column>
<el-table-column prop="categoryName" label="绫诲埆" min-width="100px"></el-table-column>
- <el-table-column prop="baseZdPrice" label="鎸囧浠凤紙鍏冿級" min-width="100px"></el-table-column>
- <el-table-column prop="basePrice" label="閲囪喘浠�(鍏�)" min-width="100px"></el-table-column>
- <el-table-column prop="price" label="鍏ユ墜浠凤紙鍏冿級" min-width="100px"></el-table-column>
+ <el-table-column prop="zdPrice" label="鎸囧浠凤紙鍏冿級" min-width="100px"></el-table-column>
+ <el-table-column prop="price" label="閲囪喘浠�(鍏�)" min-width="100px"></el-table-column>
<el-table-column prop="createDate" label="鍒涘缓鏃堕棿" min-width="100px"></el-table-column>
<el-table-column prop="status" label="鐘舵��" min-width="100px">
<template slot-scope="{row}">
@@ -105,8 +104,8 @@
import Pagination from '@/components/common/Pagination'
import OperaGoodsWindow from '@/components/business/OperaGoodsWindow'
import selectProduct from '@/components/business/selectProduct'
-import { brand, category, importExcel } from '@/api/system/common.js'
-import { updateDisableById, queryById, exportDoc, batchUpdateDisableById } from '@/api/business/goods.js'
+import { brand, baseCategory, importExcel } from '@/api/system/common.js'
+import { updateStatus, queryById, exportDoc } from '@/api/business/goods.js'
export default {
name: 'Goods',
extends: BaseTable,
@@ -122,6 +121,7 @@
brandId: ''
},
ids: '',
+ idList: [],
categoryList: [],
brandList: [],
statusList: [
@@ -145,6 +145,7 @@
handleSelectionChange(e) {
let arr = e.map(item => item.id)
this.ids = arr.join(',')
+ this.idList = arr;
console.log(this.ids)
},
// 鎵归噺涓婁笅鏋�
@@ -153,11 +154,12 @@
this.$message.warning({ message: '鑷冲皯閫夋嫨涓�椤瑰唴瀹�' })
return
}
- batchUpdateDisableById({
- ids: this.ids,
+ updateStatus({
+ idList: this.idList,
status: type
}).then(res => {
- this.$message.success({ message: res })
+ this.$tip.apiSuccess('鎿嶄綔鎴愬姛');
+ // this.$message.success({ message:res.message })
this.search()
})
},
@@ -222,8 +224,8 @@
})
},
changeStatus(item) {
- updateDisableById({
- id: item.id,
+ updateStatus({
+ idList: [item.id],
status: item.status
}).then(res => {
this.$tip.apiSuccess('鏇存柊鎴愬姛')
@@ -238,13 +240,13 @@
return nums;
},
getbrand() {
- brand({})
+ brand({type:1})
.then(res => {
this.brandList = res
})
},
getcategory() {
- category({})
+ baseCategory({})
.then(res => {
this.categoryList = res
})
--
Gitblit v1.9.3