Commit 83514d62 authored by 李苏's avatar 李苏 💬

徐工道路APP

parent b09847f3
......@@ -2,9 +2,13 @@
import Vue from 'vue'
import appUpdate from 'common/util/appUpdate.js'
import api from 'api/api.js'
import Scan from '@/components/Scan/Scan.vue'
Vue.component('Scan',Scan)
export default {
onLaunch: function() {
// appUpdate()
// #ifdef APP-PLUS
plus.screen.lockOrientation("portrait-primary");
// #endif
uni.getSystemInfo({
success: function(e) {
......
......@@ -4,7 +4,6 @@ import {
import configService from '@/common/service/config.service.js';
import tip from '@/common/util/tip.js'
import eventBus from '@/common/util/eventBus.js'
console.log(eventBus.$trim)
/* 过滤对象属性空格 */
function filterSpace(data){
data=data||{}
......@@ -134,21 +133,58 @@ export function queryDownConfirmRk(params) {
return filter(e)
})
}
/* 工位叫料站位信息查询 */
/* agv任务状态查询 */
/*工位对应物料查询 */
/* 工位叫料接口 */
/*工位取消接口*/
/* 工位锁定接口 */
/* 回库接口 */
/* 取消锁定接口 */
/* 物料查询接口 */
/* 查询工位列表 */
const BASE_API="http://124.223.207.61/mock/622f086e725ad60a84001997/mes"
export function queryGwList(params) {
return http.post("/xgwcs/gw/query ", filterSpace(params) || {}).then(e => {
return filter(e)
})
}
/* 查询确认状态的生产订单 */
export function queryWlList(params) {
return http.post("/xgwcs/wo/queryConfirmWo ", filterSpace(params) || {}).then(e => {
return filter(e)
})
}
/* 停用按钮 */
export function deactivate(params) {
return http.post("/xgwcs/gw/record/qt", filterSpace(params) || {}).then(e => {
return filter(e)
})
}
/* 查询agv状态 */
export function queryAgvInfo(params) {
return http.post("/xgwcs/gwjl/queryTask", filterSpace(params) || {}).then(e => {
return filter(e)
})
}
/* 叫料 */
export function callMaterials(params) {
return http.post("/xgwcs/gwjl/doCall", filterSpace(params) || {}).then(e => {
return filter(e)
})
}
/* 取消下架作业*/
export function cancelMaterials(params) {
return http.post("/xgwcs/rkzy/delete ", filterSpace(params) || {}).then(e => {
return filter(e)
})
}
/* 锁定 */
export function lockMaterials(params) {
return http.post(BASE_API+"/lockMaterials", filterSpace(params) || {}).then(e => {
return filter(e)
})
}
/* 取消锁定 */
export function unlockMaterials(params) {
return http.post(BASE_API+"/unlockMaterials", filterSpace(params) || {}).then(e => {
return filter(e)
})
}
/* 回库 */
export function backWarehouse(params) {
return http.post("/xgwcs/gwjl/doBack ", filterSpace(params) || {}).then(e => {
return filter(e)
})
}
\ No newline at end of file
......@@ -4,8 +4,8 @@
{{title}}
</view>
<view class="infoBody">
<view :class="itemWidth" v-for="(item,key) in info" :key="key">
<span :class="keyWidth">{{key|getKeys}}:</span><span>{{item||'暂无信息'}}</span>
<view v-if="key!='id'" :class="itemWidth" v-for="(item,key) in show(info)" :key="key">
<span :class="keyWidth">{{key|getKeys}}:</span><span>{{item|getstate}}</span>
</view>
<view class="noinfoCard" v-if="Object.keys(info).length==0" >
暂无信息
......@@ -17,6 +17,19 @@
<script>
export default {
filters:{
getstate: function(e) {
let state = {
"C": "完成",
"F": "确认",
"I": "初始"
}
if(state[e]){
return state[e]
}else{
return e
}
},
getKeys: function(e) {
let keyList = {
"wlname":"物料名称",
......@@ -29,7 +42,8 @@
"rwzt":"任务状态",
"agvrwdh":"agv任务单号",
"agvrwzt":"agv任务状态",
"djid":"生产订单",
"wlxxName":"产品名称"
};
return keyList[e]
},
......@@ -55,8 +69,40 @@
name:"InfoCard",
data() {
return {
whiteList:[
"wlname",
"wlgg",
"wlph",
"tpcode",
"ztsl",
"wlcode",
"rwdh",
"rwzt",
"agvrwdh",
"agvrwzt",
/* */
"djid",
"cpname",
"wlxxName"
]
};
},
methods:{
getSame(arr1, arr2) {
return [...new Set(arr1)].filter(item =>
arr2.includes(item)
)
},
show(){
let allKeys=Object.keys(this.info)
let newData={}
let newKeys=[]
newKeys=this.getSame(allKeys,this.whiteList)
newKeys.forEach(e=>{
newData[e]=this.info[e]
})
return newData
}
}
}
</script>
......@@ -78,7 +124,7 @@
.cardKeyFull{
display: inline-block;
width: 50%;
text-align: right;
text-align: center;
}
.infoCard{
background-color: white;
......@@ -110,6 +156,7 @@
}
.infoBodyItemFull{
text-align: left;
width: 100%;
padding-left: 10px;
font-size: 14px;
......
......@@ -26,7 +26,7 @@
},
computed:{
bodyWidth(){
return "width:"+100*this.xList.length+'px'
return "width:"+150*this.xList.length+'px'
}
},
data() {
......@@ -62,14 +62,14 @@
}
.location_body{
height: 50vh;width: 300px;
height: 50vh;width:100vw;
margin-bottom: 20px;
overflow: auto;
display: flex;
.xList{
flex: 1;
height: auto;
width: 40px;
width: 150px;
.yList{
width: 100%;
height: 40px;
......
<template>
<text @tap="scan()" class="cuIcon-barcode" style="font-size: 25px;"></text>
</template>
<script>
export default {
name: "Scan",
components: {
},
props: {
params: {},
app: {},
do: {}
},
methods: {
scan() {
let that = this
uni.scanCode({
onlyFromCamera: true,
success: function(res) {
that.app[that.params] = res.result
that.app[that.do]()
}
})
}
}
}
</script>
<style>
</style>
<template>
<view class="stationAll">
<view class="stationBody" :class="{status1:itemInfo.status==1,status2:itemInfo.status==2,status3:itemInfo.status==3}">
<view class="item">{{itemInfo.stationname}}</view>
<view class="stationBody" :class="{status1:itemInfo.status==1,status2:itemInfo.status==2,status3:itemInfo.status==3,status4:itemInfo.status==4}">
<view class="item">{{itemInfo.ckName}}</view>
<view class="item">{{itemInfo.name}}</view>
<view class="item">{{itemInfo.status|getstatus}}</view>
</view>
......@@ -46,7 +46,8 @@
let ztList = {
"1": "正常",
"2": "已占用",
"3": "锁定"
"3": "锁定",
"4": "停用",
};
return ztList[e]
},
......@@ -54,7 +55,7 @@
let ztList = {
"1": "bg-green",
"2": "bg-red",
"3": "bg-orange"
"3": "bg-orange",
};
return ztList[e]
},
......@@ -82,15 +83,16 @@
.checkBody{
background-color:royalblue;
border-radius: 50%;
padding: 2px;
width: 20px;
height: 20px;
.checkItem{
color: #fff;
font-size: 14px;
font-size: 20px;
}
}
.stationAll{
border: 0.5px solid #eee;
min-height: 130px;
min-height: 180px;
padding: 10px;
}
.stationSelect{
......@@ -126,4 +128,7 @@
.status3{
background-color: orange;
}
.status4{
background-color: gray;
}
</style>
\ No newline at end of file
This diff is collapsed.
<template>
<view>
<view class="cu-bar bg-white search fixed" :style="[{top:70 + 'px'}]">
<view class="search-form round">
<text class="cuIcon-search"></text>
<input type="text" placeholder="输入搜索的信息" confirm-type="search" @confirm="searchFood" v-model="serachName"/>
</view>
<view class="action">
<button class="cu-btn bg-gradual-green shadow-blur round" @tap="searchFood">搜索</button>
</view>
</view>
<view class="bg-white">
<cu-custom bgColor="bg-gradual-blue" :isBack="true"><block slot="content">选择物料</block></cu-custom>
</view>
<view class="cu-bar bg-white solid-bottom">
<view class="action">
<text class="cuIcon-title text-orange "></text> 物料列表
<view class="cu-bar bg-white search fixed" :style="[{top:70 + 'px'}]">
<view class="search-form round">
<text class="cuIcon-search"></text>
<input type="text" placeholder="输入搜索的信息" confirm-type="search" @confirm="searchFood"
v-model="serachName" />
</view>
<view class="action">
<button class="cu-btn bg-gradual-green shadow-blur round" @tap="searchFood">搜索</button>
</view>
</view>
</view>
<InfoCard :info="item" :title="'序号:#'+(index+1)" v-for="(item,index) in wlinfor" :key="index+'keys'" @tap.native="nextTo(item)"></InfoCard>
<view class="bg-white">
<cu-custom bgColor="bg-gradual-blue" :isBack="true">
<block slot="content">选择物料</block>
</cu-custom>
</view>
<view class="cu-bar bg-white solid-bottom">
<view class="action">
<text class="cuIcon-title text-orange "></text> 物料列表
</view>
</view>
<InfoCard :keyWidth="'cardKeyFull'" :itemWidth="'infoBodyItemFull'" :info="item" :title="'序号:#'+(index+1)" v-for="(item,index) in wlinfor" :key="index"
@tap.native="nextTo(item)"></InfoCard>
</view>
</template>
<script>
import api from '@/api/api.js';
import {
queryWlList
} from '@/api/dlapi.js'
import InfoCard from '@/components/InfoCard/InfoCard.vue'
import eventBus from '@/common/util/eventBus.js'
export default {
data() {
return {
serachName:"",
status:"",
gwjlinfor:{},
wlinfor:[
{wlcode:"code&re2119",wlname:"藏红花",wlgg:"10支/盒",tpcode:"tp001",wlph:"10010",ztsl:"100"},
{wlcode:"code&re2119",wlname:"板蓝根",wlgg:"10支/盒",tpcode:"tp001",wlph:"10010",ztsl:"100"},
{wlcode:"code&re2119",wlname:"兰伽颉",wlgg:"10支/盒",tpcode:"tp001",wlph:"10010",ztsl:"100"},
{wlcode:"code&re2119",wlname:"龙葵叶",wlgg:"10支/盒",tpcode:"tp001",wlph:"10010",ztsl:"100"},
]
serachName: "",
status: "",
gwjlinfor: {},
wlinfor: [
]
}
},
onPullDownRefresh(){
setTimeout(()=>{
onPullDownRefresh() {
setTimeout(() => {
uni.stopPullDownRefresh()
},2500)
}, 2500)
},
methods:{
apiGetwl(){
let _self=this;
api.postData("xgwms/tpmx/queryWlxx",{
"condition":_self.serachName
}).then((resp) => {
if(resp.data.success){
_self.wlinfor=resp.data.data.records
}else{
this.$tip.alert(resp.data.message||"请求失败");
}
}).catch((err) => {
let msg = err.data.message || "请求出现错误,请稍后再试"
this.$tip.alert(msg);
}).finally(()=>{
})
methods: {
apiGetwl() {
queryWlList({
condition: this.serachName
}).then(e => {
this.wlinfor = e.records
})
},
searchFood(){
searchFood() {
this.apiGetwl()
},
nextTo(item){
let info={
gwjlinfor:this.gwjlinfor,
xzwl:"xzwl",
wlinfor:item
nextTo(item) {
let info = {
wlinfor: item
}
eventBus.$emit('sendInfo',info);
eventBus.$emit('sendInfo', info);
uni.navigateBack({
delta: 1
delta: 1
});
// this.$Router.replace({ path:'/pages/gwjl/gwjl', query:{
// gwjlinfor:this.gwjlinfor,
// xzwl:"xzwl",
// wlinfor:item
// }
// })
},
gotoBackPage(){
gotoBackPage() {
this.$router.go(-1)
}
},
onLoad(e) {
if(!e.query){
return 0
}
let einfor =JSON.parse(e.query)
this.gwjlinfor=einfor.gwjlinfor
this.apiGetwl()
queryWlList({}).then(e => {
this.wlinfor = e.records
})
}
}
</script>
<style scoped>
.wid50{
width: 50%;
}
.wid50 {
width: 50%;
}
</style>
<template>
<view class="bg-white" style="height: 100vh;">
<cu-custom bgColor="bg-gradual-blue" :isBack="true" >
<cu-custom bgColor="bg-gradual-blue" :isBack="true" >
<block slot="backText">返回</block>
<block slot="content">托盘信息绑定</block>
</cu-custom>
......@@ -8,12 +8,14 @@
<view class="cu-form-group ">
<view class="title">配盘单码</view>
<input v-model="djid" :focus="djidFocus" @confirm="apiCheckDjid()" placeholder="请扫描配盘单码"></input>
<Scan :app="app" :params="'djid'" :do="'apiCheckDjid'" ></Scan>
</view>
</view>
<view class="padding-xs bg-white">
<view class="cu-form-group ">
<view class="title">扫托盘码</view>
<input v-model="code" :focus="stpmFocus" @confirm="searchTpm" placeholder="请扫描配盘单码"></input>
<Scan :app="app" :params="'code'" :do="'searchTpm'" ></Scan>
</view>
</view>
<view class="padding flex justify-around bg-white ">
......@@ -29,6 +31,7 @@
export default {
data() {
return {
app:this,
djid:"",
code:"",
djidFocus:true,
......@@ -46,6 +49,11 @@
}
},
methods: {
/* 扫码赋值方法 */
scan(e){
this.djid=e.result
console.log(e.result)
},
apiCheckDjid() {
// djidFocus=false;stpmFocus=true
this.djidFocus=false;
......
......@@ -43,6 +43,7 @@
<view class="cu-form-group ">
<view class="title">库位码</view>
<input :focus="kwmFocus" v-model="code" @confirm="searchKwm()" placeholder="扫描库位码"></input>
<Scan :app="app" :params="'code'" :do="'searchKwm'" ></Scan>
</view>
</view>
</view>
......@@ -66,6 +67,7 @@
},
data() {
return {
app:this,
xList:[],
index:-1,
code:"",
......
......@@ -40,6 +40,7 @@
<view class="cu-form-group ">
<view class="title">库位码</view>
<input focus="true" v-model="kwcode" @confirm="searchKwm()" placeholder="扫描库位码查询"></input>
<Scan :app="app" :params="'kwcode'" :do="'searchKwm'" ></Scan>
</view>
</view>
</view>
......@@ -65,6 +66,7 @@
},
data() {
return {
app:this,
xList:[],
index:-1,
kwcode:"",
......
......@@ -49,6 +49,7 @@
<view class="cu-form-group ">
<view class="title">取料区码</view>
<input focus="true" @confirm="searchQlqm()" v-model="code" placeholder="扫描取料区码查询"></input>
<Scan :app="app" :params="'code'" :do="'searchQlqm'" ></Scan>
</view>
</view>
</view>
......@@ -68,6 +69,7 @@
},
data() {
return {
app:this,
code:"",
index:-1,
kwcode:"",
......
......@@ -9,6 +9,7 @@
<view class="cu-form-group">
<view class="title ">托盘号</view>
<input v-model="tpcode" placeholder="请扫描托盘号" focus="true" @confirm="apiGetTryinfo()"></input>
<Scan :app="app" :params="'tpcode'" :do="'apiGetTryinfo'" ></Scan>
</view>
<view class="cu-form-group disable">
<view class="title ">已扫托盘号</view>
......@@ -49,6 +50,7 @@
export default {
data() {
return {
app:this,
selected: "",
ystpcode: "",
modalName: "",
......
......@@ -5,10 +5,12 @@
<view class="cu-form-group" >
<view class="title ">托盘号</view>
<input v-model="tpcode" placeholder="请扫描托盘号" focus="true" @confirm="apiGetTryinfo()" ></input>
<Scan :app="app" :params="'tpcode'" :do="'apiGetTryinfo'" ></Scan>
</view>
<view class="cu-form-group disable" >
<view class="title ">已扫托盘号</view>
<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;">
......@@ -35,6 +37,7 @@
export default {
data() {
return {
app:this,
testys:10,
selected:"",
ystpcode:"",
......
......@@ -504,7 +504,6 @@
text-align: center;
margin-top: 40upx;
}
.register-section {
position: absolute;
left: 0;
......@@ -513,15 +512,14 @@
font-size: $font-sm+2upx;
color: $font-color-base;
text-align: center;
text {
color: $font-color-spec;
margin-left: 10upx;
}
}
.round{
width: 18px!important;
height: 18px!important;
width: 10vw!important;
height: 10vw!important;
}
</style>
......@@ -3,7 +3,8 @@
<scroll-view scroll-y class="page">
<!-- 头部logo-->
<view class="UCenter-bg" >
<img src="/static/home/u3.png" alt="" style="height: 100%;width: 100%;" srcset="">
<image src="../../static/home/u3.png" mode="" style="height: 100%;width: 100%;"></image>
</view>
<view class="padding flex text-center text-grey bg-white shadow-warp">
<view class="flex flex-sub flex-direction solid-right animation-slide-top" :style="[{animationDelay: '0.2s'}]">
......
<template name="user">
<view>
<scroll-view scroll-y class="page">
<image src="/static/componentBg.png " mode="widthFix" class="response"></image>
<image src="/static/home/u3.png" mode="widthFix" class="response"></image>
<view class="nav-list">
<navigator hover-class="none" :url="'/pages/common/' + item.name" class="nav-li" navigateTo :class="'bg-'+item.color"
:style="[{animation: 'show ' + ((index+1)*0.2+1) + 's 1'}]" v-for="(item,index) in elements" :key="index">
......
......@@ -12,6 +12,12 @@
<view class="action">
<slot name="right"></slot>
</view>
<view v-if="isScan" class="action flex flex-wrap" >
<view class="tit-xzck">
<text @tap="scan" class="cuIcon-barcode" style="font-size: 25px;"></text>
</view>
</view>
<view v-if="isxzck" @tap="xzck()" class="action flex flex-wrap" >
<view class="tit-xzck">
选择仓库
......@@ -48,6 +54,10 @@
}
},
props: {
isScan:{
type: [Boolean, String],
default: false
},
isxzck: {
type: [Boolean, String],
default: false
......@@ -71,6 +81,15 @@
}
},
methods: {
scan(){
let that=this
uni.scanCode({
onlyFromCamera:true,
success:function(res){
that.$emit('scan',res)
}
})
},
xzck(){
this.$Router.replaceAll({name:'xzck'})
},
......
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