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.

80 lines
1.8 KiB
TypeScript

import { getModule, Module, MutationAction, VuexModule } from 'vuex-module-decorators';
import store from '@/store';
import http from '@/utils/request';
import { url } from '@/utils/url';
// import { page } from '@/utils/page';
import { session } from '@/store/modules/session';
import vm from '@/main';
class OrderInInfo {
checked?: boolean;
poNo?: string;
kw?: string;
userDefined10?: string;
orderStatus?: string;
}
@Module({
namespaced: true,
dynamic: true,
store,
name: 'raw.warehouse.rowScrap',
})
export class rowScrap extends VuexModule {
/**
* sap库存地点列表
*/
cboPlaceList = [];
/**
* 隐藏看单号
*/
poNo = '';
/**
* 看单号查询结果
*/
orderInInfo: OrderInInfo = new OrderInInfo();
/**
* 看单明细
*/
orderInInfoList: OrderInInfo[] = [];
code: any = '';
/**
* 看单明细未通过明细
*/
// orderInInfoListEx: OrderInInfo[] = [];
/**
// * 查询看单号
* @param poNo
*/
@MutationAction
async takeOrder(order3: any) {
try {
const records: any = await http.post(url.warehouse.rowTransfer.list, {
...order3,
orderType: 'BF',
page: 1,
rows: 50,
factoryCode: session.factoryCode,
loginName: session.loginName,
});
const orderInInfoList = records.data.records;
const code = records.code;
console.log('获取来的数据', orderInInfoList);
return { orderInInfoList, code };
} catch {
//uni.showToast({ icon: 'none', title: vm.$t('message.Warehouse_Tip11') as any });
vm.customToast(vm.$t('message.Warehouse_Tip11') as any);
}
}
@MutationAction
async onTakeoutConfirm(list: any) {
const records: any = await http.post(url.warehouse.rowTransfer.commit, list);
const code = records.code;
return { code };
}
}
export default getModule(rowScrap);