| | |
| | | <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}"> |
| | |
| | | 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, |
| | |
| | | brandId: '' |
| | | }, |
| | | ids: '', |
| | | idList: [], |
| | | categoryList: [], |
| | | brandList: [], |
| | | statusList: [ |
| | |
| | | handleSelectionChange(e) { |
| | | let arr = e.map(item => item.id) |
| | | this.ids = arr.join(',') |
| | | this.idList = arr; |
| | | console.log(this.ids) |
| | | }, |
| | | // 批量上下架 |
| | |
| | | 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() |
| | | }) |
| | | }, |
| | |
| | | }) |
| | | }, |
| | | changeStatus(item) { |
| | | updateDisableById({ |
| | | id: item.id, |
| | | updateStatus({ |
| | | idList: [item.id], |
| | | status: item.status |
| | | }).then(res => { |
| | | this.$tip.apiSuccess('更新成功') |
| | |
| | | return nums; |
| | | }, |
| | | getbrand() { |
| | | brand({}) |
| | | brand({type:1}) |
| | | .then(res => { |
| | | this.brandList = res |
| | | }) |
| | | }, |
| | | getcategory() { |
| | | category({}) |
| | | baseCategory({}) |
| | | .then(res => { |
| | | this.categoryList = res |
| | | }) |