cosmoim-852 fix 新增俄罗斯补料

master
hou 3 years ago
parent 2b1d022f14
commit 952bb42ecb

@ -96,4 +96,7 @@ page {
uni-modal { uni-modal {
z-index: 19000; z-index: 19000;
} }
.pickerMask {
z-index: 30000 !important;
}
</style> </style>

@ -492,5 +492,6 @@ export default {
spareGoods: '备件发货', spareGoods: '备件发货',
matcode: '物料编码', matcode: '物料编码',
Quantity: '需求数量', Quantity: '需求数量',
scanningContainer: '请先扫描容器码',
}, },
}; };

@ -497,5 +497,6 @@ export default {
spareGoods: 'Spare deliver goods', spareGoods: 'Spare deliver goods',
matcode: 'Mat code', matcode: 'Mat code',
Quantity: 'Request', Quantity: 'Request',
scanningContainer: 'Please scan the container code first',
}, },
}; };

@ -104,7 +104,6 @@ export default class stoOutboundDom extends BasePage {
return; return;
} }
await this.model.queryDetailed(this.nxOutCode); await this.model.queryDetailed(this.nxOutCode);
// this.toPage(this.page.product.SpareDeliverGoods.detail);
this.redirectTo(this.page.product.SpareDeliverGoods.detail); this.redirectTo(this.page.product.SpareDeliverGoods.detail);
} }
qty: any = ''; qty: any = '';

