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.
83 lines
2.3 KiB
TypeScript
83 lines
2.3 KiB
TypeScript
/*
|
|
* @Author: zhou lei
|
|
* @Date: 2022-09-28 10:26:36
|
|
* @LastEditTime: 2022-10-12 11:56:22
|
|
* @LastEditors: zhou lei
|
|
* @Description: 修改为扫描条码出库
|
|
* @FilePath: \hgwms-factory-app\src\pages\raw\STO\STO-Outbound\model.ts
|
|
* 联系方式:910592680@qq.com 18669792120 科海达信息技术有限公司
|
|
*/
|
|
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 };
|
|
}
|
|
//扫描条码
|
|
res: any = '';
|
|
@MutationAction
|
|
async stoDnProdScan(list: any) {
|
|
const res: any = await http.post(url.auth.query.barcode, list);
|
|
//const SubCode = res.code;
|
|
return { res };
|
|
}
|
|
//俄罗斯 出库提交
|
|
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);
|