|
|
|
@ -59,6 +59,18 @@ const tableBorderInnerB = {
|
|
|
|
|
left: { style: BorderStyle.NONE, space: 0, size: 6, color: 'auto' },
|
|
|
|
|
right: { style: BorderStyle.NONE, space: 0, size: 6, color: 'auto' },
|
|
|
|
|
}
|
|
|
|
|
const tableBorderInnerDashB = {
|
|
|
|
|
top: { style: BorderStyle.NONE, space: 0, size: 6, color: 'auto' },
|
|
|
|
|
bottom: { style: BorderStyle.DASHED, space: 0, size: 6, color: 'auto' },
|
|
|
|
|
left: { style: BorderStyle.NONE, space: 0, size: 6, color: 'auto' },
|
|
|
|
|
right: { style: BorderStyle.NONE, space: 0, size: 6, color: 'auto' },
|
|
|
|
|
}
|
|
|
|
|
const tableBorderInnerT = {
|
|
|
|
|
top: { style: BorderStyle.INSET, space: 0, size: 6, color: 'auto' },
|
|
|
|
|
bottom: { style: BorderStyle.NONE, space: 0, size: 6, color: 'auto' },
|
|
|
|
|
left: { style: BorderStyle.NONE, space: 0, size: 6, color: 'auto' },
|
|
|
|
|
right: { style: BorderStyle.NONE, space: 0, size: 6, color: 'auto' },
|
|
|
|
|
}
|
|
|
|
|
const tableBorderInnerR = {
|
|
|
|
|
top: { style: BorderStyle.NONE, space: 0, size: 6, color: 'auto' },
|
|
|
|
|
bottom: { style: BorderStyle.NONE, space: 0, size: 6, color: 'auto' },
|
|
|
|
@ -290,14 +302,14 @@ export default class AgencyContract {
|
|
|
|
|
}),
|
|
|
|
|
...this.createTable_R(use_year, agencyProducts['R']),
|
|
|
|
|
]),
|
|
|
|
|
...(isEmpty(agencyProducts['8'])
|
|
|
|
|
? []
|
|
|
|
|
: [
|
|
|
|
|
this.createSubHeading(`附加项目(元/团,部分价格为元/人单独注明)`, {
|
|
|
|
|
numbering: { reference: 'products-type', level: 0 },
|
|
|
|
|
}),
|
|
|
|
|
...this.createTable_8(use_year, agencyProducts['8']),
|
|
|
|
|
]),
|
|
|
|
|
// ...(isEmpty(agencyProducts['8'])
|
|
|
|
|
// ? []
|
|
|
|
|
// : [
|
|
|
|
|
// this.createSubHeading(`附加项目(元/团,部分价格为元/人单独注明)`, {
|
|
|
|
|
// numbering: { reference: 'products-type', level: 0 },
|
|
|
|
|
// }),
|
|
|
|
|
// ...this.createTable_8(use_year, agencyProducts['8']),
|
|
|
|
|
// ]),
|
|
|
|
|
...(isEmpty(agencyProducts['D'])
|
|
|
|
|
? []
|
|
|
|
|
: [
|
|
|
|
@ -1126,7 +1138,7 @@ export default class AgencyContract {
|
|
|
|
|
borders: ti !== arrt.length - 1 ? tableBorderInnerB : tableBorderNone,
|
|
|
|
|
children: [
|
|
|
|
|
new TableCell({
|
|
|
|
|
borders: ti !== arrt.length - 1 ? tableBorderInner : tableBorderInnerR,
|
|
|
|
|
borders: tableBorderInner,
|
|
|
|
|
width: { size: 2000, type: WidthType.DXA },
|
|
|
|
|
verticalAlign: AlignmentType.CENTER,
|
|
|
|
|
children: [
|
|
|
|
@ -1137,7 +1149,7 @@ export default class AgencyContract {
|
|
|
|
|
],
|
|
|
|
|
}),
|
|
|
|
|
new TableCell({
|
|
|
|
|
borders: ti !== arrt.length - 1 ? tableBorderInner : tableBorderInnerR,
|
|
|
|
|
borders: tableBorderInner,
|
|
|
|
|
width: { size: 1000, type: WidthType.DXA },
|
|
|
|
|
verticalAlign: AlignmentType.CENTER,
|
|
|
|
|
children: [
|
|
|
|
@ -1148,7 +1160,7 @@ export default class AgencyContract {
|
|
|
|
|
],
|
|
|
|
|
}),
|
|
|
|
|
new TableCell({
|
|
|
|
|
borders: ti !== arrt.length - 1 ? tableBorderInnerB : tableBorderNone,
|
|
|
|
|
borders: tableBorderInnerB,
|
|
|
|
|
width: { size: 2400, type: WidthType.DXA },
|
|
|
|
|
verticalAlign: AlignmentType.CENTER,
|
|
|
|
|
children: [
|
|
|
|
@ -1170,15 +1182,78 @@ export default class AgencyContract {
|
|
|
|
|
borders: tableBorderOne,
|
|
|
|
|
verticalAlign: AlignmentType.LEFT,
|
|
|
|
|
children: (agencyExtras[row.info?.id] || []).map(
|
|
|
|
|
(extra) =>
|
|
|
|
|
new Paragraph({
|
|
|
|
|
children: [
|
|
|
|
|
new TextRun({
|
|
|
|
|
text: `${extra.info.product_title}-${extra.info.product_type_name_txt}`,
|
|
|
|
|
bold: true,
|
|
|
|
|
(extra, ti, arrt) =>
|
|
|
|
|
new Table({
|
|
|
|
|
borders: tableBorderNone,
|
|
|
|
|
width: {
|
|
|
|
|
size: 100,
|
|
|
|
|
type: WidthType.PERCENTAGE,
|
|
|
|
|
},
|
|
|
|
|
rows: [
|
|
|
|
|
new TableRow({
|
|
|
|
|
// borders: tableBorderInnerB,
|
|
|
|
|
children: [
|
|
|
|
|
new TableCell({
|
|
|
|
|
borders: ti === 0 ? tableBorderNone : tableBorderInnerT, // tableBorderInnerB,
|
|
|
|
|
// width: { size: 2000, type: WidthType.DXA },
|
|
|
|
|
verticalAlign: AlignmentType.CENTER,
|
|
|
|
|
columnSpan: 3,
|
|
|
|
|
children: [
|
|
|
|
|
new Paragraph({
|
|
|
|
|
children: [
|
|
|
|
|
new TextRun({
|
|
|
|
|
text: `${extra.info.product_title}-${extra.info.product_type_name_txt}`,
|
|
|
|
|
bold: true,
|
|
|
|
|
}),
|
|
|
|
|
],
|
|
|
|
|
})
|
|
|
|
|
]
|
|
|
|
|
}),
|
|
|
|
|
],
|
|
|
|
|
}),
|
|
|
|
|
...(extra.info.product_type_id !== '8' ? [] : (extra.quotation || []).map(
|
|
|
|
|
(quoteItem, ii, _arr) =>
|
|
|
|
|
new TableRow({
|
|
|
|
|
borders: ti !== arrt.length - 1 ? tableBorderInnerB : tableBorderNone,
|
|
|
|
|
children: [
|
|
|
|
|
new TableCell({
|
|
|
|
|
borders: tableBorderInner,
|
|
|
|
|
width: { size: 2000, type: WidthType.DXA },
|
|
|
|
|
verticalAlign: AlignmentType.CENTER,
|
|
|
|
|
children: [
|
|
|
|
|
new Paragraph({
|
|
|
|
|
text: `${formatGroupSize(quoteItem.group_size_min, quoteItem.group_size_max, true)}`,
|
|
|
|
|
alignment: AlignmentType.LEFT,
|
|
|
|
|
}),
|
|
|
|
|
],
|
|
|
|
|
}),
|
|
|
|
|
new TableCell({
|
|
|
|
|
borders: tableBorderInner,
|
|
|
|
|
width: { size: 1000, type: WidthType.DXA },
|
|
|
|
|
verticalAlign: AlignmentType.CENTER,
|
|
|
|
|
children: [
|
|
|
|
|
new Paragraph({
|
|
|
|
|
text: `${quoteItem.unit_name}`,
|
|
|
|
|
alignment: AlignmentType.LEFT,
|
|
|
|
|
}),
|
|
|
|
|
],
|
|
|
|
|
}),
|
|
|
|
|
new TableCell({
|
|
|
|
|
borders: tableBorderInnerB,
|
|
|
|
|
width: { size: 2400, type: WidthType.DXA },
|
|
|
|
|
verticalAlign: AlignmentType.CENTER,
|
|
|
|
|
children: [
|
|
|
|
|
new Paragraph({
|
|
|
|
|
text: `${quoteItem.adult_cost}`,
|
|
|
|
|
alignment: AlignmentType.CENTER,
|
|
|
|
|
}),
|
|
|
|
|
],
|
|
|
|
|
}),
|
|
|
|
|
],
|
|
|
|
|
})
|
|
|
|
|
))
|
|
|
|
|
],
|
|
|
|
|
}),
|
|
|
|
|
],
|
|
|
|
|
})
|
|
|
|
|
),
|
|
|
|
|
}),
|
|
|
|
|
],
|
|
|
|
|