Commit e84d0674 authored by 李苏's avatar 李苏 💬

DL新增移入移除

parent e705739e
{ // launch.json 配置了启动调试时相关设置,configurations下节点名称可为 app-plus/h5/mp-weixin/mp-baidu/mp-alipay/mp-qq/mp-toutiao/mp-360/ {
// launch.json 配置了启动调试时相关设置,configurations下节点名称可为 app-plus/h5/mp-weixin/mp-baidu/mp-alipay/mp-qq/mp-toutiao/mp-360/
// launchtype项可配置值为local或remote, local代表前端连本地云函数,remote代表前端连云端云函数 // launchtype项可配置值为local或remote, local代表前端连本地云函数,remote代表前端连云端云函数
"version": "0.0", "version" : "0.0",
"configurations": [{ "configurations" : [
"app-plus" :
{ {
"app-plus" : {
"launchtype" : "local" "launchtype" : "local"
}, },
"default" : "default" : {
{
"launchtype" : "local" "launchtype" : "local"
}, },
"mp-weixin" : "mp-weixin" : {
{
"launchtype" : "local" "launchtype" : "local"
}, },
"type" : "uniCloud" "type" : "uniCloud"
},
{
"playground" : "standard",
"type" : "uni-app:app-android"
} }
] ]
} }
This diff is collapsed.
...@@ -196,3 +196,29 @@ export function backWarehouse(params) { ...@@ -196,3 +196,29 @@ export function backWarehouse(params) {
return filter(e) return filter(e)
}) })
} }
// 移库计划
export function apiGetjhList(params){
return http.post("/xgwcs/ykjh/query", filterSpace(params) || {}).then(e => {
return filter(e)
})
}
/* 计划扫描库位码 */
export function apijhPptzdByKw(params){
return http.post("/xgwcs/ykjh/queryPptzdByKw", filterSpace(params) || {}).then(e => {
return filter(e)
})
}
/* 移出库位 */
export function apiYckw(params){
return http.post("/xgwcs/ykjh/yckw", filterSpace(params) || {}).then(e => {
return filter(e)
})
}
// 移入库位
export function apiYrkw(params){
return http.post("/xgwcs/ykjh/yrkw", filterSpace(params) || {}).then(e => {
return filter(e)
})
}
...@@ -10,7 +10,7 @@ const router = new Router({ ...@@ -10,7 +10,7 @@ const router = new Router({
routes: [...modules]//路由表 routes: [...modules]//路由表
}); });
const whiteList = ['/pages/login/login','/pages/login/fwqsz'] const whiteList = ['/pages/login/update','/pages/login/login','/pages/login/fwqsz']
//全局路由前置守卫 //全局路由前置守卫
router.beforeEach((to, from, next) => { router.beforeEach((to, from, next) => {
let token=uni.getStorageSync(ACCESS_TOKEN); let token=uni.getStorageSync(ACCESS_TOKEN);
......
const routes = [ const routes = [
{
path: '/pages/login/update',
name: 'update',
meta: {
title: '检查更新',
},
},
{ {
path: "/pages/login/login", path: "/pages/login/login",
name: 'login', name: 'login',
...@@ -139,6 +146,14 @@ const routes = [ ...@@ -139,6 +146,14 @@ const routes = [
title: '托盘清空', title: '托盘清空',
}, },
}, },
/* 移入移出 */
{
path: '/pages/dl_outin/index',
name: 'outIn',
meta: {
title: '移入移出',
},
}
] ]
......
This diff is collapsed.
...@@ -41,7 +41,9 @@ ...@@ -41,7 +41,9 @@
] ]
}, },
/* ios打包配置 */ /* ios打包配置 */
"ios" : {}, "ios" : {
"dSYMs" : false
},
/* SDK配置 */ /* SDK配置 */
"sdkConfigs" : { "sdkConfigs" : {
"ad" : {} "ad" : {}
......
{ {
"pages": [ //pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages "pages": [
{
"path": "pages/login/update",
"style": {
"app-plus": {
"bounce": "none"
}
}
},
{ {
"path" : "pages/login/login", "path" : "pages/login/login",
"style" : "style" :
...@@ -109,6 +117,16 @@ ...@@ -109,6 +117,16 @@
"enablePullDownRefresh": false "enablePullDownRefresh": false
} }
},
/* 移入移出 */
{
"path" : "pages/dl_outin/index",
"style" :
{
"navigationBarTitleText": "",
"enablePullDownRefresh": false
}
}, },
/* 修改密码界面 */ /* 修改密码界面 */
{ {
......
<template>
<view class="bg-white" style="height: 100vh;">
<cu-custom bgColor="bg-gradual-blue" :isBack="true" >
<block slot="backText">返回</block>
<block slot="content">移入/移出</block>
</cu-custom>
<view class="padding-xs bg-white">
<v-tabs v-model="current" :tabs="tabs" @change="changeTab">
</v-tabs>
</view>
<view class="padding-xs bg-white" style="height: 60vh;overflow: auto;">
<!-- 移入移出数据 -->
<!-- title -->
<view class="tbtit">
<view class="tbtit_son">配盘单号</view>
<view class="tbtit_son">批号</view>
<view style="flex: 1;">仓库</view>
</view>
<view class="tbtit_row " :class="item.selected?'selected':''" v-for="(item,index) in jhList" :key="index" @tap="selectTb(item,index)" @longtap="longtapTb(item,index)">
<view class="tbtit_row_son1">{{item.djid}}</view>
<view style="flex: 1">{{item.ph}}</view>
<view class="tbtit_row_son3">{{item.ckName||'未知'}}</view>
</view>
<view class="tbtit_row " style="display: flex;" v-if="!jhList[0]" >
<span style="flex: 1;">
暂无数据
</span>
</view>
</view>
<!-- 库位码 -->
<view class="padding-xs bg-white" >
<view class="cu-form-group " v-show="current==0" >
<view class="title">扫库位码</view>
<input v-model="code" :focus="stpmFocus" @confirm="searchKwm" placeholder="请扫描库位码"></input>
<Scan :app="app" :params="'code'" :do="'searchKwm'" ></Scan>
</view>
<view v-show="apiCode" style="width: 100%;height: 20px;line-height: 20px;text-align: center;margin-top: 10px;">
已扫库位码:{{apiCode}}
<br>
配送单号:{{apiShow.djid}}
<br>
批号:{{apiShow.ph}}
</view>
</view>
<!-- 移入库位 -->
<!-- <view class="padding-xs bg-white" v-show="index!=null&&code!=''" > -->
<view v-show="index!=null&&apiCode!=''" class="padding-xs bg-white" style="display: flex;justify-content: center;align-items: center;" >
<button @tap="apiYcjh()" class="cu-btn bg-gradual-green xs " style="width: 50%;margin-top:10px;">移入库位</button>
</view>
</view>
</view>
</view>
</template>
<script>
import {apiGetjhList,apijhPptzdByKw,apiYckw,apiYrkw} from '@/api/dlapi.js';
export default {
data() {
return {
index:null,
app:this,
current: 0,
tabs: ['待移出', '待移入'],
jhList:[],
code:'',
apiCode:'',
apiShow:{
djid:'',
ph:''
},
/* 扫码 */
stpmFocus:false
}
},
filters: {
formatTime: function(time) {
if (time != null && time != "") {
var date = new Date(time);
return date.Format("MM-dd hh:mm")
} else {
return "";
}
}
},
watch:{
apiCode(val){
if(!val){
this.clearShow()
}
},
current(val){
let ztArry=['I','O']
// let ztArry=['I','I']
apiGetjhList({zt:ztArry[val]}).then(res=>{
let jhList=res.records||[]
jhList.forEach(item=>{
item['selected']=false
})
this.jhList=jhList
/* 自动选中 */
if(ztArry[val]=='O'&&this.jhList.length>0){
this.jhList[0].selected=true
this.index=0
}else{
this.index=null
}
console.log(this.jhList)
})
//监听计划
}
},
methods: {
clearShow(){
this.apiShow.djid=''
this.apiShow.ph=''
},
/* 移入计划 */
apiYcjh(){
if(!this.apiCode){
this.$tip.toast("请先扫描库位码")
return
}
if(!this.jhList[this.index]){
this.$tip.toast("请先选中一条计划")
return
}
let params={
code:this.apiCode,
ykjhid:this.jhList[this.index].id
}
apiYrkw(params).then(res=>{
this.current=0
this.code=''
this.apiCode=''
this.$tip.toast('操作成功')
})
},
/* api扫描库位码 */
searchKwm(){
if(!this.code){
this.$tip.toast("请先扫描库位码")
return
}
let params={code:this.code}
apijhPptzdByKw(params).then(res=>{
console.log(res)
/* 如果成功 */
this.apiCode=this.code
this.apiShow.djid=res.records.djid
this.apiShow.ph=res.records.ph
apiYckw({code:this.code}).then(res=>{
this.current=1
})
}).catch(res=>{
/* */
this.code=''
this.apiCode=''
})
},
/* 改变tab选项 */
changeTab(index) {
console.log('当前选中的项:' + index)
},
/* 扫码赋值方法 */
scan(e){
this.djid=e.result
console.log(e.result)
},
comfirmStpm(){
this.djidFocus=true
this.stpmFocus=false
},
selectTb(item,index){
if(this.current==0){
this.index=null
return
}
console.log(item)
if(this.jhList[index].selected==true){
this.jhList[index].selected=false
this.index=-1
/* 清除选中值 */
}else{
this.jhList[index].selected=true
this.index=index
/* 存储选中值 */
}
/* 清除其他选中值 */
this.jhList.forEach((e,eindex)=>{
if(index!=eindex){
this.jhList[eindex].selected=false
}
})
},
// 确认按钮
hideModal(e) {
this.modalName = null
},
},
onLoad(e) {
/* 移库计划 */
apiGetjhList({zt:'I'}).then(res=>{
let jhList=res.records||[]
jhList.forEach(item=>{
item['selected']=false
})
this.jhList=jhList
})
/* 左i 右o */
}
}
</script>
<style scoped>
input{
border-bottom: #EEEEEE 1px solid;
}
.disable {
background-color: #EEEEEE;
}
.b-right {
position: relative;
}
.wid50 {
width: 50%;
}
/* 表格 */
.selected{
background-color: deepskyblue;
color: #fff;
}
.tbtit{
display: flex;border: 1px solid #EEEEEE;height: 30px;width: 100%;line-height: 30px;text-align: center;
}
.tbtit_row{
display: flex;border-bottom: 1px solid #EEEEEE;height: 30px;width: 100%;line-height: 30px;text-align: center;
}
.tbtit_son{
flex: 1;border-right: 1px solid #EEEEEE;
}
.tbtit_row_son1{
flex: 1;border-right: 1px solid #EEEEEE;border-left: #EEEEEE 1px solid;
}
.tbtit_row_son3{
flex: 1;border-right: 1px solid #EEEEEE;border-left: #EEEEEE 1px solid;
}
</style>
...@@ -61,6 +61,26 @@ ...@@ -61,6 +61,26 @@
</view> </view>
</view> </view>
</view> </view>
<!-- 移入移出 -->
<view class="padding-sm" v-if="yrycList.length!=0">
<view class="cu-bar bg-white solid-bottom" >
<view class="action text-bold">
<text class='cuIcon-title text-blue'></text>移入/移出
</view>
</view>
<view class="grid col-2 bg-white">
<view class="padding-sm" v-for="(item,index) in yrycList" :key="index" @tap="goPage(item.page)">
<view class="radius text-center shadow-blur ">
<view class="cu-avatar lg "
:style="{background: 'url('+ item.icon + ') no-repeat',backgroundSize:'56upx 56upx'}">
<view class="cu-tag badge" v-if="getTtemDotInfo(item)">{{getTtemDotInfo(item)}}</view>
</view>
<view class="text-lg margin-top">{{item.title}}</view>
</view>
</view>
</view>
</view>
<!-- 常用服务 --> <!-- 常用服务 -->
<view class="cu-tabbar-height"> <view class="cu-tabbar-height">
</view> </view>
...@@ -103,7 +123,7 @@ ...@@ -103,7 +123,7 @@
icon:"/static/icon/work3.png", icon:"/static/icon/work3.png",
useCount:1000, useCount:1000,
page:"putout_storage" page:"putout_storage"
}, }
], ],
newckglList:[], newckglList:[],
gwjlList:[ gwjlList:[
...@@ -130,6 +150,15 @@ ...@@ -130,6 +150,15 @@
} }
], ],
newtpglList:[], newtpglList:[],
/* 移入移出 */
yrycList:[
{
title:"移入/移出",
icon:"/static/icon/work5.png",
useCount:1000,
page:"outIn"
},
],
// icon:"/wcs/apps/static/icon/work.png",pc端图标路径 // icon:"/wcs/apps/static/icon/work.png",pc端图标路径
//手机端去除/wcs/xgapps //手机端去除/wcs/xgapps
websock:'', websock:'',
......
<template>
<view class="page uodateMain">
<!-- 升级模态框 -->
<view class="text-center">
<!-- <image :src="imgsrc" mode='aspectFit' class="zai-logo "></image> -->
<view class="zai-title text-shadow">欢迎使用徐工WCS</view>
</view>
<!-- 进度条 -->
<view class="progress">
<view class="tips">
tips:{{text}}
</view>
<view class="">
<view class="uni-padding-wrap uni-common-mt">
<view class="progress-box">
<progress :percent="percent" activeColor="#10AEFF" stroke-width="8" />
</view>
<view class="percent">
{{percent}}%
</view>
</view>
</view>
</view>
</view>
</template>
<script>
import appUpdate from 'common/util/appUpdate.js'
export default {
onLoad() {
// this.showLoading()
this.$Router.replaceAll({name:'login'})
// setTimeout(()=>{
// appUpdate(this)
// },500)
// #ifdef H5
this.$Router.replaceAll({name:'login'})
// #endif
},
data() {
return {
downLoad:false,
imgsrc: "/static/image/logon.png",
percent:0,
text:'正在检测版本'
}
},
methods: {
/* 修改进度 */
showProcess(text,percent){
this.text=text
this.percent=percent
},
showLoading(){
uni.showLoading({
title: this.text
})
},
hideLoading(){
uni.hideLoading()
}
}
}
</script>
<style>
.percent{
height: 25px;line-height: 25px;text-align: center;
font-size: 12px;
}
.tips{
height: 30px;
font-size: 12px;
}
.progress {
width: 100%;
position: absolute;
bottom: 4vh;
padding: 20px;
}
.zai-title {
font-size: 20px;
color: #000000;
text-align: center;
}
.uodateMain {
height: 100vh;
width: 100vw;
padding-top: 80px;
background-color: #fff;
}
.zai-logo {
/* width: 200upx; */
height: 200upx;
}
</style>
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