|
@@ -17,12 +17,12 @@
|
|
</a-col>
|
|
</a-col>
|
|
<a-col :md="6" :sm="24">
|
|
<a-col :md="6" :sm="24">
|
|
<a-form-item label="产品名称">
|
|
<a-form-item label="产品名称">
|
|
- <a-input id="productChangeRecordList-productName" v-model.trim="queryParam.productName" allowClear placeholder="请输入产品名称"/>
|
|
|
|
|
|
+ <a-input id="productChangeRecordList-name" v-model.trim="queryParam.name" allowClear placeholder="请输入产品名称"/>
|
|
</a-form-item>
|
|
</a-form-item>
|
|
</a-col>
|
|
</a-col>
|
|
<a-col :md="6" :sm="24">
|
|
<a-col :md="6" :sm="24">
|
|
<a-form-item label="产品编码">
|
|
<a-form-item label="产品编码">
|
|
- <a-input id="productChangeRecordList-productCode" v-model.trim="queryParam.productCode" allowClear placeholder="请输入产品编码"/>
|
|
|
|
|
|
+ <a-input id="productChangeRecordList-code" v-model.trim="queryParam.code" allowClear placeholder="请输入产品编码"/>
|
|
</a-form-item>
|
|
</a-form-item>
|
|
</a-col>
|
|
</a-col>
|
|
<template v-if="advanced">
|
|
<template v-if="advanced">
|
|
@@ -30,9 +30,9 @@
|
|
<a-form-item label="品牌">
|
|
<a-form-item label="品牌">
|
|
<a-select
|
|
<a-select
|
|
placeholder="请选择"
|
|
placeholder="请选择"
|
|
- id="productChangeRecordList-productBrandSn"
|
|
|
|
|
|
+ id="productChangeRecordList-brandSn"
|
|
allowClear
|
|
allowClear
|
|
- v-model="queryParam.productBrandSn"
|
|
|
|
|
|
+ v-model="queryParam.brandSn"
|
|
:showSearch="true"
|
|
:showSearch="true"
|
|
option-filter-prop="children"
|
|
option-filter-prop="children"
|
|
:filter-option="filterOption">
|
|
:filter-option="filterOption">
|
|
@@ -44,12 +44,14 @@
|
|
<a-form-item label="产品分类">
|
|
<a-form-item label="产品分类">
|
|
<a-cascader
|
|
<a-cascader
|
|
@change="changeProductType"
|
|
@change="changeProductType"
|
|
|
|
+ expand-trigger="hover"
|
|
change-on-select
|
|
change-on-select
|
|
:options="productTypeList"
|
|
:options="productTypeList"
|
|
:fieldNames="{ label: 'productTypeName', value: 'id', children: 'children' }"
|
|
:fieldNames="{ label: 'productTypeName', value: 'id', children: 'children' }"
|
|
- id="productChangeRecordList-productType"
|
|
|
|
|
|
+ id="productInfoList-productType"
|
|
placeholder="请选择产品分类"
|
|
placeholder="请选择产品分类"
|
|
- allowClear />
|
|
|
|
|
|
+ allowClear
|
|
|
|
+ v-model="productType" />
|
|
</a-form-item>
|
|
</a-form-item>
|
|
</a-col>
|
|
</a-col>
|
|
</template>
|
|
</template>
|
|
@@ -81,12 +83,33 @@
|
|
bordered>
|
|
bordered>
|
|
<!-- 产品分类 -->
|
|
<!-- 产品分类 -->
|
|
<template slot="productType" slot-scope="text, record">
|
|
<template slot="productType" slot-scope="text, record">
|
|
- <a-tooltip placement="top">
|
|
|
|
- <template slot="title">
|
|
|
|
- <span>{{ record.productTypeName }}</span>
|
|
|
|
- </template>
|
|
|
|
- {{ record.productTypeName3 }}
|
|
|
|
- </a-tooltip>
|
|
|
|
|
|
+ <span v-if="record.productEntity.productTypeName2 || record.productEntity.productTypeName3">{{ record.productEntity.productTypeName2 }} {{ record.productEntity.productTypeName3 ? '>' : '' }} {{ record.productEntity.productTypeName3 }}</span>
|
|
|
|
+ <span v-else>--</span>
|
|
|
|
+ </template>
|
|
|
|
+ <!-- 省级价变更后 -->
|
|
|
|
+ <template slot="afterProvincePrice" slot-scope="text, record">
|
|
|
|
+ <span v-if="record.afterProvincePrice || record.afterProvincePrice==0" :class="record.beforeProvincePrice != record.afterProvincePrice ? 'red' : ''">{{ record.afterProvincePrice }}</span>
|
|
|
|
+ <span v-else>--</span>
|
|
|
|
+ </template>
|
|
|
|
+ <!-- 市级价变更后 -->
|
|
|
|
+ <template slot="afterCityPrice" slot-scope="text, record">
|
|
|
|
+ <span v-if="record.afterCityPrice || record.afterCityPrice==0" :class="record.beforeCityPrice != record.afterCityPrice ? 'red' : ''">{{ record.afterCityPrice }}</span>
|
|
|
|
+ <span v-else>--</span>
|
|
|
|
+ </template>
|
|
|
|
+ <!-- 特约价变更后 -->
|
|
|
|
+ <template slot="afterSpecialPrice" slot-scope="text, record">
|
|
|
|
+ <span v-if="record.afterSpecialPrice || record.afterSpecialPrice==0" :class="record.beforeSpecialPrice != record.afterSpecialPrice ? 'red' : ''">{{ record.afterSpecialPrice }}</span>
|
|
|
|
+ <span v-else>--</span>
|
|
|
|
+ </template>
|
|
|
|
+ <!-- 终端价变更后 -->
|
|
|
|
+ <template slot="afterTerminalPrice" slot-scope="text, record">
|
|
|
|
+ <span v-if="record.afterTerminalPrice || record.afterTerminalPrice==0" :class="record.beforeTerminalPrice != record.afterTerminalPrice ? 'red' : ''">{{ record.afterTerminalPrice }}</span>
|
|
|
|
+ <span v-else>--</span>
|
|
|
|
+ </template>
|
|
|
|
+ <!-- 车主价变更后 -->
|
|
|
|
+ <template slot="afterCarOwnersPrice" slot-scope="text, record">
|
|
|
|
+ <span v-if="record.afterCarOwnersPrice || record.afterCarOwnersPrice==0" :class="record.beforeCarOwnersPrice != record.afterCarOwnersPrice ? 'red' : ''">{{ record.afterCarOwnersPrice }}</span>
|
|
|
|
+ <span v-else>--</span>
|
|
</template>
|
|
</template>
|
|
</s-table>
|
|
</s-table>
|
|
</a-card>
|
|
</a-card>
|
|
@@ -94,42 +117,48 @@
|
|
|
|
|
|
<script>
|
|
<script>
|
|
import moment from 'moment'
|
|
import moment from 'moment'
|
|
-// import { dealerProductBrandQuery } from '@/api/dealerProductBrand'
|
|
|
|
-// import { dealerProductTypeQuery } from '@/api/dealerProductType'
|
|
|
|
import { STable, VSelect } from '@/components'
|
|
import { STable, VSelect } from '@/components'
|
|
|
|
+import getDate from '@/libs/getDate.js'
|
|
|
|
+import { productBrandQuery } from '@/api/productBrand'
|
|
|
|
+import { productTypeQuery } from '@/api/productType'
|
|
|
|
+import { productPriceChangeList } from '@/api/product'
|
|
export default {
|
|
export default {
|
|
components: { STable, VSelect },
|
|
components: { STable, VSelect },
|
|
data () {
|
|
data () {
|
|
return {
|
|
return {
|
|
advanced: false, // 高级搜索 展开/关闭
|
|
advanced: false, // 高级搜索 展开/关闭
|
|
queryParam: { // 查询条件
|
|
queryParam: { // 查询条件
|
|
- productName: '', // 产品名称
|
|
|
|
- productCode: '', // 产品编码
|
|
|
|
- productBrandSn: undefined, // 品牌
|
|
|
|
|
|
+ name: '', // 产品名称
|
|
|
|
+ code: '', // 产品编码
|
|
|
|
+ brandSn: undefined, // 品牌
|
|
productTypeSn1: '', // 产品一级分类
|
|
productTypeSn1: '', // 产品一级分类
|
|
productTypeSn2: '', // 产品二级分类
|
|
productTypeSn2: '', // 产品二级分类
|
|
productTypeSn3: '' // 产品三级分类
|
|
productTypeSn3: '' // 产品三级分类
|
|
},
|
|
},
|
|
|
|
+ productType: [],
|
|
disabled: false, // 查询、重置按钮是否可操作
|
|
disabled: false, // 查询、重置按钮是否可操作
|
|
dateFormat: 'YYYY-MM-DD',
|
|
dateFormat: 'YYYY-MM-DD',
|
|
- time: [], // 创建时间
|
|
|
|
|
|
+ time: [
|
|
|
|
+ moment(getDate.getThreeMonthDays().starttime, 'YYYY-MM-DD'),
|
|
|
|
+ moment(getDate.getCurrMonthDays().endtime, 'YYYY-MM-DD')
|
|
|
|
+ ], // 变更时间
|
|
exportLoading: false, // 导出loading
|
|
exportLoading: false, // 导出loading
|
|
columns: [
|
|
columns: [
|
|
{ title: '序号', dataIndex: 'no', width: 80, align: 'center', fixed: 'left' },
|
|
{ title: '序号', dataIndex: 'no', width: 80, align: 'center', fixed: 'left' },
|
|
- { title: '变更时间', dataIndex: 'createDate', width: 160, align: 'center' },
|
|
|
|
- { title: '产品名称', dataIndex: 'productName', align: 'center', ellipsis: true, customRender: function (text) { return text || '--' } },
|
|
|
|
- { title: '产品编码', dataIndex: 'productCode', width: 140, align: 'center' },
|
|
|
|
- { title: '品牌', dataIndex: 'productBrandName', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
|
|
+ { title: '变更时间', dataIndex: 'updateDate', width: 160, align: 'center' },
|
|
|
|
+ { title: '产品名称', dataIndex: 'productEntity.name', align: 'center', ellipsis: true, customRender: function (text) { return text || '--' } },
|
|
|
|
+ { title: '产品编码', dataIndex: 'productEntity.code', width: 140, align: 'center' },
|
|
|
|
+ { title: '品牌', dataIndex: 'productEntity.productBrandName', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
|
|
{ title: '产品分类', scopedSlots: { customRender: 'productType' }, width: 200, align: 'center' },
|
|
{ title: '产品分类', scopedSlots: { customRender: 'productType' }, width: 200, align: 'center' },
|
|
- { title: '单位', dataIndex: 'prodsuctBrandName', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
|
|
+ { title: '单位', dataIndex: 'productEntity.unit', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
|
|
{
|
|
{
|
|
title: '省级价',
|
|
title: '省级价',
|
|
dataIndex: 'sdtermindfaldsdPrice',
|
|
dataIndex: 'sdtermindfaldsdPrice',
|
|
width: 200,
|
|
width: 200,
|
|
align: 'center',
|
|
align: 'center',
|
|
children: [
|
|
children: [
|
|
- { title: '变更前', dataIndex: 'shjbbb', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
|
- { title: '变更后', dataIndex: 'shjaaa', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } }
|
|
|
|
|
|
+ { title: '变更前', dataIndex: 'beforeProvincePrice', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
|
+ { title: '变更后', scopedSlots: { customRender: 'afterProvincePrice' }, width: 100, align: 'center' }
|
|
]
|
|
]
|
|
},
|
|
},
|
|
{
|
|
{
|
|
@@ -138,8 +167,8 @@ export default {
|
|
width: 200,
|
|
width: 200,
|
|
align: 'center',
|
|
align: 'center',
|
|
children: [
|
|
children: [
|
|
- { title: '变更前', dataIndex: 'sjbbb', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
|
- { title: '变更后', dataIndex: 'sjaaa', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } }
|
|
|
|
|
|
+ { title: '变更前', dataIndex: 'beforeCityPrice', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
|
+ { title: '变更后', scopedSlots: { customRender: 'afterCityPrice' }, width: 100, align: 'center' }
|
|
]
|
|
]
|
|
},
|
|
},
|
|
{
|
|
{
|
|
@@ -148,8 +177,8 @@ export default {
|
|
width: 200,
|
|
width: 200,
|
|
align: 'center',
|
|
align: 'center',
|
|
children: [
|
|
children: [
|
|
- { title: '变更前', dataIndex: 'tybbb', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
|
- { title: '变更后', dataIndex: 'tyaaa', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } }
|
|
|
|
|
|
+ { title: '变更前', dataIndex: 'beforeSpecialPrice', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
|
+ { title: '变更后', scopedSlots: { customRender: 'afterSpecialPrice' }, width: 100, align: 'center' }
|
|
]
|
|
]
|
|
},
|
|
},
|
|
{
|
|
{
|
|
@@ -158,8 +187,8 @@ export default {
|
|
width: 200,
|
|
width: 200,
|
|
align: 'center',
|
|
align: 'center',
|
|
children: [
|
|
children: [
|
|
- { title: '变更前', dataIndex: 'zdbbb', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
|
- { title: '变更后', dataIndex: 'zdaaa', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } }
|
|
|
|
|
|
+ { title: '变更前', dataIndex: 'beforeTerminalPrice', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
|
+ { title: '变更后', scopedSlots: { customRender: 'afterTerminalPrice' }, width: 100, align: 'center' }
|
|
]
|
|
]
|
|
},
|
|
},
|
|
{
|
|
{
|
|
@@ -168,51 +197,31 @@ export default {
|
|
width: 200,
|
|
width: 200,
|
|
align: 'center',
|
|
align: 'center',
|
|
children: [
|
|
children: [
|
|
- { title: '变更前', dataIndex: 'czbbb', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
|
- { title: '变更后', dataIndex: 'czaaa', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } }
|
|
|
|
|
|
+ { title: '变更前', dataIndex: 'beforeCarOwnersPrice', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
|
+ { title: '变更后', scopedSlots: { customRender: 'afterCarOwnersPrice' }, width: 100, align: 'center' }
|
|
]
|
|
]
|
|
},
|
|
},
|
|
- { title: '变更原因', dataIndex: 'sterminaldsdPriffce', width: 160, align: 'center', customRender: function (text) { return text || '--' } }
|
|
|
|
|
|
+ { title: '变更原因', dataIndex: 'changeReason', width: 160, align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true }
|
|
],
|
|
],
|
|
// 加载数据方法 必须为 Promise 对象
|
|
// 加载数据方法 必须为 Promise 对象
|
|
loadData: parameter => {
|
|
loadData: parameter => {
|
|
this.disabled = true
|
|
this.disabled = true
|
|
// 变更时间
|
|
// 变更时间
|
|
- // if (this.time && this.time.length > 0) {
|
|
|
|
- // this.queryParam.beginDate = moment(this.time[0]).format(this.dateFormat)
|
|
|
|
- // this.queryParam.endDate = moment(this.time[1]).format(this.dateFormat)
|
|
|
|
- // } else {
|
|
|
|
- // this.queryParam.beginDate = undefined
|
|
|
|
- // this.queryParam.endDate = undefined
|
|
|
|
- // }
|
|
|
|
- // return dealerProductList(Object.assign(parameter, this.queryParam)).then(res => {
|
|
|
|
- // const data = res.data
|
|
|
|
- // const no = (data.pageNo - 1) * data.pageSize
|
|
|
|
- // for (var i = 0; i < data.list.length; i++) {
|
|
|
|
- // data.list[i].no = no + i + 1
|
|
|
|
- // const productTypeName1 = data.list[i].productTypeName1 ? data.list[i].productTypeName1 : ''
|
|
|
|
- // const productTypeName2 = data.list[i].productTypeName2 ? ' > ' + data.list[i].productTypeName2 : ''
|
|
|
|
- // const productTypeName3 = data.list[i].productTypeName3 ? ' > ' + data.list[i].productTypeName3 : ''
|
|
|
|
- // data.list[i].productTypeName = productTypeName1 + productTypeName2 + productTypeName3
|
|
|
|
- // }
|
|
|
|
- // this.disabled = false
|
|
|
|
- // return data
|
|
|
|
- // })
|
|
|
|
- const _this = this
|
|
|
|
- return new Promise(function (resolve, reject) {
|
|
|
|
- const data = {
|
|
|
|
- pageNo: 1,
|
|
|
|
- pageSize: 10,
|
|
|
|
- list: [
|
|
|
|
- { id: '1', productNum: 'jgqp11111111111', productName: '产品1', productPic: ['https://gw.alipayobjects.com/zos/rmsportal/KDpgvguMpGfqaHPjicRK.svg', 'https://qn.antdv.com/vue.png'], productOldNum: 'jgqp111123545', productBrand: '箭冠品牌', productType: '产品分类1', inventoryNum: '5', inventoryMoney: '122' }
|
|
|
|
- ]
|
|
|
|
- }
|
|
|
|
|
|
+ if (this.time && this.time.length > 0) {
|
|
|
|
+ this.queryParam.beginDate = moment(this.time[0]).format(this.dateFormat)
|
|
|
|
+ this.queryParam.endDate = moment(this.time[1]).format(this.dateFormat)
|
|
|
|
+ } else {
|
|
|
|
+ this.queryParam.beginDate = undefined
|
|
|
|
+ this.queryParam.endDate = undefined
|
|
|
|
+ }
|
|
|
|
+ return productPriceChangeList(Object.assign(parameter, this.queryParam)).then(res => {
|
|
|
|
+ const data = res.data
|
|
const no = (data.pageNo - 1) * data.pageSize
|
|
const no = (data.pageNo - 1) * data.pageSize
|
|
for (var i = 0; i < data.list.length; i++) {
|
|
for (var i = 0; i < data.list.length; i++) {
|
|
data.list[i].no = no + i + 1
|
|
data.list[i].no = no + i + 1
|
|
}
|
|
}
|
|
- _this.disabled = false
|
|
|
|
- resolve(data)
|
|
|
|
|
|
+ this.disabled = false
|
|
|
|
+ return data
|
|
})
|
|
})
|
|
},
|
|
},
|
|
productBrandList: [], // 品牌下拉数据
|
|
productBrandList: [], // 品牌下拉数据
|
|
@@ -305,7 +314,7 @@ export default {
|
|
},
|
|
},
|
|
// 产品品牌 列表
|
|
// 产品品牌 列表
|
|
getProductBrand () {
|
|
getProductBrand () {
|
|
- dealerProductBrandQuery({}).then(res => {
|
|
|
|
|
|
+ productBrandQuery({}).then(res => {
|
|
if (res.status == 200) {
|
|
if (res.status == 200) {
|
|
this.productBrandList = res.data
|
|
this.productBrandList = res.data
|
|
} else {
|
|
} else {
|
|
@@ -315,7 +324,7 @@ export default {
|
|
},
|
|
},
|
|
// 产品分类 列表
|
|
// 产品分类 列表
|
|
getProductType () {
|
|
getProductType () {
|
|
- dealerProductTypeQuery({}).then(res => {
|
|
|
|
|
|
+ productTypeQuery({}).then(res => {
|
|
if (res.status == 200) {
|
|
if (res.status == 200) {
|
|
this.productTypeList = res.data
|
|
this.productTypeList = res.data
|
|
} else {
|
|
} else {
|
|
@@ -332,3 +341,11 @@ export default {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
</script>
|
|
|
|
+
|
|
|
|
+<style lang="less" scoped>
|
|
|
|
+ .productChangeRecordList-wrap{
|
|
|
|
+ .red{
|
|
|
|
+ color: #ed1c24;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+</style>
|