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

120 lines
3.1 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">
2024-04-28 16:12:49 +08:00
<view class="filter_label_wraper">
<span class="filter_label">起始点位</span>
</view>
<view class="filter_input_wraper">
<zxz-uni-data-select v-model="index1" filterable :localdata="options1" @inputChange="inputChange1" @change="selectChange1"></zxz-uni-data-select>
</view>
</view>
<!-- <view class="filter_item">
2024-03-06 10:10:13 +08:00
<view class="filter_label">起始点位</view>
<view class="filter_input_wraper">
2024-03-19 10:04:23 +08:00
<uni-data-select v-model="index1" :localdata="options1" @change="selectChange1"></uni-data-select>
2024-03-06 10:10:13 +08:00
</view>
2024-04-28 16:12:49 +08:00
</view> -->
2024-03-06 10:10:13 +08:00
<view class="filter_item">
<view class="filter_label">回温模式</view>
<view class="filter_input_wraper">
2024-03-19 10:04:23 +08:00
<uni-data-select v-model="index2" :localdata="options2" @change="selectChange2"></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>
2024-04-08 10:47:09 +08:00
<view class="filter_item">
<view class="filter_label">工单号</view>
<view class="filter_input_wraper">
<input type="number" class="filter_input" v-model="val3">
</view>
</view>
2024-03-06 10:10:13 +08:00
</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>
2024-04-22 11:27:20 +08:00
<button class="zd-col-15 submit-button_new" :class="{'btn-disabled': !index1 || !index2 || !val2 || !val3}" :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-19 10:04:23 +08:00
options1: [],
2024-03-07 13:42:45 +08:00
index1: '',
2024-03-19 10:04:23 +08:00
options2: [{value: '0',text: '普通'}, {value: '1',text: '快速'}],
index2: '',
2024-04-08 10:47:09 +08:00
val2: '',
val3: ''
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-04-28 16:12:49 +08:00
inputChange1 (e) {
// console.log(e)
},
selectChange1(e) {
if (e) {
this.index1 = e.point_code
}
2024-03-06 10:10:13 +08:00
},
2024-04-28 16:12:49 +08:00
// selectChange1 (e) {
// this.index1 = e
// },
2024-03-19 10:04:23 +08:00
selectChange2 (e) {
this.index2 = e
},
/** 点位查询 下拉框显示 */
2024-03-07 13:42:45 +08:00
async _pointSearch (a) {
let res = await pointSearch(a)
2024-03-19 10:04:23 +08:00
this.options1 = [...res]
this.options1.map(el => {
this.$set(el, 'value', el.point_code)
this.$set(el, 'text', el.point_name)
})
2024-03-06 10:10:13 +08:00
},
toClear () {
2024-03-19 10:04:23 +08:00
this.index1 = ''
2024-03-06 10:10:13 +08:00
this.val2 = ''
},
2024-03-07 13:42:45 +08:00
async _yclck () {
2024-03-06 10:10:13 +08:00
this.disabled = true
2024-04-22 11:27:20 +08:00
if (!this.index1 || !this.index2 || !this.val2 || !this.val3) {
2024-03-06 10:10:13 +08:00
this.disabled = false
return
}
try {
2024-04-22 11:27:20 +08:00
let res = await yclck(this.index1, this.index2, this.val2, this.val3)
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>