|
|
@@ -371,7 +371,7 @@
|
|
|
<template slot-scope="scope">
|
|
|
<el-link
|
|
|
type="primary"
|
|
|
- @click="$refs.orderDetail.show(scope.row)">
|
|
|
+ @click="showOrderDetail(scope.row)">
|
|
|
详情
|
|
|
</el-link>
|
|
|
<el-link
|
|
|
@@ -380,12 +380,6 @@
|
|
|
@click="checkOrder(scope.row)">
|
|
|
核销
|
|
|
</el-link>
|
|
|
- <!-- <el-link
|
|
|
- type="primary"
|
|
|
- v-if="scope.row.status !== 'CANCELED'"
|
|
|
- @click="$refs.orderDetail.show(scope.row)">
|
|
|
- 撤销核销
|
|
|
- </el-link> -->
|
|
|
<el-link
|
|
|
type="primary"
|
|
|
v-if="scope.row.status !== 'CANCELED'"
|
|
|
@@ -810,7 +804,7 @@
|
|
|
<el-dialog
|
|
|
title="修改"
|
|
|
:visible.sync="editOrderDialogVisible"
|
|
|
- width="80%"
|
|
|
+ mini-height="500"
|
|
|
@close="cancelEdit">
|
|
|
<el-form
|
|
|
class="searchBox"
|
|
|
@@ -836,6 +830,13 @@
|
|
|
</el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
+ <el-form-item
|
|
|
+ v-if="editOrderInfo.updateType === 'updateOrderPayChannel'"
|
|
|
+ label="原支付方式"
|
|
|
+ prop="payChannel"
|
|
|
+ >
|
|
|
+ {{ currentOrder.payChannel }}
|
|
|
+ </el-form-item>
|
|
|
<el-form-item
|
|
|
v-if="editOrderInfo.updateType === 'updateOrderPayChannel'"
|
|
|
label="支付方式"
|
|
|
@@ -854,6 +855,12 @@
|
|
|
:label="val"></el-radio>
|
|
|
</el-radio-group>
|
|
|
</el-form-item>
|
|
|
+ <el-form-item
|
|
|
+ v-if="editOrderInfo.updateType === 'updatePlayDate'"
|
|
|
+ label="原游玩时间"
|
|
|
+ prop="playDateBegin">
|
|
|
+ {{ currentOrder.playDateBegin || currentOrder.playDateEnd ? `${currentOrder.playDateBegin || ''} - ${currentOrder.playDateEnd || ''}` : "无限制" }}
|
|
|
+ </el-form-item>
|
|
|
<el-form-item
|
|
|
v-if="editOrderInfo.updateType === 'updatePlayDate'"
|
|
|
label="起始时间"
|
|
|
@@ -875,7 +882,7 @@
|
|
|
placeholder="选择日期时间">
|
|
|
</el-date-picker>
|
|
|
</el-form-item>
|
|
|
- <el-form-item
|
|
|
+ <!-- <el-form-item
|
|
|
v-if="editOrderInfo.updateType === 'updateScenicTimes'"
|
|
|
label="检票次数"
|
|
|
prop="checkLimitTimes"
|
|
|
@@ -888,7 +895,41 @@
|
|
|
<i class="el-icon-info"></i>
|
|
|
-1代表不限制 如果当前景点为群组景点 该次数为群组景点的检票次数总和
|
|
|
</div>
|
|
|
- </el-form-item>
|
|
|
+ </el-form-item> -->
|
|
|
+ <div class="tableBox" v-if="editOrderInfo.updateType === 'updateScenicTimes'">
|
|
|
+ <div class="tips">
|
|
|
+ <i class="el-icon-info"></i>
|
|
|
+ -1代表不限制 如果当前景点为群组景点 该次数为群组景点的检票次数总和
|
|
|
+ </div>
|
|
|
+ <el-table
|
|
|
+ border
|
|
|
+ stripe
|
|
|
+ height="500"
|
|
|
+ :data="editOrderInfo.ticketCheckScenicUpdateRequestList">
|
|
|
+ <el-table-column
|
|
|
+ label="景点"
|
|
|
+ prop="scenicName"
|
|
|
+ min-width="90">
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ label="已检票次数"
|
|
|
+ prop="checkedTimes"
|
|
|
+ min-width="90">
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ label="当前景点的限制检票次数"
|
|
|
+ min-width="90">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-input-number
|
|
|
+ controls-position="right"
|
|
|
+ :min="-1"
|
|
|
+ :precision="0"
|
|
|
+ v-model="scope.row.checkLimitTimes"
|
|
|
+ ></el-input-number>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ </div>
|
|
|
</el-form>
|
|
|
<span slot="footer">
|
|
|
<el-button @click="cancelEdit">取消</el-button>
|
|
|
@@ -902,7 +943,7 @@
|
|
|
|
|
|
<script>
|
|
|
/* eslint-disable no-unused-vars */
|
|
|
-import { apiOrderList, pickInvoice, getInvoice, cancelOrder, checkTickets, updateOrder, getSaleChannelList } from '@/api/order'
|
|
|
+import { apiOrderList, pickInvoice, getInvoice, cancelOrder, checkTickets, updateOrder, getSaleChannelList, getSingleOrder } from '@/api/order'
|
|
|
import { orderStatusDic, ticketStatusDic, channelList, papersType, orderCategories } from '@/assets/staticData'
|
|
|
import { getPayStatus } from '@/utils/index'
|
|
|
import Ellipsis from '@/components/Ellipsis'
|
|
|
@@ -910,6 +951,7 @@ import moment from 'moment'
|
|
|
import { payPOS } from '@/api/pay'
|
|
|
import { getSelf } from '@/api/systemSetting/account'
|
|
|
import { getSystemConfigList } from '@/api/systemConfig'
|
|
|
+import { get } from 'core-js/core/dict'
|
|
|
|
|
|
const Store = require('electron-store')
|
|
|
const localStore = new Store()
|
|
|
@@ -1026,7 +1068,8 @@ export default {
|
|
|
playDateEnd: '',
|
|
|
checkLimitTimes: 0,
|
|
|
ticketCheckScenicUpdateRequestList: []
|
|
|
- }
|
|
|
+ },
|
|
|
+ orderDetailMap: new Map()
|
|
|
}
|
|
|
},
|
|
|
filters: {
|
|
|
@@ -1183,17 +1226,6 @@ export default {
|
|
|
// const list = []
|
|
|
res.data.records.forEach(item => {
|
|
|
let ticketsName = []
|
|
|
- // item.ticketList.forEach(i => {
|
|
|
- // if (ticketsName.indexOf(i.ticketTypeName) < 0) {
|
|
|
- // ticketsName.push(i.ticketTypeName)
|
|
|
- // }
|
|
|
- // // list.push({
|
|
|
- // // ...i,
|
|
|
- // // ...item,
|
|
|
- // // ticketStatus: i.status,
|
|
|
- // // ticketsName: ticketsName.join(',')
|
|
|
- // // })
|
|
|
- // })
|
|
|
item.ticketsName = ticketsName.join(',')
|
|
|
})
|
|
|
|
|
|
@@ -1216,9 +1248,18 @@ export default {
|
|
|
return prev + item.peopleNum
|
|
|
}, 0)
|
|
|
},
|
|
|
- refundOrder (order) {
|
|
|
+ async getOrderDetail (order) {
|
|
|
+ if (this.orderDetailMap.get(order.id)) {
|
|
|
+ this.currentOrder = this.orderDetailMap.get(order.id)
|
|
|
+ } else {
|
|
|
+ const res = await getSingleOrder(order.id)
|
|
|
+ this.currentOrder = res?.data || order
|
|
|
+ this.orderDetailMap.set(order.id, this.currentOrder)
|
|
|
+ }
|
|
|
+ },
|
|
|
+ async refundOrder (order) {
|
|
|
+ await this.getOrderDetail(order)
|
|
|
this.refundOrderDialogVisible = true
|
|
|
- this.currentOrder = order
|
|
|
this.refundOrderInfo.orderId = order.id
|
|
|
},
|
|
|
submitRefundOrder () {
|
|
|
@@ -1249,10 +1290,14 @@ export default {
|
|
|
})
|
|
|
})
|
|
|
},
|
|
|
+ async showOrderDetail (order) {
|
|
|
+ await this.getOrderDetail(order)
|
|
|
+ this.$refs.orderDetail.show(this.currentOrder)
|
|
|
+ },
|
|
|
// 核销
|
|
|
- checkOrder (order) {
|
|
|
+ async checkOrder (order) {
|
|
|
+ await this.getOrderDetail(order)
|
|
|
this.checkOrderDialogVisible = true
|
|
|
- this.currentOrder = order
|
|
|
this.checkOrderInfo.orderId = order.id
|
|
|
},
|
|
|
submitCheckOrder () {
|
|
|
@@ -1279,12 +1324,18 @@ export default {
|
|
|
})
|
|
|
},
|
|
|
// 修改
|
|
|
- editOrder (order) {
|
|
|
+ async editOrder (order) {
|
|
|
+ await this.getOrderDetail(order)
|
|
|
this.editOrderDialogVisible = true
|
|
|
this.editOrderInfo.orderId = order.id
|
|
|
this.editOrderInfo.payChannel = order.payChannel
|
|
|
this.editOrderInfo.playDateBegin = order.playDateBegin
|
|
|
this.editOrderInfo.playDateEnd = order.playDateEnd
|
|
|
+
|
|
|
+ this.editOrderInfo.ticketCheckScenicUpdateRequestList = []
|
|
|
+ this.currentOrder.ticketList.forEach(v => {
|
|
|
+ this.editOrderInfo.ticketCheckScenicUpdateRequestList.push(...v.ticketCheckScenicList)
|
|
|
+ })
|
|
|
},
|
|
|
cancelEdit () {
|
|
|
this.editOrderDialogVisible = false
|
|
|
@@ -1309,12 +1360,9 @@ export default {
|
|
|
return this.$message.error('请选择游玩日期')
|
|
|
}
|
|
|
|
|
|
- this.editOrderInfo.ticketCheckScenicUpdateRequestList = this.multipleSelection.map(v => {
|
|
|
- return {
|
|
|
- id: v.id,
|
|
|
- checkLimitTimes: this.editOrderInfo.checkLimitTimes
|
|
|
- }
|
|
|
- })
|
|
|
+ if (this.editOrderInfo.updateType !== 'updateScenicTimes') {
|
|
|
+ this.editOrderInfo.ticketCheckScenicUpdateRequestList = []
|
|
|
+ }
|
|
|
|
|
|
updateOrder(this.editOrderInfo).then(res => {
|
|
|
if (res.code === '999999') {
|
|
|
@@ -1330,6 +1378,8 @@ export default {
|
|
|
}
|
|
|
</script>
|
|
|
|
|
|
-<style scoped>
|
|
|
-
|
|
|
+<style lang="scss">
|
|
|
+.el-dialog__body {
|
|
|
+ min-height: 300px;
|
|
|
+}
|
|
|
</style>
|