|
|
@@ -390,6 +390,12 @@
|
|
|
@click="editOrder(scope.row)">
|
|
|
修改
|
|
|
</el-link>
|
|
|
+ <el-link
|
|
|
+ type="primary"
|
|
|
+ v-if="scope.row.status !== 'CANCELED'"
|
|
|
+ @click="printOrder(scope.row)">
|
|
|
+ 网络取票
|
|
|
+ </el-link>
|
|
|
<br>
|
|
|
<el-link
|
|
|
type="primary"
|
|
|
@@ -896,6 +902,77 @@
|
|
|
@click="submitSecondPrint">确定</el-button>
|
|
|
</span>
|
|
|
</el-dialog>
|
|
|
+ <el-dialog
|
|
|
+ title="网络取票"
|
|
|
+ :visible.sync="printOrderDialogVisible"
|
|
|
+ width="80%"
|
|
|
+ @close="printOrderDialogVisible=false">
|
|
|
+ <el-table
|
|
|
+ border
|
|
|
+ :data="currentOrder.ticketList"
|
|
|
+ @selection-change="handleSelectionChange">
|
|
|
+ <el-table-column
|
|
|
+ type="selection"
|
|
|
+ :selectable="selectable"
|
|
|
+ width="55">
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="ticketNo" label="票号"> </el-table-column>
|
|
|
+ <el-table-column prop="ticketTypeName" label="票种"> </el-table-column>
|
|
|
+ <el-table-column prop="guestName" label="游客姓名">
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="guestPhone" label="游客手机号">
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="guestIdentifyType" label="证件类型">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ {{ papersType[scope.row.guestIdentifyType] }}
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="guestIdentify" label="证件号码">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ {{ scope.row.guestIdentify }}
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+
|
|
|
+ <el-table-column width="100" prop="checkNum" label="检票人数">
|
|
|
+ </el-table-column>
|
|
|
+
|
|
|
+ <el-table-column width="100" prop="payDateBegin" label="游玩时间">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ {{ scope.row.playDateBegin || scope.row.playDateEnd ? `${scope.row.playDateBegin || ''} - ${scope.row.playDateEnd || ''}` : "无限制" }}
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column width="80" label="取票状态">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-tag :type="scope.row.isPrint ? 'success' : 'info'">
|
|
|
+ {{ scope.row.isPrint ? "已取票" : "未取票" }}
|
|
|
+ </el-tag>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column width="80" label="状态">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <OrderStatusTag :value="scope.row.status"></OrderStatusTag>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column width="80" prop="price" label="小计">
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column width="80" label="检票景点">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-button
|
|
|
+ v-if="scope.row.ticketListScenic"
|
|
|
+ @click="showDetail(scope.row)"
|
|
|
+ >
|
|
|
+ 明细
|
|
|
+ </el-button>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ <span slot="footer">
|
|
|
+ <el-button @click="printOrderDialogVisible = false">取消</el-button>
|
|
|
+ <el-button
|
|
|
+ type="primary"
|
|
|
+ @click="submitPrintOrder">确定</el-button>
|
|
|
+ </span>
|
|
|
+ </el-dialog>
|
|
|
<el-dialog
|
|
|
title="修改"
|
|
|
:visible.sync="editOrderDialogVisible"
|
|
|
@@ -952,9 +1029,23 @@
|
|
|
</el-form-item>
|
|
|
<el-form-item
|
|
|
v-if="editOrderInfo.updateType === 'updatePlayDate'"
|
|
|
- label="原游玩时间"
|
|
|
+ label="选择门票"
|
|
|
prop="playDateBegin">
|
|
|
- {{ currentOrder.playDateBegin || currentOrder.playDateEnd ? `${currentOrder.playDateBegin || ''} - ${currentOrder.playDateEnd || ''}` : "无限制" }}
|
|
|
+ <el-select
|
|
|
+ v-model="editOrderInfo.ticketIds"
|
|
|
+ multiple>
|
|
|
+ <el-option
|
|
|
+ v-for="item in currentOrder.ticketList"
|
|
|
+ :key="item.id"
|
|
|
+ :label="item.ticketNo"
|
|
|
+ :value="item.id">
|
|
|
+ <span style="">{{ item.ticketNo }}</span>-
|
|
|
+ <span style="color: #8492a6; font-size: 13px">{{ item.ticketTypeName }}</span>
|
|
|
+ (<span style="color: #849822; font-size: 13px">
|
|
|
+ {{ item.playDateBegin || item.playDateEnd ? `${item.playDateBegin || ''} - ${item.playDateEnd || ''}` : "无限制" }}
|
|
|
+ </span>)
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
</el-form-item>
|
|
|
<el-form-item
|
|
|
v-if="editOrderInfo.updateType === 'updatePlayDate'"
|
|
|
@@ -977,20 +1068,6 @@
|
|
|
placeholder="选择日期时间">
|
|
|
</el-date-picker>
|
|
|
</el-form-item>
|
|
|
- <!-- <el-form-item
|
|
|
- v-if="editOrderInfo.updateType === 'updateScenicTimes'"
|
|
|
- label="检票次数"
|
|
|
- prop="checkLimitTimes"
|
|
|
- >
|
|
|
- <el-input-number
|
|
|
- v-model="editOrderInfo.checkLimitTimes"
|
|
|
- :min="-1"
|
|
|
- ></el-input-number>
|
|
|
- <div class="tips">
|
|
|
- <i class="el-icon-info"></i>
|
|
|
- -1代表不限制 如果当前景点为群组景点 该次数为群组景点的检票次数总和
|
|
|
- </div>
|
|
|
- </el-form-item> -->
|
|
|
<div class="tableBox" v-if="editOrderInfo.updateType === 'updateScenicTimes'">
|
|
|
<div class="tips">
|
|
|
<i class="el-icon-info"></i>
|
|
|
@@ -1000,19 +1077,39 @@
|
|
|
border
|
|
|
stripe
|
|
|
height="500"
|
|
|
- :data="editOrderInfo.ticketCheckScenicUpdateRequestList">
|
|
|
- <el-table-column
|
|
|
- label="景点"
|
|
|
- prop="scenicName"
|
|
|
- min-width="90">
|
|
|
+ :data="editOrderInfo.ticketList">
|
|
|
+ <el-table-column type="expand">
|
|
|
+ <template slot-scope="props">
|
|
|
+ <div class="title">检票景点明细</div>
|
|
|
+ <el-table :data="props.row.ticketCheckScenicList" :max-height="200">
|
|
|
+ <el-table-column
|
|
|
+ prop="scenicName"
|
|
|
+ label="景点"
|
|
|
+ ></el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ prop="checkLimitTimes"
|
|
|
+ label="可检票次数"
|
|
|
+ >
|
|
|
+ <template slot-scope="scope">
|
|
|
+ {{ scope.row.checkLimitTimes === -1 ? "无限制" : scope.row.checkLimitTimes }}
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ prop="checkedTimes"
|
|
|
+ label="已检票次数"
|
|
|
+ ></el-table-column>
|
|
|
+ </el-table>
|
|
|
+ </template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column
|
|
|
- label="已检票次数"
|
|
|
- prop="checkedTimes"
|
|
|
- min-width="90">
|
|
|
+ <el-table-column width="160" prop="ticketNo" label="票号"> </el-table-column>
|
|
|
+ <el-table-column width="100" prop="ticketTypeName" label="票种"> </el-table-column>
|
|
|
+ <el-table-column min-width="180" label="检票景点">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ {{ scope.row.ticketCheckScenicList.map(item => item.scenicName).join(',') }}
|
|
|
+ </template>
|
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
|
- label="当前景点的限制检票次数"
|
|
|
+ label="景点的限制检票次数"
|
|
|
min-width="90">
|
|
|
<template slot-scope="scope">
|
|
|
<el-input-number
|
|
|
@@ -1038,7 +1135,7 @@
|
|
|
|
|
|
<script>
|
|
|
/* eslint-disable no-unused-vars */
|
|
|
-import { apiOrderList, pickInvoice, getInvoice, cancelOrder, reprintTicket, checkTickets, updateOrder, getSaleChannelList, getSingleOrder } from '@/api/order'
|
|
|
+import { apiOrderList, pickInvoice, getInvoice, cancelOrder, reprintTicket, checkTickets, updateOrder, getSaleChannelList, getSingleOrder, printTickets } from '@/api/order'
|
|
|
import { orderStatusDic, ticketStatusDic, channelList, papersType, orderCategories } from '@/assets/staticData'
|
|
|
import { getPayStatus } from '@/utils/index'
|
|
|
// import Ellipsis from '@/components/Ellipsis'
|
|
|
@@ -1155,6 +1252,7 @@ export default {
|
|
|
orderId: '',
|
|
|
ticketIdList: []
|
|
|
},
|
|
|
+ printOrderDialogVisible: false,
|
|
|
secondPrintDialogVisible: false,
|
|
|
secondPrintInfo: {
|
|
|
orderId: '',
|
|
|
@@ -1172,7 +1270,8 @@ export default {
|
|
|
payChannel: '',
|
|
|
playDateBegin: '',
|
|
|
playDateEnd: '',
|
|
|
- checkLimitTimes: 0,
|
|
|
+ ticketIds: [],
|
|
|
+ ticketList: [],
|
|
|
ticketCheckScenicUpdateRequestList: []
|
|
|
}
|
|
|
}
|
|
|
@@ -1372,7 +1471,7 @@ export default {
|
|
|
},
|
|
|
submitRefundOrder () {
|
|
|
if (!this.multipleSelection?.length) {
|
|
|
- return this.$message.error('请选择退单门票')
|
|
|
+ return this.$message.error('请选择门票')
|
|
|
}
|
|
|
|
|
|
this.refundOrderInfo.ticketCancelRequestList = this.multipleSelection.map(v => {
|
|
|
@@ -1389,10 +1488,10 @@ export default {
|
|
|
}).then(() => {
|
|
|
cancelOrder(this.refundOrderInfo).then(res => {
|
|
|
if (res.code === '999999') {
|
|
|
- this.$message.warning(res.msg || '退单失败')
|
|
|
+ this.$message.warning(res.msg || '操作失败')
|
|
|
return
|
|
|
}
|
|
|
- this.$message.success('退单成功')
|
|
|
+ this.$message.success('操作成功')
|
|
|
this.refundOrderDialogVisible = false
|
|
|
this.getOrderList()
|
|
|
})
|
|
|
@@ -1400,7 +1499,7 @@ export default {
|
|
|
},
|
|
|
submitSecondPrint () {
|
|
|
if (!this.multipleSelection?.length) {
|
|
|
- return this.$message.error('请选择打印门票')
|
|
|
+ return this.$message.error('请选印门票')
|
|
|
}
|
|
|
|
|
|
this.secondPrintInfo.ticketIdList = this.multipleSelection.map(v => v.id)
|
|
|
@@ -1412,10 +1511,10 @@ export default {
|
|
|
}).then(() => {
|
|
|
reprintTicket(this.secondPrintInfo).then(res => {
|
|
|
if (res.code === '999999') {
|
|
|
- this.$message.warning(res.msg || '打印失败')
|
|
|
+ this.$message.warning(res.msg || '操作失败')
|
|
|
return
|
|
|
}
|
|
|
- this.$message.success('打印成功')
|
|
|
+ this.$message.success('操作成功')
|
|
|
this.secondPrintDialogVisible = false
|
|
|
this.getOrderList()
|
|
|
})
|
|
|
@@ -1433,7 +1532,7 @@ export default {
|
|
|
},
|
|
|
submitCheckOrder () {
|
|
|
if (!this.multipleSelection?.length) {
|
|
|
- return this.$message.error('请选择核销门票')
|
|
|
+ return this.$message.error('请选择门票')
|
|
|
}
|
|
|
|
|
|
this.checkOrderInfo.ticketIdList = this.multipleSelection.map(v => v.id)
|
|
|
@@ -1445,10 +1544,37 @@ export default {
|
|
|
}).then(() => {
|
|
|
checkTickets(this.checkOrderInfo).then(res => {
|
|
|
if (res.code === '999999') {
|
|
|
- this.$message.warning(res.msg || '核销失败')
|
|
|
+ this.$message.warning(res.msg || '操作失败')
|
|
|
+ return
|
|
|
+ }
|
|
|
+ this.$message.success('操作成功')
|
|
|
+ this.checkOrderDialogVisible = false
|
|
|
+ this.getOrderList()
|
|
|
+ })
|
|
|
+ })
|
|
|
+ },
|
|
|
+ async printOrder (order) {
|
|
|
+ await this.getOrderDetail(order)
|
|
|
+ this.printOrderDialogVisible = true
|
|
|
+ },
|
|
|
+ submitPrintOrder () {
|
|
|
+ if (!this.multipleSelection?.length) {
|
|
|
+ return this.$message.error('请选择门票')
|
|
|
+ }
|
|
|
+
|
|
|
+ const ticketIdList = this.multipleSelection.map(v => v.id)
|
|
|
+
|
|
|
+ this.$confirm('确定要网络取票吗?', '提示', {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ type: 'warning'
|
|
|
+ }).then(() => {
|
|
|
+ printTickets(ticketIdList).then(res => {
|
|
|
+ if (res.code === '999999') {
|
|
|
+ this.$message.warning(res.msg || '操作失败')
|
|
|
return
|
|
|
}
|
|
|
- this.$message.success('核销成功')
|
|
|
+ this.$message.success('操作成功')
|
|
|
this.checkOrderDialogVisible = false
|
|
|
this.getOrderList()
|
|
|
})
|
|
|
@@ -1464,8 +1590,13 @@ export default {
|
|
|
this.editOrderInfo.playDateEnd = order.playDateEnd
|
|
|
|
|
|
this.editOrderInfo.ticketCheckScenicUpdateRequestList = []
|
|
|
+ this.editOrderInfo.ticketList = []
|
|
|
this.currentOrder.ticketList.forEach(v => {
|
|
|
- this.editOrderInfo.ticketCheckScenicUpdateRequestList.push(...v.ticketCheckScenicList)
|
|
|
+ this.editOrderInfo.ticketList.push({
|
|
|
+ ...v,
|
|
|
+ checkLimitTimes: -1 // 默认不限制
|
|
|
+ })
|
|
|
+ // this.editOrderInfo.ticketCheckScenicUpdateRequestList.push(...v.ticketCheckScenicList)
|
|
|
})
|
|
|
},
|
|
|
cancelEdit () {
|
|
|
@@ -1476,7 +1607,8 @@ export default {
|
|
|
payChannel: '',
|
|
|
playDateBegin: '',
|
|
|
playDateEnd: '',
|
|
|
- checkLimitTimes: 0,
|
|
|
+ ticketIds: [],
|
|
|
+ ticketList: [],
|
|
|
ticketCheckScenicUpdateRequestList: []
|
|
|
}
|
|
|
},
|
|
|
@@ -1491,8 +1623,19 @@ export default {
|
|
|
return this.$message.error('请选择游玩日期')
|
|
|
}
|
|
|
|
|
|
- if (this.editOrderInfo.updateType !== 'updateScenicTimes') {
|
|
|
- this.editOrderInfo.ticketCheckScenicUpdateRequestList = []
|
|
|
+ this.editOrderInfo.ticketCheckScenicUpdateRequestList = []
|
|
|
+
|
|
|
+ if (this.editOrderInfo.updateType === 'updateScenicTimes') {
|
|
|
+ this.editOrderInfo.ticketIds = this.editOrderInfo.ticketList.map(item => item.id)
|
|
|
+ this.editOrderInfo.ticketList.forEach(item => {
|
|
|
+ item.ticketCheckScenicList.forEach(scenic => {
|
|
|
+ this.editOrderInfo.ticketCheckScenicUpdateRequestList.push({
|
|
|
+ id: scenic.id,
|
|
|
+ checkedTimes: scenic.checkedTimes,
|
|
|
+ checkLimitTimes: item.checkLimitTimes
|
|
|
+ })
|
|
|
+ })
|
|
|
+ })
|
|
|
}
|
|
|
|
|
|
updateOrder(this.editOrderInfo).then(res => {
|