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

徐工道路APP

parent b09847f3
...@@ -2,9 +2,13 @@ ...@@ -2,9 +2,13 @@
import Vue from 'vue' import Vue from 'vue'
import appUpdate from 'common/util/appUpdate.js' import appUpdate from 'common/util/appUpdate.js'
import api from 'api/api.js' import api from 'api/api.js'
import Scan from '@/components/Scan/Scan.vue'
Vue.component('Scan',Scan)
export default { export default {
onLaunch: function() { onLaunch: function() {
// appUpdate() // #ifdef APP-PLUS
plus.screen.lockOrientation("portrait-primary");
// #endif
uni.getSystemInfo({ uni.getSystemInfo({
success: function(e) { success: function(e) {
......
...@@ -4,7 +4,6 @@ import { ...@@ -4,7 +4,6 @@ import {
import configService from '@/common/service/config.service.js'; import configService from '@/common/service/config.service.js';
import tip from '@/common/util/tip.js' import tip from '@/common/util/tip.js'
import eventBus from '@/common/util/eventBus.js' import eventBus from '@/common/util/eventBus.js'
console.log(eventBus.$trim)
/* 过滤对象属性空格 */ /* 过滤对象属性空格 */
function filterSpace(data){ function filterSpace(data){
data=data||{} data=data||{}
...@@ -134,21 +133,58 @@ export function queryDownConfirmRk(params) { ...@@ -134,21 +133,58 @@ export function queryDownConfirmRk(params) {
return filter(e) return filter(e)
}) })
} }
/* 工位叫料站位信息查询 */ /* 查询工位列表 */
const BASE_API="http://124.223.207.61/mock/622f086e725ad60a84001997/mes"
/* agv任务状态查询 */ 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 @@ ...@@ -4,8 +4,8 @@
{{title}} {{title}}
</view> </view>
<view class="infoBody"> <view class="infoBody">
<view :class="itemWidth" v-for="(item,key) in info" :key="key"> <view v-if="key!='id'" :class="itemWidth" v-for="(item,key) in show(info)" :key="key">
<span :class="keyWidth">{{key|getKeys}}:</span><span>{{item||'暂无信息'}}</span> <span :class="keyWidth">{{key|getKeys}}:</span><span>{{item|getstate}}</span>
</view> </view>
<view class="noinfoCard" v-if="Object.keys(info).length==0" > <view class="noinfoCard" v-if="Object.keys(info).length==0" >
暂无信息 暂无信息
...@@ -17,6 +17,19 @@ ...@@ -17,6 +17,19 @@
<script> <script>
export default { export default {
filters:{ filters:{
getstate: function(e) {
let state = {
"C": "完成",
"F": "确认",
"I": "初始"
}
if(state[e]){
return state[e]
}else{
return e
}
},
getKeys: function(e) { getKeys: function(e) {
let keyList = { let keyList = {
"wlname":"物料名称", "wlname":"物料名称",
...@@ -29,7 +42,8 @@ ...@@ -29,7 +42,8 @@
"rwzt":"任务状态", "rwzt":"任务状态",
"agvrwdh":"agv任务单号", "agvrwdh":"agv任务单号",
"agvrwzt":"agv任务状态", "agvrwzt":"agv任务状态",
"djid":"生产订单",
"wlxxName":"产品名称"
}; };
return keyList[e] return keyList[e]
}, },
...@@ -55,8 +69,40 @@ ...@@ -55,8 +69,40 @@
name:"InfoCard", name:"InfoCard",
data() { data() {
return { 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> </script>
...@@ -78,7 +124,7 @@ ...@@ -78,7 +124,7 @@
.cardKeyFull{ .cardKeyFull{
display: inline-block; display: inline-block;
width: 50%; width: 50%;
text-align: right; text-align: center;
} }
.infoCard{ .infoCard{
background-color: white; background-color: white;
...@@ -110,6 +156,7 @@ ...@@ -110,6 +156,7 @@
} }
.infoBodyItemFull{ .infoBodyItemFull{
text-align: left;
width: 100%; width: 100%;
padding-left: 10px; padding-left: 10px;
font-size: 14px; font-size: 14px;
......
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
}, },
computed:{ computed:{
bodyWidth(){ bodyWidth(){
return "width:"+100*this.xList.length+'px' return "width:"+150*this.xList.length+'px'
} }
}, },
data() { data() {
...@@ -62,14 +62,14 @@ ...@@ -62,14 +62,14 @@
} }
.location_body{ .location_body{
height: 50vh;width: 300px; height: 50vh;width:100vw;
margin-bottom: 20px; margin-bottom: 20px;
overflow: auto; overflow: auto;
display: flex; display: flex;
.xList{ .xList{
flex: 1; flex: 1;
height: auto; height: auto;
width: 40px; width: 150px;
.yList{ .yList{
width: 100%; width: 100%;
height: 40px; 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> <template>
<view class="stationAll"> <view class="stationAll">
<view class="stationBody" :class="{status1:itemInfo.status==1,status2:itemInfo.status==2,status3:itemInfo.status==3}"> <view class="stationBody" :class="{status1:itemInfo.status==1,status2:itemInfo.status==2,status3:itemInfo.status==3,status4:itemInfo.status==4}">
<view class="item">{{itemInfo.stationname}}</view> <view class="item">{{itemInfo.ckName}}</view>
<view class="item">{{itemInfo.name}}</view> <view class="item">{{itemInfo.name}}</view>
<view class="item">{{itemInfo.status|getstatus}}</view> <view class="item">{{itemInfo.status|getstatus}}</view>
</view> </view>
...@@ -46,7 +46,8 @@ ...@@ -46,7 +46,8 @@
let ztList = { let ztList = {
"1": "正常", "1": "正常",
"2": "已占用", "2": "已占用",
"3": "锁定" "3": "锁定",
"4": "停用",
}; };
return ztList[e] return ztList[e]
}, },
...@@ -54,7 +55,7 @@ ...@@ -54,7 +55,7 @@
let ztList = { let ztList = {
"1": "bg-green", "1": "bg-green",
"2": "bg-red", "2": "bg-red",
"3": "bg-orange" "3": "bg-orange",
}; };
return ztList[e] return ztList[e]
}, },
...@@ -82,15 +83,16 @@ ...@@ -82,15 +83,16 @@
.checkBody{ .checkBody{
background-color:royalblue; background-color:royalblue;
border-radius: 50%; border-radius: 50%;
padding: 2px; width: 20px;
height: 20px;
.checkItem{ .checkItem{
color: #fff; color: #fff;
font-size: 14px; font-size: 20px;
} }
} }
.stationAll{ .stationAll{
border: 0.5px solid #eee; border: 0.5px solid #eee;
min-height: 130px; min-height: 180px;
padding: 10px; padding: 10px;
} }
.stationSelect{ .stationSelect{
...@@ -126,4 +128,7 @@ ...@@ -126,4 +128,7 @@
.status3{ .status3{
background-color: orange; background-color: orange;
} }
.status4{
background-color: gray;
}
</style> </style>
\ No newline at end of file
...@@ -12,37 +12,52 @@ ...@@ -12,37 +12,52 @@
<view class="home-content-h"> <view class="home-content-h">
<scroll-view scroll-y="true"> <scroll-view scroll-y="true">
<view class="cu-list grid " :class="['col-3']" style=""> <view class="cu-list grid " :class="['col-3']" style="">
<Station @tap.native="selectedGw(index,item)" v-for="(item,index) in gwinfor" :key="index+'GW'" <Station @tap.native="selectedGw(index,item)" v-for="(item,index) in gwinfor" :key="index"
:isSelected="index==gwSelcetdIndex" :itemInfo="item"> :isSelected="index==gwSelcetdIndex" :itemInfo="item">
</Station> </Station>
</view> </view>
</scroll-view> </scroll-view>
</view> </view>
<view class="cu-form-group" @click="nextTo()"> <view class="cu-form-group" @click="nextTo()">
<view class="title ">物料</view> <view class="title ">生产订单</view>
<input disabled="" v-model="wlinfor.wlcode">{{wlinfor.wlcode?'物料已添加':'点击选择物料'}}<text class="lg text-gray" <input disabled="" v-model="wlinfor.wlcode">{{wlinfor.id?'生产订单已添加':'点击选择生产订单'}}<text class="lg text-gray"
:class="'cuIcon-' + 'right'"></text></input> :class="'cuIcon-' + 'right'"></text></input>
</view> </view>
<InfoCard :info="wlinfor" title="物料信息"></InfoCard> <InfoCard :info="wlinfor" :keyWidth="'cardKeyFull'" :itemWidth="'infoBodyItemFull'" title="生产订单信息"></InfoCard>
<InfoCard :info="agvinfo" :keyWidth="'cardKeyFull'" :itemWidth="'infoBodyItemFull'" title="任务信息"></InfoCard> <InfoCard :info="agvinfo" :keyWidth="'cardKeyFull'" :itemWidth="'infoBodyItemFull'" title="AGV任务信息"></InfoCard>
<view class="padding flex align-center bg-white justify-around" v-if="gwObj.status==1"> <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-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> <button class="cu-btn bg-gradual-orange wid22" @tap="lockingbt()">锁定</button>
<button class="cu-btn bg-gradual-black wid22" style="background-color: #666;color: #fff;" @tap="deactivate('停用')">停用</button>
</view>
<view class="padding flex align-center bg-white justify-around" v-if="gwObj.status==4">
<button class="cu-btn bg-gradual-orange " @tap="deactivate('启用')">启用</button>
</view> </view>
<view class="padding flex align-center bg-white justify-around" v-if="gwObj.status==3"> <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> <button class="cu-btn bg-gradual-red wid22" @tap="cancelbt()">取消</button>
</view> </view>
<view class="padding flex align-center bg-white justify-around" v-if="gwObj.status==2"> <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-red wid30" @tap="adjustbt()">托盘调整</button>
<button class="cu-btn bg-gradual-orange wid30" @tap="clearbt()">托盘清空</button> <button class="cu-btn bg-gradual-orange wid30" @tap="clearbt()">托盘清空</button>
<button class="cu-btn bg-gradual-orange wid30" @tap="clearbt()">回库</button> <button class="cu-btn bg-gradual-orange wid30" @tap="backWarehouse()">回库</button>
</view> </view>
</view> </view>
</template> </template>
<script> <script>
import api from '@/api/api.js'; import api from '@/api/api.js';
import {
queryGwList,
queryAgvInfo,
callMaterials,
cancelMaterials,
lockMaterials,
unlockMaterials,
backWarehouse,
deactivate
} from '@/api/dlapi.js';
import eventBus from '@/common/util/eventBus.js' import eventBus from '@/common/util/eventBus.js'
import Station from '@/components/Station/Station.vue' import Station from '@/components/Station/Station.vue'
import InfoCard from '@/components/InfoCard/InfoCard.vue' import InfoCard from '@/components/InfoCard/InfoCard.vue'
...@@ -76,9 +91,6 @@ ...@@ -76,9 +91,6 @@
rwdh: "", rwdh: "",
rwzt: "", rwzt: "",
}, },
urls: {
gwquery: "jcsj/gw/query"
},
newGwList: [], newGwList: [],
gwList: [], gwList: [],
gwObj: { gwObj: {
...@@ -110,7 +122,8 @@ ...@@ -110,7 +122,8 @@
let ztList = { let ztList = {
"1": "正常", "1": "正常",
"2": "已占用", "2": "已占用",
"3": "锁定" "3": "锁定",
"4": "停用"
}; };
return ztList[e] return ztList[e]
}, },
...@@ -118,7 +131,8 @@ ...@@ -118,7 +131,8 @@
let ztList = { let ztList = {
"1": "bg-green", "1": "bg-green",
"2": "bg-red", "2": "bg-red",
"3": "bg-orange" "3": "bg-orange",
"4": "bg-red"
}; };
return ztList[e] return ztList[e]
}, },
...@@ -134,13 +148,54 @@ ...@@ -134,13 +148,54 @@
const ztList = { const ztList = {
"1": "空闲", "1": "空闲",
"2": "已占用", "2": "已占用",
"3": "锁定" "3": "锁定",
"4": "停用"
}; };
return ztList[a] return ztList[a]
}, },
}, },
methods: { methods: {
/* 清除物料信息可this.wlinfo={} */ backWarehouse(){
backWarehouse({id:this.gwinfor[this.gwSelcetdIndex].id}).then(e=>{
if(e){
this.f5Gw()
this.$tip.toast("回库成功")
}
})
},
/* 刷新工位 */
f5Gw(){
queryGwList({}).then(e => {
this.gwinfor = e.records
this.gwinfor.forEach((info,index)=>{
if(info.tybz=="Y"){
this.gwinfor[index].status="4"
}
})
if (this.gwinfor[this.gwSelcetdIndex]) {
this.gwObj = this.gwinfor[this.gwSelcetdIndex];
this.formData.gwid = this.gwObj.id;
}
if(this.gwinfor[this.gwSelcetdIndex].status!=1){
queryAgvInfo({gwid:this.gwinfor[this.gwSelcetdIndex].id}).then(e => {
this.agvinfo = e.records
})
}
})
},
f5Agv(){
queryGwList({}).then(e => {
this.gwinfor = e.records
if (this.gwinfor[this.gwSelcetdIndex]) {
this.gwObj = this.gwinfor[this.gwSelcetdIndex];
this.formData.gwid = this.gwObj.id;
}
})
},
/* 清除生产订单信息可this.wlinfo={} */
/* 清除任务信息 */ /* 清除任务信息 */
emptyRwinfo() { emptyRwinfo() {
this.rwdh = "" this.rwdh = ""
...@@ -158,7 +213,22 @@ ...@@ -158,7 +213,22 @@
confirmText: "是", // 确认按钮的文字 confirmText: "是", // 确认按钮的文字
success: function(res) { success: function(res) {
if (res.confirm) { if (res.confirm) {
console.log(that.wlinfor) if(that.wlinfor.id){
let data={
gwid:that.gwinfor[that.gwSelcetdIndex].id,
woid:that.wlinfor.id,
ppdid:""
}
callMaterials(data).then(e=>{
if(e){
that.$tip.toast("叫料成功")
that.f5Gw()
that.wlinfor={}
}
})
}else{
that.$tip.toast("请先选择生产订单")
}
} else if (res.cancel) { } else if (res.cancel) {
console.log('用户点击取消'); console.log('用户点击取消');
} }
...@@ -166,6 +236,7 @@ ...@@ -166,6 +236,7 @@
}); });
}, },
cancelbt() { cancelbt() {
let that=this
uni.showModal({ uni.showModal({
title: '提示', title: '提示',
content: '是否取消', content: '是否取消',
...@@ -173,7 +244,17 @@ ...@@ -173,7 +244,17 @@
confirmText: "是", // 确认按钮的文字 confirmText: "是", // 确认按钮的文字
success: function(res) { success: function(res) {
if (res.confirm) { if (res.confirm) {
console.log('用户点击确定'); if(!that.agvinfo.id){
that.$tip.toast("当前任务信息异常,请确认或者等待数据刷新")
return
}
cancelMaterials({rwid:that.agvinfo.id}).then(e=>{
if(e){
that.$tip.toast("取消叫料成功")
that.f5Gw()
that.wlinfor={}
}
})
} else if (res.cancel) { } else if (res.cancel) {
console.log('用户点击取消'); console.log('用户点击取消');
} }
...@@ -181,6 +262,7 @@ ...@@ -181,6 +262,7 @@
}); });
}, },
lockingbt() { lockingbt() {
let that=this
uni.showModal({ uni.showModal({
title: '提示', title: '提示',
content: '是否锁定', content: '是否锁定',
...@@ -188,7 +270,63 @@ ...@@ -188,7 +270,63 @@
confirmText: "是", // 确认按钮的文字 confirmText: "是", // 确认按钮的文字
success: function(res) { success: function(res) {
if (res.confirm) { if (res.confirm) {
console.log('用户点击确定'); lockMaterials({}).then(e=>{
if(e){
that.$tip.toast("锁定成功")
that.gwinfor[that.gwSelcetdIndex].status=3
that.wlinfor={}
}
})
} else if (res.cancel) {
console.log('用户点击取消');
}
}
});
},
/* 停用 */
deactivate(e) {
let that=this
uni.showModal({
title: '提示',
content: '是否'+e,
cancelText: "否", // 取消按钮的文字
confirmText: "是", // 确认按钮的文字
success: function(res) {
if (res.confirm) {
deactivate({id:that.gwinfor[that.gwSelcetdIndex].id}).then(e=>{
if(e){
if(that.gwinfor[that.gwSelcetdIndex].status!=4){
that.$tip.toast("停用成功")
}else{
that.$tip.toast("启用成功")
}
that.f5Gw()
that.wlinfor={}
}
})
} else if (res.cancel) {
console.log('用户点击取消');
}
}
});
},
unlockingbt() {
let that=this
uni.showModal({
title: '提示',
content: '是否取消锁定',
cancelText: "否", // 取消按钮的文字
confirmText: "是", // 确认按钮的文字
success: function(res) {
if (res.confirm) {
unlockMaterials({}).then(e=>{
if(e){
that.$tip.toast("解锁成功")
that.gwinfor[that.gwSelcetdIndex].status=1
that.wlinfor={}
}
})
} else if (res.cancel) { } else if (res.cancel) {
console.log('用户点击取消'); console.log('用户点击取消');
} }
...@@ -199,7 +337,7 @@ ...@@ -199,7 +337,7 @@
this.$Router.push({ this.$Router.push({
path: '/pages/dl_tray_adjust/index', path: '/pages/dl_tray_adjust/index',
query: { query: {
tpcode: "10020" tpcode: this.gwinfor[this.gwSelcetdIndex].id
}, },
}) })
}, },
...@@ -219,15 +357,17 @@ ...@@ -219,15 +357,17 @@
}); });
}, },
interval() { interval() {
// this.interval_gwinfor=setInterval(()=>{ this.f5Gw()
// this.apiGetgwxx()
// },3000)
}, },
gotoBackPage() { gotoBackPage() {
this.$Router.replace('/pages/gwjl/gwxz') this.$Router.replace('/pages/gwjl/gwxz')
}, },
// 选择物料跳转 // 选择生产订单跳转
nextTo() { nextTo() {
if(this.gwinfor[this.gwSelcetdIndex].status!=1){
this.$tip.toast("当前工位非正常状态")
return
}
clearInterval(this.interval_gwinfor) clearInterval(this.interval_gwinfor)
this.$Router.push({ this.$Router.push({
path: '/pages/dl_cmaterial/xzwl', path: '/pages/dl_cmaterial/xzwl',
...@@ -238,6 +378,7 @@ ...@@ -238,6 +378,7 @@
}, },
selectedGw(e, item) { selectedGw(e, item) {
this.wlinfor={}
this.status = item.status this.status = item.status
let _self = this; let _self = this;
this.$forceUpdate() this.$forceUpdate()
...@@ -245,40 +386,20 @@ ...@@ -245,40 +386,20 @@
_self.gwObj = _self.gwinfor[e]; _self.gwObj = _self.gwinfor[e];
_self.formData.gwid = _self.gwObj.id; _self.formData.gwid = _self.gwObj.id;
if (this.status != 1) { if (this.status != 1) {
queryAgvInfo({gwid:this.gwinfor[this.gwSelcetdIndex].id}).then(e => {
this.agvinfo = e.records
})
} else if ( } else if (
this.status == 1 this.status == 1
) { ) {
this.agvinfo = {}
} }
}, },
/* 查询工位 */ /* 查询工位 */
}, },
onLoad(e) { onLoad(e) {
this.a = 0 this.f5Gw()
setTimeout(() => {
this.gwinfor = [{
status: 1,
stationname: "测试站",
name: "测试名称"
}, {
status: 2,
stationname: "测试站",
name: "测试名称"
}, {
status: 3,
stationname: "测试站",
name: "测试名称"
}, {
status: 1,
stationname: "测试站",
name: "测试名称"
}]
this.gwObj = this.gwinfor[0]
this.gwSelcetdIndex = 0
})
console.log("退回执行onload?")
eventBus.$on('sendInfo', function(data) { eventBus.$on('sendInfo', function(data) {
this.wlinfor = data.wlinfor this.wlinfor = data.wlinfor
}.bind(this)); }.bind(this));
...@@ -289,8 +410,8 @@ ...@@ -289,8 +410,8 @@
}, },
onShow() { onShow() {
this.interval_gwinfor = setInterval(() => { this.interval_gwinfor = setInterval(() => {
this.f5Gw()
}, 100000000000) }, 5000)
console.log('onshow') console.log('onshow')
}, },
onUnload() { onUnload() {
......
<template> <template>
<view> <view>
<view class="cu-bar bg-white search fixed" :style="[{top:70 + 'px'}]"> <view class="cu-bar bg-white search fixed" :style="[{top:70 + 'px'}]">
<view class="search-form round"> <view class="search-form round">
<text class="cuIcon-search"></text> <text class="cuIcon-search"></text>
<input type="text" placeholder="输入搜索的信息" confirm-type="search" @confirm="searchFood" v-model="serachName"/> <input type="text" placeholder="输入搜索的信息" confirm-type="search" @confirm="searchFood"
</view> v-model="serachName" />
<view class="action"> </view>
<button class="cu-btn bg-gradual-green shadow-blur round" @tap="searchFood">搜索</button> <view class="action">
</view> <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> </view>
</view> <view class="bg-white">
<InfoCard :info="item" :title="'序号:#'+(index+1)" v-for="(item,index) in wlinfor" :key="index+'keys'" @tap.native="nextTo(item)"></InfoCard> <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> </view>
</template> </template>
<script> <script>
import api from '@/api/api.js'; import api from '@/api/api.js';
import {
queryWlList
} from '@/api/dlapi.js'
import InfoCard from '@/components/InfoCard/InfoCard.vue' import InfoCard from '@/components/InfoCard/InfoCard.vue'
import eventBus from '@/common/util/eventBus.js' import eventBus from '@/common/util/eventBus.js'
export default { export default {
data() { data() {
return { return {
serachName:"", serachName: "",
status:"", status: "",
gwjlinfor:{}, gwjlinfor: {},
wlinfor:[ 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"},
]
} }
}, },
onPullDownRefresh(){ onPullDownRefresh() {
setTimeout(()=>{ setTimeout(() => {
uni.stopPullDownRefresh() uni.stopPullDownRefresh()
},2500) }, 2500)
}, },
methods:{ methods: {
apiGetwl(){ apiGetwl() {
let _self=this; queryWlList({
api.postData("xgwms/tpmx/queryWlxx",{ condition: this.serachName
"condition":_self.serachName }).then(e => {
}).then((resp) => { this.wlinfor = e.records
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(()=>{
})
}, },
searchFood(){ searchFood() {
this.apiGetwl() this.apiGetwl()
}, },
nextTo(item){ nextTo(item) {
let info={ let info = {
gwjlinfor:this.gwjlinfor, wlinfor: item
xzwl:"xzwl",
wlinfor:item
} }
eventBus.$emit('sendInfo',info); eventBus.$emit('sendInfo', info);
uni.navigateBack({ 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) this.$router.go(-1)
} }
}, },
onLoad(e) { onLoad(e) {
if(!e.query){ queryWlList({}).then(e => {
return 0 this.wlinfor = e.records
} })
let einfor =JSON.parse(e.query)
this.gwjlinfor=einfor.gwjlinfor
this.apiGetwl()
} }
} }
</script> </script>
<style scoped> <style scoped>
.wid50{ .wid50 {
width: 50%; width: 50%;
} }
</style> </style>
<template> <template>
<view class="bg-white" style="height: 100vh;"> <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="backText">返回</block>
<block slot="content">托盘信息绑定</block> <block slot="content">托盘信息绑定</block>
</cu-custom> </cu-custom>
...@@ -8,12 +8,14 @@ ...@@ -8,12 +8,14 @@
<view class="cu-form-group "> <view class="cu-form-group ">
<view class="title">配盘单码</view> <view class="title">配盘单码</view>
<input v-model="djid" :focus="djidFocus" @confirm="apiCheckDjid()" placeholder="请扫描配盘单码"></input> <input v-model="djid" :focus="djidFocus" @confirm="apiCheckDjid()" placeholder="请扫描配盘单码"></input>
<Scan :app="app" :params="'djid'" :do="'apiCheckDjid'" ></Scan>
</view> </view>
</view> </view>
<view class="padding-xs bg-white"> <view class="padding-xs bg-white">
<view class="cu-form-group "> <view class="cu-form-group ">
<view class="title">扫托盘码</view> <view class="title">扫托盘码</view>
<input v-model="code" :focus="stpmFocus" @confirm="searchTpm" placeholder="请扫描配盘单码"></input> <input v-model="code" :focus="stpmFocus" @confirm="searchTpm" placeholder="请扫描配盘单码"></input>
<Scan :app="app" :params="'code'" :do="'searchTpm'" ></Scan>
</view> </view>
</view> </view>
<view class="padding flex justify-around bg-white "> <view class="padding flex justify-around bg-white ">
...@@ -29,6 +31,7 @@ ...@@ -29,6 +31,7 @@
export default { export default {
data() { data() {
return { return {
app:this,
djid:"", djid:"",
code:"", code:"",
djidFocus:true, djidFocus:true,
...@@ -46,6 +49,11 @@ ...@@ -46,6 +49,11 @@
} }
}, },
methods: { methods: {
/* 扫码赋值方法 */
scan(e){
this.djid=e.result
console.log(e.result)
},
apiCheckDjid() { apiCheckDjid() {
// djidFocus=false;stpmFocus=true // djidFocus=false;stpmFocus=true
this.djidFocus=false; this.djidFocus=false;
......
...@@ -43,6 +43,7 @@ ...@@ -43,6 +43,7 @@
<view class="cu-form-group "> <view class="cu-form-group ">
<view class="title">库位码</view> <view class="title">库位码</view>
<input :focus="kwmFocus" v-model="code" @confirm="searchKwm()" placeholder="扫描库位码"></input> <input :focus="kwmFocus" v-model="code" @confirm="searchKwm()" placeholder="扫描库位码"></input>
<Scan :app="app" :params="'code'" :do="'searchKwm'" ></Scan>
</view> </view>
</view> </view>
</view> </view>
...@@ -66,6 +67,7 @@ ...@@ -66,6 +67,7 @@
}, },
data() { data() {
return { return {
app:this,
xList:[], xList:[],
index:-1, index:-1,
code:"", code:"",
......
...@@ -40,6 +40,7 @@ ...@@ -40,6 +40,7 @@
<view class="cu-form-group "> <view class="cu-form-group ">
<view class="title">库位码</view> <view class="title">库位码</view>
<input focus="true" v-model="kwcode" @confirm="searchKwm()" placeholder="扫描库位码查询"></input> <input focus="true" v-model="kwcode" @confirm="searchKwm()" placeholder="扫描库位码查询"></input>
<Scan :app="app" :params="'kwcode'" :do="'searchKwm'" ></Scan>
</view> </view>
</view> </view>
</view> </view>
...@@ -65,6 +66,7 @@ ...@@ -65,6 +66,7 @@
}, },
data() { data() {
return { return {
app:this,
xList:[], xList:[],
index:-1, index:-1,
kwcode:"", kwcode:"",
......
...@@ -49,6 +49,7 @@ ...@@ -49,6 +49,7 @@
<view class="cu-form-group "> <view class="cu-form-group ">
<view class="title">取料区码</view> <view class="title">取料区码</view>
<input focus="true" @confirm="searchQlqm()" v-model="code" placeholder="扫描取料区码查询"></input> <input focus="true" @confirm="searchQlqm()" v-model="code" placeholder="扫描取料区码查询"></input>
<Scan :app="app" :params="'code'" :do="'searchQlqm'" ></Scan>
</view> </view>
</view> </view>
</view> </view>
...@@ -68,6 +69,7 @@ ...@@ -68,6 +69,7 @@
}, },
data() { data() {
return { return {
app:this,
code:"", code:"",
index:-1, index:-1,
kwcode:"", kwcode:"",
......
...@@ -9,6 +9,7 @@ ...@@ -9,6 +9,7 @@
<view class="cu-form-group"> <view class="cu-form-group">
<view class="title ">托盘号</view> <view class="title ">托盘号</view>
<input v-model="tpcode" placeholder="请扫描托盘号" focus="true" @confirm="apiGetTryinfo()"></input> <input v-model="tpcode" placeholder="请扫描托盘号" focus="true" @confirm="apiGetTryinfo()"></input>
<Scan :app="app" :params="'tpcode'" :do="'apiGetTryinfo'" ></Scan>
</view> </view>
<view class="cu-form-group disable"> <view class="cu-form-group disable">
<view class="title ">已扫托盘号</view> <view class="title ">已扫托盘号</view>
...@@ -49,6 +50,7 @@ ...@@ -49,6 +50,7 @@
export default { export default {
data() { data() {
return { return {
app:this,
selected: "", selected: "",
ystpcode: "", ystpcode: "",
modalName: "", modalName: "",
......
...@@ -5,10 +5,12 @@ ...@@ -5,10 +5,12 @@
<view class="cu-form-group" > <view class="cu-form-group" >
<view class="title ">托盘号</view> <view class="title ">托盘号</view>
<input v-model="tpcode" placeholder="请扫描托盘号" focus="true" @confirm="apiGetTryinfo()" ></input> <input v-model="tpcode" placeholder="请扫描托盘号" focus="true" @confirm="apiGetTryinfo()" ></input>
<Scan :app="app" :params="'tpcode'" :do="'apiGetTryinfo'" ></Scan>
</view> </view>
<view class="cu-form-group disable" > <view class="cu-form-group disable" >
<view class="title ">已扫托盘号</view> <view class="title ">已扫托盘号</view>
<input v-model="ystpcode" disabled="" focus="true"></input> <input v-model="ystpcode" disabled="" focus="true"></input>
</view> </view>
<view v-for="(item,index) in wlinfor" :key="index"> <view v-for="(item,index) in wlinfor" :key="index">
<view class="flex flex-wrap padding bg-grey white radio" style="position: relative;"> <view class="flex flex-wrap padding bg-grey white radio" style="position: relative;">
...@@ -35,6 +37,7 @@ ...@@ -35,6 +37,7 @@
export default { export default {
data() { data() {
return { return {
app:this,
testys:10, testys:10,
selected:"", selected:"",
ystpcode:"", ystpcode:"",
......
...@@ -504,7 +504,6 @@ ...@@ -504,7 +504,6 @@
text-align: center; text-align: center;
margin-top: 40upx; margin-top: 40upx;
} }
.register-section { .register-section {
position: absolute; position: absolute;
left: 0; left: 0;
...@@ -513,15 +512,14 @@ ...@@ -513,15 +512,14 @@
font-size: $font-sm+2upx; font-size: $font-sm+2upx;
color: $font-color-base; color: $font-color-base;
text-align: center; text-align: center;
text { text {
color: $font-color-spec; color: $font-color-spec;
margin-left: 10upx; margin-left: 10upx;
} }
} }
.round{ .round{
width: 18px!important; width: 10vw!important;
height: 18px!important; height: 10vw!important;
} }
</style> </style>
...@@ -3,7 +3,8 @@ ...@@ -3,7 +3,8 @@
<scroll-view scroll-y class="page"> <scroll-view scroll-y class="page">
<!-- 头部logo--> <!-- 头部logo-->
<view class="UCenter-bg" > <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>
<view class="padding flex text-center text-grey bg-white shadow-warp"> <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'}]"> <view class="flex flex-sub flex-direction solid-right animation-slide-top" :style="[{animationDelay: '0.2s'}]">
......
<template name="user"> <template name="user">
<view> <view>
<scroll-view scroll-y class="page"> <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"> <view class="nav-list">
<navigator hover-class="none" :url="'/pages/common/' + item.name" class="nav-li" navigateTo :class="'bg-'+item.color" <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"> :style="[{animation: 'show ' + ((index+1)*0.2+1) + 's 1'}]" v-for="(item,index) in elements" :key="index">
......
...@@ -12,6 +12,12 @@ ...@@ -12,6 +12,12 @@
<view class="action"> <view class="action">
<slot name="right"></slot> <slot name="right"></slot>
</view> </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 v-if="isxzck" @tap="xzck()" class="action flex flex-wrap" >
<view class="tit-xzck"> <view class="tit-xzck">
选择仓库 选择仓库
...@@ -48,6 +54,10 @@ ...@@ -48,6 +54,10 @@
} }
}, },
props: { props: {
isScan:{
type: [Boolean, String],
default: false
},
isxzck: { isxzck: {
type: [Boolean, String], type: [Boolean, String],
default: false default: false
...@@ -71,6 +81,15 @@ ...@@ -71,6 +81,15 @@
} }
}, },
methods: { methods: {
scan(){
let that=this
uni.scanCode({
onlyFromCamera:true,
success:function(res){
that.$emit('scan',res)
}
})
},
xzck(){ xzck(){
this.$Router.replaceAll({name:'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