diff --git a/openhis-ui-vue3/src/views/doctorstation/components/prescription/prescriptionlist.vue b/openhis-ui-vue3/src/views/doctorstation/components/prescription/prescriptionlist.vue index 78fd7913..d95303da 100644 --- a/openhis-ui-vue3/src/views/doctorstation/components/prescription/prescriptionlist.vue +++ b/openhis-ui-vue3/src/views/doctorstation/components/prescription/prescriptionlist.vue @@ -125,7 +125,7 @@ v-model="scope.row.executeNum" controls-position="right" :controls="false" - :ref="(el) => (inputRefs.executeNum = el)" + :ref="(el) => { if (!inputRefs[scope.$index]) inputRefs[scope.$index] = {}; inputRefs[scope.$index].executeNum = el; }" @keyup.enter.prevent="handleEnter('executeNum', scope.row, scope.$index)" style="width: 70px; margin-right: 20px" /> @@ -160,7 +160,7 @@ controls-position="right" :controls="false" style="width: 70px; margin-right: 20px" - :ref="(el) => (inputRefs.doseQuantity = el)" + :ref="(el) => { if (!inputRefs[scope.$index]) inputRefs[scope.$index] = {}; inputRefs[scope.$index].doseQuantity = el; }" @input="convertValues(scope.row, scope.$index)" @keyup.enter.prevent="handleEnter('doseQuantity', scope.row, scope.$index)" /> @@ -191,7 +191,7 @@ controls-position="right" :controls="false" style="width: 70px; margin: 0 20px" - :ref="(el) => (inputRefs.dose = el)" + :ref="(el) => { if (!inputRefs[scope.$index]) inputRefs[scope.$index] = {}; inputRefs[scope.$index].dose = el; }" @input="convertDoseValues(scope.row, scope.$index)" @keyup.enter.prevent="handleEnter('dose', scope.row, scope.$index)" /> @@ -223,10 +223,10 @@ placeholder="给药途径" clearable filterable - :ref="(el) => (inputRefs.methodCode = el)" + :ref="(el) => { if (!inputRefs[scope.$index]) inputRefs[scope.$index] = {}; inputRefs[scope.$index].methodCode = el; }" @keyup.enter.prevent=" () => { - inputRefs.methodCode.blur(); + inputRefs[scope.$index]?.methodCode?.blur(); } " @visible-change=" @@ -258,7 +258,7 @@ filterable @keyup.enter.prevent=" () => { - inputRefs.rateCode.blur(); + inputRefs[scope.$index]?.rateCode?.blur(); } " @change="calculateTotalAmount(scope.row, scope.$index)" @@ -269,7 +269,7 @@ } } " - :ref="(el) => (inputRefs.rateCode = el)" + :ref="(el) => { if (!inputRefs[scope.$index]) inputRefs[scope.$index] = {}; inputRefs[scope.$index].rateCode = el; }" > @@ -426,7 +426,7 @@ v-model="scope.row.executeNum" controls-position="right" :controls="false" - :ref="(el) => (inputRefs.executeNum = el)" + :ref="(el) => { if (!inputRefs[scope.$index]) inputRefs[scope.$index] = {}; inputRefs[scope.$index].executeNum = el; }" @keyup.enter.prevent="handleEnter('executeNum', scope.row, scope.$index)" style="width: 70px; margin-right: 20px" /> @@ -461,7 +461,7 @@ controls-position="right" :controls="false" style="width: 70px; margin-right: 20px" - :ref="(el) => (inputRefs.doseQuantity = el)" + :ref="(el) => { if (!inputRefs[scope.$index]) inputRefs[scope.$index] = {}; inputRefs[scope.$index].doseQuantity = el; }" @input="convertValues(scope.row, scope.$index)" @keyup.enter.prevent="handleEnter('doseQuantity', scope.row, scope.$index)" /> @@ -492,7 +492,7 @@ controls-position="right" :controls="false" style="width: 70px; margin: 0 20px" - :ref="(el) => (inputRefs.dose = el)" + :ref="(el) => { if (!inputRefs[scope.$index]) inputRefs[scope.$index] = {}; inputRefs[scope.$index].dose = el; }" @input="convertDoseValues(scope.row, scope.$index)" @keyup.enter.prevent="handleEnter('dose', scope.row, scope.$index)" /> @@ -524,10 +524,10 @@ placeholder="给药途径" clearable filterable - :ref="(el) => (inputRefs.methodCode = el)" + :ref="(el) => { if (!inputRefs[scope.$index]) inputRefs[scope.$index] = {}; inputRefs[scope.$index].methodCode = el; }" @keyup.enter.prevent=" () => { - inputRefs.methodCode.blur(); + inputRefs[scope.$index]?.methodCode?.blur(); } " @visible-change=" @@ -559,7 +559,7 @@ filterable @keyup.enter.prevent=" () => { - inputRefs.rateCode.blur(); + inputRefs[scope.$index]?.rateCode?.blur(); } " @change="calculateTotalAmount(scope.row, scope.$index)" @@ -570,7 +570,7 @@ } } " - :ref="(el) => (inputRefs.rateCode = el)" + :ref="(el) => { if (!inputRefs[scope.$index]) inputRefs[scope.$index] = {}; inputRefs[scope.$index].rateCode = el; }" > @@ -873,7 +873,7 @@