Commit 6ca5b644 by 吴娟华

'修复总览订单bug'

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