1.作业计划执行看板修改为上料核对后可见

2.作业计划执行看板修复各工序语音派工和报工bug
3.月度计划合并分段显示
master
董哲奇 7 months ago
parent 2a0ba9ebcc
commit 1dd1029a18

@ -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){
return request({
url: '/zyjh/pgd',

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

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

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

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

@ -4,7 +4,7 @@
<script>
import paoWanPgdConfig from './pgdTable'
import {getDw, getPgd} from "@/api/zyjh";
import {getDw, getPgd, getPgd2, zx} from "@/api/zyjh";
export default {
name:'HxianPgd',
props:{
@ -12,6 +12,10 @@ export default {
type:Array,
default:[]
},
dw:{
type:Array,
default: []
}
},
data(){
return{
@ -20,6 +24,31 @@ export default {
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(){
const {options,columns,setExt}=paoWanPgdConfig()
this.setExt=setExt
@ -27,11 +56,38 @@ export default {
this.gridOptions.columns=columns
},
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){
getDw({type:'llj'}).then(res=>{
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.setExt('workers',this.$props.workers)
})

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

@ -1,7 +1,7 @@
<template>
<div class="container">
<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"/>
<TipsComp />
</div>
@ -75,17 +75,6 @@ export default {
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={}){
const group=this.drawGd(pgd)

@ -5,7 +5,7 @@
<script>
import { VXETable } from 'vxe-table'
import paoWanPgdConfig from './pgdTable'
import {getDw, getPgd, zx} from "@/api/zyjh";
import {getDw, getPgd,getPgd2, zx} from "@/api/zyjh";
export default {
name:'HxianPgd',
@ -27,11 +27,42 @@ export default {
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(){
const {options,columns,setExt}=paoWanPgdConfig()
this.setExt=setExt
this.gridOptions=options
this.gridOptions.columns=columns
this.setExt('workers',this.$props.workers)
this.initData()
getDw({type:'llj'}).then(res=>{
this.gridOptions.ycldw=res.data
@ -39,9 +70,9 @@ export default {
},
methods:{
initData() {
getPgd({zt: '42'}).then(res => {
getPgd2({field:'hxry'}).then(res => {
this.list=res.data
this.gridOptions.data = res.data
this.setExt('workers',this.$props.workers)
})
},
setWorkers(workers){
@ -68,6 +99,17 @@ export default {
this.paigong(worker)
}
},
paigong0(arr){
const data={
type:this.type,
field:'hxpgrq',
zxZtName:'HXPG',
list:arr
}
zx(data).then(resp=>{
this.initData()
})
},
paigong(worker) {
const list = this.$refs.vxeGrid.getCheckboxRecords()
const tmpArr = []

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

@ -190,7 +190,7 @@ export const sljh=function (width,height){
fill:'#fff',
align:'center',
verticalAlign:'middle',
text:'规格'
text:'分段'
})
nameGroup.add(name3)
@ -204,7 +204,7 @@ export const sljh=function (width,height){
fill:'#fff',
align:'center',
verticalAlign:'middle',
text:'垛位'
text:'规格'
})
nameGroup.add(name4)
@ -218,7 +218,7 @@ export const sljh=function (width,height){
fill:'#fff',
align:'center',
verticalAlign:'middle',
text:'层数'
text:'垛位'
})
nameGroup.add(name5)
@ -263,6 +263,28 @@ export const sljh=function (width,height){
y: 43,
width: 65,
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,
fontStyle:'bold',
fill:'#fff',
@ -270,7 +292,21 @@ export const sljh=function (width,height){
verticalAlign:'middle',
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
}
@ -279,3 +315,19 @@ export const sljh=function (width,height){
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 baifang from "./comps/baifang";
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 ZyjhSelectComp from "@/views/zyjhzx/components/SelectComp.vue";
import TipsComp from "@/views/zyjhzx/components/TipsComp.vue";
@ -207,12 +207,19 @@ export default {
that.initPgd(list[i])
})
qyGroup.on('mousedown touchstart',function ({evt}){
console.log(111)
console.log(evt)
const worker=that.currentWorker;
if (!that.canSl||!worker){
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;
const _that=this
setTimeout(()=>{
@ -350,7 +357,7 @@ export default {
})
},
initSljhItem(){
getPgd({zt:'32'}).then(res=>{
getPgd2({field:'llfkry'}).then(res=>{
this.sljhItemList=res.data
this.drawSljhItem(res.data)
})

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

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

@ -74,17 +74,6 @@ export default {
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={}){
const group=this.drawGd(pgd)

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

@ -5,7 +5,7 @@
<script>
import { VXETable } from 'vxe-table'
import paoWanPgdConfig from './pgdTable'
import {getDw, getPgd, zx} from "@/api/zyjh";
import {getDw, getPgd, getPgd2, zx} from "@/api/zyjh";
export default {
name: 'QgePgd',
@ -17,6 +17,10 @@ export default {
workers:{
type:Array,
default:[]
},
dw:{
type:Array,
default: []
}
},
data() {
@ -28,6 +32,31 @@ export default {
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() {
const {options,columns,setExt}=paoWanPgdConfig()
this.setExt=setExt
@ -35,13 +64,40 @@ export default {
this.gridOptions.columns = columns
},
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) {
getDw({type:'llj'}).then(res=>{
this.gridOptions.ycldw=res.data
})
this.currentWorker=worker
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.setExt('workers',this.$props.workers)
})

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

@ -1,7 +1,7 @@
<template>
<div class="container">
<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"/>
<TipsComp />
</div>
@ -77,17 +77,6 @@ export default {
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 = {}) {
const group = this.drawGd(pgd)

@ -5,7 +5,7 @@
<script>
import { VXETable } from 'vxe-table'
import paoWanPgdConfig from './pgdTable'
import {getDw, getPgd, zx} from "@/api/zyjh";
import {getDw, getPgd,getPgd2, zx} from "@/api/zyjh";
export default {
name:'QgePgd',
@ -27,20 +27,77 @@ export default {
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(){
const {options,columns,setExt}=paoWanPgdConfig()
this.setExt=setExt
this.gridOptions=options
this.gridOptions.columns=columns
this.setExt('workers',this.$props.workers)
getDw({type:'llj'}).then(res=>{
this.gridOptions.ycldw=res.data
})
},
methods:{
initData() {
getPgd({zt: '42',ztHx:'52'}).then(res => {
getPgd2({field: 'qgry'}).then(res => {
this.list=res.data
this.gridOptions.data = res.data
this.setExt('workers',this.$props.workers)
})
},
setWorkers(workers){
@ -67,6 +124,17 @@ export default {
this.paigong(worker)
}
},
paigong0(arr){
const data={
type:this.type,
field:'qgpgrq',
zxZtName:'QGPG',
list:arr
}
zx(data).then(resp=>{
this.initData()
})
},
paigong(worker) {
const list = this.$refs.vxeGrid.getCheckboxRecords()
const tmpArr = []

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

Loading…
Cancel
Save