refactor: format value before peview
This commit is contained in:
parent
226da5ccfe
commit
53c7764f06
1 changed files with 18 additions and 1 deletions
|
|
@ -653,12 +653,29 @@ async function searchEmployee(text: string) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function storeDataLocal() {
|
function storeDataLocal() {
|
||||||
|
quotationFormData.value.productServiceList = productServiceList.value;
|
||||||
|
|
||||||
localStorage.setItem(
|
localStorage.setItem(
|
||||||
'quotation-preview',
|
'quotation-preview',
|
||||||
JSON.stringify({
|
JSON.stringify({
|
||||||
data: quotationFormData.value,
|
data: quotationFormData.value,
|
||||||
meta: {
|
meta: {
|
||||||
source: quotationFormState.value.source,
|
source: {
|
||||||
|
...quotationFormState.value.source,
|
||||||
|
code:
|
||||||
|
quotationFormState.value.mode === 'create'
|
||||||
|
? '-'
|
||||||
|
: quotationFormState.value?.source?.code,
|
||||||
|
createAt:
|
||||||
|
quotationFormState.value.mode === 'create'
|
||||||
|
? Date.now()
|
||||||
|
: quotationFormState.value?.source?.createdAt,
|
||||||
|
createBy: quotationFormState.value?.source?.createdBy,
|
||||||
|
payCondition: quotationFormData.value.payCondition,
|
||||||
|
contactName: quotationFormData.value.contactName,
|
||||||
|
contactTel: quotationFormData.value.contactTel,
|
||||||
|
workName: quotationFormData.value.workName,
|
||||||
|
},
|
||||||
createdBy: quotationFormState.value.createdBy('tha'),
|
createdBy: quotationFormState.value.createdBy('tha'),
|
||||||
},
|
},
|
||||||
}),
|
}),
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue