89 lines
2.2 KiB
Vue
89 lines
2.2 KiB
Vue
<template>
|
|
<view class="zd_container">
|
|
<nav-bar title="原材料出库"></nav-bar>
|
|
<view class="zd_content">
|
|
<view class="zd_wrapper">
|
|
<view class="filter_item">
|
|
<view class="filter_label">起始点位</view>
|
|
<view class="filter_input_wraper">
|
|
<input type="text" class="filter_input" v-model="val1" disabled>
|
|
</view>
|
|
</view>
|
|
<view class="filter_item">
|
|
<view class="filter_label">回温模式</view>
|
|
<view class="filter_input_wraper">
|
|
<uni-data-select v-model="index1" :localdata="options1" @change="selectChange1"></uni-data-select>
|
|
</view>
|
|
</view>
|
|
<view class="filter_item">
|
|
<view class="filter_label">回温时间</view>
|
|
<view class="filter_input_wraper">
|
|
<input type="number" class="filter_input" v-model="val2">
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
<view class="zd-row submit-bar_new">
|
|
<button class="zd-col-5 submit-button_c" @tap="toClear">清空</button>
|
|
<button class="zd-col-13 submit-button_new" :class="{'btn-disabled': !val1 || this.index1 || !val2}" :disabled="disabled" @tap="_yclck">确认</button>
|
|
</view>
|
|
</view>
|
|
</template>
|
|
|
|
<script>
|
|
import NavBar from '@/components/NavBar.vue'
|
|
import {pointSearch, yclck} from '@/utils/getData1.js'
|
|
export default {
|
|
components: {
|
|
NavBar
|
|
},
|
|
data() {
|
|
return {
|
|
dataList: [],
|
|
disabled: false,
|
|
options1: [{value: '0',text: '普通'}, {value: '1',text: '快速'}],
|
|
index1: '',
|
|
val1: '',
|
|
val2: ''
|
|
};
|
|
},
|
|
created () {
|
|
this._pointSearch('yl')
|
|
},
|
|
methods: {
|
|
selectChange1 (e) {
|
|
this.index1 = e
|
|
},
|
|
/** 点位查询 */
|
|
async _pointSearch (a) {
|
|
let res = await pointSearch(a)
|
|
this.val1 = res.list.point_code
|
|
},
|
|
toClear () {
|
|
this.val1 = ''
|
|
this.val2 = ''
|
|
},
|
|
async _yclck () {
|
|
this.disabled = true
|
|
if (!this.val1 || this.index1 || !this.val2) {
|
|
this.disabled = false
|
|
return
|
|
}
|
|
try {
|
|
let res = await yclck(this.val1, this.index1, this.val2)
|
|
this.disabled = false
|
|
uni.showToast({
|
|
title: res.message,
|
|
icon: 'none'
|
|
})
|
|
} catch (e) {
|
|
this.disabled = false
|
|
}
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<style lang="stylus">
|
|
</style>
|