feat: convert to template string
This commit is contained in:
parent
2e5194c576
commit
1c94bd9eb9
1 changed files with 19 additions and 3 deletions
|
|
@ -106,6 +106,12 @@ function getHeight(el: HTMLElement) {
|
|||
|
||||
const STORAGE_KEY = 'task-order-preview';
|
||||
|
||||
const taskListGroup = ref<
|
||||
{
|
||||
product: RequestWork['productService']['product'];
|
||||
list: (RequestWork & { _status: TaskStatus })[];
|
||||
}[]
|
||||
>([]);
|
||||
onMounted(async () => {
|
||||
if (route.params['id'] && typeof route.params['id'] === 'string') {
|
||||
viewType.value = route.name as 'docOrder' | 'docReceive';
|
||||
|
|
@ -133,7 +139,7 @@ onMounted(async () => {
|
|||
branch.value = jsonObject.registeredBranch;
|
||||
}
|
||||
|
||||
const taskListGroup = data.value?.taskList.reduce<
|
||||
const _taskListGroup = data.value?.taskList.reduce<
|
||||
{
|
||||
product: RequestWork['productService']['product'];
|
||||
list: (RequestWork & { _status: TaskStatus })[];
|
||||
|
|
@ -173,7 +179,8 @@ onMounted(async () => {
|
|||
}, []);
|
||||
|
||||
product.value = [];
|
||||
summaryPrice.value = taskListGroup
|
||||
taskListGroup.value = _taskListGroup;
|
||||
summaryPrice.value = _taskListGroup
|
||||
.flatMap((v) => {
|
||||
const list =
|
||||
(viewType.value === 'docReceive'
|
||||
|
|
@ -432,7 +439,16 @@ function print() {
|
|||
class="border-5 surface-0 detail-note q-mb-md"
|
||||
style="width: 100%; padding: 8px 16px; white-space: pre-wrap"
|
||||
>
|
||||
<div v-html="convertTemplate(data?.remark || '', {}) || '-'"></div>
|
||||
<div
|
||||
v-html="
|
||||
convertTemplate(data?.remark || '', {
|
||||
'order-detail': {
|
||||
items: taskListGroup,
|
||||
itemsDiscount: data.taskProduct || [],
|
||||
},
|
||||
}) || '-'
|
||||
"
|
||||
></div>
|
||||
</div>
|
||||
|
||||
<ViewFooter
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue