Commit 5df5f0c1 by 胡悦

Merge branch 'SAAS+V4.55.0' of http://192.168.3.233:8090/glsx/gl_tape into SAAS+V4.55.0

2 parents 01af5b54 18fc87a5
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
</view> </view>
</template> </template>
<script type='text/ecmascript-6'> <script type="text/ecmascript-6">
import PageTabs from '@/components/PageTabs.vue' import PageTabs from '@/components/PageTabs.vue'
const rateList = { const rateList = {
excellentStoreAvgDealRate: '优秀门店均值', excellentStoreAvgDealRate: '优秀门店均值',
...@@ -42,7 +42,10 @@ export default { ...@@ -42,7 +42,10 @@ export default {
dataShow: { dataShow: {
type: Boolean, type: Boolean,
default: true default: true
} },
sceneType: Number,
isHarmony: Boolean, // 是否为鸿蒙
bussinessType: Number
}, },
watch: { watch: {
dataShow: { dataShow: {
...@@ -56,7 +59,7 @@ export default { ...@@ -56,7 +59,7 @@ export default {
data () { data () {
return { return {
tabIndex: 0, tabIndex: 0,
tabList: Object.freeze(['本月交付成交率', '本月交付客单价']), tabList: ['本月交付成交率', '本月交付客单价'],
chartData: {}, chartData: {},
//您可以通过修改 config-ucharts.js 文件中下标为 ['bar'] 的节点来配置全局默认参数,如都是默认参数,此处可以不传 opts 。实际应用过程中 opts 只需传入与全局默认参数中不一致的【某一个属性】即可实现同类型的图表显示不同的样式,达到页面简洁的需求。 //您可以通过修改 config-ucharts.js 文件中下标为 ['bar'] 的节点来配置全局默认参数,如都是默认参数,此处可以不传 opts 。实际应用过程中 opts 只需传入与全局默认参数中不一致的【某一个属性】即可实现同类型的图表显示不同的样式,达到页面简洁的需求。
opts: Object.freeze({ opts: Object.freeze({
...@@ -95,8 +98,20 @@ export default { ...@@ -95,8 +98,20 @@ export default {
}, },
methods: { methods: {
getServerData () { getServerData () {
let { dataShow, tabIndex, pageData } = this let { dataShow, tabIndex, pageData, sceneType, isHarmony, bussinessType } = this
/**
* 2.1场景 鸿蒙---问界/鸿蒙 [本月交付客单价] 改成 [整车延保成交数]
* 2.1场景 非鸿蒙---选延保 [本月交付客单价] 改成 [整车延保成交数] (bussinessType 1:延保 3:权益)
* 2.1场景 非鸿蒙---权益 [本月交付成交率] 改为 [广联权益渗透率]; [本月交付客单价] 改成 [广联权益成交数]
*/
if (sceneType == 0) {
if (isHarmony) {
this.tabList[1] = '整车延保成交数'
} else {
if (bussinessType == 1) this.tabList[1] = '整车延保成交数'
else this.tabList = ['广联权益渗透率', '广联权益成交数']
}
}
let list = [], let list = [],
categories = [], categories = [],
data = [], data = [],
...@@ -127,7 +142,7 @@ export default { ...@@ -127,7 +142,7 @@ export default {
data data
}] }]
if (tabIndex == 0) series[0].afterUnit = '%' if (tabIndex == 0) series[0].afterUnit = '%'
else series[0].beforeUnit = '¥' if (sceneType == 1 && tabIndex == 1) series[0].beforeUnit = '¥' //轻改
this.chartData = { this.chartData = {
categories, categories,
series, series,
...@@ -141,7 +156,7 @@ export default { ...@@ -141,7 +156,7 @@ export default {
} }
</script> </script>
<style scoped lang='scss'> <style scoped lang="scss">
.line-bar-box { .line-bar-box {
height: toRpx(388); height: toRpx(388);
box-sizing: border-box; box-sizing: border-box;
......
...@@ -40,6 +40,9 @@ ...@@ -40,6 +40,9 @@
<line-bar <line-bar
:dataShow="dataShow" :dataShow="dataShow"
:pageData="pageData" :pageData="pageData"
:sceneType="sceneType"
:isHarmony="isHarmony"
:bussinessType="bussinessType"
/> />
</view> </view>
<view class="box"> <view class="box">
...@@ -155,6 +158,7 @@ export default { ...@@ -155,6 +158,7 @@ export default {
]), ]),
showInfo: false, showInfo: false,
customerId: '', customerId: '',
bussinessType: 1,
pageData: { pageData: {
//门店客流 //门店客流
// cumulativeDeliveryCount: 0, //累计交付数 // cumulativeDeliveryCount: 0, //累计交付数
...@@ -183,13 +187,13 @@ export default { ...@@ -183,13 +187,13 @@ export default {
showPageFlag () { showPageFlag () {
return Object.keys(this.pageData).length return Object.keys(this.pageData).length
}, },
isAito () { isHarmony () {
const { channelType } = uni.$storage.get('userInfo') const { channelType } = uni.$storage.get('userInfo')
return channelType == 1 return channelType == 1
}, },
performanceTypeList () { performanceTypeList () {
let list = [] let list = []
if (this.isAito) list = [ if (this.isHarmony) list = [
{ label: '问界', value: 1 }, { label: '问界', value: 1 },
{ label: '鸿蒙', value: 2 }, { label: '鸿蒙', value: 2 },
] ]
...@@ -237,6 +241,7 @@ export default { ...@@ -237,6 +241,7 @@ export default {
this.showInfo = true this.showInfo = true
}, },
async getMerchantPerformance (bussinessType = 1, hmzxFlag) { async getMerchantPerformance (bussinessType = 1, hmzxFlag) {
this.bussinessType = bussinessType
const { shopMerchantId, sceneType } = uni.$storage.get("userInfo") const { shopMerchantId, sceneType } = uni.$storage.get("userInfo")
let params = { let params = {
merchantIdList: shopMerchantId, merchantIdList: shopMerchantId,
...@@ -247,13 +252,13 @@ export default { ...@@ -247,13 +252,13 @@ export default {
if (sceneType == 0) { if (sceneType == 0) {
params.bussinessType = bussinessType params.bussinessType = bussinessType
if (hmzxFlag) params.hmzxFlag = hmzxFlag if (hmzxFlag) params.hmzxFlag = hmzxFlag
if (this.isAito && !params.hmzxFlag) params.hmzxFlag = 1 if (this.isHarmony && !params.hmzxFlag) params.hmzxFlag = 1
} else params.hmzxFlag = this.isAito ? 3 : 4 } else params.hmzxFlag = this.isHarmony ? 3 : 4
this.pageData = await uni.$api.receptionApi.getMerchantPerformance(params) || {} this.pageData = await uni.$api.receptionApi.getMerchantPerformance(params) || {}
}, },
changePerformance ({ item }) { changePerformance ({ item }) {
this.pageData = {} this.pageData = {}
if (this.isAito) this.getMerchantPerformance(1, item.value) if (this.isHarmony) this.getMerchantPerformance(1, item.value)
else this.getMerchantPerformance(item.value) else this.getMerchantPerformance(item.value)
} }
} }
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!