From f2c9f1b8964f90dd1b1d2a4a8b95bc7ed2f351c5 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E8=94=A1=E7=8E=B2?=
<8702040+cai-ling@user.noreply.gitee.com>
Date: Fri, 6 Sep 2024 10:51:49 +0800
Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E9=9C=80=E6=B1=82?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
pages/manage/area-lock.vue | 49 +++++++++++--------------------
pages/manage/empty-tray-back.vue | 37 +++++++++--------------
pages/manage/mater-in-storage.vue | 27 ++++++-----------
utils/getData2.js | 8 ++---
utils/mork2.js | 2 +-
5 files changed, 45 insertions(+), 78 deletions(-)
diff --git a/pages/manage/area-lock.vue b/pages/manage/area-lock.vue
index f688f1e..b69c035 100644
--- a/pages/manage/area-lock.vue
+++ b/pages/manage/area-lock.vue
@@ -3,36 +3,25 @@
-
+
区域一
-
-
-
-
-
- 区域二
-
-
-
-
-
-
-
- 区域三
-
-
-
+
-
-
+
+
@@ -50,10 +39,9 @@
data() {
return {
title: '',
- options1: [],
- index1: '',
- index2: '',
- index3: '',
+ options: [],
+ index: [],
+ multiple: true,
disabled: false
};
},
@@ -64,20 +52,19 @@
methods: {
async _regionList () {
let res = await regionList()
- this.options1 = [...res.content]
- this.options1.map(el => {
+ this.options = [...res.content]
+ this.options.map(el => {
this.$set(el, 'text', el.label)
})
},
async _handheldLock (type) {
this.disabled = true
- if (this.index1 === '' && this.index2 === '' && this.index3 === '') {
+ if (this.index.length === 0) {
this.disabled = false
return
}
try {
- let arr = [this.index1, this.index2, this.index3]
- let res = await handheldLock(arr, type)
+ let res = await handheldLock(this.index, type)
this.clearUp()
uni.showToast({
title: res.message,
@@ -88,9 +75,7 @@
}
},
clearUp () {
- this.index1 = ''
- this.index2 = ''
- this.index3 = ''
+ this.index = []
this.disabled = false
}
}
diff --git a/pages/manage/empty-tray-back.vue b/pages/manage/empty-tray-back.vue
index a61556d..a503471 100644
--- a/pages/manage/empty-tray-back.vue
+++ b/pages/manage/empty-tray-back.vue
@@ -33,8 +33,8 @@
-
-
+
+
@@ -43,7 +43,7 @@
import NavBar from '@/components/NavBar.vue'
import SearchBox from '@/components/SearchBox.vue'
import LinkScan from '@/components/LinkScan.vue'
- import {handheldCageFrame, handheldRack} from '@/utils/getData2.js'
+ import {handheldCageFrame} from '@/utils/getData2.js'
export default {
components: {
NavBar,
@@ -67,31 +67,22 @@
getScanlist (e) {
this.val2 = e.join()
},
- async _handheldCageFrame () {
+ async _handheldCageFrame (type) {
this.disabled = true
- if (!this.val1 || !this.val2 || !this.index) {
+ if (type === '1' && (!this.val1 || !this.val2 || !this.index)) {
+ this.disabled = false
+ return
+ }
+ if (type === '2' && (!this.val1 || !this.val2)) {
this.disabled = false
return
}
try {
- let res = await handheldCageFrame(this.val1, this.val2, this.index)
- this.clearUp()
- uni.showToast({
- title: res.message,
- icon: 'none'
- })
- } catch (e) {
- this.disabled = false
- }
- },
- async _handheldRack () {
- this.disabled = true
- if (!this.val1 || !this.val2) {
- this.disabled = false
- return
- }
- try {
- let res = await handheldRack(this.val1, this.val2)
+ if (type === '1') {
+ let res = await handheldCageFrame(type, this.val1, this.val2, this.index)
+ } else if (type === '2') {
+ let res = await handheldCageFrame(type, this.val1, this.val2, '')
+ }
this.clearUp()
uni.showToast({
title: res.message,
diff --git a/pages/manage/mater-in-storage.vue b/pages/manage/mater-in-storage.vue
index 550ab41..a4bbb5d 100644
--- a/pages/manage/mater-in-storage.vue
+++ b/pages/manage/mater-in-storage.vue
@@ -67,8 +67,8 @@
-
-
+
+
@@ -76,7 +76,7 @@