- Cataloghi: parte finale... prima bozza 9 dic
This commit is contained in:
@@ -468,7 +468,7 @@ export default defineComponent({
|
||||
|
||||
try {
|
||||
|
||||
// console.log('mounted', 'isFieldDb()', myrow.value)
|
||||
console.log('mounted', 'isFieldDb()', myrow.value, 'sub', props.subfield, 'field', props.field)
|
||||
if (isFieldDb() && !props.isrec) {
|
||||
// console.log(' . none...')
|
||||
} else {
|
||||
@@ -480,8 +480,13 @@ export default defineComponent({
|
||||
myvalue.value = myrow.value[props.field][props.subfield]
|
||||
}
|
||||
} else {
|
||||
let miorecord = myrow.value
|
||||
if (props.table === 'arrvariazioni') {
|
||||
miorecord = myrow.value.arrvariazioni[0]
|
||||
}
|
||||
|
||||
if (props.field !== '')
|
||||
myvalue.value = myrow.value[props.field]
|
||||
myvalue.value = miorecord[props.field]
|
||||
else {
|
||||
// @ts-ignore
|
||||
myvalue.value = myrow.value
|
||||
@@ -578,7 +583,7 @@ export default defineComponent({
|
||||
return myval
|
||||
}*/
|
||||
|
||||
function SaveValueInt(newVal: any, valinitial: any) {
|
||||
async function SaveValueInt(newVal: any, valinitial: any) {
|
||||
|
||||
console.log('SaveValueInt', newVal, valinitial)
|
||||
|
||||
@@ -603,7 +608,7 @@ export default defineComponent({
|
||||
console.log('newVal', newVal)
|
||||
|
||||
if (isFieldDb()) {
|
||||
savefield(newVal, valinitial, $q)
|
||||
await savefield(newVal, valinitial, $q)
|
||||
} else {
|
||||
// Update value in table memory
|
||||
if (props.subfield !== '') {
|
||||
@@ -627,10 +632,10 @@ export default defineComponent({
|
||||
}
|
||||
|
||||
|
||||
function savefield(value: any, initialval: any, myq: any) {
|
||||
async function savefield(value: any, initialval: any, myq: any) {
|
||||
if (!props.insertMode) {
|
||||
myvalue.value = value
|
||||
tools.saveInDBForTypes(myq, props.field, myvalue.value, props.type, props.serv, props.table, props.subfield, props.id, props.indrec, props.mysubsubkey, props.specialField)
|
||||
return tools.saveInDBForTypes(myq, props.field, myvalue.value, props.type, props.serv, props.table, props.subfield, props.id, props.indrec, props.mysubsubkey, props.specialField)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user