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.
147 lines
4.2 KiB
TypeScript
147 lines
4.2 KiB
TypeScript
import { Action, 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';
|
|
// import { page } from '@/utils/page';
|
|
|
|
class OrderInInfo {
|
|
productDescZh?: string;
|
|
qty?: string;
|
|
custCode?: string;
|
|
custCodeName?: string;
|
|
productCode?: string;
|
|
locCode?: string;
|
|
barcode?: string;
|
|
// actualQty?: string;
|
|
}
|
|
|
|
@Module({
|
|
namespaced: true,
|
|
dynamic: true,
|
|
store,
|
|
name: 'row.LineSide.rawWasteJudgment',
|
|
})
|
|
export class rawWasteJudgment extends VuexModule {
|
|
/**
|
|
* 库位地点列表
|
|
*/
|
|
WlList = [];
|
|
userDefined: any = '';
|
|
detailedList: any;
|
|
code = '';
|
|
delCode = '';
|
|
removeList: any = [];
|
|
removeMaterialList: any = [];
|
|
dnNo = '';
|
|
orderInInfo: OrderInInfo = new OrderInInfo();
|
|
@MutationAction
|
|
async queryLocation() {
|
|
const result: any = await http.get(url.warehouse.wholeTransfer.getMdLocationRawAndLine, {
|
|
params: {
|
|
factoryCode: session.factoryCode,
|
|
loginName: session.loginName,
|
|
},
|
|
});
|
|
console.log('库位数据', result);
|
|
const WlList = result.data.map((_: any) => ({
|
|
label: _.locationCode,
|
|
value: _.locationCode,
|
|
}));
|
|
return { WlList };
|
|
}
|
|
|
|
/**
|
|
* 查询单号
|
|
* 查询DN单号
|
|
* @param dnNo
|
|
*/
|
|
@MutationAction
|
|
async getProductCode(params: any) {
|
|
const res: any = await http.post(url.warehouse.container.getRawStorageSnNew, params);
|
|
const code = res.code;
|
|
const orderInInfo = res.data;
|
|
// if (orderInInfo.custCode == '0') {
|
|
// orderInInfo.custCodeName = vm.$t('message.Warehouse_NX') as any;
|
|
// } else if (orderInInfo.custCode == '1') {
|
|
// orderInInfo.custCodeName = vm.$t('message.Warehouse_WX') as any;
|
|
// } else if (orderInInfo.custCode == '2') {
|
|
// orderInInfo.custCodeName = vm.$t('message.Warehouse_YJ') as any;
|
|
// } else if (orderInInfo.custCode == '4') {
|
|
// orderInInfo.custCodeName = vm.$t('message.Warehouse_BCP') as any;
|
|
// }
|
|
return { orderInInfo, code };
|
|
}
|
|
//退扫
|
|
@MutationAction
|
|
async codeDel(params: any) {
|
|
const res: any = await http.post(url.warehouse.wholeTransfer.del, params);
|
|
const delCode = res.code;
|
|
return { delCode };
|
|
}
|
|
//清除数据
|
|
@MutationAction
|
|
async empty() {
|
|
const orderInInfo: any = [];
|
|
// const userDefined = '';
|
|
// const WlList = [];
|
|
const code = '';
|
|
return { orderInInfo, code };
|
|
}
|
|
@MutationAction
|
|
async onTakeoutConfirm(list: any) {
|
|
const records: any = await http.post(url.warehouse.container.preScrapRawConfirm, list);
|
|
const code = records.code;
|
|
return { code };
|
|
}
|
|
//生成移库码
|
|
@MutationAction
|
|
async getCpMoveBatchNo(params: any = {}) {
|
|
const res: any = await http.post(url.warehouse.rowTransfer.getCode, params);
|
|
const userDefined: any = res.data;
|
|
return { userDefined };
|
|
}
|
|
//查询已扫物料
|
|
@MutationAction
|
|
async QueryHistory(params: any = {}) {
|
|
const res: any = await http.post(url.warehouse.rowTransfer.queryGroupListByMoveCode, params);
|
|
const removeList: any = res.data;
|
|
const removeMaterialList: any = [];
|
|
res.data.forEach((item: any) => {
|
|
const arr: any = {
|
|
value: item.materialCode,
|
|
laber: item.materialCode,
|
|
};
|
|
removeMaterialList.push(arr);
|
|
});
|
|
return { removeList, removeMaterialList };
|
|
}
|
|
//查询明细
|
|
@Action({ commit: 'updateCheckedOrderInInfoListKw' })
|
|
//@MutationAction
|
|
async querydetaildle(userDefined4: any) {
|
|
const res: any = await http.post(url.warehouse.rowTransfer.queryListByMoveCode, {
|
|
loginName: session.loginName,
|
|
factoryCode: session.factoryCode,
|
|
proMoveCode: userDefined4,
|
|
});
|
|
console.log('明细》》》》》》》》》', res.data);
|
|
this.detailedList = res.data;
|
|
return res;
|
|
}
|
|
@Action({ commit: 'updateCheckedOrderInInfoListKw' })
|
|
async changeOrderInLocation(kw: string) {
|
|
await http.post('/wmspda/material/orderin/enter', {
|
|
loginName: session.loginName,
|
|
// loginName: '1999',
|
|
warehouseCode: '',
|
|
factoryCode: session.factoryCode,
|
|
// factoryCode: '1999',
|
|
locationCode: kw,
|
|
});
|
|
return kw;
|
|
}
|
|
}
|
|
|
|
export default getModule(rawWasteJudgment);
|