Commit 6ca5b644 by 吴娟华

'修复总览订单bug'

1 parent 7b8ea229
......@@ -314,7 +314,7 @@ export default {
},
searchForm: {
time: '',
ydMerchantId: '',
yqMerchantId: '',
merchantId: '',
subOrderCode: ''
},
......@@ -325,7 +325,7 @@ export default {
pickerOptions: 'rangePickerOptions'
}, {
label: '服务门店',
name: 'ydMerchantId',
name: 'yqMerchantId',
type: 'select',
optionList: [],
optionId: 'merchantId',
......@@ -424,7 +424,7 @@ export default {
handleReset() {
this.searchForm = {
time: '',
ydMerchantId: '',
yqMerchantId: '',
merchantId: '',
subOrderCode: ''
}
......@@ -469,8 +469,8 @@ export default {
},
getSummary() {
getSummary({
beginDateStr: moment(this.summaryDate).startOf('month').format('YYYY-MM-DD hh:mm:ss'),
endDateStr : moment(this.summaryDate).endOf('month').format('YYYY-MM-DD')+' 23:59:59',
beginDateStr: moment(this.summaryDate).startOf('month').format('YYYY-MM-DD'),
endDateStr : moment(this.summaryDate).endOf('month').format('YYYY-MM-DD'),
}).then((res) => {
this.summayData = res
})
......@@ -509,12 +509,16 @@ export default {
})
},
getParams() {
var params = {
merchantId: this.searchForm.merchantId
var params = {}
if(this.searchForm.yqMerchantId) {
params.yqMerchantId = this.searchForm.yqMerchantId
}
if(this.searchForm.merchantId) {
params.merchantId = this.searchForm.merchantId
}
if (this.searchForm.time) {
params.payStartDateStr = new Date(this.searchForm.time[0]).toLocaleDateString().replace(/\//g, '-')
params.payEndDateStr = new Date(this.searchForm.time[1]).toLocaleDateString().replace(/\//g, '-')
params.payStartDateStr = new Date(this.searchForm.time[0]).toLocaleDateString().replace(/\//g, '-')+' 00:00:00'
params.payEndDateStr = new Date(this.searchForm.time[1]).toLocaleDateString().replace(/\//g, '-')+' 23:59:59'
}
if(this.searchForm.subOrderCode) {
......@@ -525,6 +529,10 @@ export default {
handleSearch() {
this.page.pageNum = 1
this.getList()
getListTotal((this.getParams())).then((res) => {
this.totalPrice = res.totalPrice
this.totalProfit = res.totalYqGrossProfit
})
},
// 每页条数
handleSizeChange(value) {
......@@ -570,7 +578,7 @@ export default {
.summary_list{
display: flex;
flex-wrap: wrap;
max-width: 500px;
max-width: 600px;
}
.summary_item{
display: flex;
......
......@@ -40,6 +40,7 @@ const customTransOption = {
},
yAxis: {
type: 'value',
name: '(人)',
axisLine: {
show: false
},
......@@ -52,7 +53,7 @@ const customTransOption = {
{
name: '客户到店',
type: 'line',
stack: '总量',
//stack: '总量',
itemStyle: {
color: '#0947C6'
},
......@@ -62,7 +63,7 @@ const customTransOption = {
{
name: '客户转化',
type: 'line',
stack: '总量',
//stack: '总量',
itemStyle: {
color: '#2B9AFF'
},
......
......@@ -39,6 +39,7 @@ const incomeFlowOption = {
},
yAxis: {
type: 'value',
name: '(元)',
axisLine: {
show: false
},
......
......@@ -8,13 +8,14 @@ const incomeProductOption = {
textStyle: {
color: '#485465',
width: '160px',
lineHeight: 30
lineHeight: 20,
fontSize: 14
}
},
tooltip: {
trigger: 'item',
formatter: (params) => {
return `${insertBr(params.name)} : ${params.value}(${params.percent}%)`
return `${insertTooltipBr(params.name)} : ${params.value}(${params.percent}%)`
},
position: [10, 10]
},
......@@ -22,6 +23,8 @@ const incomeProductOption = {
{
name: '毛利',
type: 'pie',
minAngle: 5,
avoidLabelOverlap: true,
radius: ['40%', '60%'],
center: ['50%', '60%'],
label:{
......@@ -66,4 +69,11 @@ function insertBr(text) {
return text = `${text.slice(0,8)}\n${text.slice(8,16)}\n${text.slice(16,24)}\n${text.slice(24,30)}\n${text.slice(30)}\n`
}
}
function insertTooltipBr(text) {
if(text.length <= 30){
return text;
}else if(text.length > 30){
return text = `${text.slice(0,30)}</br>${text.slice(30)}`
}
}
export default incomeProductOption
......@@ -86,9 +86,9 @@
</el-card>
</el-col>
</el-row>
<div class="ad_wrap">
<!-- <div class="ad_wrap">
<img class="ad_img" src="http://img01.glsx.com.cn/image/head.png" alt="">
</div>
</div> -->
<el-row>
<el-col :span="24">
<el-card class="box-card">
......@@ -481,19 +481,23 @@ export default {
this.showChartLoading(this.orderProductChart)
const params = {
yqMerchantId: this.id,
/* beginDateStr: '2020-12-07',
endDateStr: '2020-12-13', */
...(this.getDateFormatByType('thisWeek'))
beginDateStr: '2020-12-07',
endDateStr: '2020-12-13',
//...(this.getDateFormatByType('thisWeek'))
}
getOrderProductData(params).then((res) => {
const data = res
const colors = ['rgba(9,71,198,0.8)', 'rgba(9,71,198,0.4)','rgba(9,71,198,1)']
const colors = ['rgba(9,71,198,0.6)', 'rgba(9,71,198,0.8)', 'rgba(9,71,198,1)']
let idObj = {}
for(let key in data) {
let index = moment(key).format('E')-1
console.log(index)
let list = data[key]
list.sort((a, b) => {
return b.goodsTotal - a.goodsTotal
})
list.forEach((item, i) => {
if (!(item.id in idObj)) {
idObj[item.id] = {
......@@ -511,8 +515,8 @@ export default {
seriesArr.push({
name: idObj[key].name,
type: 'bar',
stack: '总量',
//barGap: '-100%',
//stack: '总量',
barGap: '-100%',
label: {
show: false,
formatter: '{a}',
......@@ -652,6 +656,7 @@ export default {
padding: 0px 5px 0 15px;
overflow-y: auto;
overflow-x: hidden;
min-width: 1050px;
&>.el-row{
margin-bottom: 20px;
}
......
......@@ -17,7 +17,8 @@ const orderProductOption = {
containLabel: true
},
yAxis: {
type: 'value'
type: 'value',
name: '(单)'
},
xAxis: {
type: 'category',
......
......@@ -5,8 +5,7 @@ const storeFlowOption = {
trigger: 'item',
//formatter: '{a} <br/>{b} : {c} ({d}%)',
formatter: (params) => {
console.log(params)
return `${insertBr(params.name)} : ${params.value}(${params.percent}%)`
return `${insertTooltipBr(params.name)} : ${params.value}(${params.percent}%)`
},
position: [10, 10]
},
......@@ -31,6 +30,8 @@ const storeFlowOption = {
{
name: '4s门店客流量',
type: 'pie',
minAngle: 5,
avoidLabelOverlap: true,
radius: '50%',
center: ['40%', '65%'],
label:{
......@@ -89,4 +90,12 @@ function insertBr(text) {
}
}
function insertTooltipBr(text) {
if(text.length <= 30){
return text;
}else if(text.length > 30){
return text = `${text.slice(0,30)}</br>${text.slice(30)}`
}
}
export default storeFlowOption
......@@ -63,7 +63,7 @@
label="品牌商">
</el-table-column>
<el-table-column
prop="goodsInfo.retailPrice"
prop="sellPrice"
align="center"
label="商品售价">
</el-table-column>
......
......@@ -120,7 +120,7 @@ export default {
2: '未升级',
3: '待支付',
4: '已支付',
5: '已退款',
//5: '已退款',
6: '已完成'
},
showFormData: [{
......@@ -136,10 +136,10 @@ export default {
}, {
confId: 4,
confLabel: '已支付'
}, {
}, /* {
confId: 5,
confLabel: '已退款'
}, {
}, */{
confId: 6,
confLabel: '已完成'
}],
......@@ -262,9 +262,11 @@ export default {
.product_list{
display: flex;
padding-left: 30px;
flex-wrap: wrap;
}
.product_item{
display: flex;
width: 250px;
margin: 10px 20px;
.product_img{
display: inline-block;
......@@ -277,6 +279,9 @@ export default {
margin: 0;
line-height: 25px;
}
.product_name{
word-break: break-all;
}
}
}
......
......@@ -122,6 +122,7 @@
</template>
<script>
import { mapActions } from 'vuex'
import { updateRule, sendSms } from '@api/merchant'
export default {
name: 'merchantDetail',
......@@ -219,6 +220,9 @@ export default {
},
methods: {
...mapActions({
close: 'd2admin/page/close'
}),
send() {
sendSms({}).then((res) => {
......@@ -264,6 +268,7 @@ export default {
message: '修改成功',
type: 'success',
})
this.close({ tagName: '/merchantManage' })
this.$router.push({
name: 'merchantManage',
})
......
......@@ -27,6 +27,7 @@
</div>
<div class="d2-container-content">
<d2-table
ref="merchantTable"
:getListApi="getListApi"
:searchForm="searchForm"
:tableParams="tableParams">
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!