|
@@ -3,13 +3,11 @@
|
|
<!-- 顶部操作区域 -->
|
|
<!-- 顶部操作区域 -->
|
|
<div class="filter-container">
|
|
<div class="filter-container">
|
|
<div class="filter-control">
|
|
<div class="filter-control">
|
|
- <span>ID:</span>
|
|
|
|
|
|
+ <span>商品ID:</span>
|
|
<el-input
|
|
<el-input
|
|
- v-model="listQuery.reportId"
|
|
|
|
- style="width: 120px"
|
|
|
|
- placeholder="ID"
|
|
|
|
|
|
+ v-model="listQuery.productId"
|
|
|
|
+ placeholder="商品ID"
|
|
clearable
|
|
clearable
|
|
- @input="(e) => (listQuery.reportId = checkedInput(e))"
|
|
|
|
@keyup.enter.native="getList"
|
|
@keyup.enter.native="getList"
|
|
@clear="getList"
|
|
@clear="getList"
|
|
/>
|
|
/>
|
|
@@ -17,7 +15,7 @@
|
|
<div class="filter-control">
|
|
<div class="filter-control">
|
|
<span>商品名称:</span>
|
|
<span>商品名称:</span>
|
|
<el-input
|
|
<el-input
|
|
- v-model="listQuery.productName"
|
|
|
|
|
|
+ v-model="listQuery.name"
|
|
placeholder="商品名称"
|
|
placeholder="商品名称"
|
|
clearable
|
|
clearable
|
|
@keyup.enter.native="getList"
|
|
@keyup.enter.native="getList"
|
|
@@ -25,95 +23,121 @@
|
|
/>
|
|
/>
|
|
</div>
|
|
</div>
|
|
<div class="filter-control">
|
|
<div class="filter-control">
|
|
- <span>机构名称:</span>
|
|
|
|
|
|
+ <span>供应商名称:</span>
|
|
<el-input
|
|
<el-input
|
|
- v-model="listQuery.clubName"
|
|
|
|
- placeholder="机构名称"
|
|
|
|
|
|
+ v-model="listQuery.shopName"
|
|
|
|
+ placeholder="供应商名称"
|
|
clearable
|
|
clearable
|
|
@keyup.enter.native="getList"
|
|
@keyup.enter.native="getList"
|
|
@clear="getList"
|
|
@clear="getList"
|
|
/>
|
|
/>
|
|
</div>
|
|
</div>
|
|
<div class="filter-control">
|
|
<div class="filter-control">
|
|
- <span>报备人:</span>
|
|
|
|
- <el-input
|
|
|
|
- v-model="listQuery.reportName"
|
|
|
|
- style="width: 120px"
|
|
|
|
- placeholder="报备人"
|
|
|
|
- clearable
|
|
|
|
- @keyup.enter.native="getList"
|
|
|
|
- @clear="getList"
|
|
|
|
- />
|
|
|
|
|
|
+ <span>商品状态:</span>
|
|
|
|
+ <el-select v-model="listQuery.validFlag" style="width: 120px" clearable @change="getList">
|
|
|
|
+ <el-option value="" label="请选择" />
|
|
|
|
+ <el-option :value="1" label="上架" />
|
|
|
|
+ <el-option :value="2" label="下架" />
|
|
|
|
+ </el-select>
|
|
</div>
|
|
</div>
|
|
<div class="filter-control">
|
|
<div class="filter-control">
|
|
- <span>审核状态:</span>
|
|
|
|
- <el-select v-model="listQuery.status" style="width: 120px" clearable @change="getList">
|
|
|
|
|
|
+ <span>是否含税:</span>
|
|
|
|
+ <el-select v-model="listQuery.includedTax" style="width: 120px" clearable @change="getList">
|
|
<el-option value="" label="请选择" />
|
|
<el-option value="" label="请选择" />
|
|
- <el-option :value="1" label="待审核" />
|
|
|
|
- <el-option :value="2" label="审核通过" />
|
|
|
|
- <el-option :value="3" label="审核未通过" />
|
|
|
|
|
|
+ <el-option :value="0" label="不含税" />
|
|
|
|
+ <el-option :value="1" label="含税" />
|
|
</el-select>
|
|
</el-select>
|
|
</div>
|
|
</div>
|
|
<div class="filter-control">
|
|
<div class="filter-control">
|
|
- <span>提交时间:</span>
|
|
|
|
- <el-date-picker
|
|
|
|
- v-model="time"
|
|
|
|
- type="daterange"
|
|
|
|
- unlink-panels
|
|
|
|
- value-format="yyyy-MM-dd"
|
|
|
|
- range-separator="至"
|
|
|
|
- start-placeholder="开始日期"
|
|
|
|
- end-placeholder="结束日期"
|
|
|
|
- :picker-options="pickerOptions"
|
|
|
|
- @change="getList"
|
|
|
|
- />
|
|
|
|
|
|
+ <span>发票:</span>
|
|
|
|
+ <el-select v-model="listQuery.invoiceType" style="width: 120px" clearable @change="getList">
|
|
|
|
+ <el-option value="" label="请选择" />
|
|
|
|
+ <el-option :value="1" label="增值税专用发票" />
|
|
|
|
+ <el-option :value="2" label="增值税普通发票" />
|
|
|
|
+ <el-option :value="3" label="不能开票" />
|
|
|
|
+ </el-select>
|
|
</div>
|
|
</div>
|
|
<div class="filter-control">
|
|
<div class="filter-control">
|
|
<el-button type="primary" @click="getList"> 查询 </el-button>
|
|
<el-button type="primary" @click="getList"> 查询 </el-button>
|
|
|
|
+ <el-button type="primary" @click="getList"> 上线商品 </el-button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<!-- 列表 -->
|
|
<!-- 列表 -->
|
|
- <el-table v-loading="isLoading" :data="list" border style="width: 100%" height="650">
|
|
|
|
- <el-table-column prop="reportId" label="ID" align="center" width="50" />
|
|
|
|
- <el-table-column prop="mainImage" label="商品图片" align="center" width="100">
|
|
|
|
|
|
+ <el-table v-loading="isLoading" :data="list" border style="width: 100%" height="660">
|
|
|
|
+ <el-table-column prop="productId" label="商品Id" align="center" width="80" />
|
|
|
|
+ <el-table-column prop="mainImage" label="商品图片" align="center" width="150">
|
|
<template v-if="row.mainImage" slot-scope="{ row }">
|
|
<template v-if="row.mainImage" slot-scope="{ row }">
|
|
<el-popover placement="top-start" title="" width="180" trigger="hover">
|
|
<el-popover placement="top-start" title="" width="180" trigger="hover">
|
|
- <img :src="row.mainImage" alt="" style="width: 100px; height: 100px" />
|
|
|
|
- <img slot="reference" :src="row.mainImage" alt="" style="width: 50px; height: 50px" />
|
|
|
|
|
|
+ <img :src="row.mainImage" alt="" style="width: 150px; height: 150px" />
|
|
|
|
+ <img slot="reference" :src="row.mainImage" alt="" style="width: 80px; height: 80px" />
|
|
</el-popover>
|
|
</el-popover>
|
|
</template>
|
|
</template>
|
|
|
|
+ <template v-else>
|
|
|
|
+ <span>---</span>
|
|
|
|
+ </template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
- <el-table-column prop="productName" label="商品名称" align="center" width="200" />
|
|
|
|
- <el-table-column prop="clubName" label="机构名称" align="center" width="180" />
|
|
|
|
- <el-table-column prop="reportName" label="报备人" align="center" width="120" />
|
|
|
|
- <el-table-column prop="reportText" label="报备事由" align="center" />
|
|
|
|
- <el-table-column prop="addTime" label="创建时间" align="center" width="100">
|
|
|
|
|
|
+ <el-table-column prop="name" label="商品名称" align="center" />
|
|
|
|
+ <el-table-column prop="shopName" label="供应商名称" align="center" />
|
|
|
|
+ <el-table-column prop="price" label="售价" align="center" width="200">
|
|
<template slot-scope="{ row }">
|
|
<template slot-scope="{ row }">
|
|
- {{ row.addTime ? row.addTime : '---' }}
|
|
|
|
|
|
+ {{ row.price | amountfilters }}
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
- <el-table-column prop="status" label="审核状态" align="center" width="100">
|
|
|
|
|
|
+ <el-table-column prop="price" label="成本价/比例" align="center" width="100">
|
|
<template slot-scope="{ row }">
|
|
<template slot-scope="{ row }">
|
|
- <el-tag v-if="row.status === 1" type="warning" size="small">待审核</el-tag>
|
|
|
|
- <el-tag v-else-if="row.status === 2" type="success" size="small">已审核</el-tag>
|
|
|
|
- <el-tag v-else type="danger" size="small">审核未通过</el-tag>
|
|
|
|
|
|
+ <span v-if="row.costType === 1">{{ row.costPrice | amountfilters }}</span>
|
|
|
|
+ <span v-else>{{ row.shopPercent }}%</span>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
- <el-table-column prop="auditName" label="审核人" align="center" width="120" />
|
|
|
|
- <el-table-column prop="auditTime" label="审核时间" align="center" width="100">
|
|
|
|
|
|
+ <el-table-column prop="price" label="是否含税" align="center">
|
|
<template slot-scope="{ row }">
|
|
<template slot-scope="{ row }">
|
|
- {{ row.auditTime ? row.auditTime : '---' }}
|
|
|
|
|
|
+ <p>
|
|
|
|
+ <span>{{ row.includedTax === 0 ? '不含税' : '含税' }}</span>
|
|
|
|
+ <span>-</span>
|
|
|
|
+ <span>{{ row.invoiceType | invoiceFilters }}</span>
|
|
|
|
+ </p>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
- <el-table-column label="操作" align="center" width="220">
|
|
|
|
|
|
+ <el-table-column prop="validFlag" label="商品状态" align="center" width="180">
|
|
<template slot-scope="{ row }">
|
|
<template slot-scope="{ row }">
|
|
- <el-button type="primary" size="mini" style="margin: 2px" @click="handleExamine(row)"> 审核 </el-button>
|
|
|
|
- <el-button type="primary" size="mini" style="margin: 2px" @click="handleRecordDetail(row)"> 查看 </el-button>
|
|
|
|
- <el-button type="danger" size="mini" style="margin: 2px" @click="handleDelete(row)"> 删除 </el-button>
|
|
|
|
|
|
+ <el-tag v-if="row.validFlag === 2" type="info" size="small">已下架</el-tag>
|
|
|
|
+ <el-tag v-else type="success" size="small">已上架</el-tag>
|
|
|
|
+ <el-button
|
|
|
|
+ v-if="row.validFlag === 2"
|
|
|
|
+ type="success"
|
|
|
|
+ size="mini"
|
|
|
|
+ style="margin: 4px"
|
|
|
|
+ @click="handleShangeStatus(row.id, row.status)"
|
|
|
|
+ >
|
|
|
|
+ 上架
|
|
|
|
+ </el-button>
|
|
|
|
+ <el-button
|
|
|
|
+ v-else
|
|
|
|
+ type="warning"
|
|
|
|
+ size="mini"
|
|
|
|
+ style="margin: 4px"
|
|
|
|
+ @click="handleShangeStatus(row.id, row.status)"
|
|
|
|
+ >
|
|
|
|
+ 下架
|
|
|
|
+ </el-button>
|
|
|
|
+ </template>
|
|
|
|
+ </el-table-column>
|
|
|
|
+ <el-table-column prop="addTime" label="添加时间" align="center" width="100">
|
|
|
|
+ <template slot-scope="{ row }">
|
|
|
|
+ {{ row.addTime ? row.addTime : '---' }}
|
|
|
|
+ </template>
|
|
|
|
+ </el-table-column>
|
|
|
|
+ <el-table-column fixed="right" label="操作" align="center" width="180">
|
|
|
|
+ <template slot-scope="{ row }">
|
|
|
|
+ <el-button type="primary" size="mini" style="margin: 2px" @click="handleRecordDetail(3, row)">
|
|
|
|
+ 编辑
|
|
|
|
+ </el-button>
|
|
|
|
+ <el-button type="danger" size="mini" style="margin: 2px" @click="handleRecordDetail(3, row)">
|
|
|
|
+ 删除
|
|
|
|
+ </el-button>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
</el-table>
|
|
</el-table>
|
|
-
|
|
|
|
<!-- 页码 -->
|
|
<!-- 页码 -->
|
|
<pagination
|
|
<pagination
|
|
:total="total"
|
|
:total="total"
|
|
@@ -121,70 +145,40 @@
|
|
:page-size="20"
|
|
:page-size="20"
|
|
:page.sync="listQuery.pageNum"
|
|
:page.sync="listQuery.pageNum"
|
|
:limit.sync="listQuery.pageSize"
|
|
:limit.sync="listQuery.pageSize"
|
|
- @pagination="getReportList"
|
|
|
|
|
|
+ @pagination="getHeHeProductList"
|
|
/>
|
|
/>
|
|
- <el-dialog title="审核" :visible.sync="dialogFormVisible" width="440px">
|
|
|
|
- <el-form ref="dataForm" :rules="rules" :model="form" label-position="right">
|
|
|
|
- <el-form-item label="状态:" prop="status">
|
|
|
|
- <el-select v-model="form.status" placeholder="请选择">
|
|
|
|
- <el-option label="请选择" value="" />
|
|
|
|
- <el-option label="审核通过" :value="2" />
|
|
|
|
- <el-option label="审核不通过" :value="3" />
|
|
|
|
- </el-select>
|
|
|
|
- </el-form-item>
|
|
|
|
- <el-form-item prop="auditText">
|
|
|
|
- <el-input
|
|
|
|
- v-model="form.auditText"
|
|
|
|
- type="textarea"
|
|
|
|
- placeholder="请填写备注,200字以内"
|
|
|
|
- maxlength="200"
|
|
|
|
- :autosize="{ minRows: 5, maxRows: 5 }"
|
|
|
|
- />
|
|
|
|
- </el-form-item>
|
|
|
|
- </el-form>
|
|
|
|
- <div slot="footer" class="dialog-footer">
|
|
|
|
- <el-button @click="closeDialog">取消</el-button>
|
|
|
|
- <el-button type="primary" @click="handleReportCount">确定</el-button>
|
|
|
|
- </div>
|
|
|
|
- </el-dialog>
|
|
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script>
|
|
<script>
|
|
-import { getReportList, reportCount, deleteReport } from '@/api/user/consult/consult'
|
|
|
|
-import pickerOptions from '@/utils/time-picker.js'
|
|
|
|
-const defaultListQuery = {
|
|
|
|
- reportId: '', // 报备Id
|
|
|
|
- productName: '', // 咨询商品名称
|
|
|
|
- clubName: '', // 机构名称
|
|
|
|
- reportName: '', // 报备人
|
|
|
|
- status: '', // 状态 1.已审核 2.待审核 3.审核未通过
|
|
|
|
- startAddTime: '', // 开始时间
|
|
|
|
- endAddTime: '', // 结束时间
|
|
|
|
- pageNum: 1,
|
|
|
|
- pageSize: 20
|
|
|
|
-}
|
|
|
|
|
|
+import { getHeHeProductList } from '@/api/stricts/mall/mall'
|
|
export default {
|
|
export default {
|
|
- name: 'ReportList',
|
|
|
|
- filters: {},
|
|
|
|
|
|
+ name: 'ProductsList',
|
|
|
|
+ filters: {
|
|
|
|
+ invoiceFilters(value) {
|
|
|
|
+ const map = {
|
|
|
|
+ 1: '普通发票',
|
|
|
|
+ 2: '增值税发票',
|
|
|
|
+ 3: '不开发票'
|
|
|
|
+ }
|
|
|
|
+ return map[value]
|
|
|
|
+ }
|
|
|
|
+ },
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
isLoading: true,
|
|
isLoading: true,
|
|
- pickerOptions,
|
|
|
|
- time: '',
|
|
|
|
- listQuery: Object.assign({}, defaultListQuery),
|
|
|
|
- list: [],
|
|
|
|
- total: 0,
|
|
|
|
- dialogFormVisible: false,
|
|
|
|
- form: {
|
|
|
|
- reportId: '',
|
|
|
|
- status: '',
|
|
|
|
- auditText: ''
|
|
|
|
|
|
+ listQuery: {
|
|
|
|
+ productId: '', // 商品id,
|
|
|
|
+ name: '', // 商品名称,
|
|
|
|
+ shopName: '', // / 供应商名称,
|
|
|
|
+ validFlag: '', // 上架状态:1上架,2下架,
|
|
|
|
+ includedTax: '', // 是否含税 0不含税,1含税,
|
|
|
|
+ invoiceType: '', // 发票类型(基于是否含税基础) 1增值税专用发票,2增值税普通发票, 3不能开票,
|
|
|
|
+ pageNum: 1,
|
|
|
|
+ pageSize: 20
|
|
},
|
|
},
|
|
- rules: {
|
|
|
|
- status: [{ required: true, message: '请选择审核状态', trigger: 'blur' }],
|
|
|
|
- auditText: [{ required: true, message: '请填写备注', trigger: 'blur' }]
|
|
|
|
- }
|
|
|
|
|
|
+ list: [],
|
|
|
|
+ total: 0
|
|
}
|
|
}
|
|
},
|
|
},
|
|
computed: {},
|
|
computed: {},
|
|
@@ -195,23 +189,15 @@ export default {
|
|
methods: {
|
|
methods: {
|
|
// 获取行为记录列表
|
|
// 获取行为记录列表
|
|
getList() {
|
|
getList() {
|
|
- this.listQuery.pageNum = 1
|
|
|
|
this.list = []
|
|
this.list = []
|
|
- if (this.time && this.time.length > 0) {
|
|
|
|
- this.listQuery.startAddTime = this.time[0]
|
|
|
|
- this.listQuery.endAddTime = this.time[1]
|
|
|
|
- } else {
|
|
|
|
- this.listQuery.startAddTime = ''
|
|
|
|
- this.listQuery.endAddTime = ''
|
|
|
|
- }
|
|
|
|
- this.getReportList()
|
|
|
|
|
|
+ this.listQuery.pageNum = 1
|
|
|
|
+ this.getHeHeProductList()
|
|
},
|
|
},
|
|
-
|
|
|
|
- // 获取关键词列表
|
|
|
|
- async getReportList() {
|
|
|
|
|
|
+ // 获取首页导航列表
|
|
|
|
+ async getHeHeProductList() {
|
|
try {
|
|
try {
|
|
this.isLoading = true
|
|
this.isLoading = true
|
|
- const res = await getReportList(this.listQuery)
|
|
|
|
|
|
+ const res = await getHeHeProductList(this.listQuery)
|
|
this.list = res.data.results
|
|
this.list = res.data.results
|
|
this.total = res.data.totalRecord
|
|
this.total = res.data.totalRecord
|
|
this.isLoading = false
|
|
this.isLoading = false
|
|
@@ -219,74 +205,34 @@ export default {
|
|
console.log(error)
|
|
console.log(error)
|
|
}
|
|
}
|
|
},
|
|
},
|
|
- // 审核报备
|
|
|
|
- handleExamine(row) {
|
|
|
|
- this.form.reportId = row.reportId
|
|
|
|
- this.dialogFormVisible = true
|
|
|
|
- },
|
|
|
|
- // 确定审核
|
|
|
|
- async handleReportCount() {
|
|
|
|
- try {
|
|
|
|
- await this.$refs.dataForm.validate()
|
|
|
|
- this.reportCount(this.form)
|
|
|
|
- } catch (error) {
|
|
|
|
- console.log(error)
|
|
|
|
- }
|
|
|
|
- },
|
|
|
|
- // 调用审核报备
|
|
|
|
- async reportCount(params) {
|
|
|
|
- await reportCount(params)
|
|
|
|
- this.$message.success('审核成功')
|
|
|
|
- this.closeDialog()
|
|
|
|
- this.getList()
|
|
|
|
- },
|
|
|
|
- // 添加标签取消
|
|
|
|
- closeDialog() {
|
|
|
|
- this.$refs.dataForm.resetFields()
|
|
|
|
- this.dialogFormVisible = false
|
|
|
|
- },
|
|
|
|
- async handleDelete(row) {
|
|
|
|
- try {
|
|
|
|
- await this.$confirm('确定删除该报备吗?', {
|
|
|
|
- confirmButtonText: '确定',
|
|
|
|
- cancelButtonText: '取消',
|
|
|
|
- type: 'warning'
|
|
|
|
- })
|
|
|
|
- this.deleteReport(row)
|
|
|
|
- } catch (error) {
|
|
|
|
- this.$message.info('已取消删除操作')
|
|
|
|
- }
|
|
|
|
- },
|
|
|
|
- // 调用删除报备
|
|
|
|
- async deleteReport(row) {
|
|
|
|
|
|
+ // 菜单排序
|
|
|
|
+ async consultSort(row) {
|
|
try {
|
|
try {
|
|
- await deleteReport(row.reportId)
|
|
|
|
- this.$message.success('操作成功')
|
|
|
|
|
|
+ // await consultSort({ id: row.id, sortNumber: row.sortNumber })
|
|
this.getList()
|
|
this.getList()
|
|
} catch (error) {
|
|
} catch (error) {
|
|
console.log(error)
|
|
console.log(error)
|
|
}
|
|
}
|
|
- },
|
|
|
|
- // 机构跳转
|
|
|
|
- handleClubHrefLink(row) {
|
|
|
|
- return (
|
|
|
|
- process.env.VUE_APP_ADMIN_URL +
|
|
|
|
- `/a/user/jumpLink/toOldAdmin?type=1&clubId=${row.clubId}&clubName=${row.corporateName}`
|
|
|
|
- )
|
|
|
|
- },
|
|
|
|
- // 查看详情
|
|
|
|
- handleRecordDetail(row) {
|
|
|
|
- this.$router.push({
|
|
|
|
- path: '/user/consult/detail',
|
|
|
|
- query: { reportId: row.reportId }
|
|
|
|
- })
|
|
|
|
- },
|
|
|
|
- checkedInput(event) {
|
|
|
|
- const pattern = /[^0-9.]/g
|
|
|
|
- return event.replace(pattern, '')
|
|
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
</script>
|
|
|
|
|
|
-<style></style>
|
|
|
|
|
|
+<style>
|
|
|
|
+.avatar-uploader .el-upload {
|
|
|
|
+ border: 1px dashed #d9d9d9;
|
|
|
|
+ border-radius: 6px;
|
|
|
|
+ cursor: pointer;
|
|
|
|
+ position: relative;
|
|
|
|
+ overflow: hidden;
|
|
|
|
+ float: left;
|
|
|
|
+}
|
|
|
|
+.uploader-tips {
|
|
|
|
+ position: absolute;
|
|
|
|
+ bottom: 0;
|
|
|
|
+ left: 160px;
|
|
|
|
+ line-height: 28px;
|
|
|
|
+ color: red;
|
|
|
|
+ margin: 0;
|
|
|
|
+}
|
|
|
|
+</style>
|