新需求
This commit is contained in:
@@ -33,8 +33,8 @@
|
||||
</view>
|
||||
<view class="zd-row submit-bar">
|
||||
<button class="zd-col-4 button-default button-primary_s" @tap="clearUp">清空</button>
|
||||
<button class="zd-col-9 button-primary button-primary_s" :class="{'button-info': !val1 || !val2 || !index}" :disabled="disabled" @tap="_handheldCageFrame">空笼框送回确认</button>
|
||||
<button class="zd-col-9 button-primary button-primary_s" :class="{'button-info': !val1 || !val2}" :disabled="disabled" @tap="_handheldRack">空料架送回确认</button>
|
||||
<button class="zd-col-9 button-primary button-primary_s" :class="{'button-info': !val1 || !val2 || !index}" :disabled="disabled" @tap="_handheldCageFrame('1')">空笼框送回确认</button>
|
||||
<button class="zd-col-9 button-primary button-primary_s" :class="{'button-info': !val1 || !val2}" :disabled="disabled" @tap="_handheldCageFrame('2')">空料架送回确认</button>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user