🐞 fix: 修改票据领用需要刷新两次页面才会出现数据的bug

This commit is contained in:
ycy 2024-04-11 11:42:12 +08:00
parent 0d0c7de975
commit a1fa3a29d9
3 changed files with 7 additions and 5 deletions

View File

@ -465,3 +465,4 @@ onMounted(() => {
justify-content: space-between;
}
</style>
@/pages/finance-bill-manage/billCancel

View File

@ -392,12 +392,13 @@ const refresh = () => {
getTableData();
};
// menuManagement
const getPersonName = () => {
const getPersonName = async () => {
let arr = JSON.parse(localStorage.getItem("ReceiptList"));
if (arr) {
personName.value = arr.personName;
} else {
personList();
await personList();
getTableData();
}
};
// menuManagement
@ -429,8 +430,8 @@ const getTableData = async () => {
};
onMounted(async () => {
getPersonName();
getTableData();
await getPersonName();
await getTableData();
});
</script>

View File

@ -16,11 +16,11 @@ export const useReceiptList = defineStore("ReceiptList", {
async getPersonNameList() {
const { data } = await reqPersonName();
this.personName = data;
console.log(this.personName);
return this.personName;
},
async getReceiptList(obj) {
console.log("222");
const { data } = await reqReceiptList(obj);
this.receiptList = data;
return this.receiptList;