优化店铺配置
This commit is contained in:
@@ -56,18 +56,27 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="商品规格" prop="typeEnum">
|
||||
|
||||
|
||||
</el-table-column>
|
||||
<el-table-column label="销量/库存">
|
||||
<el-table-column label="库存">
|
||||
<template v-slot="scope">
|
||||
<span>{{ scope.row.realSalesNumber }}/{{ scope.row.stockNumber }}</span>
|
||||
<span>{{ scope.row.stockNumber }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="耗材信息">
|
||||
<template v-slot="scope">
|
||||
<div v-if="scope.row.conInfos.length">{{ scope.row.conInfos.join(',') }}</div>
|
||||
<el-button type="text" icon="el-icon-edit" v-else>绑定</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="上架区域">
|
||||
<template v-slot="scope">
|
||||
<div v-if="scope.row.isShowCash">收银端</div>
|
||||
<div v-if="scope.row.isShowMall">小程序</div>
|
||||
<div v-if="!scope.row.isShowCash && !scope.row.isShowMall">未上架</div>
|
||||
<!-- <el-button type="text" icon="el-icon-edit" v-if="scope.row.isShowCash">收银端</el-button>
|
||||
<el-button type="text" icon="el-icon-edit" v-if="scope.row.isShowMall">小程序</el-button>
|
||||
<el-button type="text" icon="el-icon-edit"
|
||||
v-if="!scope.row.isShowCash && !scope.row.isShowMall">未上架</el-button> -->
|
||||
<el-switch v-model="scope.row.isGrounding" :active-value="1" :inactive-value="0"
|
||||
@change="changeHot($event, scope.row)"></el-switch>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="排序" prop="sort" sortable />
|
||||
@@ -98,8 +107,9 @@
|
||||
</el-table>
|
||||
</div>
|
||||
<div class="head-container">
|
||||
<el-pagination :total="tableData.total" @size-change="handleSizeChange" :current-page="tableData.page + 1" :page-size="tableData.size"
|
||||
@current-change="paginationChange" layout="total, sizes, prev, pager, next, jumper"></el-pagination>
|
||||
<el-pagination :total="tableData.total" @size-change="handleSizeChange" :current-page="tableData.page + 1"
|
||||
:page-size="tableData.size" @current-change="paginationChange"
|
||||
layout="total, sizes, prev, pager, next, jumper"></el-pagination>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@@ -108,7 +118,7 @@
|
||||
import Sortable from 'sortablejs'
|
||||
import dayjs from 'dayjs'
|
||||
import settings from '@/settings'
|
||||
import { tbProduct, tbShopCategoryGet, tbProductDelete, tbProductIsHot, upProSort } from '@/api/shop'
|
||||
import { tbProductListV2, tbShopCategoryGet, tbProductDelete, tbProductIsHot, upProSort } from '@/api/shop'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
@@ -131,7 +141,7 @@ export default {
|
||||
}
|
||||
},
|
||||
async mounted() {
|
||||
console.log(this.$route.query.productId,'tiaoshi1')
|
||||
console.log(this.$route.query.productId, 'tiaoshi1')
|
||||
if (this.$route.query.productId) {
|
||||
this.query.productId = this.$route.query.productId
|
||||
}
|
||||
@@ -212,14 +222,14 @@ export default {
|
||||
}
|
||||
|
||||
this.tableData.loading = true
|
||||
console.log(this.query,'调试2')
|
||||
const res = await tbProduct({
|
||||
console.log(this.query, '调试2')
|
||||
const res = await tbProductListV2({
|
||||
page: this.tableData.page,
|
||||
size: this.tableData.size,
|
||||
name: this.query.name,
|
||||
categoryId: this.query.categoryId,
|
||||
id: this.query.productId,
|
||||
typeEnum: this.query.typeEnum,
|
||||
type: this.query.typeEnum,
|
||||
shopId: localStorage.getItem('shopId')
|
||||
})
|
||||
this.tableData.loading = false
|
||||
@@ -230,9 +240,9 @@ export default {
|
||||
}
|
||||
},
|
||||
handleSizeChange(val) {
|
||||
this.tableData.size = val
|
||||
this.getTableData()
|
||||
},
|
||||
this.tableData.size = val
|
||||
this.getTableData()
|
||||
},
|
||||
// 获取商品分类列表
|
||||
async tbShopCategoryGet() {
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user