Files
hht-huaxiang-uni/pages/manage/smck.vue

93 lines
2.0 KiB
Vue
Raw Permalink Normal View History

2025-05-13 15:23:07 +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">
2025-05-22 16:03:37 +08:00
<view class="zd-col-7">
<span class="filter_label">木托盘编码</span>
2025-05-13 15:23:07 +08:00
</view>
2025-05-22 16:03:37 +08:00
<view class="zd-col-17 filter_select">
2025-05-13 15:23:07 +08:00
<search-box
v-model="val1"
/>
</view>
</view>
</view>
</view>
<view class="zd-row submit-bar">
2025-07-03 11:01:26 +08:00
<button class="zd-col-6 button-default" @tap.stop="clearUp">清空</button>
<button class="zd-col-15 button-primary" :class="{'button-info': !val1}" :disabled="disabled1" @tap="toSure1">入库</button>
<!-- <button class="zd-col-8 button-primary" :class="{'button-info': !val1}" :disabled="disabled2" @tap="toSure2">出库</button> -->
2025-05-13 15:23:07 +08:00
</view>
</view>
</template>
<script>
import NavBar from '@/components/NavBar.vue'
import SearchBox from '@/components/SearchBox.vue'
2025-05-13 18:09:14 +08:00
import {pdaSmck} from '@/utils/getData2.js'
2025-05-13 15:23:07 +08:00
export default {
components: {
NavBar,
SearchBox
},
data() {
return {
title: '',
val1: '',
2025-05-22 16:03:37 +08:00
disabled1: false,
disabled2: false
2025-05-13 15:23:07 +08:00
};
},
onLoad (options) {
this.title = options.title
},
methods: {
2025-05-13 18:09:14 +08:00
clearUp () {
this.val1 = null
2025-05-22 16:03:37 +08:00
this.disabled1 = false
this.disabled2 = false
2025-05-13 15:23:07 +08:00
},
2025-05-22 16:03:37 +08:00
toSure1 () {
this.disabled1 = true
if (!this.val1) {
this.disabled1 = false
return
}
this._pdaSmck('1')
},
toSure2 () {
this.disabled2 = true
if (!this.val1) {
this.disabled2 = false
return
}
this._pdaSmck('2')
},
async _pdaSmck (type) {
2025-05-13 15:23:07 +08:00
try {
2025-05-22 16:03:37 +08:00
let res = await pdaSmck(this.val1, type)
this.disabled1 = false
this.disabled2 = false
2025-05-13 15:23:07 +08:00
this.val1 = ''
uni.showToast({
title: res.message,
icon: 'none'
})
} catch (e) {
2025-05-22 16:03:37 +08:00
this.disabled1 = false
this.disabled2 = false
2025-05-13 15:23:07 +08:00
}
}
}
}
</script>
<style lang="stylus">
@import '../../common/style/mixin.styl';
.msg_wrapper
height auto
min-height 30%
</style>