27 lines
537 B
JavaScript
27 lines
537 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({ pageSize: 1000 }).then(response => {
|
|
console.log(response.data, 'finance.response.rows');
|
|
commit('SET_FINANCIAL_ACCOUNTS', response.data);
|
|
});
|
|
}
|
|
}
|
|
|
|
export default {
|
|
namespaced: true,
|
|
state,
|
|
mutations,
|
|
actions
|
|
} |