拆包机搬运

This commit is contained in:
2024-04-09 10:07:54 +08:00
parent f29b104068
commit f95afac0e1
5 changed files with 221 additions and 126 deletions

View File

@@ -22,13 +22,14 @@ uni-button:after {
top: calc(var(--status-bar-height) + 72rpx);
width: 100%;
height: auto;
padding: 20rpx 14rpx 140rpx 14rpx;
// padding: 20rpx 14rpx 140rpx 14rpx;
padding: 0 0 140rpx 0;
}
.zd_wrapper {
width: 100%;
height: auto;
background-color: #fff;
border-radius: 10rpx;
// border-radius: 10rpx;
padding: 22rpx;
margin-bottom: 20rpx;
box-shadow: 0 4rpx 10rpx 2rpx rgba(0,0,0,.1);
@@ -444,4 +445,25 @@ uni-button[disabled]:not([type]), uni-button[disabled][type=default] {
}
.uni-date-x {
background-color: transparent !important
}
//
.tab-item {
position relative
font-size: 30rpx
line-height: 60rpx
color: #a5a5a5
text-align: center
margin: 0 30rpx 20rpx 30rpx
}
.tab-item_active {
color: $red
}
.tab-item_active::after {
position absolute
bottom 0
left 15%
content ''
width 70%
height 4rpx
background-color $red
}

View File

@@ -32,7 +32,7 @@
return {
userName: '',
menuList: [
{id: 1, title: '混碾搬运', icon: 'RF01', path: '/pages/manage/hn-carry'},
{id: 1, title: '拆包机搬运', icon: 'RF01', path: '/pages/manage/hn-carry'},
{id: 2, title: '压机搬运', icon: 'RF02', path: '/pages/manage/press-carry'},
{id: 3, title: '物料报废', icon: 'RF03', path: '/pages/manage/mater-scrap'},
{id: 4, title: '人工分拣', icon: 'RF04', path: '/pages/manage/man-sort'}

View File

@@ -2,7 +2,53 @@
<view class="zd_container">
<nav-bar :title="title"></nav-bar>
<view class="zd_content">
<view class="zd_wrapper grid-wraper">
<view class="zd_wrapper">
<view v-show="tab === 2" class="zd-row border-bottom">
<view class="zd-col-5">
<span class="filter_label">载具编码</span>
</view>
<view class="zd-col-19 filter_select">
<search-box
v-model="val1"
/>
</view>
</view>
<view class="zd-row border-bottom">
<view class="zd-col-5">
<span class="filter_label">点位</span>
</view>
<view class="zd-col-19 filter_select">
<zxz-uni-data-select v-model="index1" filterable :localdata="options1"></zxz-uni-data-select>
</view>
</view>
</view>
<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 v-show="tab === 1" 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 dataList1" :key="e.pointCode" @click="toChose1(e)" :class="{'checked': e.pointCode === pkId1}">
<td>{{e.pointCode}}</td>
<td>{{e.materialCode}}</td>
<td>{{e.instorageTime}}</td>
</tr>
</tbody>
</table>
</view>
</view>
<view v-show="tab === 2" class="zd_wrapper grid-wraper">
<view class="slide_new">
<table>
<thead>
@@ -25,7 +71,7 @@
</tr>
</thead>
<tbody>
<tr v-for="(e, i) in dataList" :key="i" @click="toChose(e)" :class="{'checked': e.workorder_code === pkId}">
<tr v-for="(e, i) in dataList2" :key="i" @click="toChose2(e)" :class="{'checked': e.workorder_code === pkId2}">
<td class="fontcol1">{{e.workorder_code}}</td>
<td>{{e.plan_qty}}</td>
<td>{{e.real_qty}}</td>
@@ -47,43 +93,16 @@
</view>
</view>
</view>
<view class="zd-row submit-bar">
<button class="zd-col-7 button-primary" :class="{'button-info': !pkId}" :disabled="disabled1" @tap="_hnOrderFinish">工单完成</button>
<button class="zd-col-7 button-primary" :class="{'button-info': !pkId}" @tap="toPop">盅入库</button>
<button class="zd-col-7 button-primary" @tap="toPop1">呼叫空</button>
<view v-show="tab === 1" class="zd-row submit-bar">
<button class="zd-col-5 button-default" @tap="index1 = ''">清空</button>
<button class="zd-col-8 button-primary" :class="{'button-info': !pkId1 || !index1}" :disabled="disabled1" @tap="_cbjqlTask">拆包机叫</button>
<button class="zd-col-8 button-primary" :class="{'button-info': !index1}" @tap="show = true">呼叫空</button>
</view>
<view v-show="tab === 2" class="zd-row submit-bar">
<button class="zd-col-6 button-default" @tap="index1 = '', val1 = ''">清空</button>
<button class="zd-col-15 button-primary" :class="{'button-info': !pkId2 || !val1 || !index1}" :disabled="disabled2" @tap="_cbjmlTask">满料入库</button>
</view>
<view class="zd_content msg_wrapper" :class="show ? 'popshow' : 'pophide'">
<view class="pop-line"></view>
<view class="msg_content">
<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 border-bottom">
<view class="zd-col-5">
<span class="filter_label">创建时间</span>
</view>
<view class="zd-col-19">
<view class="example-body">
<uni-datetime-picker type="datetime" v-model="datetimesingle" @change="changeLog" />
</view>
</view>
</view>
</view>
<view class="zd-row submit-bar">
<button class="zd-col-7 button-default" @tap.stop="closePop">关闭</button>
<button class="zd-col-7 button-default" @tap.stop="clearUp">清空</button>
<button class="zd-col-7 button-primary" :class="{'button-info': !val1 || !datetimesingle}" :disabled="disabled2" @tap="_hnmlTask">料盅入库</button>
</view>
</view>
<view v-if="show" class="msg_mask"></view>
<view class="zd_content msg_wrapper" :class="show1 ? 'popshow' : 'pophide'">
<view class="pop-line"></view>
<view class="msg_content">
<view class="zd-row">
@@ -93,18 +112,18 @@
</view>
</view>
<view class="zd-row submit-bar">
<button class="zd-col-11 button-default" @tap.stop="show1 = false">关闭</button>
<button class="zd-col-11 button-primary" :disabled="disabled3" @tap="_hnqkTask">确定</button>
<button class="zd-col-11 button-default" @tap.stop="show = false">关闭</button>
<button class="zd-col-11 button-primary" :disabled="disabled3" @tap="_cbjqkTask">确定</button>
</view>
</view>
<view v-if="show1" class="msg_mask"></view>
<view v-if="show" class="msg_mask"></view>
</view>
</template>
<script>
import NavBar from '@/components/NavBar.vue'
import SearchBox from '@/components/SearchBox.vue'
import {hnWorkOrder,hnOrderFinish,hnmlTask,hnqkTask} from '@/utils/getData2.js'
import {unpackShelfInfo, getCbjPoint, cbjqlTask, hnWorkOrder,cbjmlTask,cbjqkTask} from '@/utils/mork2.js'
export default {
components: {
NavBar,
@@ -112,78 +131,81 @@
},
data() {
return {
dataList: [],
pkId: '',
tab: 1,
options1: [],
index1: '',
dataList1: [],
pkId1: '',
val1: '',
dataList2: [],
pkId2: '',
disabled1: false,
disabled2: false,
disabled3: false,
show: false,
val1: '',
datetimesingle: '',
show1: false
show: false
};
},
onLoad (options) {
this.title = options.title
},
created () {
this._unpackShelfInfo()
this._getCbjPoint()
this._hnWorkOrder()
},
methods: {
changeLog(e) {
console.log('----change事件:', e);
/**货架上未拆包料盅信息 */
async _unpackShelfInfo () {
let res = await unpackShelfInfo()
this.dataList1 = [...res]
},
/** grid */
/** 拆包机点位下拉框*/
async _getCbjPoint () {
let res = await getCbjPoint()
this.options1 = [...res]
},
toChose1 (e) {
this.pkId1 = this.pkId1 === e.pointCode ? '' : e.pointCode
},
/** 拆包机叫料 */
async _cbjqlTask () {
this.disabled1 = true
if (!this.pkId1 || !this.index1) {
this.disabled1 = false
return
}
try {
let res = await cbjqlTask(this.pkId, this.index1)
this.pkId1 = ''
this.disabled1 = false
this._unpackShelfInfo()
uni.showToast({
title: res.message,
icon: 'none'
})
} catch (e) {
this.disabled1 = false
}
},
/** 查询混碾工单 */
async _hnWorkOrder () {
let res = await hnWorkOrder()
this.dataList = [...res]
this.dataList2 = [...res]
},
toChose (e) {
this.pkId = this.pkId === e.workorder_code ? '' : e.workorder_code
toChose2 (e) {
this.pkId2 = this.pkId2 === e.workorder_code ? '' : e.workorder_code
},
async _hnOrderFinish () {
this.disabled1 = true
if (!this.pkId) {
this.disabled1 = false
return
}
try {
let res = await hnOrderFinish(this.pkId)
this.pkId = ''
this.disabled1 = false
this._hnWorkOrder()
uni.showToast({
title: res.message,
icon: 'none'
})
} catch (e) {
this.disabled1 = false
}
},
toPop () {
if (this.pkId) {
this.show = true
}
},
closePop () {
this.show = false
this.clearUp()
},
clearUp () {
this.val1 = ''
this.datetimesingle = ''
},
async _hnmlTask () {
/** 满料入库 */
async _cbjmlTask () {
this.disabled2 = true
if (!this.val1 || !this.datetimesingle) {
if (!this.pkId2 || !this.val1 || !this.index1) {
this.disabled2 = false
return
}
try {
let res = await hnmlTask(this.pkId, this.val1, this.datetimesingle)
let res = await cbjmlTask(this.pkId2, this.val1, this.index1)
this.pkId2 = ''
this.disabled2 = false
this.pkId = ''
this.closePop()
this._hnWorkOrder()
uni.showToast({
title: res.message,
@@ -193,16 +215,13 @@
this.disabled2 = false
}
},
toPop1 () {
this.show1 = true
},
async _hnqkTask () {
/** 呼叫空盅 */
async _cbjqkTask () {
this.disabled3 = true
try {
let res = await hnqkTask()
this.show1 = false
let res = await cbjqkTask(this.index1)
this.show = false
this.disabled3 = false
this._hnWorkOrder()
uni.showToast({
title: res.message,
icon: 'none'

View File

@@ -24,25 +24,38 @@ export const handLogin = (user, password) => request({
/**
* 混碾搬运
*/
// 查询货架上未拆包料盅信息
export const unpackShelfInfo = () => request({
url:'http://192.168.81.130:8011/api/pda/unpackShelfInfo',
data: {}
})
// 查询拆包机点位
export const getCbjPoint = () => request({
url:'http://192.168.81.130:8011/api/pda/getCbjPoint',
data: {}
})
// 拆包机叫料
export const cbjqlTask = (sp, ep) => request({
url:'http://192.168.81.130:8011/api/pda/cbjqlTask',
data: {
startPoint: sp,
endPoint: ep
}
})
// 查询混碾工单
export const hnWorkOrder = () => request({
url:'http://192.168.81.190:8011/api/pda/hnWorkOrder',
data: {}
})
// 混碾工单完成
export const hnOrderFinish = (code) => request({
url:'http://192.168.81.190:8011/api/pda/orderFinish',
data: {orderCode: code}
// 拆包机下料位满料入货架
export const cbjmlTask = (code, bcode, sp) => request({
url:'http://192.168.81.190:8011/api/pda/cbjmlTask',
data: {orderCode: code,barCode: bcode,startPoint: sp}
})
// 拆包机料盅入库
export const hnmlTask = (code, bcode, time) => request({
url:'http://192.168.81.190:8011/api/pda/hnmlTask',
data: {orderCode: code,barCode: bcode,createTime: time}
})
// 拆包机叫空蛊
export const hnqkTask = () => request({
url:'http://192.168.81.190:8011/api/pda/hnqkTask',
data: {}
// 拆包机下料位叫空蛊
export const cbjqkTask = (ep) => request({
url:'http://192.168.81.130:8011/api/pda/cbjqkTask',
data: {endPoint: ep}
})
/**
@@ -58,14 +71,26 @@ export const qzhhjTask = (code) => request({
url:'http://192.168.81.190:8011/api/pda/qzhhjTask',
data: {deviceCode: code}
})
// 查询货架上已拆包料盅信息
export const packShelfInfo = () => request({
url:'http://192.168.81.130:8011/api/pda/packShelfInfo',
data: {}
})
// 困料货架点对点到布料机上料位
export const yzqlTask = (sp, ep) => request({
url:'http://192.168.81.130:8011/api/pda/yzqlTask',
data: {startPoint: sp, endPoint: ep}
})
/**
* 物料报废
*/
// 物料报废
export const materialScrap = () => request({
export const materialScrap = (code) => request({
url:'http://192.168.81.190:8011/api/pda/materialScrap',
data: {}
data: {
barCode: code
}
})
/**

View File

@@ -1,3 +1,39 @@
// 查询货架上未拆包料盅信息
export const unpackShelfInfo = () => {
let res = [
{
"pointCode": "KLHW03",
"materialCode": "ML-60BT",
"instorageTime": "2024-01-11 16:26:55"
}
]
return res
}
// 查询拆包机点位
export const getCbjPoint = () => {
let res = [
{
"value": "CBJKLW",
"text": "拆包机空料位"
},
{
"value": "CBJMLW",
"text": "拆包机满料位"
},
{
"value": "CBJXLW ",
"text": "拆包机下料位"
}
]
return res
}
// 拆包机叫料
export const cbjqlTask = () => {
let res = {
"message": "拆包机缺料请求成功"
}
return res
}
// 查询混碾工单
export const hnWorkOrder = () => {
let res = [
@@ -126,20 +162,13 @@ export const hnWorkOrder = () => {
]
return res
}
// 混碾工单完成
export const hnOrderFinish = () => {
let res = {
"message": "string"
}
return res
}
// 拆包机料盅入库
export const hnmlTask = () => {
// 拆包机下料位满料入货架
export const cbjmlTask = () => {
let res = {"message":"满料入库请求成功"}
return res
}
// 拆包机叫空蛊
export const hnqkTask = () => {
// 拆包机下料位叫空蛊
export const cbjqkTask = () => {
let res = {"message":"空蛊出库请求成功"}
return res
}