This commit is contained in:
2023-04-10 19:35:04 +08:00
parent 9a16443566
commit 49f1e37064

View File

@@ -4,34 +4,18 @@
<view class="search-confirm-wrap"> <view class="search-confirm-wrap">
<view class="search-wrap"> <view class="search-wrap">
<view class="search-item"> <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>
<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"> <view class="filter_input_wraper">
<search-box <search-box
v-model="val2" v-model="val1"
/> />
</view> </view>
</view> </view>
</view> </view>
<view class="confirm-button-wrap"> <view class="confirm-button-wrap">
<button class="confirm-button" @tap="toSearch()">查询</button> <button class="confirm-button" @tap="toSearch()">查询</button>
<button class="confirm-button" :disabled="disabled" @tap="toSure()">强制完成</button>
<button class="confirm-button" :disabled="disabled" @tap="toSure()">重新下发</button>
<button class="confirm-button" :disabled="disabled" @tap="toSure()">确认</button> <button class="confirm-button" :disabled="disabled" @tap="toSure()">确认</button>
</view> </view>
</view> </view>
@@ -77,44 +61,23 @@
}, },
data() { data() {
return { return {
options1: [{text: 'A1', value: 'A1'}, {text: 'A2', value: 'A2'}],
index1: 'A1',
options2: [],
index2: '',
val1: '', val1: '',
val2: '',
dataList: [], dataList: [],
pkId: '', pkId: '',
disabled: false disabled: false
}; };
}, },
created() { created() {
this._getCacheLine('A1') this._cacheLineOutBoxExceptionQuery()
}, },
methods: { methods: {
/** 选择器1 */
selectChange1(e) {
this.index1 = e
if (this.index1) {
this._getCacheLine(e)
}
this.index2 = ''
},
/** 选择器2 */
selectChange2(e) {
this.index2 = e
},
toSearch () { toSearch () {
this.dataList = [] this.dataList = []
this.pkId = '' this.pkId = ''
this._cacheLineOutBoxExceptionQuery() this._cacheLineOutBoxExceptionQuery()
}, },
async _getCacheLine (id) {
let res = await getCacheLine(id)
this.options2 = [...res]
},
async _cacheLineOutBoxExceptionQuery () { async _cacheLineOutBoxExceptionQuery () {
let res = await cacheLineOutBoxExceptionQuery(this.index2, this.val1) let res = await cacheLineOutBoxExceptionQuery()
this.dataList = [...res] this.dataList = [...res]
}, },
async toSure () { async toSure () {
@@ -128,7 +91,7 @@
return return
} }
try { try {
let res = await cacheLineOutBoxExceptionConfirm(this.index2,this.pkId, '2', this.val2, this.index1, this.val1) let res = await cacheLineOutBoxExceptionConfirm(this.val1)
this.disabled = false this.disabled = false
this.toSearch() this.toSearch()
uni.showToast({ uni.showToast({