You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
57 lines
1.6 KiB
TypeScript
57 lines
1.6 KiB
TypeScript
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.raw.ingoods.SpareInbound.SparePartsStores',
|
|
})
|
|
export class wholeTransfer extends VuexModule {
|
|
WlList = [];
|
|
@MutationAction
|
|
async queryLocation() {
|
|
const result: any = await http.post(url.warehouse.wholeTransfer.getSpareMdLocation, {
|
|
factoryCode: session.factoryCode,
|
|
loginName: session.loginName,
|
|
});
|
|
const WlList = result.data.map((_: any) => ({
|
|
label: _.locationCode,
|
|
value: _.locationCode,
|
|
}));
|
|
return { WlList };
|
|
}
|
|
orderNoItemList: any = [];
|
|
productCodeList: any = [];
|
|
@MutationAction
|
|
async queryOrderNo(orderNo: any) {
|
|
const result: any = await http.post(url.warehouse.wholeTransfer.queryOnshelfOrder, {
|
|
factoryCode: session.factoryCode,
|
|
loginName: session.loginName,
|
|
orderNo,
|
|
});
|
|
const orderNoItemList = result.data;
|
|
const productCodeList = result.data.map((_: any) => ({
|
|
label: _.productCode,
|
|
value: _.productCode,
|
|
}));
|
|
return { orderNoItemList, productCodeList };
|
|
}
|
|
SubmitCode: any = '';
|
|
@MutationAction
|
|
async OnSubmit(params: any) {
|
|
const result: any = await http.post(url.warehouse.wholeTransfer.upshelf, params);
|
|
const SubmitCode = result.code;
|
|
return { SubmitCode };
|
|
}
|
|
@MutationAction
|
|
async empty() {
|
|
const productCodeList = [];
|
|
return { productCodeList };
|
|
}
|
|
}
|
|
|
|
export default getModule(wholeTransfer);
|