|
|
@ -69,7 +69,7 @@ |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="stockNumber" :label="$t('product.inventory')" show-overflow-tooltip /> |
|
|
|
<el-table-column prop="volume" :label="$t('product.salesvolume')" show-overflow-tooltip /> |
|
|
|
<el-table-column prop="volume" :label="$t('product.shelvestate')" show-overflow-tooltip> |
|
|
|
<el-table-column :label="$t('product.shelvestate')" show-overflow-tooltip> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<span v-if="scope.row.shelveState==0">{{ $t('product.notlistedyet') }}</span> |
|
|
|
<span v-if="scope.row.shelveState==1">{{ $t('product.alreadylisted') }}</span> |
|
|
@ -77,15 +77,25 @@ |
|
|
|
<span v-if="scope.row.shelveState==3">{{ $t('product.auditfailure') }}</span> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column :label="$t('product.plat_shelve_state')" width="120"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<span v-if="scope.row.platShelveState==0">{{ $t('product.notlistedyet') }}</span> |
|
|
|
<span v-if="scope.row.platShelveState==1">{{ $t('product.alreadylisted') }}</span> |
|
|
|
<span v-if="scope.row.platShelveState==2">{{ $t('product.tobereviewed') }}</span> |
|
|
|
<span v-if="scope.row.platShelveState==3">{{ $t('product.auditfailure') }}</span> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="reject" :label="$t('product.causeofrejection')" show-overflow-tooltip /> |
|
|
|
<el-table-column :formatter="row=>getBrandName(row)" :label="$t('product.brand')" show-overflow-tooltip /> |
|
|
|
<el-table-column prop="createTime" :label="$t('common.createTime')" width="180" /> |
|
|
|
<el-table-column :label="$t('common.operate')" width="200"> |
|
|
|
<el-table-column :label="$t('common.operate')" width="200" fixed="right"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<div class="btnList"> |
|
|
|
<el-button type="text" @click="edit(scope.row)">{{ $t('common.edit') }}</el-button> |
|
|
|
<el-button v-if="scope.row.shelveState==0" type="text" @click="down(scope.row)">{{ $t('product.shelveson') }}</el-button> |
|
|
|
<el-button v-if="scope.row.shelveState==1" type="text" @click="down(scope.row)">{{ $t('product.shelvesoff') }}</el-button> |
|
|
|
<el-button v-if="scope.row.platShelveState==0" type="text" @click="platDown(scope.row)">{{ $t('product.platshelveson') }}</el-button> |
|
|
|
<el-button v-if="scope.row.platShelveState==1" type="text" @click="platDown(scope.row)">{{ $t('product.platshelvesoff') }}</el-button> |
|
|
|
<el-button v-if="scope.row.shelveState==1" type="text" @click="setVipPrice(scope.row)">{{ $t('product.setmemberprice') }}</el-button> |
|
|
|
<el-button v-if="scope.row.shelveState!=1" type="text" @click="del(scope.row)">{{ $t('common.delete') }}</el-button> |
|
|
|
</div> |
|
|
@ -222,7 +232,7 @@ import { |
|
|
|
clearProductMember, |
|
|
|
productExport, |
|
|
|
getBrandList, |
|
|
|
getGroupSelect |
|
|
|
getGroupSelect, getClassifyPlatStart |
|
|
|
} from '@/api/commodity' |
|
|
|
import { storehouseGetAll } from '@/api/shopSys' |
|
|
|
export default { |
|
|
@ -554,6 +564,35 @@ export default { |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
// 平台上下架 |
|
|
|
async platDown(row) { |
|
|
|
if (row.platShelveState) { |
|
|
|
const res = await getClassifyPlatStart({ |
|
|
|
productId: row.productId, |
|
|
|
shelveState: 0 |
|
|
|
}) |
|
|
|
if (res.code === '') { |
|
|
|
this.$message({ |
|
|
|
type: 'success', |
|
|
|
message: '下架成功!' |
|
|
|
}) |
|
|
|
this.getAll(this.formInline) |
|
|
|
} |
|
|
|
} else { |
|
|
|
const res = await getClassifyPlatStart({ |
|
|
|
productId: row.productId, |
|
|
|
shelveState: 1 |
|
|
|
}) |
|
|
|
if (res.code === '') { |
|
|
|
this.$message({ |
|
|
|
type: 'success', |
|
|
|
message: '上架成功!' |
|
|
|
}) |
|
|
|
this.getAll(this.formInline) |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
// 初始化查询所有数据 |
|
|
|
async getAll(formInline) { |
|
|
|
this.formInline.classifyId = |
|
|
|