包价路线,全年的价格无需展示时间

main
eddie 7 months ago
parent b7f3f2ae14
commit 563a744629

@ -827,6 +827,8 @@ export default class AgencyContract {
const { chunk, sizeSets, SSRange, PSRange } = chunkBy(use_year, withExtras, ['quote_season'])
//
const [remarkItem] = this.#remarkList.filter((i) => i.product_type_id == '7')
// console.log(chunk,chunk.filter(i => i.info.city_name.includes("")));
const extraCol = (rowp, i) => {
return new TableCell({
borders: tableBorderOne,
@ -867,18 +869,16 @@ export default class AgencyContract {
: `${firstQ.group_size_min}-${firstQ.group_size_max}人,`
return new Paragraph({
children: [
// new TextRun({ text: `${extra.info.product_title} ${firstQ.unit_name}`, bold: true }),
new TextRun({
text:
`${sizeStr} ${firstQ.unit_name}, ${firstQ.adult_cost}` +
// + (`, ${firstQ.group_size_min}-${firstQ.group_size_max}`)
(compactBy !== 'dates' ? `, ${date1}~${date2}${otherStr}` : ''),
}),
],
})
})
return ac.concat([thisE, ...thisP])
// return new Paragraph({ text: `${extra.info.product_title} ${extra.quotation?.[0]?.adult_cost || ''} ${extra.quotation?.[0]?.unit_name || ''}` });
}, []),
],
})
@ -1236,14 +1236,7 @@ export default class AgencyContract {
...subItems.reduce((acc, quoteItem, index) => {
const start = dayjs(quoteItem.use_dates_start).format('M-D').replace('-', '.')
const end = dayjs(quoteItem.use_dates_end).format('M-D').replace('-', '.')
// new Paragraph({
// alignment: AlignmentType.CENTER,
// text: isEmpty(quoteItem)
// ? ''
// : quoteItem.use_dates_start != firstDayOfYear || quoteItem.use_dates_end != lastDayOfYear
// ? `(${start}-${end})`
// : '',
// }),
return acc.concat(
...[
new Paragraph({
@ -1254,28 +1247,17 @@ export default class AgencyContract {
? `${quoteItem.group_size_min}-${quoteItem.group_size_max}人,${quoteItem.unit_name}, ${quoteItem.adult_cost}`
: `${quoteItem.adult_cost}`,
}),
new Paragraph({
alignment: AlignmentType.CENTER,
text: isEmpty(quoteItem)
? ''
: quoteItem.use_dates_start != firstDayOfYear || quoteItem.use_dates_end != lastDayOfYear
? `(${start}-${end})`
: '',
}),
...(quoteItem.use_dates_start != firstDayOfYear && quoteItem.use_dates_end != lastDayOfYear
? [
new Paragraph({
alignment: AlignmentType.CENTER,
text: `(${start}-${end})`,
}),
]
: []),
],
)
}, []),
// ...((withSeason ? rowp.quote_chunk?.['SS']?.[ss] : rowp.quote_chunk[ss]) || []).map(
// (quoteItem, ii) =>
// new Paragraph({
// alignment: AlignmentType.CENTER,
// text: isEmpty(quoteItem)
// ? ''
// : withSize && String(quoteItem.unit_id) !== defaultUnit
// ? `${quoteItem.group_size_min}-${quoteItem.group_size_max},${quoteItem.unit_name}, ${quoteItem.adult_cost}`
// : `${quoteItem.adult_cost}`,
// }),
// ),
],
})
}),

Loading…
Cancel
Save