This commit is contained in:
Surya Paolo
2024-01-16 09:05:10 +01:00
parent c8a4be65c1
commit 2005b8cb56
3 changed files with 41 additions and 6 deletions

View File

@@ -43,6 +43,8 @@ export default defineComponent({
const myrec = ref(<any[string]>[])
const oldrec = ref(<any[string]>[])
const note = ref('')
const note_per_gestore = ref('')
const note_per_admin = ref('')
const endload = ref(false)
const recOrderCart = ref(<IOrderCart>{})
@@ -86,7 +88,7 @@ export default defineComponent({
}
function change_field(fieldname: string) {
if (myrec.value[fieldname] !== oldrec.value[fieldname]) {
if ((!oldrec.value.hasOwnProperty(fieldname)) || (myrec.value[fieldname] !== oldrec.value[fieldname])) {
myrec.value[fieldname] = oldrec.value[fieldname]
const mydata = {
@@ -129,6 +131,8 @@ export default defineComponent({
if (recOrderCart.value) {
oldrec.value = myrec.value
note.value = recOrderCart.value.note!
note_per_gestore.value = recOrderCart.value.note_per_gestore!
note_per_admin.value = recOrderCart.value.note_per_admin!
}
allTotalPrice.value = recOrderCart.value.totalPrice
endload.value = true
@@ -254,6 +258,8 @@ export default defineComponent({
changeTotalPrice,
updateTotalPrice,
myTotalPriceCalc,
note_per_gestore,
note_per_admin,
}
}
})