|
@@ -23,6 +23,7 @@
|
|
|
:key="item.value"></el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
+ <!-- TODO 状态取值 -->
|
|
|
<el-form-item label="状态:">
|
|
|
<el-select
|
|
|
clearable
|
|
@@ -48,6 +49,7 @@
|
|
|
class="marginT-10 order-table"
|
|
|
border
|
|
|
:max-height="vheight">
|
|
|
+ <el-table-column label="商品货号" prop="product_code" min-width="140"></el-table-column>
|
|
|
<el-table-column label="农产品名字" prop="product_title" min-width="200" show-overflow-tooltip></el-table-column>
|
|
|
<el-table-column label="农产品描述" prop="product_desc" min-width="200" show-overflow-tooltip></el-table-column>
|
|
|
<el-table-column label="商品主图" prop="product_img_url" min-width="100">
|
|
@@ -59,33 +61,10 @@
|
|
|
</el-image>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column label="商品轮播图" prop="product_rotation_img_list" min-width="100">
|
|
|
- <template slot-scope="scope">
|
|
|
- <template v-if="scope.row.product_rotation_img_list.length > 0">
|
|
|
- <el-image
|
|
|
- style="display:block;width: 80px; height: 80px;font-size: 0;"
|
|
|
- :src="scope.row.product_rotation_img_list[0]"
|
|
|
- :preview-src-list="scope.row.product_rotation_img_list">
|
|
|
- </el-image>
|
|
|
- </template>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column label="商品详情图" prop="product_detail_img_list" min-width="100">
|
|
|
- <template slot-scope="scope">
|
|
|
- <template v-if="scope.row.product_detail_img_list.length > 0">
|
|
|
- <el-image
|
|
|
- style="display:block;width: 80px; height: 80px;font-size: 0;"
|
|
|
- :src="scope.row.product_detail_img_list[0]"
|
|
|
- :preview-src-list="scope.row.product_detail_img_list">
|
|
|
- </el-image>
|
|
|
- </template>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
<el-table-column label="分类" prop="product_category_name"></el-table-column>
|
|
|
<el-table-column label="商品品牌" prop="product_brand_name"></el-table-column>
|
|
|
<el-table-column label="商品规格" prop="product_spec"></el-table-column>
|
|
|
<el-table-column label="单位" prop="product_unit"></el-table-column>
|
|
|
- <el-table-column label="商品货号" prop="product_code" min-width="140"></el-table-column>
|
|
|
<el-table-column label="批发价(元)" prop="product_all_price" min-width="100">
|
|
|
<template slot-scope="scope">{{ scope.row.product_all_price | fen2Yuan }}</template>
|
|
|
</el-table-column>
|
|
@@ -93,24 +72,24 @@
|
|
|
<template slot-scope="scope">{{ scope.row.product_price | fen2Yuan }}</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column label="库存" prop="product_count"></el-table-column>
|
|
|
- <el-table-column label="发售时间" prop="product_sale_at" min-width="160">
|
|
|
- <template slot-scope="scope">{{ scope.row.product_sale_at > 0 ? scope.row.product_sale_at : '' }}</template>
|
|
|
- </el-table-column>
|
|
|
<el-table-column label="类型" prop="product_sale_at">
|
|
|
<template slot-scope="scope">{{ scope.row.product_sale_at > 0 ? '现货' : '预售' }}</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column label="申请人" prop="user_id" show-overflow-tooltip>
|
|
|
+ <el-table-column label="发售时间" prop="product_sale_at" min-width="160">
|
|
|
+ <template slot-scope="scope">{{ scope.row.product_sale_at > 0 ? scope.row.product_sale_at : '' }}</template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="农户信息" prop="user_id" show-overflow-tooltip>
|
|
|
<template slot-scope="scope">
|
|
|
- {{ scope.row.user_id }}{{ scope.row.user_name ? scope.row.user_name + '/' : '' }}
|
|
|
+ {{ scope.row.user_id }}{{ scope.row.user_name ? '/' + scope.row.user_name : '' }}
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column label="店铺名称" prop="shop_name" show-overflow-tooltip>
|
|
|
- <template slot-scope="scope">{{ scope.row.shop_name }}</template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column label="审核状态" prop="product_status">
|
|
|
+ <el-table-column label="状态" prop="product_status">
|
|
|
<template slot-scope="scope">{{ getProductStatusText(scope.row.product_status) }}</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column label="申请时间" prop="created_at" min-width="160"></el-table-column>
|
|
|
+ <el-table-column label="优秀推荐" prop="product_is_recommend" min-width="160">
|
|
|
+ <template slot-scope="scope">{{ scope.row.product_is_recommend === 1 ? '是' : '否' }}</template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="创建时间" prop="product_check_at" min-width="160"></el-table-column>
|
|
|
<el-table-column label="操作">
|
|
|
<template slot-scope="scope">
|
|
|
<el-button type="text" @click="edit(scope.row)">操作</el-button>
|
|
@@ -166,27 +145,10 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
- add() {
|
|
|
- this.detailsDialog.exData = {}
|
|
|
- this.detailsDialog.show = true
|
|
|
- },
|
|
|
edit(row) {
|
|
|
this.detailsDialog.exData = row
|
|
|
this.detailsDialog.show = true
|
|
|
},
|
|
|
- del(row) {
|
|
|
- this.$confirm('确定要删除吗', '确认', {
|
|
|
- confirmButtonText: '确定',
|
|
|
- cancelButtonText: '取消',
|
|
|
- type: 'warning'
|
|
|
- }).then(async () => {
|
|
|
- const data = await this.$fetch('/api/auth/department/del', { id: row.id })
|
|
|
- if (data.code == 200) {
|
|
|
- this.$message.success('删除成功')
|
|
|
- this.init()
|
|
|
- }
|
|
|
- }).catch(() => {})
|
|
|
- },
|
|
|
getProductStatusText(val) {
|
|
|
const index = this.arrProductStatus.findIndex(item => item.value === val)
|
|
|
if (index > -1) {
|