子卷配送套管

This commit is contained in:
2023-01-06 14:50:06 +08:00
parent 7f57f46c04
commit 79daa70791
3 changed files with 73 additions and 5 deletions

View File

@@ -29,7 +29,7 @@
</view>
<view class="filter_item">
<view class="filter_label_wraper">
<span class="filter_label">存放点位</span>
<span class="filter_label">点位</span>
</view>
<view class="filter_input_wraper">
<search-box
@@ -95,6 +95,7 @@
<uni-load-more color="#007AFF" iconType="circle" :status="status" :icon-size="14" :content-text="contentText" v-if="dataList.length > 0"/>
</view>
<view class="submit-bar">
<button class="submit-button" :class="{'btn-disabled': !val1 || !val2}" :disabled="disabled1" @tap="_casingOutConfirm">拔轴确认</button>
<button class="submit-button" :class="{'btn-disabled': !checkArr.length || !val2}" :disabled="disabled" @tap="_casingConfirm">套轴确认</button>
<button class="submit-button" @tap="searchList">查询</button>
</view>
@@ -104,7 +105,7 @@
<script>
import NavBar from '@/components/NavBar.vue'
import SearchBox from '@/components/SearchBox.vue'
import {queryProductArea, queryDeviceByarea, queryMaterialInfo2, casingConfirm} from '@/utils/getData2.js'
import {queryProductArea, queryDeviceByarea, queryMaterialInfo2, casingConfirm, casingOutConfirm} from '@/utils/getData2.js'
export default {
components: {
NavBar,
@@ -132,7 +133,8 @@
},
totalCount: 0,
pageNum: 1,
pageSize: 10
pageSize: 10,
disabled1: false
};
},
created () {
@@ -197,7 +199,7 @@
this.status = 'noMore'
}
},
/** 确认 */
/** 套轴确认 */
async _casingConfirm () {
this.disabled = true
if (!this.checkArr.length || !this.val2) {
@@ -220,6 +222,29 @@
this.disabled = false
}
},
/** 拔轴确认 */
async _casingOutConfirm () {
this.disabled1 = true
if (!this.val1 || !this.val2) {
this.disabled1 = false
return
}
try {
let res = await casingOutConfirm(this.val2, this.val1)
this.disabled1 = false
this.checkArr = []
this.val1 = ''
this.val2 = ''
this.val4 = ''
this.searchList()
uni.showToast({
title: res.message,
icon: 'none'
})
} catch (e) {
this.disabled1 = false
}
},
toCheck (e) {
e.checked = !e.checked
this.checkArr = this.dataList.filter(i => { return i.checked === true })