diff --git a/src/views/products/Print/AgencyContract_v1120.jsx b/src/views/products/Print/AgencyContract_v1120.jsx index d88d112..2f4b613 100644 --- a/src/views/products/Print/AgencyContract_v1120.jsx +++ b/src/views/products/Print/AgencyContract_v1120.jsx @@ -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}`, - // }), - // ), ], }) }),