|
|
@@ -589,6 +589,19 @@
|
|
|
</el-radio>
|
|
|
</el-form-item>
|
|
|
|
|
|
+ <el-form-item
|
|
|
+ label="绑定打印模板"
|
|
|
+ prop="printTemplateId">
|
|
|
+ <el-select v-model="form.printTemplateId" placeholder="请选择打印模板">
|
|
|
+ <el-option
|
|
|
+ v-for="item in printTemplateList"
|
|
|
+ :key="item.id"
|
|
|
+ :value="item.id"
|
|
|
+ :label="item.name">
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+
|
|
|
<template v-if="form.category === 'batch' && dialogType !== 'add'">
|
|
|
<div class="block-title">
|
|
|
时间场次
|
|
|
@@ -773,7 +786,7 @@
|
|
|
<el-select
|
|
|
v-model="scope.row.scenicId">
|
|
|
<el-option
|
|
|
- v-for="item in scenicList"
|
|
|
+ v-for="item in localScenicList"
|
|
|
:key="item.id"
|
|
|
:label="item.name"
|
|
|
:value="item.id"
|
|
|
@@ -842,7 +855,7 @@
|
|
|
v-model="scope.row.scenicId"
|
|
|
multiple>
|
|
|
<el-option
|
|
|
- v-for="item in scenicList"
|
|
|
+ v-for="item in localScenicList"
|
|
|
:key="item.id"
|
|
|
:label="item.name"
|
|
|
:value="item.id"
|
|
|
@@ -1074,7 +1087,7 @@
|
|
|
<el-select
|
|
|
v-model="scope.row.scenicId">
|
|
|
<el-option
|
|
|
- v-for="item in scenicList"
|
|
|
+ v-for="item in localScenicList"
|
|
|
:key="item.id"
|
|
|
:label="item.name"
|
|
|
:value="item.id"
|
|
|
@@ -1190,9 +1203,10 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import { addTicket, updateTicket, queueList, batchUpdateTicketBatch, delTicketBatch } from '@/api/ticketType'
|
|
|
+import { addTicket, updateTicket, queueList, batchUpdateTicketBatch, delTicketBatch, getScenic } from '@/api/ticketType'
|
|
|
import { getGhSubMerchantList } from '@/api/payChannel'
|
|
|
import { getInvoiceSellerList } from '@/api/invoice'
|
|
|
+import { getTicketPrintModelList } from '@/api/printModal'
|
|
|
import { getLabelName } from '@/utils'
|
|
|
import { cloneDeep } from 'lodash'
|
|
|
import moment from 'moment'
|
|
|
@@ -1243,7 +1257,8 @@ const defaultForm = {
|
|
|
payGonghangTicketTypeMerchantList: [], // 工行子商户列表
|
|
|
ticketTypeInvoiceSellerList: [], // 发票销售方列表
|
|
|
ticketTypeScenicSplitRequests: [], // 子分账景点
|
|
|
- teamIndividual: 0 // 团散:0-不限 1-散客 2-团队
|
|
|
+ teamIndividual: 0, // 团散:0-不限 1-散客 2-团队
|
|
|
+ printTemplateId: null // 绑定打印模板ID
|
|
|
}
|
|
|
|
|
|
export default {
|
|
|
@@ -1287,6 +1302,7 @@ export default {
|
|
|
dialogType: 'add',
|
|
|
projectName: process.env.VUE_APP_PROJECT,
|
|
|
visible: false,
|
|
|
+ localScenicList: [],
|
|
|
pickerOptions: {
|
|
|
disabledDate: (theTime) => {
|
|
|
let startTime = moment().format('YYYY-MM-DD') + ' 00:00:00'
|
|
|
@@ -1318,7 +1334,8 @@ export default {
|
|
|
currGroupScenicInfo: [],
|
|
|
groupScenicMap: new Map(),
|
|
|
ghSubMerchantList: [], // 工行子商户列表
|
|
|
- invoiceSellerList: [] // 发票销售方列表
|
|
|
+ invoiceSellerList: [], // 发票销售方列表
|
|
|
+ printTemplateList: [] // 打印模板列表
|
|
|
}
|
|
|
},
|
|
|
watch: {
|
|
|
@@ -1343,7 +1360,10 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
- show (ticketItem, type) {
|
|
|
+ async show (ticketItem, type) {
|
|
|
+ // 每次打开时拉取最新景点列表
|
|
|
+ const res = await getScenic()
|
|
|
+ this.localScenicList = res?.data?.records || []
|
|
|
// this.reset()
|
|
|
this.ticketItem = ticketItem
|
|
|
this.dialogType = type
|
|
|
@@ -1437,6 +1457,7 @@ export default {
|
|
|
|
|
|
this.getGhSubMerchantList()
|
|
|
this.getInvoiceSellerList()
|
|
|
+ this.loadPrintTemplates()
|
|
|
|
|
|
this.visible = true
|
|
|
},
|
|
|
@@ -1450,6 +1471,13 @@ export default {
|
|
|
const res = await getInvoiceSellerList()
|
|
|
this.invoiceSellerList = res.data || []
|
|
|
},
|
|
|
+ async loadPrintTemplates () {
|
|
|
+ const res = await getTicketPrintModelList({ pageNum: 0, pageSize: -1 })
|
|
|
+ this.printTemplateList = res?.data?.records || []
|
|
|
+ if (this.printTemplateList.length > 0 && this.form.printTemplateId == null) {
|
|
|
+ this.form.printTemplateId = this.printTemplateList[0].id
|
|
|
+ }
|
|
|
+ },
|
|
|
updateDiscountRule: function () {
|
|
|
let man = parseInt(this.man)
|
|
|
let jian = parseInt(this.jian)
|
|
|
@@ -1547,7 +1575,7 @@ export default {
|
|
|
} else {
|
|
|
this.currGroupScenicInfo = []
|
|
|
item.scenicId.forEach(id => {
|
|
|
- const scene = this.scenicList.find((scene) => scene.id === id)
|
|
|
+ const scene = this.localScenicList.find((scene) => scene.id === id)
|
|
|
|
|
|
if (scene) {
|
|
|
this.currGroupScenicInfo.push({
|