|
|
|
@ -828,7 +828,6 @@ export default class AgencyContract {
|
|
|
|
|
//当前表格的备注信息
|
|
|
|
|
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,
|
|
|
|
@ -847,38 +846,40 @@ export default class AgencyContract {
|
|
|
|
|
? `[${ExtraQuoteItem.group_size_min}.${ExtraQuoteItem.group_size_max}]`
|
|
|
|
|
: `${ExtraQuoteItem.use_dates_start},${ExtraQuoteItem.use_dates_end}`),
|
|
|
|
|
)
|
|
|
|
|
// console.log(compactQuotation);
|
|
|
|
|
|
|
|
|
|
const thisE = new Paragraph({
|
|
|
|
|
children: [
|
|
|
|
|
new TextRun({
|
|
|
|
|
text: `${extra.info.product_title}`,
|
|
|
|
|
text: `${extra.info.city_name}-${extra.info.product_title}-${extra.info.product_type_name}`,
|
|
|
|
|
bold: true,
|
|
|
|
|
}),
|
|
|
|
|
],
|
|
|
|
|
})
|
|
|
|
|
const thisP = Object.entries(compactQuotation).map(([key, [firstQ, ...others]]) => {
|
|
|
|
|
const date1 = shortDate(firstQ.use_dates_start)
|
|
|
|
|
const date2 = shortDate(firstQ.use_dates_end)
|
|
|
|
|
const othersDates = others
|
|
|
|
|
.map((oq) => `${shortDate(oq.use_dates_start)}~${shortDate(oq.use_dates_end)}`)
|
|
|
|
|
.join(', ')
|
|
|
|
|
const otherStr = isEmpty(othersDates) ? '' : `, ${othersDates}`
|
|
|
|
|
const sizeStr =
|
|
|
|
|
[0, 1].includes(firstQ.group_size_min) && firstQ.group_size_max === 1000
|
|
|
|
|
? '不分人等,'
|
|
|
|
|
: `${firstQ.group_size_min}-${firstQ.group_size_max}人,`
|
|
|
|
|
return new Paragraph({
|
|
|
|
|
children: [
|
|
|
|
|
new TextRun({
|
|
|
|
|
text:
|
|
|
|
|
`${sizeStr} ${firstQ.unit_name}, ${firstQ.adult_cost}` +
|
|
|
|
|
(compactBy !== 'dates' ? `, ${date1}~${date2}${otherStr}` : ''),
|
|
|
|
|
}),
|
|
|
|
|
],
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
return ac.concat([thisE, ...thisP])
|
|
|
|
|
// const thisP = Object.entries(compactQuotation).map(([key, [firstQ, ...others]]) => {
|
|
|
|
|
// const date1 = shortDate(firstQ.use_dates_start)
|
|
|
|
|
// const date2 = shortDate(firstQ.use_dates_end)
|
|
|
|
|
// const othersDates = others
|
|
|
|
|
// .map((oq) => `${shortDate(oq.use_dates_start)}~${shortDate(oq.use_dates_end)}`)
|
|
|
|
|
// .join(', ')
|
|
|
|
|
// const otherStr = isEmpty(othersDates) ? '' : `, ${othersDates}`
|
|
|
|
|
// const sizeStr =
|
|
|
|
|
// [0, 1].includes(firstQ.group_size_min) && firstQ.group_size_max === 1000
|
|
|
|
|
// ? '不分人等,'
|
|
|
|
|
// : `${firstQ.group_size_min}-${firstQ.group_size_max}人,`
|
|
|
|
|
// return new Paragraph({
|
|
|
|
|
// children: [
|
|
|
|
|
// new TextRun({
|
|
|
|
|
// text:
|
|
|
|
|
// `${sizeStr} ${firstQ.unit_name}, ${firstQ.adult_cost}` +
|
|
|
|
|
// (compactBy !== 'dates' ? `, ${date1}~${date2}${otherStr}` : ''),
|
|
|
|
|
// }),
|
|
|
|
|
// ],
|
|
|
|
|
// })
|
|
|
|
|
// })
|
|
|
|
|
|
|
|
|
|
// return ac.concat([thisE, ...thisP])
|
|
|
|
|
return ac.concat([thisE])
|
|
|
|
|
}, []),
|
|
|
|
|
],
|
|
|
|
|
})
|
|
|
|
@ -1361,7 +1362,7 @@ export default class AgencyContract {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
createDetailRowSeason2(rowp, ii, { withSize = true, defaultUnit = '0', extraCol = () => {} } = {}) {
|
|
|
|
|
// console.log(rowp)
|
|
|
|
|
console.log(rowp);
|
|
|
|
|
return [
|
|
|
|
|
new TableRow({
|
|
|
|
|
children: [
|
|
|
|
|