工序
This commit is contained in:
@@ -1,19 +1,87 @@
|
||||
<template>
|
||||
<view>
|
||||
|
||||
<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">
|
||||
<input type="text" class="filter_input" v-model="val3" disabled>
|
||||
</view>
|
||||
</view>
|
||||
<view class="filter_item">
|
||||
<view class="filter_label">时间</view>
|
||||
<view class="filter_input_wraper">
|
||||
<input type="text" class="filter_input" v-model="val4" disabled>
|
||||
</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>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import NavBar from '@/components/NavBar.vue'
|
||||
import SearchBox from '@/components/SearchBox.vue'
|
||||
import {ovenInAndOut} from '@/utils/getData1.js'
|
||||
export default {
|
||||
components: {
|
||||
NavBar,
|
||||
SearchBox
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
||||
val1: '',
|
||||
val2: '',
|
||||
val3: '',
|
||||
val4: '',
|
||||
disabled: false
|
||||
};
|
||||
},
|
||||
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
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="stylus">
|
||||
|
||||
</style>
|
||||
|
||||
@@ -1,19 +1,88 @@
|
||||
<template>
|
||||
<view>
|
||||
|
||||
<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">
|
||||
<input type="text" class="filter_input" v-model="val3" disabled>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="submit-bar">
|
||||
<button class="submit-button" :class="{'btn-disabled': !val1 || !val2}" :disabled="disabled" @tap="_pointOperate">绑定</button>
|
||||
<button class="submit-button" :class="{'btn-disabled': !val1 || !val2}" :disabled="disabled" @tap="_pointOperate">解绑</button>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import NavBar from '@/components/NavBar.vue'
|
||||
import SearchBox from '@/components/SearchBox.vue'
|
||||
import {pointOperate, pointStatusQuery} from '@/utils/getData1.js'
|
||||
export default {
|
||||
components: {
|
||||
NavBar,
|
||||
SearchBox
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
||||
val1: '',
|
||||
val2: '',
|
||||
val3: '',
|
||||
disabled: false
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
handleChange (e) {
|
||||
console.log(e)
|
||||
},
|
||||
/** 查询 */
|
||||
async _pointStatusQuery () {
|
||||
if (!this.val1) {
|
||||
return
|
||||
}
|
||||
let res = await pointStatusQuery(this.val1)
|
||||
this.dataList = [...res.rows]
|
||||
},
|
||||
async _pointOperate () {
|
||||
this.disabled = true
|
||||
if (!this.val1 || !this.val2) {
|
||||
this.disabled = false
|
||||
return
|
||||
}
|
||||
try {
|
||||
let res = await pointOperate(this.val1, this.val2)
|
||||
uni.showToast({
|
||||
title: res.desc,
|
||||
icon: 'none'
|
||||
})
|
||||
this.disabled = false
|
||||
} catch (e) {
|
||||
this.disabled = false
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="stylus">
|
||||
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user