生箔add

This commit is contained in:
2022-10-12 17:12:45 +08:00
parent 36d23a7a4b
commit 8fe554f011
4 changed files with 239 additions and 29 deletions

View File

@@ -8,7 +8,7 @@
<span class="filter_label">设备</span>
</view>
<view class="filter_input_wraper">
<input type="text" class="filter_input">
<search-box v-model="val1" />
</view>
</view>
<view class="filter_item">
@@ -16,7 +16,13 @@
<span class="filter_label">母卷</span>
</view>
<view class="filter_input_wraper">
<input type="text" class="filter_input">
<search-box v-model="val2" />
</view>
</view>
<view class="filter_item">
<view class="filter_label">区域</view>
<view class="filter_input_wraper">
<uni-data-select v-model="index" :localdata="options" @change="selectChange"></uni-data-select>
</view>
</view>
</view>
@@ -50,30 +56,62 @@
</view>
</view>
<view class="submit-bar">
<button class="submit-button">查询</button>
<button class="submit-button" :class="{'btn-disabled': !val1 || !val2 || !index}" @tap="_queryRawFoil">查询</button>
</view>
</view>
</template>
<script>
import {queryProductArea, queryRawFoil} from '@/utils/getData1.js'
import NavBar from '@/components/NavBar.vue'
import SearchBox from '@/components/SearchBox.vue'
import {queryProductArea, queryRawFoil} from '@/utils/getData1.js'
export default {
components: {
NavBar
NavBar,
SearchBox
},
data() {
return {
dataList: [{container_name: '1111111'}]
val1: '',
val2: '',
options: [],
index: '',
dataList: []
};
},
created () {
this._queryProductArea()
},
methods: {
handleChange (e) {
console.log(e)
},
/** 选择器 */
selectChange(e) {
this.index = e
},
/** 生产区域下拉框查询 */
async _queryProductArea () {
let res = await queryProductArea()
this.options = [...res.rows]
},
/** 查询 */
async _queryRawFoil () {
if (!this.val1 || !this.val2 || !this.index) {
return
}
let res = await queryRawFoil(this.val1, this.val2, this.options[this.index].value)
this.dataList = [...res.rows]
}
}
}
</script>
<style lang="stylus">
.grid-wraper
height calc(100% - 238rpx)
.slide_new table td:first-child, .slide_new table th:first-child
width 92rpx
.slide_new table td:nth-child(2), .slide_new table th:nth-child(2)
position sticky
left 92rpx
z-index 102
</style>