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.
66 lines
1.7 KiB
TypeScript
66 lines
1.7 KiB
TypeScript
3 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: 'raw.STO.STO-Outbound.index',
|
||
|
})
|
||
|
export class ReceiptModule extends VuexModule {
|
||
|
//俄罗斯 STO出库 扫描DN单号
|
||
|
dnNoList: any = [];
|
||
|
DnLineList: any = [];
|
||
|
@MutationAction
|
||
|
async QuerydnNo(dnNo: any) {
|
||
|
console.log('dnNo', dnNo);
|
||
|
const res: any = await http.post(url.auth.query.dnNo, {
|
||
|
factoryCode: session.factoryCode,
|
||
|
loginName: session.loginName,
|
||
|
dnNo,
|
||
|
});
|
||
|
const dnNoList = res.data;
|
||
|
const DnLineList = [];
|
||
|
dnNoList.forEach((item: any) => {
|
||
|
const obj = {
|
||
|
value: item.dnItem,
|
||
|
lable: item.dnItem,
|
||
|
};
|
||
|
DnLineList.push(obj);
|
||
|
});
|
||
|
return { dnNoList, DnLineList };
|
||
|
}
|
||
|
//俄罗斯 STO出库 查询库位
|
||
|
LocList: any = [];
|
||
|
@MutationAction
|
||
|
async QueryLoc(sendSpot: any) {
|
||
|
const res: any = await http.post(url.auth.query.queryByFactoryCodeAndWorkAreaCode, {
|
||
|
factoryCode: session.factoryCode,
|
||
|
loginName: session.loginName,
|
||
|
workArea: session.workareaCode,
|
||
|
sendSpot,
|
||
|
});
|
||
|
const LocList = [];
|
||
|
res.forEach((item: any) => {
|
||
|
const obj = {
|
||
|
value: item.locationCode,
|
||
|
lable: item.locationCode,
|
||
|
};
|
||
|
LocList.push(obj);
|
||
|
});
|
||
|
return { LocList };
|
||
|
}
|
||
|
//俄罗斯 出库提交
|
||
|
SubCode: any = '';
|
||
|
@MutationAction
|
||
|
async SubmitList(list: any) {
|
||
|
const res: any = await http.post(url.auth.query.russia, list);
|
||
|
const SubCode = res.code;
|
||
|
return { SubCode };
|
||
|
}
|
||
|
}
|
||
|
|
||
|
export default getModule(ReceiptModule);
|