取放货确认

This commit is contained in:
2026-03-30 14:35:19 +08:00
parent 63489b52a6
commit 34a0a0c73f
6 changed files with 201 additions and 4 deletions

View File

@@ -517,6 +517,13 @@
"navigationStyle": "custom"
}
}
,{
"path" : "pages/hdyy/tygn/qfh-confirm",
"style" :
{
"navigationStyle": "custom"
}
}
,{
"path" : "pages/hdyy/wrcdj/wrc-load",
"style" :

View File

@@ -73,8 +73,8 @@
</view>
<view class="zd-row submit-bar">
<!-- <button class="zd-col-5 button-default" @tap="toEmpty">清空</button> -->
<button class="zd-col-10 button-primary" :class="{'button-info': !val1 || !val2}" :disabled="disabled" @tap="_productionLine('1')">确认出料</button>
<button class="zd-col-10 button-primary" :class="{'button-info': !val1 || !val2}" :disabled="disabled" @tap="_productionLine('0')"></button>
<!-- <button class="zd-col-10 button-primary" :class="{'button-info': !val1 || !val2}" :disabled="disabled" @tap="_productionLine('1')">确认出料</button> -->
<button class="zd-col-22 button-primary" :class="{'button-info': !val1 || !val2}" :disabled="disabled" @tap="_productionLine('0')"></button>
</view>
</view>
</template>

View File

@@ -65,7 +65,8 @@
return {
title: '',
val1: '',
dataList: []
dataList: [],
disabled: false
};
},
onLoad (options) {

View File

@@ -0,0 +1,164 @@
<template>
<view class="zd_container">
<!-- 取放货确认 -->
<nav-bar :title="title"></nav-bar>
<view class="zd_content">
<view class="zd_wrapper">
<view class="zd-row border-bottom">
<view class="zd-col-6">
<span class="filter_label">点位</span>
</view>
<view class="zd-col-18">
<search-box
v-model="val1"
@handleChange="handleChange"
/>
</view>
</view>
</view>
<view class="zd_wrapper grid-wraper">
<view class="slide_new">
<table>
<thead>
<tr>
<th>序号</th>
<th>点位编码</th>
<th>点位名称</th>
<th>是否取货</th>
<th>是否放货</th>
</tr>
</thead>
<tbody>
<tr v-for="(e, i) in dataList" :key="i">
<td>{{i+1}}</td>
<td>{{e.point_code}}</td>
<td>{{e.point_name}}</td>
<td>{{e.get_status}}</td>
<td>{{e.put_status}}</td>
</tr>
</tbody>
</table>
</view>
</view>
</view>
<view class="zd-row submit-bar">
<button class="zd-col-7 button-primary" :class="{'button-info': !dataList.length}" :disabled="disabled" @tap="_putConfirm">放货完成</button>
<button class="zd-col-7 button-primary" :class="{'button-info': !dataList.length}" :disabled="disabled" @tap="_getConfirm">取货完成</button>
<button class="zd-col-7 button-primary" :class="{'button-info': !dataList.length}" :disabled="disabled" @tap="_reduce">复位</button>
</view>
</view>
</template>
<script>
import NavBar from '@/components/NavBar.vue'
import SearchBox from '@/components/SearchBox.vue'
import {queryPointInfo, putConfirm, getConfirm, reduce} from '@/utils/getData3.js'
export default {
components: {
NavBar,
SearchBox
},
data() {
return {
title: '',
val1: '',
dataList: [],
disabled: false
};
},
onLoad (options) {
this.title = options.title
},
methods: {
toEmpty () {
this.val1 = ''
this.dataList = []
this.disabled = false
},
handleChange (e) {
if (e) {
this._queryPointInfo()
}
},
async _queryPointInfo () {
try {
let res = await queryPointInfo(this.val1)
if (res && res.data) {
this.dataList = [...res.data]
} else {
this.dataList = []
uni.showToast({
title: res.message,
icon: 'none'
})
}
} catch (e) {
this.dataList = []
}
},
async _putConfirm () {
this.disabled = true
if (!this.dataList.length) {
this.disabled = false
return
}
try {
let res = await putConfirm(this.dataList)
if (res) {
uni.showToast({
title: res.message,
icon: 'none'
})
}
this.toEmpty()
} catch (e) {
this.disabled = false
}
},
async _getConfirm () {
this.disabled = true
if (!this.dataList.length) {
this.disabled = false
return
}
try {
let res = await getConfirm(this.dataList)
if (res) {
uni.showToast({
title: res.message,
icon: 'none'
})
}
this.toEmpty()
} catch (e) {
this.disabled = false
}
},
async _reduce () {
this.disabled = true
if (!this.dataList.length) {
this.disabled = false
return
}
try {
let res = await reduce(this.dataList)
if (res) {
uni.showToast({
title: res.message,
icon: 'none'
})
}
this.toEmpty()
} catch (e) {
this.disabled = false
}
}
}
}
</script>
<style scoped>
.filter_picker {
text-align: center
}
</style>

View File

@@ -450,6 +450,30 @@ export const queryIvt = (scode, pcode, mcode, pcsn) => request({
data: {sect_code: scode, point_code: pcode, material_code: mcode, pcsn: pcsn}
})
// 取放货确认(通用功能)共 (4) 个
// 扫码查询点位信息
export const queryPointInfo = (pcode) => request({
url:'api/pdaPointAndPoint/queryPointInfo',
data: {point_code: pcode}
})
// 放货完成
export const putConfirm = (rows) => request({
url:'api/pdaPointAndPoint/putConfirm',
data: {rows: rows}
})
// 取货完成
export const getConfirm = (rows) => request({
url:'api/pdaPointAndPoint/getConfirm',
data: {rows: rows}
})
// 复位
export const reduce = (rows) => request({
url:'api/pdaPointAndPoint/reduce',
data: {rows: rows}
})
/**
* 无人车
*/

View File

@@ -61,7 +61,8 @@ export const allAuthority = () => {
{menu_id: '2', title: '作业管理', path: '/pages/hdyy/tygn/work-manage'},
{menu_id: '3', title: '点位更新', path: '/pages/hdyy/tygn/pt-update'},
{menu_id: '4', title: 'AGV管理', path: '/pages/hdyy/tygn/agv-manage'},
{menu_id: '5', title: '库存查询', path: '/pages/hdyy/tygn/kc-query'}
{menu_id: '5', title: '库存查询', path: '/pages/hdyy/tygn/kc-query'},
{menu_id: '6', title: '取放货确认', path: '/pages/hdyy/tygn/qfh-confirm'}
]}
]
}