子卷出入站

This commit is contained in:
2022-11-09 13:30:32 +08:00
parent 4d19700411
commit ed086b9bd5
13 changed files with 306 additions and 178 deletions

View File

@@ -88,6 +88,7 @@
<view class="submit-bar">
<button class="submit-button" :class="{'btn-disabled': !checkArr.length || checkArr.length > 1}" :disabled="disabled1" @tap="_needVehicle">呼叫载具</button>
<button class="submit-button" :class="{'btn-disabled': !checkArr.length}" :disabled="disabled2" @tap="_shippingConfirm">配送确认</button>
<button class="submit-button" :class="{'btn-disabled': !val3}" :disabled="disabled3" @tap="_returnVehicle">载具送回</button>
<button class="submit-button" @tap="_queryMaterialInfo">查询</button>
</view>
</view>
@@ -96,7 +97,7 @@
<script>
import NavBar from '@/components/NavBar.vue'
import SearchBox from '@/components/SearchBox.vue'
import {queryProductArea, queryMaterialInfo3, needVehicle, shippingConfirm} from '@/utils/getData2.js'
import {queryProductArea, queryMaterialInfo3, needVehicle, shippingConfirm, returnVehicle} from '@/utils/getData2.js'
export default {
components: {
NavBar,
@@ -112,6 +113,7 @@
dataList: [],
disabled1: false,
disabled2: false,
disabled3: false,
checkArr: []
};
},
@@ -142,6 +144,7 @@
})
}
this.dataList = [...res.data]
this.checkArr = this.dataList.filter(i => { return i.checked === true })
},
/** 呼叫载具 */
async _needVehicle () {
@@ -183,6 +186,28 @@
this.disabled2 = false
}
},
/** 载具送回 */
async _returnVehicle () {
this.disabled3 = true
if (!this.val3) {
uni.showToast({
title: '请输入起点',
icon: 'none'
})
this.disabled3 = false
return
}
try {
let res = await returnVehicle(this.val3)
uni.showToast({
title: res.message,
icon: 'none'
})
this.disabled3 = false
} catch (e) {
this.disabled3 = false
}
},
toCheck (e) {
e.checked = !e.checked
this.checkArr = this.dataList.filter(i => { return i.checked === true })