2023-10-07 09:48:33 +08:00
|
|
|
<template>
|
|
|
|
|
<view class="zd_container">
|
|
|
|
|
<nav-bar title="包装入库"></nav-bar>
|
|
|
|
|
<view class="zd_content">
|
|
|
|
|
<view class="zd_wrapper">
|
|
|
|
|
<view class="filter_item">
|
2024-06-03 13:44:31 +08:00
|
|
|
<view class="filter_label">钢托盘1编码</view>
|
2023-10-07 09:48:33 +08:00
|
|
|
<view class="filter_input_wraper">
|
2024-06-03 13:44:31 +08:00
|
|
|
<search-box v-model="code1" />
|
2023-10-07 14:50:36 +08:00
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="filter_item">
|
|
|
|
|
<view class="filter_label">物料数量</view>
|
|
|
|
|
<view class="filter_input_wraper">
|
2024-06-03 13:44:31 +08:00
|
|
|
<input type="number" class="filter_input" v-model="num1">
|
2023-10-07 09:48:33 +08:00
|
|
|
</view>
|
|
|
|
|
</view>
|
2023-10-18 10:13:33 +08:00
|
|
|
<view class="filter_item">
|
2024-06-03 13:44:31 +08:00
|
|
|
<view class="filter_label">钢托盘2编码</view>
|
2023-10-18 10:13:33 +08:00
|
|
|
<view class="filter_input_wraper">
|
2024-06-03 13:44:31 +08:00
|
|
|
<search-box v-model="code2" />
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="filter_item">
|
|
|
|
|
<view class="filter_label">物料数量</view>
|
|
|
|
|
<view class="filter_input_wraper">
|
|
|
|
|
<input type="number" class="filter_input" v-model="num2">
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="filter_item">
|
|
|
|
|
<view class="filter_label">钢托盘3编码</view>
|
|
|
|
|
<view class="filter_input_wraper">
|
|
|
|
|
<search-box v-model="code3" />
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="filter_item">
|
|
|
|
|
<view class="filter_label">物料数量</view>
|
|
|
|
|
<view class="filter_input_wraper">
|
|
|
|
|
<input type="number" class="filter_input" v-model="num3">
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="filter_item">
|
|
|
|
|
<view class="filter_label">木托盘编码</view>
|
|
|
|
|
<view class="filter_input_wraper">
|
|
|
|
|
<search-box v-model="code4" />
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="filter_item">
|
|
|
|
|
<view class="filter_label">物料数量</view>
|
|
|
|
|
<view class="filter_input_wraper">
|
|
|
|
|
<input type="number" class="filter_input" v-model="num4">
|
2023-10-18 10:13:33 +08:00
|
|
|
</view>
|
|
|
|
|
</view>
|
2023-10-07 09:48:33 +08:00
|
|
|
</view>
|
|
|
|
|
<view class="zd_wrapper grid-wraper">
|
|
|
|
|
<view class="slide_new">
|
|
|
|
|
<table>
|
|
|
|
|
<thead>
|
|
|
|
|
<tr>
|
2023-10-07 14:50:36 +08:00
|
|
|
<th>起点1</th>
|
|
|
|
|
<th>终点1</th>
|
|
|
|
|
<th>起点2</th>
|
|
|
|
|
<th>终点2</th>
|
|
|
|
|
<th>任务状态</th>
|
2023-10-07 09:48:33 +08:00
|
|
|
</tr>
|
|
|
|
|
</thead>
|
|
|
|
|
<tbody>
|
2023-10-07 14:50:36 +08:00
|
|
|
<tr v-for="(e, i) in dataList" :key="i">
|
|
|
|
|
<td>{{e.point_name1}}</td>
|
|
|
|
|
<td>{{e.point_name2}}</td>
|
|
|
|
|
<td>{{e.point_name3}}</td>
|
|
|
|
|
<td>{{e.point_name4}}</td>
|
|
|
|
|
<td>{{e.task_status}}</td>
|
2023-10-07 09:48:33 +08:00
|
|
|
</tr>
|
|
|
|
|
</tbody>
|
|
|
|
|
</table>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
2024-06-03 13:44:31 +08:00
|
|
|
<view class="zd-row submit-bar">
|
|
|
|
|
<button class="zd-col-11 submit-button" @tap="_manualSortingPackingTaskShow">刷新</button>
|
|
|
|
|
<button class="zd-col-11 submit-button" :class="{'btn-disabled': !(((code1 !== '' && num1 !== '') || (code2 !== '' && num2 !== '') || (code3 !== '' && num3 !== '')) && (code4 !== '' && num4 !== ''))}" :disabled="disabled" @tap="toSure">确认</button>
|
2023-10-07 09:48:33 +08:00
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
import NavBar from '@/components/NavBar.vue'
|
2023-10-07 14:50:36 +08:00
|
|
|
import SearchBox from '@/components/SearchBox.vue'
|
|
|
|
|
import {manualSortingPackingTaskShow, manualSortingPackingTask} from '@/utils/getData2.js'
|
2023-10-07 09:48:33 +08:00
|
|
|
export default {
|
|
|
|
|
components: {
|
2023-10-07 14:50:36 +08:00
|
|
|
NavBar,
|
|
|
|
|
SearchBox
|
2023-10-07 09:48:33 +08:00
|
|
|
},
|
|
|
|
|
data() {
|
|
|
|
|
return {
|
2024-06-03 13:44:31 +08:00
|
|
|
code1: '',
|
|
|
|
|
num1: '',
|
|
|
|
|
code2: '',
|
|
|
|
|
num2: '',
|
|
|
|
|
code3: '',
|
|
|
|
|
num3: '',
|
|
|
|
|
code4: '',
|
|
|
|
|
num4: '',
|
2023-10-07 09:48:33 +08:00
|
|
|
dataList: [],
|
|
|
|
|
disabled: false
|
|
|
|
|
};
|
|
|
|
|
},
|
|
|
|
|
created () {
|
2023-10-07 14:50:36 +08:00
|
|
|
this._manualSortingPackingTaskShow()
|
2023-10-07 09:48:33 +08:00
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
|
/** grid查询 */
|
2023-10-07 14:50:36 +08:00
|
|
|
async _manualSortingPackingTaskShow () {
|
|
|
|
|
let res = await manualSortingPackingTaskShow()
|
2023-10-07 09:48:33 +08:00
|
|
|
this.dataList = [...res]
|
|
|
|
|
},
|
|
|
|
|
/** 确认 */
|
|
|
|
|
async toSure () {
|
|
|
|
|
this.disabled = true
|
2024-06-03 13:44:31 +08:00
|
|
|
if (!(((this.code1 !== '' && this.num1 !== '') || (this.code2 !== '' && this.num2 !== '') || (this.code3 !== '' && this.num3 !== '')) && (this.code4 !== '' && this.num4 !== ''))) {
|
2023-10-07 09:48:33 +08:00
|
|
|
this.disabled = false
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
try {
|
2024-06-03 13:44:31 +08:00
|
|
|
let res = await manualSortingPackingTask(this.code1, this.num1, this.code2, this.num2, this.code3, this.num3, this.code4, this.num4)
|
2023-10-07 09:48:33 +08:00
|
|
|
this.disabled = false
|
2024-06-03 13:44:31 +08:00
|
|
|
this.code1 = ''
|
|
|
|
|
this.num2 = ''
|
|
|
|
|
this.code2 = ''
|
|
|
|
|
this.num2 = ''
|
|
|
|
|
this.code3 = ''
|
|
|
|
|
this.num3 = ''
|
|
|
|
|
this.code4 = ''
|
|
|
|
|
this.num4 = ''
|
2023-10-07 14:50:36 +08:00
|
|
|
this._manualSortingPackingTaskShow()
|
2023-10-07 09:48:33 +08:00
|
|
|
uni.showToast({
|
|
|
|
|
title: res.message,
|
|
|
|
|
icon: 'none'
|
|
|
|
|
})
|
|
|
|
|
} catch (e) {
|
|
|
|
|
this.disabled = false
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
</script>
|
|
|
|
|
|
2024-06-03 13:44:31 +08:00
|
|
|
<style lang="stylus" scoped>
|
|
|
|
|
.filter_label
|
|
|
|
|
width 100px
|
2023-10-07 09:48:33 +08:00
|
|
|
</style>
|