From 581d9d1b20c75735cc21f04f3648a7f264708884 Mon Sep 17 00:00:00 2001 From: eddie <1150970484@qq.com> Date: Tue, 10 Dec 2024 22:20:51 +0800 Subject: [PATCH] update export doc --- .../products/Print/AgencyContract_v1120.jsx | 53 ++++++++++--------- 1 file changed, 27 insertions(+), 26 deletions(-) diff --git a/src/views/products/Print/AgencyContract_v1120.jsx b/src/views/products/Print/AgencyContract_v1120.jsx index 2f4b613..8f792d2 100644 --- a/src/views/products/Print/AgencyContract_v1120.jsx +++ b/src/views/products/Print/AgencyContract_v1120.jsx @@ -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: [