|
@@ -20,7 +20,7 @@
|
|
|
<el-option
|
|
<el-option
|
|
|
v-for="item in ticketTypeList"
|
|
v-for="item in ticketTypeList"
|
|
|
:key="item.id"
|
|
:key="item.id"
|
|
|
- :label="`${item.ticketTypeId}-${item.name}-${CategoryDict[item.category] || ''}`"
|
|
|
|
|
|
|
+ :label="getTicketTypeLabel(item)"
|
|
|
:value="item.ticketTypeId"></el-option>
|
|
:value="item.ticketTypeId"></el-option>
|
|
|
</el-select>
|
|
</el-select>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
@@ -604,7 +604,7 @@ export default {
|
|
|
},
|
|
},
|
|
|
// 判断是否是场次票
|
|
// 判断是否是场次票
|
|
|
isBatchTicket () {
|
|
isBatchTicket () {
|
|
|
- return this.currentTicketType.category === 'batch'
|
|
|
|
|
|
|
+ return this.currentTicketType.category === 'batch' || this.currentTicketType.category === 'ticket'
|
|
|
},
|
|
},
|
|
|
// 当前票种的场次列表
|
|
// 当前票种的场次列表
|
|
|
currentBatchConfigList () {
|
|
currentBatchConfigList () {
|
|
@@ -678,14 +678,26 @@ export default {
|
|
|
this.form.otaSourceIds = this.form.otaSourceId ? [this.form.otaSourceId] : []
|
|
this.form.otaSourceIds = this.form.otaSourceId ? [this.form.otaSourceId] : []
|
|
|
// 处理美团场次票数据回填
|
|
// 处理美团场次票数据回填
|
|
|
if (this.currentItem.mtProductLevelList && this.currentItem.mtProductLevelList.length > 0) {
|
|
if (this.currentItem.mtProductLevelList && this.currentItem.mtProductLevelList.length > 0) {
|
|
|
- this.form.mtProductLevelRequests = this.currentItem.mtProductLevelList.map(item => ({
|
|
|
|
|
- batchConfigId: item.batchConfigId,
|
|
|
|
|
- marketPrice: item.marketPrice,
|
|
|
|
|
- mtPrice: item.mtPrice,
|
|
|
|
|
- settlementPrice: item.settlementPrice,
|
|
|
|
|
- startDate: item.priceDate ? item.priceDate.split(' - ')[0] : '',
|
|
|
|
|
- endDate: item.priceDate ? item.priceDate.split(' - ')[1] : ''
|
|
|
|
|
- }))
|
|
|
|
|
|
|
+ this.form.mtProductLevelRequests = this.currentItem.mtProductLevelList.map(item => {
|
|
|
|
|
+ // priceDate 格式可能是 "2026-03-29~2027-03-29" 或 "2026-03-29 - 2027-03-29"
|
|
|
|
|
+ let startDate = ''
|
|
|
|
|
+ let endDate = ''
|
|
|
|
|
+ if (item.priceDate) {
|
|
|
|
|
+ // 兼容 ~ 和 - 两种分隔符
|
|
|
|
|
+ const separator = item.priceDate.includes('~') ? '~' : ' - '
|
|
|
|
|
+ const dates = item.priceDate.split(separator)
|
|
|
|
|
+ startDate = dates[0] ? dates[0].trim() : ''
|
|
|
|
|
+ endDate = dates[1] ? dates[1].trim() : ''
|
|
|
|
|
+ }
|
|
|
|
|
+ return {
|
|
|
|
|
+ batchConfigId: item.batchConfigId,
|
|
|
|
|
+ marketPrice: item.marketPrice,
|
|
|
|
|
+ mtPrice: item.mtPrice,
|
|
|
|
|
+ settlementPrice: item.settlementPrice,
|
|
|
|
|
+ startDate: startDate,
|
|
|
|
|
+ endDate: endDate
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
} else {
|
|
} else {
|
|
|
this.form.mtProductLevelRequests = []
|
|
this.form.mtProductLevelRequests = []
|
|
|
}
|
|
}
|
|
@@ -732,6 +744,17 @@ export default {
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
|
|
+ // 生成票种选项标签
|
|
|
|
|
+ getTicketTypeLabel (item) {
|
|
|
|
|
+ const category = this.CategoryDict[item.category] || ''
|
|
|
|
|
+ let label = `${item.ticketTypeId}-${item.name}-${category}`
|
|
|
|
|
+ // 只有场次票才显示场次信息
|
|
|
|
|
+ if (item.category === 'batch') {
|
|
|
|
|
+ const hasBatch = item.batchConfigList && item.batchConfigList.length > 0 ? '有场次' : '无场次'
|
|
|
|
|
+ label += `--${hasBatch}`
|
|
|
|
|
+ }
|
|
|
|
|
+ return label
|
|
|
|
|
+ },
|
|
|
getScenicList () {
|
|
getScenicList () {
|
|
|
getScenicList().then(res => {
|
|
getScenicList().then(res => {
|
|
|
this.scenicList = res.data || []
|
|
this.scenicList = res.data || []
|