子卷进站
This commit is contained in:
@@ -4,19 +4,31 @@
|
||||
<view class="zd_content">
|
||||
<view class="zd_wrapper">
|
||||
<view class="filter_item">
|
||||
<view class="filter_label_wraper">
|
||||
<span class="filter_label">点位</span>
|
||||
</view>
|
||||
<view class="filter_label">设备</view>
|
||||
<view class="filter_input_wraper">
|
||||
<search-box
|
||||
v-model="val1"
|
||||
/>
|
||||
<input type="text" class="filter_input" v-model="val1">
|
||||
</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 class="filter_search" :class="{'filter_search_disabled': !val1}" @tap="_devicePointQuery">查询</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>
|
||||
<uni-data-select v-model="index2" :localdata="options2" @change="selectChange2"></uni-data-select>
|
||||
</view>
|
||||
</view>
|
||||
<view class="filter_item">
|
||||
<view class="filter_label_wraper">
|
||||
<span class="filter_label filter_label_1"></span>
|
||||
</view>
|
||||
<view class="filter_input_wraper filter_input_wraper_1">
|
||||
<view class="iconfont icon_unchecked" :class="{'icon_checked': isV === '1'}" @tap="isVirtual"></view>
|
||||
<view class="filter_input_wraper_inn_text">末次下卷</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -75,7 +87,7 @@
|
||||
<script>
|
||||
import NavBar from '@/components/NavBar.vue'
|
||||
import SearchBox from '@/components/SearchBox.vue'
|
||||
import {queryProductArea, queryMaterialInfo4, outConfirm} from '@/utils/getData2.js'
|
||||
import {devicePointQuery, queryProductArea, queryMaterialInfo4, outConfirm} from '@/utils/getData2.js'
|
||||
export default {
|
||||
components: {
|
||||
NavBar,
|
||||
@@ -84,10 +96,11 @@
|
||||
data() {
|
||||
return {
|
||||
val1: '',
|
||||
val2: '',
|
||||
options: [],
|
||||
index: '',
|
||||
qty: '',
|
||||
options1: [],
|
||||
index1: '',
|
||||
options2: [],
|
||||
index2: '',
|
||||
isV: '0',
|
||||
dataList: [],
|
||||
disabled: false,
|
||||
checkArr: []
|
||||
@@ -98,18 +111,37 @@
|
||||
this._queryMaterialInfo()
|
||||
},
|
||||
methods: {
|
||||
/** 末次下卷 */
|
||||
isVirtual () {
|
||||
this.isV = this.isV === '0' ? '1' : '0'
|
||||
},
|
||||
/** 选择器 */
|
||||
selectChange(e) {
|
||||
selectChange1(e) {
|
||||
this.index = e
|
||||
},
|
||||
selectChange2(e) {
|
||||
this.index2 = e
|
||||
},
|
||||
/** 点位下拉框查询 */
|
||||
async _devicePointQuery () {
|
||||
if (!this.val1) {
|
||||
uni.showToast({
|
||||
title: '请输入设备号',
|
||||
icon: 'none'
|
||||
})
|
||||
return
|
||||
}
|
||||
let res = await devicePointQuery(this.val1)
|
||||
this.options1 = [...res.data]
|
||||
},
|
||||
/** 生产区域下拉框查询 */
|
||||
async _queryProductArea () {
|
||||
let res = await queryProductArea()
|
||||
this.options = [...res.data]
|
||||
this.options2 = [...res.data]
|
||||
},
|
||||
/** 初始化查询 */
|
||||
async _queryMaterialInfo () {
|
||||
let res = await queryMaterialInfo4(this.val1, this.index)
|
||||
let res = await queryMaterialInfo4(this.val1, this.index2)
|
||||
res.data.map(el => {
|
||||
this.$set(el, 'checked', false)
|
||||
})
|
||||
@@ -123,13 +155,14 @@
|
||||
return
|
||||
}
|
||||
try {
|
||||
let res = await outConfirm(this.val1, this.checkArr)
|
||||
let res = await outConfirm(this.index1, this.checkArr, this.isV)
|
||||
uni.showToast({
|
||||
title: res.message,
|
||||
icon: 'none'
|
||||
})
|
||||
this.disabled = false
|
||||
this.checkArr = []
|
||||
this.isV = '0'
|
||||
this._queryMaterialInfo()
|
||||
} catch (e) {
|
||||
this.disabled = false
|
||||
|
||||
Reference in New Issue
Block a user