2025-05-23 15:38:21 +08:00
|
|
|
|
<template>
|
|
|
|
|
|
<view class="zd_container">
|
|
|
|
|
|
<!-- <nav-bar title="空木箱出库"></nav-bar> -->
|
|
|
|
|
|
<nav-bar :title="title"></nav-bar>
|
|
|
|
|
|
<view class="zd_content">
|
|
|
|
|
|
<view class="zd_wrapper">
|
|
|
|
|
|
<view class="filter_item">
|
|
|
|
|
|
<view class="filter_label_wraper">
|
2025-06-06 16:05:31 +08:00
|
|
|
|
<span class="filter_label">{{$t('filter.box-no')}}</span>
|
2025-05-23 15:38:21 +08:00
|
|
|
|
</view>
|
|
|
|
|
|
<view class="filter_input_wraper">
|
|
|
|
|
|
<search-box v-model="val1" @handleChange="handleChange1" />
|
|
|
|
|
|
</view>
|
|
|
|
|
|
</view>
|
2026-01-21 18:59:24 +08:00
|
|
|
|
<view v-if="editValue.length" class="msg_item" style="margin-bottom:16rpx;">{{$t('filter.case-has-scanned')}}:{{editValue.toString()}}</view>
|
2025-06-11 16:28:21 +08:00
|
|
|
|
<view class="filter_item">
|
|
|
|
|
|
<view class="filter_label_wraper">
|
2025-06-13 15:44:52 +08:00
|
|
|
|
<span class="filter_label">{{$t('filter.select-box-num')}}</span>
|
2025-05-23 15:38:21 +08:00
|
|
|
|
</view>
|
2025-06-11 16:28:21 +08:00
|
|
|
|
<view class="filter_input_wraper">
|
|
|
|
|
|
<view class="filter_input" style="font-size: 34rpx; color: #ff6a00;text-align: center;">{{selectedNum}}</view>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
<view class="filter_item">
|
|
|
|
|
|
<view class="filter_label_wraper">
|
2025-06-13 15:44:52 +08:00
|
|
|
|
<span class="filter_label">{{$t('filter.selectable-box-num')}}</span>
|
2025-06-11 16:28:21 +08:00
|
|
|
|
</view>
|
|
|
|
|
|
<view class="filter_input_wraper">
|
|
|
|
|
|
<view class="filter_input" style="font-size: 34rpx; color: #ff6a00;text-align: center;">{{selectedNum}}</view>
|
2025-05-23 15:38:21 +08:00
|
|
|
|
</view>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
<view class="zd_wrapper grid-wraper">
|
|
|
|
|
|
<view class="slide_new">
|
|
|
|
|
|
<table>
|
|
|
|
|
|
<thead>
|
|
|
|
|
|
<tr>
|
2025-06-06 16:05:31 +08:00
|
|
|
|
<th>{{$t('grid.select')}}</th>
|
|
|
|
|
|
<th>{{$t('filter.box-no')}}</th>
|
2026-01-15 10:58:05 +08:00
|
|
|
|
<th>{{$t('filter.box-type')}}</th>
|
2025-06-13 15:44:52 +08:00
|
|
|
|
<th>{{$t('filter.wooden-box-description')}}</th>
|
|
|
|
|
|
<th>{{$t('filter.max-sub-num')}}</th>
|
|
|
|
|
|
<th>{{$t('grid.wooden-box-length')}}</th>
|
|
|
|
|
|
<th>{{$t('grid.wooden-box-width')}}</th>
|
|
|
|
|
|
<th>{{$t('grid.wooden-box-height')}}</th>
|
2025-06-06 16:05:31 +08:00
|
|
|
|
<th>{{$t('filter.vehicle-type')}}</th>
|
2025-06-13 15:44:52 +08:00
|
|
|
|
<th>{{$t('grid.wooden-box-weight')}}</th>
|
|
|
|
|
|
<th>{{$t('filter.storage-location')}}</th>
|
2025-05-23 15:38:21 +08:00
|
|
|
|
</tr>
|
|
|
|
|
|
</thead>
|
|
|
|
|
|
<tbody>
|
|
|
|
|
|
<tr v-for="(e, i) in dataList" :key="i" :class="{'checked': e.checked}" @tap="toCheck(e)">
|
|
|
|
|
|
<td><span class="iconfont icon_unchecked" :class="{'icon_checked': e.checked}"></span></td>
|
|
|
|
|
|
<td>{{e.box_no}}</td>
|
|
|
|
|
|
<td>{{e.material_code}}</td>
|
|
|
|
|
|
<td>{{e.material_name}}</td>
|
|
|
|
|
|
<td>{{e.num}}</td>
|
|
|
|
|
|
<td>{{e.box_length}}</td>
|
|
|
|
|
|
<td>{{e.box_width}}</td>
|
|
|
|
|
|
<td>{{e.box_high}}</td>
|
|
|
|
|
|
<td>{{e.vehicle_type}}</td>
|
|
|
|
|
|
<td>{{e.box_weight}}</td>
|
|
|
|
|
|
<td>{{e.struct_code}}</td>
|
|
|
|
|
|
</tr>
|
|
|
|
|
|
</tbody>
|
|
|
|
|
|
</table>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
<view class="zd-row submitbar">
|
2025-06-06 16:05:31 +08:00
|
|
|
|
<button class="zd-col-6 btn-submit btn-default" @tap="clearUp">{{$t('button.clear')}}</button>
|
2026-01-15 10:58:05 +08:00
|
|
|
|
<button class="zd-col-15 btn-submit btn-success" :class="{'btn-info': !checkArr.length}" :disabled="disabled" @tap="_twoBoxOut">{{$t('button.outstore-confirm')}}</button>
|
2025-05-23 15:38:21 +08:00
|
|
|
|
</view>
|
|
|
|
|
|
<up-top ref="UT" :scrollTop="top"></up-top>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
|
import NavBar from '@/components/NavBar.vue'
|
|
|
|
|
|
import SearchBox from '@/components/SearchBox.vue'
|
|
|
|
|
|
import UpTop from '@/components/upTop.vue'
|
2025-07-03 09:56:11 +08:00
|
|
|
|
import { confirmAction } from '@/utils/utils.js'
|
2025-05-23 15:38:21 +08:00
|
|
|
|
import {twoQueryBoxIvt, twoBoxOut} from '@/utils/getData3.js'
|
|
|
|
|
|
export default {
|
|
|
|
|
|
components: {
|
|
|
|
|
|
NavBar,
|
|
|
|
|
|
SearchBox,
|
|
|
|
|
|
UpTop
|
|
|
|
|
|
},
|
|
|
|
|
|
data() {
|
|
|
|
|
|
return {
|
|
|
|
|
|
title: '',
|
|
|
|
|
|
top: 0,
|
|
|
|
|
|
val1: '',
|
|
|
|
|
|
editValue: [], // 扫描木箱号集合
|
|
|
|
|
|
selectedNum: null, // 已选木箱数
|
|
|
|
|
|
dataList: [],
|
|
|
|
|
|
checkArr: [],
|
|
|
|
|
|
disabled: false
|
|
|
|
|
|
};
|
|
|
|
|
|
},
|
|
|
|
|
|
onPageScroll(e) {
|
|
|
|
|
|
this.$refs.UT.topData(e.scrollTop)
|
|
|
|
|
|
},
|
|
|
|
|
|
onLoad (options) {
|
|
|
|
|
|
this.title = options.title
|
|
|
|
|
|
},
|
|
|
|
|
|
methods: {
|
|
|
|
|
|
handleChange1 (e) {
|
|
|
|
|
|
if (e) {
|
|
|
|
|
|
this._twoQueryBoxIvt(e)
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
async _twoQueryBoxIvt (e) {
|
|
|
|
|
|
try {
|
|
|
|
|
|
let res = await twoQueryBoxIvt(e)
|
|
|
|
|
|
if (res && res.data.length) {
|
|
|
|
|
|
res.data.map(el => {
|
|
|
|
|
|
this.$set(el, 'checked', false)
|
|
|
|
|
|
})
|
|
|
|
|
|
this.dataList = [...this.dataList, ...res.data]
|
|
|
|
|
|
this.editValue.push(this.val1)
|
|
|
|
|
|
}
|
|
|
|
|
|
} catch (e) {
|
|
|
|
|
|
this.val1 = ''
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
toCheck (e) {
|
|
|
|
|
|
e.checked = !e.checked
|
|
|
|
|
|
this.checkArr = this.dataList.filter(i => { return i.checked === true })
|
|
|
|
|
|
this.selectedNum = this.checkArr.length
|
|
|
|
|
|
if (this.selectedNum > 10) {
|
|
|
|
|
|
e.checked = false
|
|
|
|
|
|
this.checkArr = this.dataList.filter(i => { return i.checked === true })
|
|
|
|
|
|
this.selectedNum = this.checkArr.length
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
2025-07-03 09:56:11 +08:00
|
|
|
|
async handleConfirm() {
|
2025-05-23 15:38:21 +08:00
|
|
|
|
if (!this.checkArr.length) {
|
|
|
|
|
|
return
|
|
|
|
|
|
}
|
2026-01-21 11:27:09 +08:00
|
|
|
|
const isConfirmed = await confirmAction(this.$t('toast.prompt'), this.$t('toast.sure-perform-operation'))
|
2025-07-03 09:56:11 +08:00
|
|
|
|
if (isConfirmed) {
|
|
|
|
|
|
this._twoPdaVehicleIn()
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
async _twoBoxOut () {
|
|
|
|
|
|
this.disabled = true
|
2025-05-23 15:38:21 +08:00
|
|
|
|
try {
|
|
|
|
|
|
let res = await twoBoxOut(this.checkArr)
|
|
|
|
|
|
uni.showToast({
|
|
|
|
|
|
title: res.message,
|
|
|
|
|
|
icon: 'none'
|
|
|
|
|
|
})
|
|
|
|
|
|
this.clearUp()
|
|
|
|
|
|
} catch (e) {
|
|
|
|
|
|
this.disabled = false
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
clearUp () {
|
|
|
|
|
|
this.val1 = ''
|
|
|
|
|
|
this.editValue = []
|
|
|
|
|
|
this.selectedNum = null
|
|
|
|
|
|
this.checkArr = []
|
|
|
|
|
|
this.dataList = []
|
|
|
|
|
|
this.disabled = false
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
</script>
|