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.
71 lines
2.1 KiB
TypeScript
71 lines
2.1 KiB
TypeScript
2 years ago
|
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.pickOrder',
|
||
|
})
|
||
|
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.queryPickingOrders, {
|
||
|
factoryCode: session.factoryCode,
|
||
|
loginName: session.loginName,
|
||
|
orderNumber: orderNo,
|
||
|
});
|
||
|
const orderNoItemList = result.data;
|
||
|
const productCodeList = result.data.map((_: any) => ({
|
||
|
label: _.rowItem,
|
||
|
value: _.rowItem,
|
||
|
..._,
|
||
|
}));
|
||
|
return { orderNoItemList, productCodeList };
|
||
|
}
|
||
|
SubmitCode: any = '';
|
||
|
boxreturndata: any = {};
|
||
|
//扫箱码
|
||
|
@MutationAction
|
||
|
async OnSubmit(params: any) {
|
||
|
const result: any = await http.post(url.warehouse.wholeTransfer.queryPickingOrders, params);
|
||
|
const SubmitCode = result.code;
|
||
|
const boxreturndata = result.data;
|
||
|
return { SubmitCode, boxreturndata };
|
||
|
}
|
||
|
matreturndata: any = {};
|
||
|
//扫物料条码
|
||
|
@MutationAction
|
||
|
async OnSubmitmart(params: any) {
|
||
|
const result: any = await http.post(url.warehouse.wholeTransfer.queryPickingOrders, params);
|
||
|
const SubmitCode = result.code;
|
||
|
const matreturndata = result.data;
|
||
|
return { SubmitCode, matreturndata };
|
||
|
}
|
||
|
@MutationAction
|
||
|
async empty() {
|
||
|
const productCodeList = [];
|
||
|
return { productCodeList };
|
||
|
}
|
||
|
}
|
||
|
|
||
|
export default getModule(wholeTransfer);
|