|
@@ -42,6 +42,32 @@ export const actions = {
|
|
|
commit('storeCms/GET_SALES_FAILURE', err)
|
|
|
})
|
|
|
},
|
|
|
+
|
|
|
+ loadFactoriesCount ({commit}, params = {types: 'ORIGINAL_FACTORY'}) {
|
|
|
+ commit('stores/REQUEST_ORIGINALCOUNT')
|
|
|
+ return axios.get('/api/store-service/stores/type/count', {
|
|
|
+ params: {
|
|
|
+ types: params.types
|
|
|
+ }
|
|
|
+ }).then(response => {
|
|
|
+ commit('stores/GET_ORIGINALCOUNT_SUCCESS', response.data && response.data.success ? response.data.data : 0)
|
|
|
+ }, err => {
|
|
|
+ commit('stores/GET_ORIGINALCOUNT_FAILURE', err)
|
|
|
+ })
|
|
|
+ },
|
|
|
+
|
|
|
+ loadAgencyCount ({commit}, params = {types: 'AGENCY-DISTRIBUTION'}) {
|
|
|
+ commit('stores/REQUEST_STORE_COUNT')
|
|
|
+ return axios.get('/api/store-service/stores/type/count', {
|
|
|
+ params: {
|
|
|
+ types: params.types
|
|
|
+ }
|
|
|
+ }).then(response => {
|
|
|
+ commit('stores/GET_STORE_COUNT_SUCCESS', response.data && response.data.success ? response.data.data : 0)
|
|
|
+ }, err => {
|
|
|
+ commit('stores/GET_STORE_COUNT_FAILURE', err)
|
|
|
+ })
|
|
|
+ },
|
|
|
|
|
|
loadNewStores ({ commit }, params = { types: 'ORIGINAL_FACTORY' }) {
|
|
|
commit('storeCms/REQUEST_NEW_STORES')
|