Files
hht-ximenzi-uni/pages/manage/material-transfer.vue

85 lines
1.8 KiB
Vue
Raw Normal View History

2024-08-22 13:34:51 +08:00
<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">
<search-box
v-model="val2"
/>
</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 || !val2}" :disabled="disabled" @tap="_handheldTranshipment">确认</button>
</view>
2024-08-22 13:34:51 +08:00
</view>
</template>
<script>
import NavBar from '@/components/NavBar.vue'
import SearchBox from '@/components/SearchBox.vue'
import {handheldTranshipment} from '@/utils/getData2.js'
2024-08-22 13:34:51 +08:00
export default {
components: {
NavBar,
SearchBox
},
2024-08-22 13:34:51 +08:00
data() {
return {
title: '',
val1: '',
val2: '',
disabled: false
2024-08-22 13:34:51 +08:00
};
},
onLoad (options) {
this.title = options.title
},
methods: {
async _handheldTranshipment () {
this.disabled = true
if (!this.val1 || !this.val2) {
2024-09-05 13:12:53 +08:00
this.disabled = false
return
}
try {
let res = await handheldTranshipment(this.val1, this.val2)
this.clearUp()
uni.showToast({
title: res.message,
icon: 'none'
})
} catch (e) {
this.disabled = false
}
},
clearUp () {
this.val1 = ''
this.val2 = ''
this.disabled = false
}
2024-08-22 13:34:51 +08:00
}
}
</script>
<style lang="stylus">
</style>