Commit 89d92328 authored by 李苏's avatar 李苏 💬

徐工道路新增界面。修改

parent dc322a14
{ // launch.json 配置了启动调试时相关设置,configurations下节点名称可为 app-plus/h5/mp-weixin/mp-baidu/mp-alipay/mp-qq/mp-toutiao/mp-360/
// launchtype项可配置值为local或remote, local代表前端连本地云函数,remote代表前端连云端云函数
"version": "0.0",
"configurations": [{
"app-plus" :
{
"launchtype" : "local"
},
"default" :
{
"launchtype" : "local"
},
"type" : "uniCloud"
}
]
}
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="" vcs="Git" />
</component>
</project>
\ No newline at end of file
......@@ -149,6 +149,8 @@
@import "plugin/colorui/main.css";
@import "plugin/colorui/icon.css";
@import "plugin/colorui/animation.css";
.cu-modal{z-index: 500;}
.uni-modal{z-index: 1100;}
.nav-list {
display: flex;
flex-wrap: wrap;
......
import { http } from '@/common/service/service.js'
import configService from '@/common/service/config.service.js';
const apiService = {
/**
* 登录
*/
login(params) {
return http.post('/login',params)
},
/**
* 手机号码登录
*/
phoneNoLogin(params) {
return http.post('/sys/phoneLogin',params);
},
/**
* 退出
*/
logout(params) {
return http.post('/sys/logout',params);
},
/*数据请求 */
postData(url,params){
return http.post(url,params);
},
......
import {
http
} from '@/common/service/service.js'
import configService from '@/common/service/config.service.js';
import tip from '@/common/util/tip.js'
import eventBus from '@/common/util/eventBus.js'
function filter(e) {
if (e.data.success) {
return e.data.data
} else {
tip.toast(e.data.message || "操作失败")
}
}
export function login(params) {
return http.post('/login', params).then(e => {
return filter(e)
})
}
export function getPower(params) {
return http.post('/frame/init/mobile', params || {}).then(e => {
return filter(e)
})
}
/* 托盘查询 */
export function getTryinfo(params) {
params.ckid = eventBus.$ckid
return http.post('/xgwcs/tpmx/searchTpmxsByCode', params || {}).then(e => {
return filter(e)
})
}
/* 托盘调整 */
export function adjustTry(params) {
params.ckid = eventBus.$ckid
return http.post('/xgwcs/tp/adjustTpByCode ', params || {}).then(e => {
return filter(e)
})
}
/* 清空托盘 */
export function emptyTry(params) {
params.ckid = eventBus.$ckid
return http.post('/xgwcs/tp/emptyTpByCode', params || {}).then(e => {
return filter(e)
})
}
......@@ -62,15 +62,8 @@ uni.getStorageInfo({
// 必须使用异步函数,注意
http.interceptor.response(async (response) => { /* 请求之后拦截器 */
// if (response.data.code !== 200) { // 服务端返回的状态码不等于200,则reject()
// return Promise.reject(response)
// }
return response
}, (response) => {
// 请求错误做点什么
tip.alert("网络请求异常,请检查网络")
// this.$tip.alert("网络请求异常,请检查网络");
console.log("请求错误做点什么",response);
if (response) {
let data = response.data
const token = uni.getStorageSync(ACCESS_TOKEN)
......
......@@ -38,17 +38,17 @@
<input disabled="" v-model="wlinfor.wlcode">{{wlinfor.wlcode?'物料已添加':'点击选择物料'}}<text class="lg text-gray" :class="'cuIcon-' + 'right'"></text></input>
</view>
<view class="flex flex-wrap padding bg-grey white radio">
<view class="basis-lg margin-top-xs margin-bottom-xs radius">名称:<span>{{wlinfor.wlname}}</span></view>
<view class="basis-lg margin-top-xs margin-bottom-xs radius">名称:<span>{{wlinfor.wlname||""}}</span></view>
<view class="basis-sm margin-top-xs margin-bottom-xs radius"><span></span></view>
<view class="basis-lg margin-top-xs margin-bottom-xs radius">规格:<span>{{wlinfor.wlgg}}</span></view>
<view class="basis-sm margin-top-xs margin-bottom-xs radius">批号:<span>{{wlinfor.wlph}}</span></view>
<view class="basis-lg margin-top-xs margin-bottom-xs radius">托盘号:<span>{{wlinfor.tpcode}}</span></view>
<view class="basis-sm margin-top-xs margin-bottom-xs radius">数量:<span>{{wlinfor.ztsl}}</span></view>
<view class="basis-lg margin-top-xs margin-bottom-xs radius">规格:<span>{{wlinfor.wlgg||""}}</span></view>
<view class="basis-sm margin-top-xs margin-bottom-xs radius">批号:<span>{{wlinfor.wlph||""}}</span></view>
<view class="basis-lg margin-top-xs margin-bottom-xs radius">托盘号:<span>{{wlinfor.tpcode||""}}</span></view>
<view class="basis-sm margin-top-xs margin-bottom-xs radius">数量:<span>{{wlinfor.ztsl||""}}</span></view>
</view>
<view class="cu-form-group justify-around" style="padding: 0;">
<view class="cu-form-group ">
<view class="title" style="padding: 0;">任务单号</view>
<input disabled="">{{rwdh}}</input>
<input disabled="">{{rwdh||""}}</input>
</view>
<view class="cu-form-group" >
<view class="title " style="padding: 0;">任务状态</view>
......@@ -57,21 +57,24 @@
</view>
<view class="cu-form-group ">
<view class="title " style="padding: 0;">AGV任务单号</view>
<input disabled="" style="padding: 0;">{{agvrwdh}}</input>
<input disabled="" style="padding: 0;">{{agvrwdh||""}}</input>
</view>
<view class="cu-form-group ">
<view class="title " style="padding: 0;">AGV任务状态</view>
<input disabled="" style="padding: 0;">{{agvrwzt}}</input>
<input disabled="" style="padding: 0;">{{agvrwzt||""}}</input>
</view>
<view class="padding flex align-center bg-white justify-around" >
<view class="padding flex align-center bg-white justify-around" v-if="gwObj.status==1">
<button class="cu-btn bg-gradual-green wid22" @tap="cmbt()">叫料</button>
<button class="cu-btn bg-gradual-red wid22" @tap="cancelbt()" >取消</button>
<button class="cu-btn bg-gradual-orange wid22" @tap="lockingbt()">锁定</button>
</view>
<view class="padding flex align-center bg-white justify-around" >
<view class="padding flex align-center bg-white justify-around" v-if="gwObj.status==3">
<button class="cu-btn bg-gradual-orange " @tap="lockingbt()">取消锁定</button>
</view>
<view class="padding flex align-center bg-white justify-around" v-if="gwObj.status==2">
<button class="cu-btn bg-gradual-red wid30" @tap="adjustbt()" >托盘调整</button>
<button class="cu-btn bg-gradual-orange wid30" @tap="clearbt()">托盘清空</button>
<button v-if="false" class="cu-btn bg-gradual-orange wid30" @tap="clearbt()">回库</button>
<button class="cu-btn bg-gradual-orange wid30" @tap="clearbt()">回库</button>
</view>
<view class="cu-modal" :class="modalName=='DialogModal1'?'show':''">
<view class="cu-dialog">
......@@ -247,6 +250,14 @@
},
},
methods: {
/* 清除物料信息可this.wlinfo={} */
/* 清除任务信息 */
emptyRwinfo(){
this.rwdh=""
this.rwzt=""
this.agvrwdh=""
this.agvrwzt=""
},
/* 按钮 */
cmbt(){
uni.showModal({
......@@ -528,7 +539,6 @@
gwSelcetdIndex:this.gwSelcetdIndex,
cxinfor:this.cxinfor
}
},
})
......@@ -580,7 +590,6 @@
this.$forceUpdate()
_self.gwSelcetdIndex=e;
_self.gwObj=_self.gwinfor[e];
console.log(this.gwObj.status)
_self.formData.gwid=_self.gwObj.id;
if(this.status!=1){
this.apigettaskinf()
......@@ -604,40 +613,20 @@
/* 查询工位 */
},
onLoad(e) {
setTimeout(()=>{
this.gwinfor=[{status:1,stationname:"测试站",name:"测试名称"},{status:2,stationname:"测试站",name:"测试名称"},{status:3,stationname:"测试站",name:"测试名称"}]
this.gwObj=this.gwinfor[0]
})
eventBus.$on('addressInfo', function(data){
console.log(this.cxmc)
console.log(data,"data");
console.log(data)
}.bind(this));
if(!e.query){
return
}
let einfor =JSON.parse(e.query)
if(einfor.xzwl)
{
this.interval()
this.status=einfor.gwjlinfor.status
this.wlinfor=einfor.wlinfor
this.wlinfor.ztsl=einfor.wlinfor.ztsl
this.wlinfor.tpcode=einfor.wlinfor.tpcode
this.wlinfor.tpid=einfor.wlinfor.tpid
console.log(this.wlinfor)
this.cxinfor=einfor.gwjlinfor.cxinfor
this.apiGetgwxx()
this.gwSelcetdIndex=einfor.gwjlinfor.gwSelcetdIndex
// this.gwObj=this.gwList[this.gwSelcetdIndex];
// console.log(this.gwObj)
}else{
this.cxinfor.id=einfor.id
this.cxinfor.name=einfor.name
this.apiGetgwxx()
this.interval()
// this.gwObj=this.gwList[this.gwSelcetdIndex];
// console.log(this.gwObj)
}
},
onUnload(){
eventBus.$off('addressInfo')
clearInterval(this.interval_gwinfor)
},
onHide(){
......
......@@ -41,6 +41,7 @@
status:"",
gwjlinfor:{},
wlinfor:[
{test:"test"}
]
}
......@@ -78,8 +79,10 @@
xzwl:"xzwl",
wlinfor:item
}
eventBus.$emit('addressInfo',info);
this.$router.go(-1)
eventBus.$emit('addressInfo',"info");
uni.navigateBack({
delta: 1
});
// this.$Router.replace({ path:'/pages/gwjl/gwjl', query:{
// gwjlinfor:this.gwjlinfor,
// xzwl:"xzwl",
......
......@@ -7,13 +7,13 @@
<view class="padding-xs bg-white">
<view class="cu-form-group ">
<view class="title">配盘单码</view>
<input focus="true" placeholder="请扫描配盘单码"></input>
<input :focus="ppdmFocus" @confirm="ppdmFocus=false;stpmFocus=true" placeholder="请扫描配盘单码"></input>
</view>
</view>
<view class="padding-xs bg-white">
<view class="cu-form-group ">
<view class="title">扫托盘码</view>
<input @confirm="searchTpm" placeholder="请扫描配盘单码"></input>
<input :focus="stpmFocus" @confirm="searchTpm" placeholder="请扫描配盘单码"></input>
</view>
</view>
<view class="padding flex justify-around bg-white ">
......@@ -25,11 +25,12 @@
</template>
<script>
import api from '@/api/api.js';
import {login} from '@/api/dlapi.js';
export default {
data() {
return {
ppdmFocus:true,
stpmFocus:false
}
},
filters: {
......@@ -43,7 +44,12 @@
}
},
methods: {
comfirmStpm(){
this.ppdmFocus=true
this.stpmFocus=false
},
searchTpm(){
let that=this
uni.showModal({
title: '提示',
content: '配盘单码:PPM20220426001\n配盘单码:PPM20220426001',
......@@ -51,30 +57,25 @@
confirmText: "开始入库", // 确认按钮的文字
success: function (res) {
if (res.confirm) {
console.log('用户点击确定');
that.comfirmStpm()
} else if (res.cancel) {
console.log('用户点击取消');
that.comfirmStpm()
}
}
});
},
watchInfo(){
this.$router.push({name:"putin_register"})
this.$Router.push({name:"putin_register"})
},
// 确认按钮
hideModal(e) {
this.modalName = null
},
// 生成任务
// 扫描托盘号
// 选择物料
// 任务列表
},
onLoad(e) {
}
}
</script>
......
......@@ -13,7 +13,57 @@
</view>
</view>
<view class="padding-xl">
<!-- 库位位置 -->
<view class="" style="height: 250px;width: 90vw;display: flex;flex-wrap:wrap">
<view style="height: 20%;width:90%;display: flex;">
<view style="flex: 1;line-height: 40px;"></view>
<view style="flex: 1;line-height: 40px;">G1</view>
<view style="flex: 1;line-height: 40px;">G2</view>
<view style="flex: 1;line-height: 40px;">G3</view>
<view style="flex: 1;line-height: 40px;">G4</view>
<view style="flex: 1;line-height: 40px;">G5</view>
<view style="flex: 1;line-height: 40px;">G6</view>
</view>
<view style="height: 20%;width:90%;display: flex;">
<view style="flex: 1;line-height: 40px;">S1</view>
<view style="flex: 1;border: 1px solid #666;height: 40px;">库位2</view>
<view style="flex: 1;border: 1px solid #666;height: 40px;">库位3</view>
<view style="flex: 1;height: 40px;"></view>
<view style="flex: 1;height: 40px;"></view>
<view style="flex: 1;height: 40px;"></view>
<view style="flex: 1;height: 40px;"></view>
</view>
<view style="height: 20%;width:90%;display: flex;">
<view style="flex: 1;line-height: 40px;">S2</view>
<view style="flex: 1;border: 1px solid #666;height: 40px;">库位2</view>
<view style="flex: 1;border: 1px solid #666;height: 40px;">库位3</view>
<view style="flex: 1;height: 40px;"></view>
<view style="flex: 1;border: 1px solid #666;height: 40px;">库位5</view>
<view style="flex: 1;border: 1px solid #666;height: 40px;">库位6</view>
<view style="flex: 1;border: 1px solid #666;height: 40px;">库位7</view>
</view>
<view style="height: 20%;width:90%;display: flex;">
<view style="flex: 1;line-height: 40px;">S3</view>
<view style="flex: 1;border: 1px solid #666;height: 40px;">库位2</view>
<view style="flex: 1;border: 1px solid #666;height: 40px;">库位3</view>
<view style="flex: 1;border: 1px solid #666;height: 40px;">库位4</view>
<view style="flex: 1;border: 1px solid #666;height: 40px;">库位5</view>
<view style="flex: 1;border: 1px solid #666;height: 40px;">库位6</view>
<view style="flex: 1;border: 1px solid #666;height: 40px;">库位7</view>
</view>
<view style="height: 20%;width:90%;display: flex;">
<view style="flex: 1;line-height: 40px;">S4</view>
<view style="flex: 1;border: 1px solid #666;height: 40px;">库位2</view>
<view style="flex: 1;border: 1px solid #666;height: 40px;">库位3</view>
<view style="flex: 1;border: 1px solid #666;height: 40px;">库位4</view>
<view style="flex: 1;border: 1px solid #666;height: 40px;">库位5</view>
<view style="flex: 1;border: 1px solid #666;height: 40px;">库位6</view>
<view style="flex: 1;border: 1px solid #666;height: 40px;">库位7</view>
</view>
</view>
<view class="flex justify-around">
<button class="cu-btn bg-gradual-red wid22" @tap="cancelbt" >解除绑定信息</button>
</view>
</view>
</view>
</view>
......@@ -34,7 +84,7 @@
<view class="padding-xs bg-white" style="">
<view class="cu-form-group ">
<view class="title">库位码</view>
<input focus="true" @confirm="searchKwm()" placeholder="扫描库位码查询"></input>
<input :focus="kwmFocus" @confirm="searchKwm()" placeholder="扫描库位码"></input>
</view>
</view>
</view>
......@@ -48,6 +98,7 @@
export default {
data() {
return {
kwmFocus:true,
modalName:"",
rkdjlist:[{
tpm:100010,
......@@ -92,15 +143,34 @@
}
},
methods: {
cancelbt(){
uni.showModal({
title: '提示',
content: '是否解除绑定信息',
cancelText: "否", // 取消按钮的文字
confirmText: "是", // 确认按钮的文字
success: function (res) {
if (res.confirm) {
console.log('用户点击确定');
} else if (res.cancel) {
console.log('用户点击取消');
}
}
});
},
searchKwm(){
let that=this
this.kwmFocus=false
/* 三种状态,1,对应库位入库,2,不对应库位,3,非界面的库位 */
uni.showModal({
title: '提示',
content: '确认入库',
success: function (res) {
if (res.confirm) {
that.kwmFocus=true
console.log('用户点击确定');
} else if (res.cancel) {
that.kwmFocus=true
console.log('用户点击取消');
}
}
......
......@@ -59,7 +59,6 @@
<view style="flex: 1;border: 1px solid #666;height: 40px;">库位6</view>
<view style="flex: 1;border: 1px solid #666;height: 40px;">库位7</view>
</view>
</view>
</view>
</view>
......
<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" >
<cu-custom bgColor="bg-gradual-blue" :isBack="true">
<block slot="content">托盘调整</block>
<block slot="backText">返回</block>
</cu-custom>
<view class="cu-form-group">
<view class="title ">托盘号</view>
<input v-model="tpcode" placeholder="请扫描托盘号" focus="true" @confirm="apigetinfor()" ></input>
<input v-model="tpcode" placeholder="请扫描托盘号" focus="true" @confirm="apiGetTryinfo()"></input>
</view>
<view class="cu-form-group disable" >
<view class="cu-form-group disable">
<view class="title ">已扫托盘号</view>
<input v-model="ystpcode" disabled="" focus="true" @confirm="apigetinfor()" ></input>
</view>
<view v-for="(item,index) in wlinfor" :key="index">
<view class="flex flex-wrap padding bg-grey white radio" style="position: relative;">
<button @tap="deldata(item,index)" style="position: absolute;right: 10px;top: 5px;color: red;font-size: 12px;">
<span style="" >删除</span>
</button>
<view class="basis-sm margin-top-xs margin-bottom-xs radius">物料<span>{{item.wlcode}}</span></view>
<view class="basis-lg margin-top-xs margin-bottom-xs radius">名称:<span>{{item.wlname}}</span></view>
<view class="basis-sm margin-top-xs margin-bottom-xs radius">规格:<span>{{item.wlgg}}</span></view>
<view class="basis-lg margin-top-xs margin-bottom-xs radius">数量:<span>{{item.ztsl}}</span></view>
<view class="basis-sm margin-top-xs margin-bottom-xs radius">托盘号:<span>{{item.tpcode}}</span></view>
<view class="basis-lg margin-top-xs margin-bottom-xs radius">物料批号:<span>{{item.wlph}}</span></view>
</view>
<view class="cu-form-group" >
<view class="title ">物料数量维护</view>
<uni-number-box :min="0" :max="99999" v-model="item.ztsl" ></uni-number-box>
</view>
</view>
<!-- 假数据 -->
<view class="flex flex-wrap padding bg-grey white radio" style="position: relative;">
<button @tap="deldata(item,index)" style="position: absolute;right: 10px;top: 45px;color: #fff;background-color: red;font-size: 12px;">
<span style="" >删除</span>
</button>
<view class="basis-sm margin-top-xs margin-bottom-xs radius">物料:<span>{{'样式'}}</span></view>
<view class="basis-lg margin-top-xs margin-bottom-xs radius">名称:<span>{{'样式'}}</span></view>
<view class="basis-sm margin-top-xs margin-bottom-xs radius">规格:<span>{{'样式'}}</span></view>
<view class="basis-lg margin-top-xs margin-bottom-xs radius">数量:<span>{{'样式'}}</span></view>
<view class="basis-sm margin-top-xs margin-bottom-xs radius">托盘号:<span>{{'样式'}}</span></view>
<view class="basis-lg margin-top-xs margin-bottom-xs radius">物料批号:<span>{{'样式'}}</span></view>
</view>
<view class="cu-form-group" >
<view class="title ">物料数量维护</view>
<uni-number-box :min="0" :max="99999" v-model="testys" ></uni-number-box>
<input v-model="ystpcode" disabled="" focus="true"></input>
</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 class="cu-modal" :class="modalName=='DialogModal1'?'show':''">
<view class="cu-dialog">
<view class="cu-bar bg-white justify-end">
<view class="content">提示</view>
<view class="action" @tap="hideModal">
<text class="cuIcon-close text-red"></text>
</view>
</view>
<view class="padding-xl bg-white">
是否删除该条信息?
<view v-for="(item,index) in wlinfor" :key="index">
<view class="flex flex-wrap padding bg-grey white radio" style="position: relative;">
<button @tap="deldata(item,index)"
style="position: absolute;right: 10px;top: 45px;color: #fff;background-color: red;font-size: 12px;">
<span style="">删除</span>
</button>
<view class="basis-sm margin-top-xs margin-bottom-xs radius">物料<span>{{item.wlcode}}</span></view>
<view class="basis-lg margin-top-xs margin-bottom-xs radius">名称:<span>{{item.wlname}}</span></view>
<view class="basis-sm margin-top-xs margin-bottom-xs radius">规格:<span>{{item.wlgg}}</span></view>
<view class="basis-lg margin-top-xs margin-bottom-xs radius">数量:<span>{{item.ztsl}}</span></view>
<view class="basis-sm margin-top-xs margin-bottom-xs radius">托盘号:<span>{{item.tpcode}}</span></view>
<view class="basis-lg margin-top-xs margin-bottom-xs radius">物料批号:<span>{{item.wlph}}</span></view>
</view>
<view class="cu-bar bg-white justify-end">
<view class="action">
<button class="cu-btn line-green text-green" @tap="hideModal">取消</button>
<button class="cu-btn bg-green margin-left" @tap="cdeldata()">确定</button>
</view>
<view class="cu-form-group">
<view class="title ">物料数量维护</view>
<uni-number-box :min="0" :max="99999" v-model="item.ztsl"></uni-number-box>
</view>
</view>
</view>
<view class="cu-modal" :class="modalName=='DialogModal2'?'show':''">
<view class="cu-dialog">
<view class="cu-bar bg-white justify-end">
<view class="content">提示</view>
<view class="action" @tap="hideModal">
<text class="cuIcon-close text-red"></text>
</view>
</view>
<view class="padding-xl bg-white">
是否保存并调整?
</view>
<view class="cu-bar bg-white justify-end">
<view class="action">
<button class="cu-btn line-green text-green" @tap="hideModal">取消</button>
<button class="cu-btn bg-green margin-left" @tap="apibctz()">确定</button>
</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>
</view>
</template>
<script>
import api from '@/api/api.js';
import {
getTryinfo,
adjustTry
} from '@/api/dlapi.js'
export default {
data() {
return {
testys:10,
selected:"",
ystpcode:"",
modalName:"",
tpcode:"",
wlinfor:[],
selected: "",
ystpcode: "1",
modalName: "",
tpcode: "",
wlinfor: [{},{}],
}
},
methods:{
methods: {
// api保存调整
apibctz(){
this.hideModal()
api.postData("xgwms/tpmx/adjustTpByCode",{
"ckid":this.$ckid,
"code":this.tpcode,
"data":this.wlinfor
}).then((resp) => {
if(resp.data.success)
{
this.$tip.alert("调整成功");
}
else{
this.$tip.alert(res.data.message || "操作失败");
}
this.tpcode=""
this.ystpcode=""
this.wlinfor=[]
}).catch((err) => {
let msg = err.data.message || "请求出现错误,请稍后再试"
this.$tip.alert(msg);
this.tpcode=""
}).finally(()=>{
apiadjustTry(){
let data={
"code": this.ystpcode,
"data": this.wlinfor
}
adjustTry(data).then(e=>{
if(e){
this.$tip.alert("调整成功");
this.tpcode = ""
this.ystpcode = ""
this.wlinfor = []
}
})
},
isbctz(){
if(this.ystpcode){
this.confirm(2)
}else{
isbctz() {
let that=this
if (this.ystpcode) {
uni.showModal({
title: '提示',
content: '是否保存并调整',
cancelText: "否", // 取消按钮的文字
confirmText: "是", // 确认按钮的文字
success: function (res) {
if (res.confirm) {
that.apiadjustTry()
} else if (res.cancel) {
}
}
});
} else {
this.$tip.alert("请先扫描有效托盘信息");
}
},
hideModal(){
this.modalName=""
hideModal() {
this.modalName = ""
},
// 弹框
confirm(e){
this.modalName="DialogModal"+e
confirm(e) {
this.modalName = "DialogModal" + e
},
// 删除确认
deldata(item,index){
this.selected=index
this.confirm(1)
},
// 确认删除
cdeldata(){
this.hideModal()
this.wlinfor.splice(this.selected,1)
this.selected=""
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) {
}
}
});
},
// 获取托盘信息
apigetinfor(){
this.tpcode=this.$trim(this.tpcode)
api.postData("xgwms/tpmx/searchTpmxsByCode",{
"ckid":this.$ckid,
"code":this.tpcode
}).then((resp) => {
if(resp.data.data.records)
{ this.ystpcode=this.tpcode
this.wlinfor=resp.data.data.records
}
else{
this.$tip.alert("该托盘无数据");
}
}).catch((err) => {
let msg = err.data.message || "请求出现错误,请稍后再试"
this.$tip.alert(msg);
this.tpcode=""
}).finally(()=>{
apiGetTryinfo() {
let data={
"code": this.tpcode
}
getTryinfo(data).then(data => {
if (data && data.records) {
this.ystpcode = data.tpcode
this.wlinfor = data.records
} else {
this.tpcode = ""
this.ystpcode = ""
}
})
}
},
onLoad() {
if([]){
console.log(true)
}else{
console.log(false)
}
}
}
</script>
<style scoped>
/deep/.uni-numbox-btns{
width: 27.69px!important;
/deep/.uni-numbox-btns {
width: 27.69px !important;
}
.disable {
background-color: #F5F5F5
}
.wid50 {
width: 50%;
}
.disable{
background-color: #F5F5F5
}
.wid50{
width: 50%;
}
</style>
......@@ -2,21 +2,16 @@
<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" >
<view class="title ">托盘号</view>
<input v-model="tpcode" placeholder="请扫描托盘号" focus="true" @confirm="apigetinfor()" ></input>
<input v-model="tpcode" placeholder="请扫描托盘号" focus="true" @confirm="apiGetTryinfo()" ></input>
</view>
<view class="cu-form-group disable" >
<view class="title ">已扫托盘号</view>
<input v-model="ystpcode" disabled="" focus="true" @confirm="apigetinfor()" ></input>
<input v-model="ystpcode" disabled="" focus="true"></input>
</view>
<view v-for="(item,index) in wlinfor" :key="index">
<view class="flex flex-wrap padding bg-grey white radio" style="position: relative;">
<button @tap="deldata(item,index)" style="position: absolute;right: 10px;top: 5px;color: red;font-size: 12px;">
<span style="" >删除</span>
</button>
<view class="basis-sm margin-top-xs margin-bottom-xs radius">物料<span>{{item.wlcode}}</span></view>
<view class="basis-lg margin-top-xs margin-bottom-xs radius">名称:<span>{{item.wlname}}</span></view>
<view class="basis-sm margin-top-xs margin-bottom-xs radius">规格:<span>{{item.wlgg}}</span></view>
......@@ -24,76 +19,19 @@
<view class="basis-sm margin-top-xs margin-bottom-xs radius">托盘号:<span>{{item.tpcode}}</span></view>
<view class="basis-lg margin-top-xs margin-bottom-xs radius">物料批号:<span>{{item.wlph}}</span></view>
</view>
<!-- <view class="cu-form-group" >
<view class="title ">物料数量维护</view>
<uni-number-box v-model="item.ztsl" ></uni-number-box>
</view> -->
</view>
<!-- 假数据 -->
<view class="flex flex-wrap padding bg-grey white radio" style="position: relative;">
<button @tap="deldata(item,index)" style="position: absolute;right: 10px;top: 45px;color: #fff;background-color: red;font-size: 12px;">
<span style="" >删除</span>
</button>
<view class="basis-sm margin-top-xs margin-bottom-xs radius">物料:<span>{{'样式'}}</span></view>
<view class="basis-lg margin-top-xs margin-bottom-xs radius">名称:<span>{{'样式'}}</span></view>
<view class="basis-sm margin-top-xs margin-bottom-xs radius">规格:<span>{{'样式'}}</span></view>
<view class="basis-lg margin-top-xs margin-bottom-xs radius">数量:<span>{{'样式'}}</span></view>
<view class="basis-sm margin-top-xs margin-bottom-xs radius">托盘号:<span>{{'样式'}}</span></view>
<view class="basis-lg margin-top-xs margin-bottom-xs radius">物料批号:<span>{{'样式'}}</span></view>
</view>
<!-- <view class="cu-form-group" >
<view class="title ">物料数量维护</view>
<uni-number-box min="0" max="99999" v-model="testys" ></uni-number-box>
</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 class="cu-modal" :class="modalName=='DialogModal1'?'show':''">
<view class="cu-dialog">
<view class="cu-bar bg-white justify-end">
<view class="content">提示</view>
<view class="action" @tap="hideModal">
<text class="cuIcon-close text-red"></text>
</view>
</view>
<view class="padding-xl bg-white">
是否删除该条信息?
</view>
<view class="cu-bar bg-white justify-end">
<view class="action">
<button class="cu-btn line-green text-green" @tap="hideModal">取消</button>
<button class="cu-btn bg-green margin-left" @tap="cdeldata()">确定</button>
</view>
</view>
</view>
</view>
<view class="cu-modal" :class="modalName=='DialogModal2'?'show':''">
<view class="cu-dialog">
<view class="cu-bar bg-white justify-end">
<view class="content">提示</view>
<view class="action" @tap="hideModal">
<text class="cuIcon-close text-red"></text>
</view>
</view>
<view class="padding-xl bg-white">
是否保存并调整?
</view>
<view class="cu-bar bg-white justify-end">
<view class="action">
<button class="cu-btn line-green text-green" @tap="hideModal">取消</button>
<button class="cu-btn bg-green margin-left" @tap="apibctz()">确定</button>
</view>
</view>
</view>
</view>
</view>
</template>
<script>
import api from '@/api/api.js';
import {
getTryinfo,
emptyTry
} from '@/api/dlapi.js'
export default {
data() {
return {
......@@ -106,36 +44,36 @@
}
},
methods:{
// api保存调整
apibctz(){
this.hideModal()
api.postData("xgwms/tpmx/adjustTpByCode",{
"ckid":this.$ckid,
"code":this.tpcode,
"data":this.wlinfor
}).then((resp) => {
if(resp.data.success)
{
this.$tip.alert("调整成功");
}
else{
this.$tip.alert(res.data.message || "操作失败");
}
this.tpcode=""
this.ystpcode=""
this.wlinfor=[]
}).catch((err) => {
let msg = err.data.message || "请求出现错误,请稍后再试"
this.$tip.alert(msg);
this.tpcode=""
}).finally(()=>{
apiemptyTry(){
let data={
"code": this.tpcode
}
emptyTry(data).then(e=>{
if(e){
this.$tip.alert("清空成功");
this.tpcode = ""
this.ystpcode = ""
this.wlinfor = []
}
})
},
isbctz(){
if(this.ystpcode){
this.confirm(2)
let that=this
uni.showModal({
title: '提示',
content: '是否清空该托盘',
cancelText: "否", // 取消按钮的文字
confirmText: "是", // 确认按钮的文字
success: function (res) {
if (res.confirm) {
that.apiemptyTry()
} else if (res.cancel) {
}
}
});
}else{
this.$tip.alert("请先扫描有效托盘信息");
}
......@@ -161,25 +99,18 @@
this.selected=""
},
// 获取托盘信息
apigetinfor(){
this.tpcode=this.$trim(this.tpcode)
api.postData("xgwms/tpmx/searchTpmxsByCode",{
"ckid":this.$ckid,
"code":this.tpcode
}).then((resp) => {
if(resp.data.data.records)
{ this.ystpcode=this.tpcode
this.wlinfor=resp.data.data.records
}
else{
this.$tip.alert("该托盘无数据");
}
}).catch((err) => {
let msg = err.data.message || "请求出现错误,请稍后再试"
this.$tip.alert(msg);
this.tpcode=""
}).finally(()=>{
apiGetTryinfo() {
let data={
"code": this.tpcode
}
getTryinfo(data).then(data => {
if (data && data.records) {
this.ystpcode = data.tpcode
this.wlinfor = data.records
} else {
this.tpcode = ""
this.ystpcode = ""
}
})
}
......
......@@ -7,14 +7,14 @@
<view class="homepage" style="">
</view>
<!-- 徐工道路功能列表 -->
<view class="padding-sm">
<view class="padding-sm" v-if="newckglList.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 ckglList" :key="index" @tap="goPage(item.page)">
<view class="padding-sm" v-for="(item,index) in newckglList" :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'}">
......@@ -25,14 +25,14 @@
</view>
</view>
</view>
<view class="padding-sm">
<view class="padding-sm" v-if="newgwjlList.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 gwjlList" :key="index" @tap="goPage(item.page)">
<view class="padding-sm" v-for="(item,index) in newgwjlList" :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'}">
......@@ -43,14 +43,14 @@
</view>
</view>
</view>
<view class="padding-sm">
<view class="padding-sm" v-if="newtpglList.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 tpglList" :key="index" @tap="goPage(item.page)">
<view class="padding-sm" v-for="(item,index) in newtpglList" :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'}">
......@@ -62,70 +62,6 @@
</view>
</view>
<!-- 常用服务 -->
<view class="padding-sm" v-if="newusList.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 newusList" :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="padding-sm" v-if="newosList.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="bg-white grid col-2 padding-sm">
<view class="" v-for="(item,index) in newosList" :key="index" @tap="goPage(item.page)">
<view class="padding radius text-center shadow-blur solid-right">
<view class="cu-avatar lg " :style="{background: 'url(' + item.icon + ') no-repeat',backgroundSize:'56upx 56upx'}"><!-- <view class="cu-tag badge">99</view> --></view>
<view class="text-lg margin-top">{{item.title}}</view>
</view>
</view>
</view>
</view>
<view class="padding-sm" v-if="newwsList.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="bg-white grid col-2 padding-sm">
<view class="" v-for="(item,index) in newwsList" :key="index" @tap="goPage(item.page)">
<view class="padding radius text-center shadow-blur solid-right">
<view class="cu-avatar lg " :style="{background: 'url(' + item.icon + ') no-repeat',backgroundSize:'56upx 56upx'}"><!-- <view class="cu-tag badge">99</view> --></view>
<view class="text-lg margin-top">{{item.title}}</view>
</view>
</view>
</view>
</view>
<view class="padding-sm" v-if="newmsList.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="bg-white grid col-2 padding-sm">
<view class="" v-for="(item,index) in newmsList" :key="index" @tap="goPage(item.page)">
<view class="padding radius text-center shadow-blur solid-right">
<view class="cu-avatar lg " :style="{background: 'url(' + item.icon + ') no-repeat',backgroundSize:'56upx 56upx'}"><!-- <view class="cu-tag badge">99</view> --></view>
<view class="text-lg margin-top">{{item.title}}</view>
</view>
</view>
</view>
</view>
<view class="cu-tabbar-height">
</view>
</scroll-view>
......@@ -134,8 +70,9 @@
<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'
export default {
name: 'interfacepage',
props:{
......@@ -145,7 +82,7 @@
cur: {
immediate: true,
handler() {
this.apiqx()
this.apiGetpower()
this.initMenu()
},
},
......@@ -168,6 +105,7 @@
page:"putout_storage"
},
],
newckglList:[],
gwjlList:[
{
title:"工位叫料",
......@@ -176,6 +114,7 @@
page:"cmaterial"
}
],
newgwjlList:[],
tpglList:[
{
title:"托盘调整",
......@@ -190,83 +129,9 @@
page:"trayClear"
}
],
newtpglList:[],
// icon:"/wcs/apps/static/icon/work.png",pc端图标路径
//手机端去除/wcs/xgapps
swiperList: [
],
usList:[
// {
// title:"原材入库",
// icon:"/static/icon/work.png",
// useCount:1000,
// page:"putin-storage"
// },
// {
// title:"生产入库",
// icon:"/static/icon/work.png",
// useCount:1000,
// page:"ascrk"
// },
// {
// title:"其它入库",
// icon:"/static/icon/work2.png",
// useCount:1000,
// page:"qtrk"
// },
// {
// title:"托盘检验",
// icon:"/static/icon/tpjy.png",
// useCount:1000,
// page:"tpjy"
// }
],
newusList:[],
osList:[
// {
// title:"工位叫料",
// icon:"/static/icon/wl2.png",
// useCount:1000,
// page:"gwxz"
// },
// {
// title:"清洗送料",
// icon:"/static/icon/wl2.png",
// useCount:1000,
// page:"qxslgwxz"
// }
],
newosList:[],
wsList:[
// {
// title:"产品出库",
// icon:"/static/icon/work3.png",
// useCount:1000,
// page:"ckd"
// },
// {
// title:"其它出库",
// icon:"/static/icon/work4.png",
// useCount:1000,
// page:"qtck"
// }
],
newwsList:[],
msList:[
// {
// title:"托盘调整",
// icon:"/static/icon/work5.png",
// useCount:1000,
// page:"tptz"
// },
// {
// title:"清空托盘",
// icon:"/static/icon/work6.png",
// useCount:1000,
// page:"qktp"
// }
],
newmsList:[],
websock:'',
heartCheck:null,
lockReconnect:false,
......@@ -278,62 +143,24 @@
},
methods: {
// api获取权限
apiqx(){
let _self=this;
api.postData("/frame/init/mobile",{
}).then((resp) => {
if(resp.data.success){
let getqx=resp.data.data.menu
// 入库管理遍历
let newusList=[]
getqx.forEach(e=>{
this.usList.forEach(a=>{
if(a.title==e.mkmc){
newusList.push(a)
}
})
})
this.newusList=newusList
// 工位叫料遍历
let newosList=[]
getqx.forEach(e=>{
this.osList.forEach(a=>{
if(a.title==e.mkmc){
newosList.push(a)
}
})
})
this.newosList=newosList
// 出库管理
let newwsList=[]
getqx.forEach(e=>{
this.wsList.forEach(a=>{
if(a.title==e.mkmc){
newwsList.push(a)
}
})
})
this.newwsList=newwsList
// 调整
let newmsList=[]
getqx.forEach(e=>{
this.msList.forEach(a=>{
if(a.title==e.mkmc){
newmsList.push(a)
}
})
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')
}
})
},
filterMenu(menu,oldlist,newlist){
this[newlist]=[]
menu.forEach(e=>{
this[oldlist].forEach(a=>{
if(a.title==e.mkmc){
this[newlist].push(a)
}
})
this.newmsList=newmsList
}else{
this.$tip.alert(resp.data.message||"请求失败");
}
}).catch((err) => {
let msg = err.data.message || "请求出现错误,请稍后再试"
this.$tip.alert(msg);
}).finally(()=>{
})
},
returnPage(){
......
......@@ -19,15 +19,6 @@
<input type="password" v-model="password" placeholder-class="input-empty" maxlength="20"
password data-key="password" @input="inputChange" @confirm="toLogin" />
</view>
<!-- <view class="input-item">
<text class="tit">服务器:端口号</text>
<input type="text" v-model="sqlForm.sqlPort"/>
</view> -->
<!-- <view class="input-item">
<text class="tit">端口</text>
<input type="text" v-model="sqlForm.port"/>
</view> -->
<view @click="gofwqsz" class="padding text-right" style="color: #4399FC;">
服务器设置
</view>
......@@ -104,25 +95,6 @@
}
})
// uni.getStorage({
// key:'sqlPort',
// success:function(e){
// _self.sqlForm.sqlPort=e.data
// },
// fail() {
// }
// })
// uni.getStorageInfo({
// success: function (res) {
// if(uni.getStorageSync('storage_key')){
// _self.sql=uni.getStorageSync('storage_key');
// }
// }
// })
// #ifdef APP-PLUS
var that=this
plus.runtime.getProperty( plus.runtime.appid, function ( wgtinfo ) {
......@@ -262,7 +234,7 @@
}
})
this.$tip.success('登录成功!')
this.$Router.replaceAll({name:'homepage'})
this.$Router.replaceAll({path:'/pages/homepage/homepage'})
}else{
this.$tip.alert(res.data.message);
}
......
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