Merge remote-tracking branch 'origin/master'

master
董哲奇 8 months ago
commit 6e24f4a770

@ -24,6 +24,14 @@ export const zx=function(data){
}) })
} }
export const getPgd2=function(data){
return request({
url: '/zyjh/pgd2',
method: 'post',
data: data
})
}
export const getPgd=function(data){ export const getPgd=function(data){
return request({ return request({
url: '/zyjh/pgd', url: '/zyjh/pgd',

@ -46,9 +46,7 @@ const actions = {
const { username, password } = userInfo const { username, password } = userInfo
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
login({ yhdm: username.trim(), pwd: password }).then(response => { login({ yhdm: username.trim(), pwd: password }).then(response => {
console.log(response)
const { data } = response const { data } = response
console.log(data)
commit('SET_TOKEN', data.token) commit('SET_TOKEN', data.token)
setToken(data.token) setToken(data.token)
resolve() resolve()
@ -82,7 +80,6 @@ const actions = {
// commit('SET_ROLES', menu) // commit('SET_ROLES', menu)
console.log(user)
commit('SET_NAME', user.yhms) commit('SET_NAME', user.yhms)
commit('SET_YHDM', user.yhdm) commit('SET_YHDM', user.yhdm)
commit('SET_BMBM', user.bmbm) commit('SET_BMBM', user.bmbm)

@ -79,7 +79,6 @@
:data="list" :data="list"
:custom-config="{ storage: true }" :custom-config="{ storage: true }"
:scroll-y="{enabled: true}" :scroll-y="{enabled: true}"
:span-method="rowspanMethod1"
highlight-hover-row highlight-hover-row
show-overflow show-overflow
show-header-overflow show-header-overflow
@ -1233,10 +1232,26 @@ export default {
filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }], filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
filterRender: { name: 'FilterCombination', }, filterRender: { name: 'FilterCombination', },
}, },
{ field: '', title: '大板切割开始', width: 120,
filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
filterRender: { name: 'FilterCombination', },
},
{ field: 'ykpkjs', title: '坡口切割结束', width: 120, { field: 'ykpkjs', title: '坡口切割结束', width: 120,
filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }], filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
filterRender: { name: 'FilterCombination', }, filterRender: { name: 'FilterCombination', },
}, },
{ field: '', title: '二垮龙门板数', width: 120,
filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
filterRender: { name: 'FilterCombination', },
},
{ field: '', title: '龙门切割开始', width: 120,
filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
filterRender: { name: 'FilterCombination', },
},
{ field: '', title: '龙门切割结束', width: 120,
filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
filterRender: { name: 'FilterCombination', },
},
{ field: 'eksk', title: '二垮数控板数', width: 120, { field: 'eksk', title: '二垮数控板数', width: 120,
filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }], filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
filterRender: { name: 'FilterCombination', }, filterRender: { name: 'FilterCombination', },
@ -1289,6 +1304,18 @@ export default {
filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }], filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
filterRender: { name: 'FilterCombination', }, filterRender: { name: 'FilterCombination', },
}, },
{ field: '', title: '腹板板数', width: 120,
filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
filterRender: { name: 'FilterCombination', },
},
{ field: '', title: '腹板切割开始', width: 120,
filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
filterRender: { name: 'FilterCombination', },
},
{ field: '', title: '腹板切割结束', width: 120,
filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
filterRender: { name: 'FilterCombination', },
},
{ field: 'skbs', title: '数控 板数', width: 120, { field: 'skbs', title: '数控 板数', width: 120,
filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }], filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
filterRender: { name: 'FilterCombination', }, filterRender: { name: 'FilterCombination', },

@ -204,7 +204,6 @@
}else{ }else{
this.loginForm.uuid='' this.loginForm.uuid=''
this.$refs.loginForm.validate(valid => { this.$refs.loginForm.validate(valid => {
console.log(this.loginForm)
if (valid) { if (valid) {
this.loading = true this.loading = true
this.$store.dispatch('user/login', this.loginForm) this.$store.dispatch('user/login', this.loginForm)

@ -47,7 +47,7 @@ export default {
this.data.zyType=this.$route.query.zyType||'0' this.data.zyType=this.$route.query.zyType||'0'
const path=this.$route.path.replace('/','') const path=this.$route.path.replace('/','')
this.nextPath=this.nextPathName[path].path this.nextPath=this.nextPathName[path].path
if (path==='sliao'){ if (path==='sliao'||path==='llfk'){
this.qtbs=false this.qtbs=false
} }
if (path==='ljian'){ if (path==='ljian'){

@ -4,7 +4,7 @@
<script> <script>
import paoWanPgdConfig from './pgdTable' import paoWanPgdConfig from './pgdTable'
import {getDw, getPgd} from "@/api/zyjh"; import {getDw, getPgd, getPgd2, zx} from "@/api/zyjh";
export default { export default {
name:'HxianPgd', name:'HxianPgd',
props:{ props:{
@ -12,6 +12,10 @@ export default {
type:Array, type:Array,
default:[] default:[]
}, },
dw:{
type:Array,
default: []
}
}, },
data(){ data(){
return{ return{
@ -20,6 +24,31 @@ export default {
setExt:null, setExt:null,
} }
}, },
sockets:{
zyjhzx(data){
if (this.deviceId!==data.msg.deviceId&&data.msg.actionType!=='开始报工'){
return
}
//
const djhWhLengh=3
const tmpList=this.list.filter(item=>item.djh===data.msg.orderNumber||item.djh.slice(-djhWhLengh)===data.msg.orderNumber)
if (tmpList.length>1){
this.list=tmpList
this.$message.warning('短号有重复,请使用全工单号重新派工!!!')
return
}
for (const item of this.list) {
if (item.djh===data.msg.orderNumber||item.djh.slice(-djhWhLengh)===data.msg.orderNumber){
const tmpArr=[{
id:item.id,
hxfkry:item.hxry
}]
this.baogong(tmpArr,item)
break
}
}
}
},
created(){ created(){
const {options,columns,setExt}=paoWanPgdConfig() const {options,columns,setExt}=paoWanPgdConfig()
this.setExt=setExt this.setExt=setExt
@ -27,11 +56,38 @@ export default {
this.gridOptions.columns=columns this.gridOptions.columns=columns
}, },
methods:{ methods:{
baogong(tmpArr,data){
let ycldwInfo=null
for (const dw of this.dw) {
for (const info of dw.list) {
if (data.dcCh===info.czbh&&data.dcPl!==info.pl&&data.dcFd!==info.fd&&data.tzbh!==info.tlth){
ycldwInfo=info
break
}
}
}
if (!ycldwInfo){
this.$message.warning(`理料垛位上板材与记录不符,需查验后再进行报工!`)
return;
}
zx({
field:'hxfkrq',
zxZtName:'HXFK',
list:tmpArr,
ycldwInfo:ycldwInfo
}).then(res=>{
if (res.success){
window.localStorage.removeItem('zyjh')
this.initData(data.pwry,'41')
}
})
},
initData(worker,zt){ initData(worker,zt){
getDw({type:'llj'}).then(res=>{ getDw({type:'llj'}).then(res=>{
this.gridOptions.ycldw=res.data this.gridOptions.ycldw=res.data
}) })
getPgd({user:worker,zt:zt,field:'hxry'}).then(res=>{ getPgd2({user:worker}).then(res=>{
this.list=res.data
this.gridOptions.data=res.data this.gridOptions.data=res.data
this.setExt('workers',this.$props.workers) this.setExt('workers',this.$props.workers)
}) })

@ -53,6 +53,7 @@ export default function () {
{field: 'llcs', title: '层数', width: 60}, {field: 'llcs', title: '层数', width: 60},
{field: 'dcCh', title: '船号', width: 80}, {field: 'dcCh', title: '船号', width: 80},
{field: 'dcPl', title: '批量', width: 80}, {field: 'dcPl', title: '批量', width: 80},
{field: 'dcFd', title: '分段', width: 80},
{field: 'wpgg', title: '材质', width: 80}, {field: 'wpgg', title: '材质', width: 80},
{field: 'wpxh', title: '规格', width: 70}, {field: 'wpxh', title: '规格', width: 70},
{field: 'slwlh', title: '炉批号', width: 100}, {field: 'slwlh', title: '炉批号', width: 100},

@ -1,7 +1,7 @@
<template> <template>
<div class="container"> <div class="container">
<div id="pwpg" class="pwpg" ref="pwpg"></div> <div id="pwpg" class="pwpg" ref="pwpg"></div>
<HxianPgd id="hxpgd" ref="hxpgd" @initPgd="initPgd" :pgd="pgd" :workers="workers" @pgdClick="pgdClick"/> <HxianPgd id="hxpgd" ref="hxpgd" @initPgd="initPgd" :pgd="pgd" :workers="workers" :dw="dw" @pgdClick="pgdClick"/>
<ZyjhSelectComp id="selectComp" ref="selRef" @initWorkers="initWorkers"/> <ZyjhSelectComp id="selectComp" ref="selRef" @initWorkers="initWorkers"/>
<TipsComp /> <TipsComp />
</div> </div>
@ -75,17 +75,6 @@ export default {
this.$refs.hxpgd.initData(this.currentWorker.userCode,'51') this.$refs.hxpgd.initData(this.currentWorker.userCode,'51')
} }
}) })
this.sockets.subscribe('zyjhzx', data => {
if (this.zt===data.zt){
const tmpArr=[{
id:data.zyjh.id,
hxfkry:data.zyjh.hxry
}]
this.$refs.hxpgd.paigong0(tmpArr)
}else{
this.$message.error(`工单号错误:${data.gdh}`)
}
})
}, },
initPgd(pgd={}){ initPgd(pgd={}){
const group=this.drawGd(pgd) const group=this.drawGd(pgd)

@ -5,7 +5,7 @@
<script> <script>
import { VXETable } from 'vxe-table' import { VXETable } from 'vxe-table'
import paoWanPgdConfig from './pgdTable' import paoWanPgdConfig from './pgdTable'
import {getDw, getPgd, zx} from "@/api/zyjh"; import {getDw, getPgd,getPgd2, zx} from "@/api/zyjh";
export default { export default {
name:'HxianPgd', name:'HxianPgd',
@ -27,11 +27,42 @@ export default {
setExt:null setExt:null
} }
}, },
sockets:{
zyjhzx(data){
if (this.deviceId!==data.msg.deviceId&&data.msg.actionType!=='开始派工'){
return
}
//
const djhWhLengh=3
const tmpList=this.list.filter(item=>item.djh===data.msg.orderNumber||item.djh.slice(-djhWhLengh)===data.msg.orderNumber)
if (tmpList.length>1){
this.list=tmpList
this.$message.warning('短号有重复,请使用全工单号重新派工!!!')
return
}
for (const item of this.list) {
if (item.djh===data.msg.orderNumber||item.djh.slice(-djhWhLengh)===data.msg.orderNumber){
const worker=this.$props.worker()
if (!worker){
this.$message.warning('请选择施工人员后再次派工!!!')
return
}
const tmpArr=[{
id:item.id,
hxry:worker.userCode
}]
this.paigong0(tmpArr)
break
}
}
}
},
created(){ created(){
const {options,columns,setExt}=paoWanPgdConfig() const {options,columns,setExt}=paoWanPgdConfig()
this.setExt=setExt this.setExt=setExt
this.gridOptions=options this.gridOptions=options
this.gridOptions.columns=columns this.gridOptions.columns=columns
this.setExt('workers',this.$props.workers)
this.initData() this.initData()
getDw({type:'llj'}).then(res=>{ getDw({type:'llj'}).then(res=>{
this.gridOptions.ycldw=res.data this.gridOptions.ycldw=res.data
@ -39,9 +70,9 @@ export default {
}, },
methods:{ methods:{
initData() { initData() {
getPgd({zt: '42'}).then(res => { getPgd2({field:'hxry'}).then(res => {
this.list=res.data
this.gridOptions.data = res.data this.gridOptions.data = res.data
this.setExt('workers',this.$props.workers)
}) })
}, },
setWorkers(workers){ setWorkers(workers){
@ -68,6 +99,17 @@ export default {
this.paigong(worker) this.paigong(worker)
} }
}, },
paigong0(arr){
const data={
type:this.type,
field:'hxpgrq',
zxZtName:'HXPG',
list:arr
}
zx(data).then(resp=>{
this.initData()
})
},
paigong(worker) { paigong(worker) {
const list = this.$refs.vxeGrid.getCheckboxRecords() const list = this.$refs.vxeGrid.getCheckboxRecords()
const tmpArr = [] const tmpArr = []

@ -48,22 +48,22 @@ export default {
sockets:{}, sockets:{},
methods:{ methods:{
wsSubscribe(){ wsSubscribe(){
this.sockets.subscribe('zyjhzx', data => { // this.sockets.subscribe('zyjhzx', data => {
const currentWorker=this.getCurrentWorker() // const currentWorker=this.getCurrentWorker()
if (!currentWorker){ // if (!currentWorker){
this.$message.error(`未选择指派人员`) // this.$message.error(``)
return; // return;
} // }
if (this.zt===data.zt){ // if (this.zt===data.zt){
const tmpArr=[{ // const tmpArr=[{
id:data.zyjh.id, // id:data.zyjh.id,
pwry:currentWorker.userCode // pwry:currentWorker.userCode
}] // }]
this.$refs.pwpgd.paigong0(tmpArr) // this.$refs.pwpgd.paigong0(tmpArr)
}else{ // }else{
this.$message.error(`工单号错误:${data.gdh}`) // this.$message.error(`:${data.gdh}`)
} // }
}) // })
}, },
initPgd(pgd={}){ initPgd(pgd={}){
const group=this.drawGd(pgd) const group=this.drawGd(pgd)

@ -190,7 +190,7 @@ export const sljh=function (width,height){
fill:'#fff', fill:'#fff',
align:'center', align:'center',
verticalAlign:'middle', verticalAlign:'middle',
text:'规格' text:'分段'
}) })
nameGroup.add(name3) nameGroup.add(name3)
@ -204,7 +204,7 @@ export const sljh=function (width,height){
fill:'#fff', fill:'#fff',
align:'center', align:'center',
verticalAlign:'middle', verticalAlign:'middle',
text:'垛位' text:'规格'
}) })
nameGroup.add(name4) nameGroup.add(name4)
@ -218,7 +218,7 @@ export const sljh=function (width,height){
fill:'#fff', fill:'#fff',
align:'center', align:'center',
verticalAlign:'middle', verticalAlign:'middle',
text:'层数' text:'垛位'
}) })
nameGroup.add(name5) nameGroup.add(name5)
@ -263,6 +263,28 @@ export const sljh=function (width,height){
y: 43, y: 43,
width: 65, width: 65,
height:20, height:20,
fontSize:12,
fontStyle:'bold',
fill:'#fff',
align:'center',
verticalAlign:'middle',
text:item.dcFd
})
infoGroup.add(info3)
const formatName=(bm)=>{
for (const it of qgkw) {
if (it.bm===bm){
return it.bmsm
}
}
}
const info4=new Konva.Text({
x: 0,
y: 64.5,
width: 65,
height:20,
fontSize:9, fontSize:9,
fontStyle:'bold', fontStyle:'bold',
fill:'#fff', fill:'#fff',
@ -270,7 +292,21 @@ export const sljh=function (width,height){
verticalAlign:'middle', verticalAlign:'middle',
text:item.wpgg text:item.wpgg
}) })
infoGroup.add(info3) infoGroup.add(info4)
const info5=new Konva.Text({
x: 0,
y: 86.5,
width: 65,
height:20,
fontSize:10,
fontStyle:'bold',
fill:'#fff',
align:'center',
verticalAlign:'middle',
text:formatName(item.kw)
})
infoGroup.add(info5)
return qyGroup return qyGroup
} }
@ -279,3 +315,19 @@ export const sljh=function (width,height){
layer,group,drawItem layer,group,drawItem
} }
} }
const qgkw=[
{"bmsm": "2跨超长超宽曲板", "bmlb": "QGKW", "bm": "10"},
{"bmsm": "2跨T型材腹板", "bmlb": "QGKW", "bm": "11"},
{"bmsm": "2跨激光切割板", "bmlb": "QGKW", "bm": "12"},
{"bmsm": "3跨曲板", "bmlb": "QGKW", "bm": "13"},
{"bmsm": "3跨厚板", "bmlb": "QGKW", "bm": "14"},
{"bmsm": "4跨普通板", "bmlb": "QGKW", "bm": "15"},
{"bmsm": "7跨型板", "bmlb": "QGKW", "bm": "16"},
{"bmsm": "光电", "bmlb": "QGKW", "bm": "17"},
{"bmsm": "2跨T型材面板", "bmlb": "QGKW", "bm": "5"},
{"bmsm": "3跨平铁", "bmlb": "QGKW", "bm": "6"},
{"bmsm": "1跨平直大板", "bmlb": "QGKW", "bm": "7"},
{"bmsm": "1跨进线板", "bmlb": "QGKW", "bm": "8"},
{"bmsm": "2跨超长超宽板", "bmlb": "QGKW", "bm": "9"}
]

@ -14,7 +14,7 @@ import drawDw from './comps/dw'
import drawPgd from './comps/pgd' import drawPgd from './comps/pgd'
import baifang from "./comps/baifang"; import baifang from "./comps/baifang";
import {sljh} from "@/views/zyjhzx/lliaofkui/comps/sljh"; import {sljh} from "@/views/zyjhzx/lliaofkui/comps/sljh";
import {getPgd, getYcldw, shangLiao} from "@/api/zyjh"; import {getPgd,getPgd2, getYcldw, shangLiao} from "@/api/zyjh";
import {getBzryList} from "@/api/sjzx/bzzGL"; import {getBzryList} from "@/api/sjzx/bzzGL";
import ZyjhSelectComp from "@/views/zyjhzx/components/SelectComp.vue"; import ZyjhSelectComp from "@/views/zyjhzx/components/SelectComp.vue";
import TipsComp from "@/views/zyjhzx/components/TipsComp.vue"; import TipsComp from "@/views/zyjhzx/components/TipsComp.vue";
@ -207,12 +207,19 @@ export default {
that.initPgd(list[i]) that.initPgd(list[i])
}) })
qyGroup.on('mousedown touchstart',function ({evt}){ qyGroup.on('mousedown touchstart',function ({evt}){
console.log(111)
console.log(evt)
const worker=that.currentWorker; const worker=that.currentWorker;
if (!that.canSl||!worker){ if (!that.canSl||!worker){
return return
} }
const {clientX:x,clientY:y}=evt const {clientX:_x,clientY:_y}=evt
let x=_x,y=_y
if (evt.type==='touchstart'){
x=evt.targetTouches[0].clientX
y=evt.targetTouches[0].clientY
}
touchingFlag=true; touchingFlag=true;
const _that=this const _that=this
setTimeout(()=>{ setTimeout(()=>{
@ -350,7 +357,7 @@ export default {
}) })
}, },
initSljhItem(){ initSljhItem(){
getPgd({zt:'32'}).then(res=>{ getPgd2({field:'llfkry'}).then(res=>{
this.sljhItemList=res.data this.sljhItemList=res.data
this.drawSljhItem(res.data) this.drawSljhItem(res.data)
}) })

@ -54,7 +54,7 @@ export default {
if (this.zt===data.zt){ if (this.zt===data.zt){
const tmpArr=[{ const tmpArr=[{
id:data.zyjh.id, id:data.zyjh.id,
pwry:currentWorker.userCode llry:currentWorker.userCode
}] }]
this.$refs.pwpgd.paigong0(tmpArr) this.$refs.pwpgd.paigong0(tmpArr)
}else{ }else{

@ -21,6 +21,7 @@ export default {
return{ return{
gridOptions:{}, gridOptions:{},
setExt:null, setExt:null,
list:[],
deviceId:null, deviceId:null,
} }
}, },
@ -33,24 +34,24 @@ export default {
}, },
sockets:{ sockets:{
zyjhzx(data){ zyjhzx(data){
if (this.deviceId!==data.msg.deviceId&&data.msg.actionType==='开始报工'){ if (this.deviceId!==data.msg.deviceId&&data.msg.actionType!=='开始报工'){
return return
} }
// //
const djhWhLengh=3 const djhWhLengh=3
const tmpList=this.list.filter(item=>item.djh===data.djh||item.djh.slice(-djhWhLengh)===data.msg.orderNumber) const tmpList=this.list.filter(item=>item.djh===data.msg.orderNumber||item.djh.slice(-djhWhLengh)===data.msg.orderNumber)
if (tmpList.length>1){ if (tmpList.length>1){
this.list=tmpList this.list=tmpList
this.$message.warning('短号有重复,请使用全工单号重新派工!!!') this.$message.warning('短号有重复,请使用全工单号重新派工!!!')
return return
} }
for (const item of this.list) { for (const item of this.list) {
if (item.djh===data.djh||item.djh.slice(-djhWhLengh)===data.msg.orderNumber){ if (item.djh===data.msg.orderNumber||item.djh.slice(-djhWhLengh)===data.msg.orderNumber){
const tmpArr=[{ const tmpArr=[{
id:item.id, id:item.id,
pwfkry: data.pwry pwfkry: item.pwry
}] }]
this.baogong(tmpArr) this.baogong(tmpArr,item)
break break
} }
} }
@ -79,16 +80,14 @@ export default {
}).then(res=>{ }).then(res=>{
if (res.success){ if (res.success){
window.localStorage.removeItem('zyjh') window.localStorage.removeItem('zyjh')
this.initData(data.pwry,'31')
} }
}) })
}, },
initData(worker,zt){ initData(worker,zt){
// getDw({type:'ycl'}).then(res=>{
// console.log(res.data)
// this.gridOptions.ycldw=res.data
// })
this.gridOptions.ycldw=this.$props.dw this.gridOptions.ycldw=this.$props.dw
getPgd({user:worker,zt:zt,field:'pwry'}).then(res=>{ getPgd({user:worker,zt:zt,field:'pwry'}).then(res=>{
this.list=res.data
this.gridOptions.data=res.data this.gridOptions.data=res.data
this.setExt('workers',this.$props.workers) this.setExt('workers',this.$props.workers)
}) })

@ -74,17 +74,6 @@ export default {
this.initDw() this.initDw()
} }
}) })
this.sockets.subscribe('zyjhzx', data => {
if (this.zt===data.zt){
const tmpArr=[{
id:data.zyjh.id,
pwfkry:data.zyjh.pwry
}]
this.$refs.pwpgd.paigong0(tmpArr)
}else{
this.$message.error(`工单号错误:${data.gdh}`)
}
})
}, },
initPgd(pgd={}){ initPgd(pgd={}){
const group=this.drawGd(pgd) const group=this.drawGd(pgd)

@ -5,7 +5,7 @@
<script> <script>
import { VXETable } from 'vxe-table' import { VXETable } from 'vxe-table'
import paoWanPgdConfig from './pgdTable' import paoWanPgdConfig from './pgdTable'
import {getDw, getPgd, zx} from "@/api/zyjh"; import {getDw, getPgd, getPgd2, zx} from "@/api/zyjh";
export default { export default {
name:'PwanPgd', name:'PwanPgd',
@ -40,20 +40,28 @@ export default {
}, },
sockets:{ sockets:{
zyjhzx(data){ zyjhzx(data){
if (this.deviceId!==data.msg.deviceId&&data.msg.actionType==='开始派工'){ console.log(data)
if (this.deviceId!==data.msg.deviceId&&data.msg.actionType!=='开始派工'){
return return
} }
console.log(123)
// //
const djhWhLengh=3 const djhWhLengh=3
const tmpList=this.list.filter(item=>item.djh===data.djh||item.djh.slice(-djhWhLengh)===data.msg.orderNumber) const tmpList=this.list.filter(item=>item.djh===data.msg.orderNumber||item.djh.slice(-djhWhLengh)===data.msg.orderNumber)
if (tmpList.length>1){ if (tmpList.length>1){
this.list=tmpList this.list=tmpList
this.$message.warning('短号有重复,请使用全工单号重新派工!!!') this.$message.warning('短号有重复,请使用全工单号重新派工!!!')
return return
} }
console.log(111,tmpList)
for (const item of this.list) { for (const item of this.list) {
if (item.djh===data.djh||item.djh.slice(-djhWhLengh)===data.msg.orderNumber){ if (item.djh===data.msg.orderNumber||item.djh.slice(-djhWhLengh)===data.msg.orderNumber){
const worker=this.$props.worker() const worker=this.$props.worker()
if (!worker){
this.$message.warning('请选择施工人员后再次派工!!!')
return
}
const tmpArr=[{ const tmpArr=[{
id:item.id, id:item.id,
pwry:worker.userCode pwry:worker.userCode
@ -66,7 +74,8 @@ export default {
}, },
methods:{ methods:{
initData(){ initData(){
getPgd({zt:'21'}).then(res=>{ getPgd2({field:'pwry'}).then(res=>{
this.list=res.data
this.gridOptions.data=res.data this.gridOptions.data=res.data
}) })
}, },

@ -5,7 +5,7 @@
<script> <script>
import { VXETable } from 'vxe-table' import { VXETable } from 'vxe-table'
import paoWanPgdConfig from './pgdTable' import paoWanPgdConfig from './pgdTable'
import {getDw, getPgd, zx} from "@/api/zyjh"; import {getDw, getPgd, getPgd2, zx} from "@/api/zyjh";
export default { export default {
name: 'QgePgd', name: 'QgePgd',
@ -17,6 +17,10 @@ export default {
workers:{ workers:{
type:Array, type:Array,
default:[] default:[]
},
dw:{
type:Array,
default: []
} }
}, },
data() { data() {
@ -28,6 +32,31 @@ export default {
setExt:null, setExt:null,
} }
}, },
sockets:{
zyjhzx(data){
if (this.deviceId!==data.msg.deviceId&&data.msg.actionType!=='开始报工'){
return
}
//
const djhWhLengh=3
const tmpList=this.list.filter(item=>item.djh===data.msg.orderNumber||item.djh.slice(-djhWhLengh)===data.msg.orderNumber)
if (tmpList.length>1){
this.list=tmpList
this.$message.warning('短号有重复,请使用全工单号重新派工!!!')
return
}
for (const item of this.list) {
if (item.djh===data.msg.orderNumber||item.djh.slice(-djhWhLengh)===data.msg.orderNumber){
const tmpArr=[{
id:item.id,
qgfkry:item.hxry
}]
this.baogong(tmpArr,item)
break
}
}
}
},
created() { created() {
const {options,columns,setExt}=paoWanPgdConfig() const {options,columns,setExt}=paoWanPgdConfig()
this.setExt=setExt this.setExt=setExt
@ -35,13 +64,40 @@ export default {
this.gridOptions.columns = columns this.gridOptions.columns = columns
}, },
methods: { methods: {
baogong(tmpArr,data){
let ycldwInfo=null
for (const dw of this.dw) {
for (const info of dw.list) {
if (data.dcCh===info.czbh&&data.dcPl!==info.pl&&data.dcFd!==info.fd&&data.tzbh!==info.tlth){
ycldwInfo=info
break
}
}
}
if (!ycldwInfo){
this.$message.warning(`理料垛位上板材与记录不符,需查验后再进行报工!`)
return;
}
zx({
field:'qgfkrq',
zxZtName:'QGFK',
list:tmpArr,
ycldwInfo:ycldwInfo
}).then(res=>{
if (res.success){
window.localStorage.removeItem('zyjh')
this.initData(data.pwry,'51')
}
})
},
initData(worker, zt) { initData(worker, zt) {
getDw({type:'llj'}).then(res=>{ getDw({type:'llj'}).then(res=>{
this.gridOptions.ycldw=res.data this.gridOptions.ycldw=res.data
}) })
this.currentWorker=worker this.currentWorker=worker
this.zt=zt this.zt=zt
getPgd({user: worker, zt: zt, field: 'qgry'}).then(res => { getPgd2({user: worker}).then(res => {
this.list=res.data
this.gridOptions.data = res.data this.gridOptions.data = res.data
this.setExt('workers',this.$props.workers) this.setExt('workers',this.$props.workers)
}) })

@ -53,6 +53,7 @@ export default function () {
{field: 'llcs', title: '层数', width: 60}, {field: 'llcs', title: '层数', width: 60},
{field: 'dcCh', title: '船号', width: 80}, {field: 'dcCh', title: '船号', width: 80},
{field: 'dcPl', title: '批量', width: 80}, {field: 'dcPl', title: '批量', width: 80},
{field: 'dcFd', title: '分段', width: 80},
{field: 'wpgg', title: '材质', width: 80}, {field: 'wpgg', title: '材质', width: 80},
{field: 'wpxh', title: '规格', width: 70}, {field: 'wpxh', title: '规格', width: 70},
{field: 'slwlh', title: '炉批号', width: 100}, {field: 'slwlh', title: '炉批号', width: 100},

@ -1,7 +1,7 @@
<template> <template>
<div class="container"> <div class="container">
<div id="pwpg" class="pwpg" ref="pwpg"></div> <div id="pwpg" class="pwpg" ref="pwpg"></div>
<QgePgd id="qgfkpgd" v-if="pgdShow" ref="hxpgd" @initPgd="initPgd" :pgd="pgd" :worker="getWorker" :workers="workers" @pgdClick="pgdClick"/> <QgePgd id="qgfkpgd" v-if="pgdShow" ref="hxpgd" @initPgd="initPgd" :pgd="pgd" :worker="getWorker" :dw="dw" :workers="workers" @pgdClick="pgdClick"/>
<ZyjhSelectComp id="selectComp" ref="selRef" @initWorkers="initWorkers" @clear="clear"/> <ZyjhSelectComp id="selectComp" ref="selRef" @initWorkers="initWorkers" @clear="clear"/>
<TipsComp /> <TipsComp />
</div> </div>
@ -77,17 +77,6 @@ export default {
this.$refs.hxpgd.initData(this.currentWorker.userCode,'61') this.$refs.hxpgd.initData(this.currentWorker.userCode,'61')
} }
}) })
this.sockets.subscribe('zyjhzx', data => {
if (this.zt===data.zt){
const tmpArr=[{
id:data.zyjh.id,
qgfkry:data.zyjh.qgry
}]
this.$refs.pwpgd.paigong0(tmpArr)
}else{
this.$message.error(`工单号错误:${data.gdh}`)
}
})
}, },
initPgd(pgd = {}) { initPgd(pgd = {}) {
const group = this.drawGd(pgd) const group = this.drawGd(pgd)

@ -5,7 +5,7 @@
<script> <script>
import { VXETable } from 'vxe-table' import { VXETable } from 'vxe-table'
import paoWanPgdConfig from './pgdTable' import paoWanPgdConfig from './pgdTable'
import {getDw, getPgd, zx} from "@/api/zyjh"; import {getDw, getPgd,getPgd2, zx} from "@/api/zyjh";
export default { export default {
name:'QgePgd', name:'QgePgd',
@ -27,20 +27,77 @@ export default {
setExt:null, setExt:null,
} }
}, },
sockets:{
zyjhzx(data){
if (this.deviceId!==data.msg.deviceId&&data.msg.actionType==='开始派工'){
return
}
//
const djhWhLengh=3
const tmpList=this.list.filter(item=>item.djh===data.msg.orderNumber||item.djh.slice(-djhWhLengh)===data.msg.orderNumber)
if (tmpList.length>1){
this.list=tmpList
this.$message.warning('短号有重复,请使用全工单号重新派工!!!')
return
}
for (const item of this.list) {
if (item.djh===data.msg.orderNumber||item.djh.slice(-djhWhLengh)===data.msg.orderNumber){
const worker=this.$props.worker()
const tmpArr=[{
id:item.id,
pwry:worker.userCode
}]
this.paigong0(tmpArr)
break
}
}
}
},
sockets:{
zyjhzx(data){
if (this.deviceId!==data.msg.deviceId&&data.msg.actionType!=='开始派工'){
return
}
//
const djhWhLengh=3
const tmpList=this.list.filter(item=>item.djh===data.msg.orderNumber||item.djh.slice(-djhWhLengh)===data.msg.orderNumber)
if (tmpList.length>1){
this.list=tmpList
this.$message.warning('短号有重复,请使用全工单号重新派工!!!')
return
}
for (const item of this.list) {
if (item.djh===data.msg.orderNumber||item.djh.slice(-djhWhLengh)===data.msg.orderNumber){
const worker=this.$props.worker()
if (!worker){
this.$message.warning('请选择施工人员后再次派工!!!')
return
}
const tmpArr=[{
id:item.id,
qgry:worker.userCode
}]
this.paigong0(tmpArr)
break
}
}
}
},
created(){ created(){
const {options,columns,setExt}=paoWanPgdConfig() const {options,columns,setExt}=paoWanPgdConfig()
this.setExt=setExt this.setExt=setExt
this.gridOptions=options this.gridOptions=options
this.gridOptions.columns=columns this.gridOptions.columns=columns
this.setExt('workers',this.$props.workers)
getDw({type:'llj'}).then(res=>{ getDw({type:'llj'}).then(res=>{
this.gridOptions.ycldw=res.data this.gridOptions.ycldw=res.data
}) })
}, },
methods:{ methods:{
initData() { initData() {
getPgd({zt: '42',ztHx:'52'}).then(res => { getPgd2({field: 'qgry'}).then(res => {
this.list=res.data
this.gridOptions.data = res.data this.gridOptions.data = res.data
this.setExt('workers',this.$props.workers)
}) })
}, },
setWorkers(workers){ setWorkers(workers){
@ -67,6 +124,17 @@ export default {
this.paigong(worker) this.paigong(worker)
} }
}, },
paigong0(arr){
const data={
type:this.type,
field:'qgpgrq',
zxZtName:'QGPG',
list:arr
}
zx(data).then(resp=>{
this.initData()
})
},
paigong(worker) { paigong(worker) {
const list = this.$refs.vxeGrid.getCheckboxRecords() const list = this.$refs.vxeGrid.getCheckboxRecords()
const tmpArr = [] const tmpArr = []

@ -49,22 +49,22 @@ export default {
sockets:{}, sockets:{},
methods:{ methods:{
wsSubscribe(){ wsSubscribe(){
this.sockets.subscribe('zyjhzx', data => { // this.sockets.subscribe('zyjhzx', data => {
const currentWorker=this.getCurrentWorker() // const currentWorker=this.getCurrentWorker()
if (!currentWorker){ // if (!currentWorker){
this.$message.error(`未选择指派人员`) // this.$message.error(``)
return; // return;
} // }
if (this.zt===data.zt){ // if (this.zt===data.zt){
const tmpArr=[{ // const tmpArr=[{
id:data.zyjh.id, // id:data.zyjh.id,
pwry:currentWorker.userCode // pwry:currentWorker.userCode
}] // }]
this.$refs.pwpgd.paigong0(tmpArr) // this.$refs.pwpgd.paigong0(tmpArr)
}else{ // }else{
this.$message.error(`工单号错误:${data.gdh}`) // this.$message.error(`:${data.gdh}`)
} // }
}) // })
}, },
initPgd(pgd={}){ initPgd(pgd={}){
const group=this.drawGd(pgd) const group=this.drawGd(pgd)

Loading…
Cancel
Save