Files
klp-oa/klp-ui/src/store/modules/finance.js
2025-08-13 16:39:47 +08:00

26 lines
460 B
JavaScript

import { listAccount } from "@/api/finance/account";
const state = {
financialAccounts: [],
}
const mutations = {
SET_FINANCIAL_ACCOUNTS(state, financialAccounts) {
state.financialAccounts = financialAccounts;
},
}
const actions = {
getFinancialAccounts({ commit }) {
listAccount().then(response => {
commit('SET_FINANCIAL_ACCOUNTS', response.data);
});
}
}
export default {
namespaced: true,
state,
mutations,
actions
}