| | |
| | | @selection-change="handleSelectionChange" |
| | | > |
| | | <el-table-column type="selection" width="55"></el-table-column> |
| | | <el-table-column prop="imgurl" label="商品信息" min-width="100px"> |
| | | <el-table-column prop="imgurl" label="商品信息" min-width="80px"> |
| | | <template slot-scope="{row}"> |
| | | <el-image style="width: 80px;height: 80px;" v-if="row.imgurl && row.imgurl!=''" :src="row.resourcePath+row.imgurl" :preview-src-list="[row.resourcePath+row.imgurl]"></el-image> |
| | | <el-image style="width: 50px;height: 50px;" v-if="row.imgurl && row.imgurl!=''" :src="row.resourcePath+row.imgurl" :preview-src-list="[row.resourcePath+row.imgurl]"></el-image> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="id" label="商品ID" min-width="150px" ></el-table-column> |
| | |
| | | <el-table-column prop="categoryName" label="所属分类" min-width="120px"></el-table-column> |
| | | <el-table-column prop="brandName" label="所属品牌" min-width="120px"></el-table-column> |
| | | <el-table-column prop="price" label="展示价格" min-width="100px"></el-table-column> |
| | | <el-table-column prop="stockNum" label="剩余库存量" min-width="100px"></el-table-column> |
| | | <el-table-column prop="salesVolume" label="实际销量" min-width="100px"></el-table-column> |
| | | <el-table-column prop="skuPrice" label="零售价(元)" min-width="100px"></el-table-column> |
| | | <el-table-column prop="skuPrice" label="销售价(元)" min-width="100px"></el-table-column> |
| | | <el-table-column prop="shopPrice" label="供货价设置" min-width="100px" align="center"> |
| | | <template slot-scope="{row}" > |
| | | <div @click="goPriceSet(row)" style="cursor:pointer;"><span class="red"> {{row.shopPriceNum||0}}</span> / <span class="green"> {{row.shopNum||0}}</span> </div> |
| | | <div @click="goPriceSet(row)" style="cursor:pointer;"><span class="red"> {{row.pricedShopNum||0}}</span> / <span class="green"> {{row.shopNum||0}}</span> </div> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="stockNum" label="剩余库存量" min-width="100px"></el-table-column> |
| | | <el-table-column prop="salesVolume" label="实际销量" min-width="100px"></el-table-column> |
| | | <el-table-column prop="editDate" label="最近更新时间" min-width="100px"></el-table-column> |
| | | <el-table-column prop="status" label="上下架状态" min-width="100px" fixed="right" align="center"> |
| | | <template slot-scope="{row}"> |
| | |
| | | fixed="right" |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <el-button type="text" @click="$refs.operaGoodsWindow.open('编辑商品', row, 0)" v-permissions="['business:goods:update']">编辑</el-button> |
| | | <el-button type="text" v-if="row.status == 1" @click="$refs.operaGoodsWindow.open('编辑商品', row, 0)" v-permissions="['business:goods:update']">编辑</el-button> |
| | | <el-button type="text" @click="goPriceSet(row)">供货价</el-button> |
| | | <el-button type="text" style="color: red;" @click="deleteById(row)" v-permissions="['business:goods:delete']">删除</el-button> |
| | | <!-- <el-button type="text" @click="$refs.operaGoodsDetailWindow.open('商品详情', row, 0)">查看详情</el-button>--> |
| | | <!-- <el-button type="text" @click="$refs.operaGoodsDetailWindow.open('商品详情', row, 0)">查看详情</el-button>--> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | |
| | | <OperaGoodsWindow ref="operaGoodsWindow" @success="handlePageChange"/> |
| | | <OperaGoodsDetailWindow ref="operaGoodsDetailWindow"/> |
| | | <OperaPlatformGoodsSkuWindow ref="operaPlatformGoodsSkuWindow"/> |
| | | <OperaShopGoodsWindow ref="OperaShopGoodsWindow" @success="priceSuccess"/> |
| | | </TableLayout> |
| | | </template> |
| | | |
| | |
| | | import OperaGoodsWindow from '@/components/business/OperaGoodsWindow' |
| | | import OperaGoodsDetailWindow from '@/components/business/OperaGoodsDetailWindow' |
| | | import OperaPlatformGoodsSkuWindow from '@/components/business/OperaPlatformGoodsSkuWindow' |
| | | import OperaShopGoodsWindow from '@/components/business/OperaShopGoodsWindow' |
| | | import { findAll as labelList } from '@/api/business/labels' |
| | | export default { |
| | | name: 'Goods', |
| | | extends: BaseTable, |
| | | components: { TableLayout, Pagination, OperaGoodsWindow, OperaGoodsDetailWindow, OperaPlatformGoodsSkuWindow }, |
| | | components: { TableLayout, Pagination, OperaGoodsWindow, OperaGoodsDetailWindow, OperaPlatformGoodsSkuWindow ,OperaShopGoodsWindow}, |
| | | data () { |
| | | return { |
| | | activeName: 'first', |
| | |
| | | }) |
| | | }, |
| | | methods: { |
| | | priceSuccess(){ |
| | | this.handlePageChange() |
| | | }, |
| | | goPriceSet(row){ |
| | | |
| | | if(row.skuPrice == null){ |
| | | this.$tip.warning('请先设置商品销售价!') |
| | | return |
| | | } |
| | | this.$refs.OperaShopGoodsWindow.open('设置供货价 - '+row.name, row ) |
| | | }, |
| | | handleClick (val) { |
| | | |
| | | }, |
| | | /** |
| | | * |
| | |
| | | statusChangeBiz (rows) { |
| | | this.api.updateStatus(rows) |
| | | .then(() => { |
| | | this.search() |
| | | this.handlePageChange() |
| | | }) |
| | | .catch(e => { |
| | | this.search() |
| | | this.handlePageChange() |
| | | }) |
| | | } |
| | | } |