Commit 52fc03a8dbf3fe19e896a1cc1eb202981cc8255e
1 parent
761491c3
'最新'
Showing
16 changed files
with
575 additions
and
511 deletions
admin-web-master/src/api/piaowu.js
| @@ -27,7 +27,7 @@ export function getCertificatePurchase(data) { | @@ -27,7 +27,7 @@ export function getCertificatePurchase(data) { | ||
| 27 | // 退票 | 27 | // 退票 |
| 28 | export function getRefundData(data) { | 28 | export function getRefundData(data) { |
| 29 | return request({ | 29 | return request({ |
| 30 | - url: '/ticket/getRefundData', | 30 | + url: '/youZan/getRefundData', |
| 31 | method: 'post', | 31 | method: 'post', |
| 32 | data | 32 | data |
| 33 | }) | 33 | }) |
| @@ -35,7 +35,7 @@ export function getRefundData(data) { | @@ -35,7 +35,7 @@ export function getRefundData(data) { | ||
| 35 | // 销售总额 | 35 | // 销售总额 |
| 36 | export function getTotalSales(data) { | 36 | export function getTotalSales(data) { |
| 37 | return request({ | 37 | return request({ |
| 38 | - url: '/ticket/getTotalSales', | 38 | + url: '/youZan/getTotalSales', |
| 39 | method: 'post', | 39 | method: 'post', |
| 40 | data | 40 | data |
| 41 | }) | 41 | }) |
| @@ -43,7 +43,7 @@ export function getTotalSales(data) { | @@ -43,7 +43,7 @@ export function getTotalSales(data) { | ||
| 43 | // 销售明细 | 43 | // 销售明细 |
| 44 | export function getSalesParticular(data) { | 44 | export function getSalesParticular(data) { |
| 45 | return request({ | 45 | return request({ |
| 46 | - url: '/ticket/getSalesParticular', | 46 | + url: '/youZan/getSalesParticular', |
| 47 | method: 'post', | 47 | method: 'post', |
| 48 | data | 48 | data |
| 49 | }) | 49 | }) |
| @@ -60,7 +60,7 @@ export function excelToGetCertificatePurchase(data) { | @@ -60,7 +60,7 @@ export function excelToGetCertificatePurchase(data) { | ||
| 60 | // 销售明细导出 | 60 | // 销售明细导出 |
| 61 | export function excelToSalesParticular(data) { | 61 | export function excelToSalesParticular(data) { |
| 62 | return request({ | 62 | return request({ |
| 63 | - url: '/ticket/excelToSalesParticular', | 63 | + url: '/youZan/excelSalesParticular', |
| 64 | method: 'post', | 64 | method: 'post', |
| 65 | data, | 65 | data, |
| 66 | responseType: 'blob' | 66 | responseType: 'blob' |
| @@ -70,7 +70,7 @@ export function excelToSalesParticular(data) { | @@ -70,7 +70,7 @@ export function excelToSalesParticular(data) { | ||
| 70 | // 销售排名导出 | 70 | // 销售排名导出 |
| 71 | export function excelToSalesSituation(data) { | 71 | export function excelToSalesSituation(data) { |
| 72 | return request({ | 72 | return request({ |
| 73 | - url: '/ticket/excelToSalesSituation', | 73 | + url: '/youZan/excelToSalesSituation', |
| 74 | method: 'post', | 74 | method: 'post', |
| 75 | data, | 75 | data, |
| 76 | responseType: 'blob' | 76 | responseType: 'blob' |
| @@ -81,7 +81,7 @@ export function excelToSalesSituation(data) { | @@ -81,7 +81,7 @@ export function excelToSalesSituation(data) { | ||
| 81 | // 票种销售情况导出 | 81 | // 票种销售情况导出 |
| 82 | export function excelToTicketTypeSalesSituation(data) { | 82 | export function excelToTicketTypeSalesSituation(data) { |
| 83 | return request({ | 83 | return request({ |
| 84 | - url: '/ticket/excelToTicketTypeSalesSituation', | 84 | + url: '/youZan/excelToTicketTypeSalesSituation', |
| 85 | method: 'post', | 85 | method: 'post', |
| 86 | data, | 86 | data, |
| 87 | responseType: 'blob' | 87 | responseType: 'blob' |
| @@ -91,7 +91,7 @@ export function excelToTicketTypeSalesSituation(data) { | @@ -91,7 +91,7 @@ export function excelToTicketTypeSalesSituation(data) { | ||
| 91 | // 退票情况导出 | 91 | // 退票情况导出 |
| 92 | export function excelToRefundData(data) { | 92 | export function excelToRefundData(data) { |
| 93 | return request({ | 93 | return request({ |
| 94 | - url: '/ticket/excelToRefundData', | 94 | + url: '/youZan/excelToRefundData', |
| 95 | method: 'post', | 95 | method: 'post', |
| 96 | data, | 96 | data, |
| 97 | responseType: 'blob' | 97 | responseType: 'blob' |
| @@ -102,7 +102,7 @@ export function excelToRefundData(data) { | @@ -102,7 +102,7 @@ export function excelToRefundData(data) { | ||
| 102 | // 总销售额导出 | 102 | // 总销售额导出 |
| 103 | export function excelToTotalSales(data) { | 103 | export function excelToTotalSales(data) { |
| 104 | return request({ | 104 | return request({ |
| 105 | - url: '/ticket/excelToTotalSales', | 105 | + url: '/youZan/excelToTotalSales', |
| 106 | method: 'post', | 106 | method: 'post', |
| 107 | data, | 107 | data, |
| 108 | responseType: 'blob' | 108 | responseType: 'blob' |
admin-web-master/src/utils/request.js
| @@ -18,7 +18,7 @@ if(host === 'localhost:8080' || host === 'localhost:8081' || host === 'localhost | @@ -18,7 +18,7 @@ if(host === 'localhost:8080' || host === 'localhost:8081' || host === 'localhost | ||
| 18 | 18 | ||
| 19 | // baseURL = 'https://jy.scjysm.asia:18086/cdwlMall/meserver/admin-server'; | 19 | // baseURL = 'https://jy.scjysm.asia:18086/cdwlMall/meserver/admin-server'; |
| 20 | // baseURL = process.env.VUE_APP_DOMAIN_PREFIX_1; | 20 | // baseURL = process.env.VUE_APP_DOMAIN_PREFIX_1; |
| 21 | - baseURL = 'http://128.10.249.47:9003'; | 21 | + baseURL = 'http://128.10.249.48:9003'; |
| 22 | 22 | ||
| 23 | } else { | 23 | } else { |
| 24 | console.error('---------------------') | 24 | console.error('---------------------') |
admin-web-master/src/views/activity/activityHis.vue
| @@ -67,12 +67,13 @@ | @@ -67,12 +67,13 @@ | ||
| 67 | 67 | ||
| 68 | <!-- 表格 --> | 68 | <!-- 表格 --> |
| 69 | <div> | 69 | <div> |
| 70 | + <!-- @selection-change="handleSelectionChange" --> | ||
| 70 | <el-table :data="tableData.slice((currentPage - 1) * pageSize, currentPage * pageSize)" | 71 | <el-table :data="tableData.slice((currentPage - 1) * pageSize, currentPage * pageSize)" |
| 71 | - @selection-change="handleSelectionChange" tooltip-effect="dark" align="left" | 72 | + tooltip-effect="dark" align="left" |
| 72 | :header-cell-style="{fontSize: '14px',color:'#0009',fontWeight: 'normal',backgroundColor:'#F2F3F5'}" | 73 | :header-cell-style="{fontSize: '14px',color:'#0009',fontWeight: 'normal',backgroundColor:'#F2F3F5'}" |
| 73 | ref="mulTable"> | 74 | ref="mulTable"> |
| 74 | - <el-table-column type="selection" min-width="5%"> | ||
| 75 | - </el-table-column> | 75 | + <!-- <el-table-column type="selection" min-width="5%"> |
| 76 | + </el-table-column> --> | ||
| 76 | <el-table-column label="方案名称" min-width="27%" show-overflow-tooltip prop="planName"> | 77 | <el-table-column label="方案名称" min-width="27%" show-overflow-tooltip prop="planName"> |
| 77 | </el-table-column> | 78 | </el-table-column> |
| 78 | <el-table-column label="类型" prop="planType" min-width="10%"> | 79 | <el-table-column label="类型" prop="planType" min-width="10%"> |
| @@ -115,12 +116,12 @@ | @@ -115,12 +116,12 @@ | ||
| 115 | </el-table> | 116 | </el-table> |
| 116 | <div class="fenye"> | 117 | <div class="fenye"> |
| 117 | <div> | 118 | <div> |
| 118 | - <el-button @click="tableAll" class="buttonHover" | 119 | + <!-- <el-button @click="tableAll" class="buttonHover" |
| 119 | style="color: #000;border: 1px solid #DBDBDB;background-color: #fff;">选择全部 | 120 | style="color: #000;border: 1px solid #DBDBDB;background-color: #fff;">选择全部 |
| 120 | </el-button> | 121 | </el-button> |
| 121 | <el-button @click="toggleSelection(tableData)" class="buttonHover" | 122 | <el-button @click="toggleSelection(tableData)" class="buttonHover" |
| 122 | style="color: #000;border: 1px solid #DBDBDB;background-color: #fff;">反向选择 | 123 | style="color: #000;border: 1px solid #DBDBDB;background-color: #fff;">反向选择 |
| 123 | - </el-button> | 124 | + </el-button> --> |
| 124 | </div> | 125 | </div> |
| 125 | <el-pagination class="pagination" :hide-on-single-page="flag" background small | 126 | <el-pagination class="pagination" :hide-on-single-page="flag" background small |
| 126 | :current-page="currentPage" :page-size="pageSize" layout="prev,pager,next" | 127 | :current-page="currentPage" :page-size="pageSize" layout="prev,pager,next" |
admin-web-master/src/views/analysis/ranking/index.vue
| @@ -31,7 +31,7 @@ | @@ -31,7 +31,7 @@ | ||
| 31 | </div> | 31 | </div> |
| 32 | </div> | 32 | </div> |
| 33 | <!-- 表格 --> | 33 | <!-- 表格 --> |
| 34 | - <div class="content_table" style="padding: 15px 10px 10px 20px;background-color:#F2F3F5"> | 34 | + <div class="content_table" style="padding: 15px 10px 10px 10px;background-color:#F2F3F5"> |
| 35 | <div style="background-color: #fff;padding: 10px;margin-bottom: 20px;"> | 35 | <div style="background-color: #fff;padding: 10px;margin-bottom: 20px;"> |
| 36 | <div style="display: flex;margin-bottom: 20px;"> | 36 | <div style="display: flex;margin-bottom: 20px;"> |
| 37 | <div style="width: 100%;padding: 10px 0;">销售排名</div> | 37 | <div style="width: 100%;padding: 10px 0;">销售排名</div> |
| @@ -97,6 +97,7 @@ import {QuestionGetAll,excelToSalesSituation} from '@/api/piaowu' | @@ -97,6 +97,7 @@ import {QuestionGetAll,excelToSalesSituation} from '@/api/piaowu' | ||
| 97 | export default { | 97 | export default { |
| 98 | data() { | 98 | data() { |
| 99 | return { | 99 | return { |
| 100 | + flag:false, | ||
| 100 | list: [], | 101 | list: [], |
| 101 | total: 1, | 102 | total: 1, |
| 102 | pageSize: 10, | 103 | pageSize: 10, |
| @@ -118,13 +119,16 @@ export default { | @@ -118,13 +119,16 @@ export default { | ||
| 118 | }, | 119 | }, |
| 119 | mounted() { | 120 | mounted() { |
| 120 | this.getAll() | 121 | this.getAll() |
| 122 | + QuestionGetAll(this.pageIndex).then(res=>{ | ||
| 123 | + this.type = this.extractAndDeduplicateTicketChannels(res.data) | ||
| 124 | + }) | ||
| 121 | }, | 125 | }, |
| 122 | methods: { | 126 | methods: { |
| 123 | async getAll(){ | 127 | async getAll(){ |
| 124 | let res = await QuestionGetAll(this.pageIndex) | 128 | let res = await QuestionGetAll(this.pageIndex) |
| 125 | this.tableData = res.data | 129 | this.tableData = res.data |
| 126 | this.total = res.data.length | 130 | this.total = res.data.length |
| 127 | - this.type = this.extractAndDeduplicateTicketChannels(res.data) | 131 | + |
| 128 | }, | 132 | }, |
| 129 | search(){ | 133 | search(){ |
| 130 | if(this.list.length !=0){ | 134 | if(this.list.length !=0){ |
admin-web-master/src/views/analysis/refund/index.vue
| @@ -14,18 +14,14 @@ | @@ -14,18 +14,14 @@ | ||
| 14 | <el-select placeholder="全部" | 14 | <el-select placeholder="全部" |
| 15 | v-model="pageIndex.ticketChannel" | 15 | v-model="pageIndex.ticketChannel" |
| 16 | style="width: 168px;margin-right: 15px"> | 16 | style="width: 168px;margin-right: 15px"> |
| 17 | - <el-option label="大麦" value="大麦" /> | ||
| 18 | - <el-option label="猫眼" value="猫眼" /> | ||
| 19 | - <el-option label="携程" value="携程" /> | ||
| 20 | - <el-option label="美团" value="美团" /> | 17 | + <el-option v-for="(item,index) in type" :label="item==1?'有赞':'其他'" :value="item" /> |
| 21 | </el-select> | 18 | </el-select> |
| 22 | </el-form-item> | 19 | </el-form-item> |
| 23 | <el-form-item label="票种"> | 20 | <el-form-item label="票种"> |
| 24 | <el-select placeholder="全部" | 21 | <el-select placeholder="全部" |
| 25 | v-model="pageIndex.ticketType" | 22 | v-model="pageIndex.ticketType" |
| 26 | style="width: 168px;margin-right: 15px"> | 23 | style="width: 168px;margin-right: 15px"> |
| 27 | - <el-option label="电影票" value="电影票" /> | ||
| 28 | - <el-option label="演唱会票" value="演唱会票" /> | 24 | + <el-option v-for="(item,index) in listType" :label="item" :value="item" /> |
| 29 | </el-select> | 25 | </el-select> |
| 30 | </el-form-item> | 26 | </el-form-item> |
| 31 | <el-form-item label="日期"> | 27 | <el-form-item label="日期"> |
| @@ -54,11 +50,11 @@ | @@ -54,11 +50,11 @@ | ||
| 54 | <div style="display:flex;font-size:14px;justify-content: space-around"> | 50 | <div style="display:flex;font-size:14px;justify-content: space-around"> |
| 55 | <div style="width:15%;border-right:1px solid #F2F3F5"> | 51 | <div style="width:15%;border-right:1px solid #F2F3F5"> |
| 56 | <div style="margin-bottom: 10px;font-weight: 600;">渠道数量</div> | 52 | <div style="margin-bottom: 10px;font-weight: 600;">渠道数量</div> |
| 57 | - <div style="font-weight: 600;">4</div> | 53 | + <div style="font-weight: 600;">{{quNum}}</div> |
| 58 | </div> | 54 | </div> |
| 59 | <div style="width:15%;border-right:1px solid #F2F3F5"> | 55 | <div style="width:15%;border-right:1px solid #F2F3F5"> |
| 60 | <div style="margin-bottom: 10px;font-weight: 600;">票种数量</div> | 56 | <div style="margin-bottom: 10px;font-weight: 600;">票种数量</div> |
| 61 | - <div style="font-weight: 600;">2</div> | 57 | + <div style="font-weight: 600;">{{zhongNum}}</div> |
| 62 | </div> | 58 | </div> |
| 63 | <div style="width:15%;border-right:1px solid #F2F3F5"> | 59 | <div style="width:15%;border-right:1px solid #F2F3F5"> |
| 64 | <div style="margin-bottom: 10px;font-weight: 600;">退票总数(张)</div> | 60 | <div style="margin-bottom: 10px;font-weight: 600;">退票总数(张)</div> |
| @@ -70,7 +66,7 @@ | @@ -70,7 +66,7 @@ | ||
| 70 | </div> | 66 | </div> |
| 71 | <div> | 67 | <div> |
| 72 | <div style="margin-bottom: 10px;font-weight: 600;">平均退票率(%)</div> | 68 | <div style="margin-bottom: 10px;font-weight: 600;">平均退票率(%)</div> |
| 73 | - <div style="font-weight: 600;">38.43%</div> | 69 | + <div style="font-weight: 600;">{{tuilv}}%</div> |
| 74 | </div> | 70 | </div> |
| 75 | 71 | ||
| 76 | </div> | 72 | </div> |
| @@ -85,23 +81,26 @@ | @@ -85,23 +81,26 @@ | ||
| 85 | <el-button style="background-color: #3F9B6A;color: #fff;" @click="daochu">导出</el-button> | 81 | <el-button style="background-color: #3F9B6A;color: #fff;" @click="daochu">导出</el-button> |
| 86 | </div> | 82 | </div> |
| 87 | <div class="table"> | 83 | <div class="table"> |
| 84 | + <!-- :span-method="objectSpanMethod" --> | ||
| 88 | <el-table | 85 | <el-table |
| 89 | :summary-method="getSummaries" | 86 | :summary-method="getSummaries" |
| 90 | - :span-method="objectSpanMethod" | 87 | + |
| 91 | show-summary | 88 | show-summary |
| 92 | :data="tableData" | 89 | :data="tableData" |
| 93 | :header-cell-style="{fontSize: '14px',color:'#0009',fontWeight: 'normal',backgroundColor:'#F2F3F5'}" | 90 | :header-cell-style="{fontSize: '14px',color:'#0009',fontWeight: 'normal',backgroundColor:'#F2F3F5'}" |
| 94 | > | 91 | > |
| 95 | - <el-table-column label="序号" > | 92 | + <el-table-column label="序号" min-width="50"> |
| 96 | <template slot-scope="scope"> | 93 | <template slot-scope="scope"> |
| 97 | {{scope.$index +1}} | 94 | {{scope.$index +1}} |
| 98 | </template> | 95 | </template> |
| 99 | </el-table-column> | 96 | </el-table-column> |
| 100 | - <el-table-column prop="ticketChannel" label="渠道"> | ||
| 101 | - | 97 | + <el-table-column prop="ticketChannel" label="渠道" min-width="60"> |
| 98 | +<template slot-scope="scope"> | ||
| 99 | + {{scope.row.ticketChannel == '1'?'有赞':'其他'}} | ||
| 100 | + </template> | ||
| 102 | </el-table-column> | 101 | </el-table-column> |
| 103 | - <el-table-column prop="ticketType" label="票种" /> | ||
| 104 | - <el-table-column prop="ticketName" label="票名" /> | 102 | + <el-table-column prop="ticketType" label="票种" min-width="60"/> |
| 103 | + <el-table-column prop="ticketName" label="票名" min-width="160" :show-overflow-tooltip="true"/> | ||
| 105 | <el-table-column prop="num" label="退票数(张)" /> | 104 | <el-table-column prop="num" label="退票数(张)" /> |
| 106 | <el-table-column prop="price" label="退票金额(元)" /> | 105 | <el-table-column prop="price" label="退票金额(元)" /> |
| 107 | <el-table-column prop="refundRate" label="退票率(%)" > | 106 | <el-table-column prop="refundRate" label="退票率(%)" > |
| @@ -137,6 +136,7 @@ import {getRefundData,excelToRefundData} from '@/api/piaowu' | @@ -137,6 +136,7 @@ import {getRefundData,excelToRefundData} from '@/api/piaowu' | ||
| 137 | export default { | 136 | export default { |
| 138 | data() { | 137 | data() { |
| 139 | return { | 138 | return { |
| 139 | + flag:false, | ||
| 140 | list: [], | 140 | list: [], |
| 141 | total: 1, | 141 | total: 1, |
| 142 | pageSize: 10, | 142 | pageSize: 10, |
| @@ -155,31 +155,59 @@ export default { | @@ -155,31 +155,59 @@ export default { | ||
| 155 | }, | 155 | }, |
| 156 | numOne:0, | 156 | numOne:0, |
| 157 | moyeOne:0, | 157 | moyeOne:0, |
| 158 | + tuilv:0, | ||
| 159 | + quNum:0, | ||
| 160 | + zhongNum:0, | ||
| 161 | + type: [], | ||
| 162 | + listType: [], | ||
| 158 | } | 163 | } |
| 159 | }, | 164 | }, |
| 160 | mounted() { | 165 | mounted() { |
| 161 | this.getAll() | 166 | this.getAll() |
| 167 | + getRefundData(this.pageIndex).then(res=>{ | ||
| 168 | + this.type = this.extractAndDeduplicateTicketChannels(res.data) | ||
| 169 | + this.listType = this.listype(res.data) | ||
| 170 | + }) | ||
| 162 | }, | 171 | }, |
| 163 | methods: { | 172 | methods: { |
| 164 | async getAll(){ | 173 | async getAll(){ |
| 165 | let res = await getRefundData(this.pageIndex) | 174 | let res = await getRefundData(this.pageIndex) |
| 166 | - this.tableData = res.data.list | ||
| 167 | - this.total = res.data.total | ||
| 168 | - | 175 | + this.tableData = res.data |
| 176 | + this.total = res.data.length | ||
| 177 | + this.quNum = this.extractAndDeduplicateTicketChannels(res.data).length | ||
| 178 | + this.zhongNum = this.listype(res.data).length | ||
| 169 | let numOne= 0 | 179 | let numOne= 0 |
| 170 | let moyeOne =0 | 180 | let moyeOne =0 |
| 181 | + let tuilv =0 | ||
| 171 | this.tableData.map(item=>{ | 182 | this.tableData.map(item=>{ |
| 172 | - if(item.type == '1'){ | ||
| 173 | - numOne += item.num | ||
| 174 | - moyeOne +=Number(item.price) | ||
| 175 | - } | ||
| 176 | - | 183 | + numOne += item.num |
| 184 | + moyeOne +=Number(item.price) | ||
| 185 | + tuilv += Number(item.refundRate) | ||
| 177 | 186 | ||
| 178 | }) | 187 | }) |
| 179 | this.numOne = numOne | 188 | this.numOne = numOne |
| 180 | this.moyeOne = moyeOne | 189 | this.moyeOne = moyeOne |
| 190 | + this.tuilv = tuilv | ||
| 181 | 191 | ||
| 182 | }, | 192 | }, |
| 193 | + extractAndDeduplicateTicketChannels(arr) { | ||
| 194 | + const ticketChannels = []; | ||
| 195 | + for (let i = 0; i < arr.length; i++) { | ||
| 196 | + if (arr[i].hasOwnProperty('ticketChannel')) { | ||
| 197 | + ticketChannels.push(arr[i].ticketChannel); | ||
| 198 | + } | ||
| 199 | + } | ||
| 200 | + return [...new Set(ticketChannels)]; | ||
| 201 | + }, | ||
| 202 | + listype(arr) { | ||
| 203 | + const ticketChannels = []; | ||
| 204 | + for (let i = 0; i < arr.length; i++) { | ||
| 205 | + if (arr[i].hasOwnProperty('ticketType')) { | ||
| 206 | + ticketChannels.push(arr[i].ticketType); | ||
| 207 | + } | ||
| 208 | + } | ||
| 209 | + return [...new Set(ticketChannels)]; | ||
| 210 | + }, | ||
| 183 | search(){ | 211 | search(){ |
| 184 | if(this.pageIndex.list.length !=0){ | 212 | if(this.pageIndex.list.length !=0){ |
| 185 | this.pageIndex.startTime = this.pageIndex.list[0] | 213 | this.pageIndex.startTime = this.pageIndex.list[0] |
| @@ -238,7 +266,7 @@ export default { | @@ -238,7 +266,7 @@ export default { | ||
| 238 | sums[index] = '总计'; | 266 | sums[index] = '总计'; |
| 239 | return; | 267 | return; |
| 240 | } | 268 | } |
| 241 | - if (['退票数(张)', '退票金额(元)'].includes(column.label)) { | 269 | + if (['退票数(张)', '退票金额(元)','退票率(%)'].includes(column.label)) { |
| 242 | const values = data.map(item => Number(item[column.property])); | 270 | const values = data.map(item => Number(item[column.property])); |
| 243 | if (!values.every(value => isNaN(value))) { | 271 | if (!values.every(value => isNaN(value))) { |
| 244 | sums[index] = values.reduce((prev, curr) => { | 272 | sums[index] = values.reduce((prev, curr) => { |
| @@ -275,21 +303,21 @@ export default { | @@ -275,21 +303,21 @@ export default { | ||
| 275 | handleSizeChange(val) { | 303 | handleSizeChange(val) { |
| 276 | this.pageSize = val | 304 | this.pageSize = val |
| 277 | }, | 305 | }, |
| 278 | - objectSpanMethod({ row, column, rowIndex, columnIndex }) { | ||
| 279 | - if (columnIndex === 0) { | ||
| 280 | - if (rowIndex % 2 === 0) { | ||
| 281 | - return { | ||
| 282 | - rowspan: 2, | ||
| 283 | - colspan: 1 | ||
| 284 | - }; | ||
| 285 | - } else { | ||
| 286 | - return { | ||
| 287 | - rowspan: 0, | ||
| 288 | - colspan: 0 | ||
| 289 | - }; | ||
| 290 | - } | ||
| 291 | - } | ||
| 292 | - } | 306 | + // objectSpanMethod({ row, column, rowIndex, columnIndex }) { |
| 307 | + // if (columnIndex === 0) { | ||
| 308 | + // if (rowIndex % 2 === 0) { | ||
| 309 | + // return { | ||
| 310 | + // rowspan: 2, | ||
| 311 | + // colspan: 1 | ||
| 312 | + // }; | ||
| 313 | + // } else { | ||
| 314 | + // return { | ||
| 315 | + // rowspan: 0, | ||
| 316 | + // colspan: 0 | ||
| 317 | + // }; | ||
| 318 | + // } | ||
| 319 | + // } | ||
| 320 | + // } | ||
| 293 | } | 321 | } |
| 294 | } | 322 | } |
| 295 | </script> | 323 | </script> |
admin-web-master/src/views/analysis/statistics/index.vue
| 1 | <template> | 1 | <template> |
| 2 | 2 | ||
| 3 | - <div style="background-color:#f7f7f7;padding:10px 10px;"> | ||
| 4 | - <div class="history"> | ||
| 5 | - <div style="height:58px;line-height:58px;"> | ||
| 6 | - <div style="color:#0006"> <span>渠道售票统计分析</span> <span style="padding:0 5px;">></span> <span | ||
| 7 | - style="color:#000000e6">票种销售数据统计</span></div> | ||
| 8 | - </div> | ||
| 9 | - <div > | 3 | + <div style="background-color:#f7f7f7;padding:10px 10px;"> |
| 4 | + <div class="history"> | ||
| 5 | + <div style="height:58px;line-height:58px;"> | ||
| 6 | + <div style="color:#0006"> <span>渠道售票统计分析</span> <span style="padding:0 5px;">></span> <span | ||
| 7 | + style="color:#000000e6">票种销售数据统计</span></div> | ||
| 8 | + </div> | ||
| 9 | + <div> | ||
| 10 | 10 | ||
| 11 | - <!-- 顶部搜索 --> | ||
| 12 | - <div class="toolbar"> | ||
| 13 | - <el-form ref="formParams" :inline="true" :model="pageIndex"> | ||
| 14 | - <el-form-item label="渠道"> | ||
| 15 | - <el-select placeholder="全部" | ||
| 16 | - v-model="pageIndex.ticketChannel" | ||
| 17 | - style="width: 120px;margin-right: 15px"> | ||
| 18 | - <el-option label="大麦" value="大麦" /> | ||
| 19 | - <el-option label="猫眼" value="猫眼" /> | ||
| 20 | - <el-option label="携程" value="携程" /> | ||
| 21 | - <el-option label="美团" value="美团" /> | ||
| 22 | - </el-select> | ||
| 23 | - </el-form-item> | ||
| 24 | - <el-form-item label="票种"> | ||
| 25 | - <el-select placeholder="全部" v-model="pageIndex.ticketType" | ||
| 26 | - style="width: 120px;margin-right: 15px"> | ||
| 27 | - <el-option label="电影票" value="电影票" /> | ||
| 28 | - <el-option label="演唱会票" value="演唱会票" /> | ||
| 29 | - </el-select> | ||
| 30 | - </el-form-item> | ||
| 31 | - <el-form-item label="日期"> | ||
| 32 | - <el-date-picker | ||
| 33 | - v-model="pageIndex.list" | ||
| 34 | - type="daterange" | 11 | + <!-- 顶部搜索 --> |
| 12 | + <div class="toolbar"> | ||
| 13 | + <el-form ref="formParams" :inline="true" :model="pageIndex"> | ||
| 14 | + <el-form-item label="渠道"> | ||
| 15 | + <el-select placeholder="全部" v-model="pageIndex.ticketChannel" | ||
| 16 | + style="width: 120px;margin-right: 15px"> | ||
| 17 | + <el-option v-for="(item,index) in type" :label="item==1?'有赞':'其他'" :value="item" /> | ||
| 18 | + </el-select> | ||
| 19 | + </el-form-item> | ||
| 20 | + <el-form-item label="票种"> | ||
| 21 | + <el-select placeholder="全部" v-model="pageIndex.ticketType" | ||
| 22 | + style="width: 120px;margin-right: 15px"> | ||
| 23 | + <el-option v-for="(item,index) in listType" :label="item" :value="item" /> | ||
| 24 | + </el-select> | ||
| 25 | + </el-form-item> | ||
| 26 | + <el-form-item label="日期"> | ||
| 27 | + <el-date-picker v-model="pageIndex.list" type="daterange" range-separator="至" | ||
| 28 | + start-placeholder="开始时间" end-placeholder="结束时间" value-format="yyyy-MM-dd" /> | ||
| 29 | + </el-form-item> | ||
| 35 | 30 | ||
| 36 | - range-separator="至" | ||
| 37 | - start-placeholder="开始时间" | ||
| 38 | - end-placeholder="结束时间" | ||
| 39 | - value-format="yyyy-MM-dd" | ||
| 40 | - /> | ||
| 41 | - </el-form-item> | ||
| 42 | - | ||
| 43 | - <el-form-item label-width="0"> | ||
| 44 | - <el-button @click="search" style="background-color: #3F9B6A;color: #fff">查询</el-button> | ||
| 45 | - <el-button @click="clear" class="buttonHover" | ||
| 46 | - style="color: #606266;border: 1px solid #dddfe5;background-color: #fff;">重置</el-button> | ||
| 47 | - </el-form-item> | ||
| 48 | - </el-form> | ||
| 49 | - </div> | ||
| 50 | - </div> | ||
| 51 | - <!-- 表格 --> | ||
| 52 | - <div class="content_table" style="padding: 15px 10px 10px 20px;background-color:#F2F3F5"> | ||
| 53 | - <div style='padding:20px 10px;background-color:#fff;margin-bottom: 10px;'> | ||
| 54 | - <div style="display:flex;font-size:14px;justify-content: space-around"> | ||
| 55 | - <div style="width:15%;border-right:1px solid #F2F3F5"> | ||
| 56 | - <div style="margin-bottom: 10px;font-weight: 600;">电影票销售数量(张)</div> | ||
| 57 | - <div style="font-weight: 600;">{{numTwo}}</div> | ||
| 58 | - </div> | ||
| 59 | - <div style="width:15%;border-right:1px solid #F2F3F5"> | ||
| 60 | - <div style="margin-bottom: 10px;font-weight: 600;">电影票销售总额(元)</div> | ||
| 61 | - <div style="font-weight: 600;">{{moyeTwo}}</div> | ||
| 62 | - </div> | ||
| 63 | - <div style="width:15%;border-right:1px solid #F2F3F5"> | ||
| 64 | - <div style="margin-bottom: 10px;font-weight: 600;">演唱会票销售数量(张)</div> | ||
| 65 | - <div style="font-weight: 600;">{{numOne}}</div> | ||
| 66 | - </div> | ||
| 67 | - <div style="width:15%;"> | ||
| 68 | - <div style="margin-bottom: 10px;font-weight: 600;">演唱会票销售总额(元)</div> | ||
| 69 | - <div style="font-weight: 600;">{{moyeOne}}</div> | ||
| 70 | - </div> | ||
| 71 | - </div> | ||
| 72 | - </div> | ||
| 73 | - <div style="background-color: #fff;padding: 10px;margin-bottom: 20px;"> | ||
| 74 | - <div style="display: flex;margin-bottom: 20px;"> | ||
| 75 | - <div style="width: 100%;padding: 10px 0;">各渠道票种销售数据</div> | ||
| 76 | - <!-- <el-select placeholder="全部渠道" | 31 | + <el-form-item label-width="0"> |
| 32 | + <el-button @click="search" style="background-color: #3F9B6A;color: #fff">查询</el-button> | ||
| 33 | + <el-button @click="clear" class="buttonHover" | ||
| 34 | + style="color: #606266;border: 1px solid #dddfe5;background-color: #fff;">重置</el-button> | ||
| 35 | + </el-form-item> | ||
| 36 | + </el-form> | ||
| 37 | + </div> | ||
| 38 | + </div> | ||
| 39 | + <!-- 表格 --> | ||
| 40 | + <div class="content_table" style="padding: 15px 10px 10px 10px;background-color:#F2F3F5"> | ||
| 41 | + <div style='padding:20px 10px;background-color:#fff;margin-bottom: 10px;'> | ||
| 42 | + <div style="font-size:14px;justify-content: space-around;display:flex;"> | ||
| 43 | + <div style="display:flex;width:50%;justify-content: space-around;text-align: center;" v-for="(item,index) in titleList"> | ||
| 44 | + <div style="width:45%;border-right:1px solid #F2F3F5" > | ||
| 45 | + <div style="margin-bottom: 10px;font-weight: 600;">{{item.ticketType}}销售数量(张)</div> | ||
| 46 | + <div style="font-weight: 600;">{{item.sumNum}}</div> | ||
| 47 | + </div> | ||
| 48 | + <div style="width:45%;border-right:1px solid #F2F3F5"> | ||
| 49 | + <div style="margin-bottom: 10px;font-weight: 600;">{{item.ticketType}}销售总额(元)</div> | ||
| 50 | + <div style="font-weight: 600;">{{item.moyeTwo}}</div> | ||
| 51 | + </div> | ||
| 52 | + </div> | ||
| 53 | + <!-- <div style="width:15%;border-right:1px solid #F2F3F5"> | ||
| 54 | + <div style="margin-bottom: 10px;font-weight: 600;">演唱会票销售数量(张)</div> | ||
| 55 | + <div style="font-weight: 600;">{{numOne}}</div> | ||
| 56 | + </div> | ||
| 57 | + <div style="width:15%;"> | ||
| 58 | + <div style="margin-bottom: 10px;font-weight: 600;">演唱会票销售总额(元)</div> | ||
| 59 | + <div style="font-weight: 600;">{{moyeOne}}</div> | ||
| 60 | + </div> --> | ||
| 61 | + </div> | ||
| 62 | + </div> | ||
| 63 | + <div style="background-color: #fff;padding: 10px;margin-bottom: 20px;"> | ||
| 64 | + <div style="display: flex;margin-bottom: 20px;"> | ||
| 65 | + <div style="width: 100%;padding: 10px 0;">各渠道票种销售数据</div> | ||
| 66 | + <!-- <el-select placeholder="全部渠道" | ||
| 77 | style="width: 120px;margin-right: 15px"> | 67 | style="width: 120px;margin-right: 15px"> |
| 78 | <el-option label="1" value="1" /> | 68 | <el-option label="1" value="1" /> |
| 79 | </el-select> --> | 69 | </el-select> --> |
| 80 | - <el-button style="background-color: #3F9B6A;color: #fff;" @click="daochu">导出</el-button> | ||
| 81 | - </div> | ||
| 82 | - <div class="table"> | ||
| 83 | - <el-table | ||
| 84 | - :summary-method="getSummaries" | ||
| 85 | - :span-method="objectSpanMethod" | ||
| 86 | - show-summary | ||
| 87 | - :data="tableData.slice((currentPage - 1) * pageSize, currentPage * pageSize)" | ||
| 88 | - :header-cell-style="{fontSize: '14px',color:'#0009',fontWeight: 'normal',backgroundColor:'#F2F3F5'}" | ||
| 89 | - > | ||
| 90 | - <el-table-column label="序号" > | ||
| 91 | - <template slot-scope="scope"> | ||
| 92 | - {{scope.$index +1}} | ||
| 93 | - </template> | ||
| 94 | - </el-table-column> | ||
| 95 | - <el-table-column prop="ticketChannel" label="渠道"> | ||
| 96 | - | ||
| 97 | - </el-table-column> | ||
| 98 | - <el-table-column prop="ticketType" label="票种" /> | ||
| 99 | - <el-table-column prop="ticketName" label="票名" /> | ||
| 100 | - <el-table-column prop="num" label="销售数量(张)" /> | ||
| 101 | - <el-table-column prop="ticketPrice" label="客单价(元)" /> | ||
| 102 | - <el-table-column prop="price" label="销售金额(元)" /> | ||
| 103 | - <!-- <el-table-column label="操作"> | 70 | + <el-button style="background-color: #3F9B6A;color: #fff;" @click="daochu">导出</el-button> |
| 71 | + </div> | ||
| 72 | + <div class="table"> | ||
| 73 | + <!-- :span-method="objectSpanMethod" --> | ||
| 74 | + <el-table :summary-method="getSummaries" show-summary | ||
| 75 | + :data="tableData.slice((currentPage - 1) * pageSize, currentPage * pageSize)" | ||
| 76 | + :header-cell-style="{fontSize: '14px',color:'#0009',fontWeight: 'normal',backgroundColor:'#F2F3F5'}"> | ||
| 77 | + <el-table-column label="序号" min-width="50"> | ||
| 78 | + <template slot-scope="scope"> | ||
| 79 | + {{scope.$index +1}} | ||
| 80 | + </template> | ||
| 81 | + </el-table-column> | ||
| 82 | + <el-table-column prop="ticketChannel" label="渠道" min-width="60"> | ||
| 83 | + <template slot-scope="scope"> | ||
| 84 | + {{scope.row.ticketChannel == '1'?'有赞':'其他'}} | ||
| 85 | + </template> | ||
| 86 | + </el-table-column> | ||
| 87 | + <el-table-column prop="ticketType" label="票种" min-width="60"/> | ||
| 88 | + <el-table-column prop="ticketName" label="票名" min-width="160" :show-overflow-tooltip="true"/> | ||
| 89 | + <el-table-column prop="num" label="销售数量(张)" /> | ||
| 90 | + <el-table-column prop="ticketPrice" label="客单价(元)" /> | ||
| 91 | + <el-table-column prop="price" label="销售金额(元)" /> | ||
| 92 | + <!-- <el-table-column label="操作"> | ||
| 104 | <template slot-scope="scope"> | 93 | <template slot-scope="scope"> |
| 105 | <el-button type="text" style="background-color: transparent;color: #3F9B6A;;border: none;">详情</el-button> | 94 | <el-button type="text" style="background-color: transparent;color: #3F9B6A;;border: none;">详情</el-button> |
| 106 | <el-button type="text" style="background-color: transparent;color: #3F9B6A;;border: none;">删除</el-button> | 95 | <el-button type="text" style="background-color: transparent;color: #3F9B6A;;border: none;">删除</el-button> |
| 107 | </template> | 96 | </template> |
| 108 | </el-table-column> --> | 97 | </el-table-column> --> |
| 109 | - </el-table> | ||
| 110 | - </div> | ||
| 111 | - <!-- 分页 --> | ||
| 112 | - <div class="fenye"> | 98 | + </el-table> |
| 99 | + </div> | ||
| 100 | + <!-- 分页 --> | ||
| 101 | + <div class="fenye"> | ||
| 113 | 102 | ||
| 114 | - <el-pagination class="pagination" :hide-on-single-page="flag" background small :current-page="currentPage" | ||
| 115 | - :page-sizes="[10, 20, 50, 100]" :page-size="pageSize" layout="total,prev, pager,next" :total="total " | ||
| 116 | - @size-change="handleSizeChange" @current-change="handleCurrentChange" /> | ||
| 117 | - </div> | ||
| 118 | - </div> | ||
| 119 | - </div> | ||
| 120 | - </div> | ||
| 121 | - </div> | 103 | + <el-pagination class="pagination" :hide-on-single-page="flag" background |
| 104 | + :current-page="currentPage" :page-sizes="[10, 20, 50, 100]" :page-size="pageSize" | ||
| 105 | + layout="total,prev, pager,next" :total="total " @size-change="handleSizeChange" | ||
| 106 | + @current-change="handleCurrentChange" /> | ||
| 107 | + </div> | ||
| 108 | + </div> | ||
| 109 | + </div> | ||
| 110 | + </div> | ||
| 111 | + </div> | ||
| 122 | </template> | 112 | </template> |
| 123 | 113 | ||
| 124 | <script> | 114 | <script> |
| 125 | -import {getTicketType,excelToTicketTypeSalesSituation} from '@/api/piaowu' | ||
| 126 | -export default { | ||
| 127 | - data() { | ||
| 128 | - return { | ||
| 129 | -flag:false, | ||
| 130 | - total: 1, | ||
| 131 | - pageSize: 10, | ||
| 132 | - currentPage: 1, | ||
| 133 | - tipsList: [], | ||
| 134 | - tableData: [], | ||
| 135 | - pageIndex:{ | ||
| 136 | - list: [], | ||
| 137 | - page: 1, | ||
| 138 | - pageSize: 10, | ||
| 139 | - startTime:"", | ||
| 140 | - endTime:"", | ||
| 141 | - ticketChannel:"", | ||
| 142 | - ticketType:"" | ||
| 143 | - }, | ||
| 144 | - numOne:0, | ||
| 145 | - moyeOne:0, | ||
| 146 | - numTwo:0, | ||
| 147 | - moyeTwo:0 | ||
| 148 | - | ||
| 149 | - } | ||
| 150 | - }, | ||
| 151 | - mounted() { | ||
| 152 | - this.getAll() | ||
| 153 | - }, | ||
| 154 | - methods: { | ||
| 155 | - async getAll(){ | ||
| 156 | - let res = await getTicketType(this.pageIndex) | ||
| 157 | - this.tableData = res.data | ||
| 158 | - this.total = res.data.lenght | ||
| 159 | - | ||
| 160 | - let numOne =0 | ||
| 161 | - let moyeOne =0 | ||
| 162 | - let numTwo =0 | ||
| 163 | - let moyeTwo =0 | ||
| 164 | - this.tableData.map(item=>{ | ||
| 165 | - if(item.ticketType == '演唱会票'){ | ||
| 166 | - numOne += item.num | ||
| 167 | - moyeOne = moyeOne + Number(item.price) | ||
| 168 | - } | ||
| 169 | - if(item.ticketType == '电影票'){ | ||
| 170 | - numTwo += item.num | ||
| 171 | - moyeTwo = moyeTwo + Number(item.price) | ||
| 172 | - } | ||
| 173 | - }) | ||
| 174 | - this.numOne = numOne | ||
| 175 | - this.moyeOne = moyeOne | ||
| 176 | - this.numTwo = numTwo | ||
| 177 | - this.moyeTwo = moyeTwo | ||
| 178 | - | ||
| 179 | - | 115 | + import { |
| 116 | + getTicketType, | ||
| 117 | + excelToTicketTypeSalesSituation | ||
| 118 | + } from '@/api/piaowu' | ||
| 119 | + export default { | ||
| 120 | + data() { | ||
| 121 | + return { | ||
| 122 | + flag: false, | ||
| 123 | + total: 0, | ||
| 124 | + pageSize: 10, | ||
| 125 | + currentPage: 1, | ||
| 126 | + tipsList: [], | ||
| 127 | + tableData: [], | ||
| 128 | + pageIndex: { | ||
| 129 | + list: [], | ||
| 130 | + page: 1, | ||
| 131 | + pageSize: 10, | ||
| 132 | + startTime: "", | ||
| 133 | + endTime: "", | ||
| 134 | + ticketChannel: "", | ||
| 135 | + ticketType: "" | ||
| 136 | + }, | ||
| 137 | + numOne: 0, | ||
| 138 | + moyeOne: 0, | ||
| 139 | + numTwo: 0, | ||
| 140 | + moyeTwo: 0, | ||
| 141 | + type: [], | ||
| 142 | + listType: [], | ||
| 143 | + titleList:[] | ||
| 144 | + } | ||
| 145 | + }, | ||
| 146 | + mounted() { | ||
| 147 | + this.getAll() | ||
| 148 | + getTicketType(this.pageIndex).then(res=>{ | ||
| 149 | + this.type = this.extractAndDeduplicateTicketChannels(res.data) | ||
| 150 | + this.listType = this.listype(res.data) | ||
| 151 | + }) | ||
| 152 | + | ||
| 153 | + }, | ||
| 154 | + methods: { | ||
| 155 | + async getAll() { | ||
| 156 | + let res = await getTicketType(this.pageIndex) | ||
| 157 | + this.tableData = res.data | ||
| 158 | + this.total = res.data.length | ||
| 159 | + this.titleList = this.processTicketData(res.data) | ||
| 160 | + }, | ||
| 161 | + processTicketData(data) { | ||
| 162 | + const result = {}; | ||
| 163 | + // 遍历原始数据 | ||
| 164 | + data.forEach(item => { | ||
| 165 | + const ticketType = item.ticketType; | ||
| 166 | + if (!result[ticketType]) { | ||
| 167 | + // 如果该 ticketType 还未在结果对象中,初始化它 | ||
| 168 | + result[ticketType] = { | ||
| 169 | + ticketType: ticketType, | ||
| 170 | + sumNum: 0, | ||
| 171 | + moyeTwo: 0 | ||
| 172 | + }; | ||
| 173 | + } | ||
| 174 | + // 累加 num 和 price | ||
| 175 | + result[ticketType].sumNum += item.num; | ||
| 176 | + result[ticketType].moyeTwo += item.price; | ||
| 177 | + }); | ||
| 178 | + | ||
| 179 | + // 将结果对象转换为数组 | ||
| 180 | + return Object.values(result); | ||
| 181 | + }, | ||
| 182 | + search() { | ||
| 183 | + if (this.pageIndex.list.length != 0) { | ||
| 184 | + this.pageIndex.startTime = this.pageIndex.list[0] | ||
| 185 | + this.pageIndex.endTime = this.pageIndex.list[1] | ||
| 186 | + } | ||
| 187 | + this.getAll() | ||
| 188 | + }, | ||
| 189 | + extractAndDeduplicateTicketChannels(arr) { | ||
| 190 | + const ticketChannels = []; | ||
| 191 | + for (let i = 0; i < arr.length; i++) { | ||
| 192 | + if (arr[i].hasOwnProperty('ticketChannel')) { | ||
| 193 | + ticketChannels.push(arr[i].ticketChannel); | ||
| 194 | + } | ||
| 195 | + } | ||
| 196 | + return [...new Set(ticketChannels)]; | ||
| 197 | + }, | ||
| 198 | + listype(arr) { | ||
| 199 | + const ticketChannels = []; | ||
| 200 | + for (let i = 0; i < arr.length; i++) { | ||
| 201 | + if (arr[i].hasOwnProperty('ticketType')) { | ||
| 202 | + ticketChannels.push(arr[i].ticketType); | ||
| 203 | + } | ||
| 204 | + } | ||
| 205 | + return [...new Set(ticketChannels)]; | ||
| 206 | + }, | ||
| 207 | + clear() { | ||
| 208 | + this.pageIndex = { | ||
| 209 | + list: [], | ||
| 210 | + page: 1, | ||
| 211 | + pageSize: 10, | ||
| 212 | + startTime: "", | ||
| 213 | + endTime: "", | ||
| 214 | + ticketChannel: "", | ||
| 215 | + ticketType: "" | ||
| 216 | + } | ||
| 217 | + this.getAll() | ||
| 218 | + }, | ||
| 219 | + changepiao() { | ||
| 220 | + this.getAll() | ||
| 221 | + }, | ||
| 222 | + async daochu() { | ||
| 223 | + let res = await excelToTicketTypeSalesSituation(this.pageIndex) | ||
| 224 | + if (!res) { | ||
| 225 | + return | ||
| 226 | + } | ||
| 227 | + const blob = new Blob([res], { | ||
| 228 | + type: 'application/vnd.ms-excel' | ||
| 229 | + }) | ||
| 230 | + const fileName = '票种销售表.xls' | ||
| 231 | + if ('download' in document.createElement('a')) { | ||
| 232 | + // 非IE下载 | ||
| 233 | + const elink = document.createElement('a') | ||
| 234 | + elink.download = fileName | ||
| 235 | + elink.style.display = 'none' | ||
| 236 | + elink.href = URL.createObjectURL(blob) | ||
| 237 | + document.body.appendChild(elink) | ||
| 238 | + elink.click() | ||
| 239 | + URL.revokeObjectURL(elink.href) // 释放URL 对象 | ||
| 240 | + document.body.removeChild(elink) | ||
| 241 | + } else { | ||
| 242 | + // IE10+下载 | ||
| 243 | + navigator.msSaveBlob(blob, fileName) | ||
| 244 | + } | ||
| 245 | + this.$message({ | ||
| 246 | + message: '导出成功', | ||
| 247 | + type: 'success' | ||
| 248 | + }) | ||
| 249 | + }, | ||
| 250 | + getSummaries(param) { | ||
| 251 | + const { | ||
| 252 | + columns, | ||
| 253 | + data | ||
| 254 | + } = param; | ||
| 255 | + const sums = []; | ||
| 256 | + columns.forEach((column, index) => { | ||
| 257 | + if (index === 0) { | ||
| 258 | + sums[index] = '总计'; | ||
| 259 | + return; | ||
| 260 | + } | ||
| 261 | + if (['销售数量(张)', '客单价(元)', '销售金额(元)'].includes(column.label)) { | ||
| 262 | + const values = data.map(item => Number(item[column.property])) | ||
| 180 | 263 | ||
| 181 | - }, | ||
| 182 | - search(){ | ||
| 183 | - if(this.pageIndex.list.length !=0){ | ||
| 184 | - this.pageIndex.startTime = this.pageIndex.list[0] | ||
| 185 | - this.pageIndex.endTime = this.pageIndex.list[1] | ||
| 186 | - } | ||
| 187 | - this.getAll() | ||
| 188 | - }, | ||
| 189 | - clear(){ | ||
| 190 | - this.pageIndex = { | ||
| 191 | - list: [], | ||
| 192 | - page: 1, | ||
| 193 | - pageSize: 10, | ||
| 194 | - startTime:"", | ||
| 195 | - endTime:"", | ||
| 196 | - ticketChannel:"", | ||
| 197 | - ticketType:"" | ||
| 198 | - } | ||
| 199 | - this.getAll() | ||
| 200 | - }, | ||
| 201 | - changepiao(){ | ||
| 202 | - this.getAll() | ||
| 203 | - }, | ||
| 204 | - async daochu(){ | ||
| 205 | - let res = await excelToTicketTypeSalesSituation(this.pageIndex) | ||
| 206 | - if(!res){ | ||
| 207 | - return | ||
| 208 | - } | ||
| 209 | - const blob = new Blob([res], { type: 'application/vnd.ms-excel' }) | ||
| 210 | - const fileName = '票种销售表.xls' | ||
| 211 | - if ('download' in document.createElement('a')) { | ||
| 212 | - // 非IE下载 | ||
| 213 | - const elink = document.createElement('a') | ||
| 214 | - elink.download = fileName | ||
| 215 | - elink.style.display = 'none' | ||
| 216 | - elink.href = URL.createObjectURL(blob) | ||
| 217 | - document.body.appendChild(elink) | ||
| 218 | - elink.click() | ||
| 219 | - URL.revokeObjectURL(elink.href) // 释放URL 对象 | ||
| 220 | - document.body.removeChild(elink) | ||
| 221 | - } else { | ||
| 222 | - // IE10+下载 | ||
| 223 | - navigator.msSaveBlob(blob, fileName) | ||
| 224 | - } | ||
| 225 | - this.$message({ | ||
| 226 | - message: '导出成功', | ||
| 227 | - type: 'success' | ||
| 228 | - }) | ||
| 229 | - }, | ||
| 230 | - getSummaries(param) { | ||
| 231 | - const { columns, data } = param; | ||
| 232 | - const sums = []; | ||
| 233 | - columns.forEach((column, index) => { | ||
| 234 | - if (index === 0) { | ||
| 235 | - sums[index] = '总计'; | ||
| 236 | - return; | ||
| 237 | - } | ||
| 238 | - if (['销售数量(张)', '客单价(元)', '销售金额(元)'].includes(column.label)) { | ||
| 239 | - const values = data.map(item => Number(item[column.property])) | 264 | + if (!values.every(value => isNaN(value))) { |
| 265 | + sums[index] = values.reduce((prev, curr) => { | ||
| 266 | + const value = Number(curr); | ||
| 240 | 267 | ||
| 241 | - if (!values.every(value => isNaN(value))) { | ||
| 242 | - sums[index] = values.reduce((prev, curr) => { | ||
| 243 | - const value = Number(curr); | 268 | + if (!isNaN(value)) { |
| 244 | 269 | ||
| 245 | - if (!isNaN(value)) { | 270 | + return prev + curr; |
| 246 | 271 | ||
| 247 | - return prev + curr; | 272 | + } else { |
| 273 | + return prev; | ||
| 274 | + } | ||
| 275 | + }, 0); | ||
| 276 | + } else { | ||
| 277 | + sums[index] = ''; | ||
| 278 | + } | ||
| 279 | + } else { | ||
| 280 | + sums[index] = ''; | ||
| 281 | + } | ||
| 282 | + }); | ||
| 248 | 283 | ||
| 249 | - } else { | ||
| 250 | - return prev; | ||
| 251 | - } | ||
| 252 | - }, 0); | ||
| 253 | - } else { | ||
| 254 | - sums[index] = ''; | ||
| 255 | - } | ||
| 256 | - } else { | ||
| 257 | - sums[index] = ''; | ||
| 258 | - } | ||
| 259 | - }); | 284 | + return sums; |
| 285 | + }, | ||
| 260 | 286 | ||
| 261 | - return sums; | ||
| 262 | - }, | ||
| 263 | - | ||
| 264 | - handleCurrentChange(val) { | ||
| 265 | - this.currentPage = val | ||
| 266 | - }, | ||
| 267 | - handleSizeChange(val) { | ||
| 268 | - this.pageSize = val | ||
| 269 | - }, | ||
| 270 | - objectSpanMethod({ row, column, rowIndex, columnIndex }) { | ||
| 271 | - if (columnIndex === 0) { | ||
| 272 | - if (rowIndex % 2 === 0) { | ||
| 273 | - return { | ||
| 274 | - rowspan: 2, | ||
| 275 | - colspan: 1 | ||
| 276 | - }; | ||
| 277 | - } else { | ||
| 278 | - return { | ||
| 279 | - rowspan: 0, | ||
| 280 | - colspan: 0 | ||
| 281 | - }; | ||
| 282 | - } | ||
| 283 | - } | ||
| 284 | - }, | ||
| 285 | - }, | ||
| 286 | - } | 287 | + handleCurrentChange(val) { |
| 288 | + this.currentPage = val | ||
| 289 | + }, | ||
| 290 | + handleSizeChange(val) { | ||
| 291 | + this.pageSize = val | ||
| 292 | + }, | ||
| 293 | + // objectSpanMethod({ | ||
| 294 | + // row, | ||
| 295 | + // column, | ||
| 296 | + // rowIndex, | ||
| 297 | + // columnIndex | ||
| 298 | + // }) { | ||
| 299 | + // if (columnIndex === 0) { | ||
| 300 | + // if (rowIndex % 2 === 0) { | ||
| 301 | + // return { | ||
| 302 | + // rowspan: 2, | ||
| 303 | + // colspan: 1 | ||
| 304 | + // }; | ||
| 305 | + // } else { | ||
| 306 | + // return { | ||
| 307 | + // rowspan: 0, | ||
| 308 | + // colspan: 0 | ||
| 309 | + // }; | ||
| 310 | + // } | ||
| 311 | + // } | ||
| 312 | + // }, | ||
| 313 | + }, | ||
| 314 | + } | ||
| 287 | </script> | 315 | </script> |
| 288 | 316 | ||
| 289 | <style lang='scss' scoped> | 317 | <style lang='scss' scoped> |
| 290 | -.history{ | ||
| 291 | - padding: 0 20px 20px 20px; | ||
| 292 | - min-height: calc(100vh - 50px - 20px); | ||
| 293 | - background-color: #Fff; | ||
| 294 | -} | ||
| 295 | - ::v-deep .el-form-item__label{ | ||
| 296 | - font-weight: normal; | ||
| 297 | - font-size: 14px; | 318 | + .history { |
| 319 | + padding: 0 20px 20px 20px; | ||
| 320 | + min-height: calc(100vh - 50px - 20px); | ||
| 321 | + background-color: #Fff; | ||
| 322 | + } | ||
| 323 | + | ||
| 324 | + ::v-deep .el-form-item__label { | ||
| 325 | + font-weight: normal; | ||
| 326 | + font-size: 14px; | ||
| 298 | 327 | ||
| 299 | - } | 328 | + } |
| 300 | 329 | ||
| 301 | - ::v-deep .el-pagination.is-background .el-pager li:not(.disabled).active { | ||
| 302 | - background-color: #3F9B6A; | ||
| 303 | - } | 330 | + ::v-deep .el-pagination.is-background .el-pager li:not(.disabled).active { |
| 331 | + background-color: #3F9B6A; | ||
| 332 | + } | ||
| 304 | </style> | 333 | </style> |
| 305 | <style scoped> | 334 | <style scoped> |
| 306 | -.history /deep/ .el-table .cell.el-tooltip img { | ||
| 307 | - max-height: 100px; | ||
| 308 | -} | 335 | + .history /deep/ .el-table .cell.el-tooltip img { |
| 336 | + max-height: 100px; | ||
| 337 | + } | ||
| 338 | + | ||
| 309 | 339 | ||
| 340 | + .pagination { | ||
| 341 | + text-align: right; | ||
| 342 | + line-height: 20px; | ||
| 343 | + } | ||
| 310 | 344 | ||
| 311 | - .pagination { | ||
| 312 | - text-align: right; | ||
| 313 | - line-height: 20px; | ||
| 314 | - } | ||
| 315 | -.greens { | ||
| 316 | - color: #3F9B6A; | ||
| 317 | - } | 345 | + .greens { |
| 346 | + color: #3F9B6A; | ||
| 347 | + } | ||
| 318 | 348 | ||
| 319 | - /deep/ .el-table__row { | ||
| 320 | - font-size: 14px; | ||
| 321 | - color:#000000e6; | ||
| 322 | - height:42px; | ||
| 323 | - } | 349 | + /deep/ .el-table__row { |
| 350 | + font-size: 14px; | ||
| 351 | + color: #000000e6; | ||
| 352 | + height: 42px; | ||
| 353 | + } | ||
| 324 | 354 | ||
| 325 | - .fenye { | ||
| 326 | - margin-top: 20px; | ||
| 327 | - display: flex; | ||
| 328 | - justify-content: flex-end; | ||
| 329 | - } | ||
| 330 | - ::v-deep .el-pagination__total{ | ||
| 331 | - position: absolute; | ||
| 332 | - left: 60px; | ||
| 333 | - } | ||
| 334 | - ::v-deep .buttonHover:hover{ | ||
| 335 | - color:#3f9b6a !important; | ||
| 336 | - border-color: #c5e1d2 !important; | ||
| 337 | - background-color: #ecf5f0 !important; | ||
| 338 | - outline: none; | ||
| 339 | - } | 355 | + .fenye { |
| 356 | + margin-top: 20px; | ||
| 357 | + display: flex; | ||
| 358 | + justify-content: flex-end; | ||
| 359 | + } | ||
| 360 | + | ||
| 361 | + ::v-deep .el-pagination__total { | ||
| 362 | + position: absolute; | ||
| 363 | + left: 60px; | ||
| 364 | + } | ||
| 365 | + | ||
| 366 | + ::v-deep .buttonHover:hover { | ||
| 367 | + color: #3f9b6a !important; | ||
| 368 | + border-color: #c5e1d2 !important; | ||
| 369 | + background-color: #ecf5f0 !important; | ||
| 370 | + outline: none; | ||
| 371 | + } | ||
| 340 | </style> | 372 | </style> |
| 341 | <style> | 373 | <style> |
| 342 | -.el-tooltip__popper { | ||
| 343 | - max-width: 50%; | ||
| 344 | -} | ||
| 345 | -</style> | 374 | + .el-tooltip__popper { |
| 375 | + max-width: 50%; | ||
| 376 | + } | ||
| 377 | +</style> | ||
| 346 | \ No newline at end of file | 378 | \ No newline at end of file |
admin-web-master/src/views/atmosphere/atmosphereGl.vue
| @@ -123,12 +123,12 @@ | @@ -123,12 +123,12 @@ | ||
| 123 | </el-table> | 123 | </el-table> |
| 124 | <div class="fenye"> | 124 | <div class="fenye"> |
| 125 | <div> | 125 | <div> |
| 126 | - <el-button @click="tableAll" class="buttonHover" | 126 | + <!-- <el-button @click="tableAll" class="buttonHover" |
| 127 | style="color: #000;border: 1px solid #DBDBDB;background-color: #fff;">选择全部 | 127 | style="color: #000;border: 1px solid #DBDBDB;background-color: #fff;">选择全部 |
| 128 | </el-button> | 128 | </el-button> |
| 129 | <el-button @click="toggleSelection(tableData)" class="buttonHover" | 129 | <el-button @click="toggleSelection(tableData)" class="buttonHover" |
| 130 | style="color: #000;border: 1px solid #DBDBDB;background-color: #fff;">反向选择 | 130 | style="color: #000;border: 1px solid #DBDBDB;background-color: #fff;">反向选择 |
| 131 | - </el-button> | 131 | + </el-button> --> |
| 132 | </div> | 132 | </div> |
| 133 | <el-pagination class="pagination" :hide-on-single-page="flag" background small | 133 | <el-pagination class="pagination" :hide-on-single-page="flag" background small |
| 134 | :current-page="currentPage" :page-sizes="[10, 20, 50, 100]" :page-size="pageSize" | 134 | :current-page="currentPage" :page-sizes="[10, 20, 50, 100]" :page-size="pageSize" |
admin-web-master/src/views/atmosphere/atmosphereHis.vue
| @@ -66,12 +66,13 @@ | @@ -66,12 +66,13 @@ | ||
| 66 | 66 | ||
| 67 | <!-- 表格 --> | 67 | <!-- 表格 --> |
| 68 | <div> | 68 | <div> |
| 69 | + <!-- @selection-change="handleSelectionChange" --> | ||
| 69 | <el-table :data="tableData.slice((currentPage - 1) * pageSize, currentPage * pageSize)" | 70 | <el-table :data="tableData.slice((currentPage - 1) * pageSize, currentPage * pageSize)" |
| 70 | - @selection-change="handleSelectionChange" tooltip-effect="dark" align="left" | 71 | + tooltip-effect="dark" align="left" |
| 71 | :header-cell-style="{fontSize: '14px',color:'#0009',fontWeight: 'normal',backgroundColor:'#F2F3F5'}" | 72 | :header-cell-style="{fontSize: '14px',color:'#0009',fontWeight: 'normal',backgroundColor:'#F2F3F5'}" |
| 72 | ref="mulTable"> | 73 | ref="mulTable"> |
| 73 | - <el-table-column type="selection" min-width="5%"> | ||
| 74 | - </el-table-column> | 74 | + <!-- <el-table-column type="selection" min-width="5%"> |
| 75 | + </el-table-column> --> | ||
| 75 | <el-table-column label="方案名称" min-width="27%" show-overflow-tooltip prop="planName"> | 76 | <el-table-column label="方案名称" min-width="27%" show-overflow-tooltip prop="planName"> |
| 76 | </el-table-column> | 77 | </el-table-column> |
| 77 | <el-table-column label="类型" prop="planType" min-width="10%"> | 78 | <el-table-column label="类型" prop="planType" min-width="10%"> |
| @@ -114,12 +115,12 @@ | @@ -114,12 +115,12 @@ | ||
| 114 | </el-table> | 115 | </el-table> |
| 115 | <div class="fenye"> | 116 | <div class="fenye"> |
| 116 | <div> | 117 | <div> |
| 117 | - <el-button @click="tableAll" class="buttonHover" | 118 | + <!-- <el-button @click="tableAll" class="buttonHover" |
| 118 | style="color: #000;border: 1px solid #DBDBDB;background-color: #fff;">选择全部 | 119 | style="color: #000;border: 1px solid #DBDBDB;background-color: #fff;">选择全部 |
| 119 | </el-button> | 120 | </el-button> |
| 120 | <el-button @click="toggleSelection(tableData)" class="buttonHover" | 121 | <el-button @click="toggleSelection(tableData)" class="buttonHover" |
| 121 | style="color: #000;border: 1px solid #DBDBDB;background-color: #fff;">反向选择 | 122 | style="color: #000;border: 1px solid #DBDBDB;background-color: #fff;">反向选择 |
| 122 | - </el-button> | 123 | + </el-button> --> |
| 123 | </div> | 124 | </div> |
| 124 | <el-pagination class="pagination" :hide-on-single-page="flag" background small | 125 | <el-pagination class="pagination" :hide-on-single-page="flag" background small |
| 125 | :current-page="currentPage" :page-size="pageSize" layout="prev,pager,next" | 126 | :current-page="currentPage" :page-size="pageSize" layout="prev,pager,next" |
admin-web-master/src/views/revenue/details/index.vue
| @@ -15,17 +15,13 @@ | @@ -15,17 +15,13 @@ | ||
| 15 | <el-select placeholder="全部" | 15 | <el-select placeholder="全部" |
| 16 | v-model="pageIndex.ticketChannel" | 16 | v-model="pageIndex.ticketChannel" |
| 17 | style="width: 120px;margin-right: 15px"> | 17 | style="width: 120px;margin-right: 15px"> |
| 18 | - <el-option label="大麦" value="大麦" /> | ||
| 19 | - <el-option label="猫眼" value="猫眼" /> | ||
| 20 | - <el-option label="携程" value="携程" /> | ||
| 21 | - <el-option label="美团" value="美团" /> | 18 | + <el-option v-for="(item,index) in type" :label="item==1?'有赞':'其他'" :value="item" /> |
| 22 | </el-select> | 19 | </el-select> |
| 23 | </el-form-item> | 20 | </el-form-item> |
| 24 | <el-form-item label="票种"> | 21 | <el-form-item label="票种"> |
| 25 | <el-select placeholder="全部" v-model="pageIndex.ticketType" | 22 | <el-select placeholder="全部" v-model="pageIndex.ticketType" |
| 26 | style="width: 120px;margin-right: 15px"> | 23 | style="width: 120px;margin-right: 15px"> |
| 27 | - <el-option label="电影票" value="电影票" /> | ||
| 28 | - <el-option label="演唱会票" value="演唱会票" /> | 24 | + <el-option v-for="(item,index) in listType" :label="item" :value="item" /> |
| 29 | </el-select> | 25 | </el-select> |
| 30 | </el-form-item> | 26 | </el-form-item> |
| 31 | <el-form-item label="日期"> | 27 | <el-form-item label="日期"> |
| @@ -63,16 +59,18 @@ | @@ -63,16 +59,18 @@ | ||
| 63 | :data="tableData.slice((currentPage - 1) * pageSize, currentPage * pageSize)" | 59 | :data="tableData.slice((currentPage - 1) * pageSize, currentPage * pageSize)" |
| 64 | :header-cell-style="{fontSize: '14px',color:'#0009',fontWeight: 'normal',backgroundColor:'#F2F3F5'}" | 60 | :header-cell-style="{fontSize: '14px',color:'#0009',fontWeight: 'normal',backgroundColor:'#F2F3F5'}" |
| 65 | > | 61 | > |
| 66 | - <el-table-column label="序号" > | 62 | + <el-table-column label="序号" min-width="50"> |
| 67 | <template slot-scope="scope"> | 63 | <template slot-scope="scope"> |
| 68 | {{scope.$index +1}} | 64 | {{scope.$index +1}} |
| 69 | </template> | 65 | </template> |
| 70 | </el-table-column> | 66 | </el-table-column> |
| 71 | - <el-table-column prop="ticketChannel" label="渠道"> | ||
| 72 | - | 67 | + <el-table-column prop="ticketChannel" label="渠道" min-width="60"> |
| 68 | +<template slot-scope="scope"> | ||
| 69 | + {{scope.row.ticketChannel == '1'?'有赞':'其他'}} | ||
| 70 | + </template> | ||
| 73 | </el-table-column> | 71 | </el-table-column> |
| 74 | - <el-table-column prop="ticketType" label="票种" /> | ||
| 75 | - <el-table-column prop="ticketName" label="票名" /> | 72 | + <el-table-column prop="ticketType" label="票种" min-width="60"/> |
| 73 | + <el-table-column prop="ticketName" label="票名" min-width="150" :show-overflow-tooltip="true"/> | ||
| 76 | <el-table-column prop="num" label="销售数量(张)" /> | 74 | <el-table-column prop="num" label="销售数量(张)" /> |
| 77 | <el-table-column prop="ticketPrice" label="客单价(元)" /> | 75 | <el-table-column prop="ticketPrice" label="客单价(元)" /> |
| 78 | <el-table-column prop="price" label="销售金额(元)" /> | 76 | <el-table-column prop="price" label="销售金额(元)" /> |
| @@ -103,14 +101,11 @@ import {getSalesParticular,excelToSalesParticular} from '@/api/piaowu' | @@ -103,14 +101,11 @@ import {getSalesParticular,excelToSalesParticular} from '@/api/piaowu' | ||
| 103 | export default { | 101 | export default { |
| 104 | data() { | 102 | data() { |
| 105 | return { | 103 | return { |
| 104 | + flag:false, | ||
| 106 | list: [], | 105 | list: [], |
| 107 | total: 1, | 106 | total: 1, |
| 108 | pageSize: 10, | 107 | pageSize: 10, |
| 109 | currentPage: 1, | 108 | currentPage: 1, |
| 110 | - formParams: { | ||
| 111 | - page: 1, | ||
| 112 | - pageSize: 10 | ||
| 113 | - }, | ||
| 114 | tipsList: [], | 109 | tipsList: [], |
| 115 | tableData: [], | 110 | tableData: [], |
| 116 | pageIndex:{ | 111 | pageIndex:{ |
| @@ -122,20 +117,44 @@ export default { | @@ -122,20 +117,44 @@ export default { | ||
| 122 | ticketChannel:"", | 117 | ticketChannel:"", |
| 123 | ticketType:"" | 118 | ticketType:"" |
| 124 | }, | 119 | }, |
| 120 | + type:[], | ||
| 121 | + listType:[] | ||
| 125 | 122 | ||
| 126 | } | 123 | } |
| 127 | }, | 124 | }, |
| 128 | mounted() { | 125 | mounted() { |
| 129 | this.getAll() | 126 | this.getAll() |
| 127 | + getSalesParticular(this.pageIndex).then(res=>{ | ||
| 128 | + this.type = this.extractAndDeduplicateTicketChannels(res.data) | ||
| 129 | + this.listType = this.listype(res.data) | ||
| 130 | + }) | ||
| 130 | }, | 131 | }, |
| 131 | methods: { | 132 | methods: { |
| 132 | async getAll(){ | 133 | async getAll(){ |
| 133 | let res = await getSalesParticular(this.pageIndex) | 134 | let res = await getSalesParticular(this.pageIndex) |
| 134 | - this.tableData = res.data.list | ||
| 135 | - this.total = res.data.total | 135 | + this.tableData = res.data |
| 136 | + this.total = res.data.length | ||
| 136 | 137 | ||
| 137 | 138 | ||
| 138 | }, | 139 | }, |
| 140 | + extractAndDeduplicateTicketChannels(arr) { | ||
| 141 | + const ticketChannels = []; | ||
| 142 | + for (let i = 0; i < arr.length; i++) { | ||
| 143 | + if (arr[i].hasOwnProperty('ticketChannel')) { | ||
| 144 | + ticketChannels.push(arr[i].ticketChannel); | ||
| 145 | + } | ||
| 146 | + } | ||
| 147 | + return [...new Set(ticketChannels)]; | ||
| 148 | + }, | ||
| 149 | + listype(arr) { | ||
| 150 | + const ticketChannels = []; | ||
| 151 | + for (let i = 0; i < arr.length; i++) { | ||
| 152 | + if (arr[i].hasOwnProperty('ticketType')) { | ||
| 153 | + ticketChannels.push(arr[i].ticketType); | ||
| 154 | + } | ||
| 155 | + } | ||
| 156 | + return [...new Set(ticketChannels)]; | ||
| 157 | + }, | ||
| 139 | search(){ | 158 | search(){ |
| 140 | if(this.pageIndex.list.length !=0){ | 159 | if(this.pageIndex.list.length !=0){ |
| 141 | this.pageIndex.startTime = this.pageIndex.list[0] | 160 | this.pageIndex.startTime = this.pageIndex.list[0] |
admin-web-master/src/views/revenue/totalsales/index.vue
| @@ -10,22 +10,18 @@ | @@ -10,22 +10,18 @@ | ||
| 10 | 10 | ||
| 11 | <!-- 顶部搜索 --> | 11 | <!-- 顶部搜索 --> |
| 12 | <div class="toolbar"> | 12 | <div class="toolbar"> |
| 13 | - <el-form ref="formParams" :inline="true" :model="pageIndex"> | 13 | + <el-form :inline="true" :model="pageIndex"> |
| 14 | <el-form-item label="渠道"> | 14 | <el-form-item label="渠道"> |
| 15 | <el-select placeholder="全部" | 15 | <el-select placeholder="全部" |
| 16 | v-model="pageIndex.ticketChannel" | 16 | v-model="pageIndex.ticketChannel" |
| 17 | style="width: 120px;margin-right: 15px"> | 17 | style="width: 120px;margin-right: 15px"> |
| 18 | - <el-option label="大麦" value="大麦" /> | ||
| 19 | - <el-option label="猫眼" value="猫眼" /> | ||
| 20 | - <el-option label="携程" value="携程" /> | ||
| 21 | - <el-option label="美团" value="美团" /> | 18 | + <el-option v-for="(item,index) in type" :label="item==1?'有赞':'其他'" :value="item" /> |
| 22 | </el-select> | 19 | </el-select> |
| 23 | </el-form-item> | 20 | </el-form-item> |
| 24 | <el-form-item label="票种"> | 21 | <el-form-item label="票种"> |
| 25 | <el-select placeholder="全部" v-model="pageIndex.ticketType" | 22 | <el-select placeholder="全部" v-model="pageIndex.ticketType" |
| 26 | style="width: 120px;margin-right: 15px"> | 23 | style="width: 120px;margin-right: 15px"> |
| 27 | - <el-option label="电影票" value="电影票" /> | ||
| 28 | - <el-option label="演唱会票" value="演唱会票" /> | 24 | + <el-option v-for="(item,index) in listType" :label="item" :value="item" /> |
| 29 | </el-select> | 25 | </el-select> |
| 30 | </el-form-item> | 26 | </el-form-item> |
| 31 | <el-form-item label="日期"> | 27 | <el-form-item label="日期"> |
| @@ -41,8 +37,8 @@ | @@ -41,8 +37,8 @@ | ||
| 41 | </el-form-item> | 37 | </el-form-item> |
| 42 | 38 | ||
| 43 | <el-form-item label-width="0"> | 39 | <el-form-item label-width="0"> |
| 44 | - <el-button @click="search('formParams')" style="background-color: #3F9B6A;color: #fff">查询</el-button> | ||
| 45 | - <el-button @click="clear('formParams')" class="buttonHover" | 40 | + <el-button @click="search" style="background-color: #3F9B6A;color: #fff">查询</el-button> |
| 41 | + <el-button @click="clear" class="buttonHover" | ||
| 46 | style="color: #606266;border: 1px solid #dddfe5;background-color: #fff;">重置</el-button> | 42 | style="color: #606266;border: 1px solid #dddfe5;background-color: #fff;">重置</el-button> |
| 47 | </el-form-item> | 43 | </el-form-item> |
| 48 | </el-form> | 44 | </el-form> |
| @@ -53,49 +49,30 @@ | @@ -53,49 +49,30 @@ | ||
| 53 | </div> | 49 | </div> |
| 54 | <!-- 表格 --> | 50 | <!-- 表格 --> |
| 55 | <div class="content_table" style="padding: 15px 10px 10px 20px;background-color:#F2F3F5"> | 51 | <div class="content_table" style="padding: 15px 10px 10px 20px;background-color:#F2F3F5"> |
| 56 | - <div style="background-color: #fff;padding: 10px;margin-bottom: 20px;"> | 52 | + <div style="background-color: #fff;padding: 10px;margin-bottom: 20px;text-algin:center"> |
| 57 | <div style='padding:20px 10px;background-color:#fff;'> | 53 | <div style='padding:20px 10px;background-color:#fff;'> |
| 58 | - <div style="display:flex;font-size:14px;justify-content: space-around"> | 54 | + <div style="display:flex;font-size:14px;justify-content: space-evenly"> |
| 59 | <div style="width:10%;border-right:1px solid #F2F2F2"> | 55 | <div style="width:10%;border-right:1px solid #F2F2F2"> |
| 60 | <div style="margin-bottom: 10px;font-weight: 600;">总销售额(元)</div> | 56 | <div style="margin-bottom: 10px;font-weight: 600;">总销售额(元)</div> |
| 61 | <div style="font-weight: 600;">{{moyeOne}}</div> | 57 | <div style="font-weight: 600;">{{moyeOne}}</div> |
| 62 | </div> | 58 | </div> |
| 63 | - <div style="width:10%;border-right:1px solid #F2F2F2"> | ||
| 64 | - <div style="margin-bottom: 10px;font-weight: 600;">美团销售总额(元)</div> | ||
| 65 | - <div style="font-weight: 600;">{{meimoye}}</div> | ||
| 66 | - </div> | ||
| 67 | - <div style="width:10%;border-right:1px solid #F2F2F2"> | ||
| 68 | - <div style="margin-bottom: 10px;font-weight: 600;">大麦销售总额(元)</div> | ||
| 69 | - <div style="font-weight: 600;">{{moyeTwo}}</div> | ||
| 70 | - </div> | ||
| 71 | - <div style="width:10%;border-right:1px solid #F2F2F2"> | ||
| 72 | - <div style="margin-bottom: 10px;font-weight: 600;">携程销售总额(元)</div> | ||
| 73 | - <div style="font-weight: 600;">{{moyethree}}</div> | ||
| 74 | - </div> | ||
| 75 | - <!-- <div style="width:10%;border-right:1px solid #F2F2F2"> | ||
| 76 | - <div style="margin-bottom: 10px;font-weight: 600;">票种1销售总额(元)</div> | ||
| 77 | - <div style="font-weight: 600;">100,000.00</div> | 59 | + <div style="width:10%;border-right:1px solid #F2F2F2" v-for="(item,index) in tongList"> |
| 60 | + <div style="margin-bottom: 10px;font-weight: 600;">{{item.ticketChannel==1?'有赞':''}}销售总额(元)</div> | ||
| 61 | + <div style="font-weight: 600;">{{item.sum}}</div> | ||
| 78 | </div> | 62 | </div> |
| 79 | - <div style="width:10%;border-right:1px solid #F2F2F2"> | ||
| 80 | - <div style="margin-bottom: 10px;font-weight: 600;">票种1销售总额(元)</div> | ||
| 81 | - <div style="font-weight: 600;">100,000.00</div> | ||
| 82 | - </div> | ||
| 83 | - <div style="width:10%"> | ||
| 84 | - <div style="margin-bottom: 10px;font-weight: 600;">票种2销售总额(元)</div> | ||
| 85 | - <div style="font-weight: 600;">100,000.00</div> | ||
| 86 | - </div> --> | 63 | + |
| 87 | </div> | 64 | </div> |
| 88 | </div> | 65 | </div> |
| 89 | </div> | 66 | </div> |
| 90 | <!-- 图表 --> | 67 | <!-- 图表 --> |
| 91 | <div style="display: flex;"> | 68 | <div style="display: flex;"> |
| 92 | <div style="background-color: #fff;padding: 10px;margin-right: 10px;width: 32%;"> | 69 | <div style="background-color: #fff;padding: 10px;margin-right: 10px;width: 32%;"> |
| 93 | - <div style="display: flex;border-bottom:1px solid #F2F2F2;justify-content: space-between;padding: 5px; 0 15px 0"> | 70 | + <div style="display: flex;border-bottom:1px solid #F2F2F2;justify-content: space-between;padding: 5px; 0 15px 0;text-align: center;"> |
| 94 | <div style="line-height: 200%;">总销售额趋势表</div> | 71 | <div style="line-height: 200%;">总销售额趋势表</div> |
| 95 | <!-- <el-button style="background-color: #3F9B6A;color: #fff">导出</el-button> --> | 72 | <!-- <el-button style="background-color: #3F9B6A;color: #fff">导出</el-button> --> |
| 96 | </div> | 73 | </div> |
| 97 | - <div style="margin:10px 0 15px 0"> | ||
| 98 | - <!-- <el-date-picker | 74 | + <!-- <div style="margin:10px 0 15px 0"> |
| 75 | + <el-date-picker | ||
| 99 | 76 | ||
| 100 | v-model="value1" | 77 | v-model="value1" |
| 101 | value-format="yyyy-mm-dd" | 78 | value-format="yyyy-mm-dd" |
| @@ -103,9 +80,9 @@ | @@ -103,9 +80,9 @@ | ||
| 103 | range-separator="至" | 80 | range-separator="至" |
| 104 | start-placeholder="开始日期" | 81 | start-placeholder="开始日期" |
| 105 | end-placeholder="结束日期"> | 82 | end-placeholder="结束日期"> |
| 106 | - </el-date-picker> --> | ||
| 107 | - </div> | ||
| 108 | - <div style="color:#000">单位:张</div> | 83 | + </el-date-picker> |
| 84 | + </div> --> | ||
| 85 | + <div style="color:#000;padding: 5px;">单位:张</div> | ||
| 109 | <!-- 折线图--> | 86 | <!-- 折线图--> |
| 110 | <div ref="container1" style="width: 400px; height: 400px;"></div> | 87 | <div ref="container1" style="width: 400px; height: 400px;"></div> |
| 111 | 88 | ||
| @@ -123,7 +100,7 @@ | @@ -123,7 +100,7 @@ | ||
| 123 | <el-radio-button label="携程"></el-radio-button> | 100 | <el-radio-button label="携程"></el-radio-button> |
| 124 | </el-radio-group> | 101 | </el-radio-group> |
| 125 | </div> --> | 102 | </div> --> |
| 126 | - <div style="color:#000">单位:元</div> | 103 | + <div style="color:#000;padding: 5px;">单位:元</div> |
| 127 | <!-- 柱状图--> | 104 | <!-- 柱状图--> |
| 128 | <div ref="container2" style="width: 400px; height: 400px;"></div> | 105 | <div ref="container2" style="width: 400px; height: 400px;"></div> |
| 129 | 106 | ||
| @@ -141,7 +118,7 @@ | @@ -141,7 +118,7 @@ | ||
| 141 | <el-radio-button label="票种3"></el-radio-button> | 118 | <el-radio-button label="票种3"></el-radio-button> |
| 142 | </el-radio-group> | 119 | </el-radio-group> |
| 143 | </div> --> | 120 | </div> --> |
| 144 | - <div style="color:#000">单位:元</div> | 121 | + <div style="color:#000;padding: 5px;">单位:元</div> |
| 145 | <!-- 柱状图--> | 122 | <!-- 柱状图--> |
| 146 | <div ref="container3" style="width: 400px; height: 400px;"></div> | 123 | <div ref="container3" style="width: 400px; height: 400px;"></div> |
| 147 | 124 | ||
| @@ -162,13 +139,9 @@ export default { | @@ -162,13 +139,9 @@ export default { | ||
| 162 | value1:'', | 139 | value1:'', |
| 163 | radio1:'', | 140 | radio1:'', |
| 164 | radio2:'', | 141 | radio2:'', |
| 165 | - total: 1, | 142 | + total: 0, |
| 166 | pageSize: 10, | 143 | pageSize: 10, |
| 167 | currentPage: 1, | 144 | currentPage: 1, |
| 168 | - formParams: { | ||
| 169 | - page: 1, | ||
| 170 | - pageSize: 10 | ||
| 171 | - }, | ||
| 172 | tipsList: [], | 145 | tipsList: [], |
| 173 | tableData: [], | 146 | tableData: [], |
| 174 | chart1:null, | 147 | chart1:null, |
| @@ -190,86 +163,75 @@ numOne:0, | @@ -190,86 +163,75 @@ numOne:0, | ||
| 190 | meimoye:0, | 163 | meimoye:0, |
| 191 | numthree:0, | 164 | numthree:0, |
| 192 | moyethree:0, | 165 | moyethree:0, |
| 166 | + type:[], | ||
| 167 | + listType:[], | ||
| 168 | + tongList:[] | ||
| 193 | } | 169 | } |
| 194 | }, | 170 | }, |
| 195 | mounted() { | 171 | mounted() { |
| 196 | this.getAll() | 172 | this.getAll() |
| 197 | - // this.echar(this.$refs.container) | ||
| 198 | - // console.log(this.$refs.container2) | ||
| 199 | - // this.echar2(this.$refs.container2) | ||
| 200 | - | ||
| 201 | - // this.echar3(this.$refs.container3) | ||
| 202 | - // this.resizeChart = () => { | ||
| 203 | - // try { | ||
| 204 | - // this.chart.resize() | ||
| 205 | - // this.chart2.resize() | ||
| 206 | - // this.chart3.resize() | ||
| 207 | - // } catch (error) { | ||
| 208 | - // console.log(error); | ||
| 209 | - // } | ||
| 210 | - // }; | ||
| 211 | - // window.addEventListener('resize', this.resizeChart, false); // false代表事件句柄在冒泡阶段执行 | ||
| 212 | - | ||
| 213 | - // this.$nextTick(() => { | ||
| 214 | - // this.echar(this.$refs.container) | ||
| 215 | - // this.echar2(this.$refs.container2) | ||
| 216 | - // this.echar3(this.$refs.container3) | ||
| 217 | - // this.resizeChart = () => { | ||
| 218 | - // try { | ||
| 219 | - // this.chart.resize() | ||
| 220 | - // this.chart2.resize() | ||
| 221 | - // this.chart3.resize() | ||
| 222 | - // } catch (error) { | ||
| 223 | - // console.log(error); | ||
| 224 | - // } | ||
| 225 | - // }; | ||
| 226 | - // window.addEventListener('resize', this.resizeChart, false); // false代表事件句柄在冒泡阶段执行 | ||
| 227 | - // }) | 173 | + getTotalSales(this.pageIndex).then(res=>{ |
| 174 | + this.type = this.extractAndDeduplicateTicketChannels(res.data) | ||
| 175 | + this.listType = this.listype(res.data) | ||
| 176 | + }) | ||
| 177 | + | ||
| 228 | }, | 178 | }, |
| 229 | 179 | ||
| 230 | methods: { | 180 | methods: { |
| 231 | async getAll(){ | 181 | async getAll(){ |
| 232 | let res = await getTotalSales(this.pageIndex) | 182 | let res = await getTotalSales(this.pageIndex) |
| 233 | - this.tableData = res.data.list | ||
| 234 | - this.total = res.data.total | ||
| 235 | - | 183 | + this.tableData = res.data |
| 184 | + this.total = res.data.length | ||
| 185 | + this.tongList = this.calculatePriceByTicketType(res.data) | ||
| 236 | // this.echar(res.data.list) | 186 | // this.echar(res.data.list) |
| 237 | - let numOne =0 | ||
| 238 | let moyeOne =0 | 187 | let moyeOne =0 |
| 239 | - let meimoye = 0 | ||
| 240 | - let numTwo =0 | ||
| 241 | - let moyeTwo =0 | ||
| 242 | - let numthree=0 | ||
| 243 | - let moyethree =0 | ||
| 244 | 188 | ||
| 245 | this.tableData.map(item=>{ | 189 | this.tableData.map(item=>{ |
| 246 | moyeOne += Number(item.price) | 190 | moyeOne += Number(item.price) |
| 247 | - if(item.ticketChannel == '美团'){ | ||
| 248 | - numOne += item.num | ||
| 249 | - meimoye = meimoye + Number(item.price) | ||
| 250 | - } | ||
| 251 | - if(item.ticketChannel == '大麦'){ | ||
| 252 | - numTwo += item.num | ||
| 253 | 191 | ||
| 254 | - moyeTwo = moyeTwo + Number(item.price) | ||
| 255 | - } | ||
| 256 | - if(item.ticketChannel == '携程'){ | ||
| 257 | - numthree += item.num | ||
| 258 | - | ||
| 259 | - moyethree = moyethree + Number(item.price) | ||
| 260 | - } | ||
| 261 | }) | 192 | }) |
| 262 | - this.numOne = numOne | ||
| 263 | - this.moyeOne = moyeOne | ||
| 264 | - this.numTwo = numTwo | ||
| 265 | - this.moyeTwo = moyeTwo | ||
| 266 | - this.meimoye = meimoye | ||
| 267 | - this.numthree = numthree | ||
| 268 | -this.moyethree = moyethree | 193 | + this.moyeOne = moyeOne |
| 194 | + | ||
| 269 | this.echar2(this.tableData) | 195 | this.echar2(this.tableData) |
| 270 | this.echar3( this.tableData) | 196 | this.echar3( this.tableData) |
| 271 | this.echar( this.tableData) | 197 | this.echar( this.tableData) |
| 272 | }, | 198 | }, |
| 199 | + extractAndDeduplicateTicketChannels(arr) { | ||
| 200 | + const ticketChannels = []; | ||
| 201 | + for (let i = 0; i < arr.length; i++) { | ||
| 202 | + if (arr[i].hasOwnProperty('ticketChannel')) { | ||
| 203 | + ticketChannels.push(arr[i].ticketChannel); | ||
| 204 | + } | ||
| 205 | + } | ||
| 206 | + return [...new Set(ticketChannels)]; | ||
| 207 | + }, | ||
| 208 | + listype(arr) { | ||
| 209 | + const ticketChannels = []; | ||
| 210 | + for (let i = 0; i < arr.length; i++) { | ||
| 211 | + if (arr[i].hasOwnProperty('ticketType')) { | ||
| 212 | + ticketChannels.push(arr[i].ticketType); | ||
| 213 | + } | ||
| 214 | + } | ||
| 215 | + return [...new Set(ticketChannels)]; | ||
| 216 | + }, | ||
| 217 | + calculatePriceByTicketType(data) { | ||
| 218 | + const result = {}; | ||
| 219 | + // 遍历数组中的每个对象 | ||
| 220 | + data.forEach(item => { | ||
| 221 | + const ticketChannel = item.ticketChannel; | ||
| 222 | + if (!result[ticketChannel]) { | ||
| 223 | + // 如果 result 对象中还没有该 ticketChannel 的记录,初始化 sum 为 0 | ||
| 224 | + result[ticketChannel] = { | ||
| 225 | + ticketChannel: ticketChannel, | ||
| 226 | + sum: 0 | ||
| 227 | + }; | ||
| 228 | + } | ||
| 229 | + // 累加当前对象的 price 到对应的 ticketChannel 的 sum 中 | ||
| 230 | + result[ticketChannel].sum += item.price; | ||
| 231 | + }); | ||
| 232 | + // 将 result 对象的属性值转换为数组并返回 | ||
| 233 | + return Object.values(result); | ||
| 234 | + }, | ||
| 273 | search(){ | 235 | search(){ |
| 274 | if(this.pageIndex.list.length !=0){ | 236 | if(this.pageIndex.list.length !=0){ |
| 275 | this.pageIndex.startTime = this.pageIndex.list[0] | 237 | this.pageIndex.startTime = this.pageIndex.list[0] |
| @@ -335,6 +297,18 @@ this.echar( this.tableData) | @@ -335,6 +297,18 @@ this.echar( this.tableData) | ||
| 335 | // 使用刚指定的配置项和数据显示图表。 | 297 | // 使用刚指定的配置项和数据显示图表。 |
| 336 | option && myChart.setOption(option); | 298 | option && myChart.setOption(option); |
| 337 | }, | 299 | }, |
| 300 | + weiqi(val) { | ||
| 301 | + switch (val) { | ||
| 302 | + case '1': | ||
| 303 | + return '有赞'; | ||
| 304 | + case 2: | ||
| 305 | + return ''; | ||
| 306 | + case 3: | ||
| 307 | + return ''; | ||
| 308 | + default: | ||
| 309 | + return ''; | ||
| 310 | + } | ||
| 311 | + }, | ||
| 338 | echar2(datas) { | 312 | echar2(datas) { |
| 339 | let Dom = this.$refs.container2 | 313 | let Dom = this.$refs.container2 |
| 340 | let myChart = echarts.init(Dom) | 314 | let myChart = echarts.init(Dom) |
| @@ -347,7 +321,8 @@ this.echar( this.tableData) | @@ -347,7 +321,8 @@ this.echar( this.tableData) | ||
| 347 | accumulator[existingItemIndex].value += Number(item.price); | 321 | accumulator[existingItemIndex].value += Number(item.price); |
| 348 | } else { | 322 | } else { |
| 349 | // 如果不存在,则添加新项 | 323 | // 如果不存在,则添加新项 |
| 350 | - accumulator.push({ name: item.ticketChannel, value:Number(item.price)}); | 324 | + |
| 325 | + accumulator.push({ name: item.ticketChannel , value:Number(item.price)}); | ||
| 351 | } | 326 | } |
| 352 | 327 | ||
| 353 | return accumulator; | 328 | return accumulator; |
| @@ -356,7 +331,7 @@ this.echar( this.tableData) | @@ -356,7 +331,7 @@ this.echar( this.tableData) | ||
| 356 | let option = { | 331 | let option = { |
| 357 | xAxis: { | 332 | xAxis: { |
| 358 | type: 'category', | 333 | type: 'category', |
| 359 | - data:processedData.map(item => item.name), | 334 | + data:processedData.map(item => this.weiqi(item.name)), |
| 360 | }, | 335 | }, |
| 361 | yAxis: { | 336 | yAxis: { |
| 362 | type: 'value' | 337 | type: 'value' |
ceres-uniapp-master/config/api.js
| 1 | 1 | ||
| 2 | // const DOMAIN_PREFIXPING = 'https://jy.scjysm.asia:18086/cdwlMall/meserver/admin-server' | 2 | // const DOMAIN_PREFIXPING = 'https://jy.scjysm.asia:18086/cdwlMall/meserver/admin-server' |
| 3 | // const DOMAIN_PREFIX = 'https://jy.scjysm.asia:18086/cdwlMall/meserver/api' | 3 | // const DOMAIN_PREFIX = 'https://jy.scjysm.asia:18086/cdwlMall/meserver/api' |
| 4 | -// const TIAOZHUAN = 'https://jy.scjysm.asia:18086/cdwlMall/' | ||
| 5 | -// const DOMAIN_PREFIXPING = 'http://128.10.250.209:9003' | ||
| 6 | -// const DOMAIN_PREFIX = 'http://128.10.250.209:9007' | ||
| 7 | -const host = `${window.location.protocol}//${window.location.host}` | ||
| 8 | -const DOMAIN_PREFIXPING = `${host}/cdwlMall/meserver/admin-server` | ||
| 9 | -const DOMAIN_PREFIX =`${host}/cdwlMall/meserver/api` | ||
| 10 | -const TIAOZHUAN = `${host}/cdwlMall/` | 4 | +// const DOMAIN_PREFIXPING = 'https://zhgw-uat.028wlkj.com/cdwlMall/meserver/admin-server' |
| 5 | +// const DOMAIN_PREFIX = 'https://zhgw-uat.028wlkj.com/cdwlMall/meserver/api' | ||
| 6 | + | ||
| 7 | +const TIAOZHUAN = 'https://jy.scjysm.asia:18086/cdwlMall/' | ||
| 8 | +const DOMAIN_PREFIXPING = 'http://128.10.249.48:9003' | ||
| 9 | +const DOMAIN_PREFIX = 'http://128.10.249.48:9007' | ||
| 10 | +// const host = `${window.location.protocol}//${window.location.host}` | ||
| 11 | +// const DOMAIN_PREFIXPING = `${host}/cdwlMall/meserver/admin-server` | ||
| 12 | +// const DOMAIN_PREFIX =`${host}/cdwlMall/meserver/api` | ||
| 13 | +// const TIAOZHUAN = `${host}/cdwlMall/` | ||
| 11 | 14 | ||
| 12 | 15 | ||
| 13 | 16 |
ceres-uniapp-master/pages/tabbar/user/index.vue
| @@ -159,7 +159,6 @@ | @@ -159,7 +159,6 @@ | ||
| 159 | }, | 159 | }, |
| 160 | onShow() { | 160 | onShow() { |
| 161 | this.isFirstComeIn = true | 161 | this.isFirstComeIn = true |
| 162 | - | ||
| 163 | if (uni.getStorageSync('storage_key')) { | 162 | if (uni.getStorageSync('storage_key')) { |
| 164 | 163 | ||
| 165 | this.cacheUserItem = uni.getStorageSync('storage_key'); | 164 | this.cacheUserItem = uni.getStorageSync('storage_key'); |
ceres-uniapp-master/pages_category_page2/userModule/personalDetails.vue
merchant-web-master/src/utils/request.js
| @@ -19,8 +19,8 @@ let PREFIX; | @@ -19,8 +19,8 @@ let PREFIX; | ||
| 19 | if( host == 'localhost:9528' || host == '8.130.38.56:8027' || host == 'localhost:9529'|| host == 'localhost:9530'){ | 19 | if( host == 'localhost:9528' || host == '8.130.38.56:8027' || host == 'localhost:9529'|| host == 'localhost:9530'){ |
| 20 | // 其他情况的默认值 | 20 | // 其他情况的默认值 |
| 21 | // PREFIX = 'http://8.130.38.56:8027/business-server'; | 21 | // PREFIX = 'http://8.130.38.56:8027/business-server'; |
| 22 | - PREFIX = 'https://jy.scjysm.asia:18086/cdwlMall/business-server'; | ||
| 23 | - // PREFIX = 'http://128.10.250.186:9004'; | 22 | + // PREFIX = 'https://jy.scjysm.asia:18086/cdwlMall/business-server'; |
| 23 | + PREFIX = 'http://128.10.249.48:9004'; | ||
| 24 | }else{ | 24 | }else{ |
| 25 | // PREFIX = '/merchant-business'; | 25 | // PREFIX = '/merchant-business'; |
| 26 | // PREFIX = 'http://8.130.38.56:9004'; | 26 | // PREFIX = 'http://8.130.38.56:9004'; |
merchant-web-master/src/utils/request2.js
| @@ -20,8 +20,8 @@ let PREFIX; | @@ -20,8 +20,8 @@ let PREFIX; | ||
| 20 | // 其他情况的默认值 | 20 | // 其他情况的默认值 |
| 21 | // PREFIX = 'http://8.130.38.56:8027/business-server'; | 21 | // PREFIX = 'http://8.130.38.56:8027/business-server'; |
| 22 | // PREFIX = 'https://jy.scjysm.asia:18086/merchant-business'; | 22 | // PREFIX = 'https://jy.scjysm.asia:18086/merchant-business'; |
| 23 | - PREFIX = 'https://jy.scjysm.asia:18086/cdwlMall/meserver/api'; | ||
| 24 | - // PREFIX = 'http://128.10.250.186:9007'; | 23 | + // PREFIX = 'https://jy.scjysm.asia:18086/cdwlMall/meserver/api'; |
| 24 | + PREFIX = 'http://128.10.249.48:9007'; | ||
| 25 | }else{ | 25 | }else{ |
| 26 | // PREFIX = '/merchant-business'; | 26 | // PREFIX = '/merchant-business'; |
| 27 | // PREFIX = 'http://8.130.38.56:9004'; | 27 | // PREFIX = 'http://8.130.38.56:9004'; |
merchant-web-master/src/views/order/aftersale/afterDetails.vue
| @@ -510,6 +510,7 @@ export default { | @@ -510,6 +510,7 @@ export default { | ||
| 510 | } | 510 | } |
| 511 | } else if (index === 3) { | 511 | } else if (index === 3) { |
| 512 | this.title = '确认收货且退款' | 512 | this.title = '确认收货且退款' |
| 513 | + | ||
| 513 | const res = await refundToShop ({ | 514 | const res = await refundToShop ({ |
| 514 | parentFormid: this.order.subOrderId, | 515 | parentFormid: this.order.subOrderId, |
| 515 | orderFormid: this.order.subOrderId, | 516 | orderFormid: this.order.subOrderId, |
| @@ -541,6 +542,7 @@ export default { | @@ -541,6 +542,7 @@ export default { | ||
| 541 | this.$emit('childMessage',false) | 542 | this.$emit('childMessage',false) |
| 542 | } | 543 | } |
| 543 | } else if (index === 5) { | 544 | } else if (index === 5) { |
| 545 | + | ||
| 544 | const res = await refundToShop ({ | 546 | const res = await refundToShop ({ |
| 545 | parentFormid: this.order.subOrderId, | 547 | parentFormid: this.order.subOrderId, |
| 546 | orderFormid: this.order.subOrderId, | 548 | orderFormid: this.order.subOrderId, |