|
@@ -80,8 +80,15 @@
|
|
:rowKey="(record) => record.id"
|
|
:rowKey="(record) => record.id"
|
|
:columns="columns"
|
|
:columns="columns"
|
|
:data="loadData"
|
|
:data="loadData"
|
|
- :scroll="{ x: 1940, y: tableHeight }"
|
|
|
|
|
|
+ :scroll="{ x: 1510, y: tableHeight }"
|
|
bordered>
|
|
bordered>
|
|
|
|
+ <!-- 产品图片 -->
|
|
|
|
+ <template slot="imageUrl" slot-scope="text, record">
|
|
|
|
+ <div v-if="record.productPicList && record.productPicList.length>0">
|
|
|
|
+ <img :src="record.productPicList[0].imageUrl || ''" width="30" height="30" class="imageUrl" @click="inited(record.productPicList)" />
|
|
|
|
+ </div>
|
|
|
|
+ <span v-else>--</span>
|
|
|
|
+ </template>
|
|
<!-- 产品分类 -->
|
|
<!-- 产品分类 -->
|
|
<template slot="productType" slot-scope="text, record">
|
|
<template slot="productType" slot-scope="text, record">
|
|
<span v-if="record.productTypeName2 || record.productTypeName3">{{ record.productTypeName2 }} {{ record.productTypeName3 ? '>' : '' }} {{ record.productTypeName3 }}</span>
|
|
<span v-if="record.productTypeName2 || record.productTypeName3">{{ record.productTypeName2 }} {{ record.productTypeName3 ? '>' : '' }} {{ record.productTypeName3 }}</span>
|
|
@@ -142,6 +149,17 @@ export default {
|
|
}
|
|
}
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
|
|
+ inited (viewer) {
|
|
|
|
+ if (viewer) {
|
|
|
|
+ const imageUrl = []
|
|
|
|
+ viewer.map(item => {
|
|
|
|
+ imageUrl.push(item.imageUrl)
|
|
|
|
+ })
|
|
|
|
+ this.$viewerApi({
|
|
|
|
+ images: imageUrl
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ },
|
|
// 重置
|
|
// 重置
|
|
resetSearchForm () {
|
|
resetSearchForm () {
|
|
this.queryParam.code = ''
|
|
this.queryParam.code = ''
|
|
@@ -158,33 +176,34 @@ export default {
|
|
// 设置表头
|
|
// 设置表头
|
|
getColumns () {
|
|
getColumns () {
|
|
this.columns = [
|
|
this.columns = [
|
|
- { title: '序号', dataIndex: 'no', width: 80, align: 'center', fixed: 'left' },
|
|
|
|
|
|
+ { title: '序号', dataIndex: 'no', width: 70, align: 'center', fixed: 'left' },
|
|
{ title: '产品编码', dataIndex: 'code', align: 'center', customRender: function (text) { return text || '--' } },
|
|
{ title: '产品编码', dataIndex: 'code', align: 'center', customRender: function (text) { return text || '--' } },
|
|
{ title: '产品名称', dataIndex: 'name', align: 'center', customRender: function (text) { return text || '--' } },
|
|
{ title: '产品名称', dataIndex: 'name', align: 'center', customRender: function (text) { return text || '--' } },
|
|
{ title: '原厂编码', dataIndex: 'origCode', align: 'center', customRender: function (text) { return text || '--' } },
|
|
{ title: '原厂编码', dataIndex: 'origCode', align: 'center', customRender: function (text) { return text || '--' } },
|
|
- { title: '产品品牌', dataIndex: 'productBrandName', width: 200, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
- { title: '产品分类', scopedSlots: { customRender: 'productType' }, width: 200, align: 'center' }
|
|
|
|
|
|
+ { title: '产品图片', scopedSlots: { customRender: 'imageUrl' }, width: 80, align: 'center' },
|
|
|
|
+ { title: '产品品牌', dataIndex: 'productBrandName', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
+ { title: '产品分类', scopedSlots: { customRender: 'productType' }, width: 100, align: 'center' }
|
|
]
|
|
]
|
|
const cArr = [
|
|
const cArr = [
|
|
- { title: '终端价', dataIndex: 'terminalPrice', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
|
- { title: '车主价', dataIndex: 'carOwnersPrice', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
|
- { title: '创建时间', dataIndex: 'createDate', width: 160, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
- { title: '状态', dataIndex: 'onlineFalgDictValue', width: 140, align: 'center', customRender: function (text) { return text || '--' } }
|
|
|
|
|
|
+ { title: '终端价', dataIndex: 'terminalPrice', width: 80, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
|
+ { title: '车主价', dataIndex: 'carOwnersPrice', width: 80, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
|
+ { title: '创建时间', dataIndex: 'createDate', width: 140, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
+ { title: '状态', dataIndex: 'onlineFalgDictValue', width: 80, align: 'center', customRender: function (text) { return text || '--' } }
|
|
]
|
|
]
|
|
getCurrentDealer().then(res => {
|
|
getCurrentDealer().then(res => {
|
|
if (res.status == 200) {
|
|
if (res.status == 200) {
|
|
if (res.data.dealerLevel && res.data.dealerLevel == 'PROVINCE') { // 省级
|
|
if (res.data.dealerLevel && res.data.dealerLevel == 'PROVINCE') { // 省级
|
|
this.columns.push(
|
|
this.columns.push(
|
|
- { title: '省级价', dataIndex: 'provincePrice', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
|
- { title: '市级价', dataIndex: 'cityPrice', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } }
|
|
|
|
|
|
+ { title: '省级价', dataIndex: 'provincePrice', width: 80, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
|
+ { title: '市级价', dataIndex: 'cityPrice', width: 80, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } }
|
|
)
|
|
)
|
|
} else if (res.data.dealerLevel && res.data.dealerLevel == 'CITY') { // 市级
|
|
} else if (res.data.dealerLevel && res.data.dealerLevel == 'CITY') { // 市级
|
|
this.columns.push(
|
|
this.columns.push(
|
|
- { title: '市级价', dataIndex: 'cityPrice', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } }
|
|
|
|
|
|
+ { title: '市级价', dataIndex: 'cityPrice', width: 80, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } }
|
|
)
|
|
)
|
|
}
|
|
}
|
|
if (res.data.isShowSpecialPrice && res.data.isShowSpecialPrice == '1') { // 是否展示特约价
|
|
if (res.data.isShowSpecialPrice && res.data.isShowSpecialPrice == '1') { // 是否展示特约价
|
|
- this.columns.push({ title: '特约价', dataIndex: 'specialPrice', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
|
|
|
|
|
|
+ this.columns.push({ title: '特约价', dataIndex: 'specialPrice', width: 80, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
|
|
}
|
|
}
|
|
this.columns = [...this.columns, ...cArr]
|
|
this.columns = [...this.columns, ...cArr]
|
|
}
|
|
}
|