From 52fc03a8dbf3fe19e896a1cc1eb202981cc8255e Mon Sep 17 00:00:00 2001 From: yangxin <2509699647@qq.com> Date: Mon, 10 Mar 2025 18:05:04 +0800 Subject: [PATCH] '最新' --- admin-web-master/src/api/piaowu.js | 16 ++++++++-------- admin-web-master/src/utils/request.js | 2 +- admin-web-master/src/views/activity/activityHis.vue | 11 ++++++----- admin-web-master/src/views/analysis/ranking/index.vue | 8 ++++++-- admin-web-master/src/views/analysis/refund/index.vue | 106 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++--------------------------------------- admin-web-master/src/views/analysis/statistics/index.vue | 652 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- admin-web-master/src/views/atmosphere/atmosphereGl.vue | 4 ++-- admin-web-master/src/views/atmosphere/atmosphereHis.vue | 11 ++++++----- admin-web-master/src/views/revenue/details/index.vue | 53 ++++++++++++++++++++++++++++++++++++----------------- admin-web-master/src/views/revenue/totalsales/index.vue | 193 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++------------------------------------------------------------------------------------------------------------- ceres-uniapp-master/config/api.js | 17 ++++++++++------- ceres-uniapp-master/pages/tabbar/user/index.vue | 1 - ceres-uniapp-master/pages_category_page2/userModule/personalDetails.vue | 2 +- merchant-web-master/src/utils/request.js | 4 ++-- merchant-web-master/src/utils/request2.js | 4 ++-- merchant-web-master/src/views/order/aftersale/afterDetails.vue | 2 ++ 16 files changed, 575 insertions(+), 511 deletions(-) diff --git a/admin-web-master/src/api/piaowu.js b/admin-web-master/src/api/piaowu.js index 2d5cba0..7678e78 100644 --- a/admin-web-master/src/api/piaowu.js +++ b/admin-web-master/src/api/piaowu.js @@ -27,7 +27,7 @@ export function getCertificatePurchase(data) { // 退票 export function getRefundData(data) { return request({ - url: '/ticket/getRefundData', + url: '/youZan/getRefundData', method: 'post', data }) @@ -35,7 +35,7 @@ export function getRefundData(data) { // 销售总额 export function getTotalSales(data) { return request({ - url: '/ticket/getTotalSales', + url: '/youZan/getTotalSales', method: 'post', data }) @@ -43,7 +43,7 @@ export function getTotalSales(data) { // 销售明细 export function getSalesParticular(data) { return request({ - url: '/ticket/getSalesParticular', + url: '/youZan/getSalesParticular', method: 'post', data }) @@ -60,7 +60,7 @@ export function excelToGetCertificatePurchase(data) { // 销售明细导出 export function excelToSalesParticular(data) { return request({ - url: '/ticket/excelToSalesParticular', + url: '/youZan/excelSalesParticular', method: 'post', data, responseType: 'blob' @@ -70,7 +70,7 @@ export function excelToSalesParticular(data) { // 销售排名导出 export function excelToSalesSituation(data) { return request({ - url: '/ticket/excelToSalesSituation', + url: '/youZan/excelToSalesSituation', method: 'post', data, responseType: 'blob' @@ -81,7 +81,7 @@ export function excelToSalesSituation(data) { // 票种销售情况导出 export function excelToTicketTypeSalesSituation(data) { return request({ - url: '/ticket/excelToTicketTypeSalesSituation', + url: '/youZan/excelToTicketTypeSalesSituation', method: 'post', data, responseType: 'blob' @@ -91,7 +91,7 @@ export function excelToTicketTypeSalesSituation(data) { // 退票情况导出 export function excelToRefundData(data) { return request({ - url: '/ticket/excelToRefundData', + url: '/youZan/excelToRefundData', method: 'post', data, responseType: 'blob' @@ -102,7 +102,7 @@ export function excelToRefundData(data) { // 总销售额导出 export function excelToTotalSales(data) { return request({ - url: '/ticket/excelToTotalSales', + url: '/youZan/excelToTotalSales', method: 'post', data, responseType: 'blob' diff --git a/admin-web-master/src/utils/request.js b/admin-web-master/src/utils/request.js index f5e55d7..89f59ca 100644 --- a/admin-web-master/src/utils/request.js +++ b/admin-web-master/src/utils/request.js @@ -18,7 +18,7 @@ if(host === 'localhost:8080' || host === 'localhost:8081' || host === 'localhost // baseURL = 'https://jy.scjysm.asia:18086/cdwlMall/meserver/admin-server'; // baseURL = process.env.VUE_APP_DOMAIN_PREFIX_1; - baseURL = 'http://128.10.249.47:9003'; + baseURL = 'http://128.10.249.48:9003'; } else { console.error('---------------------') diff --git a/admin-web-master/src/views/activity/activityHis.vue b/admin-web-master/src/views/activity/activityHis.vue index 6f1396e..3a0f9e5 100644 --- a/admin-web-master/src/views/activity/activityHis.vue +++ b/admin-web-master/src/views/activity/activityHis.vue @@ -67,12 +67,13 @@
+ - - + @@ -115,12 +116,12 @@
- 选择全部 反向选择 - + -->
-
+
销售排名
@@ -97,6 +97,7 @@ import {QuestionGetAll,excelToSalesSituation} from '@/api/piaowu' export default { data() { return { + flag:false, list: [], total: 1, pageSize: 10, @@ -118,13 +119,16 @@ export default { }, mounted() { this.getAll() + QuestionGetAll(this.pageIndex).then(res=>{ + this.type = this.extractAndDeduplicateTicketChannels(res.data) + }) }, methods: { async getAll(){ let res = await QuestionGetAll(this.pageIndex) this.tableData = res.data this.total = res.data.length - this.type = this.extractAndDeduplicateTicketChannels(res.data) + }, search(){ if(this.list.length !=0){ diff --git a/admin-web-master/src/views/analysis/refund/index.vue b/admin-web-master/src/views/analysis/refund/index.vue index 53cb564..fe98080 100644 --- a/admin-web-master/src/views/analysis/refund/index.vue +++ b/admin-web-master/src/views/analysis/refund/index.vue @@ -14,18 +14,14 @@ - - - - + - - + @@ -54,11 +50,11 @@
渠道数量
-
4
+
{{quNum}}
票种数量
-
2
+
{{zhongNum}}
退票总数(张)
@@ -70,7 +66,7 @@
平均退票率(%)
-
38.43%
+
{{tuilv}}%
@@ -85,23 +81,26 @@ 导出
+ - + - - + + - - + + @@ -137,6 +136,7 @@ import {getRefundData,excelToRefundData} from '@/api/piaowu' export default { data() { return { + flag:false, list: [], total: 1, pageSize: 10, @@ -155,31 +155,59 @@ export default { }, numOne:0, moyeOne:0, + tuilv:0, + quNum:0, + zhongNum:0, + type: [], + listType: [], } }, mounted() { this.getAll() + getRefundData(this.pageIndex).then(res=>{ + this.type = this.extractAndDeduplicateTicketChannels(res.data) + this.listType = this.listype(res.data) + }) }, methods: { async getAll(){ let res = await getRefundData(this.pageIndex) - this.tableData = res.data.list - this.total = res.data.total - + this.tableData = res.data + this.total = res.data.length + this.quNum = this.extractAndDeduplicateTicketChannels(res.data).length + this.zhongNum = this.listype(res.data).length let numOne= 0 let moyeOne =0 + let tuilv =0 this.tableData.map(item=>{ - if(item.type == '1'){ - numOne += item.num - moyeOne +=Number(item.price) - } - + numOne += item.num + moyeOne +=Number(item.price) + tuilv += Number(item.refundRate) }) this.numOne = numOne this.moyeOne = moyeOne + this.tuilv = tuilv }, + extractAndDeduplicateTicketChannels(arr) { + const ticketChannels = []; + for (let i = 0; i < arr.length; i++) { + if (arr[i].hasOwnProperty('ticketChannel')) { + ticketChannels.push(arr[i].ticketChannel); + } + } + return [...new Set(ticketChannels)]; + }, + listype(arr) { + const ticketChannels = []; + for (let i = 0; i < arr.length; i++) { + if (arr[i].hasOwnProperty('ticketType')) { + ticketChannels.push(arr[i].ticketType); + } + } + return [...new Set(ticketChannels)]; + }, search(){ if(this.pageIndex.list.length !=0){ this.pageIndex.startTime = this.pageIndex.list[0] @@ -238,7 +266,7 @@ export default { sums[index] = '总计'; return; } - if (['退票数(张)', '退票金额(元)'].includes(column.label)) { + if (['退票数(张)', '退票金额(元)','退票率(%)'].includes(column.label)) { const values = data.map(item => Number(item[column.property])); if (!values.every(value => isNaN(value))) { sums[index] = values.reduce((prev, curr) => { @@ -275,21 +303,21 @@ export default { handleSizeChange(val) { this.pageSize = val }, - objectSpanMethod({ row, column, rowIndex, columnIndex }) { - if (columnIndex === 0) { - if (rowIndex % 2 === 0) { - return { - rowspan: 2, - colspan: 1 - }; - } else { - return { - rowspan: 0, - colspan: 0 - }; - } - } - } + // objectSpanMethod({ row, column, rowIndex, columnIndex }) { + // if (columnIndex === 0) { + // if (rowIndex % 2 === 0) { + // return { + // rowspan: 2, + // colspan: 1 + // }; + // } else { + // return { + // rowspan: 0, + // colspan: 0 + // }; + // } + // } + // } } } diff --git a/admin-web-master/src/views/analysis/statistics/index.vue b/admin-web-master/src/views/analysis/statistics/index.vue index d573aeb..4435d17 100644 --- a/admin-web-master/src/views/analysis/statistics/index.vue +++ b/admin-web-master/src/views/analysis/statistics/index.vue @@ -1,345 +1,377 @@ + .el-tooltip__popper { + max-width: 50%; + } + \ No newline at end of file diff --git a/admin-web-master/src/views/atmosphere/atmosphereGl.vue b/admin-web-master/src/views/atmosphere/atmosphereGl.vue index fcbcf1d..d4a5201 100644 --- a/admin-web-master/src/views/atmosphere/atmosphereGl.vue +++ b/admin-web-master/src/views/atmosphere/atmosphereGl.vue @@ -123,12 +123,12 @@
- 选择全部 反向选择 - + -->
+ - - + @@ -114,12 +115,12 @@
- 选择全部 反向选择 - + -->
- - - - + - - + @@ -63,16 +59,18 @@ :data="tableData.slice((currentPage - 1) * pageSize, currentPage * pageSize)" :header-cell-style="{fontSize: '14px',color:'#0009',fontWeight: 'normal',backgroundColor:'#F2F3F5'}" > - + - - + + - - + + @@ -103,14 +101,11 @@ import {getSalesParticular,excelToSalesParticular} from '@/api/piaowu' export default { data() { return { + flag:false, list: [], total: 1, pageSize: 10, currentPage: 1, - formParams: { - page: 1, - pageSize: 10 - }, tipsList: [], tableData: [], pageIndex:{ @@ -122,20 +117,44 @@ export default {     ticketChannel:"",     ticketType:"" }, + type:[], + listType:[] } }, mounted() { this.getAll() + getSalesParticular(this.pageIndex).then(res=>{ + this.type = this.extractAndDeduplicateTicketChannels(res.data) + this.listType = this.listype(res.data) + }) }, methods: { async getAll(){ let res = await getSalesParticular(this.pageIndex) - this.tableData = res.data.list - this.total = res.data.total + this.tableData = res.data + this.total = res.data.length }, + extractAndDeduplicateTicketChannels(arr) { + const ticketChannels = []; + for (let i = 0; i < arr.length; i++) { + if (arr[i].hasOwnProperty('ticketChannel')) { + ticketChannels.push(arr[i].ticketChannel); + } + } + return [...new Set(ticketChannels)]; + }, + listype(arr) { + const ticketChannels = []; + for (let i = 0; i < arr.length; i++) { + if (arr[i].hasOwnProperty('ticketType')) { + ticketChannels.push(arr[i].ticketType); + } + } + return [...new Set(ticketChannels)]; + }, search(){ if(this.pageIndex.list.length !=0){ this.pageIndex.startTime = this.pageIndex.list[0] diff --git a/admin-web-master/src/views/revenue/totalsales/index.vue b/admin-web-master/src/views/revenue/totalsales/index.vue index e0c4838..5513626 100644 --- a/admin-web-master/src/views/revenue/totalsales/index.vue +++ b/admin-web-master/src/views/revenue/totalsales/index.vue @@ -10,22 +10,18 @@
- + - - - - + - - + @@ -41,8 +37,8 @@ - 查询 - 查询 + 重置 @@ -53,49 +49,30 @@
-
+
-
+
总销售额(元)
{{moyeOne}}
-
-
美团销售总额(元)
-
{{meimoye}}
-
-
-
大麦销售总额(元)
-
{{moyeTwo}}
-
-
-
携程销售总额(元)
-
{{moyethree}}
-
- +
-
+
总销售额趋势表
-
- -
-
单位:张
+ +
--> +
单位:张
@@ -123,7 +100,7 @@
--> -
单位:元
+
单位:元
@@ -141,7 +118,7 @@
--> -
单位:元
+
单位:元
@@ -162,13 +139,9 @@ export default { value1:'', radio1:'', radio2:'', - total: 1, + total: 0, pageSize: 10, currentPage: 1, - formParams: { - page: 1, - pageSize: 10 - }, tipsList: [], tableData: [], chart1:null, @@ -190,86 +163,75 @@ numOne:0, meimoye:0, numthree:0, moyethree:0, + type:[], + listType:[], + tongList:[] } }, mounted() { this.getAll() - // this.echar(this.$refs.container) - // console.log(this.$refs.container2) - // this.echar2(this.$refs.container2) - - // this.echar3(this.$refs.container3) - // this.resizeChart = () => { - // try { - // this.chart.resize() - // this.chart2.resize() - // this.chart3.resize() - // } catch (error) { - // console.log(error); - // } - // }; - // window.addEventListener('resize', this.resizeChart, false); // false代表事件句柄在冒泡阶段执行 - - // this.$nextTick(() => { - // this.echar(this.$refs.container) - // this.echar2(this.$refs.container2) - // this.echar3(this.$refs.container3) - // this.resizeChart = () => { - // try { - // this.chart.resize() - // this.chart2.resize() - // this.chart3.resize() - // } catch (error) { - // console.log(error); - // } - // }; - // window.addEventListener('resize', this.resizeChart, false); // false代表事件句柄在冒泡阶段执行 - // }) + getTotalSales(this.pageIndex).then(res=>{ + this.type = this.extractAndDeduplicateTicketChannels(res.data) + this.listType = this.listype(res.data) + }) + }, methods: { async getAll(){ let res = await getTotalSales(this.pageIndex) - this.tableData = res.data.list - this.total = res.data.total - + this.tableData = res.data + this.total = res.data.length + this.tongList = this.calculatePriceByTicketType(res.data) // this.echar(res.data.list) - let numOne =0 let moyeOne =0 - let meimoye = 0 - let numTwo =0 - let moyeTwo =0 - let numthree=0 - let moyethree =0 this.tableData.map(item=>{ moyeOne += Number(item.price) - if(item.ticketChannel == '美团'){ - numOne += item.num - meimoye = meimoye + Number(item.price) - } - if(item.ticketChannel == '大麦'){ - numTwo += item.num - moyeTwo = moyeTwo + Number(item.price) - } - if(item.ticketChannel == '携程'){ - numthree += item.num - - moyethree = moyethree + Number(item.price) - } }) - this.numOne = numOne - this.moyeOne = moyeOne - this.numTwo = numTwo - this.moyeTwo = moyeTwo - this.meimoye = meimoye - this.numthree = numthree -this.moyethree = moyethree + this.moyeOne = moyeOne + this.echar2(this.tableData) this.echar3( this.tableData) this.echar( this.tableData) }, + extractAndDeduplicateTicketChannels(arr) { + const ticketChannels = []; + for (let i = 0; i < arr.length; i++) { + if (arr[i].hasOwnProperty('ticketChannel')) { + ticketChannels.push(arr[i].ticketChannel); + } + } + return [...new Set(ticketChannels)]; + }, + listype(arr) { + const ticketChannels = []; + for (let i = 0; i < arr.length; i++) { + if (arr[i].hasOwnProperty('ticketType')) { + ticketChannels.push(arr[i].ticketType); + } + } + return [...new Set(ticketChannels)]; + }, + calculatePriceByTicketType(data) { + const result = {}; + // 遍历数组中的每个对象 + data.forEach(item => { + const ticketChannel = item.ticketChannel; + if (!result[ticketChannel]) { + // 如果 result 对象中还没有该 ticketChannel 的记录,初始化 sum 为 0 + result[ticketChannel] = { + ticketChannel: ticketChannel, + sum: 0 + }; + } + // 累加当前对象的 price 到对应的 ticketChannel 的 sum 中 + result[ticketChannel].sum += item.price; + }); + // 将 result 对象的属性值转换为数组并返回 + return Object.values(result); + }, search(){ if(this.pageIndex.list.length !=0){ this.pageIndex.startTime = this.pageIndex.list[0] @@ -335,6 +297,18 @@ this.echar( this.tableData) // 使用刚指定的配置项和数据显示图表。 option && myChart.setOption(option); }, + weiqi(val) { + switch (val) { + case '1': + return '有赞'; + case 2: + return ''; + case 3: + return ''; + default: + return ''; + } + }, echar2(datas) { let Dom = this.$refs.container2 let myChart = echarts.init(Dom) @@ -347,7 +321,8 @@ this.echar( this.tableData) accumulator[existingItemIndex].value += Number(item.price); } else { // 如果不存在,则添加新项 - accumulator.push({ name: item.ticketChannel, value:Number(item.price)}); + + accumulator.push({ name: item.ticketChannel , value:Number(item.price)}); } return accumulator; @@ -356,7 +331,7 @@ this.echar( this.tableData) let option = { xAxis: { type: 'category', - data:processedData.map(item => item.name), + data:processedData.map(item => this.weiqi(item.name)), }, yAxis: { type: 'value' diff --git a/ceres-uniapp-master/config/api.js b/ceres-uniapp-master/config/api.js index 1065d91..d756f5e 100644 --- a/ceres-uniapp-master/config/api.js +++ b/ceres-uniapp-master/config/api.js @@ -1,13 +1,16 @@ // const DOMAIN_PREFIXPING = 'https://jy.scjysm.asia:18086/cdwlMall/meserver/admin-server' // const DOMAIN_PREFIX = 'https://jy.scjysm.asia:18086/cdwlMall/meserver/api' -// const TIAOZHUAN = 'https://jy.scjysm.asia:18086/cdwlMall/' -// const DOMAIN_PREFIXPING = 'http://128.10.250.209:9003' -// const DOMAIN_PREFIX = 'http://128.10.250.209:9007' -const host = `${window.location.protocol}//${window.location.host}` -const DOMAIN_PREFIXPING = `${host}/cdwlMall/meserver/admin-server` -const DOMAIN_PREFIX =`${host}/cdwlMall/meserver/api` -const TIAOZHUAN = `${host}/cdwlMall/` +// const DOMAIN_PREFIXPING = 'https://zhgw-uat.028wlkj.com/cdwlMall/meserver/admin-server' +// const DOMAIN_PREFIX = 'https://zhgw-uat.028wlkj.com/cdwlMall/meserver/api' + +const TIAOZHUAN = 'https://jy.scjysm.asia:18086/cdwlMall/' +const DOMAIN_PREFIXPING = 'http://128.10.249.48:9003' +const DOMAIN_PREFIX = 'http://128.10.249.48:9007' +// const host = `${window.location.protocol}//${window.location.host}` +// const DOMAIN_PREFIXPING = `${host}/cdwlMall/meserver/admin-server` +// const DOMAIN_PREFIX =`${host}/cdwlMall/meserver/api` +// const TIAOZHUAN = `${host}/cdwlMall/` diff --git a/ceres-uniapp-master/pages/tabbar/user/index.vue b/ceres-uniapp-master/pages/tabbar/user/index.vue index 372b369..e8b3ef0 100644 --- a/ceres-uniapp-master/pages/tabbar/user/index.vue +++ b/ceres-uniapp-master/pages/tabbar/user/index.vue @@ -159,7 +159,6 @@ }, onShow() { this.isFirstComeIn = true - if (uni.getStorageSync('storage_key')) { this.cacheUserItem = uni.getStorageSync('storage_key'); diff --git a/ceres-uniapp-master/pages_category_page2/userModule/personalDetails.vue b/ceres-uniapp-master/pages_category_page2/userModule/personalDetails.vue index cb7c3cd..ea3c6c6 100644 --- a/ceres-uniapp-master/pages_category_page2/userModule/personalDetails.vue +++ b/ceres-uniapp-master/pages_category_page2/userModule/personalDetails.vue @@ -386,7 +386,7 @@