{{ $t('common.edit') }}
{{ $t('product.shelveson') }}
{{ $t('product.shelvesoff') }}
+ {{ $t('product.platshelveson') }}
+ {{ $t('product.platshelvesoff') }}
{{ $t('product.setmemberprice') }}
{{ $t('common.delete') }}
@@ -222,7 +232,7 @@ import {
clearProductMember,
productExport,
getBrandList,
- getGroupSelect
+ getGroupSelect, getClassifyPlatStart
} from '@/api/commodity'
import { storehouseGetAll } from '@/api/shopSys'
export default {
@@ -351,7 +361,7 @@ export default {
// that.$router.push({ name: 'addCommodity', params: { id: '1' }})
}
});
-
+
},
async checkGroupAndStoreHouse(){
const storehouseRes = await storehouseGetAll({ page: 1, pageSize: 10
@@ -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 =