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

108 lines
2.5 KiB
Vue
Raw Normal View History

2024-03-05 16:29:04 +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-19 10:04:23 +08:00
<uni-data-select v-model="index1" :localdata="options1" @change="selectChange1"></uni-data-select>
2024-03-05 16:29:04 +08:00
</view>
</view>
<view class="filter_item">
<view class="filter_label">子托盘号</view>
<view class="filter_input_wraper">
2024-03-11 10:17:56 +08:00
<search-box
v-model="val2"
/>
2024-03-05 16:29:04 +08:00
</view>
</view>
<view class="filter_item">
<view class="filter_label">母托盘号</view>
<view class="filter_input_wraper">
2024-03-11 10:17:56 +08:00
<search-box
v-model="val3"
/>
2024-03-05 16:29:04 +08:00
</view>
</view>
<view class="filter_item">
<view class="filter_label">重量</view>
<view class="filter_input_wraper">
<input type="number" class="filter_input" v-model="val4">
</view>
</view>
</view>
</view>
<view class="zd-row submit-bar_new">
2024-03-11 10:17:56 +08:00
<button class="zd-col-7 submit-button_c" @tap="toClear">清空</button>
2024-03-19 10:04:23 +08:00
<button class="zd-col-15 submit-button_new" :class="{'btn-disabled': !index1 || !val2 || !val3 || !val4}" :disabled="disabled" @tap="_yclrk">确认</button>
2024-03-05 16:29:04 +08:00
</view>
</view>
</template>
<script>
import NavBar from '@/components/NavBar.vue'
2024-03-07 13:42:45 +08:00
import {pointSearch, yclrk} from '@/utils/getData1.js'
2024-03-11 10:17:56 +08:00
import SearchBox from '@/components/SearchBox.vue'
2024-03-05 16:29:04 +08:00
export default {
components: {
2024-03-11 10:17:56 +08:00
NavBar,
SearchBox
2024-03-05 16:29:04 +08:00
},
data() {
return {
dataList: [],
disabled: false,
2024-03-19 10:04:23 +08:00
options1: [],
index1: '',
2024-03-05 16:29:04 +08:00
val2: '',
val3: '',
val4: ''
};
},
created () {
2024-03-18 10:28:05 +08:00
this._pointSearch('SSX')
2024-03-05 16:29:04 +08:00
},
methods: {
2024-03-19 10:04:23 +08:00
selectChange1 (e) {
this.index1 = 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-05 16:29:04 +08:00
},
toClear () {
2024-03-19 10:04:23 +08:00
this.index1 = ''
2024-03-05 16:29:04 +08:00
this.val2 = ''
2024-03-07 13:42:45 +08:00
this.val3 = ''
this.val4 = ''
2024-03-05 16:29:04 +08:00
},
2024-03-07 13:42:45 +08:00
async _yclrk () {
2024-03-05 16:29:04 +08:00
this.disabled = true
2024-03-19 10:04:23 +08:00
if (!this.index1 || !this.val2 || !this.val3 || !this.val4) {
2024-03-05 16:29:04 +08:00
this.disabled = false
return
}
try {
2024-03-19 10:04:23 +08:00
let res = await yclrk(this.index1, this.val2, this.val3, this.val4)
2024-03-05 16:29:04 +08:00
this.disabled = false
uni.showToast({
title: res.message,
icon: 'none'
})
} catch (e) {
this.disabled = false
}
}
}
}
</script>
<style lang="stylus">
</style>