From c4c013d39dfa390d020e9da2759c825833fd8586 Mon Sep 17 00:00:00 2001 From: guoshuang Date: Fri, 4 Nov 2022 13:29:14 +0800 Subject: [PATCH] =?UTF-8?q?cosmoim-852=20fix=20=E4=BF=84=E7=BD=97=E6=96=AF?= =?UTF-8?q?=E5=8D=8A=E6=88=90=E5=93=81=E7=9B=98=E7=82=B9=E6=96=B9=E5=BC=8F?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/login/login/index.vue | 15 ++++- .../Semi-finished-inventory/index.vue | 55 +++++++++++++++++-- .../Semi-finished-inventory/model.ts | 33 ++++++++++- 3 files changed, 93 insertions(+), 10 deletions(-) diff --git a/src/pages/login/login/index.vue b/src/pages/login/login/index.vue index b828c55..c1da8f4 100644 --- a/src/pages/login/login/index.vue +++ b/src/pages/login/login/index.vue @@ -151,14 +151,25 @@ export default class LoginPage extends BasePage { const languages = ['cn', 'en', 'ru']; this.$i18n.locale = languages[index]; } - + Version = ''; onReady(): void { this.$form.setRules(this.rules); //this.update(); console.log('image', this.image); console.log('Version////', this.Version); } - Version = '1.1.1'; + //不同国家设置不同版本号 + onShow(): void { + console.log('......', server.serverAddress); + if (server.serverAddress.includes('https://eurmom.haier.net')) { + //修改俄罗斯版本号 + this.Version = '1.1.3'; + } else { + this.Version = '1.0.36'; + } + console.log('////', this.Version); + } + //console.log('......', server.serverAddress); compareVersion(version1: any, version2: any) { //如果version1 大 会返回1 &&& 如果version2 大 会返回 -1 const newVersion1 = `${version1}`.split('.').length < 3 ? `${version1}`.concat('.0') : `${version1}`; diff --git a/src/pages/raw/Semi-finished/Semi-finished-inventory/index.vue b/src/pages/raw/Semi-finished/Semi-finished-inventory/index.vue index 97ae3bc..a34522c 100644 --- a/src/pages/raw/Semi-finished/Semi-finished-inventory/index.vue +++ b/src/pages/raw/Semi-finished/Semi-finished-inventory/index.vue @@ -35,10 +35,13 @@ - - - + + + + @@ -62,6 +65,7 @@ import { BasePage } from '@/components/base/page'; import { VForm } from 'vue/types/form'; import model from './model'; import jPicker from '@/components/J-Picker/jPicker.vue'; +//import { indexOf } from 'lodash'; @Component({ components: { jPicker, @@ -73,6 +77,7 @@ export default class rawMaterialInventory extends BasePage { index() { this.toPage(this.page.raw.index); } + barcode: any = ''; pddNo: any = ''; spQty: any = ''; productItem: any = {}; @@ -163,6 +168,47 @@ export default class rawMaterialInventory extends BasePage { back() { uni.navigateBack({ delta: 1 }); } + async onSearchBarcode() { + if (this.pddNo == '' || this.pddNo.length == 0) { + this.customToast(this.$t('message.Commission_tips1') as string); + return; + } + if (this.barcode == '' || this.barcode.length == 0) { + this.customToast(this.$t('message.barcode') as string); + return; + } + // let params = { + // barcode:this.barcode, + // // loginName: this.session.loginName, + // // factoryCode: this.session.factoryCode, + // // orderNo: this.orderNo, + // // orderItem: this.histroyItem.orderItem, + // // productCode: this.histroyItem.productCode, + // // productDescZh: this.histroyItem.productDescZh, + // // orderType: this.histroyItem.orderType, + // // barcode: this.barcode, + // // locCode: this.remove.value, + // }; + await this.model.rawMaterialInventoryCheckBarcode(this.barcode); + if (this.model.SubmitCode == '1') { + //this.customToast(this.$t('message.Warehouse_Tip9') as string); + if (JSON.stringify(this.model.InventoryList).indexOf(this.model.Semifedcode) != -1) { + this.model.InventoryList.forEach((item: any) => { + if (item.productCode == this.model.Semifedcode) { + this.productItem = item; + this.productItem.spQty += 1; + } + }); + } else { + this.customToast(this.$t('message.Nomatch') as string); + } + // this.barcode = ''; + // this.histroyItem = {}; + // this.productCodeList = {}; + // this.model.empty(); + // await this.query(); + } + } } @@ -235,8 +281,5 @@ export default class rawMaterialInventory extends BasePage { box-shadow: 0 1rpx 20rpx 0 rgba(128, 128, 128, 0.2); padding: 20rpx; } - - .button-bar { - } } diff --git a/src/pages/raw/Semi-finished/Semi-finished-inventory/model.ts b/src/pages/raw/Semi-finished/Semi-finished-inventory/model.ts index bfd6ae5..3b45a06 100644 --- a/src/pages/raw/Semi-finished/Semi-finished-inventory/model.ts +++ b/src/pages/raw/Semi-finished/Semi-finished-inventory/model.ts @@ -50,7 +50,8 @@ export class ReceiptModule extends VuexModule { orderInInfoListEx: OrderInInfo[] = []; InventoryList: any = []; InventoryItemList: any = []; - + Semifedcode: any = {}; + SubmitCode: any = ''; /** * 库位列表 */ @@ -167,6 +168,7 @@ export class ReceiptModule extends VuexModule { loginName: session.loginName, }); const InventoryList = res.data; + const SubmitCode = res.code; const InventoryItemList = []; InventoryList.forEach((item: any) => { const arr = { @@ -175,7 +177,34 @@ export class ReceiptModule extends VuexModule { }; InventoryItemList.push(arr); }); - return { InventoryList, InventoryItemList }; + return { SubmitCode, InventoryList, InventoryItemList }; + // uni.showToast({ + // icon: "none", + // title: msg, + // }); + } + /** + * 查询条码 + * 查询盘点条码 + * @param barcode + */ + @MutationAction + async rawMaterialInventoryCheckBarcode(barcode: string) { + const res: any = await http.post(url.material.rawMaterialInventory.checkRaw, { + barcode, + factoryCode: session.factoryCode, + loginName: session.loginName, + }); + const Semifedcode = res.data; + // const InventoryItemList = []; + // InventoryList.forEach((item: any) => { + // const arr = { + // value: item.productCode, + // label: item.productCode, + // }; + // InventoryItemList.push(arr); + // }); + return { Semifedcode }; // uni.showToast({ // icon: "none", // title: msg,