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.
57 lines
1.6 KiB
TypeScript
57 lines
1.6 KiB
TypeScript
3 years ago
|
import { getModule, Module, MutationAction, VuexModule } from 'vuex-module-decorators';
|
||
3 years ago
|
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,
|
||
2 years ago
|
name: 'page.product.SaleOutWH',
|
||
3 years ago
|
})
|
||
2 years ago
|
export class SaleOutWH extends VuexModule {
|
||
3 years ago
|
WlList = [];
|
||
|
@MutationAction
|
||
|
async queryLocation() {
|
||
3 years ago
|
const result: any = await http.post(url.warehouse.wholeTransfer.getSpareMdLocation, {
|
||
2 years ago
|
// factoryCode: session.factoryCode,
|
||
3 years ago
|
loginName: session.loginName,
|
||
3 years ago
|
});
|
||
|
const WlList = result.data.map((_: any) => ({
|
||
|
label: _.locationCode,
|
||
|
value: _.locationCode,
|
||
|
}));
|
||
|
return { WlList };
|
||
|
}
|
||
3 years ago
|
orderNoItemList: any = [];
|
||
|
productCodeList: any = [];
|
||
3 years ago
|
@MutationAction
|
||
3 years ago
|
async queryOrderNo(orderNo: any) {
|
||
3 years ago
|
const result: any = await http.post(url.warehouse.wholeTransfer.queryDownshelfOrder, {
|
||
2 years ago
|
// factoryCode: session.factoryCode,
|
||
3 years ago
|
loginName: session.loginName,
|
||
3 years ago
|
orderNo,
|
||
3 years ago
|
});
|
||
3 years ago
|
const orderNoItemList = result.data;
|
||
2 years ago
|
// const productCodeList = result.data.map((_: any) => ({
|
||
|
// label: _.productCode,
|
||
|
// value: _.productCode,
|
||
|
// }));
|
||
|
return { orderNoItemList };
|
||
3 years ago
|
}
|
||
3 years ago
|
SubmitCode: any = '';
|
||
3 years ago
|
@MutationAction
|
||
3 years ago
|
async OnSubmit(params: any) {
|
||
3 years ago
|
const result: any = await http.post(url.warehouse.wholeTransfer.offshelf, params);
|
||
3 years ago
|
const SubmitCode = result.code;
|
||
|
return { SubmitCode };
|
||
3 years ago
|
}
|
||
3 years ago
|
@MutationAction
|
||
|
async empty() {
|
||
|
const productCodeList = [];
|
||
|
return { productCodeList };
|
||
|
}
|
||
3 years ago
|
}
|
||
|
|
||
2 years ago
|
export default getModule(SaleOutWH);
|