cosmoim-852 fix 俄罗斯新增委外入库功能
parent
b5920e2d46
commit
3622c2cc5f
@ -0,0 +1,58 @@
|
|||||||
|
/*
|
||||||
|
* @Author: zhou lei
|
||||||
|
* @Date: 2021-11-11 11:09:57
|
||||||
|
* @LastEditTime: 2021-12-14 10:13:18
|
||||||
|
* @LastEditors: zhou lei
|
||||||
|
* @Description:
|
||||||
|
* @FilePath: /wms_haiwai_app/src/pages/raw/commission/goOut/config.ts
|
||||||
|
* 联系方式:910592680@qq.com 18669792120 科海达信息技术有限公司
|
||||||
|
*/
|
||||||
|
/**
|
||||||
|
* 看单明细表格列
|
||||||
|
*/
|
||||||
|
import vm from '@/main';
|
||||||
|
export const headers = [
|
||||||
|
{
|
||||||
|
label: vm.$t('message.CommissionedSingleNumber'),
|
||||||
|
key: 'poNo',
|
||||||
|
width: 200,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: vm.$t('message.po_MaterielNo'),
|
||||||
|
key: 'materialCode',
|
||||||
|
width: 300,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: vm.$t('message.CommissionedMaterielDesc'),
|
||||||
|
key: 'materialDesc',
|
||||||
|
width: 300,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: vm.$t('message.CommissionedGoOutNumber'),
|
||||||
|
key: 'outAmount',
|
||||||
|
width: 200,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: vm.$t('message.CommissionedLocation'),
|
||||||
|
key: 'wlCode',
|
||||||
|
width: 200,
|
||||||
|
},
|
||||||
|
];
|
||||||
|
|
||||||
|
export const detailHeader = [
|
||||||
|
{
|
||||||
|
label: vm.$t('message.po_MaterielNo'),
|
||||||
|
key: 'materialCode',
|
||||||
|
width: 301,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: vm.$t('message.CommissionedLocation'),
|
||||||
|
key: 'wlCode',
|
||||||
|
width: 186,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: vm.$t('message.product_Number'),
|
||||||
|
key: 'nowAmount',
|
||||||
|
width: 186,
|
||||||
|
},
|
||||||
|
];
|
@ -0,0 +1,74 @@
|
|||||||
|
<template>
|
||||||
|
<view class="page-receipt-detail">
|
||||||
|
<view class="header">
|
||||||
|
<view class="left">
|
||||||
|
<u-icon class="icon" name="arrow-left" @click="uni.navigateBack({})" />
|
||||||
|
</view>
|
||||||
|
<view class="title">{{ $t('message.Pi_QueryResults') }}</view>
|
||||||
|
<view class="right"></view>
|
||||||
|
</view>
|
||||||
|
<view class="table-wrapper">
|
||||||
|
<wyb-table class="table" ref="table" width="100%" show-left-and-right-border :headers="headers" :contents="model.detailedList" :show-vert-border="false"></wyb-table>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
<script lang="ts">
|
||||||
|
import { Component } from 'vue-property-decorator';
|
||||||
|
import { BasePage } from '@/components/base/page';
|
||||||
|
import { headers } from './config';
|
||||||
|
import model from './model';
|
||||||
|
|
||||||
|
@Component
|
||||||
|
export default class RawReceiptDetail extends BasePage {
|
||||||
|
model = model;
|
||||||
|
headers = headers;
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.page-receipt-detail {
|
||||||
|
background: #f2f2f2 linear-gradient(0deg, #f2f2f2 0%, #4a78ea 51%, #1753ea 100%) no-repeat;
|
||||||
|
background-size: 100% 600rpx;
|
||||||
|
padding: 30rpx;
|
||||||
|
min-height: 100%;
|
||||||
|
padding-top: 118rpx;
|
||||||
|
padding-bottom: 162rpx;
|
||||||
|
|
||||||
|
.header {
|
||||||
|
position: fixed;
|
||||||
|
top: 36rpx;
|
||||||
|
left: 0;
|
||||||
|
right: 0;
|
||||||
|
display: flex;
|
||||||
|
height: 88rpx;
|
||||||
|
line-height: 88rpx;
|
||||||
|
color: #fff;
|
||||||
|
font-size: 34rpx;
|
||||||
|
font-weight: 500;
|
||||||
|
text-align: center;
|
||||||
|
.title {
|
||||||
|
flex: 3;
|
||||||
|
}
|
||||||
|
.left,
|
||||||
|
.right {
|
||||||
|
flex: 1;
|
||||||
|
}
|
||||||
|
.icon {
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
width: 88rpx;
|
||||||
|
height: 88rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.table-wrapper {
|
||||||
|
background-color: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.form {
|
||||||
|
background-color: #fff;
|
||||||
|
padding: 40rpx;
|
||||||
|
border-radius: 10rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
@ -0,0 +1,199 @@
|
|||||||
|
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 vm from '@/main';
|
||||||
|
|
||||||
|
class OrderInInfo {
|
||||||
|
stoAmount?: 0;
|
||||||
|
stoNo?: string; //STO采购单号
|
||||||
|
orderAmount?: string; //单据总数
|
||||||
|
Allocated?: string; //已分配
|
||||||
|
Unallocated?: string; //未分配
|
||||||
|
}
|
||||||
|
|
||||||
|
@Module({
|
||||||
|
namespaced: true,
|
||||||
|
dynamic: true,
|
||||||
|
store,
|
||||||
|
name: 'product.outbound.RUS-Out',
|
||||||
|
})
|
||||||
|
export class ReturningModule extends VuexModule {
|
||||||
|
/**
|
||||||
|
* 月台列表
|
||||||
|
*/
|
||||||
|
returningTypeList: any[] = [];
|
||||||
|
detailedList: any;
|
||||||
|
/**
|
||||||
|
* 物料列表
|
||||||
|
*/
|
||||||
|
materielList: any[] = [];
|
||||||
|
locationCodeList: any[] = [];
|
||||||
|
LocList: any[] = [];
|
||||||
|
//条码扫描的返回的结果
|
||||||
|
oneMaterielDetail: any = {};
|
||||||
|
/**
|
||||||
|
* 订单号查询结果
|
||||||
|
*/
|
||||||
|
orderInInfo: OrderInInfo = new OrderInInfo();
|
||||||
|
//记账按钮的code码
|
||||||
|
code = '';
|
||||||
|
/**
|
||||||
|
* 委外出库单号查询
|
||||||
|
* @param orderNo
|
||||||
|
*/
|
||||||
|
@Action
|
||||||
|
async queryOrder(form: any) {
|
||||||
|
const result = await http.post(url.material.commission.goOut.queryOrder, {
|
||||||
|
...form,
|
||||||
|
loginName: session.loginName,
|
||||||
|
factoryCode: session.factoryCode,
|
||||||
|
});
|
||||||
|
const orderInInfo = result.data.records[0] || {};
|
||||||
|
return { orderInInfo };
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 库位
|
||||||
|
*/
|
||||||
|
// @MutationAction
|
||||||
|
// async queryByFactoryCodeAndWorkAreaCode() {
|
||||||
|
// const list: [] = await http.post(url.material.commission.goOut.queryByFactoryCodeAndWorkAreaCode, {
|
||||||
|
// factoryCode: session.factoryCode,
|
||||||
|
// whCode: session.warehouseCode,
|
||||||
|
// loginName: session.loginName,
|
||||||
|
// });
|
||||||
|
// const locationCodeList = list.map((item: any) => ({
|
||||||
|
// label: item.locationCode,
|
||||||
|
// value: item.locationCode,
|
||||||
|
// }));
|
||||||
|
// return { locationCodeList };
|
||||||
|
// }
|
||||||
|
/**
|
||||||
|
* 获取物料
|
||||||
|
*
|
||||||
|
* @returns
|
||||||
|
* @memberof ReturningModule
|
||||||
|
*/
|
||||||
|
@MutationAction
|
||||||
|
async outInfo(poNo: string) {
|
||||||
|
const list: [] = await http.post(url.material.commission.goOut.outInfo, {
|
||||||
|
factoryCode: session.factoryCode,
|
||||||
|
poNo: poNo,
|
||||||
|
loginName: session.loginName,
|
||||||
|
});
|
||||||
|
const locationCodeList = list.map((item: any) => ({
|
||||||
|
label: item.locationCode,
|
||||||
|
value: item.locationCode,
|
||||||
|
}));
|
||||||
|
return { locationCodeList };
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 提交
|
||||||
|
*/
|
||||||
|
@Action
|
||||||
|
async materialComplete(form: any) {
|
||||||
|
const res = await http.post(url.material.commission.goOut.materialComplete, {
|
||||||
|
factoryCode: session.factoryCode,
|
||||||
|
loginName: session.loginName,
|
||||||
|
...form,
|
||||||
|
});
|
||||||
|
console.log(res, '>>>>>res');
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 扫条码
|
||||||
|
*/
|
||||||
|
@Action
|
||||||
|
async tluSubmit(list: any[]) {
|
||||||
|
const obj = {
|
||||||
|
barcode: list[0].barCode,
|
||||||
|
loginName: session.loginName,
|
||||||
|
};
|
||||||
|
let oneMaterielDetail: any = {};
|
||||||
|
const { data }: any = await http.post(url.outbound.stoOutbound.checkScan, obj);
|
||||||
|
console.log('shneme a ', data.records);
|
||||||
|
oneMaterielDetail = data.records[0];
|
||||||
|
data.records[0].materialCode = list[0].productCode;
|
||||||
|
data.records[0].materialDesc = list[0].productDescZh;
|
||||||
|
console.log('aaaaa', oneMaterielDetail);
|
||||||
|
return oneMaterielDetail;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 确认按钮
|
||||||
|
* @param orderNo
|
||||||
|
*/
|
||||||
|
@MutationAction
|
||||||
|
async confirm(list: any[]) {
|
||||||
|
const { code, data } = await http.post(url.outbound.stoOutbound.Bookkeeping, list);
|
||||||
|
console.log('res数据', data, code);
|
||||||
|
// if (code == '1') {
|
||||||
|
// uni.showToast({ icon: 'success', title: msg });
|
||||||
|
// } else {
|
||||||
|
// uni.showToast({ icon: 'none', title: msg });
|
||||||
|
// }
|
||||||
|
const materielList: any = [];
|
||||||
|
return { code, materielList };
|
||||||
|
}
|
||||||
|
//委外出库 关闭订单
|
||||||
|
@MutationAction
|
||||||
|
async closeCode(poNo: any) {
|
||||||
|
const res: any = await http.post(url.outbound.stoOutbound.close, {
|
||||||
|
poNo,
|
||||||
|
loginName: session.loginName,
|
||||||
|
factoryCode: session.factoryCode,
|
||||||
|
});
|
||||||
|
const code: any = res.code;
|
||||||
|
return { code };
|
||||||
|
}
|
||||||
|
|
||||||
|
//委外出库 初始化获取库位
|
||||||
|
// @Action({ commit: 'updateCheckedOrderInInfoListKw' })
|
||||||
|
@MutationAction
|
||||||
|
async queryCodeAndWorkAreaCode(content: any) {
|
||||||
|
const res: any = await http.post('/wmspda/fg/queryByFactoryCodeAndWorkAreaCode', content);
|
||||||
|
console.log('>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>', res);
|
||||||
|
const LocList = res;
|
||||||
|
console.log('LocList', LocList);
|
||||||
|
return { LocList };
|
||||||
|
}
|
||||||
|
@MutationAction
|
||||||
|
async queryItemLoc(params: any = {}) {
|
||||||
|
const res: any = await http.post(url.sortscan.save.queryWlByMat, params);
|
||||||
|
const LocList = [];
|
||||||
|
res.forEach((item: any) => {
|
||||||
|
const arr: any = {
|
||||||
|
label: item.locationCode,
|
||||||
|
value: item.locationCode + '(' + item.sendSpot + ')' + '(' + item.amount + ')',
|
||||||
|
};
|
||||||
|
LocList.push(arr);
|
||||||
|
});
|
||||||
|
return { LocList };
|
||||||
|
}
|
||||||
|
@Action
|
||||||
|
async queryOutsourcing(poNo: any) {
|
||||||
|
const res = await http.post(url.outbound.stoOutbound.outsourcingQueryOrder, {
|
||||||
|
poNo,
|
||||||
|
loginName: session.loginName,
|
||||||
|
factoryCode: session.factoryCode,
|
||||||
|
});
|
||||||
|
return res;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Action
|
||||||
|
async submitOutsourcing(upload: any) {
|
||||||
|
const res = await http.post(url.outbound.stoOutbound.materialComplete, upload);
|
||||||
|
return res;
|
||||||
|
}
|
||||||
|
//查询明细
|
||||||
|
@Action({ commit: 'updateCheckedOrderInInfoListKw' })
|
||||||
|
async querydetaildlist(content: any) {
|
||||||
|
const res: any = await http.post('/wmspda/material/outsourcing/outInfo', content);
|
||||||
|
console.log('明细》》》》》》》》》', res.list);
|
||||||
|
this.detailedList = res.data;
|
||||||
|
return res;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export default getModule(ReturningModule);
|
@ -0,0 +1,81 @@
|
|||||||
|
/*
|
||||||
|
* @Author: zhou lei
|
||||||
|
* @Date: 2021-11-10 17:14:44
|
||||||
|
* @LastEditTime: 2021-12-14 10:13:56
|
||||||
|
* @LastEditors: zhou lei
|
||||||
|
* @Description:
|
||||||
|
* @FilePath: /wms_haiwai_app/src/pages/raw/commission/entrant/config.ts
|
||||||
|
* 联系方式:910592680@qq.com 18669792120 科海达信息技术有限公司
|
||||||
|
*/
|
||||||
|
/**
|
||||||
|
* 看单明细表格列
|
||||||
|
*/
|
||||||
|
import vm from '@/main';
|
||||||
|
export const headers = [
|
||||||
|
{
|
||||||
|
label: vm.$t('message.CommissionedSingleNumber'),
|
||||||
|
key: 'poNo',
|
||||||
|
width: 200,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: vm.$t('message.po_MaterielNo'),
|
||||||
|
key: 'materialCode',
|
||||||
|
width: 300,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: vm.$t('message.CommissionedMaterielDesc'),
|
||||||
|
key: 'materialDesc',
|
||||||
|
width: 300,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: vm.$t('message.CommissionedNumber'),
|
||||||
|
key: 'receiptAmount',
|
||||||
|
width: 200,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: vm.$t('message.CommissionedLocation'),
|
||||||
|
key: 'sendSpot',
|
||||||
|
width: 200,
|
||||||
|
},
|
||||||
|
];
|
||||||
|
export const detailHeader = [
|
||||||
|
{
|
||||||
|
label: vm.$t('message.po_MaterielNo'),
|
||||||
|
key: 'materialCode',
|
||||||
|
width: 301,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: vm.$t('message.CommissionedLocation'),
|
||||||
|
key: 'wlCode',
|
||||||
|
width: 186,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: vm.$t('message.product_Number'),
|
||||||
|
key: 'nowAmount',
|
||||||
|
width: 186,
|
||||||
|
},
|
||||||
|
];
|
||||||
|
export const DNheader = [
|
||||||
|
{
|
||||||
|
label: vm.$t('message.Line'),
|
||||||
|
key: 'poLine',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: vm.$t('message.po_OddNumbers'),
|
||||||
|
key: 'poNo',
|
||||||
|
width: 350,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: vm.$t('message.Pi_materielNo'),
|
||||||
|
key: 'materialCode',
|
||||||
|
width: 350,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: vm.$t('message.CommissionedLocation'),
|
||||||
|
key: 'wlCode',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: vm.$t('message.product_Number'),
|
||||||
|
key: 'receiptAmount',
|
||||||
|
},
|
||||||
|
];
|
@ -0,0 +1,83 @@
|
|||||||
|
<!--
|
||||||
|
* @Author: zhou lei
|
||||||
|
* @Date: 2021-12-14 09:59:02
|
||||||
|
* @LastEditTime: 2021-12-14 11:26:08
|
||||||
|
* @LastEditors: zhou lei
|
||||||
|
* @Description:
|
||||||
|
* @FilePath: /wms_haiwai_app/src/pages/raw/commission/entrant/detail.vue
|
||||||
|
* 联系方式:910592680@qq.com 18669792120 科海达信息技术有限公司
|
||||||
|
-->
|
||||||
|
<template>
|
||||||
|
<view class="page-receipt-detail">
|
||||||
|
<view class="header">
|
||||||
|
<view class="left">
|
||||||
|
<u-icon class="icon" name="arrow-left" @click="uni.navigateBack({})" />
|
||||||
|
</view>
|
||||||
|
<view class="title">{{ $t('message.Pi_QueryResults') }}</view>
|
||||||
|
<view class="right"></view>
|
||||||
|
</view>
|
||||||
|
<view class="table-wrapper">
|
||||||
|
<wyb-table class="table" ref="table" width="100%" show-left-and-right-border :headers="headers" :contents="model.DNdetailedList" :show-vert-border="false"></wyb-table>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
<script lang="ts">
|
||||||
|
import { Component } from 'vue-property-decorator';
|
||||||
|
import { BasePage } from '@/components/base/page';
|
||||||
|
import { headers } from './config';
|
||||||
|
import model from './model';
|
||||||
|
|
||||||
|
@Component
|
||||||
|
export default class RawReceiptDetail extends BasePage {
|
||||||
|
model = model;
|
||||||
|
headers = headers;
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.page-receipt-detail {
|
||||||
|
background: #f2f2f2 linear-gradient(0deg, #f2f2f2 0%, #4a78ea 51%, #1753ea 100%) no-repeat;
|
||||||
|
background-size: 100% 600rpx;
|
||||||
|
padding: 30rpx;
|
||||||
|
min-height: 100%;
|
||||||
|
padding-top: 118rpx;
|
||||||
|
padding-bottom: 162rpx;
|
||||||
|
|
||||||
|
.header {
|
||||||
|
position: fixed;
|
||||||
|
top: 36rpx;
|
||||||
|
left: 0;
|
||||||
|
right: 0;
|
||||||
|
display: flex;
|
||||||
|
height: 88rpx;
|
||||||
|
line-height: 88rpx;
|
||||||
|
color: #fff;
|
||||||
|
font-size: 34rpx;
|
||||||
|
font-weight: 500;
|
||||||
|
text-align: center;
|
||||||
|
.title {
|
||||||
|
flex: 3;
|
||||||
|
}
|
||||||
|
.left,
|
||||||
|
.right {
|
||||||
|
flex: 1;
|
||||||
|
}
|
||||||
|
.icon {
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
width: 88rpx;
|
||||||
|
height: 88rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.table-wrapper {
|
||||||
|
background-color: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.form {
|
||||||
|
background-color: #fff;
|
||||||
|
padding: 40rpx;
|
||||||
|
border-radius: 10rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
@ -0,0 +1,107 @@
|
|||||||
|
/*
|
||||||
|
* @Author: zhou lei
|
||||||
|
* @Date: 2021-12-24 12:02:31
|
||||||
|
* @LastEditTime: 2021-12-24 14:33:54
|
||||||
|
* @LastEditors: zhou lei
|
||||||
|
* @Description:
|
||||||
|
* @FilePath: /wms_haiwai_app/src/pages/raw/ingoods/dnReceipt/model.location.ts
|
||||||
|
* 联系方式:910592680@qq.com 18669792120 科海达信息技术有限公司
|
||||||
|
*/
|
||||||
|
/**
|
||||||
|
* 库位类型
|
||||||
|
* @export
|
||||||
|
* @interface LocationDetail
|
||||||
|
*/
|
||||||
|
export default interface LocationDetail {
|
||||||
|
factoryCode?: string;
|
||||||
|
cosmoType?: null;
|
||||||
|
sapFactoryCode?: null;
|
||||||
|
user?: null;
|
||||||
|
loginName?: null;
|
||||||
|
sign?: null;
|
||||||
|
page?: number;
|
||||||
|
rows?: number;
|
||||||
|
schema?: null;
|
||||||
|
lastModifiedBy?: null;
|
||||||
|
gmtCreate?: null;
|
||||||
|
createdBy?: null;
|
||||||
|
createdByName?: null;
|
||||||
|
warehouseCode?: string;
|
||||||
|
warehouseName?: null;
|
||||||
|
warehouseType?: string;
|
||||||
|
workareaCode?: null;
|
||||||
|
createdDate?: null;
|
||||||
|
createdDateStr?: null;
|
||||||
|
createdDateMax?: null;
|
||||||
|
createdDateMaxStr?: null;
|
||||||
|
createdDateMin?: null;
|
||||||
|
createdDateMinStr?: null;
|
||||||
|
lastUpdBy?: null;
|
||||||
|
lastUpdByName?: null;
|
||||||
|
lastUpdDate?: null;
|
||||||
|
lastUpdDateStr?: null;
|
||||||
|
lastUpdDateMax?: null;
|
||||||
|
lastUpdDateMin?: null;
|
||||||
|
activeFlag?: string;
|
||||||
|
userDefined1?: null;
|
||||||
|
userDefined2?: null;
|
||||||
|
userDefined3?: null;
|
||||||
|
userDefined4?: null;
|
||||||
|
userDefined5?: null;
|
||||||
|
userDefined6?: null;
|
||||||
|
userDefined7?: null;
|
||||||
|
userDefined8?: null;
|
||||||
|
userDefined9?: null;
|
||||||
|
userDefined10?: null;
|
||||||
|
remark?: null;
|
||||||
|
createBy?: null;
|
||||||
|
gmtCreateMin?: null;
|
||||||
|
gmtCreateStr?: null;
|
||||||
|
gmtCreateMax?: null;
|
||||||
|
gmtModified?: null;
|
||||||
|
gmtModifiedStr?: null;
|
||||||
|
gmtModifiedMax?: null;
|
||||||
|
gmtModifiedMin?: null;
|
||||||
|
locationId?: null;
|
||||||
|
locationCode?: string;
|
||||||
|
shelfOrder?: null;
|
||||||
|
sendSpot?: string;
|
||||||
|
sendSpotDesc1?: string;
|
||||||
|
checkOrder?: null;
|
||||||
|
pickOrder?: null;
|
||||||
|
locationUse?: null;
|
||||||
|
pickFlag?: null;
|
||||||
|
isOpenKnFlag?: null;
|
||||||
|
locationType?: null;
|
||||||
|
locationAttr?: null;
|
||||||
|
turnDemand?: null;
|
||||||
|
stockEnv?: null;
|
||||||
|
regionCode?: string;
|
||||||
|
areaCode?: string;
|
||||||
|
checkCode?: null;
|
||||||
|
workArea?: string;
|
||||||
|
port1?: null;
|
||||||
|
port2?: null;
|
||||||
|
port3?: null;
|
||||||
|
volumeLimit?: null;
|
||||||
|
weightLimit?: null;
|
||||||
|
boxLimit?: null;
|
||||||
|
qtyLimit?: null;
|
||||||
|
palletLimit?: null;
|
||||||
|
length?: null;
|
||||||
|
width?: null;
|
||||||
|
height?: null;
|
||||||
|
xcoordinate?: null;
|
||||||
|
ycoordinate?: null;
|
||||||
|
zcoordinate?: null;
|
||||||
|
xpixels?: null;
|
||||||
|
ypixels?: null;
|
||||||
|
zpixels?: null;
|
||||||
|
locRow?: null;
|
||||||
|
layerNum?: null;
|
||||||
|
locColumn?: null;
|
||||||
|
bord?: null;
|
||||||
|
productMix?: null;
|
||||||
|
batchMix?: null;
|
||||||
|
ignoreId?: null;
|
||||||
|
}
|
@ -0,0 +1,301 @@
|
|||||||
|
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 LocationDetail from './model.location';
|
||||||
|
// import vm from '@/main';
|
||||||
|
|
||||||
|
class OrderInInfo {
|
||||||
|
stoAmount?: 0;
|
||||||
|
stoNo?: string; //STO采购单号
|
||||||
|
dnNo?: string;
|
||||||
|
orderAmount?: string; //单据总数
|
||||||
|
Allocated?: string; //已分配
|
||||||
|
Unallocated?: string; //未分配
|
||||||
|
userDefined10: string;
|
||||||
|
SubmitCode?: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Module({
|
||||||
|
namespaced: true,
|
||||||
|
dynamic: true,
|
||||||
|
store,
|
||||||
|
name: 'product.outbound.RUS-stoOutbound',
|
||||||
|
})
|
||||||
|
export class ReturningModule extends VuexModule {
|
||||||
|
/**
|
||||||
|
* 月台列表
|
||||||
|
*/
|
||||||
|
returningTypeList: any[] = [];
|
||||||
|
detailedList: any;
|
||||||
|
SubmitCode: any = '';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 物料列表
|
||||||
|
*/
|
||||||
|
materielList: any[] = [];
|
||||||
|
locationCodeList: any[] = [];
|
||||||
|
LoctionList: any[] = [];
|
||||||
|
dnNo = '';
|
||||||
|
closeCode: any = '';
|
||||||
|
DNdetailedList: any;
|
||||||
|
|
||||||
|
//条码扫描的返回的结果
|
||||||
|
oneMaterielDetail: any = {};
|
||||||
|
/**
|
||||||
|
* 订单号查询结果
|
||||||
|
*/
|
||||||
|
orderInInfo: OrderInInfo = new OrderInInfo();
|
||||||
|
orderInInfoList: OrderInInfo[] = [];
|
||||||
|
orderInInfoListEx: OrderInInfo[] = [];
|
||||||
|
//记账按钮的code码
|
||||||
|
code = '';
|
||||||
|
/**
|
||||||
|
* 委外出库单号查询
|
||||||
|
* @param orderNo
|
||||||
|
*/
|
||||||
|
@Action
|
||||||
|
async queryOrder(form: any) {
|
||||||
|
const result = await http.post(url.material.commission.entrant.queryOrder, {
|
||||||
|
...form,
|
||||||
|
loginName: session.loginName,
|
||||||
|
factoryCode: session.factoryCode,
|
||||||
|
});
|
||||||
|
const orderInInfo = result.data.records[0] || {};
|
||||||
|
return { orderInInfo };
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 库位
|
||||||
|
*/
|
||||||
|
// @MutationAction
|
||||||
|
// async queryByFactoryCodeAndWorkAreaCode() {
|
||||||
|
// const list: [] = await http.post(url.material.commission.goOut.queryByFactoryCodeAndWorkAreaCode, {
|
||||||
|
// factoryCode: session.factoryCode,
|
||||||
|
// whCode: session.warehouseCode,
|
||||||
|
// loginName: session.loginName,
|
||||||
|
// });
|
||||||
|
// const locationCodeList = list.map((item: any) => ({
|
||||||
|
// label: item.locationCode,
|
||||||
|
// value: item.locationCode,
|
||||||
|
// }));
|
||||||
|
// return { locationCodeList };
|
||||||
|
// }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 提交
|
||||||
|
*/
|
||||||
|
@Action
|
||||||
|
async materialComplete(form: any) {
|
||||||
|
const res = await http.post(url.material.commission.goOut.materialComplete, {
|
||||||
|
factoryCode: session.factoryCode,
|
||||||
|
loginName: session.loginName,
|
||||||
|
...form,
|
||||||
|
});
|
||||||
|
console.log(res, '>>>>>res');
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 获取物料
|
||||||
|
*
|
||||||
|
* @returns
|
||||||
|
* @memberof ReturningModule
|
||||||
|
*/
|
||||||
|
@MutationAction
|
||||||
|
async info(poNo: string) {
|
||||||
|
const list: [] = await http.post(url.material.commission.entrant.info, {
|
||||||
|
factoryCode: session.factoryCode,
|
||||||
|
poNo: poNo,
|
||||||
|
loginName: session.loginName,
|
||||||
|
});
|
||||||
|
const locationCodeList = list.map((item: any) => ({
|
||||||
|
label: item.locationCode,
|
||||||
|
value: item.locationCode,
|
||||||
|
}));
|
||||||
|
return { locationCodeList };
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 查询月台列表
|
||||||
|
*/
|
||||||
|
@MutationAction
|
||||||
|
async queryReturningTypeList() {
|
||||||
|
const list: [] = await http.post(url.outbound.stoOutbound.yuetaiType, {
|
||||||
|
factoryCode: session.factoryCode,
|
||||||
|
whCode: session.warehouseCode,
|
||||||
|
loginName: session.loginName,
|
||||||
|
});
|
||||||
|
const returningTypeList = list.map((item: any) => ({
|
||||||
|
label: item.dockName,
|
||||||
|
value: item.dockCode,
|
||||||
|
}));
|
||||||
|
return { returningTypeList };
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询订单号
|
||||||
|
* @param orderNo
|
||||||
|
*/
|
||||||
|
@MutationAction
|
||||||
|
async queryOrderInInfo(stoNo: string) {
|
||||||
|
const result = await http.post(url.outbound.stoOutbound.info, {
|
||||||
|
stoNo,
|
||||||
|
deleteFlag: 2,
|
||||||
|
finalState: 3,
|
||||||
|
loginName: session.loginName,
|
||||||
|
});
|
||||||
|
let stoAmount = 0;
|
||||||
|
result.data.records.forEach((item: any) => {
|
||||||
|
stoAmount += item.orderAmount;
|
||||||
|
});
|
||||||
|
const materielList = result.data.records.map((item: any) => ({
|
||||||
|
label: item.materialCode,
|
||||||
|
value: item.stoItem,
|
||||||
|
...item,
|
||||||
|
}));
|
||||||
|
console.log('materielList', materielList);
|
||||||
|
if (result.data.records[0]) {
|
||||||
|
result.data.records[0].stoAmount = stoAmount;
|
||||||
|
}
|
||||||
|
const orderInInfo = result.data.records[0] || {};
|
||||||
|
return { orderInInfo, materielList };
|
||||||
|
}
|
||||||
|
|
||||||
|
@MutationAction
|
||||||
|
async subcDnInfo(dnNo: string) {
|
||||||
|
const { list, code }: any = await http.post(url.material.DNorderin.subcDnInfo, {
|
||||||
|
dnNo,
|
||||||
|
factoryCode: session.factoryCode,
|
||||||
|
loginName: session.loginName,
|
||||||
|
});
|
||||||
|
const orderInInfo = list[0] || {};
|
||||||
|
const orderInInfoList = list.filter((_: OrderInInfo) => _.userDefined10 === '1');
|
||||||
|
const orderInInfoListEx = list.filter((_: OrderInInfo) => _.userDefined10 === '0');
|
||||||
|
// orderInInfoList.forEach((item: any) => {
|
||||||
|
// item.receiptAmount = item.requestAmount;
|
||||||
|
// });
|
||||||
|
uni.setStorageSync('list', JSON.stringify(list) as any);
|
||||||
|
uni.setStorageSync('sendSpot', JSON.stringify(list[0].sendSpot) as any);
|
||||||
|
return { dnNo, orderInInfo, orderInInfoList, orderInInfoListEx, code };
|
||||||
|
}
|
||||||
|
@MutationAction
|
||||||
|
async submitOrderInEnter(list: any) {
|
||||||
|
// const list = (this.state as any).orderInInfoList.map((item: any) => {
|
||||||
|
// // item.orderStatus = item.checked ? "2" : "1";
|
||||||
|
// return item;
|
||||||
|
// });
|
||||||
|
const result: any = await http.post(url.material.DNorderin.subcDnEnterRussia, {
|
||||||
|
dnNo: this.dnNo,
|
||||||
|
// dnNo: list[0].dnNo,
|
||||||
|
factoryCode: session.factoryCode,
|
||||||
|
loginName: session.loginName,
|
||||||
|
list,
|
||||||
|
});
|
||||||
|
uni.showToast({
|
||||||
|
icon: 'none',
|
||||||
|
title: result.msg,
|
||||||
|
});
|
||||||
|
const SubmitCode = result.code;
|
||||||
|
const orderInInfoList = result.list.sort((a: any, b: any) => Number(a.accountingStatus) - Number(b.accountingStatus));
|
||||||
|
return { orderInInfoList, SubmitCode };
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 扫条码
|
||||||
|
*/
|
||||||
|
@Action
|
||||||
|
async tluSubmit(list: any[]) {
|
||||||
|
const obj = {
|
||||||
|
barcode: list[0].barCode,
|
||||||
|
loginName: session.loginName,
|
||||||
|
};
|
||||||
|
let oneMaterielDetail: any = {};
|
||||||
|
const { data }: any = await http.post(url.outbound.stoOutbound.checkScan, obj);
|
||||||
|
console.log('shneme a ', data.records);
|
||||||
|
oneMaterielDetail = data.records[0];
|
||||||
|
data.records[0].materialCode = list[0].productCode;
|
||||||
|
data.records[0].materialDesc = list[0].productDescZh;
|
||||||
|
console.log('aaaaa', oneMaterielDetail);
|
||||||
|
return oneMaterielDetail;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 确认按钮
|
||||||
|
* @param orderNo
|
||||||
|
*/
|
||||||
|
@MutationAction
|
||||||
|
async confirm(list: any[]) {
|
||||||
|
const { code, data } = await http.post(url.outbound.stoOutbound.Bookkeeping, list);
|
||||||
|
console.log('res数据', data, code);
|
||||||
|
// if (code == '1') {
|
||||||
|
// uni.showToast({ icon: 'success', title: msg });
|
||||||
|
// } else {
|
||||||
|
// uni.showToast({ icon: 'none', title: msg });
|
||||||
|
// }
|
||||||
|
const materielList: any = [];
|
||||||
|
return { code, materielList };
|
||||||
|
}
|
||||||
|
@MutationAction
|
||||||
|
async queryByFactoryCodeAndWorkAreaCode(content: any) {
|
||||||
|
const res: any = await http.post('/wmspda/fg/queryByFactoryCodeAndWorkAreaCode', content);
|
||||||
|
const LoctionList = res;
|
||||||
|
return { LoctionList };
|
||||||
|
}
|
||||||
|
@Action({ commit: 'updateCheckedOrderInInfoListKw' })
|
||||||
|
async queryList(content: any) {
|
||||||
|
const res = await http.post<LocationDetail>('wmspda/fg/queryByFactoryCodeAndWorkAreaCode', content);
|
||||||
|
return res;
|
||||||
|
}
|
||||||
|
@MutationAction
|
||||||
|
async documentNoClose(poNo: any) {
|
||||||
|
const res: any = await http.post('/wmspda/material/outsourcing/into/close', {
|
||||||
|
loginName: session.loginName,
|
||||||
|
factoryCode: session.factoryCode,
|
||||||
|
poNo,
|
||||||
|
});
|
||||||
|
const closeCode = res.code;
|
||||||
|
return { closeCode };
|
||||||
|
}
|
||||||
|
@Action
|
||||||
|
async queryOutsourcing(poNo: any) {
|
||||||
|
const res = await http.post(url.outbound.stoOutbound.subcDnInfo, {
|
||||||
|
poNo,
|
||||||
|
loginName: session.loginName,
|
||||||
|
factoryCode: session.factoryCode,
|
||||||
|
});
|
||||||
|
return res;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Action
|
||||||
|
async submitOutsourcing(upload: any) {
|
||||||
|
const res = await http.post(url.outbound.stoOutbound.submit, upload);
|
||||||
|
return res;
|
||||||
|
}
|
||||||
|
//查询明细
|
||||||
|
@Action({ commit: 'updateCheckedOrderInInfoListKw' })
|
||||||
|
async querydetaildlist(content: any) {
|
||||||
|
const res: any = await http.post('/wmspda/material/outsourcing/into/info', content);
|
||||||
|
console.log('明细》》》》》》》》》', res.list);
|
||||||
|
this.detailedList = res.data;
|
||||||
|
return res;
|
||||||
|
}
|
||||||
|
@Action({ commit: 'updateCheckedOrderInInfoListKw' })
|
||||||
|
async queryBill(content: any) {
|
||||||
|
const res: any = await http.post('/wmspda/material/getDnRecSn', content);
|
||||||
|
console.log('明细》》》》》》》》》', res.list);
|
||||||
|
this.DNdetailedList = res.list;
|
||||||
|
return res;
|
||||||
|
}
|
||||||
|
ContainerCode: any = '';
|
||||||
|
@MutationAction
|
||||||
|
async searchBarcode(params: any) {
|
||||||
|
const res: any = await http.post(url.auth.query.barcode, {
|
||||||
|
factoryCode: session.factoryCode,
|
||||||
|
loginName: session.loginName,
|
||||||
|
barcode: params.barcode,
|
||||||
|
productCode: params.productCode,
|
||||||
|
// locCode: params.locCode,
|
||||||
|
});
|
||||||
|
const ContainerCode = res.data;
|
||||||
|
return { ContainerCode };
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export default getModule(ReturningModule);
|
Loading…
Reference in New Issue