Commit c53771ac by 杨北旺

fix:修复售中转化数组map非空判断

1 parent 589a43e5
...@@ -288,6 +288,7 @@ export default { ...@@ -288,6 +288,7 @@ export default {
if (!res) { if (!res) {
return return
} }
res.list = res.list || []
res.list.length ? (this.$refs.table.tableHeightValues = '') : this.$refs.table.setTableHeightFun() res.list.length ? (this.$refs.table.tableHeightValues = '') : this.$refs.table.setTableHeightFun()
this.tableData = res.list.map(item => { this.tableData = res.list.map(item => {
item.createdDate = utils.dateFormat(item.createdDate, 'YYYY-MM-DD HH:mm:ss') item.createdDate = utils.dateFormat(item.createdDate, 'YYYY-MM-DD HH:mm:ss')
...@@ -317,6 +318,7 @@ export default { ...@@ -317,6 +318,7 @@ export default {
orderType: 6 orderType: 6
} }
converterApi(para).then(res => { converterApi(para).then(res => {
res.list = res&&res.list?res.list:[]
this.tabletotal1 = res.total this.tabletotal1 = res.total
this.tableData1 = res.list.map(item => { this.tableData1 = res.list.map(item => {
item.createdDate = item.createdDate ? utils.dateFormat(item.createdDate, 'YYYY-MM-DD HH:mm:ss') : '--' item.createdDate = item.createdDate ? utils.dateFormat(item.createdDate, 'YYYY-MM-DD HH:mm:ss') : '--'
......
...@@ -202,7 +202,7 @@ export default { ...@@ -202,7 +202,7 @@ export default {
isShow: false isShow: false
} }
}, },
mounted() { created() {
this.check(0) this.check(0)
}, },
methods: { methods: {
...@@ -301,8 +301,10 @@ export default { ...@@ -301,8 +301,10 @@ export default {
this.videoList = [] this.videoList = []
} }
this.activeIndex = 0 this.activeIndex = 0
this.$refs.videoContent.style.transform = `translateX(0px)` if(this.$refs.videoContent){
this.$refs.videoContent.style.transition = `all 0s linear` this.$refs.videoContent.style.transform = `translateX(0px)`
this.$refs.videoContent.style.transition = `all 0s linear`
}
}, },
valuations(val) { valuations(val) {
this.isValuation = val this.isValuation = val
......
...@@ -531,6 +531,7 @@ export default { ...@@ -531,6 +531,7 @@ export default {
...this.newHttpParam ...this.newHttpParam
} }
converterApi(para).then(res => { converterApi(para).then(res => {
res.list = res&&res.list?res.list:[]
res.list.map(item => { res.list.map(item => {
item.divisionTypeName = item.divisionType == 1 ? '线下对账' : '线上分账' item.divisionTypeName = item.divisionType == 1 ? '线下对账' : '线上分账'
item.successDate = item.paySuccessDate ? utils.dateFormat(item.paySuccessDate, 'YYYY-MM-DD HH:mm:ss') : '--' item.successDate = item.paySuccessDate ? utils.dateFormat(item.paySuccessDate, 'YYYY-MM-DD HH:mm:ss') : '--'
......
...@@ -98,12 +98,12 @@ ...@@ -98,12 +98,12 @@
<div v-show="accountLevel != 4"> <div v-show="accountLevel != 4">
<ranking ref="myRanking" :product="productValueInfo.divisionMoney" :show="openRankFlag" @closeRank="toCloseRanking"></ranking> <ranking ref="myRanking" :product="productValueInfo.divisionMoney" :show="openRankFlag" @closeRank="toCloseRanking"></ranking>
</div> </div>
<div class="box_bg_wrap mini_margin"> <div class="box_bg_wrap">
<div class="tab_wrap"> <div class="tab_wrap">
<div class="tab_line flex_sc" :style="accountLevel == 4 ? 'width:48%' : 'width:32%'"> <div class="tab_line flex_sc" :style="accountLevel == 4 ? 'width:32%' : 'width:32%'">
<!-- <div class="tab_line flex_sc" :style="accountLevel == 4 ? 'width:32%' : 'width:16%'"> --> <!-- <div class="tab_line flex_sc" :style="accountLevel == 4 ? 'width:32%' : 'width:16%'"> -->
<template v-for="(item, index) in tabList"> <template v-for="(item, index) in tabList">
<div :key="index" class="tab_element_wrap" :style="accountLevel == 4 ? 'width:33.33%' : 'width:50%'" @click="changeTab(index)"> <div :key="index" class="tab_element_wrap" :style="accountLevel == 4 ? 'width:50%' : 'width:50%'" @click="changeTab(index)">
<!-- <div :key="index" class="tab_element_wrap" :style="accountLevel == 4 ? 'width:50%' : 'width:100%'" @click="changeTab(index)"> --> <!-- <div :key="index" class="tab_element_wrap" :style="accountLevel == 4 ? 'width:50%' : 'width:100%'" @click="changeTab(index)"> -->
<div class="tab_item h13_title flex_cc" :class="curTabIndex == index ? 'tab_item_active' : ''">{{ item }}</div> <div class="tab_item h13_title flex_cc" :class="curTabIndex == index ? 'tab_item_active' : ''">{{ item }}</div>
</div> </div>
...@@ -321,7 +321,7 @@ export default { ...@@ -321,7 +321,7 @@ export default {
// this.chartStartDate = utils.getDateStr(-15) // this.chartStartDate = utils.getDateStr(-15)
this.chartStartDate = this.bengintime this.chartStartDate = this.bengintime
this.chartEndDate = this.endtime this.chartEndDate = this.endtime
this.orderDataInfo() // this.orderDataInfo()
}, },
// 门店统计 // 门店统计
orderDataInfo() { orderDataInfo() {
......
...@@ -918,6 +918,7 @@ export default { ...@@ -918,6 +918,7 @@ export default {
...this.newHttpParam ...this.newHttpParam
} }
converterApi(para).then(res => { converterApi(para).then(res => {
res.list = res&&res.list?res.list:[]
this.tableData = res.list.map((item, index) => { this.tableData = res.list.map((item, index) => {
const TYPELIST = ['--', '毛利', '收入', '固定'] const TYPELIST = ['--', '毛利', '收入', '固定']
// let ruleType = item.shopProfitType == 1 ? '毛利' : '收入' // let ruleType = item.shopProfitType == 1 ? '毛利' : '收入'
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!