|
@@ -57,6 +57,24 @@
|
|
|
</el-option>
|
|
</el-option>
|
|
|
</el-select>
|
|
</el-select>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
|
|
+ <el-form-item
|
|
|
|
|
+ label="分组筛选"
|
|
|
|
|
+ style="width:100%">
|
|
|
|
|
+ <el-checkbox-group
|
|
|
|
|
+ v-model="selectKeys"
|
|
|
|
|
+ :min="0"
|
|
|
|
|
+ :max="4">
|
|
|
|
|
+ <draggable :list="groupKeys">
|
|
|
|
|
+ <el-checkbox
|
|
|
|
|
+ :key="item.value"
|
|
|
|
|
+ :label="item.value"
|
|
|
|
|
+ v-for="(item) in groupKeys"
|
|
|
|
|
+ >
|
|
|
|
|
+ {{ item.label }}
|
|
|
|
|
+ </el-checkbox>
|
|
|
|
|
+ </draggable>
|
|
|
|
|
+ </el-checkbox-group>
|
|
|
|
|
+ </el-form-item>
|
|
|
</el-form>
|
|
</el-form>
|
|
|
<div class="btn-wrap">
|
|
<div class="btn-wrap">
|
|
|
<el-button
|
|
<el-button
|
|
@@ -78,7 +96,14 @@
|
|
|
:data="tableData"
|
|
:data="tableData"
|
|
|
stripe
|
|
stripe
|
|
|
row-class-name="is-center"
|
|
row-class-name="is-center"
|
|
|
- v-loading="loading">
|
|
|
|
|
|
|
+ v-loading="loading"
|
|
|
|
|
+ :span-method="objectSpanMethod">
|
|
|
|
|
+ <el-table-column
|
|
|
|
|
+ v-for="(item) in finalGroup"
|
|
|
|
|
+ :key="item.value"
|
|
|
|
|
+ :prop="item.prop || item.value"
|
|
|
|
|
+ :label="item.label">
|
|
|
|
|
+ </el-table-column>
|
|
|
<el-table-column
|
|
<el-table-column
|
|
|
prop="otaSourceName"
|
|
prop="otaSourceName"
|
|
|
label="订单渠道">
|
|
label="订单渠道">
|
|
@@ -103,26 +128,6 @@
|
|
|
prop="cancelPrice"
|
|
prop="cancelPrice"
|
|
|
label="退票金额">
|
|
label="退票金额">
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
- <!-- <el-table-column
|
|
|
|
|
- width="260"
|
|
|
|
|
- fixed="right"
|
|
|
|
|
- label="操作">
|
|
|
|
|
- <template slot-scope="scope">
|
|
|
|
|
- <el-button
|
|
|
|
|
- type="text"
|
|
|
|
|
- @click="showOrderInfo(scope.row)">订单详情</el-button>
|
|
|
|
|
- <el-button
|
|
|
|
|
- type="text"
|
|
|
|
|
- @click="$refs.ticketInfo.show(scope.row.tickets)">门票详情</el-button>
|
|
|
|
|
- <el-button
|
|
|
|
|
- type="text"
|
|
|
|
|
- @click="showGuestInfo(scope.row)">游客信息</el-button>
|
|
|
|
|
- <el-button
|
|
|
|
|
- type="text"
|
|
|
|
|
- v-if="checkRefundVisible(scope.row)&&canCancel"
|
|
|
|
|
- @click="showOrderInfo(scope.row,'cancel')">退订单</el-button>
|
|
|
|
|
- </template>
|
|
|
|
|
- </el-table-column> -->
|
|
|
|
|
</el-table>
|
|
</el-table>
|
|
|
<el-pagination
|
|
<el-pagination
|
|
|
background
|
|
background
|
|
@@ -165,6 +170,10 @@ import TicketInfo from './orderList/TicketInfo'
|
|
|
import { orderStatus } from '@/const'
|
|
import { orderStatus } from '@/const'
|
|
|
import moment from 'moment'
|
|
import moment from 'moment'
|
|
|
|
|
|
|
|
|
|
+const groupKeys = [
|
|
|
|
|
+ { value: 'orderDateDay', label: '日期' }
|
|
|
|
|
+]
|
|
|
|
|
+
|
|
|
export default {
|
|
export default {
|
|
|
name: 'salesReport',
|
|
name: 'salesReport',
|
|
|
components: {
|
|
components: {
|
|
@@ -175,6 +184,7 @@ export default {
|
|
|
},
|
|
},
|
|
|
data () {
|
|
data () {
|
|
|
return {
|
|
return {
|
|
|
|
|
+ groupKeys,
|
|
|
ticketTypeList: [],
|
|
ticketTypeList: [],
|
|
|
otaSourceList: [],
|
|
otaSourceList: [],
|
|
|
projectName: localStorage.getItem('otaProject'),
|
|
projectName: localStorage.getItem('otaProject'),
|
|
@@ -189,13 +199,26 @@ export default {
|
|
|
pageNum: 1,
|
|
pageNum: 1,
|
|
|
pageSize: 10
|
|
pageSize: 10
|
|
|
},
|
|
},
|
|
|
|
|
+ selectKeys: [],
|
|
|
|
|
+ finalGroup: [],
|
|
|
|
|
+ tableIndex: 1,
|
|
|
|
|
+ OrderIndexArr: [],
|
|
|
orderStatusDic: orderStatus,
|
|
orderStatusDic: orderStatus,
|
|
|
loading: false,
|
|
loading: false,
|
|
|
tableData: [],
|
|
tableData: [],
|
|
|
total: 0,
|
|
total: 0,
|
|
|
currentItem: {},
|
|
currentItem: {},
|
|
|
orderDialogVisible: false,
|
|
orderDialogVisible: false,
|
|
|
- guestDialogVisible: false
|
|
|
|
|
|
|
+ guestDialogVisible: false,
|
|
|
|
|
+ invoiceDialogVisible: false,
|
|
|
|
|
+ invoiceLoading: false,
|
|
|
|
|
+ invoiceTableData: [],
|
|
|
|
|
+ invoiceTotal: 0,
|
|
|
|
|
+ invoiceQuery: {
|
|
|
|
|
+ pageNum: 1,
|
|
|
|
|
+ pageSize: 10
|
|
|
|
|
+ },
|
|
|
|
|
+ currentInvoiceRow: {}
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
created () {
|
|
created () {
|
|
@@ -213,9 +236,15 @@ export default {
|
|
|
otaList () {
|
|
otaList () {
|
|
|
const list = JSON.parse(localStorage.getItem('otaList'))
|
|
const list = JSON.parse(localStorage.getItem('otaList'))
|
|
|
return this.projectName === 'YINXIANGMAZU' && !this.queryClear ? list.filter(item => item.otaSourceCode !== 'CLEARWX') : list
|
|
return this.projectName === 'YINXIANGMAZU' && !this.queryClear ? list.filter(item => item.otaSourceCode !== 'CLEARWX') : list
|
|
|
|
|
+ },
|
|
|
|
|
+ permissionList () {
|
|
|
|
|
+ return this.$store.state.user.menuList || []
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
|
|
+ hasPermission (key) {
|
|
|
|
|
+ return !!this.permissionList.some(item => item.code === key)
|
|
|
|
|
+ },
|
|
|
checkRefundVisible (item) {
|
|
checkRefundVisible (item) {
|
|
|
if (item.status !== 'CANCELED') return true
|
|
if (item.status !== 'CANCELED') return true
|
|
|
if (item.status === 'CANCELED') {
|
|
if (item.status === 'CANCELED') {
|
|
@@ -264,12 +293,44 @@ export default {
|
|
|
if (!this.form.otaSourceNameList) {
|
|
if (!this.form.otaSourceNameList) {
|
|
|
this.form.otaSourceNameList = []
|
|
this.form.otaSourceNameList = []
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+ this.finalGroup = this.groupKeys.filter(i => {
|
|
|
|
|
+ return this.selectKeys.includes(i.value)
|
|
|
|
|
+ })
|
|
|
|
|
+
|
|
|
|
|
+ this.form.groupByList = this.finalGroup.map(i => i.value)
|
|
|
|
|
+
|
|
|
this.loading = true
|
|
this.loading = true
|
|
|
getOrderCancelStatistics(this.form).then(res => {
|
|
getOrderCancelStatistics(this.form).then(res => {
|
|
|
this.tableData = res.data
|
|
this.tableData = res.data
|
|
|
this.loading = false
|
|
this.loading = false
|
|
|
})
|
|
})
|
|
|
},
|
|
},
|
|
|
|
|
+ objectSpanMethod ({ row, column, rowIndex, columnIndex }) {
|
|
|
|
|
+ if (columnIndex < this.finalGroup.length) {
|
|
|
|
|
+ if (!(this.OrderIndexArr[columnIndex] && this.OrderIndexArr[columnIndex].length)) return
|
|
|
|
|
+
|
|
|
|
|
+ for (let i = 0; i < this.OrderIndexArr[columnIndex].length; i++) {
|
|
|
|
|
+ let element = this.OrderIndexArr[columnIndex][i]
|
|
|
|
|
+ for (let j = 0; j < element.length; j++) {
|
|
|
|
|
+ let item = element[j]
|
|
|
|
|
+ if (rowIndex === item) {
|
|
|
|
|
+ if (j === 0) {
|
|
|
|
|
+ return {
|
|
|
|
|
+ rowspan: element.length,
|
|
|
|
|
+ colspan: 1
|
|
|
|
|
+ }
|
|
|
|
|
+ } else if (j !== 0) {
|
|
|
|
|
+ return {
|
|
|
|
|
+ rowspan: 0,
|
|
|
|
|
+ colspan: 0
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
showOrderInfo (item, type) {
|
|
showOrderInfo (item, type) {
|
|
|
if ((item.otaSourceCode === 'CLEARWX' || item.otaSourceCode === 'CLEARWXDEV') && type === 'cancel') return this.$message.info('自营平台订单请到自营后台办理退票')
|
|
if ((item.otaSourceCode === 'CLEARWX' || item.otaSourceCode === 'CLEARWXDEV') && type === 'cancel') return this.$message.info('自营平台订单请到自营后台办理退票')
|
|
|
this.currentItem = item
|
|
this.currentItem = item
|
|
@@ -280,6 +341,10 @@ export default {
|
|
|
this.currentItem = item
|
|
this.currentItem = item
|
|
|
this.guestDialogVisible = true
|
|
this.guestDialogVisible = true
|
|
|
},
|
|
},
|
|
|
|
|
+ formatInvoiceDetails (details) {
|
|
|
|
|
+ if (!details || !details.length) return ''
|
|
|
|
|
+ return details.map(item => item.ticketNo).filter(Boolean).join('、')
|
|
|
|
|
+ },
|
|
|
reportExport () {
|
|
reportExport () {
|
|
|
this.$confirm(`是否要导出明细数据`, '确认提示', {
|
|
this.$confirm(`是否要导出明细数据`, '确认提示', {
|
|
|
confirmButtonText: '是',
|
|
confirmButtonText: '是',
|