From 9a014efa2dee3edc0a25ae2a342ae437af0ad7a8 Mon Sep 17 00:00:00 2001 From: zhang_li <2235006734@qqq.com> Date: Fri, 1 Mar 2024 16:52:50 +0800 Subject: [PATCH] =?UTF-8?q?pda=E6=9C=BA=E5=99=A8=E6=89=AB=E7=A0=81?= =?UTF-8?q?=E6=B5=8B=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .hbuilderx/launch.json | 32 +++++++++++++++----------- src/pages/inLocation/addForm.vue | 31 ++++++++++++++++--------- src/pages/inLocation/index.vue | 2 +- src/pages/index.vue | 4 ++-- src/pages/login.vue | 2 +- src/pages/outLocation/addForm.vue | 18 +++++++-------- src/pages/sparePartsReturn/addForm.vue | 29 ++++++++++++++--------- 7 files changed, 69 insertions(+), 49 deletions(-) diff --git a/.hbuilderx/launch.json b/.hbuilderx/launch.json index 582561b..4ccd172 100644 --- a/.hbuilderx/launch.json +++ b/.hbuilderx/launch.json @@ -1,16 +1,20 @@ -{ // launch.json 配置了启动调试时相关设置,configurations下节点名称可为 app-plus/h5/mp-weixin/mp-baidu/mp-alipay/mp-qq/mp-toutiao/mp-360/ - // launchtype项可配置值为local或remote, local代表前端连本地云函数,remote代表前端连云端云函数 - "version": "0.0", - "configurations": [{ - "app-plus" : - { - "launchtype" : "local" - }, - "default" : - { - "launchtype" : "local" - }, - "type" : "uniCloud" - } +{ + // launch.json 配置了启动调试时相关设置,configurations下节点名称可为 app-plus/h5/mp-weixin/mp-baidu/mp-alipay/mp-qq/mp-toutiao/mp-360/ + // launchtype项可配置值为local或remote, local代表前端连本地云函数,remote代表前端连云端云函数 + "version" : "0.0", + "configurations" : [ + { + "app-plus" : { + "launchtype" : "local" + }, + "default" : { + "launchtype" : "local" + }, + "type" : "uniCloud" + }, + { + "playground" : "custom", + "type" : "uni-app:app-android" + } ] } diff --git a/src/pages/inLocation/addForm.vue b/src/pages/inLocation/addForm.vue index 97ac60f..52e2ce9 100644 --- a/src/pages/inLocation/addForm.vue +++ b/src/pages/inLocation/addForm.vue @@ -87,22 +87,17 @@ - - - 扫描 - + - + - - - 扫描 - + + @@ -156,6 +151,7 @@ isShow: false, locationList: [], //备件的库位列表 locationItem: '', //备件账内库 + isFocus:false } }, methods: { @@ -195,8 +191,8 @@ // 重置 reset() { if (this.form.id) { - this.form.classes = ''; - this.form.faultType = '' + this.form.supplierName = '' + this.form.itemNumbers=[] } else { this.form = {} @@ -221,6 +217,7 @@ } this.isPopupShow = true this.isShow = false + this.isFocus = true }, // 添加备件 addSpare() { @@ -301,6 +298,11 @@ if (this.form1.locationNumber) { this.getLocation() } + + }, + // 扫描设备条码 + handelScanMsg() { + this.getLocation() }, // 获取备件信息 getSparePartsInfo() { @@ -308,6 +310,7 @@ number: this.form1.itemNumber, id: this.form.id }).then(res => { + console.log(res) if (!res.data) { this.$modal.showToast('找不到该备件') this.itemNumber = '' @@ -333,6 +336,7 @@ } }).catch((err) => { + console.log(err) this.itemNumber = '' this.form1.areaNumber = '' this.form1.itemName = '' @@ -346,6 +350,11 @@ this.getSparePartsInfo() } }, + // 扫描设备条码 + handelScanMsg1() { + console.log(this.form1.itemNumber) + this.getSparePartsInfo() + }, }, async onLoad(option) { diff --git a/src/pages/inLocation/index.vue b/src/pages/inLocation/index.vue index 34efc8c..9c96de0 100644 --- a/src/pages/inLocation/index.vue +++ b/src/pages/inLocation/index.vue @@ -69,7 +69,7 @@ } else { this.status = 'nomore' } - }) + }).catch(() => {}) }, }, diff --git a/src/pages/index.vue b/src/pages/index.vue index cf76c6a..a7ab660 100644 --- a/src/pages/index.vue +++ b/src/pages/index.vue @@ -106,7 +106,7 @@ this.$modal.confirm('确定注销并退出系统吗?').then(() => { this.$store.dispatch('LogOut').then(() => { this.$tab.reLaunch('/pages/login') - }) + }).catch(() => {}) }) }, handleLogin() { @@ -125,7 +125,7 @@ this.menus1 = this.menus.filter(item=>item.path !== 'itemOut') this.menus2 = this.menus.filter(item=>item.path === 'itemOut') console.log(this.menus2) - }) + }).catch(() => {}) } }, diff --git a/src/pages/login.vue b/src/pages/login.vue index 606a614..7bc75d4 100644 --- a/src/pages/login.vue +++ b/src/pages/login.vue @@ -94,7 +94,7 @@ this.$modal.closeLoading() await this.loginSuccess() // this.$tab.reLaunch('/pages/index') - }) + }).catch(() => {}) }, // 登录成功后,处理函数 async loginSuccess(result) { diff --git a/src/pages/outLocation/addForm.vue b/src/pages/outLocation/addForm.vue index 615a37f..9223ba1 100644 --- a/src/pages/outLocation/addForm.vue +++ b/src/pages/outLocation/addForm.vue @@ -89,10 +89,8 @@ - - - 扫描 - + + @@ -154,7 +152,8 @@ qty: '' }, isShow: false, - isInAccount: 'FALSE' + isInAccount: 'FALSE', + isFocus:false } }, methods: { @@ -194,10 +193,8 @@ // 重置 reset() { if (this.form.id) { - this.form.classes = ''; - this.form.faultType = '' + this.form.subList =[]; } else { - this.form = {} } }, @@ -227,6 +224,7 @@ } this.isPopupShow = true this.isShow= false + this.isFocus = true }, // 添加备件 addSpare() { @@ -304,7 +302,9 @@ this.getLocation() } }, - + handelScanMsg() { + this.getLocation() + }, }, async onLoad(option) { diff --git a/src/pages/sparePartsReturn/addForm.vue b/src/pages/sparePartsReturn/addForm.vue index f845772..a1eabeb 100644 --- a/src/pages/sparePartsReturn/addForm.vue +++ b/src/pages/sparePartsReturn/addForm.vue @@ -58,10 +58,7 @@ - - - 扫描 - + @@ -70,7 +67,7 @@ - + 扫描 @@ -126,6 +123,7 @@ isShow: false, locationList:[],//备件的库位列表 locationItem:'',//备件账内库 + isFocus:false } }, methods: { @@ -165,10 +163,9 @@ // 重置 reset() { if (this.form.id) { - this.form.classes = ''; - this.form.faultType = '' + this.form.reverterId = ''; + this.form.itemNumbers = [] } else { - this.form = {} } }, @@ -191,10 +188,10 @@ // 单列模式点击确定之后 chooseSingleColumn(e) { this.form[this.field] = e[0].value -if(this.field == 'reverterId'){ + if(this.field == 'reverterId'){ this.choosesingleColumnItem = this.singleColumnList.filter(item => item.id == e[0].value) - this.form.reverterName = this.choosesingleColumnItem[0].name -} + this.form.reverterName = this.choosesingleColumnItem[0].name + } this.getApplyDeviceList() this.singleColumnShow = false this.$forceUpdate() @@ -219,6 +216,7 @@ if(this.field == 'reverterId'){ } this.isPopupShow = true this.isShow= false + this.isFocus = true }, // 添加备件 addSpare() { @@ -290,6 +288,10 @@ if(this.field == 'reverterId'){ this.getLocation() } }, + // 扫描设备条码 + handelScanMsg() { + this.getLocation() + }, // 获取备件信息 getSparePartsInfo() { sparePartsApi.getSparePartsReturnInfo({ @@ -332,6 +334,11 @@ if(this.field == 'reverterId'){ this.getSparePartsInfo() } }, + // 扫描设备条码 + handelScanMsg1() { + console.log(this.form1.itemNumber) + this.getSparePartsInfo() + }, }, async onLoad(option) {