feat: add preview template text
This commit is contained in:
parent
9eca449031
commit
435d2ce4c8
3 changed files with 43 additions and 3 deletions
|
|
@ -86,6 +86,7 @@ import PaymentForm from './PaymentForm.vue';
|
|||
import { api } from 'src/boot/axios';
|
||||
import { RouterLink, useRoute } from 'vue-router';
|
||||
import { initLang, initTheme } from 'src/utils/ui';
|
||||
import { convertTemplate } from 'src/utils/string-template';
|
||||
|
||||
type Node = {
|
||||
[key: string]: any;
|
||||
|
|
@ -962,6 +963,7 @@ function storeDataLocal() {
|
|||
workName: quotationFormData.value.workName,
|
||||
dueDate: quotationFormData.value.dueDate,
|
||||
},
|
||||
selectedWorker: selectedWorker.value,
|
||||
createdBy: quotationFormState.value.createdBy('tha'),
|
||||
},
|
||||
}),
|
||||
|
|
@ -1525,8 +1527,25 @@ async function getWorkerFromCriteria(
|
|||
<div class="surface-1 q-pa-md full-width">
|
||||
<q-editor
|
||||
dense
|
||||
:readonly="readonly"
|
||||
:model-value="quotationFormData.remark || ''"
|
||||
:readonly="readonly || !pageState.remarkWrite"
|
||||
:model-value="
|
||||
!pageState.remarkWrite
|
||||
? convertTemplate(quotationFormData.remark || '', {
|
||||
'quotation-payment': {
|
||||
paymentType: quotationFormData.payCondition,
|
||||
amount: getPrice(productServiceList).finalPrice,
|
||||
installments: quotationFormData.paySplit,
|
||||
},
|
||||
'quotation-labor': {
|
||||
name: selectedWorker.map(
|
||||
(v, i) =>
|
||||
`${i + 1}. ` +
|
||||
`${v.namePrefix}. ${v.firstNameEN} ${v.lastNameEN}`.toUpperCase(),
|
||||
),
|
||||
},
|
||||
})
|
||||
: quotationFormData.remark || ''
|
||||
"
|
||||
min-height="5rem"
|
||||
class="full-width"
|
||||
:content-class="{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue