Commit db13d9c3 authored by 黄奎's avatar 黄奎

页面修改

parent bbb225c0
...@@ -1959,7 +1959,6 @@ export default { ...@@ -1959,7 +1959,6 @@ export default {
path = 'addFinancialGZDocuments' path = 'addFinancialGZDocuments'
this.$router.push({ name: path,query:{"FrID":id,"edit":1,blank:'y',tab:'修改财务单据'} }) this.$router.push({ name: path,query:{"FrID":id,"edit":1,blank:'y',tab:'修改财务单据'} })
} }
// this.$router.push({ name: path,query:{"type":type,"FrID":id,"edit":edit,"Conditon":Conditon,"pageIndex":pageIndex,blank:'y',tab:'修改财务单据'} })
}, },
showjiaoyi(FrId){//弹出交易方式修改 showjiaoyi(FrId){//弹出交易方式修改
this.apipost('Financial_get_GetFinanceTrabeList', {FrId:FrId}, res => { this.apipost('Financial_get_GetFinanceTrabeList', {FrId:FrId}, res => {
...@@ -1973,7 +1972,6 @@ export default { ...@@ -1973,7 +1972,6 @@ export default {
} }
}) })
}) })
console.log(this.alltransaction,'ssssss')
this.transactionmode = true this.transactionmode = true
} }
}, err => {}) }, err => {})
......
...@@ -13,47 +13,43 @@ ...@@ -13,47 +13,43 @@
<div class="block"> <div class="block">
<el-date-picker <el-date-picker v-model="msg.StartYear" type="year" format='yyyy' value-format="yyyy" @change='getmonth'
v-model="msg.StartYear" :clearable='false' placeholder="选择开始年">
type="year"
format='yyyy'
value-format="yyyy"
@change='getmonth'
:clearable='false'
placeholder="选择开始年">
</el-date-picker> </el-date-picker>
<span style="margin: 0 10px;">-</span> <span style="margin: 0 10px;">-</span>
<el-date-picker <el-date-picker v-model="msg.EndYear" type="year" format='yyyy' value-format="yyyy" @change='getmonth'
v-model="msg.EndYear" :clearable='false' placeholder="选择结束年">
type="year"
format='yyyy'
value-format="yyyy"
@change='getmonth'
:clearable='false'
placeholder="选择结束年">
</el-date-picker> </el-date-picker>
</div> </div>
</div> </div>
</div> </div>
<div style="padding: 15px ;background: #FFF;margin-bottom: 50px;" > <div style="padding: 15px ;background: #FFF;margin-bottom: 50px;">
<!-- 第一张 --> <!-- 第一张 -->
<div style="width: 100%;" class="tablestyle" v-if='YearSList && YearSList.length>0 '> <div style="width: 100%;" class="tablestyle" v-if='YearSList && YearSList.length>0 '>
<div style="width: 150px;"> <div style="width: 150px;">
<table class="singeRowTable TcNewTable" border="1" cellspacing="0" cellpadding="0" :style="{width: '150px'}"> <table class="singeRowTable TcNewTable" border="1" cellspacing="0" cellpadding="0" :style="{width: '150px'}">
<tr > <td style="width: 150px;">年份</td> </tr> <tr>
<tr v-for='(x,y) in leftData' :key = 'y'> <td class="qthuanbicheng">{{x.Name}}</td></tr> <td style="width: 150px;">年份</td>
</tr>
<tr v-for='(x,y) in leftData' :key='y'>
<td class="qthuanbicheng">{{x.Name}}</td>
</tr>
</table> </table>
</div> </div>
<div style="width:1px; overflow-x:scroll;flex:1" > <div style="width:1px; overflow-x:scroll;flex:1">
<table class="singeRowTable TcNewTable" border="1" cellspacing="0" cellpadding="0" :style="{width: YearSListwidth+'px'}"> <table class="singeRowTable TcNewTable" border="1" cellspacing="0" cellpadding="0"
<tr > <td style="font-size: 12px;" v-for='(x,y) in YearSList' :key = 'y' @click='goyearurl(x)'>{{x.Date}}</td></tr> :style="{width: YearSListwidth+'px'}">
<tr v-for='(item,index) in leftData' :key = 'index'> <tr>
<td :class="x.Date.indexOf('成長率')!=-1?'growthrate':'yearstyle'" style="font-size: 12px;" v-for='(x,y) in YearSList' :key = 'y' > <td style="font-size: 12px;" v-for='(x,y) in YearSList' :key='y' @click='goyearurl(x)'>{{x.Date}}</td>
</tr>
<tr v-for='(item,index) in leftData' :key='index'>
<td :class="x.Date.indexOf('成長率')!=-1?'growthrate':'yearstyle'" style="font-size: 12px;"
v-for='(x,y) in YearSList' :key='y'>
<span :style="{color: getisred(x[item.DataObj]) == true?'#FD0F05':'#111111'}">{{x[item.DataObj]}}</span> <span :style="{color: getisred(x[item.DataObj]) == true?'#FD0F05':'#111111'}">{{x[item.DataObj]}}</span>
</td> </td>
</tr> </tr>
...@@ -64,15 +60,23 @@ ...@@ -64,15 +60,23 @@
<div style="width: 100%;" class="tablestyle" v-if='YearAvgSList && YearAvgSList.length>0 && type == 0'> <div style="width: 100%;" class="tablestyle" v-if='YearAvgSList && YearAvgSList.length>0 && type == 0'>
<div style="width: 150px;"> <div style="width: 150px;">
<table class="singeRowTable TcNewTable" border="1" cellspacing="0" cellpadding="0" :style="{width: '150px'}"> <table class="singeRowTable TcNewTable" border="1" cellspacing="0" cellpadding="0" :style="{width: '150px'}">
<tr > <td style="width: 150px;">年份</td> </tr> <tr>
<tr v-for='(x,y) in leftData_t' :key = 'y'> <td class="qthuanbicheng">{{x.Name}}</td></tr> <td style="width: 150px;">年份</td>
</tr>
<tr v-for='(x,y) in leftData_t' :key='y'>
<td class="qthuanbicheng">{{x.Name}}</td>
</tr>
</table> </table>
</div> </div>
<div style="width:1px; overflow-x:scroll;flex:1" > <div style="width:1px; overflow-x:scroll;flex:1">
<table class="singeRowTable TcNewTable" border="1" cellspacing="0" cellpadding="0" :style="{width: YearSListwidth+'px'}"> <table class="singeRowTable TcNewTable" border="1" cellspacing="0" cellpadding="0"
<tr > <td style="font-size: 12px;" v-for='(x,y) in YearAvgSList' :key = 'y' @click='goyearurl(x)'>{{x.Date}}</td></tr> :style="{width: YearSListwidth+'px'}">
<tr v-for='(item,index) in leftData_t' :key = 'index'> <tr>
<td :class="x.Date.indexOf('成長率')!=-1?'growthrate':'yearstyle'" style="font-size: 12px;" v-for='(x,y) in YearAvgSList' :key = 'y' > <td style="font-size: 12px;" v-for='(x,y) in YearAvgSList' :key='y' @click='goyearurl(x)'>{{x.Date}}</td>
</tr>
<tr v-for='(item,index) in leftData_t' :key='index'>
<td :class="x.Date.indexOf('成長率')!=-1?'growthrate':'yearstyle'" style="font-size: 12px;"
v-for='(x,y) in YearAvgSList' :key='y'>
<span :style="{color: getisred(x[item.DataObj]) == true?'#FD0F05':'#111111'}">{{x[item.DataObj]}}</span> <span :style="{color: getisred(x[item.DataObj]) == true?'#FD0F05':'#111111'}">{{x[item.DataObj]}}</span>
</td> </td>
</tr> </tr>
...@@ -83,16 +87,25 @@ ...@@ -83,16 +87,25 @@
<div style="width: 100%;display: flex;" v-if='YearRateSList && YearRateSList.length>0 && type == 0'> <div style="width: 100%;display: flex;" v-if='YearRateSList && YearRateSList.length>0 && type == 0'>
<div style="width: 150px;"> <div style="width: 150px;">
<table class="singeRowTable TcNewTable" border="1" cellspacing="0" cellpadding="0" :style="{width: '150px'}"> <table class="singeRowTable TcNewTable" border="1" cellspacing="0" cellpadding="0" :style="{width: '150px'}">
<tr > <td style="width: 150px;">年份</td> </tr> <tr>
<tr v-for='(x,y) in leftData_tr' :key = 'y'> <td class="qthuanbicheng">{{x.Name}}</td></tr> <td style="width: 150px;">年份</td>
</tr>
<tr v-for='(x,y) in leftData_tr' :key='y'>
<td class="qthuanbicheng">{{x.Name}}</td>
</tr>
</table> </table>
</div> </div>
<div style="width:1px; overflow-x:scroll;flex:1" > <div style="width:1px; overflow-x:scroll;flex:1">
<table class="singeRowTable TcNewTable" border="1" cellspacing="0" cellpadding="0" :style="{width: YearSListwidth+'px'}"> <table class="singeRowTable TcNewTable" border="1" cellspacing="0" cellpadding="0"
<tr > <td style="font-size: 12px;" v-for='(x,y) in YearRateSList' :key = 'y' @click='goyearurl(x)'>{{x.Date}}</td></tr> :style="{width: YearSListwidth+'px'}">
<tr v-for='(item,index) in leftData_tr' :key = 'index'> <tr>
<td :class="x.Date.indexOf('成長率')!=-1?'growthrate':'yearstyle'" style="font-size: 12px;" v-for='(x,y) in YearRateSList' :key = 'y'> <td style="font-size: 12px;" v-for='(x,y) in YearRateSList' :key='y' @click='goyearurl(x)'>{{x.Date}}</td>
<span :style="{color: getisred(x[item.DataObj]) == true?'#FD0F05':'#111111'}">{{x[item.DataObj]}}%</span> </tr>
<tr v-for='(item,index) in leftData_tr' :key='index'>
<td :class="x.Date.indexOf('成長率')!=-1?'growthrate':'yearstyle'" style="font-size: 12px;"
v-for='(x,y) in YearRateSList' :key='y'>
<span
:style="{color: getisred(x[item.DataObj]) == true?'#FD0F05':'#111111'}">{{x[item.DataObj]}}%</span>
</td> </td>
</tr> </tr>
</table> </table>
...@@ -103,17 +116,28 @@ ...@@ -103,17 +116,28 @@
<!-- 第二张 --> <!-- 第二张 -->
<div style="width: 100%;" class="tablestyle" v-if='YearAvgSList && YearAvgSList.length>0 '> <div style="width: 100%;" class="tablestyle" v-if='YearAvgSList && YearAvgSList.length>0 '>
<div style="width: 150px;"> <div style="width: 150px;">
<table class="singeRowTable TcNewTable" border="1" cellspacing="0" cellpadding="0" :style="{width: '150px'}"> <table class="singeRowTable TcNewTable" border="1" cellspacing="0" cellpadding="0"
<tr > <td style="width: 150px;">年份</td> </tr> :style="{width: '150px'}">
<tr v-for='(x,y) in leftData_t' :key = 'y'> <td class="qthuanbicheng">{{x.Name}}</td></tr> <tr>
<td style="width: 150px;">年份</td>
</tr>
<tr v-for='(x,y) in leftData_t' :key='y'>
<td class="qthuanbicheng">{{x.Name}}</td>
</tr>
</table> </table>
</div> </div>
<div style="width:1px; overflow-x:scroll;flex:1" > <div style="width:1px; overflow-x:scroll;flex:1">
<table class="singeRowTable TcNewTable" border="1" cellspacing="0" cellpadding="0" :style="{width: YearSListwidth+'px'}"> <table class="singeRowTable TcNewTable" border="1" cellspacing="0" cellpadding="0"
<tr > <td style="font-size: 12px;" v-for='(x,y) in YearAvgSList' :key = 'y' @click='goyearurl(x)'>{{x.Date}}</td></tr> :style="{width: YearSListwidth+'px'}">
<tr v-for='(item,index) in leftData_t' :key = 'index'> <tr>
<td :class="x.Date.indexOf('成長率')!=-1?'growthrate':'yearstyle'" style="font-size: 12px;" v-for='(x,y) in YearAvgSList' :key = 'y' > <td style="font-size: 12px;" v-for='(x,y) in YearAvgSList' :key='y' @click='goyearurl(x)'>{{x.Date}}
<span :style="{color: getisred(x[item.DataObj]) == true?'#FD0F05':'#111111'}">{{x[item.DataObj]}}</span> </td>
</tr>
<tr v-for='(item,index) in leftData_t' :key='index'>
<td :class="x.Date.indexOf('成長率')!=-1?'growthrate':'yearstyle'" style="font-size: 12px;"
v-for='(x,y) in YearAvgSList' :key='y'>
<span
:style="{color: getisred(x[item.DataObj]) == true?'#FD0F05':'#111111'}">{{x[item.DataObj]}}</span>
</td> </td>
</tr> </tr>
</table> </table>
...@@ -122,17 +146,28 @@ ...@@ -122,17 +146,28 @@
<!-- 第三张 --> <!-- 第三张 -->
<div style="width: 100%;display: flex;" v-if='YearRateSList && YearRateSList.length>0 '> <div style="width: 100%;display: flex;" v-if='YearRateSList && YearRateSList.length>0 '>
<div style="width: 150px;"> <div style="width: 150px;">
<table class="singeRowTable TcNewTable" border="1" cellspacing="0" cellpadding="0" :style="{width: '150px'}"> <table class="singeRowTable TcNewTable" border="1" cellspacing="0" cellpadding="0"
<tr > <td style="width: 150px;">年份</td> </tr> :style="{width: '150px'}">
<tr v-for='(x,y) in leftData_tr' :key = 'y'> <td class="qthuanbicheng">{{x.Name}}</td></tr> <tr>
<td style="width: 150px;">年份</td>
</tr>
<tr v-for='(x,y) in leftData_tr' :key='y'>
<td class="qthuanbicheng">{{x.Name}}</td>
</tr>
</table> </table>
</div> </div>
<div style="width:1px; overflow-x:scroll;flex:1" > <div style="width:1px; overflow-x:scroll;flex:1">
<table class="singeRowTable TcNewTable" border="1" cellspacing="0" cellpadding="0" :style="{width: YearSListwidth+'px'}"> <table class="singeRowTable TcNewTable" border="1" cellspacing="0" cellpadding="0"
<tr > <td style="font-size: 12px;" v-for='(x,y) in YearRateSList' :key = 'y' @click='goyearurl(x)'>{{x.Date}}</td></tr> :style="{width: YearSListwidth+'px'}">
<tr v-for='(item,index) in leftData_tr' :key = 'index'> <tr>
<td :class="x.Date.indexOf('成長率')!=-1?'growthrate':'yearstyle'" style="font-size: 12px;" v-for='(x,y) in YearRateSList' :key = 'y' > <td style="font-size: 12px;" v-for='(x,y) in YearRateSList' :key='y' @click='goyearurl(x)'>{{x.Date}}
<span :style="{color: getisred(x[item.DataObj]) == true?'#FD0F05':'#111111'}">{{x[item.DataObj]}}%</span> </td>
</tr>
<tr v-for='(item,index) in leftData_tr' :key='index'>
<td :class="x.Date.indexOf('成長率')!=-1?'growthrate':'yearstyle'" style="font-size: 12px;"
v-for='(x,y) in YearRateSList' :key='y'>
<span
:style="{color: getisred(x[item.DataObj]) == true?'#FD0F05':'#111111'}">{{x[item.DataObj]}}%</span>
</td> </td>
</tr> </tr>
</table> </table>
...@@ -148,214 +183,323 @@ ...@@ -148,214 +183,323 @@
</div> </div>
</template> </template>
<script>
<script>
export default { export default {
name: "dianshangannualRatio", name: "dianshangannualRatio",
data() { data() {
return { return {
value: '', value: '',
tableHeight: window.innerHeight - 50 - 41 - 69 -74 - 30, //窗口的高度减去你需要减去的高度 tableHeight: window.innerHeight - 50 - 41 - 69 - 74 - 30, //窗口的高度减去你需要减去的高度
tablewidth:window.innerWidth - 124,//等到表格的宽度 tablewidth: window.innerWidth - 124, //等到表格的宽度
msg: { msg: {
StartYear:'',//开始年 StartYear: '', //开始年
EndYear:'', EndYear: '',
}, },
loading: false, loading: false,
YearSList:[], YearSList: [],
YearSListwidth:0, YearSListwidth: 0,
leftData:[ leftData: [{
{Name:'付款人数',DataObj:'PeopleNum'}, Name: '付款人数',
{Name:'付款单数',DataObj:'OrderNum'}, DataObj: 'PeopleNum'
{Name:'付款金额',DataObj:'PayMoney'}, },
{Name:'购买件数',DataObj:'BuyNum'}, {
{Name:'会员数',DataObj:'TotalPayPeople'}, Name: '付款单数',
{Name:'总付款人数',DataObj:'MAvgPeopleNum'}, DataObj: 'OrderNum'
{Name:'毛利',DataObj:'Profit'}, },
{Name:'普象',DataObj:'PXNum'}, {
{Name:'VIP',DataObj:'VipNum'}, Name: '付款金额',
{Name:'银象',DataObj:'YXNum'}, DataObj: 'PayMoney'
{Name:'金象',DataObj:'JXNum'}, },
{Name:'会员总数',DataObj:'TotalMNum'}, {
Name: '购买件数',
DataObj: 'BuyNum'
},
{
Name: '会员数',
DataObj: 'TotalPayPeople'
},
{
Name: '总付款人数',
DataObj: 'MAvgPeopleNum'
},
{
Name: '毛利',
DataObj: 'Profit'
},
{
Name: '普象',
DataObj: 'PXNum'
},
{
Name: 'VIP',
DataObj: 'VipNum'
},
{
Name: '银象',
DataObj: 'YXNum'
},
{
Name: '金象',
DataObj: 'JXNum'
},
{
Name: '会员总数',
DataObj: 'TotalMNum'
},
], ],
YearAvgSList:[], YearAvgSList: [],
YearAvgSListwidth:0, YearAvgSListwidth: 0,
leftData_t:[ leftData_t: [{
{Name:'平均付款人数(天)',DataObj:'MAvgPeopleNum'}, Name: '平均付款人数(天)',
{Name:'平均付款单数',DataObj:'MAvgOrderNum'}, DataObj: 'MAvgPeopleNum'
{Name:'平均付款金额',DataObj:'MAvgPayMoney'}, },
{Name:'平均付款件数',DataObj:'MAvgBuyNum'}, {
{Name:'平均每人购买单数',DataObj:'PAvgOrderNum'}, Name: '平均付款单数',
{Name:'平均每人购买件数',DataObj:'PAvgBuyNum'}, DataObj: 'MAvgOrderNum'
{Name:'平均每单单价',DataObj:'PAvgBuyPrice'}, },
{Name:'平均每人购买单价',DataObj:'PAvgUnitPrice'}, {
{Name:'平均会员数',DataObj:'PAvgMemberNum'}, Name: '平均付款金额',
{Name:'平均累计人数(月)',DataObj:'PAvgPaymentNum'}, DataObj: 'MAvgPayMoney'
{Name:'平均会员下订单转换率',DataObj:'PAvgMOrderRate'}, },
{Name:'平均复购人数',DataObj:'PAvgReBuyNum'}, {
{Name:'平均复购率',DataObj:'PAvgReBuyRate'}, Name: '平均付款件数',
{Name:'平均新人下单',DataObj:'PAvgNewPeopleNum'}, DataObj: 'MAvgBuyNum'
{Name:'毛利率',DataObj:'PAvgProfitRate'}, },
{
Name: '平均每人购买单数',
DataObj: 'PAvgOrderNum'
},
{
Name: '平均每人购买件数',
DataObj: 'PAvgBuyNum'
},
{
Name: '平均每单单价',
DataObj: 'PAvgBuyPrice'
},
{
Name: '平均每人购买单价',
DataObj: 'PAvgUnitPrice'
},
{
Name: '平均会员数',
DataObj: 'PAvgMemberNum'
},
{
Name: '平均累计人数(月)',
DataObj: 'PAvgPaymentNum'
},
{
Name: '平均会员下订单转换率',
DataObj: 'PAvgMOrderRate'
},
{
Name: '平均复购人数',
DataObj: 'PAvgReBuyNum'
},
{
Name: '平均复购率',
DataObj: 'PAvgReBuyRate'
},
{
Name: '平均新人下单',
DataObj: 'PAvgNewPeopleNum'
},
{
Name: '毛利率',
DataObj: 'PAvgProfitRate'
},
], ],
YearRateSList:[], YearRateSList: [],
YearRateSListwidth:0, YearRateSListwidth: 0,
leftData_tr:[ leftData_tr: [{
{Name:'平均付款人数成长率',DataObj:'MAvgPeopleNum'}, Name: '平均付款人数成长率',
{Name:'平均付款单数成长率',DataObj:'MAvgOrderNum'}, DataObj: 'MAvgPeopleNum'
{Name:'平均付款金额成长率(天)',DataObj:'MAvgPayMoney'}, },
{Name:'平均付款件数成长率',DataObj:'MAvgBuyNum'}, {
{Name:'平均每人购买单数成长率',DataObj:'PAvgOrderNum'}, Name: '平均付款单数成长率',
{Name:'平均每人购买件数成长率',DataObj:'PAvgBuyNum'}, DataObj: 'MAvgOrderNum'
{Name:'平均每单单价成长率',DataObj:'PAvgUnitPrice'}, },
{Name:'平均每人购买单价成长率',DataObj:'PAvgBuyPrice'}, {
{Name:'毛利成长率',DataObj:'PAvgProfit'}, Name: '平均付款金额成长率(天)',
{Name:'会员下订单成长率',DataObj:'PAvgMOrderRate'}, DataObj: 'MAvgPayMoney'
{Name:'普象会员成长率',DataObj:'PAvgPXNum'}, },
{Name:'VIP会员成长率',DataObj:'PAvgVipNum'}, {
{Name:'银象会员成长率',DataObj:'PAvgYXNum'}, Name: '平均付款件数成长率',
{Name:'金象会员成长率',DataObj:'PAvgJXNum'}, DataObj: 'MAvgBuyNum'
{Name:'会员成长率',DataObj:'PAvgTotalMNum'}, },
{
Name: '平均每人购买单数成长率',
DataObj: 'PAvgOrderNum'
},
{
Name: '平均每人购买件数成长率',
DataObj: 'PAvgBuyNum'
},
{
Name: '平均每单单价成长率',
DataObj: 'PAvgUnitPrice'
},
{
Name: '平均每人购买单价成长率',
DataObj: 'PAvgBuyPrice'
},
{
Name: '毛利成长率',
DataObj: 'PAvgProfit'
},
{
Name: '会员下订单成长率',
DataObj: 'PAvgMOrderRate'
},
{
Name: '普象会员成长率',
DataObj: 'PAvgPXNum'
},
{
Name: 'VIP会员成长率',
DataObj: 'PAvgVipNum'
},
{
Name: '银象会员成长率',
DataObj: 'PAvgYXNum'
},
{
Name: '金象会员成长率',
DataObj: 'PAvgJXNum'
},
{
Name: '会员成长率',
DataObj: 'PAvgTotalMNum'
},
], ],
parentClientWidth:0, parentClientWidth: 0,
type:0, type: 0,
} }
}, },
mounted(){ mounted() {
}, },
created() { created() {
let nowtime = new Date() let nowtime = new Date()
this.msg.StartYear = (nowtime.getFullYear()-1).toString() this.msg.StartYear = (nowtime.getFullYear() - 1).toString()
this.msg.EndYear = nowtime.getFullYear().toString() this.msg.EndYear = nowtime.getFullYear().toString()
this.getDateList() this.getDateList()
}, },
methods: { methods: {
getmonth(e){ getmonth(e) {
this.getDateList() this.getDateList()
}, },
getDateList() { getDateList() {
if(this.msg.StartYear =='' || this.msg.EndYear ==''){ if (this.msg.StartYear == '' || this.msg.EndYear == '') {
this.Info('请选择开始或者结束年份') this.Info('请选择开始或者结束年份')
return return
} }
if((new Date(this.msg.StartYear).getTime())>=(new Date(this.msg.EndYear)).getTime()){ if ((new Date(this.msg.StartYear).getTime()) >= (new Date(this.msg.EndYear)).getTime()) {
this.msg.EndYear=''; this.msg.EndYear = '';
this.Info('结束年份不能大于开始年份') this.Info('结束年份不能大于开始年份')
return return
} }
if((new Date(this.msg.EndYear).getTime())>=(new Date()).getTime()){ if ((new Date(this.msg.EndYear).getTime()) >= (new Date()).getTime()) {
this.msg.EndYear=''; this.msg.EndYear = '';
this.Info('结束年份不能大于今年') this.Info('结束年份不能大于今年')
return return
} }
this.loading = true; this.loading = true;
this.RateList=[]; this.RateList = [];
this.mallapipost("/api/LiveHouse/GetDSYearStartistics", this.msg, res => { this.mallapipost("/api/LiveHouse/GetDSYearStartistics", this.msg, res => {
this.loading = false; this.loading = false;
if (res.data.resultCode == 1) { if (res.data.resultCode == 1) {
if(res.data.data){ if (res.data.data) {
this.YearSList = res.data.data.YearSList; this.YearSList = res.data.data.YearSList;
this.YearSList.forEach(x=>{ this.YearSList.forEach(x => {
if(x.Date.indexOf('成長率')!=-1){ if (x.Date.indexOf('成長率') != -1) {
x.PeopleNum = x.PeopleNum+'%'; x.PeopleNum = x.PeopleNum + '%';
x.OrderNum = x.OrderNum+'%'; x.OrderNum = x.OrderNum + '%';
x.PayMoney = x.PayMoney+'%'; x.PayMoney = x.PayMoney + '%';
x.BuyNum = x.BuyNum+'%'; x.BuyNum = x.BuyNum + '%';
x.TotalPayPeople = x.TotalPayPeople+'%'; x.TotalPayPeople = x.TotalPayPeople + '%';
x.MAvgPeopleNum = x.MAvgPeopleNum+'%'; x.MAvgPeopleNum = x.MAvgPeopleNum + '%';
x.Profit = x.Profit+'%'; x.Profit = x.Profit + '%';
x.PXNum = x.PXNum+'%'; x.PXNum = x.PXNum + '%';
x.VipNum = x.VipNum+'%'; x.VipNum = x.VipNum + '%';
x.YXNum = x.YXNum+'%'; x.YXNum = x.YXNum + '%';
x.JXNum = x.JXNum+'%'; x.JXNum = x.JXNum + '%';
x.TotalMNum = x.TotalMNum+'%'; x.TotalMNum = x.TotalMNum + '%';
} }
}) })
this.YearSListwidth = (this.YearSList.length * 120); this.YearSListwidth = (this.YearSList.length * 120);
//第二张表 //第二张表
this.YearAvgSList = res.data.data.YearAvgSList; this.YearAvgSList = res.data.data.YearAvgSList;
this.YearAvgSList.forEach(x=>{ this.YearAvgSList.forEach(x => {
x.PAvgMOrderRate = x.PAvgMOrderRate+'%'; x.PAvgMOrderRate = x.PAvgMOrderRate + '%';
if(x.Date.indexOf('成長率')!=-1){ if (x.Date.indexOf('成長率') != -1) {
x.MAvgPeopleNum = x.MAvgPeopleNum+'%'; x.MAvgPeopleNum = x.MAvgPeopleNum + '%';
x.MAvgOrderNum = x.MAvgOrderNum+'%'; x.MAvgOrderNum = x.MAvgOrderNum + '%';
x.MAvgPayMoney = x.MAvgPayMoney+'%'; x.MAvgPayMoney = x.MAvgPayMoney + '%';
x.MAvgBuyNum = x.MAvgBuyNum+'%'; x.MAvgBuyNum = x.MAvgBuyNum + '%';
x.PAvgOrderNum = x.PAvgOrderNum+'%'; x.PAvgOrderNum = x.PAvgOrderNum + '%';
x.PAvgBuyNum = x.PAvgBuyNum+'%'; x.PAvgBuyNum = x.PAvgBuyNum + '%';
x.PAvgBuyPrice = x.PAvgBuyPrice+'%'; x.PAvgBuyPrice = x.PAvgBuyPrice + '%';
x.PAvgUnitPrice = x.PAvgUnitPrice+'%'; x.PAvgUnitPrice = x.PAvgUnitPrice + '%';
x.PAvgMemberNum = x.PAvgMemberNum+'%'; x.PAvgMemberNum = x.PAvgMemberNum + '%';
x.PAvgPaymentNum = x.PAvgPaymentNum+'%'; x.PAvgPaymentNum = x.PAvgPaymentNum + '%';
x.PAvgReBuyNum = x.PAvgReBuyNum+'%'; x.PAvgReBuyNum = x.PAvgReBuyNum + '%';
x.PAvgReBuyRate = x.PAvgReBuyRate+'%'; x.PAvgReBuyRate = x.PAvgReBuyRate + '%';
x.PAvgNewPeopleNum = x.PAvgNewPeopleNum+'%'; x.PAvgNewPeopleNum = x.PAvgNewPeopleNum + '%';
x.PAvgProfitRate = x.PAvgProfitRate+'%'; x.PAvgProfitRate = x.PAvgProfitRate + '%';
} }
}) })
this.YearAvgSListwidth = (this.YearAvgSList.length * 120) this.YearAvgSListwidth = (this.YearAvgSList.length * 120)
if(this.tablewidth>(this.YearAvgSListwidth + this.YearSListwidth + 300)+50){ if (this.tablewidth > (this.YearAvgSListwidth + this.YearSListwidth + 300) + 50) {
this.type = 1 this.type = 1
} }
//第三张表 //第三张表
this.YearRateSList = res.data.data.YearRateSList; this.YearRateSList = res.data.data.YearRateSList;
this.YearRateSListwidth = (this.YearRateSList.length * 120) this.YearRateSListwidth = (this.YearRateSList.length * 120)
} }
} else { } else {
this.Info(res.data.message); this.Info(res.data.message);
} }
}) })
}, },
Export() { Export() {
let msg = this.msg let msg = this.msg
msg = JSON.parse(JSON.stringify(msg)); msg = JSON.parse(JSON.stringify(msg));
this.GetMallLocalFile( this.GetMallLocalFile(
"/api/LiveHouse/GetDSYearStartisticsToExcel", "/api/LiveHouse/GetDSYearStartisticsToExcel",
msg, msg,
"电商年度比统计"+this.msg.StartYear+"-"+this.msg.EndYear+".xls" "电商年度比统计" + this.msg.StartYear + "-" + this.msg.EndYear + ".xls"
); );
}, },
goyearurl(x){ goyearurl(x) {
console.log(x) if (x.Date.indexOf('成') == -1) {
if(x.Date.indexOf('成')==-1){
this.$router.push({ this.$router.push({
name: 'dianshangyeardata', name: 'dianshangyeardata',
query: { query: {
timedata: x.Date, timedata: x.Date,
blank:'y' blank: 'y'
} }
}); });
} }
}, },
getisred(dataInfo) {
if ((dataInfo.toString()).indexOf('-') != -1) {
getisred(dataInfo){
if((dataInfo.toString()).indexOf('-')!=-1){
return true return true
}else{ } else {
return false return false
} }
}, },
gechengzhangv(dataInfo){ gechengzhangv(dataInfo) {
if((dataInfo.toString()).indexOf('-')!=-1){ if ((dataInfo.toString()).indexOf('-') != -1) {
return true return true
}else{ } else {
return false return false
} }
}, },
...@@ -363,27 +507,32 @@ ...@@ -363,27 +507,32 @@
this.$forceUpdate() this.$forceUpdate()
}, },
tableRowClassName({row, rowIndex}){ tableRowClassName({
if(row.hasOwnProperty('Date') && row.Date=='平均/总计' ){ row,
rowIndex
}) {
if (row.hasOwnProperty('Date') && row.Date == '平均/总计') {
return 'huanbichengz' return 'huanbichengz'
}else{ } else {
return 'monthstyel' return 'monthstyel'
} }
}, },
tableRowClassName2({row, rowIndex}){ tableRowClassName2({
if(row.hasOwnProperty('Date') && row.Date=='平均/总计' ){ row,
rowIndex
}) {
if (row.hasOwnProperty('Date') && row.Date == '平均/总计') {
return 'monthstyel2' return 'monthstyel2'
}else{ } else {
return 'monthstyel3' return 'monthstyel3'
} }
}, },
} }
} }
</script> </script>
<style> <style>
.dianshangannualRatio .el-card__header { .dianshangannualRatio .el-card__header {
display: flex; display: flex;
flex-direction: row; flex-direction: row;
...@@ -392,7 +541,8 @@ ...@@ -392,7 +541,8 @@
background: #fff; background: #fff;
padding: 18px 20px; padding: 18px 20px;
} }
.dianshangannualRatio .tablestyle{
.dianshangannualRatio .tablestyle {
display: flex; display: flex;
} }
...@@ -511,62 +661,77 @@ ...@@ -511,62 +661,77 @@
align-items: flex-start; align-items: flex-start;
background: #fff; background: #fff;
} }
.dianshangannualRatio .diaBox{
.dianshangannualRatio .diaBox {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
} }
.dianshangannualRatio .angclass{
.dianshangannualRatio .angclass {
background: #FDC022; background: #FDC022;
} }
.dianshangannualRatio .el-table .huanbichengz{
.dianshangannualRatio .el-table .huanbichengz {
background: #EB60BB; background: #EB60BB;
} }
.dianshangannualRatio .qthuanbicheng{
.dianshangannualRatio .qthuanbicheng {
background: #FEFF30; background: #FEFF30;
width: 120px; width: 120px;
} }
.dianshangannualRatio .el-table .monthstyel{
.dianshangannualRatio .el-table .monthstyel {
background: #F6C8AB; background: #F6C8AB;
} }
.dianshangannualRatio .el-table .monthstyel2{
.dianshangannualRatio .el-table .monthstyel2 {
background: #F6CAAD; background: #F6CAAD;
} }
.dianshangannualRatio .el-table .monthstyel3{
.dianshangannualRatio .el-table .monthstyel3 {
background: #FE9A6B; background: #FE9A6B;
} }
.dianshangannualRatio .el-table .whitestyle{ .dianshangannualRatio .el-table .whitestyle {
background: #FFF; background: #FFF;
} }
.dianshangannualRatio .el-date-editor.el-input, .el-date-editor.el-input__inner { .dianshangannualRatio .el-date-editor.el-input,
.el-date-editor.el-input__inner {
width: 360px; width: 360px;
} }
.dianshangannualRatio .singeRowTable{
.dianshangannualRatio .singeRowTable {
background: rgb(255, 255, 255); background: rgb(255, 255, 255);
margin-top: 20px; margin-top: 20px;
} }
.dianshangannualRatio .growthrate{
.dianshangannualRatio .growthrate {
background: #FFF2CD; background: #FFF2CD;
width: 120px; width: 120px;
} }
.dianshangannualRatio .yearstyle{
.dianshangannualRatio .yearstyle {
background: #FE99FD; background: #FE99FD;
width: 120px; width: 120px;
} }
.dianshangannualRatio tr{
.dianshangannualRatio tr {
height: 30px !important; height: 30px !important;
} }
.dianshangannualRatio tr td{
.dianshangannualRatio tr td {
cursor: pointer; cursor: pointer;
} }
.dianshangannualRatio span{
.dianshangannualRatio span {
font-size: 13px; font-size: 13px;
font-weight: normal; font-weight: normal;
} }
.dianshangannualRatio ::-webkit-scrollbar { .dianshangannualRatio ::-webkit-scrollbar {
height: 12px; height: 12px;
} }
</style>
</style>
...@@ -3,66 +3,50 @@ ...@@ -3,66 +3,50 @@
<div class="el-card__header"> <div class="el-card__header">
<span>电商每月数据</span> <span>电商每月数据</span>
<div style="display: flex;flex-direction: row;align-items: center"> <div style="display: flex;flex-direction: row;align-items: center">
<!---->
<el-button type="primary" class="el-button--small" @click="Export">导出全部</el-button> <el-button type="primary" class="el-button--small" @click="Export">导出全部</el-button>
</div> </div>
</div> </div>
<div class="content"> <div class="content">
<div style="display: flex;flex-direction: row;align-items: center"> <div style="display: flex;flex-direction: row;align-items: center">
<div class="block"> <div class="block">
<el-date-picker v-model="msg.StartTime" type="month" format='yyyy-MM' value-format="yyyy-MM"
@change='getmonth' :clearable='false' placeholder="选择开始月份">
<el-date-picker
v-model="msg.StartTime"
type="month"
format='yyyy-MM'
value-format="yyyy-MM"
@change='getmonth'
:clearable='false'
placeholder="选择开始月份">
</el-date-picker> </el-date-picker>
<span style="margin: 0 10px;">-</span> <span style="margin: 0 10px;">-</span>
<el-date-picker <el-date-picker v-model="msg.EndTime" type="month" format='yyyy-MM' value-format="yyyy-MM" @change='getmonth'
v-model="msg.EndTime" :clearable='false' placeholder="选择结束月份">
type="month"
format='yyyy-MM'
value-format="yyyy-MM"
@change='getmonth'
:clearable='false'
placeholder="选择结束月份">
</el-date-picker> </el-date-picker>
</div> </div>
</div> </div>
</div> </div>
<div style="padding: 15px ;background: #FFF;margin-bottom: 50px;"> <div style="padding: 15px ;background: #FFF;margin-bottom: 50px;">
<el-table :data="DataList" v-loading="loading" header-cell-class-name="headClass" header-row-class-name='angclass' <el-table :data="DataList" v-loading="loading" header-cell-class-name="headClass" header-row-class-name='angclass'
style="width: 100%;" border :row-class-name="tableRowClassName" :cell-style="columnStyle" > style="width: 100%;" border :row-class-name="tableRowClassName" :cell-style="columnStyle">
<el-table-column label="月份" prop="Date" width='80' fixed> <el-table-column label="月份" prop="Date" width='80' fixed>
<template slot-scope="scope"> <template slot-scope="scope">
<span v-if="scope.row.Date == '平均/总计'" >平均</span> <span v-if="scope.row.Date == '平均/总计'">平均</span>
<span v-else @click="clickTr(scope.row)">{{scope.row.Date}}</span> <span v-else @click="clickTr(scope.row)">{{scope.row.Date}}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="平均付款人数(天)" prop='MAvgPeopleNum' width='125'> <el-table-column label="平均付款人数(天)" prop='MAvgPeopleNum' width='125'>
<template slot-scope="scope"> <template slot-scope="scope">
<span v-if="getisred(scope.row.MAvgPeopleNum) == true" style="color: #FD0F05;">{{scope.row.MAvgPeopleNum}}</span> <span v-if="getisred(scope.row.MAvgPeopleNum) == true"
style="color: #FD0F05;">{{scope.row.MAvgPeopleNum}}</span>
<span v-else>{{scope.row.MAvgPeopleNum}}</span> <span v-else>{{scope.row.MAvgPeopleNum}}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="平均付款单数" prop="MAvgOrderNum" width='125'> <el-table-column label="平均付款单数" prop="MAvgOrderNum" width='125'>
<template slot-scope="scope"> <template slot-scope="scope">
<span v-if="getisred(scope.row.MAvgOrderNum) == true" style="color: #FD0F05;">{{scope.row.MAvgOrderNum}}</span> <span v-if="getisred(scope.row.MAvgOrderNum) == true"
style="color: #FD0F05;">{{scope.row.MAvgOrderNum}}</span>
<span v-else>{{scope.row.MAvgOrderNum}}</span> <span v-else>{{scope.row.MAvgOrderNum}}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="平均付款金额" prop="MAvgPayMoney" width='120'> <el-table-column label="平均付款金额" prop="MAvgPayMoney" width='120'>
<template slot-scope="scope"> <template slot-scope="scope">
<span v-if="getisred(scope.row.MAvgPayMoney) == true" style="color: #FD0F05;">{{scope.row.MAvgPayMoney}}</span> <span v-if="getisred(scope.row.MAvgPayMoney) == true"
style="color: #FD0F05;">{{scope.row.MAvgPayMoney}}</span>
<span v-else>{{scope.row.MAvgPayMoney}}</span> <span v-else>{{scope.row.MAvgPayMoney}}</span>
</template> </template>
</el-table-column> </el-table-column>
...@@ -74,7 +58,8 @@ ...@@ -74,7 +58,8 @@
</el-table-column> </el-table-column>
<el-table-column label="平均每人购买单数" prop="PAvgOrderNum" width='125'> <el-table-column label="平均每人购买单数" prop="PAvgOrderNum" width='125'>
<template slot-scope="scope"> <template slot-scope="scope">
<span v-if="getisred(scope.row.PAvgOrderNum) == true" style="color: #FD0F05;">{{scope.row.PAvgOrderNum}}</span> <span v-if="getisred(scope.row.PAvgOrderNum) == true"
style="color: #FD0F05;">{{scope.row.PAvgOrderNum}}</span>
<span v-else>{{scope.row.PAvgOrderNum}}</span> <span v-else>{{scope.row.PAvgOrderNum}}</span>
</template> </template>
</el-table-column> </el-table-column>
...@@ -86,64 +71,73 @@ ...@@ -86,64 +71,73 @@
</el-table-column> </el-table-column>
<el-table-column label="平均每单单价" prop="PAvgUnitPrice" width='120'> <el-table-column label="平均每单单价" prop="PAvgUnitPrice" width='120'>
<template slot-scope="scope"> <template slot-scope="scope">
<span v-if="getisred(scope.row.PAvgUnitPrice) == true" style="color: #FD0F05;">{{scope.row.PAvgUnitPrice}}</span> <span v-if="getisred(scope.row.PAvgUnitPrice) == true"
style="color: #FD0F05;">{{scope.row.PAvgUnitPrice}}</span>
<span v-else>{{scope.row.PAvgUnitPrice}}</span> <span v-else>{{scope.row.PAvgUnitPrice}}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="平均每人购买单价" prop="PAvgBuyPrice" width='125'> <el-table-column label="平均每人购买单价" prop="PAvgBuyPrice" width='125'>
<template slot-scope="scope"> <template slot-scope="scope">
<span v-if="getisred(scope.row.PAvgBuyPrice) == true" style="color: #FD0F05;">{{scope.row.PAvgBuyPrice}}</span> <span v-if="getisred(scope.row.PAvgBuyPrice) == true"
style="color: #FD0F05;">{{scope.row.PAvgBuyPrice}}</span>
<span v-else>{{scope.row.PAvgBuyPrice}}</span> <span v-else>{{scope.row.PAvgBuyPrice}}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="平均会员累计数" prop="PAvgMemberNum" width='120'> <el-table-column label="平均会员累计数" prop="PAvgMemberNum" width='120'>
<template slot-scope="scope"> <template slot-scope="scope">
<span v-if="getisred(scope.row.PAvgMemberNum) == true" style="color: #FD0F05;">{{scope.row.PAvgMemberNum}}</span> <span v-if="getisred(scope.row.PAvgMemberNum) == true"
style="color: #FD0F05;">{{scope.row.PAvgMemberNum}}</span>
<span v-else>{{scope.row.PAvgMemberNum}}</span> <span v-else>{{scope.row.PAvgMemberNum}}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="平均付款累计人数(月)" prop="PAvgPaymentNum" width='150'> <el-table-column label="平均付款累计人数(月)" prop="PAvgPaymentNum" width='150'>
<template slot-scope="scope"> <template slot-scope="scope">
<span v-if="getisred(scope.row.PAvgPaymentNum) == true" style="color: #FD0F05;">{{scope.row.PAvgPaymentNum}}</span> <span v-if="getisred(scope.row.PAvgPaymentNum) == true"
style="color: #FD0F05;">{{scope.row.PAvgPaymentNum}}</span>
<span v-else>{{scope.row.PAvgPaymentNum}}</span> <span v-else>{{scope.row.PAvgPaymentNum}}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="平均会员下订单转换率" prop="PAvgMOrderRate" width='155'> <el-table-column label="平均会员下订单转换率" prop="PAvgMOrderRate" width='155'>
<template slot-scope="scope"> <template slot-scope="scope">
<span v-if="getisred(scope.row.PAvgMOrderRate) == true" style="color: #FD0F05;">{{scope.row.PAvgMOrderRate}}</span> <span v-if="getisred(scope.row.PAvgMOrderRate) == true"
style="color: #FD0F05;">{{scope.row.PAvgMOrderRate}}</span>
<span v-else>{{scope.row.PAvgMOrderRate}}</span> <span v-else>{{scope.row.PAvgMOrderRate}}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="平均复购人数" prop="PAvgReBuyNum" width='120'> <el-table-column label="平均复购人数" prop="PAvgReBuyNum" width='120'>
<template slot-scope="scope"> <template slot-scope="scope">
<span v-if="getisred(scope.row.PAvgReBuyNum) == true" style="color: #FD0F05;">{{scope.row.PAvgReBuyNum}}</span> <span v-if="getisred(scope.row.PAvgReBuyNum) == true"
style="color: #FD0F05;">{{scope.row.PAvgReBuyNum}}</span>
<span v-else>{{scope.row.PAvgReBuyNum}}</span> <span v-else>{{scope.row.PAvgReBuyNum}}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="平均复购率" prop="PAvgReBuyRate" width='120'> <el-table-column label="平均复购率" prop="PAvgReBuyRate" width='120'>
<template slot-scope="scope"> <template slot-scope="scope">
<span v-if="getisred(scope.row.PAvgReBuyRate) == true" style="color: #FD0F05;">{{scope.row.PAvgReBuyRate}}</span> <span v-if="getisred(scope.row.PAvgReBuyRate) == true"
style="color: #FD0F05;">{{scope.row.PAvgReBuyRate}}</span>
<span v-else>{{scope.row.PAvgReBuyRate}}</span> <span v-else>{{scope.row.PAvgReBuyRate}}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="平均新人下单" prop="PAvgNewPeopleNum" width='120'> <el-table-column label="平均新人下单" prop="PAvgNewPeopleNum" width='120'>
<template slot-scope="scope"> <template slot-scope="scope">
<span v-if="getisred(scope.row.PAvgNewPeopleNum) == true" style="color: #FD0F05;">{{scope.row.PAvgNewPeopleNum}}</span> <span v-if="getisred(scope.row.PAvgNewPeopleNum) == true"
style="color: #FD0F05;">{{scope.row.PAvgNewPeopleNum}}</span>
<span v-else>{{scope.row.PAvgNewPeopleNum}}</span> <span v-else>{{scope.row.PAvgNewPeopleNum}}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="毛利率" prop="PAvgProfitRate" width='120'> <el-table-column label="毛利率" prop="PAvgProfitRate" width='120'>
<template slot-scope="scope"> <template slot-scope="scope">
<span v-if="getisred(scope.row.PAvgProfitRate) == true" style="color: #FD0F05;">{{scope.row.PAvgProfitRate}}</span> <span v-if="getisred(scope.row.PAvgProfitRate) == true"
style="color: #FD0F05;">{{scope.row.PAvgProfitRate}}</span>
<span v-else>{{scope.row.PAvgProfitRate}}</span> <span v-else>{{scope.row.PAvgProfitRate}}</span>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<el-table :data="DataList" v-loading="loading" header-cell-class-name="headClass" header-row-class-name='angclass' style="width: 100%;margin-top: 20px;" border <el-table :data="DataList" v-loading="loading" header-cell-class-name="headClass" header-row-class-name='angclass'
:row-class-name="tableRowClassName2" :cell-style="columnStyle" > style="width: 100%;margin-top: 20px;" border :row-class-name="tableRowClassName2" :cell-style="columnStyle">
<el-table-column label="月份" prop="Date" width='80' fixed> <el-table-column label="月份" prop="Date" width='80' fixed>
<template slot-scope="scope"> <template slot-scope="scope">
<span v-if="scope.row.Date == '平均/总计'" >总计</span> <span v-if="scope.row.Date == '平均/总计'">总计</span>
<span v-else @click="clickTr(scope.row)">{{scope.row.Date}}</span> <span v-else @click="clickTr(scope.row)">{{scope.row.Date}}</span>
</template> </template>
</el-table-column> </el-table-column>
...@@ -173,12 +167,11 @@ ...@@ -173,12 +167,11 @@
</el-table-column> </el-table-column>
<el-table-column label="总付款人" prop="TotalPayPeople" width='120'> <el-table-column label="总付款人" prop="TotalPayPeople" width='120'>
<template slot-scope="scope"> <template slot-scope="scope">
<span v-if="getisred(scope.row.TotalPayPeople) == true" style="color: #FD0F05;">{{scope.row.TotalPayPeople}}</span> <span v-if="getisred(scope.row.TotalPayPeople) == true"
style="color: #FD0F05;">{{scope.row.TotalPayPeople}}</span>
<span v-else>{{scope.row.TotalPayPeople}}</span> <span v-else>{{scope.row.TotalPayPeople}}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="普象" prop="PXNum" width='120'> <el-table-column label="普象" prop="PXNum" width='120'>
<template slot-scope="scope"> <template slot-scope="scope">
<span v-if="getisred(scope.row.PXNum) == true" style="color: #FD0F05;">{{scope.row.PXNum}}</span> <span v-if="getisred(scope.row.PXNum) == true" style="color: #FD0F05;">{{scope.row.PXNum}}</span>
...@@ -214,204 +207,243 @@ ...@@ -214,204 +207,243 @@
<div style="width: 100%;display: flex;" v-if='RateList && RateList.length>0 '> <div style="width: 100%;display: flex;" v-if='RateList && RateList.length>0 '>
<div style="width: 150px;"> <div style="width: 150px;">
<table class="singeRowTable TcNewTable" border="1" cellspacing="0" cellpadding="0" :style="{width: '150px'}"> <table class="singeRowTable TcNewTable" border="1" cellspacing="0" cellpadding="0" :style="{width: '150px'}">
<tr > <td class="qthuanbicheng" style="width: 150px;"></td> </tr> <tr>
<tr v-for='(x,y) in leftData' :key = 'y'> <td class="qthuanbicheng">{{x.Name}}</td></tr> <td class="qthuanbicheng" style="width: 150px;"></td>
</tr>
<tr v-for='(x,y) in leftData' :key='y'>
<td class="qthuanbicheng">{{x.Name}}</td>
</tr>
</table> </table>
</div> </div>
<div style="width:1px; overflow-x:scroll;flex:1" > <div style="width:1px; overflow-x:scroll;flex:1">
<table class="singeRowTable TcNewTable" border="1" cellspacing="0" cellpadding="0" :style="{width: tablewidth+'px'}"> <table class="singeRowTable TcNewTable" border="1" cellspacing="0" cellpadding="0"
<tr > <td class="qthuanbicheng" style="width:90px;font-size: 12px;" v-for='(x,y) in RateList' :key = 'y' @click='goMonthurl(x)'>{{x.Date}}</td></tr> :style="{width: tablewidth+'px'}">
<tr v-for='(item,index) in leftData' :key = 'index'> <tr>
<td :class="x.Date.indexOf('成長率')!=-1?'growthrate':'yearstyle'" style="font-size: 12px;" v-for='(x,y) in RateList' :key = 'y' > <td class="qthuanbicheng" style="width:90px;font-size: 12px;" v-for='(x,y) in RateList' :key='y'
<span :style="{color: getisred(x[item.DataObj]) == true?'#FD0F05':'#111111'}">{{x[item.DataObj]}}%</span> @click='goMonthurl(x)'>{{x.Date}}</td>
</tr>
<tr v-for='(item,index) in leftData' :key='index'>
<td :class="x.Date.indexOf('成長率')!=-1?'growthrate':'yearstyle'" style="font-size: 12px;"
v-for='(x,y) in RateList' :key='y'>
<span
:style="{color: getisred(x[item.DataObj]) == true?'#FD0F05':'#111111'}">{{x[item.DataObj]}}%</span>
</td> </td>
</tr> </tr>
</table> </table>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</template>
</template> <script>
<script>
export default { export default {
name: "dianshangyeardata", name: "dianshangyeardata",
data() { data() {
return { return {
value: '', value: '',
tableHeight: window.innerHeight - 50 - 41 - 69 -74 - 30, //窗口的高度减去你需要减去的高度 tableHeight: window.innerHeight - 50 - 41 - 69 - 74 - 30, //窗口的高度减去你需要减去的高度
msg: { msg: {
StartTime:'2021-01',//开始月份 StartTime: '2021-01', //开始月份
EndTime:'', EndTime: '',
}, },
loading: false, loading: false,
DataList:[], DataList: [],
RateList:[], RateList: [],
tablewidth:0, tablewidth: 0,
leftData:[ leftData: [{
{Name:'平均付款人数成长率',DataObj:'MAvgPeopleNum'}, Name: '平均付款人数成长率',
{Name:'平均付款单数成长率',DataObj:'MAvgOrderNum'}, DataObj: 'MAvgPeopleNum'
{Name:'平均付款金额成长率',DataObj:'MAvgPayMoney'}, },
{Name:'平均付款件数成长率',DataObj:'MAvgBuyNum'}, {
{Name:'平均每人购买单数成长率',DataObj:'PAvgOrderNum'}, Name: '平均付款单数成长率',
{Name:'平均每人购买件数成长率',DataObj:'PAvgBuyNum'}, DataObj: 'MAvgOrderNum'
{Name:'平均每单单价成长率',DataObj:'PAvgUnitPrice'}, },
{Name:'平均每人购买单价成长率',DataObj:'PAvgBuyPrice'}, {
{Name:'毛利率成长率',DataObj:'PAvgProfitRate'}, Name: '平均付款金额成长率',
{Name:'毛利成长率',DataObj:'PAvgProfit'}, DataObj: 'MAvgPayMoney'
{Name:'会员下订单成长率',DataObj:'PAvgMOrderRate'}, },
{Name:'普象会员成长率',DataObj:'PAvgPXNum'}, {
{Name:'VIP会员成长率',DataObj:'PAvgVipNum'}, Name: '平均付款件数成长率',
{Name:'银象会员成长率',DataObj:'PAvgYXNum'}, DataObj: 'MAvgBuyNum'
{Name:'金象会员成长率',DataObj:'PAvgJXNum'}, },
{Name:'会员总成长率',DataObj:'PAvgTotalMNum'}, {
Name: '平均每人购买单数成长率',
DataObj: 'PAvgOrderNum'
},
{
Name: '平均每人购买件数成长率',
DataObj: 'PAvgBuyNum'
},
{
Name: '平均每单单价成长率',
DataObj: 'PAvgUnitPrice'
},
{
Name: '平均每人购买单价成长率',
DataObj: 'PAvgBuyPrice'
},
{
Name: '毛利率成长率',
DataObj: 'PAvgProfitRate'
},
{
Name: '毛利成长率',
DataObj: 'PAvgProfit'
},
{
Name: '会员下订单成长率',
DataObj: 'PAvgMOrderRate'
},
{
Name: '普象会员成长率',
DataObj: 'PAvgPXNum'
},
{
Name: 'VIP会员成长率',
DataObj: 'PAvgVipNum'
},
{
Name: '银象会员成长率',
DataObj: 'PAvgYXNum'
},
{
Name: '金象会员成长率',
DataObj: 'PAvgJXNum'
},
{
Name: '会员总成长率',
DataObj: 'PAvgTotalMNum'
},
] ]
} }
}, },
created() { created() {
let nowtime = new Date() let nowtime = new Date()
let startT = nowtime.setMonth(nowtime.getMonth()-12) let startT = nowtime.setMonth(nowtime.getMonth() - 12)
let startdate = new Date(startT) let startdate = new Date(startT)
this.msg.StartTime = (startdate.getFullYear()) + '-' +((startdate.getMonth()+2)<10 ?'0'+(startdate.getMonth()+2):startdate.getMonth()+2)//此次加2月是根据后台数据不是会查出13个月的数据 this.msg.StartTime = (startdate.getFullYear()) + '-' + ((startdate.getMonth() + 2) < 10 ? '0' + (startdate
.getMonth() + 2) : startdate.getMonth() + 2) //此次加2月是根据后台数据不是会查出13个月的数据
let enddate = new Date(); let enddate = new Date();
this.msg.EndTime = enddate.getFullYear() + '-' +((enddate.getMonth()+1)<10 ?'0'+(enddate.getMonth()+1):enddate.getMonth()+1) this.msg.EndTime = enddate.getFullYear() + '-' + ((enddate.getMonth() + 1) < 10 ? '0' + (enddate.getMonth() + 1) :
enddate.getMonth() + 1)
if (this.$route.query.timedata) { if (this.$route.query.timedata) {
this.msg.StartTime=this.$route.query.timedata+'-01'; this.msg.StartTime = this.$route.query.timedata + '-01';
this.msg.EndTime=this.$route.query.timedata+'-12'; this.msg.EndTime = this.$route.query.timedata + '-12';
} }
this.getDateList() this.getDateList()
}, },
methods: { methods: {
getmonth(e){ getmonth(e) {
this.getDateList() this.getDateList()
}, },
getDateList() { getDateList() {
if(this.msg.StartTime =='' || this.msg.EndTime ==''){ if (this.msg.StartTime == '' || this.msg.EndTime == '') {
this.Info('请选择开始或者结束月份') this.Info('请选择开始或者结束月份')
return return
} }
if((new Date(this.msg.StartTime).getTime())>=(new Date(this.msg.EndTime)).getTime()){ if ((new Date(this.msg.StartTime).getTime()) >= (new Date(this.msg.EndTime)).getTime()) {
this.msg.EndTime=''; this.msg.EndTime = '';
this.Info('结束月份不能大于开始月份') this.Info('结束月份不能大于开始月份')
return return
} }
// if((new Date(this.msg.EndTime).getTime())>=(new Date()).getTime()){
// this.msg.EndTime='';
// this.Info('结束月份不能大于这个月')
// return
// }
this.loading = true; this.loading = true;
this.RateList=[]; this.RateList = [];
this.mallapipost("/api/LiveHouse/GetDSMoreMonthStatistics", this.msg, res => { this.mallapipost("/api/LiveHouse/GetDSMoreMonthStatistics", this.msg, res => {
this.loading = false; this.loading = false;
if (res.data.resultCode == 1) { if (res.data.resultCode == 1) {
if(res.data.data){ if (res.data.data) {
this.DataList = res.data.data.DataList; this.DataList = res.data.data.DataList;
this.DataList.forEach(x=>{ this.DataList.forEach(x => {
x.PAvgMOrderRate = x.PAvgMOrderRate +'%'; x.PAvgMOrderRate = x.PAvgMOrderRate + '%';
x.PAvgReBuyRate = x.PAvgReBuyRate +'%'; x.PAvgReBuyRate = x.PAvgReBuyRate + '%';
x.PAvgProfitRate = x.PAvgProfitRate +'%'; x.PAvgProfitRate = x.PAvgProfitRate + '%';
}) })
this.RateList = res.data.data.RateList; this.RateList = res.data.data.RateList;
this.tablewidth = (this.RateList.length * 90) + 150
this.tablewidth = (this.RateList.length * 90)+150
} }
} else { } else {
this.Info(res.data.message); this.Info(res.data.message);
} }
}) })
}, },
Export() { Export() {
let msg = this.msg let msg = this.msg
msg = JSON.parse(JSON.stringify(msg)); msg = JSON.parse(JSON.stringify(msg));
this.GetMallLocalFile( this.GetMallLocalFile(
"/api/LiveHouse/GetDSMoreMonthStatisticsToExcel", "/api/LiveHouse/GetDSMoreMonthStatisticsToExcel",
msg, msg,
"电商每月统计"+this.msg.StartTime+"-"+this.msg.EndTime+".xls" "电商每月统计" + this.msg.StartTime + "-" + this.msg.EndTime + ".xls"
); );
}, },
getisred(dataInfo) {
if ((dataInfo.toString()).indexOf('-') != -1) {
getisred(dataInfo){
if((dataInfo.toString()).indexOf('-')!=-1){
return true return true
}else{ } else {
return false return false
} }
}, },
onInput() { onInput() {
this.$forceUpdate() this.$forceUpdate()
}, },
tableRowClassName({row, rowIndex}){ tableRowClassName({
if(row.hasOwnProperty('Date') && row.Date=='平均/总计' ){ row,
rowIndex
}) {
if (row.hasOwnProperty('Date') && row.Date == '平均/总计') {
return 'huanbichengz' return 'huanbichengz'
}else{ } else {
return 'monthstyel' return 'monthstyel'
} }
}, },
tableRowClassName2({row, rowIndex}){ tableRowClassName2({
if(row.hasOwnProperty('Date') && row.Date=='平均/总计' ){ row,
rowIndex
}) {
if (row.hasOwnProperty('Date') && row.Date == '平均/总计') {
return 'monthstyel2' return 'monthstyel2'
}else{ } else {
return 'monthstyel3' return 'monthstyel3'
} }
}, },
columnStyle({row, column, rowIndex, columnIndex}){ columnStyle({
if(row.hasOwnProperty('DateStr') && (columnIndex==1|| columnIndex==2||columnIndex==3||columnIndex==4)){ row,
column,
rowIndex,
columnIndex
}) {
if (row.hasOwnProperty('DateStr') && (columnIndex == 1 || columnIndex == 2 || columnIndex == 3 || columnIndex ==
4)) {
return 'background:#FFF;' return 'background:#FFF;'
} }
}, },
clickTr(row,){ clickTr(row, ) {
this.$router.push({ this.$router.push({
name: 'onlineRetailersdata', name: 'onlineRetailersdata',
query: { query: {
timedata: row.Date, timedata: row.Date,
blank:'y' blank: 'y'
} }
}); });
}, },
goMonthurl(row){ goMonthurl(row) {
console.log(row) if (row.Date.indexOf('平均') == -1) {
if(row.Date.indexOf('平均')==-1){
this.$router.push({ this.$router.push({
name: 'onlineRetailersdata', name: 'onlineRetailersdata',
query: { query: {
timedata: row.Date, timedata: row.Date,
blank:'y' blank: 'y'
} }
}); });
} }
} }
} }
} }
</script> </script>
<style> <style>
.dianshangyeardata .el-card__header { .dianshangyeardata .el-card__header {
display: flex; display: flex;
flex-direction: row; flex-direction: row;
...@@ -536,54 +568,67 @@ ...@@ -536,54 +568,67 @@
align-items: flex-start; align-items: flex-start;
background: #fff; background: #fff;
} }
.dianshangyeardata .diaBox{
.dianshangyeardata .diaBox {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
} }
.dianshangyeardata .angclass{
.dianshangyeardata .angclass {
background: #FDC022; background: #FDC022;
} }
.dianshangyeardata .el-table .huanbichengz{
.dianshangyeardata .el-table .huanbichengz {
background: #EB60BB; background: #EB60BB;
} }
.dianshangyeardata .qthuanbicheng{
.dianshangyeardata .qthuanbicheng {
background: #FEFF30; background: #FEFF30;
width: 90px; width: 90px;
} }
.dianshangyeardata .el-table .monthstyel{
.dianshangyeardata .el-table .monthstyel {
background: #F6C8AB; background: #F6C8AB;
} }
.dianshangyeardata .el-table .monthstyel2{
.dianshangyeardata .el-table .monthstyel2 {
background: #FDC022; background: #FDC022;
} }
.dianshangyeardata .el-table .monthstyel3{
.dianshangyeardata .el-table .monthstyel3 {
background: #FFF2CC; background: #FFF2CC;
} }
.dianshangyeardata .el-table .whitestyle{ .dianshangyeardata .el-table .whitestyle {
background: #FFF; background: #FFF;
} }
.dianshangyeardata .el-date-editor.el-input, .el-date-editor.el-input__inner { .dianshangyeardata .el-date-editor.el-input,
.el-date-editor.el-input__inner {
width: 360px; width: 360px;
} }
.dianshangyeardata .singeRowTable{
.dianshangyeardata .singeRowTable {
background: rgb(255, 255, 255); background: rgb(255, 255, 255);
margin-top: 20px; margin-top: 20px;
} }
.dianshangyeardata tr{
.dianshangyeardata tr {
height: 30px !important; height: 30px !important;
} }
.dianshangyeardata tr td{
.dianshangyeardata tr td {
cursor: pointer; cursor: pointer;
} }
.dianshangyeardata span{
.dianshangyeardata span {
font-size: 13px; font-size: 13px;
font-weight: normal; font-weight: normal;
} }
.dianshangyeardata ::-webkit-scrollbar { .dianshangyeardata ::-webkit-scrollbar {
height: 12px; height: 12px;
} }
</style>
</style>
...@@ -4724,7 +4724,6 @@ export default { ...@@ -4724,7 +4724,6 @@ export default {
{ name: "baojiadan", url: x.QuotationUrl }, { name: "baojiadan", url: x.QuotationUrl },
]; ];
} }
console.log(4720, this.addMsg);
this.addMsg.ScenicRefundArr = res.data.data.ScenicRefundArr; this.addMsg.ScenicRefundArr = res.data.data.ScenicRefundArr;
this.addMsg.OneSex = x.OneSex; this.addMsg.OneSex = x.OneSex;
this.addMsg.PlatformAccount = ""; this.addMsg.PlatformAccount = "";
......
...@@ -1856,11 +1856,8 @@ ...@@ -1856,11 +1856,8 @@
pageSize:5, pageSize:5,
}, },
res => { res => {
console.log("res",res.data);
if (res.data.resultCode == 1) {
} }
}
); );
}, },
GetSupperOrderEditAuth() { GetSupperOrderEditAuth() {
......
...@@ -9,8 +9,7 @@ ...@@ -9,8 +9,7 @@
</template> </template>
<template v-else> <template v-else>
<span style="color:red;font-size:14px;">已制单,不能在修改!</span> <span style="color:red;font-size:14px;">已制单,不能在修改!</span>
<input v-if="EditBtn" type="button" class="fr normalBtn mb30" value="保存" <input v-if="EditBtn" type="button" class="fr normalBtn mb30" value="保存" @click="saveList(1)" />
@click="saveList(1)" />
</template> </template>
</li> </li>
</ul> </ul>
...@@ -135,7 +134,6 @@ ...@@ -135,7 +134,6 @@
<el-option label='预付' value='4'></el-option> <el-option label='预付' value='4'></el-option>
<el-option label='网订' value='12'></el-option> <el-option label='网订' value='12'></el-option>
</el-select> </el-select>
</td> </td>
</tr> </tr>
<tr> <tr>
...@@ -162,7 +160,7 @@ ...@@ -162,7 +160,7 @@
export default { export default {
data() { data() {
return { return {
EditBtn:false,//房餐景点修改权限 EditBtn: false, //房餐景点修改权限
defaultSelectValue: 0, defaultSelectValue: 0,
DataList: [], DataList: [],
roomList: [], roomList: [],
...@@ -173,7 +171,7 @@ ...@@ -173,7 +171,7 @@
IsOperation: '', IsOperation: '',
//是否禁用按钮 //是否禁用按钮
IsDisabled: false, IsDisabled: false,
LineId:0,//线路编号 LineId: 0, //线路编号
} }
}, },
methods: { methods: {
...@@ -282,9 +280,8 @@ ...@@ -282,9 +280,8 @@
this.CheckAuth(); this.CheckAuth();
this.TCNUM = this.$route.query.TCNUM; this.TCNUM = this.$route.query.TCNUM;
this.flightTotal = this.$route.query.flightTotal; this.flightTotal = this.$route.query.flightTotal;
if(this.$route.query.LineId) if (this.$route.query.LineId) {
{ this.LineId = this.$route.query.LineId;
this.LineId=this.$route.query.LineId;
} }
this.GuestNum = this.$route.query.GuestNum; this.GuestNum = this.$route.query.GuestNum;
this.getList(); this.getList();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment