dev
This commit is contained in:
parent
f86c13b301
commit
0d8e8932f0
|
|
@ -124,7 +124,7 @@ const edit=()=>{
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
// 使用 watch 监听 goodsList 和 itemList 的变化
|
// 使用 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) => {
|
const pharmaceuticalTotalAmount = newItemList.reduce((pre: any, cur: any) => {
|
||||||
return pre + cur.unitPrice
|
return pre + cur.unitPrice
|
||||||
}, 0);
|
}, 0);
|
||||||
|
|
@ -133,7 +133,9 @@ watch([()=>goodsList.value, itemList], ([newGoodsList, newItemList]) => {
|
||||||
return pre + cur.selectNum * cur.selectedPrice
|
return pre + cur.selectNum * cur.selectedPrice
|
||||||
}, 0);
|
}, 0);
|
||||||
totalAmount.value = pharmaceuticalTotalAmount + serviceTotalAmount;
|
totalAmount.value = pharmaceuticalTotalAmount + serviceTotalAmount;
|
||||||
console.log(serviceTotalAmount)
|
if (newStatus) {
|
||||||
|
registerId.value=''
|
||||||
|
}
|
||||||
}, {deep: true});
|
}, {deep: true});
|
||||||
</script>
|
</script>
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue