import { Action, getModule, Module, Mutation, VuexModule } from 'vuex-module-decorators';
import store from '@/store';

export interface salesreturn {
  kuwei?: string;
  list?: any[];
  index?: string;
  //rowitem?: string;
}
@Module({
  dynamic: true,
  store,
  namespaced: true,
  name: 'data',
})
class usedataService extends VuexModule {
  salesreturndata: salesreturn | null = null;
  @Mutation
  salesreturn(data: salesreturn) {
    this.salesreturndata = data;
  }

  @Action
  cacheData(data: salesreturn) {
    this.context.commit('salesreturn', data);
  }
}
export const usedata = getModule(usedataService);