@ -78,7 +78,7 @@
<u-button type="primary" @click="Add">{{ $t('message.product_add') }}</u-button> <u-button type="primary" @click="Add">{{ $t('message.product_add') }}</u-button>
</view> </view>
<!-- 表格 --> <!-- 表格 -->
<wyb-table class="table" ref="table" width="100%" show-left-and-right-border :headers="detailHeader" :contents="LocationList" :show-vert-border="false" @onCellClick="deleteItem($event)"></wyb-table> <wyb-table class="table" ref="table" width="100%" show-left-and-right-border :headers="RUSdetailHeader" :contents="LocationList" :show-vert-border="false" @onCellClick="deleteItem($event)"></wyb-table>
</view> </view>
<view class="bottom-bar"> <view class="bottom-bar">
<div class="extra"> <div class="extra">
@ -128,7 +128,7 @@ import model from './model';
import { session } from '@/store/modules/session'; import { session } from '@/store/modules/session';
import { VForm, VFormRules } from 'vue/types/form'; import { VForm, VFormRules } from 'vue/types/form';
import jPicker from '@/components/J-Picker/jPicker.vue'; import jPicker from '@/components/J-Picker/jPicker.vue';
import { detailHeader } from './config'; import { RUSdetailHeader } from './config';
import { auth } from '@/store/modules/auth'; import { auth } from '@/store/modules/auth';
@Component({ @Component({
components: { components: {
@ -159,6 +159,7 @@ export default class RawReceiptDetail extends BasePage {
Location: any = []; Location: any = [];
someIndex = 0; someIndex = 0;
some: any = {}; some: any = {};
Container: any = {};
qty: any = ''; qty: any = '';
form: any = { form: any = {
documentNo: '', documentNo: '',
@ -171,7 +172,7 @@ export default class RawReceiptDetail extends BasePage {
rules: VFormRules<any> = { rules: VFormRules<any> = {
amount: [{ required: true, message: this.$t('message.Pi_tip1') as string }], amount: [{ required: true, message: this.$t('message.Pi_tip1') as string }],
}; };
detailHeader = detailHeader; RUSdetailHeader = RUSdetailHeader;
sapSupplyIdList: any = []; sapSupplyIdList: any = [];
// async onReady() { // async onReady() {
// let content = { // let content = {
@ -213,6 +214,8 @@ export default class RawReceiptDetail extends BasePage {
this.materialList = []; this.materialList = [];
this.model.blDetailList.length = 0; this.model.blDetailList.length = 0;
this.LocationList = []; this.LocationList = [];
this.Barcode = '';
this.Container = {};
} }
async back() { async back() {
if (this.sapSupplyIdList.length != 0) { if (this.sapSupplyIdList.length != 0) {
@ -232,7 +235,6 @@ export default class RawReceiptDetail extends BasePage {
this.sapSupplyIdList = []; this.sapSupplyIdList = [];
} }
this.LocEmpty(); this.LocEmpty();
this.wlCode = this.Location[0];
let inPrdOrderList = this.form.documentNo.split(','); let inPrdOrderList = this.form.documentNo.split(',');
let params = { let params = {
inPrdOrderList, inPrdOrderList,
@ -248,24 +250,9 @@ export default class RawReceiptDetail extends BasePage {
item.wlList = []; item.wlList = [];
this.sapSupplyIdList.push(item.sapSupplyId); this.sapSupplyIdList.push(item.sapSupplyId);
}); });
console.log('this.sapSupplyIdList', this.sapSupplyIdList);
this.some = this.model.blDetailList[0]; this.some = this.model.blDetailList[0];
this.someIndex = 0; this.someIndex = 0;
}); });
await this.model.queryItemLoc({
workArea: session.workareaCode,
loginName: session.loginName,
sendSpot: null,
materialCode: this.some.materialCode,
factoryCode: session.factoryCode,
});
if (this.model.LocList.length != 0) {
this.Location = [];
this.Location = this.model.LocList;
this.wlCode = this.Location[0];
} else {
console.log('1');
}
} }
async materialChoice(e: any) { async materialChoice(e: any) {
this.model.blDetailList.forEach((item: any, index: any) => { this.model.blDetailList.forEach((item: any, index: any) => {
@ -309,7 +296,32 @@ export default class RawReceiptDetail extends BasePage {
this.customToast(this.$t('message.barcode') as string); this.customToast(this.$t('message.barcode') as string);
return; return;
} }
if (this.materialList.length == 0) {
this.customToast(this.$t('message.AppendMateriel5') as string);
return;
}
await this.model.searchBarcode(this.Barcode); await this.model.searchBarcode(this.Barcode);
this.Container = this.model.ContainerCode;
let arr = {
label: this.Container.locCode,
value: this.Container.locCode + '(' + this.Container.sendSpot + ')',
sendSpot: this.Container.sendSpot,
};
this.Location.push(arr);
this.wlCode = this.Location[0];
let num = 0;
if (this.LocationList.length != 0) {
this.LocationList.forEach((item: any) => {
if (item.barcode == this.Container.barcode) {
num += parseFloat(item.qty);
}
});
}
if (this.Container.cpRef4 == null) {
this.qty = parseFloat(this.Container.qty) - num;
} else {
this.qty = parseFloat(this.Container.qty) - parseFloat(this.Container.cpRef4) - num;
}
} }
Add() { Add() {
if (this.qty == '' || this.wlCode == '') { if (this.qty == '' || this.wlCode == '') {
@ -332,6 +344,33 @@ export default class RawReceiptDetail extends BasePage {
this.customToast(this.$t('message.AppendMateriel3') as string); this.customToast(this.$t('message.AppendMateriel3') as string);
return; return;
} }
if (this.Container == '' || this.Container.barcode.length == 0) {
this.customToast(this.$t('message.scanningContainer') as string);
return;
}
if (this.some == {}) {
this.customToast(this.$t('message.AppendMateriel5') as string);
return;
}
let CodeNum = 0;
if (this.LocationList.length != 0) {
this.LocationList.forEach((item: any) => {
if (item.barcode == this.Container.barcode) {
CodeNum += parseFloat(item.qty);
}
});
}
if (this.Container.cpRef4 == null) {
if (parseFloat(this.qty) > parseFloat(this.Container.qty) - CodeNum) {
this.customToast(this.$t('message.Commission_tips4') as string);
return;
}
} else {
if (parseFloat(this.qty) > parseFloat(this.Container.qty) - CodeNum - parseFloat(this.Container.cpRef4)) {
this.customToast(this.$t('message.Commission_tips4') as string);
return;
}
}
let isTrue = true; let isTrue = true;
if (this.LocationList.length != 0) { if (this.LocationList.length != 0) {
this.model.blDetailList[this.someIndex].wlList.forEach((item: any) => { this.model.blDetailList[this.someIndex].wlList.forEach((item: any) => {
@ -341,15 +380,12 @@ export default class RawReceiptDetail extends BasePage {
} }
}); });
} }
if (this.some == {}) {
this.customToast(this.$t('message.AppendMateriel5') as string);
return;
}
if (isTrue == true) { if (isTrue == true) {
let arr = { let arr = {
wlCode: this.wlCode.label, wlCode: this.wlCode.label,
qty: this.qty, qty: this.qty,
Code: this.wlCode.sendSpot, Code: this.wlCode.sendSpot,
barcode: this.Container.barcode,
...this.some, ...this.some,
}; };
this.LocationList.push(arr); this.LocationList.push(arr);

@ -71,14 +71,14 @@ export const detailHeader = [
{ {
label: vm.$t('message.po_MaterielNo'), label: vm.$t('message.po_MaterielNo'),
key: 'materialCode', key: 'materialCode',
width: 177, width: 260,
}, },
{ {
label: vm.$t('message.receiveAStation'), label: vm.$t('message.receiveAStation'),
key: 'sendSpot', key: 'sendSpot',
}, },
{ {
label: vm.$t('message.Production'), label: vm.$t('message.CommissionedLocation'),
key: 'wlCode', key: 'wlCode',
}, },
{ {
@ -86,6 +86,30 @@ export const detailHeader = [
key: 'qty', key: 'qty',
}, },
]; ];
export const RUSdetailHeader = [
{
label: vm.$t('message.po_MaterielNo'),
key: 'materialCode',
width: 260,
},
{
label: vm.$t('message.receiveAStation'),
key: 'sendSpot',
},
{
label: vm.$t('message.CommissionedLocation'),
key: 'wlCode',
},
{
label: vm.$t('message.quantityNum'),
key: 'qty',
},
{
label: vm.$t('message.Container'),
key: 'barcode',
width: 700,
},
];
export const PropoHeader = [ export const PropoHeader = [
{ {
label: vm.$t('message.po_MaterielNo'), label: vm.$t('message.po_MaterielNo'),

@ -19,6 +19,8 @@ export class FeedingModule extends VuexModule {
detailedList: any; detailedList: any;
LocList: any = []; LocList: any = [];
submitListCode: any = ''; submitListCode: any = '';
// 容器码
ContainerCode: any = '';
/** /**
* *
@ -215,8 +217,28 @@ export class FeedingModule extends VuexModule {
loginName: session.loginName, loginName: session.loginName,
barcode, barcode,
}); });
console.log('res', res); const ContainerCode = res.data;
return {}; return { ContainerCode };
}
//俄罗斯补料提交
@Action({ commit: 'clearState' })
async saveBlDetailSubmit(params: any) {
await auth.checkPassword({
factoryCode: session.factoryCode as string,
loginName: session.loginName as string,
rfPwd: params.rfPwd,
});
await http.post(url.bl.uRussia, {
factoryCode: session.factoryCode,
loginName: session.loginName,
...params,
});
uni.showToast({
//icon: "success",
title: 'success',
duration: 2000,
image: '/static/icons/icon-51.png',
});
} }
@Action({ commit: 'updateCheckedOrderInInfoListKw' }) @Action({ commit: 'updateCheckedOrderInInfoListKw' })
async queryByFactoryCodeAndWorkAreaCode(content: any) { async queryByFactoryCodeAndWorkAreaCode(content: any) {

@ -250,6 +250,7 @@ export const url = {
bl: { bl: {
query: '/wmspda/bl/query', query: '/wmspda/bl/query',
u: '/wmspda/bl/u', u: '/wmspda/bl/u',
uRussia: '/wmspda/bl/uRussia',
unlock: '/wmspda/bl/unlock', unlock: '/wmspda/bl/unlock',
}, },
bj: { bj: {

Loading…
Cancel
Save