88 lines
1.9 KiB
Vue
88 lines
1.9 KiB
Vue
<template>
|
|
<view class="zd_container">
|
|
<nav-bar :title="title"></nav-bar>
|
|
<view class="zd_content">
|
|
<view class="zd_wrapper">
|
|
<view class="zd-row border-bottom">
|
|
<view class="zd-col-5">
|
|
<span class="filter_label">当前点位</span>
|
|
</view>
|
|
<view class="zd-col-19">
|
|
<search-box
|
|
v-model="val1"
|
|
/>
|
|
</view>
|
|
</view>
|
|
<view class="zd-row">
|
|
<view class="zd-col-5">
|
|
<span class="filter_label">载具号</span>
|
|
</view>
|
|
<view class="zd-col-19">
|
|
<link-scan ref="scanChild" @getScanlist="getScanlist"/>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
<view class="zd-row submit-bar">
|
|
<button class="zd-col-7 button-default" @tap="clearUp">清空</button>
|
|
<button class="zd-col-15 button-primary" :class="{'button-info': !val1}" :disabled="disabled" @tap="_handheldCageFrame">送回确认</button>
|
|
</view>
|
|
</view>
|
|
</template>
|
|
|
|
<script>
|
|
import NavBar from '@/components/NavBar.vue'
|
|
import SearchBox from '@/components/SearchBox.vue'
|
|
import LinkScan from '@/components/LinkScan.vue'
|
|
import {handheldCageFrame} from '@/utils/getData2.js'
|
|
export default {
|
|
components: {
|
|
NavBar,
|
|
SearchBox,
|
|
LinkScan
|
|
},
|
|
data() {
|
|
return {
|
|
title: '',
|
|
val1: '',
|
|
val2: '',
|
|
disabled: false
|
|
};
|
|
},
|
|
onLoad (options) {
|
|
this.title = options.title
|
|
},
|
|
methods: {
|
|
getScanlist (e) {
|
|
this.val2 = e.join()
|
|
},
|
|
async _handheldCageFrame () {
|
|
this.disabled = true
|
|
if (!this.val1 || !this.val2) {
|
|
this.disabled = false
|
|
return
|
|
}
|
|
try {
|
|
let res = await handheldCageFrame(this.val1, this.val2)
|
|
this.clearUp()
|
|
uni.showToast({
|
|
title: res.message,
|
|
icon: 'none'
|
|
})
|
|
} catch (e) {
|
|
this.disabled = false
|
|
}
|
|
},
|
|
clearUp () {
|
|
this.val1 = ''
|
|
this.val2 = ''
|
|
this.$refs.scanChild.toDel()
|
|
this.disabled = false
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<style lang="stylus">
|
|
</style>
|