|
@@ -27,11 +27,11 @@
|
|
<el-select
|
|
<el-select
|
|
clearable
|
|
clearable
|
|
placeholder="请选择审核状态"
|
|
placeholder="请选择审核状态"
|
|
- v-model="searchForm.product_status">
|
|
|
|
|
|
+ v-model="searchForm.product_check_status">
|
|
<el-option
|
|
<el-option
|
|
:label="item.name"
|
|
:label="item.name"
|
|
:value="item.value"
|
|
:value="item.value"
|
|
- v-for="item in arrProductStatus"
|
|
|
|
|
|
+ v-for="item in arrProductCheckStatus"
|
|
:key="item.value"></el-option>
|
|
:key="item.value"></el-option>
|
|
</el-select>
|
|
</el-select>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
@@ -122,8 +122,8 @@
|
|
<el-table-column label="店铺名称" prop="shop_name" min-width="160" show-overflow-tooltip>
|
|
<el-table-column label="店铺名称" prop="shop_name" min-width="160" show-overflow-tooltip>
|
|
<template slot-scope="scope">{{ scope.row.shop_name }}</template>
|
|
<template slot-scope="scope">{{ scope.row.shop_name }}</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
- <el-table-column label="审核状态" prop="product_status" min-width="100">
|
|
|
|
- <template slot-scope="scope">{{ getStatusTextAndColor(scope.row).product_status_text }}</template>
|
|
|
|
|
|
+ <el-table-column label="审核状态" prop="product_check_status" min-width="100">
|
|
|
|
+ <template slot-scope="scope">{{ getText(arrProductCheckStatus, scope.row.product_check_status + '') }}</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
<el-table-column label="申请时间" prop="created_at" min-width="160"></el-table-column>
|
|
<el-table-column label="申请时间" prop="created_at" min-width="160"></el-table-column>
|
|
<el-table-column label="审核人" prop="product_check_name" min-width="80"></el-table-column>
|
|
<el-table-column label="审核人" prop="product_check_name" min-width="80"></el-table-column>
|
|
@@ -183,8 +183,21 @@ export default {
|
|
arrProductSaleType() {
|
|
arrProductSaleType() {
|
|
return this.$store.state.common.arrProductSaleType
|
|
return this.$store.state.common.arrProductSaleType
|
|
},
|
|
},
|
|
- arrProductStatus() {
|
|
|
|
- return this.$store.state.common.arrProductStatus
|
|
|
|
|
|
+ arrProductCheckStatus() {
|
|
|
|
+ return [
|
|
|
|
+ {
|
|
|
|
+ name: '未审核',
|
|
|
|
+ value: '0'
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ name: '审核成功',
|
|
|
|
+ value: '1'
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ name: '审核失败',
|
|
|
|
+ value: '2'
|
|
|
|
+ }
|
|
|
|
+ ]
|
|
}
|
|
}
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
@@ -192,32 +205,12 @@ export default {
|
|
this.detailsDialog.exData = row
|
|
this.detailsDialog.exData = row
|
|
this.detailsDialog.show = true
|
|
this.detailsDialog.show = true
|
|
},
|
|
},
|
|
- getStatusTextAndColor(row) {
|
|
|
|
- // product_check_status 0未审核 1审核成功 2审核失败
|
|
|
|
- // product_status 0 未上架 1 上架
|
|
|
|
-
|
|
|
|
- const productStatus = row.product_status
|
|
|
|
- const productCheckStatus = row.product_check_status
|
|
|
|
- let color = 'col-0'
|
|
|
|
- let text = ''
|
|
|
|
-
|
|
|
|
- if (productCheckStatus === 0) {
|
|
|
|
- color = 'col-1'
|
|
|
|
- text = '审核中'
|
|
|
|
- } else if (productCheckStatus === 2) {
|
|
|
|
- color = 'col-3'
|
|
|
|
- text = '审核未通过'
|
|
|
|
- } else if (productCheckStatus === 1 && productStatus === 1) {
|
|
|
|
- color = 'col-2'
|
|
|
|
- text = '已上架'
|
|
|
|
- } else if (productCheckStatus === 1 && productStatus === 0) {
|
|
|
|
- text = '未上架'
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- return {
|
|
|
|
- product_status_text: text,
|
|
|
|
- product_status_color: color
|
|
|
|
|
|
+ getText(arr, value) {
|
|
|
|
+ const temp = arr.filter(item => item.value === value)
|
|
|
|
+ if (temp.length > 0) {
|
|
|
|
+ return temp[0].name
|
|
}
|
|
}
|
|
|
|
+ return ''
|
|
}
|
|
}
|
|
},
|
|
},
|
|
mounted() {
|
|
mounted() {
|