|
|
|
|
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.product.SaleOutWH',
|
|
|
|
|
})
|
|
|
|
|
export class SaleOutWH extends VuexModule {
|
|
|
|
|
orderNoItemList: any = [];
|
|
|
|
|
@MutationAction
|
|
|
|
|
async showProduceCode(orderNo: any) {
|
|
|
|
|
const result: any = await http.get(url.lanjuwms.product.SaleOutWH.showProduceCode + '/' + orderNo, {
|
|
|
|
|
headers: {
|
|
|
|
|
poolName: session.PoolName,
|
|
|
|
|
},
|
|
|
|
|
});
|
|
|
|
|
// http.defaults.headers.common['Accept-Language'] = session.PoolName;
|
|
|
|
|
const orderNoItemList = result.data;
|
|
|
|
|
return { orderNoItemList };
|
|
|
|
|
}
|
|
|
|
|
information: any = [];
|
|
|
|
|
@MutationAction
|
|
|
|
|
async queryinformation(item) {
|
|
|
|
|
console.log(item);
|
|
|
|
|
const result: any = await http.get(url.lanjuwms.product.SaleOutWH.queryinformation + '/' + item.orderNo + '/' + item.value, {});
|
|
|
|
|
const information = result.data;
|
|
|
|
|
return { information };
|
|
|
|
|
}
|
|
|
|
|
TraysList: any = [];
|
|
|
|
|
@MutationAction
|
|
|
|
|
async showTrays(item: any) {
|
|
|
|
|
const result: any = await http.get(url.lanjuwms.product.SaleOutWH.showTrays + '/' + item.orderNo + '/' + item.value, {});
|
|
|
|
|
const TraysList = result.data;
|
|
|
|
|
return { TraysList };
|
|
|
|
|
}
|
|
|
|
|
SubmitCode: any = '';
|
|
|
|
|
@MutationAction
|
|
|
|
|
async selloutconntray(params: any) {
|
|
|
|
|
const result: any = await http.post(url.lanjuwms.product.SaleOutWH.selloutconntray, params);
|
|
|
|
|
const SubmitCode = result.code;
|
|
|
|
|
return { SubmitCode };
|
|
|
|
|
}
|
|
|
|
|
@MutationAction
|
|
|
|
|
async deleteTray(item: any) {
|
|
|
|
|
console.log(item);
|
|
|
|
|
const result: any = await http.delete(url.lanjuwms.product.SaleOutWH.deleteTray + '/' + item.barcode);
|
|
|
|
|
const SubmitCode = result.code;
|
|
|
|
|
return { SubmitCode };
|
|
|
|
|
}
|
|
|
|
|
@MutationAction
|
|
|
|
|
async out(params: any) {
|
|
|
|
|
const result: any = await http.post(url.lanjuwms.product.SaleOutWH.out + '/' + params[0].outnumber, params);
|
|
|
|
|
const SubmitCode = result.code;
|
|
|
|
|
return { SubmitCode };
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export default getModule(SaleOutWH);
|