diff --git a/src/views/outpatient/index.vue b/src/views/outpatient/index.vue index 5a79abf..45473de 100644 --- a/src/views/outpatient/index.vue +++ b/src/views/outpatient/index.vue @@ -124,7 +124,7 @@ const edit=()=>{ }) } // 使用 watch 监听 goodsList 和 itemList 的变化 -watch([()=>goodsList.value, itemList], ([newGoodsList, newItemList]) => { +watch([()=>goodsList.value, itemList,status], ([newGoodsList, newItemList,newStatus]) => { const pharmaceuticalTotalAmount = newItemList.reduce((pre: any, cur: any) => { return pre + cur.unitPrice }, 0); @@ -133,7 +133,9 @@ watch([()=>goodsList.value, itemList], ([newGoodsList, newItemList]) => { return pre + cur.selectNum * cur.selectedPrice }, 0); totalAmount.value = pharmaceuticalTotalAmount + serviceTotalAmount; - console.log(serviceTotalAmount) + if (newStatus) { + registerId.value='' + } }, {deep: true});