Commit 96db53e1 authored by 李苏's avatar 李苏 💬

道路新增空托出库的功能

parent ba0940ce
...@@ -259,3 +259,21 @@ export function apiGwUnlock(params){ ...@@ -259,3 +259,21 @@ export function apiGwUnlock(params){
return filter(e) return filter(e)
}) })
} }
/* 查询空托盘库位 */
export function queryEmptyTpKw(params){
return http.post("/xgwcs/kwcx/queryEmptyTpKw", params || {}).then(e => {
return filter(e)
})
}
/* 库位分离 */
export function rqflQuery(params){
return http.post("/wms/rqfl/query", params || {}).then(e => {
return filter(e)
})
}
/* 出托 */
export function emptyCall(params){
return http.post("/xgwcs/gwjl/emptyCall", params || {}).then(e => {
return filter(e)
})
}
...@@ -146,6 +146,13 @@ const routes = [ ...@@ -146,6 +146,13 @@ const routes = [
title: '托盘清空', title: '托盘清空',
}, },
}, },
{
path: '/pages/dl_tray_outbound/index',
name: 'trayOutbound',
meta: {
title: '空托出库',
},
},
/* 移入移出 */ /* 移入移出 */
{ {
path: '/pages/dl_outin/index', path: '/pages/dl_outin/index',
......
...@@ -108,6 +108,16 @@ ...@@ -108,6 +108,16 @@
"enablePullDownRefresh": false "enablePullDownRefresh": false
} }
},
/* 空托出库 */
{
"path" : "pages/dl_tray_outbound/index",
"style" :
{
"navigationBarTitleText": "",
"enablePullDownRefresh": false
}
}, },
{ {
"path" : "pages/dl_tray_clear/index", "path" : "pages/dl_tray_clear/index",
......
<template>
<view class="bg-white">
<cu-custom bgColor="bg-gradual-blue" :isBack="true">
<block slot="content">空托出库</block>
<block slot="backText">返回</block>
</cu-custom>
<view class="cu-form-group" style="background: #eee;">
<view class="title ">选择库位</view>
<picker mode="selector" range-key="name" :value="selectedIndex" :range="pickerArray" @change="onPickerChange">
<view style="font-size: 15px;" class="uni-input">{{pickerArray[selectedIndex].name}}</view>
</picker>
</view>
<view v-for="(item,index) in wlinfor" :key="index" @click="item.isSelect=!item.isSelect" >
<view class="flex flex-wrap padding bg-grey white radio" style="position: relative;">
<view v-show="item.isSelect" style="position: absolute;right: 10px;top: 45px;color: #fff;font-size: 20px;" class="checkBody">
<text class="lg text-gray checkItem" :class="'cuIcon-check'" ></text>
</view>
<view class="basis-sm margin-top-xs margin-bottom-xs radius">货架<span>{{item.hjname}}</span></view>
<view class="basis-lg margin-top-xs margin-bottom-xs radius">库位:<span>{{item.code}}</span></view>
<view class="basis-sm margin-top-xs margin-bottom-xs radius">托盘类型:<span>{{item.rqflname}}</span></view>
<view class="basis-lg margin-top-xs margin-bottom-xs radius">托盘:<span>{{item.tpcode}}</span></view>
</view>
<view class="cu-form-group" style="min-height: 5px;">
</view>
</view>
<view class="padding flex align-center bg-white justify-around">
<button class="cu-btn bg-gradual-green lg wid50" @tap="isbctz(2)">出库</button>
</view>
</view>
</view>
</template>
<script>
import api from '@/api/api.js';
import {
getTryinfo,
adjustTry,
queryEmptyTpKw,
rqflQuery,
emptyCall
} from '@/api/dlapi.js'
export default {
data() {
return {
app:this,
selected: "",
ystpcode: "",
modalName: "",
tpcode: "",
wlinfor: [],
/* 选择 */
pickerArray: [
{name:'',id:''}
],
// 当前选中值索引
selectedIndex: 0,
}
},
methods: {
// 查询
apiQueryEmptyTpKw(id){
queryEmptyTpKw({rqflid:id}).then(data=>{
let record=data.records
this.wlinfor=record.map(item=>{
item.isSelect=false
return item
})
})
},
onPickerChange(event) {
// 获取选中值索引
const index = event.detail.value
// 设置选中值名称
this.selectedIndex=index
this.apiQueryEmptyTpKw(this.pickerArray[index].id)
/* 做出托盘查询请求*/
},
// api出调整
apiadjustTry(){
let arrList=this.wlinfor.filter(item=>{
return item.isSelect
})
console.log(arrList)
if(arrList.length==0){
this.$tip.alert('请选择一条数据进行操作')
return
}
let params={
data:arrList
}
emptyCall(params).then(
res=>{
if(res){
this.$tip.alert('操作成功')
/* 重新查询 */
this.apiQueryEmptyTpKw(this.pickerArray[this.selectedIndex].id)
}
}
)
},
isbctz() {
let that=this
uni.showModal({
title: '提示',
content: '是否进行空托出库',
cancelText: "否", // 取消按钮的文字
confirmText: "是", // 确认按钮的文字
success: function (res) {
if (res.confirm) {
that.apiadjustTry()
} else if (res.cancel) {
}
}
});
},
hideModal() {
this.modalName = ""
},
// 弹框
confirm(e) {
this.modalName = "DialogModal" + e
},
// 删除确认
deldata(item, index) {
let that=this
uni.showModal({
title: '提示',
content: '是否删除该条信息',
cancelText: "否", // 取消按钮的文字
confirmText: "是", // 确认按钮的文字
success: function (res) {
if (res.confirm) {
that.wlinfor.splice(that.selected, 1)
} else if (res.cancel) {
}
}
});
},
// 获取托盘信息
},
onLoad(e) {
rqflQuery().then(res=>{
this.pickerArray=res.records
this.pickerArray.unshift({
id:'',
name:'全部'
})
this.apiQueryEmptyTpKw(this.pickerArray[0].id)
})
}
}
</script>
<style scoped>
.checkBody{
background-color:royalblue;
border-radius: 50%;
width: 20px;
height: 20px;
.checkItem{
color: #fff;
}
}
/deep/.uni-numbox-btns {
width: 27.69px !important;
}
.disable {
background-color: #F5F5F5
}
.wid50 {
width: 50%;
}
</style>
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
</view> </view>
<!-- 徐工道路功能列表 --> <!-- 徐工道路功能列表 -->
<view class="padding-sm" v-if="newckglList.length!=0"> <view class="padding-sm" v-if="newckglList.length!=0">
<view class="cu-bar bg-white solid-bottom" > <view class="cu-bar bg-white solid-bottom">
<view class="action text-bold"> <view class="action text-bold">
<text class='cuIcon-title text-blue'></text>仓库管理 <text class='cuIcon-title text-blue'></text>仓库管理
</view> </view>
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
</view> </view>
</view> </view>
<view class="padding-sm" v-if="newgwjlList.length!=0"> <view class="padding-sm" v-if="newgwjlList.length!=0">
<view class="cu-bar bg-white solid-bottom" > <view class="cu-bar bg-white solid-bottom">
<view class="action text-bold"> <view class="action text-bold">
<text class='cuIcon-title text-blue'></text>工位叫料 <text class='cuIcon-title text-blue'></text>工位叫料
</view> </view>
...@@ -44,7 +44,7 @@ ...@@ -44,7 +44,7 @@
</view> </view>
</view> </view>
<view class="padding-sm" v-if="newtpglList.length!=0"> <view class="padding-sm" v-if="newtpglList.length!=0">
<view class="cu-bar bg-white solid-bottom" > <view class="cu-bar bg-white solid-bottom">
<view class="action text-bold"> <view class="action text-bold">
<text class='cuIcon-title text-blue'></text>托盘管理 <text class='cuIcon-title text-blue'></text>托盘管理
</view> </view>
...@@ -63,7 +63,7 @@ ...@@ -63,7 +63,7 @@
</view> </view>
<!-- 移入移出 --> <!-- 移入移出 -->
<view class="padding-sm" v-if="newyrycList.length!=0"> <view class="padding-sm" v-if="newyrycList.length!=0">
<view class="cu-bar bg-white solid-bottom" > <view class="cu-bar bg-white solid-bottom">
<view class="action text-bold"> <view class="action text-bold">
<text class='cuIcon-title text-blue'></text>移库管理 <text class='cuIcon-title text-blue'></text>移库管理
</view> </view>
...@@ -90,13 +90,18 @@ ...@@ -90,13 +90,18 @@
<script> <script>
import api from '@/api/api.js'; import api from '@/api/api.js';
import {us,os} from '@/common/util/work.js' import {
us,
os
} from '@/common/util/work.js'
import tip from '@/common/util/tip.js'; import tip from '@/common/util/tip.js';
import {getPower} from '@/api/dlapi.js' import {
getPower
} from '@/api/dlapi.js'
export default { export default {
name: 'interfacepage', name: 'interfacepage',
props:{ props: {
cur:String, cur: String,
}, },
watch: { watch: {
cur: { cur: {
...@@ -111,166 +116,178 @@ ...@@ -111,166 +116,178 @@
data() { data() {
return { return {
/* 功能列表 */ /* 功能列表 */
ckglList:[ ckglList: [{
{ title: "入库登记",
title:"入库登记", icon: "/static/icon/work.png",
icon:"/static/icon/work.png", useCount: 1000,
useCount:1000, page: "putin_storage"
page:"putin_storage"
}, },
{ {
title:"出库登记", title: "出库登记",
icon:"/static/icon/work3.png", icon: "/static/icon/work3.png",
useCount:1000, useCount: 1000,
page:"putout_storage" page: "putout_storage"
} }
], ],
newckglList:[], newckglList: [],
gwjlList:[ gwjlList: [{
{ title: "工位叫料",
title:"工位叫料", icon: "/static/icon/wl2.png",
icon:"/static/icon/wl2.png", useCount: 1000,
useCount:1000, page: "cmaterial"
page:"cmaterial"
}, },
{ {
title:"清空库位", title: "清空库位",
icon:"/static/icon/adjust.png", icon: "/static/icon/adjust.png",
useCount:1000, useCount: 1000,
page:"kwAdjust" page: "kwAdjust"
} }
], ],
newgwjlList:[], newgwjlList: [],
tpglList:[ tpglList: [{
title: "托盘调整",
icon: "/static/icon/work5.png",
useCount: 1000,
page: "trayAdjust"
},
{ {
title:"托盘调整", title: "清空托盘",
icon:"/static/icon/work5.png", icon: "/static/icon/work6.png",
useCount:1000, useCount: 1000,
page:"trayAdjust" page: "trayClear"
}, },
{ {
title:"清空托盘", "title": "空托出库",
icon:"/static/icon/work6.png", "icon": "/static/icon/off.png",
useCount:1000, "useCount": 1000,
page:"trayClear" "page": "trayOutbound"
} }
], ],
newtpglList:[], newtpglList: [],
/* 移入移出 */ /* 移入移出 */
yrycList:[ yrycList: [{
{ title: "移库",
title:"移库", icon: "/static/icon/work5.png",
icon:"/static/icon/work5.png", useCount: 1000,
useCount:1000, page: "outIn"
page:"outIn" }, ],
}, newyrycList: [],
],
newyrycList:[],
// icon:"/wcs/apps/static/icon/work.png",pc端图标路径 // icon:"/wcs/apps/static/icon/work.png",pc端图标路径
//手机端去除/wcs/xgapps //手机端去除/wcs/xgapps
websock:'', websock: '',
heartCheck:null, heartCheck: null,
lockReconnect:false, lockReconnect: false,
msgCount:0, msgCount: 0,
dot:{ dot: {
mailHome:false mailHome: false
} }
} }
}, },
methods: { methods: {
// api获取权限 // api获取权限
apiGetpower(){ apiGetpower() {
getPower().then(data=>{ getPower().then(data => {
if(data){ if (data) {
let menu=data.menu let menu = data.menu
this.filterMenu(menu,'ckglList','newckglList') this.filterMenu(menu, 'ckglList', 'newckglList')
this.filterMenu(menu,'gwjlList','newgwjlList') this.filterMenu(menu, 'gwjlList', 'newgwjlList')
this.filterMenu(menu,'tpglList','newtpglList') this.filterMenu(menu, 'tpglList', 'newtpglList')
this.filterMenu(menu,'yrycList','newyrycList') /* 开发,后端添加权限时删除该代码 */
this.newtpglList.push({
"title": "空托出库",
"icon": "/static/icon/off.png",
"useCount": 1000,
"page": "trayOutbound"
})
this.filterMenu(menu, 'yrycList', 'newyrycList')
} }
}) })
}, },
filterMenu(menu,oldlist,newlist){ filterMenu(menu, oldlist, newlist) {
this[newlist]=[] this[newlist] = []
menu.forEach(e=>{ menu.forEach(e => {
this[oldlist].forEach(a=>{ this[oldlist].forEach(a => {
if(a.title==e.mkmc){ if (a.title == e.mkmc) {
this[newlist].push(a) this[newlist].push(a)
} }
}) })
}) })
}, },
returnPage(){ returnPage() {
this.$Router.replace({name: 'login'}) this.$Router.replace({
name: 'login'
})
}, },
initMenu(){ initMenu() {
// this.initWebSocket(); // this.initWebSocket();
this.loadCount(0); this.loadCount(0);
}, },
goPage(page){ goPage(page) {
if(!page){ if (!page) {
return false; return false;
} }
if(page==='annotationList'){ if (page === 'annotationList') {
this.msgCount = 0 this.msgCount = 0
} }
this.dot[page]=false this.dot[page] = false
this.$Router.push({name: page}) this.$Router.push({
name: page
})
}, },
initWebSocket: function () { initWebSocket: function() {
// WebSocket与普通的请求所用协议有所不同,ws等同于http,wss等同于https // WebSocket与普通的请求所用协议有所不同,ws等同于http,wss等同于https
var userId = this.$store.getters.userid; var userId = this.$store.getters.userid;
var url = this.$config.apiUrl.replace("https://","wss://").replace("http://","ws://")+"/websocket/"+userId; var url = this.$config.apiUrl.replace("https://", "wss://").replace("http://", "ws://") +
"/websocket/" + userId;
this.websock = new WebSocket(url); this.websock = new WebSocket(url);
this.websock.onopen = this.websocketOnopen; this.websock.onopen = this.websocketOnopen;
this.websock.onerror = this.websocketOnerror; this.websock.onerror = this.websocketOnerror;
this.websock.onmessage = this.websocketOnmessage; this.websock.onmessage = this.websocketOnmessage;
this.websock.onclose = this.websocketOnclose; this.websock.onclose = this.websocketOnclose;
}, },
websocketOnopen: function () { websocketOnopen: function() {
//心跳检测重置 //心跳检测重置
//this.heartCheck.reset().start(); //this.heartCheck.reset().start();
}, },
websocketOnerror: function () { websocketOnerror: function() {
this.reconnect(); this.reconnect();
}, },
websocketOnmessage: function (e) { websocketOnmessage: function(e) {
var data = eval("(" + e.data + ")"); //解析对象 var data = eval("(" + e.data + ")"); //解析对象
if(data.cmd == "topic"){ if (data.cmd == "topic") {
//系统通知 //系统通知
this.loadCount('1') this.loadCount('1')
}else if(data.cmd == "user"){ } else if (data.cmd == "user") {
//用户消息 //用户消息
this.loadCount('2') this.loadCount('2')
} else if(data.cmd == 'email'){ } else if (data.cmd == 'email') {
this.loadEmailCount() this.loadEmailCount()
} }
//心跳检测重置 //心跳检测重置
//this.heartCheck.reset().start(); //this.heartCheck.reset().start();
}, },
websocketOnclose: function (e) { websocketOnclose: function(e) {
this.reconnect(); this.reconnect();
}, },
websocketSend(text) { // 数据发送 websocketSend(text) { // 数据发送
try { try {
this.websock.send(text); this.websock.send(text);
} catch (err) { } catch (err) {}
}
}, },
reconnect() { reconnect() {
var that = this; var that = this;
if(that.lockReconnect) return; if (that.lockReconnect) return;
that.lockReconnect = true; that.lockReconnect = true;
//没连接上会一直重连,设置延迟避免请求过多 //没连接上会一直重连,设置延迟避免请求过多
setTimeout(function () { setTimeout(function() {
that.initWebSocket(); that.initWebSocket();
that.lockReconnect = false; that.lockReconnect = false;
}, 5000); }, 5000);
}, },
loadCount(flag){ loadCount(flag) {
/* let url = '/sys/annountCement/listByUser'; /* let url = '/sys/annountCement/listByUser';
this.$http.get(url).then(res=>{ this.$http.get(url).then(res=>{
if(res.data.success){ if(res.data.success){
...@@ -280,11 +297,11 @@ ...@@ -280,11 +297,11 @@
} }
}) */ }) */
}, },
loadEmailCount(){ loadEmailCount() {
this.dot.mailHome = true this.dot.mailHome = true
}, },
getTtemDotInfo(item){ getTtemDotInfo(item) {
if(item.page==='annotationList' && this.msgCount>0){ if (item.page === 'annotationList' && this.msgCount > 0) {
return this.msgCount return this.msgCount
} }
return ''; return '';
...@@ -294,26 +311,34 @@ ...@@ -294,26 +311,34 @@
</script> </script>
<style scoped> <style scoped>
.homepage{ .homepage {
height: 25vh;width: 100%;background-image: url(/static/home/u3.png);background-size: 100% 100%; height: 25vh;
width: 100%;
background-image: url(/static/home/u3.png);
background-size: 100% 100%;
} }
.line2-icon { .line2-icon {
width: 28px; width: 28px;
height: 28px; height: 28px;
} }
.screen-swiper{
height: 90px!important; .screen-swiper {
min-height: 90px!important; height: 90px !important;
min-height: 90px !important;
} }
.nav-li{
.nav-li {
margin: 0 2.5% 0px; margin: 0 2.5% 0px;
} }
.text-df { .text-df {
font-size: 14px; font-size: 14px;
margin-left: 6px; margin-left: 6px;
} }
.text-lg{
.text-lg {
font-size: 14px; font-size: 14px;
} }
</style> </style>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment