Files
hht-tongbo/pages/ProductManage/BakeProcess.vue

88 lines
2.2 KiB
Vue
Raw Normal View History

2022-10-11 08:39:10 +08:00
<template>
2022-10-13 14:44:45 +08:00
<view class="container">
<nav-bar title="烘烤工序"></nav-bar>
<view class="content">
<view class="wrapper">
<view class="filter_item">
<view class="filter_label_wraper">
<span class="filter_label">点位</span>
</view>
<view class="filter_input_wraper">
<search-box v-model="val1" />
</view>
</view>
<view class="filter_item">
<view class="filter_label_wraper">
<span class="filter_label">母卷</span>
</view>
<view class="filter_input_wraper">
<search-box v-model="val2" />
</view>
</view>
<view class="filter_item">
<view class="filter_label">温度</view>
<view class="filter_input_wraper">
2022-10-14 16:05:55 +08:00
<input type="text" class="filter_input" v-model="val3">
2022-10-13 14:44:45 +08:00
</view>
</view>
<view class="filter_item">
<view class="filter_label">时间</view>
<view class="filter_input_wraper">
2022-10-14 16:05:55 +08:00
<input type="text" class="filter_input" v-model="val4">
2022-10-13 14:44:45 +08:00
</view>
</view>
</view>
</view>
<view class="submit-bar">
<button class="submit-button" :class="{'btn-disabled': !val1 || !val2}" :disabled="disabled" @tap="_ovenInAndOut('1')">入箱</button>
<button class="submit-button" :class="{'btn-disabled': !val1 || !val2}" :disabled="disabled" @tap="_ovenInAndOut('2')">出箱</button>
</view>
2022-10-11 08:39:10 +08:00
</view>
</template>
<script>
2022-10-13 14:44:45 +08:00
import NavBar from '@/components/NavBar.vue'
import SearchBox from '@/components/SearchBox.vue'
import {ovenInAndOut} from '@/utils/getData1.js'
2022-10-11 08:39:10 +08:00
export default {
2022-10-13 14:44:45 +08:00
components: {
NavBar,
SearchBox
},
2022-10-11 08:39:10 +08:00
data() {
return {
2022-10-13 14:44:45 +08:00
val1: '',
val2: '',
val3: '',
val4: '',
disabled: false
2022-10-11 08:39:10 +08:00
};
2022-10-13 14:44:45 +08:00
},
methods: {
handleChange (e) {
console.log(e)
},
async _ovenInAndOut (type) {
this.disabled = true
if (!this.val1 || !this.val2 ||!this.val3 || !this.val4) {
this.disabled = false
return
}
try {
let res = await ovenInAndOut(this.val1, this.val2,this.val3, this.val4, type)
uni.showToast({
title: res.desc,
icon: 'none'
})
this.disabled = false
} catch (e) {
this.disabled = false
}
}
2022-10-11 08:39:10 +08:00
}
}
</script>
<style lang="stylus">
</style>