This commit is contained in:
2023-03-30 16:14:01 +08:00
parent 68257c3175
commit 4529bd6476
4 changed files with 126 additions and 74 deletions

View File

@@ -4,17 +4,31 @@
<view class="search-confirm-wrap">
<view class="search-wrap">
<view class="search-item">
<label class="search-label">缓存线</label>
<label class="search-label">生产区域</label>
<view class="filter_input_wraper">
<uni-data-select v-model="index1" :localdata="options1" @change="selectChange1"></uni-data-select>
</view>
</view>
<view class="search-item">
<label class="search-label">车号</label>
<label class="search-label">缓存线</label>
<view class="filter_input_wraper">
<uni-data-select v-model="index2" :localdata="options2" @change="selectChange2"></uni-data-select>
</view>
</view>
<view class="search-item">
<label class="search-label">缓存线位置</label>
<view class="filter_input_wraper">
<input type="text" class="search-input-l" v-model="val1">
</view>
</view>
<view class="search-item">
<label class="search-label">料箱码</label>
<view class="filter_input_wraper">
<search-box
v-model="val2"
/>
</view>
</view>
</view>
<view class="confirm-button-wrap">
<button class="confirm-button" @tap="toSearch()">查询</button>
@@ -28,6 +42,7 @@
<th>选择</th>
<th>指令编号</th>
<th>设备编号</th>
<th>条码</th>
<th>起点</th>
<th>目的</th>
<th>目的2</th>
@@ -40,6 +55,7 @@
</td>
<td>{{e.instructorder_no}}</td>
<td>{{e.wcsdevice_code}}</td>
<td>{{e.vehicle_code}}</td>
<td>{{e.startpoint_code}}</td>
<td>{{e.nextpoint_code}}</td>
<td>{{e.nextpoint_code2}}</td>
@@ -53,7 +69,7 @@
<script>
import NavBar from '@/components/NavBar.vue'
import SearchBox from '@/components/SearchBox.vue'
import {queryInstraction, instOperation} from '@/utils/getData2.js'
import {getCacheLine, cacheLineOutBoxExceptionQuery, cacheLineOutBoxExceptionConfirm} from '@/utils/getData1.js'
export default {
components: {
NavBar,
@@ -61,28 +77,47 @@
},
data() {
return {
options1: [],
index1: '',
options1: [{text: 'A1', value: 'A1'}, {text: 'A2', value: 'A2'}],
index1: 'A1',
options2: [],
index2: '',
val1: '',
val2: '',
dataList: [],
pkId: '',
disabled: false
};
},
created() {
this._getCacheLine('A1')
},
methods: {
/** 选择器1 */
selectChange1(e) {
this.index1 = e
if (this.index1) {
this._getCacheLine(e)
}
this.index2 = ''
},
/** 选择器2 */
selectChange2(e) {
this.index2 = e
},
toSearch () {
this.dataList = []
this._queryInstraction()
this.pkId = ''
this._cacheLineOutBoxExceptionQuery()
},
async _queryInstraction () {
let res = await queryInstraction()
this.dataList = [...res.data]
async _getCacheLine (id) {
let res = await getCacheLine(id)
this.options2 = [...res]
},
toSure () {
async _cacheLineOutBoxExceptionQuery () {
let res = await cacheLineOutBoxExceptionQuery(this.index2, this.val1)
this.dataList = [...res]
},
async toSure () {
this.disabled = true
if (!this.pkId) {
uni.showToast({
@@ -92,11 +127,17 @@
this.disabled = false
return
}
this._instOperation()
},
async _instOperation () {
let res = await instOperation()
this.dataList = [...res.data]
try {
let res = await cacheLineOutBoxExceptionConfirm(this.index2,this.pkId, '2', this.val2, this.index1, this.val1)
this.disabled = false
this.toSearch()
uni.showToast({
title: res.message,
icon: 'none'
})
} catch (e) {
this.disabled = false
}
},
toRadio (e) {
this.pkId = this.pkId === e.instruct_uuid ? '' : e.instruct_uuid