From 60191a09a3fa41e2499b77bd1015becf2ad1e5f1 Mon Sep 17 00:00:00 2001 From: hou <1601990943@qq.com> Date: Wed, 20 Apr 2022 18:35:52 +0800 Subject: [PATCH] =?UTF-8?q?cosmoim-852=20fix=20=E5=A2=9E=E5=8A=A0=E9=98=B2?= =?UTF-8?q?=E6=8A=96&&=E9=80=80=E6=96=99=E9=97=AE=E9=A2=98=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/i18n/lang/cn.ts | 1 + src/i18n/lang/en.ts | 1 + src/pages/login/login/index.vue | 3 +- src/pages/raw/handover/returning/index.vue | 35 +++++++------ src/pages/raw/ingoods/dnReceipt/ImportDN.vue | 47 ++++++++++++++++-- .../raw/ingoods/dnReceipt/dnReceiving.vue | 49 +++++++++++++++++-- 6 files changed, 108 insertions(+), 28 deletions(-) diff --git a/src/i18n/lang/cn.ts b/src/i18n/lang/cn.ts index ec8e33c..ebc96e2 100644 --- a/src/i18n/lang/cn.ts +++ b/src/i18n/lang/cn.ts @@ -303,6 +303,7 @@ export default { Outbound: '出库库位', Warehousing: '入库库位', PleaseQuantity: '请输入本次数量', + the: '本次数量', CommissionedGoOutDetails: '出库明细', CommissionedDetails: '出库明细', closing: '确认关闭订单?', diff --git a/src/i18n/lang/en.ts b/src/i18n/lang/en.ts index 8cdd663..13a17c6 100644 --- a/src/i18n/lang/en.ts +++ b/src/i18n/lang/en.ts @@ -228,6 +228,7 @@ export default { return_Tip2: 'Factory code cannot be empty', return_Tip3: 'Qty cannot be empty', return_Tip4: 'Return Qty cannot be greater than total Qty', + the: 'The Qty', quantitys: 'Cannot be greater than the quantity to be returned', actual: 'The actual returned quantity is not equal to the quantity to be returned', receiveAStation: 'Receiving', diff --git a/src/pages/login/login/index.vue b/src/pages/login/login/index.vue index 129f19d..55135b4 100644 --- a/src/pages/login/login/index.vue +++ b/src/pages/login/login/index.vue @@ -150,7 +150,7 @@ export default class LoginPage extends BasePage { console.log('image', this.image); console.log('Version////', this.Version); } - Version = '1.0.20'; + Version = '1.0.22'; compareVersion(version1: any, version2: any) { //如果version1 大 会返回1 &&& 如果version2 大 会返回 -1 const newVersion1 = `${version1}`.split('.').length < 3 ? `${version1}`.concat('.0') : `${version1}`; @@ -191,7 +191,6 @@ export default class LoginPage extends BasePage { let downloadApkUrl = session.url; uni.showLoading({ title: vm.$t('message.uploading') as string, - //title: '正在下载中..........', }); ////////////////uni下载方法, uni.downloadFile({ diff --git a/src/pages/raw/handover/returning/index.vue b/src/pages/raw/handover/returning/index.vue index 7aca7b4..966516f 100644 --- a/src/pages/raw/handover/returning/index.vue +++ b/src/pages/raw/handover/returning/index.vue @@ -11,7 +11,7 @@ - {{ $t('message.screen') }} + {{ $t('message.screen') }} - - + @@ -48,12 +47,12 @@ - - + + - + @@ -123,8 +122,10 @@ export default class returningDom extends BasePage { wlCode: '' as any, totalBackAmount: '0', }; + materielAmount: any = ''; prdOrder: any = []; wlCode: any = ''; + materieCode: any = ''; Location: any = []; /** * 工位退料人名称 @@ -155,6 +156,8 @@ export default class returningDom extends BasePage { this.form.materialCode = this.model.orderInInfo.materialCode; this.form.sendSpot = this.model.orderInInfo.sendSpot; this.form.totalBackAmount = this.model.orderInInfo.totalBackAmount; + this.materielAmount = this.model.orderInInfo.amount; + this.materieCode = this.model.materielList[0]; } LocationChoice(e: any) { this.wlCode = e.pickerName; @@ -198,11 +201,12 @@ export default class returningDom extends BasePage { this.$form.resetFields(); } materialConfirm(v: any) { - this.form.materialCode = v[0].value; + this.materieCode = v.pickerName; this.model.materielList.forEach((item: any) => { - if (this.form.materialCode == item.label) { + if (this.materieCode.value == item.label) { this.form.sendSpot = item.sendSpot; this.form.totalBackAmount = item.totalBackAmount; + this.materielAmount = item.amount; } }); } @@ -210,25 +214,16 @@ export default class returningDom extends BasePage { * 上传 */ onSubmit() { - if (this.form.amount > this.model.orderInInfo.amount) { + if (parseFloat(this.form.amount) > parseFloat(this.materielAmount)) { this.customToast(this.$t('message.return_Tip4') as string); } else { this.$form.validate(async (valid: boolean) => { if (!valid) return; - // if (!this.model.orderInInfo.sapFactoryCode) { - // this.customToast(this.$t('message.return_Tip2') as string); - // } - // (this.form.sendSpot as any) = this.model.orderInInfo.sendSpot; (this.form.sapFactoryCode as any) = this.model.orderInInfo.sapFactoryCode; - // delete this.form.wlName; this.form.wlCode = this.wlCode.label; await this.model.tluSubmit(this.form); - // this.$form.resetFields(); this.operatorName = ''; - // this.form.sendSpot = ''; - // this.form.wkposCode = ''; this.model.orderInInfo.sapFactoryCode = ''; - // this.model.materielList = []; this.model.materielList.length = 0; this.empty(); }); @@ -276,13 +271,16 @@ export default class returningDom extends BasePage { font-size: 34rpx; font-weight: 500; text-align: center; + .title { flex: 3; } + .left, .right { flex: 1; } + .icon { display: flex; justify-content: center; @@ -302,6 +300,7 @@ export default class returningDom extends BasePage { padding: 30rpx 0; line-height: 35rpx; } + .newly { display: flex; } diff --git a/src/pages/raw/ingoods/dnReceipt/ImportDN.vue b/src/pages/raw/ingoods/dnReceipt/ImportDN.vue index 777b60d..4de61c8 100644 --- a/src/pages/raw/ingoods/dnReceipt/ImportDN.vue +++ b/src/pages/raw/ingoods/dnReceipt/ImportDN.vue @@ -33,8 +33,8 @@ - + + {{ $t('message.CommissionedMaterielDesc') }} {{ every.materialDesc }} @@ -75,7 +75,7 @@ {{ $t('message.detailed') }} - {{ $t('message.po_Submit') }} + {{ $t('message.po_Submit') }} {{ $t('message.po_Return') }} @@ -397,6 +397,16 @@ export default class dnReceiptDom extends BasePage { this.receiptAmount = null; this.DNReceivingList = []; } + debounce(fun: any, time: any) { + let timer: any; + return function () { + clearTimeout(timer); + let args = arguments; + timer = setTimeout(() => { + fun.apply(this, args); + }, time); + }; + } async onSubmit() { if (this.LocationList.length === 0) { this.customToast(this.$t('message.Commission_tips5') as any); @@ -426,6 +436,9 @@ export default class dnReceiptDom extends BasePage { }); } } + Submit() { + this.debounce(this.onSubmit(), 1000); + } async bill() { if (this.form.documentNo == '') { this.customToast(this.$t('message._tips6') as any); @@ -447,6 +460,7 @@ export default class dnReceiptDom extends BasePage { background-size: 100% 600rpx; padding: 118rpx 30rpx 162rpx; min-height: 100%; + .header { position: fixed; top: 36rpx; @@ -460,13 +474,16 @@ export default class dnReceiptDom extends BasePage { font-size: 34rpx; font-weight: 500; text-align: center; + .title { flex: 3; } + .left, .right { flex: 1; } + .icon { display: flex; justify-content: center; @@ -475,25 +492,30 @@ export default class dnReceiptDom extends BasePage { height: 88rpx; } } + .content { width: 100%; background: white; border-radius: 15rpx; padding: 10rpx; + .single { width: 100%; height: 100rpx; display: flex; + .single-left { width: 80%; height: 100%; display: flex; + view { width: 110rpx; height: 100%; line-height: 100rpx; } } + .single-right { button { margin-top: 15rpx; @@ -502,18 +524,22 @@ export default class dnReceiptDom extends BasePage { } } } + .Purchase-title { width: 100%; + .Purchase { width: 60%; height: 100%; display: flex; + view { width: 140rpx; line-height: 100rpx; } } } + // .material { // width: 100%; // height: 100rpx; @@ -532,25 +558,30 @@ export default class dnReceiptDom extends BasePage { width: 100%; height: 100rpx; display: flex; + .material-left { width: 100%; height: 100%; display: flex; + view { width: 140rpx; line-height: 100rpx; text-align: left; } } + .material-right { width: 100%; height: 100%; display: flex; + .material-right-title { width: 140rpx; height: 100%; line-height: 100rpx; } + .material-right-code { width: 80%; height: 100%; @@ -560,18 +591,22 @@ export default class dnReceiptDom extends BasePage { } } } + .number { height: 100rpx; display: flex; + .number-left { width: 45%; height: 100%; display: flex; + .number-left-title { width: 120rpx; height: 100%; line-height: 100rpx; } + .input { width: 200rpx; height: 70rpx; @@ -579,16 +614,19 @@ export default class dnReceiptDom extends BasePage { margin-left: 15rpx; } } + .number-right { width: 55%; height: 100%; display: flex; + .number-right-title { width: 140rpx; height: 100%; //text-align: center; line-height: 100rpx; } + .input { width: 200rpx; height: 70rpx; @@ -597,6 +635,7 @@ export default class dnReceiptDom extends BasePage { } } } + // .library { // width: 100%; // height: 100rpx; @@ -634,6 +673,7 @@ export default class dnReceiptDom extends BasePage { width: 100%; height: 100rpx; position: relative; + button { position: absolute; top: 10rpx; @@ -641,6 +681,7 @@ export default class dnReceiptDom extends BasePage { } } } + .bottom-bar { position: fixed; bottom: 0; diff --git a/src/pages/raw/ingoods/dnReceipt/dnReceiving.vue b/src/pages/raw/ingoods/dnReceipt/dnReceiving.vue index 5e757f4..4475061 100644 --- a/src/pages/raw/ingoods/dnReceipt/dnReceiving.vue +++ b/src/pages/raw/ingoods/dnReceipt/dnReceiving.vue @@ -33,8 +33,8 @@ - + + {{ $t('message.CommissionedMaterielDesc') }} {{ every.materialDesc }} @@ -76,7 +76,7 @@ {{ $t('message.detailed') }} - {{ $t('message.po_Submit') }} + {{ $t('message.po_Submit') }} {{ $t('message.po_Return') }} @@ -400,6 +400,16 @@ export default class dnReceiptDom extends BasePage { this.receiptAmount = null; this.DNReceivingList = []; } + debounce(fun: any, time: any) { + let timer: any; + return function () { + clearTimeout(timer); + let args = arguments; + timer = setTimeout(() => { + fun.apply(this, args); + }, time); + }; + } async onSubmit() { if (this.LocationList.length === 0) { this.customToast(this.$t('message.Commission_tips5') as any); @@ -417,9 +427,7 @@ export default class dnReceiptDom extends BasePage { loginName: session.loginName, }, success: (res: any) => { - console.log(res.data); if (res.data.code != '0' && res.data.list != null) { - // this.empty(); this.resetForm(); } else if (res.data.code == '0' && res.data.list == null) { this.empty(); @@ -429,6 +437,9 @@ export default class dnReceiptDom extends BasePage { }); } } + Submit() { + this.debounce(this.onSubmit(), 1000); + } async bill() { if (this.form.documentNo == '') { this.customToast(this.$t('message._tips6') as any); @@ -450,6 +461,7 @@ export default class dnReceiptDom extends BasePage { background-size: 100% 600rpx; padding: 118rpx 30rpx 162rpx; min-height: 100%; + .header { position: fixed; top: 36rpx; @@ -463,13 +475,16 @@ export default class dnReceiptDom extends BasePage { font-size: 34rpx; font-weight: 500; text-align: center; + .title { flex: 3; } + .left, .right { flex: 1; } + .icon { display: flex; justify-content: center; @@ -478,25 +493,30 @@ export default class dnReceiptDom extends BasePage { height: 88rpx; } } + .content { width: 100%; background: white; border-radius: 15rpx; padding: 10rpx; + .single { width: 100%; height: 100rpx; display: flex; + .single-left { width: 80%; height: 100%; display: flex; + view { width: 110rpx; height: 100%; line-height: 100rpx; } } + .single-right { button { margin-top: 15rpx; @@ -505,18 +525,22 @@ export default class dnReceiptDom extends BasePage { } } } + .Purchase-title { width: 100%; + .Purchase { width: 60%; height: 100%; display: flex; + view { width: 140rpx; line-height: 100rpx; } } } + // .material { // width: 100%; // height: 100rpx; @@ -535,25 +559,30 @@ export default class dnReceiptDom extends BasePage { width: 100%; height: 100rpx; display: flex; + .material-left { width: 100%; height: 100%; display: flex; + view { width: 140rpx; line-height: 100rpx; text-align: left; } } + .material-right { width: 100%; height: 100%; display: flex; + .material-right-title { width: 140rpx; height: 100%; line-height: 100rpx; } + .material-right-code { width: 80%; height: 100%; @@ -563,18 +592,22 @@ export default class dnReceiptDom extends BasePage { } } } + .number { height: 100rpx; display: flex; + .number-left { width: 45%; height: 100%; display: flex; + .number-left-title { width: 120rpx; height: 100%; line-height: 100rpx; } + .input { width: 200rpx; height: 70rpx; @@ -582,16 +615,19 @@ export default class dnReceiptDom extends BasePage { margin-left: 15rpx; } } + .number-right { width: 55%; height: 100%; display: flex; + .number-right-title { width: 140rpx; height: 100%; //text-align: center; line-height: 100rpx; } + .input { width: 200rpx; height: 70rpx; @@ -600,6 +636,7 @@ export default class dnReceiptDom extends BasePage { } } } + // .library { // width: 100%; // height: 100rpx; @@ -637,6 +674,7 @@ export default class dnReceiptDom extends BasePage { width: 100%; height: 100rpx; position: relative; + button { position: absolute; top: 10rpx; @@ -644,6 +682,7 @@ export default class dnReceiptDom extends BasePage { } } } + .bottom-bar { position: fixed; bottom: 0;