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.
96 lines
2.9 KiB
TypeScript
96 lines
2.9 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.receivePO',
|
|
})
|
|
export class receivePO extends VuexModule {
|
|
WlList = [];
|
|
orderNoItemList: any = [];
|
|
orderNoItemListdes: any = [];
|
|
@MutationAction
|
|
async PurchaseOrderPda(data: any) {
|
|
const result: any = await http.post(url.lanjuwms.raw.ReceivePO.PurchaseOrderPda, data);
|
|
let orderNoItemList: any = [];
|
|
if (result.data.length) {
|
|
orderNoItemList = result.data.map((item: any) => ({
|
|
label: item.materialDesc,
|
|
value: item.materialCode,
|
|
...item,
|
|
}));
|
|
} else {
|
|
orderNoItemList = [];
|
|
}
|
|
return { orderNoItemList };
|
|
}
|
|
Alreadycode: any = '';
|
|
ProcureOrderAlreadylist: any = '';
|
|
@MutationAction
|
|
async selectOdsProcureOrderAlready(data: any) {
|
|
const result: any = await http.post(url.lanjuwms.raw.ReceivePO.selectOdsProcureOrderAlready, data);
|
|
const Alreadycode = result.code;
|
|
const ProcureOrderAlreadylist = result.data;
|
|
return { Alreadycode, ProcureOrderAlreadylist };
|
|
}
|
|
sapPurchasecode: any = '';
|
|
@MutationAction
|
|
async sapPurchaseOrderSync(data: any) {
|
|
const result: any = await http.post(url.lanjuwms.raw.ReceivePO.sapPurchaseOrderSync, data);
|
|
const sapPurchasecode = result.code;
|
|
return { sapPurchasecode };
|
|
}
|
|
SubmitCode: any = '';
|
|
@MutationAction
|
|
async PurchaseOrderdeliPda(data: any) {
|
|
const result: any = await http.post(url.lanjuwms.raw.ReceivePO.PurchaseOrderdeliPda, data);
|
|
const SubmitCode: [] = result;
|
|
return { SubmitCode };
|
|
}
|
|
|
|
@MutationAction
|
|
async PurchaseOrderdetailPda(data: any) {
|
|
const result: any = await http.post(url.lanjuwms.raw.ReceivePO.PurchaseOrderdetailPda, data);
|
|
const orderNoItemListdes = result.data;
|
|
return { orderNoItemListdes };
|
|
}
|
|
DictTypeList: any = [];
|
|
@MutationAction
|
|
async Stashlist() {
|
|
const result: any = await http.post(url.lanjuwms.raw.ReceivePO.list, {
|
|
factoryCode: session.FactoryCode,
|
|
});
|
|
const DictTypeListoild: [] = result.data;
|
|
const DictTypeList = DictTypeListoild.map((item: any) => ({
|
|
label: item.warehouseName,
|
|
value: item.warehouseCode,
|
|
...item,
|
|
}));
|
|
return { DictTypeList };
|
|
}
|
|
submitcode: any = '';
|
|
@MutationAction
|
|
async OnSubmit(data: any) {
|
|
const result: any = await http.post(url.lanjuwms.raw.ReceivePO.PurchaseOrderdeliPdaConfirm, data);
|
|
const submitcode = result.code;
|
|
return {
|
|
submitcode,
|
|
};
|
|
}
|
|
Arrivalcode: any = '';
|
|
@MutationAction
|
|
async ArrivalRegistration(data: any) {
|
|
const result: any = await http.post(url.lanjuwms.raw.ReceivePO.ArrivalRegistration, data);
|
|
const Arrivalcode = result.code;
|
|
return {
|
|
Arrivalcode,
|
|
};
|
|
}
|
|
}
|
|
|
|
export default getModule(receivePO);
|