外协区空料架送回,外协区空笼框送回,物料转运,补空框

This commit is contained in:
2024-08-26 16:31:03 +08:00
parent 6b9756435b
commit e65d303e35
5 changed files with 195 additions and 39 deletions

View File

@@ -4,6 +4,16 @@
<view class="zd_content">
<view class="zd_wrapper">
<view class="zd-row border-bottom">
<view class="zd-col-5">
<span class="filter_label">当前点位</span>
</view>
<view class="zd-col-19">
<search-box
v-model="val1"
/>
</view>
</view>
<view class="zd-row">
<view class="zd-col-5">
<span class="filter_label">载具类型</span>
</view>
@@ -14,22 +24,11 @@
</view>
<uni-icons type="right" size="14" color="#999"></uni-icons>
</view>
<view class="zd-row">
<view class="zd-col-5">
<span class="filter_label">当前点位</span>
</view>
<view class="zd-col-19">
<search-box
v-model="val1"
/>
</view>
</view>
</view>
</view>
<view class="zd-row submit-bar">
<button class="zd-col-7 button-default" @tap="clearUp">清空</button>
<button class="zd-col-15 button-primary" :class="{'button-info': !val1}" :disabled="disabled" @tap="_unbindVehicle">补空确认</button>
<button class="zd-col-15 button-primary" :class="{'button-info': !val1 || index1 === ''}" :disabled="disabled" @tap="_handheldStorehouse">确认</button>
</view>
</view>
</template>
@@ -37,7 +36,7 @@
<script>
import NavBar from '@/components/NavBar.vue'
import SearchBox from '@/components/SearchBox.vue'
import {getVehicleType, bindVehicle, unbindVehicle} from '@/utils/getData2.js'
import {vehicleType, handheldStorehouse} from '@/utils/getData2.js'
export default {
components: {
NavBar,
@@ -54,24 +53,28 @@
},
onLoad (options) {
this.title = options.title
this._vehicleType()
},
methods: {
/** 载具类型下拉框 */
async _getVehicleType () {
let res = await getVehicleType()
this.options1 = [...res]
async _vehicleType () {
let res = await vehicleType()
this.options1 = [...res.content]
this.options1.map(el => {
this.$set(el, 'text', el.label)
})
},
pickerChange (e) {
this.index1 = e.detail.value
},
async _bindVehicle () {
async _handheldStorehouse () {
this.disabled = true
if (!this.val1 || this.index1 === '') {
this.disabled1 = false
return
}
try {
let res = await bindVehicle(this.val1, this.options1[this.index1].value)
let res = await handheldStorehouse(this.val1, this.options1[this.index1].value)
this.clearUp()
uni.showToast({
title: res.message,