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

道路新增空托出库的功能

parent ba0940ce
......@@ -259,3 +259,21 @@ export function apiGwUnlock(params){
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 = [
title: '托盘清空',
},
},
{
path: '/pages/dl_tray_outbound/index',
name: 'trayOutbound',
meta: {
title: '空托出库',
},
},
/* 移入移出 */
{
path: '/pages/dl_outin/index',
......
......@@ -108,6 +108,16 @@
"enablePullDownRefresh": false
}
},
/* 空托出库 */
{
"path" : "pages/dl_tray_outbound/index",
"style" :
{
"navigationBarTitleText": "",
"enablePullDownRefresh": false
}
},
{
"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 @@
</view>
<!-- 徐工道路功能列表 -->
<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">
<text class='cuIcon-title text-blue'></text>仓库管理
</view>
......@@ -26,7 +26,7 @@
</view>
</view>
<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">
<text class='cuIcon-title text-blue'></text>工位叫料
</view>
......@@ -44,7 +44,7 @@
</view>
</view>
<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">
<text class='cuIcon-title text-blue'></text>托盘管理
</view>
......@@ -63,7 +63,7 @@
</view>
<!-- 移入移出 -->
<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">
<text class='cuIcon-title text-blue'></text>移库管理
</view>
......@@ -90,13 +90,18 @@
<script>
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 {getPower} from '@/api/dlapi.js'
import {
getPower
} from '@/api/dlapi.js'
export default {
name: 'interfacepage',
props:{
cur:String,
props: {
cur: String,
},
watch: {
cur: {
......@@ -111,166 +116,178 @@
data() {
return {
/* 功能列表 */
ckglList:[
{
title:"入库登记",
icon:"/static/icon/work.png",
useCount:1000,
page:"putin_storage"
ckglList: [{
title: "入库登记",
icon: "/static/icon/work.png",
useCount: 1000,
page: "putin_storage"
},
{
title:"出库登记",
icon:"/static/icon/work3.png",
useCount:1000,
page:"putout_storage"
title: "出库登记",
icon: "/static/icon/work3.png",
useCount: 1000,
page: "putout_storage"
}
],
newckglList:[],
gwjlList:[
{
title:"工位叫料",
icon:"/static/icon/wl2.png",
useCount:1000,
page:"cmaterial"
newckglList: [],
gwjlList: [{
title: "工位叫料",
icon: "/static/icon/wl2.png",
useCount: 1000,
page: "cmaterial"
},
{
title:"清空库位",
icon:"/static/icon/adjust.png",
useCount:1000,
page:"kwAdjust"
title: "清空库位",
icon: "/static/icon/adjust.png",
useCount: 1000,
page: "kwAdjust"
}
],
newgwjlList:[],
tpglList:[
newgwjlList: [],
tpglList: [{
title: "托盘调整",
icon: "/static/icon/work5.png",
useCount: 1000,
page: "trayAdjust"
},
{
title:"托盘调整",
icon:"/static/icon/work5.png",
useCount:1000,
page:"trayAdjust"
title: "清空托盘",
icon: "/static/icon/work6.png",
useCount: 1000,
page: "trayClear"
},
{
title:"清空托盘",
icon:"/static/icon/work6.png",
useCount:1000,
page:"trayClear"
"title": "空托出库",
"icon": "/static/icon/off.png",
"useCount": 1000,
"page": "trayOutbound"
}
],
newtpglList:[],
newtpglList: [],
/* 移入移出 */
yrycList:[
{
title:"移库",
icon:"/static/icon/work5.png",
useCount:1000,
page:"outIn"
},
],
newyrycList:[],
yrycList: [{
title: "移库",
icon: "/static/icon/work5.png",
useCount: 1000,
page: "outIn"
}, ],
newyrycList: [],
// icon:"/wcs/apps/static/icon/work.png",pc端图标路径
//手机端去除/wcs/xgapps
websock:'',
heartCheck:null,
lockReconnect:false,
msgCount:0,
dot:{
mailHome:false
websock: '',
heartCheck: null,
lockReconnect: false,
msgCount: 0,
dot: {
mailHome: false
}
}
},
methods: {
// api获取权限
apiGetpower(){
getPower().then(data=>{
if(data){
let menu=data.menu
this.filterMenu(menu,'ckglList','newckglList')
this.filterMenu(menu,'gwjlList','newgwjlList')
this.filterMenu(menu,'tpglList','newtpglList')
this.filterMenu(menu,'yrycList','newyrycList')
apiGetpower() {
getPower().then(data => {
if (data) {
let menu = data.menu
this.filterMenu(menu, 'ckglList', 'newckglList')
this.filterMenu(menu, 'gwjlList', 'newgwjlList')
this.filterMenu(menu, 'tpglList', 'newtpglList')
/* 开发,后端添加权限时删除该代码 */
this.newtpglList.push({
"title": "空托出库",
"icon": "/static/icon/off.png",
"useCount": 1000,
"page": "trayOutbound"
})
this.filterMenu(menu, 'yrycList', 'newyrycList')
}
})
},
filterMenu(menu,oldlist,newlist){
this[newlist]=[]
menu.forEach(e=>{
this[oldlist].forEach(a=>{
if(a.title==e.mkmc){
filterMenu(menu, oldlist, newlist) {
this[newlist] = []
menu.forEach(e => {
this[oldlist].forEach(a => {
if (a.title == e.mkmc) {
this[newlist].push(a)
}
})
})
},
returnPage(){
this.$Router.replace({name: 'login'})
returnPage() {
this.$Router.replace({
name: 'login'
})
},
initMenu(){
initMenu() {
// this.initWebSocket();
this.loadCount(0);
},
goPage(page){
if(!page){
goPage(page) {
if (!page) {
return false;
}
if(page==='annotationList'){
if (page === 'annotationList') {
this.msgCount = 0
}
this.dot[page]=false
this.$Router.push({name: page})
this.dot[page] = false
this.$Router.push({
name: page
})
},
initWebSocket: function () {
initWebSocket: function() {
// WebSocket与普通的请求所用协议有所不同,ws等同于http,wss等同于https
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.onopen = this.websocketOnopen;
this.websock.onerror = this.websocketOnerror;
this.websock.onmessage = this.websocketOnmessage;
this.websock.onclose = this.websocketOnclose;
},
websocketOnopen: function () {
websocketOnopen: function() {
//心跳检测重置
//this.heartCheck.reset().start();
},
websocketOnerror: function () {
websocketOnerror: function() {
this.reconnect();
},
websocketOnmessage: function (e) {
websocketOnmessage: function(e) {
var data = eval("(" + e.data + ")"); //解析对象
if(data.cmd == "topic"){
if (data.cmd == "topic") {
//系统通知
this.loadCount('1')
}else if(data.cmd == "user"){
} else if (data.cmd == "user") {
//用户消息
this.loadCount('2')
} else if(data.cmd == 'email'){
} else if (data.cmd == 'email') {
this.loadEmailCount()
}
//心跳检测重置
//this.heartCheck.reset().start();
},
websocketOnclose: function (e) {
websocketOnclose: function(e) {
this.reconnect();
},
websocketSend(text) { // 数据发送
try {
this.websock.send(text);
} catch (err) {
}
} catch (err) {}
},
reconnect() {
var that = this;
if(that.lockReconnect) return;
if (that.lockReconnect) return;
that.lockReconnect = true;
//没连接上会一直重连,设置延迟避免请求过多
setTimeout(function () {
setTimeout(function() {
that.initWebSocket();
that.lockReconnect = false;
}, 5000);
},
loadCount(flag){
loadCount(flag) {
/* let url = '/sys/annountCement/listByUser';
this.$http.get(url).then(res=>{
if(res.data.success){
......@@ -280,11 +297,11 @@
}
}) */
},
loadEmailCount(){
loadEmailCount() {
this.dot.mailHome = true
},
getTtemDotInfo(item){
if(item.page==='annotationList' && this.msgCount>0){
getTtemDotInfo(item) {
if (item.page === 'annotationList' && this.msgCount > 0) {
return this.msgCount
}
return '';
......@@ -294,26 +311,34 @@
</script>
<style scoped>
.homepage{
height: 25vh;width: 100%;background-image: url(/static/home/u3.png);background-size: 100% 100%;
.homepage {
height: 25vh;
width: 100%;
background-image: url(/static/home/u3.png);
background-size: 100% 100%;
}
.line2-icon {
width: 28px;
height: 28px;
}
.screen-swiper{
height: 90px!important;
min-height: 90px!important;
.screen-swiper {
height: 90px !important;
min-height: 90px !important;
}
.nav-li{
.nav-li {
margin: 0 2.5% 0px;
}
.text-df {
font-size: 14px;
margin-left: 6px;
}
.text-lg{
.text-lg {
font-size: 14px;
}
</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