Commit 9005b396 authored by 李苏's avatar 李苏 💬

PDA叫料修改版本

parent 0aac86bc
...@@ -277,3 +277,10 @@ export function emptyCall(params){ ...@@ -277,3 +277,10 @@ export function emptyCall(params){
return filter(e) return filter(e)
}) })
} }
/* 新的叫料 */
export function queryCanCall(params){
return http.post("/xgwcs/gwjl/queryCanCall", params || {}).then(e => {
return filter(e)
})
}
...@@ -131,6 +131,20 @@ const routes = [ ...@@ -131,6 +131,20 @@ const routes = [
title: '选择物料', title: '选择物料',
}, },
}, },
{
path: '/pages/dl_cmaterial/xzppdh',
name: 'xzppdh',
meta: {
title: '选择配盘单号',
},
},
{
path: '/pages/dl_cmaterial/xzwlxx',
name: 'xzwl',
meta: {
title: '选择物料信息',
},
},
/* 调整 */ /* 调整 */
{ {
path: '/pages/dl_tray_adjust/index', path: '/pages/dl_tray_adjust/index',
......
...@@ -98,6 +98,24 @@ ...@@ -98,6 +98,24 @@
"enablePullDownRefresh": false "enablePullDownRefresh": false
} }
},
{
"path" : "pages/dl_cmaterial/xzwlxx",
"style" :
{
"navigationBarTitleText": "",
"enablePullDownRefresh": false
}
},
{
"path" : "pages/dl_cmaterial/xzppdh",
"style" :
{
"navigationBarTitleText": "",
"enablePullDownRefresh": false
}
}, },
/* 调整 */ /* 调整 */
{ {
......
...@@ -18,12 +18,36 @@ ...@@ -18,12 +18,36 @@
</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.id?'生产订单已添加':'点击选择生产订单'}}<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> -->
<!-- <InfoCard :info="wlinfor" :keyWidth="'cardKeyFull'" :itemWidth="'infoBodyItemFull'" title="生产订单信息"></InfoCard> -->
<!-- 配盘点详情 -->
<view class="infoCard" v-if="ppdInfo.ph">
<view class="infoCardTitle">
{{ppdName}}
</view>
<view class="infoBody">
<view class="infoBodyItemFull" >
<span class="cardKeyFull">批次信息:</span><span>{{ppdInfo.ph}}</span>
</view>
<view class="infoBodyItemFull" @tap="nextTo('/pages/dl_cmaterial/xzppdh')" >
<span class="cardKeyFull">配盘单号:</span><span>{{ppdInfo.djid}}</span>
<text class="lg text-gray" style="float: right;margin-right: 2vw;"
:class="'cuIcon-' + 'right'"></text>
</view>
<view class="infoBodyItemFull" >
<span class="cardKeyFull">生产订单:</span><span>{{ppdInfo.wodjid}}</span>
</view>
<view class="infoBodyItemFull" @tap="nextTo('/pages/dl_cmaterial/xzwlxx')" >
<span class="cardKeyFull">物料信息:</span><span>{{ppdInfo.wlName}}</span>
<text class="lg text-gray" style="float: right;margin-right: 2vw;"
:class="'cuIcon-' + 'right'"></text>
</view>
</view>
</view> </view>
<InfoCard :info="wlinfor" :keyWidth="'cardKeyFull'" :itemWidth="'infoBodyItemFull'" title="生产订单信息"></InfoCard>
<InfoCard :info="agvinfo" :keyWidth="'cardKeyFull'" :itemWidth="'infoBodyItemFull'" title="AGV任务信息"></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=='E'"> <view class="padding flex align-center bg-white justify-around" v-if="gwObj.status=='E'">
...@@ -61,7 +85,8 @@ ...@@ -61,7 +85,8 @@
apiEmptyTpByGwid, apiEmptyTpByGwid,
/*, 锁定 */ /*, 锁定 */
apiGwLock, apiGwLock,
apiGwUnlock apiGwUnlock,
queryCanCall
} from '@/api/dlapi.js'; } 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'
...@@ -71,8 +96,30 @@ ...@@ -71,8 +96,30 @@
Station, Station,
InfoCard InfoCard
}, },
computed:{
ppdName(){
let name=""
if(this.gwinfor&&this.gwinfor[this.gwSelcetdIndex]){
name=this.gwinfor[this.gwSelcetdIndex].ppdName||'null'
}
return name
}
},
data() { data() {
return { return {
/* 配盘点数据结构 */
ppdInfo:{
ph:'',
wodjid:'',
pptzdid:'',
/* upptzdList[0].djid */
djid:'',
wlName:'',
upptzdList:[],
wlxxList:[],
},
agvinfo: { agvinfo: {
}, },
...@@ -160,6 +207,44 @@ ...@@ -160,6 +207,44 @@
}, },
}, },
methods: { methods: {
emptyPpdInfo(){
this.ppdInfo={
ph:'',
wodjid:'',
pptzdid:'',
/* upptzdList[0].djid */
djid:'',
wlName:'',
upptzdList:[],
wlxxList:[],
}
},
/* 获取配盘点信息 */
apiQueryCanCall(ppdid){
queryCanCall({
"ppdid":ppdid,
// "ppdid":ppdid|| '8A8239D18581021E0185A4B7D5C7000A',
}).then(res=>{
const {records}=res
/* 铺数据 */
this.ppdInfo.ph=records.ph||null
this.ppdInfo.wodjid=records.wodjid||null
if(records.upptzdList[0]){
this.ppdInfo.djid=records.upptzdList[0].djid
this.ppdInfo.pptzdid=records.upptzdList[0].id
}else{
this.ppdInfo.djid=null
}
if(records.wlxxList[0]){
this.ppdInfo.wlName=records.wlxxList[0].wlname
}else{
this.ppdInfo.wlName=''
}
this.ppdInfo.upptzdList=records.upptzdList||[]
this.ppdInfo.wlxxList=records.wlxxList||[]
console.log(this.ppdInfo,'this.ppdInfo')
})
},
backWarehouse(){ backWarehouse(){
backWarehouse({gwid:this.gwinfor[this.gwSelcetdIndex].id}).then(e=>{ backWarehouse({gwid:this.gwinfor[this.gwSelcetdIndex].id}).then(e=>{
if(e){ if(e){
...@@ -182,10 +267,14 @@ ...@@ -182,10 +267,14 @@
this.formData.gwid = this.gwObj.id; this.formData.gwid = this.gwObj.id;
} }
// console.log(this.gwinfor[this.gwSelcetdIndex].ppdid,'初始')
if(this.gwinfor[this.gwSelcetdIndex].status!="E"){ if(this.gwinfor[this.gwSelcetdIndex].status!="E"){
queryAgvInfo({gwid:this.gwinfor[this.gwSelcetdIndex].mapdatacode}).then(e => { queryAgvInfo({gwid:this.gwinfor[this.gwSelcetdIndex].mapdatacode}).then(e => {
this.agvinfo = e.records this.agvinfo = e.records
}) })
}else if(this.gwinfor[this.gwSelcetdIndex].status=="E"){
//差配盘点
this.apiQueryCanCall(this.gwinfor[this.gwSelcetdIndex].ppdid)
} }
}) })
...@@ -218,21 +307,25 @@ ...@@ -218,21 +307,25 @@
confirmText: "是", // 确认按钮的文字 confirmText: "是", // 确认按钮的文字
success: function(res) { success: function(res) {
if (res.confirm) { if (res.confirm) {
if(that.wlinfor.id){ if(that.ppdInfo.pptzdid){
let data={ let data={
gwid:that.gwinfor[that.gwSelcetdIndex].id, gwid:that.gwinfor[that.gwSelcetdIndex].id,
woid:that.wlinfor.id, pptzdid:that.ppdInfo.pptzdid,
ppdid:that.gwinfor[that.gwSelcetdIndex].ppdid, ppdid:that.gwinfor[that.gwSelcetdIndex].ppdid,
} }
callMaterials(data).then(e=>{ callMaterials(data).then(e=>{
if(e){ if(e){
that.$tip.toast("叫料成功") that.$tip.toast("叫料成功")
that.f5Gw() that.f5Gw()
//that.wlinfor={} that.emptyPpdInfo()
that.apiQueryCanCall(this.gwinfor[this.gwSelcetdIndex].ppdid)
// that.apiQueryCanCall()
} }
}) })
}else{ }else{
that.$tip.toast("请先选择生产订单") that.$tip.toast("当前工位未查询到叫料信息")
} }
} else if (res.cancel) { } else if (res.cancel) {
console.log('用户点击取消'); console.log('用户点击取消');
...@@ -382,18 +475,30 @@ ...@@ -382,18 +475,30 @@
this.$Router.replace('/pages/gwjl/gwxz') this.$Router.replace('/pages/gwjl/gwxz')
}, },
// 选择生产订单跳转 // 选择生产订单跳转
nextTo() { nextTo(path) {
if(this.gwinfor[this.gwSelcetdIndex].status != "E"){ if(!path){
this.$tip.toast("当前工位非正常状态")
return return
} }else{
clearInterval(this.interval_gwinfor)
this.$Router.push({ this.$Router.push({
path: '/pages/dl_cmaterial/xzwl', path:path,
query: { query: {
ppdInfo:this.ppdInfo
}, },
}) })
}
clearInterval(this.interval_gwinfor)
// if(this.gwinfor[this.gwSelcetdIndex].status != "E"){
// this.$tip.toast("当前工位非正常状态")
// return
// }
// this.$Router.push({
// path: '/pages/dl_cmaterial/xzwl',
// query: {
// },
// })
}, },
selectedGw(e, item) { selectedGw(e, item) {
...@@ -405,6 +510,7 @@ ...@@ -405,6 +510,7 @@
_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 != "E") { if (this.status != "E") {
this.emptyPpdInfo()
queryAgvInfo({gwid:this.gwinfor[this.gwSelcetdIndex].mapdatacode}).then(e => { queryAgvInfo({gwid:this.gwinfor[this.gwSelcetdIndex].mapdatacode}).then(e => {
this.agvinfo = e.records this.agvinfo = e.records
}) })
...@@ -413,6 +519,9 @@ ...@@ -413,6 +519,9 @@
) { ) {
this.agvinfo = {} this.agvinfo = {}
// 请求配盘点信息
this.apiQueryCanCall(this.gwinfor[this.gwSelcetdIndex].ppdid)
} }
}, },
/* 查询工位 */ /* 查询工位 */
...@@ -420,7 +529,12 @@ ...@@ -420,7 +529,12 @@
onLoad(e) { onLoad(e) {
this.f5Gw() this.f5Gw()
eventBus.$on('sendInfo', function(data) { eventBus.$on('sendInfo', function(data) {
this.wlinfor = data.wlinfor // this.wlinfor = data.wlinfor
if(data.type=='xzppdh'){
this.ppdInfo.djid=data.data.djid
this.ppdInfo.pptzdid=data.data.id
}
console.log(data,'bySendInfo')
}.bind(this)); }.bind(this));
if (!e.query) { if (!e.query) {
return return
...@@ -444,7 +558,66 @@ ...@@ -444,7 +558,66 @@
} }
</script> </script>
<style scoped> <style lang="scss" scoped>
.noinfoCard{
width: 100%;
height: 80px;
line-height: 80px;
text-align: center;
font-size: 16px;
color: #666;
}
.cardKey{
display: inline-block;
width: 60px;
text-align: right;
}
.cardKeyFull{
display: inline-block;
// width: 50%;
text-align: center;
}
.infoCard{
background-color: white;
border-radius: 5px;
margin: 5px 4px 5px 4px;
border: 1px #ddd solid;
padding: 5px 0px 5px 0px;
box-shadow: 1px 1px 1px #888888;
.infoCardTitle{
font-size: 15px;
padding: 0px 20px 0px 20px;
border-bottom: 1px solid #ddd;
text-align: center;
line-height: 30px;
height: 30px;
font-weight: 550;
background-color: #a7a7a7;
color: #fff;
}
.infoBody{
display: flex;
flex-wrap: wrap;
overflow: auto;
.infoBodyItem{
width: 50%;
padding-left: 10px;
font-size: 14px;
height: 25px;
line-height: 25px;
}
.infoBodyItemFull{
text-align: left;
width: 100%;
padding-left: 10px;
font-size: 14px;
height: 25px;
line-height: 25px;
}
}
}
.cu-form-group { .cu-form-group {
min-height: 20px; min-height: 20px;
} }
......
<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>
</view> -->
<view v-for="(item,index) in upptzdList" :key="item.id" class="infoCard" @tap="nextTo(item)" >
<view class="infoCardTitle">
#{{index+1}}
</view>
<view class="infoBody">
<view class="infoBodyItemFull" >
<span class="cardKeyFull">配盘单号:</span><span>{{item.djid}}</span>
</view>
<view class="infoBodyItemFull" >
<span class="cardKeyFull">批次信息:</span><span>{{item.ph}}</span>
</view>
<!-- <view class="infoBodyItemFull" >
<span class="cardKeyFull">物料信息:</span><span>{{item.wlName}}</span>
</view> -->
<!-- <view class="infoBodyItemFull" >
<span class="cardKeyFull">状态:</span><span>{{item.zt}}</span>
</view> -->
</view>
</view>
</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 {
upptzdList:[],
serachName: "",
status: "",
gwjlinfor: {},
wlinfor: [
]
}
},
onPullDownRefresh() {
setTimeout(() => {
uni.stopPullDownRefresh()
}, 2500)
},
methods: {
// nextTo(item) {
// let info = {
// type:'xzppdh',
// data: item
// }
// eventBus.$emit('sendInfo', info);
// uni.navigateBack({
// delta: 1
// });
// },
apiGetwl() {
queryWlList({
condition: this.serachName
}).then(e => {
this.wlinfor = e.records
})
},
searchFood() {
this.apiGetwl()
},
gotoBackPage() {
this.$router.go(-1)
}
},
onLoad(e) {
if(e.query){
const {ppdInfo}=JSON.parse(e.query)
this.upptzdList=ppdInfo.upptzdList
}
}
}
</script>
<style lang="scss" scoped>
.wid50 {
width: 50%;
}
.noinfoCard{
width: 100%;
height: 80px;
line-height: 80px;
text-align: center;
font-size: 16px;
color: #666;
}
.cardKey{
display: inline-block;
width: 60px;
text-align: right;
}
.cardKeyFull{
display: inline-block;
// width: 50%;
text-align: center;
}
.infoCard{
background-color: white;
border-radius: 5px;
margin: 5px 4px 5px 4px;
border: 1px #ddd solid;
padding: 5px 0px 5px 0px;
box-shadow: 1px 1px 1px #888888;
.infoCardTitle{
font-size: 15px;
padding: 0px 20px 0px 20px;
border-bottom: 1px solid #ddd;
text-align: center;
line-height: 30px;
height: 30px;
font-weight: 550;
background-color: #a7a7a7;
color: #fff;
}
.infoBody{
display: flex;
flex-wrap: wrap;
overflow: auto;
.infoBodyItem{
width: 50%;
padding-left: 10px;
font-size: 14px;
height: 25px;
line-height: 25px;
}
.infoBodyItemFull{
text-align: left;
width: 100%;
padding-left: 10px;
font-size: 14px;
height: 25px;
line-height: 25px;
}
}
}
</style>
<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>
</view> -->
<view v-for="(item,index) in wlxxList" :key="index" class="infoCard" style="border-bottom: 1px solid #eee;">
<view class="infoBody">
<view class="infoBodyItemFull" >
<span class="cardKeyFull">物料编码:</span><span>{{item.wlid}}</span>
</view>
<view class="infoBodyItemFull" >
<span class="cardKeyFull">物料名称:</span><span>{{item.wlname}}</span>
</view>
<view class="infoBodyItemFull" >
<span class="cardKeyFull">数量:</span><span>{{item.xqsl}}</span>
</view>
</view>
<!-- <view style="height: 40px;width:100%">
<div style="float: right;margin-top: 8px;padding-right: 20px;">
<uni-number-box :min="0" :max="99999" v-model="num"></uni-number-box>
</div>
</view>
<div style="height: 50px;width:100%">
<div style="float: right;margin-top: 8px;margin-right: 20px;">
<button style="height: 25px;font-size: 16px;" @tap="nextTo('xzwlxx')" class="cu-btn round bg-blue" >{{"确认"}}</button>
</div>
</div> -->
</view>
</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 {
wlxxList:[],
num:13,
serachName: "",
status: "",
gwjlinfor: {},
wlinfor: [
]
}
},
onPullDownRefresh() {
setTimeout(() => {
uni.stopPullDownRefresh()
}, 2500)
},
methods: {
nextTo(item) {
let info = {
type:'xzwlxx',
wlinfor: item
}
eventBus.$emit('sendInfo', info);
uni.navigateBack({
delta: 1
});
},
apiGetwl() {
queryWlList({
condition: this.serachName
}).then(e => {
this.wlinfor = e.records
})
},
searchFood() {
this.apiGetwl()
},
gotoBackPage() {
this.$router.go(-1)
}
},
onLoad(e) {
if(e.query){
const {ppdInfo}=JSON.parse(e.query)
this.wlxxList=ppdInfo.wlxxList
}
}
}
</script>
<style lang="scss" scoped>
.wid50 {
width: 50%;
}
.noinfoCard{
width: 100%;
height: 80px;
line-height: 80px;
text-align: center;
font-size: 16px;
color: #666;
}
.cardKey{
display: inline-block;
width: 60px;
text-align: right;
}
.cardKeyFull{
display: inline-block;
// width: 50%;
text-align: center;
}
.infoCard{
background-color: white;
border-radius: 5px;
margin: 5px 4px 5px 4px;
border: 1px #ddd solid;
padding: 5px 0px 5px 0px;
box-shadow: 1px 1px 1px #888888;
.infoCardTitle{
font-size: 15px;
padding: 0px 20px 0px 20px;
border-bottom: 1px solid #ddd;
text-align: center;
line-height: 30px;
height: 30px;
font-weight: 550;
background-color: #a7a7a7;
color: #fff;
}
.infoBody{
display: flex;
flex-wrap: wrap;
overflow: auto;
.infoBodyItem{
width: 50%;
padding-left: 10px;
font-size: 14px;
height: 25px;
line-height: 25px;
}
.infoBodyItemFull{
text-align: left;
width: 100%;
padding-left: 10px;
font-size: 14px;
height: 25px;
line-height: 25px;
}
}
}
</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