cosmoim-852 fix 新增俄罗斯补料

master
hou 3 years ago
parent 2b1d022f14
commit 952bb42ecb

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

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

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

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

@ -78,7 +78,7 @@
<u-button type="primary" @click="Add">{{ $t('message.product_add') }}</u-button>
</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 class="bottom-bar">
<div class="extra">
@ -128,7 +128,7 @@ import model from './model';
import { session } from '@/store/modules/session';
import { VForm, VFormRules } from 'vue/types/form';
import jPicker from '@/components/J-Picker/jPicker.vue';
import { detailHeader } from './config';
import { RUSdetailHeader } from './config';
import { auth } from '@/store/modules/auth';
@Component({
components: {
@ -159,6 +159,7 @@ export default class RawReceiptDetail extends BasePage {
Location: any = [];
someIndex = 0;
some: any = {};
Container: any = {};
qty: any = '';
form: any = {
documentNo: '',
@ -171,7 +172,7 @@ export default class RawReceiptDetail extends BasePage {
rules: VFormRules<any> = {
amount: [{ required: true, message: this.$t('message.Pi_tip1') as string }],
};
detailHeader = detailHeader;
RUSdetailHeader = RUSdetailHeader;
sapSupplyIdList: any = [];
// async onReady() {
// let content = {
@ -213,6 +214,8 @@ export default class RawReceiptDetail extends BasePage {
this.materialList = [];
this.model.blDetailList.length = 0;
this.LocationList = [];
this.Barcode = '';
this.Container = {};
}
async back() {
if (this.sapSupplyIdList.length != 0) {
@ -232,7 +235,6 @@ export default class RawReceiptDetail extends BasePage {
this.sapSupplyIdList = [];
}
this.LocEmpty();
this.wlCode = this.Location[0];
let inPrdOrderList = this.form.documentNo.split(',');
let params = {
inPrdOrderList,
@ -248,24 +250,9 @@ export default class RawReceiptDetail extends BasePage {
item.wlList = [];
this.sapSupplyIdList.push(item.sapSupplyId);
});
console.log('this.sapSupplyIdList', this.sapSupplyIdList);
this.some = this.model.blDetailList[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) {
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);
return;
}
if (this.materialList.length == 0) {
this.customToast(this.$t('message.AppendMateriel5') as string);
return;
}
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() {
if (this.qty == '' || this.wlCode == '') {
@ -332,6 +344,33 @@ export default class RawReceiptDetail extends BasePage {
this.customToast(this.$t('message.AppendMateriel3') as string);
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;
if (this.LocationList.length != 0) {
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) {
let arr = {
wlCode: this.wlCode.label,
qty: this.qty,
Code: this.wlCode.sendSpot,
barcode: this.Container.barcode,
...this.some,
};
this.LocationList.push(arr);

@ -71,14 +71,14 @@ export const detailHeader = [
{
label: vm.$t('message.po_MaterielNo'),
key: 'materialCode',
width: 177,
width: 260,
},
{
label: vm.$t('message.receiveAStation'),
key: 'sendSpot',
},
{
label: vm.$t('message.Production'),
label: vm.$t('message.CommissionedLocation'),
key: 'wlCode',
},
{
@ -86,6 +86,30 @@ export const detailHeader = [
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 = [
{
label: vm.$t('message.po_MaterielNo'),

@ -19,6 +19,8 @@ export class FeedingModule extends VuexModule {
detailedList: any;
LocList: any = [];
submitListCode: any = '';
// 容器码
ContainerCode: any = '';
/**
*
@ -215,8 +217,28 @@ export class FeedingModule extends VuexModule {
loginName: session.loginName,
barcode,
});
console.log('res', res);
return {};
const ContainerCode = res.data;
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' })
async queryByFactoryCodeAndWorkAreaCode(content: any) {

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

Loading…
Cancel
Save