|
@@ -45,7 +45,10 @@
|
|
|
<!-- 价格 -->
|
|
|
<div style="margin-bottom: 10px;">
|
|
|
<a-checkbox v-model="isCostPrice"><span style="display: inline-block;">成本价</span></a-checkbox>
|
|
|
- <a-checkbox v-model="isCityPrice"><span style="display: inline-block;">市级价</span></a-checkbox>
|
|
|
+ <!-- 特约加盟商不可见市级价 -->
|
|
|
+ <a-checkbox v-model="isCityPrice" v-if="dealerData && dealerData.dealerLevel != 'SPECIAL'"><span style="display: inline-block;">市级价</span></a-checkbox>
|
|
|
+ <!-- 是否展示特约价 -->
|
|
|
+ <a-checkbox v-model="isSpecialPrice" v-if="dealerData && dealerData.isShowSpecialPrice == '1'"><span style="display: inline-block;">特约价</span></a-checkbox>
|
|
|
<a-checkbox v-model="isTerminalPrice"><span style="display: inline-block;">终端会员价</span></a-checkbox>
|
|
|
</div>
|
|
|
<!-- 列表 -->
|
|
@@ -68,6 +71,7 @@
|
|
|
import { STable, VSelect } from '@/components'
|
|
|
import ProductType from '../../common/productType.js'
|
|
|
import ProductBrand from '../../common/productBrand.js'
|
|
|
+import { getCurrentDealer } from '@/api/product'
|
|
|
import { dealerProductPriceList } from '@/api/dealerProduct'
|
|
|
export default {
|
|
|
components: { STable, VSelect, ProductType, ProductBrand },
|
|
@@ -103,7 +107,9 @@ export default {
|
|
|
},
|
|
|
isCostPrice: false,
|
|
|
isCityPrice: false,
|
|
|
- isTerminalPrice: false
|
|
|
+ isSpecialPrice: false,
|
|
|
+ isTerminalPrice: false,
|
|
|
+ dealerData: null
|
|
|
}
|
|
|
},
|
|
|
computed: {
|
|
@@ -117,6 +123,7 @@ export default {
|
|
|
{ title: '库存数量', dataIndex: 'stockQty', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
// { title: '成本价', dataIndex: 'offerCost', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
// { title: '市级价', dataIndex: 'cityPrice', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
+ // { title: '特约价', dataIndex: 'specialPrice', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
// { title: '终端会员价', dataIndex: 'terminalPrice', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
{ title: '车主价', dataIndex: 'carOwnersPrice', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } }
|
|
|
]
|
|
@@ -127,7 +134,7 @@ export default {
|
|
|
const ind = this.isCostPrice ? 7 : 6
|
|
|
arr.splice(ind, 0, { title: '市级价', dataIndex: 'cityPrice', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
|
|
|
}
|
|
|
- if (this.isTerminalPrice) {
|
|
|
+ if (this.isSpecialPrice) {
|
|
|
let ind = 0
|
|
|
if (this.isCostPrice && this.isCityPrice) {
|
|
|
ind = 8
|
|
@@ -136,7 +143,10 @@ export default {
|
|
|
} else if (!this.isCostPrice && !this.isCityPrice) {
|
|
|
ind = 6
|
|
|
}
|
|
|
- arr.splice(ind, 0, { title: '终端会员价', dataIndex: 'terminalPrice', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
|
|
|
+ arr.splice(ind, 0, { title: '特约价', dataIndex: 'specialPrice', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
|
|
|
+ }
|
|
|
+ if (this.isTerminalPrice) {
|
|
|
+ arr.splice(arr.length - 1, 0, { title: '终端会员价', dataIndex: 'terminalPrice', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
|
|
|
}
|
|
|
return arr
|
|
|
}
|
|
@@ -165,6 +175,14 @@ export default {
|
|
|
this.$nextTick(() => { // 页面渲染完成后的回调
|
|
|
_this.setTableH()
|
|
|
})
|
|
|
+ // 获取当前登录用户经销商等级
|
|
|
+ getCurrentDealer().then(res => {
|
|
|
+ if (res.status == 200) {
|
|
|
+ this.dealerData = res.data
|
|
|
+ } else {
|
|
|
+ this.dealerData = null
|
|
|
+ }
|
|
|
+ })
|
|
|
},
|
|
|
setTableH () {
|
|
|
const tableSearchH = this.$refs.tableSearch.offsetHeight
|