Files
hht-gaoce-uni/pages/modules/rawmater-outstore.vue

89 lines
2.2 KiB
Vue
Raw Normal View History

2024-03-06 10:10:13 +08:00
<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">
2024-03-18 10:25:46 +08:00
<input type="text" class="filter_input" v-model="val1" disabled>
2024-03-06 10:10:13 +08:00
</view>
</view>
<view class="filter_item">
<view class="filter_label">回温模式</view>
<view class="filter_input_wraper">
2024-03-07 13:42:45 +08:00
<uni-data-select v-model="index1" :localdata="options1" @change="selectChange1"></uni-data-select>
2024-03-06 10:10:13 +08:00
</view>
</view>
<view class="filter_item">
<view class="filter_label">回温时间</view>
<view class="filter_input_wraper">
2024-03-07 13:42:45 +08:00
<input type="number" class="filter_input" v-model="val2">
2024-03-06 10:10:13 +08:00
</view>
</view>
</view>
</view>
<view class="zd-row submit-bar_new">
2024-03-18 13:16:37 +08:00
<button class="zd-col-7 submit-button_c" @tap="toClear">清空</button>
<button class="zd-col-15 submit-button_new" :class="{'btn-disabled': !val1 || index1 || !val2}" :disabled="disabled" @tap="_yclck">确认</button>
2024-03-06 10:10:13 +08:00
</view>
</view>
</template>
<script>
import NavBar from '@/components/NavBar.vue'
2024-03-07 13:42:45 +08:00
import {pointSearch, yclck} from '@/utils/getData1.js'
2024-03-06 10:10:13 +08:00
export default {
components: {
NavBar
},
data() {
return {
dataList: [],
disabled: false,
2024-03-07 13:42:45 +08:00
options1: [{value: '0',text: '普通'}, {value: '1',text: '快速'}],
index1: '',
2024-03-06 10:10:13 +08:00
val1: '',
2024-03-07 13:42:45 +08:00
val2: ''
2024-03-06 10:10:13 +08:00
};
},
created () {
2024-03-18 10:28:05 +08:00
this._pointSearch('YL')
2024-03-06 10:10:13 +08:00
},
methods: {
2024-03-07 13:42:45 +08:00
selectChange1 (e) {
this.index1 = e
2024-03-06 10:10:13 +08:00
},
2024-03-07 13:42:45 +08:00
/** 点位查询 */
async _pointSearch (a) {
let res = await pointSearch(a)
2024-03-18 13:16:37 +08:00
this.val1 = res[0].point_code
2024-03-06 10:10:13 +08:00
},
toClear () {
this.val1 = ''
this.val2 = ''
},
2024-03-07 13:42:45 +08:00
async _yclck () {
2024-03-06 10:10:13 +08:00
this.disabled = true
2024-03-07 13:42:45 +08:00
if (!this.val1 || this.index1 || !this.val2) {
2024-03-06 10:10:13 +08:00
this.disabled = false
return
}
try {
2024-03-07 13:42:45 +08:00
let res = await yclck(this.val1, this.index1, this.val2)
2024-03-06 10:10:13 +08:00
this.disabled = false
uni.showToast({
title: res.message,
icon: 'none'
})
} catch (e) {
this.disabled = false
}
}
}
}
</script>
<style lang="stylus">
</style>