import { getModule, Module, MutationAction, VuexModule } from 'vuex-module-decorators';
import store from '@/store';
import http from '@/utils/request';
import { url } from '@/utils/url';
import { session } from '@/store/modules/session';
@Module({
  namespaced: true,
  dynamic: true,
  store,
  name: 'page.WhiteManagement.TransferInlibrary',
})
export class TransferInlibrary extends VuexModule {
  SubmitCode: any = '';
  @MutationAction
  async out(params: any) {
    const result: any = await http.post(url.lanjuwms.WhiteManagement.TransferInlibrary.WhiteWarehouseDump, params);
    const SubmitCode = result.code;
    return { SubmitCode };
  }
  scanquerydata: any = {};
  @MutationAction
  async scanquery(params: any) {
    const result: any = await http.post(url.lanjuwms.WhiteManagement.WhiteOutstorage.selectQueryTrayInfor, {
      sn: params,
      factoryCode: session.FactoryCode,
    });
    const scanquerydata = result.data;
    return { scanquerydata };
  }
}

export default getModule(TransferInlibrary);
