diff --git a/src/App.vue b/src/App.vue index fb05661..791dcc8 100644 --- a/src/App.vue +++ b/src/App.vue @@ -96,4 +96,7 @@ page { uni-modal { z-index: 19000; } +.pickerMask { + z-index: 30000 !important; +} diff --git a/src/i18n/lang/cn.ts b/src/i18n/lang/cn.ts index d34bc42..65f802f 100644 --- a/src/i18n/lang/cn.ts +++ b/src/i18n/lang/cn.ts @@ -492,5 +492,6 @@ export default { spareGoods: '备件发货', matcode: '物料编码', Quantity: '需求数量', + scanningContainer: '请先扫描容器码', }, }; diff --git a/src/i18n/lang/en.ts b/src/i18n/lang/en.ts index 79c53a0..8418ac9 100644 --- a/src/i18n/lang/en.ts +++ b/src/i18n/lang/en.ts @@ -497,5 +497,6 @@ export default { spareGoods: 'Spare deliver goods', matcode: 'Mat code', Quantity: 'Request', + scanningContainer: 'Please scan the container code first', }, }; diff --git a/src/pages/product/outbound/SpareDeliverGoods/index.vue b/src/pages/product/outbound/SpareDeliverGoods/index.vue index 2345145..d46431c 100644 --- a/src/pages/product/outbound/SpareDeliverGoods/index.vue +++ b/src/pages/product/outbound/SpareDeliverGoods/index.vue @@ -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 = ''; diff --git a/src/pages/raw/handover/feeding/RUS-Location.vue b/src/pages/raw/handover/feeding/RUS-Location.vue index 92f41dd..2f08daf 100644 --- a/src/pages/raw/handover/feeding/RUS-Location.vue +++ b/src/pages/raw/handover/feeding/RUS-Location.vue @@ -78,7 +78,7 @@ {{ $t('message.product_add') }} - +
@@ -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 = { 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); diff --git a/src/pages/raw/handover/feeding/config.ts b/src/pages/raw/handover/feeding/config.ts index 967e1b1..e1c5a08 100644 --- a/src/pages/raw/handover/feeding/config.ts +++ b/src/pages/raw/handover/feeding/config.ts @@ -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'), diff --git a/src/pages/raw/handover/feeding/model.ts b/src/pages/raw/handover/feeding/model.ts index 86ae063..5dfc4a7 100644 --- a/src/pages/raw/handover/feeding/model.ts +++ b/src/pages/raw/handover/feeding/model.ts @@ -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) { diff --git a/src/utils/url.ts b/src/utils/url.ts index ebf51b9..ff8119d 100644 --- a/src/utils/url.ts +++ b/src/utils/url.ts @@ -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: {