|
|
@@ -433,11 +433,11 @@
|
|
|
label="游客信息"
|
|
|
prop="guestName">
|
|
|
</el-table-column>
|
|
|
- <el-table-column
|
|
|
+ <!-- <el-table-column
|
|
|
width="80"
|
|
|
label="使用状态"
|
|
|
prop="ticketStatus">
|
|
|
- </el-table-column>
|
|
|
+ </el-table-column> -->
|
|
|
<el-table-column
|
|
|
width="80"
|
|
|
label="总价(¥)"
|
|
|
@@ -492,7 +492,8 @@
|
|
|
</el-link>
|
|
|
<el-link
|
|
|
type="primary"
|
|
|
- @click="$refs.orderDetail.show(scope.row)">
|
|
|
+ v-if="scope.row.status !== 'CANCELED'"
|
|
|
+ @click="refundOrder(scope.row)">
|
|
|
退单
|
|
|
</el-link>
|
|
|
<el-link
|
|
|
@@ -753,12 +754,99 @@
|
|
|
@click="submitPickInvoice">确定</el-button>
|
|
|
</span>
|
|
|
</el-dialog>
|
|
|
+ <el-dialog
|
|
|
+ title="退单"
|
|
|
+ :visible.sync="refundOrderDialogVisible"
|
|
|
+ width="80%"
|
|
|
+ @close="refundOrderDialogVisible=false">
|
|
|
+ <div style="margin: 20px">
|
|
|
+ <el-checkbox label="强制取消" v-model="refundOrderInfo.force"></el-checkbox>
|
|
|
+ </div>
|
|
|
+ <!-- <div class="">
|
|
|
+ <div class="tag">退票金额</div>
|
|
|
+ <el-input-number
|
|
|
+ v-model="refundOrderInfo.cancelPrice"
|
|
|
+ :min="0"
|
|
|
+ :precision="0.01"></el-input-number>
|
|
|
+ </div> -->
|
|
|
+ <el-table
|
|
|
+ border
|
|
|
+ :data="currentOrder.ticketList"
|
|
|
+ @selection-change="handleSelectionChange">
|
|
|
+ <el-table-column
|
|
|
+ type="selection"
|
|
|
+ :selectable="selectable"
|
|
|
+ width="55">
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column width="80" label="序号" prop="id">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ {{ scope.row.id.toString().padStart(8, "0") }}
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="ticketNo" label="票号"> </el-table-column>
|
|
|
+
|
|
|
+ <el-table-column prop="tname" 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.payDateBegin || "无限制" }}
|
|
|
+ </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.ticketListcenic"
|
|
|
+ @click="showDetail(scope.row)"
|
|
|
+ >
|
|
|
+ 明细
|
|
|
+ </el-button>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ <span slot="footer">
|
|
|
+ <el-button @click="refundOrderDialogVisible = false">取消</el-button>
|
|
|
+ <el-button
|
|
|
+ type="primary"
|
|
|
+ @click="submitRefundOrder">确定</el-button>
|
|
|
+ </span>
|
|
|
+ </el-dialog>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
/* eslint-disable no-unused-vars */
|
|
|
-import { apiOrderList, pickInvoice, getInvoice } from '@/api/order'
|
|
|
+import { apiOrderList, pickInvoice, getInvoice, cancelOrder } from '@/api/order'
|
|
|
import { orderStatusDic, channelList, papersType } from '@/assets/staticData'
|
|
|
import { getPayStatus } from '@/utils/index'
|
|
|
|
|
|
@@ -854,7 +942,13 @@ export default {
|
|
|
currentOrder: {},
|
|
|
multipleSelection: [],
|
|
|
order_tag_list: [],
|
|
|
- visible: false
|
|
|
+ visible: false,
|
|
|
+ refundOrderDialogVisible: false,
|
|
|
+ refundOrderInfo: {
|
|
|
+ force: true,
|
|
|
+ orderId: '',
|
|
|
+ ticketCancelRequestList: []
|
|
|
+ }
|
|
|
}
|
|
|
},
|
|
|
filters: {
|
|
|
@@ -1029,6 +1123,39 @@ export default {
|
|
|
return list.reduce((prev, item) => {
|
|
|
return prev + item.peopleNum
|
|
|
}, 0)
|
|
|
+ },
|
|
|
+ refundOrder (order) {
|
|
|
+ this.refundOrderDialogVisible = true
|
|
|
+ this.currentOrder = order
|
|
|
+ this.refundOrderInfo.orderId = order.id
|
|
|
+ },
|
|
|
+ submitRefundOrder () {
|
|
|
+ if (!this.multipleSelection?.length) {
|
|
|
+ return this.$message.error('请选择退单门票')
|
|
|
+ }
|
|
|
+
|
|
|
+ this.refundOrderInfo.ticketCancelRequestList = this.multipleSelection.map(v => {
|
|
|
+ return {
|
|
|
+ ticketId: v.id,
|
|
|
+ cancelPrice: v.price
|
|
|
+ }
|
|
|
+ })
|
|
|
+
|
|
|
+ this.$confirm('确定要退单吗?', '提示', {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ type: 'warning'
|
|
|
+ }).then(() => {
|
|
|
+ cancelOrder(this.refundOrderInfo).then(res => {
|
|
|
+ if (res.code === '999999') {
|
|
|
+ this.$message.warning(res.msg || '退单失败')
|
|
|
+ return
|
|
|
+ }
|
|
|
+ this.$message.success('退单成功')
|
|
|
+ this.refundOrderDialogVisible = false
|
|
|
+ this.getOrderList()
|
|
|
+ })
|
|
|
+ })
|
|
|
}
|
|
|
}
|
|
|
}
|