|
|
@@ -63,6 +63,17 @@
|
|
|
{{ row.realSales | TableItemEmpty }}
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
+ <el-table-column prop="hot" align="center" label="是否热门推荐">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-switch
|
|
|
+ v-model="scope.row.recommendStatus"
|
|
|
+ active-color="#13ce66"
|
|
|
+ inactive-color="#B9B9B9"
|
|
|
+ @change="goodsHotChange(scope.row)"
|
|
|
+ >
|
|
|
+ </el-switch>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
<el-table-column label="审核状态" align="center" prop="auditStatus">
|
|
|
<template slot-scope="{ row }">
|
|
|
<StatusTag :status-vo="row.auditStatus | AuditStatusOptionFilter(true)" />
|
|
|
@@ -120,7 +131,8 @@
|
|
|
import { merchantCategoryTree } from "@/api/platformClass";
|
|
|
import {
|
|
|
productAuditList,
|
|
|
- productAudit
|
|
|
+ productAudit,
|
|
|
+ productRecommendStatus
|
|
|
} from "@/api/goods.js";
|
|
|
import getListApi from "@/mixins/getListApi";
|
|
|
import { AuditStatusEnum, AuditStatusOption } from '@/utils/statusEnum.js'
|
|
|
@@ -244,27 +256,13 @@ export default {
|
|
|
})
|
|
|
},
|
|
|
|
|
|
- // getList() {
|
|
|
- // this.loading = true;
|
|
|
- // this.queryParams["startTime"] = undefined;
|
|
|
- // this.queryParams["endTime"] = undefined;
|
|
|
- // if (null != this.daterangeCreateTime && "" != this.daterangeCreateTime) {
|
|
|
- // this.queryParams["startTime"] = this.daterangeCreateTime[0];
|
|
|
- // this.queryParams["endTime"] = this.daterangeCreateTime[1];
|
|
|
- // }
|
|
|
- // productAuditList(this.queryParams).then((response) => {
|
|
|
- // response.rows.map((v, i) => {
|
|
|
- // if (v.productCategoryList && v.productCategoryList.length > 0) {
|
|
|
- // let arr = v.productCategoryList.map(item => item.categoryName);
|
|
|
- // v.productCategoryText = arr.join(",");
|
|
|
- // }
|
|
|
- // })
|
|
|
- // this.list = response.rows;
|
|
|
- // this.total = response.total;
|
|
|
- // this.loading = false;
|
|
|
- // });
|
|
|
- // },
|
|
|
-
|
|
|
+ goodsHotChange(row) {
|
|
|
+ productRecommendStatus(row.productId).then(res => {
|
|
|
+ if (res && res.data.code == 200) {
|
|
|
+ this.getList()
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
|
|
|
|
|
|
handleUpdate(row) {
|