压机搬运

This commit is contained in:
2024-04-09 10:39:02 +08:00
parent 4150d11870
commit af2847e92f
4 changed files with 101 additions and 22 deletions

View File

@@ -123,7 +123,7 @@
<script> <script>
import NavBar from '@/components/NavBar.vue' import NavBar from '@/components/NavBar.vue'
import SearchBox from '@/components/SearchBox.vue' import SearchBox from '@/components/SearchBox.vue'
import {unpackShelfInfo, getCbjPoint, cbjqlTask, hnWorkOrder,cbjmlTask,cbjqkTask} from '@/utils/mork2.js' import {unpackShelfInfo, getCbjPoint, cbjqlTask, hnWorkOrder,cbjmlTask,cbjqkTask} from '@/utils/getData2.js'
export default { export default {
components: { components: {
NavBar, NavBar,
@@ -132,6 +132,7 @@
data() { data() {
return { return {
tab: 1, tab: 1,
title: '',
options1: [], options1: [],
index1: '', index1: '',
dataList1: [], dataList1: [],

View File

@@ -2,6 +2,12 @@
<view class="zd_container"> <view class="zd_container">
<nav-bar :title="title"></nav-bar> <nav-bar :title="title"></nav-bar>
<view class="zd_content"> <view class="zd_content">
<view class="zd-row jccenter">
<view class="zd-col-16 zd-row">
<view class="tab-item" :class="{'tab-item_active': tab === 1}" @tap="tab=1">回库</view>
<view class="tab-item" :class="{'tab-item_active': tab === 2}" @tap="tab=2">点对点</view>
</view>
</view>
<view class="zd_wrapper"> <view class="zd_wrapper">
<view class="zd-row border-bottom"> <view class="zd-row border-bottom">
<view class="zd-col-5"> <view class="zd-col-5">
@@ -12,9 +18,34 @@
</view> </view>
</view> </view>
</view> </view>
<view v-show="tab === 2" class="zd_wrapper grid-wraper">
<view class="slide_new">
<table>
<thead>
<tr>
<th>点位编码</th>
<th>产品牌号</th>
<th>入库时间</th>
</tr>
</thead>
<tbody>
<tr v-for="(e, i) in dataList" :key="e.pointCode" @click="toChose(e)" :class="{'checked': e.pointCode === pkId}">
<td>{{e.pointCode}}</td>
<td>{{e.materialCode}}</td>
<td>{{e.instorageTime}}</td>
</tr>
</tbody>
</table>
</view>
</view>
</view> </view>
<view class="zd-row submit-bar"> <view v-show="tab === 1" class="zd-row submit-bar">
<button class="zd-col-22 button-primary" :class="{'button-info': !index1}" :disabled="disabled" @tap="toPop">强制回货架</button> <button class="zd-col-6 button-default" @tap="index1 = ''">清空</button>
<button class="zd-col-15 button-primary" :class="{'button-info': !index1}" :disabled="disabled" @tap="toPop">强制回货架</button>
</view>
<view v-show="tab === 2" class="zd-row submit-bar">
<button class="zd-col-6 button-default" @tap="index1 = ''">清空</button>
<button class="zd-col-15 button-primary" :class="{'button-info': !index1 || !pkId}" :disabled="disabled" @tap="_yzqlTask">请求上料位</button>
</view> </view>
<view class="zd_content msg_wrapper" :class="show ? 'popshow' : 'pophide'"> <view class="zd_content msg_wrapper" :class="show ? 'popshow' : 'pophide'">
<view class="pop-line"></view> <view class="pop-line"></view>
@@ -37,7 +68,7 @@
<script> <script>
import NavBar from '@/components/NavBar.vue' import NavBar from '@/components/NavBar.vue'
import SearchBox from '@/components/SearchBox.vue' import SearchBox from '@/components/SearchBox.vue'
import {yjslwPointList, qzhhjTask} from '@/utils/getData2.js' import {yjslwPointList, qzhhjTask,packShelfInfo,yzqlTask} from '@/utils/getData2.js'
export default { export default {
components: { components: {
NavBar, NavBar,
@@ -45,11 +76,14 @@
}, },
data() { data() {
return { return {
tab: 1,
title: '', title: '',
options1: [], options1: [],
index1: '', index1: '',
show: false, show: false,
disabled: false disabled: false,
dataList: [],
pkId: ''
}; };
}, },
onLoad (options) { onLoad (options) {
@@ -57,6 +91,7 @@
}, },
created () { created () {
this._yjslwPointList() this._yjslwPointList()
this._packShelfInfo()
}, },
methods: { methods: {
/** 下拉框*/ /** 下拉框*/
@@ -69,13 +104,13 @@
this.show = true this.show = true
} }
}, },
/** 强制回货架 */
async _qzhhjTask () { async _qzhhjTask () {
this.disabled = true this.disabled = true
try { try {
let res = await qzhhjTask(this.index1) let res = await qzhhjTask(this.index1)
this.show = false this.show = false
this.disabled = false this.disabled = false
this.index1 = ''
uni.showToast({ uni.showToast({
title: res.message, title: res.message,
icon: 'none' icon: 'none'
@@ -83,7 +118,32 @@
} catch (e) { } catch (e) {
this.disabled = false this.disabled = false
} }
} },
/** 查询货架上已拆包料盅信息 */
async _packShelfInfo () {
let res = await packShelfInfo()
this.dataList = [...res]
},
toChose (e) {
this.pkId = this.pkId === e.pointCode ? '' : e.pointCode
},
/** 困料货架点对点到布料机上料位 */
async _yzqlTask () {
this.disabled = true
try {
let res = await yzqlTask(this.pkId, this.index1)
this.disabled = false
this.pkId = ''
this._packShelfInfo()
uni.showToast({
title: res.message,
icon: 'none'
})
} catch (e) {
this.disabled = false
}
},
} }
} }
</script> </script>

View File

@@ -26,17 +26,17 @@ export const handLogin = (user, password) => request({
*/ */
// 查询货架上未拆包料盅信息 // 查询货架上未拆包料盅信息
export const unpackShelfInfo = () => request({ export const unpackShelfInfo = () => request({
url:'http://192.168.81.130:8011/api/pda/unpackShelfInfo', url:'api/pda/unpackShelfInfo',
data: {} data: {}
}) })
// 查询拆包机点位 // 查询拆包机点位
export const getCbjPoint = () => request({ export const getCbjPoint = () => request({
url:'http://192.168.81.130:8011/api/pda/getCbjPoint', url:'api/pda/getCbjPoint',
data: {} data: {}
}) })
// 拆包机叫料 // 拆包机叫料
export const cbjqlTask = (sp, ep) => request({ export const cbjqlTask = (sp, ep) => request({
url:'http://192.168.81.130:8011/api/pda/cbjqlTask', url:'api/pda/cbjqlTask',
data: { data: {
startPoint: sp, startPoint: sp,
endPoint: ep endPoint: ep
@@ -44,17 +44,17 @@ export const cbjqlTask = (sp, ep) => request({
}) })
// 查询混碾工单 // 查询混碾工单
export const hnWorkOrder = () => request({ export const hnWorkOrder = () => request({
url:'http://192.168.81.190:8011/api/pda/hnWorkOrder', url:'api/pda/hnWorkOrder',
data: {} data: {}
}) })
// 拆包机下料位满料入货架 // 拆包机下料位满料入货架
export const cbjmlTask = (code, bcode, sp) => request({ export const cbjmlTask = (code, bcode, sp) => request({
url:'http://192.168.81.190:8011/api/pda/cbjmlTask', url:'api/pda/cbjmlTask',
data: {orderCode: code,barCode: bcode,startPoint: sp} data: {orderCode: code,barCode: bcode,startPoint: sp}
}) })
// 拆包机下料位叫空蛊 // 拆包机下料位叫空蛊
export const cbjqkTask = (ep) => request({ export const cbjqkTask = (ep) => request({
url:'http://192.168.81.130:8011/api/pda/cbjqkTask', url:'api/pda/cbjqkTask',
data: {endPoint: ep} data: {endPoint: ep}
}) })
@@ -63,22 +63,22 @@ export const cbjqkTask = (ep) => request({
*/ */
// 压机上料位下拉框 // 压机上料位下拉框
export const yjslwPointList = () => request({ export const yjslwPointList = () => request({
url:'http://192.168.81.190:8011/api/pda/yjslwPointList', url:'api/pda/yjslwPointList',
data: {} data: {}
}) })
// 压机上料位强制回货架 // 压机上料位强制回货架
export const qzhhjTask = (code) => request({ export const qzhhjTask = (code) => request({
url:'http://192.168.81.190:8011/api/pda/qzhhjTask', url:'api/pda/qzhhjTask',
data: {deviceCode: code} data: {deviceCode: code}
}) })
// 查询货架上已拆包料盅信息 // 查询货架上已拆包料盅信息
export const packShelfInfo = () => request({ export const packShelfInfo = () => request({
url:'http://192.168.81.130:8011/api/pda/packShelfInfo', url:'api/pda/packShelfInfo',
data: {} data: {}
}) })
// 困料货架点对点到布料机上料位 // 困料货架点对点到布料机上料位
export const yzqlTask = (sp, ep) => request({ export const yzqlTask = (sp, ep) => request({
url:'http://192.168.81.130:8011/api/pda/yzqlTask', url:'api/pda/yzqlTask',
data: {startPoint: sp, endPoint: ep} data: {startPoint: sp, endPoint: ep}
}) })
@@ -87,7 +87,7 @@ export const yzqlTask = (sp, ep) => request({
*/ */
// 物料报废 // 物料报废
export const materialScrap = (code) => request({ export const materialScrap = (code) => request({
url:'http://192.168.81.190:8011/api/pda/materialScrap', url:'api/pda/materialScrap',
data: { data: {
barCode: code barCode: code
} }
@@ -98,21 +98,21 @@ export const materialScrap = (code) => request({
*/ */
// 查询人工分拣点位 // 查询人工分拣点位
export const rgfjPoint = () => request({ export const rgfjPoint = () => request({
url:'http://192.168.81.190:8011/api/pda/rgfjPoint', url:'api/pda/rgfjPoint',
data: {} data: {}
}) })
// 查询缓存货架点位 // 查询缓存货架点位
export const hchjPoint = () => request({ export const hchjPoint = () => request({
url:'http://192.168.81.190:8011/api/pda/hchjPoint', url:'api/pda/hchjPoint',
data: {} data: {}
}) })
// 人工分拣叫料 // 人工分拣叫料
export const rgfjqlTask = (sp, code) => request({ export const rgfjqlTask = (sp, code) => request({
url:'http://192.168.81.190:8011/api/pda/rgfjqlTask', url:'api/pda/rgfjqlTask',
data: {startPoint: sp, deviceCode: code} data: {startPoint: sp, deviceCode: code}
}) })
// 人工分拣送空盘 // 人工分拣送空盘
export const rgfjskTask = (code) => request({ export const rgfjskTask = (code) => request({
url:'http://192.168.81.190:8011/api/pda/rgfjskTask', url:'api/pda/rgfjskTask',
data: {deviceCode: code} data: {deviceCode: code}
}) })

View File

@@ -255,6 +255,24 @@ export const qzhhjTask = (code) => {
let res = {"message":"压制上料位强制回库请求成功"} let res = {"message":"压制上料位强制回库请求成功"}
return res return res
} }
// 查询货架上已拆包料盅信息
export const packShelfInfo = () => {
let res = [
{
"pointCode": "KLHW10",
"materialCode": "MT-14AT",
"instorageTime": "2024-04-07 16:08:59"
}
]
return res
}
// 困料货架点对点到布料机上料位
export const yzqlTask = (sp, ep) => {
let res = {
"message": "布料机上料位请求成功"
}
return res
}
// 物料报废 // 物料报废
export const materialScrap = () => { export const materialScrap = () => {
let res = {"message":"物料作废成功"} let res = {"message":"物料作废成功"}