1.调整优化

2.增加班次选择和派工报工页面切换功能
master
董哲奇 9 months ago
parent 40fd7fe768
commit e86eba70ec

@ -3,3 +3,4 @@ ENV = 'production'
#铁舾生产环境服务器 #铁舾生产环境服务器
VUE_APP_BASE_API = 'http://192.127.0.22:8081/' VUE_APP_BASE_API = 'http://192.127.0.22:8081/'
VUE_APP_WEBSOCKET = 'http://192.127.0.22:23456'

@ -96,7 +96,7 @@ Object.keys(filters).forEach(key => {
Vue.use(new VueSocketIO({ Vue.use(new VueSocketIO({
debug: true, debug: true,
connection: 'http://127.0.0.1:23456', // connection: process.env.VUE_APP_WEBSOCKET, //
options: { autoConnect:false,path: "",transports: ['websocket', 'xhr-polling', 'jsonp-polling'], } //Optional options options: { autoConnect:false,path: "",transports: ['websocket', 'xhr-polling', 'jsonp-polling'], } //Optional options
})) }))

@ -2665,14 +2665,14 @@ export default {
filterRender: { name: 'FilterCombination', }, filterRender: { name: 'FilterCombination', },
sortable:true, sortable:true,
}, },
{ field: '白班时长', title: '白班', width: 70, // { field: '', title: '', width: 70,
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: 70, // { field: '', title: '', width: 70,
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: 'kw', title: '套料图名称', width: 120,formatter:['dictFormat','QGKW'], { field: 'kw', title: '套料图名称', width: 120,formatter:['dictFormat','QGKW'],
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', },

@ -23,7 +23,7 @@
<el-container style="padding-top: 0px"> <el-container style="padding-top: 0px">
<el-main> <el-main>
<el-tabs v-model="activeName" @tab-click="handleClick"> <el-tabs v-model="activeName" @tab-click="handleClick">
<el-tab-pane label="月度计划" name="first"> <el-tab-pane label="作业计划" name="first">
<div class="mytable"> <div class="mytable">
<el-button type="success" @click="symxhz"></el-button> <el-button type="success" @click="symxhz"></el-button>
<vxe-grid <vxe-grid
@ -909,17 +909,21 @@ 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: 'pl', title: '批量', width: 100,
{ field: 'dhqdh', title: '订货清单号', width: 100,
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: 'dhqdh', title: '', width: 100,
filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
filterRender: { name: 'FilterCombination', },
},*/
{ field: 'wpcz', title: '物品材质', width: 100, { field: 'wpcz', title: '物品材质', width: 100,
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: '规格(备注:需要从pb里面查看生成规则)', width: 100, { field: '', title: '规格', width: 100,//(:pb)
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', },
}, },

@ -83,7 +83,7 @@
<el-form-item style="float: right" > <el-form-item style="float: right" >
<el-button type="success" @click="xdClick"></el-button> <el-button type="success" @click="xdClick"></el-button>
<el-button type="success" @click="checkTz"></el-button> <el-button type="success" @click="checkTz"></el-button>
<el-button type="success" @click="saveclick"></el-button> <el-button type="success" @click="saveclick"></el-button>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>

@ -0,0 +1,40 @@
<template>
<div class="component">
<el-radio-group v-model="data.zyType" style="width: 25%">
<el-radio label="0">派工</el-radio>
<el-radio label="1">报工</el-radio>
</el-radio-group>
<el-radio-group v-model="data.bzType" @change="init">
<el-radio label="01">白班</el-radio>
<el-radio label="02">二班</el-radio>
</el-radio-group>
</div>
</template>
<script>
export default {
name:"ZyjhSelectComp",
data(){
return {
data:{
zyType:'0',
bzType:'01'
}
}
},
methods:{
init(){
this.$emit('initWorkers',this.data.bzType)
},
getData(){
return this.data
}
}
}
</script>
<style scoped>
.component .el-radio .el-radio__label {
color: white;
}
</style>

@ -4,30 +4,36 @@
<script> <script>
import paoWanPgdConfig from './pgdTable' import paoWanPgdConfig from './pgdTable'
import {getPgd} from "@/api/zyjh"; import {getDw, getPgd} from "@/api/zyjh";
export default { export default {
name:'HxianPgd', name:'HxianPgd',
props:{ props:{
workers:{ workers:{
type:Array, type:Array,
default:[] default:[]
} },
}, },
data(){ data(){
return{ return{
gridOptions:{}, gridOptions:{},
list:{}, list:{},
setExt:null,
} }
}, },
created(){ created(){
const {options,columns}=paoWanPgdConfig() const {options,columns,setExt}=paoWanPgdConfig()
this.setExt=setExt
this.gridOptions=options this.gridOptions=options
this.gridOptions.columns=columns this.gridOptions.columns=columns
}, },
methods:{ methods:{
initData(worker,zt){ initData(worker,zt){
getDw({type:'llj'}).then(res=>{
this.gridOptions.ycldw=res.data
})
getPgd({user:worker,zt:zt,field:'hxry'}).then(res=>{ getPgd({user:worker,zt:zt,field:'hxry'}).then(res=>{
this.gridOptions.data=res.data this.gridOptions.data=res.data
this.setExt('workers',this.$props.workers)
}) })
}, },
getCurrentData(){ getCurrentData(){

@ -97,8 +97,15 @@ const baifang=function (option={}) {
if ((thisX>=x&&thisY>=y&&thisX<=(x+item.attrs.width)&&thisY<=(y+item.attrs.height))&&!!worker){ if ((thisX>=x&&thisY>=y&&thisX<=(x+item.attrs.width)&&thisY<=(y+item.attrs.height))&&!!worker){
const info=this.getAttr('item') const info=this.getAttr('item')
const zyjh=JSON.parse(window.localStorage.getItem('hxfk')) const zyjh=JSON.parse(window.localStorage.getItem('hxfk'))
console.log(zyjh)
if (!zyjh){ if (!zyjh){
VXETable.modal.message({content: '请先选择待反馈的派工单', status: 'warning'}) VXETable.modal.message({content: '请先选择待报工的派工单', status: 'warning'})
this.remove()
that.visible(true)
return
}
if (zyjh.dcCh!==info.czbh&&zyjh.dcPl!==info.pl&&zyjh.dcFd!==info.fd&&zyjh.tzbh!==info.tlth){
VXETable.modal.message({content: '板材与工单未对应', status: 'warning'})
this.remove() this.remove()
that.visible(true) that.visible(true)
return return

@ -43,7 +43,6 @@ export default function (width,height){
const drawGd=function (data){ const drawGd=function (data){
// this.layer.destroyChildren(); // this.layer.destroyChildren();
window.localStorage.setItem('zyjh',JSON.stringify(data))
const group=new Konva.Group({ const group=new Konva.Group({
x:13, x:13,
@ -92,7 +91,7 @@ export default function (width,height){
width:_width-48, width:_width-48,
height:15, height:15,
fill:'#fff', fill:'#fff',
text:`单号:${data.gdh?'PW_'+data.gdh:''}`, text:`单号:${data.djh?'HX'+data.djh:''}`,
align:'left', align:'left',
fontSize:12, fontSize:12,
}) })
@ -122,7 +121,7 @@ export default function (width,height){
group0.add(group7) group0.add(group7)
const group8=drawQz(data) const group8=drawQz(data)
group0.add(group8) group0.add(group8)
generateQRCode(data.gdh,group0) generateQRCode(data.djh,group0)
return group return group
} }
@ -287,13 +286,15 @@ export default function (width,height){
}) })
group.add(plRect) group.add(plRect)
const name=formatWorker(data.pwry)
const plText=new Konva.Text({ const plText=new Konva.Text({
x:0, x:0,
y:30, y:30,
width:(_width-60)/2, width:(_width-60)/2,
height:30, height:30,
fill:'#fff', fill:'#fff',
text:formatWorker(data.pwry), text:name,
fontSize:18, fontSize:18,
align:'center', align:'center',
verticalAlign:'middle' verticalAlign:'middle'

@ -10,7 +10,21 @@ export default function () {
showOverflow: true, showOverflow: true,
scrollY:{enable:true}, scrollY:{enable:true},
highlightCurrentRow:true, highlightCurrentRow:true,
data:[] data:[],
ycldw:null,
}
const ext={}
const setExt=function (key,value){
ext[key]=value
}
const nameFormat=function ({cellValue}){
const workers=ext.workers
for (const item of workers) {
if(item.userCode===cellValue){
return item.userName
}
}
} }
const gdhFormat=function ({cellValue}){ const gdhFormat=function ({cellValue}){
if (cellValue){ if (cellValue){
@ -18,27 +32,55 @@ export default function () {
} }
return '' return ''
} }
const dwFormat=function ({cellValue}){
console.log(cellValue)
console.log(options.ycldw)
for (const item of options.ycldw) {
if (cellValue===(item.id+"")){
for (const it of ycldw){
if (it.bm===item.tzbh){
return it.bmsm
}
}
}
}
}
const columns = [ const columns = [
{ type: 'seq',title:'序号', width: 60 }, { type: 'checkbox', width: 40 },
{ field: 'gdh',title:'派工单号', width: 120,formatter: gdhFormat}, { type: 'seq',title:'序号', width: 50 },
{field: '', title: '抛丸位置', width: 80}, { field: 'djh',title:'派工单号', width: 120,formatter: gdhFormat},
{field: '', title: '垛位', width: 60}, {field: 'lldw', title: '垛位', width: 80,formatter: dwFormat},
{field: '', 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: '', title: '材质', width: 80}, {field: 'wpgg', title: '材质', width: 80},
{field: '', title: '规格', width: 100}, {field: 'wpxh', title: '规格', width: 70},
{field: '', title: '炉批号', width: 100}, {field: 'slwlh', title: '炉批号', width: 100},
{field: 'tzbh', title: '套料图号', width: 100}, {field: 'tzbh', title: '套料图号', width: 100},
{field: '', title: '接收人', width: 80}, {field: 'hxry', title: '接收人', width: 80,formatter: nameFormat},
{field: '', title: '接收时间', width: 100}, {field: 'hxpgry', title: '派工人', width: 80,formatter: nameFormat},
{field: '', title: '反馈人', width: 80}, {field: 'hxpgrq', title: '派工时间', width: 100},
{field: '', title: '反馈时间', width: 100}, ]
{field: '', title: '状态', width: 60},
const ycldw=[
{"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"}
] ]
return { return {
options, options,
columns, columns,
setExt
} }
} }

@ -22,7 +22,7 @@ export default {
components: {HxianPgd}, components: {HxianPgd},
data(){ data(){
return { return {
title:'划 线 作 业 反 馈', title:'划 线 作 业 报 工',
width:0, width:0,
height:0, height:0,
stage:null, stage:null,
@ -33,12 +33,12 @@ export default {
dw:[], dw:[],
pgd:[], pgd:[],
slGroup:null, slGroup:null,
dw:[],
currentDw:null, currentDw:null,
currentDwIndex:null, currentDwIndex:null,
currentWorker:null, currentWorker:null,
setWorkers:null, setWorkers:null,
workers:null, workers:null,
dwGroup:null
} }
}, },
mounted() { mounted() {
@ -57,15 +57,16 @@ export default {
if (this.slGroup){ if (this.slGroup){
this.slGroup.destroyChildren() this.slGroup.destroyChildren()
} }
for (let i = 0; i < this.dw[this.currentDwIndex].list.length; i++) { for (let i = 0; i < this.currentDw.list.length; i++) {
const item=this.dw[this.currentDwIndex].list[i] const item=this.currentDw.list[i]
if (item.czbh===data.czbh&&item.pl===data.pl&&item.tlth===data.tlth){ if (item.czbh===data.czbh&&item.pl===data.pl&&item.tlth===data.tlth){
this.dw[this.currentDwIndex].list.splice(i,1) this.currentDw.list.splice(i,1)
break break
} }
} }
this.drawBaiFang(this.dw[this.currentDwIndex].list) this.drawBaiFang(this.dw[this.currentDwIndex].list)
this.initDw() this.initDw()
this.$refs.hxpgd.initData(this.currentWorker.userCode,'51')
} }
}) })
this.sockets.subscribe('zyjhzx', data => { this.sockets.subscribe('zyjhzx', data => {
@ -100,11 +101,15 @@ export default {
this.drawBaiFang=handler this.drawBaiFang=handler
}, },
initDw(){ initDw(){
if (this.dwGroup){
this.dwGroup.destroyChildren()
}
const that=this const that=this
getYcldw({type:'llj'}).then(res=>{ getYcldw({type:'llj'}).then(res=>{
const {container,dw}=drawDw(this.width,this.height,that.initDwInfo) const {container,dw}=drawDw(this.width,this.height,that.initDwInfo)
const {bgGroup,group}=container() const {bgGroup,group}=container()
this.dwGroup=group
this.dw=res.data
this.layer.add(bgGroup) this.layer.add(bgGroup)
for (let i=0;i<res.data.length;i++){ for (let i=0;i<res.data.length;i++){

@ -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 {getPgd, zx} from "@/api/zyjh"; import {getDw, getPgd, zx} from "@/api/zyjh";
export default { export default {
name:'HxianPgd', name:'HxianPgd',
@ -13,6 +13,10 @@ export default {
worker:{ worker:{
type:Function, type:Function,
default:function (){} default:function (){}
},
workers:{
type:Array,
default:[]
} }
}, },
data(){ data(){
@ -20,18 +24,24 @@ export default {
type:'hxpg', type:'hxpg',
gridOptions:{}, gridOptions:{},
list:{}, list:{},
setExt:null
} }
}, },
created(){ created(){
const {options,columns}=paoWanPgdConfig() const {options,columns,setExt}=paoWanPgdConfig()
this.setExt=setExt
this.gridOptions=options this.gridOptions=options
this.gridOptions.columns=columns this.gridOptions.columns=columns
this.initData() this.initData()
}, },
methods:{ methods:{
initData() { initData() {
getDw({type:'llj'}).then(res=>{
this.gridOptions.ycldw=res.data
})
getPgd({zt: '42'}).then(res => { getPgd({zt: '42'}).then(res => {
this.gridOptions.data = res.data this.gridOptions.data = res.data
this.setExt('workers',this.$props.workers)
}) })
}, },
checkboxAll({checked}) { checkboxAll({checked}) {

@ -2,7 +2,7 @@ import Konva from "konva";
import QRCode from 'qrcode' import QRCode from 'qrcode'
export default function (width,height){ export default function (width,height){
const x=width*0.66+40,y=40,_width=width*0.30,_height=height*0.955 const x=width*0.66+40,y=40,_width=width*0.30,_height=height*0.95
const container=function (){ const container=function (){
const group=new Konva.Group({ const group=new Konva.Group({
@ -28,6 +28,19 @@ export default function (width,height){
return group return group
} }
let workers=[]
const setWorkers=function (persons){
workers=persons
}
const formatWorker=function (code){
for (const item of workers) {
if(item.userCode===code){
return item.userName
}
}
}
const drawGd=function (data){ const drawGd=function (data){
// this.layer.destroyChildren(); // this.layer.destroyChildren();
@ -78,7 +91,7 @@ export default function (width,height){
width:_width-48, width:_width-48,
height:15, height:15,
fill:'#fff', fill:'#fff',
text:`单号:${data.gdh?'PW_'+data.gdh:''}`, text:`单号:${data.djh?'HX'+data.djh:''}`,
align:'left', align:'left',
fontSize:12, fontSize:12,
}) })
@ -108,7 +121,7 @@ export default function (width,height){
group0.add(group7) group0.add(group7)
const group8=drawQz(data) const group8=drawQz(data)
group0.add(group8) group0.add(group8)
generateQRCode(data.gdh,group0) generateQRCode(data.djh,group0)
return group return group
} }
@ -273,13 +286,15 @@ export default function (width,height){
}) })
group.add(plRect) group.add(plRect)
const name=formatWorker(data.pwry)
const plText=new Konva.Text({ const plText=new Konva.Text({
x:0, x:0,
y:30, y:30,
width:(_width-60)/2, width:(_width-60)/2,
height:30, height:30,
fill:'#fff', fill:'#fff',
text:data.pwry, text:name,
fontSize:18, fontSize:18,
align:'center', align:'center',
verticalAlign:'middle' verticalAlign:'middle'
@ -485,6 +500,6 @@ export default function (width,height){
} }
return { return {
container,drawGd container,drawGd,setWorkers
} }
} }

@ -9,7 +9,21 @@ export default function () {
size:'mini', size:'mini',
showOverflow: true, showOverflow: true,
scrollY:{enable:true}, scrollY:{enable:true},
data:[] data:[],
ycldw:[]
}
const ext={}
const setExt=function (key,value){
ext[key]=value
}
const nameFormat=function ({cellValue}){
const workers=ext.workers
for (const item of workers) {
if(item.userCode===cellValue){
return item.userName
}
}
} }
const gdhFormat=function ({cellValue}){ const gdhFormat=function ({cellValue}){
if (cellValue){ if (cellValue){
@ -17,28 +31,53 @@ export default function () {
} }
return '' return ''
} }
const dwFormat=function ({cellValue}){
for (const item of options.ycldw) {
if (cellValue===(item.id+"")){
for (const it of ycldw){
if (it.bm===item.tzbh){
return it.bmsm
}
}
}
}
}
const columns = [ const columns = [
{ type: 'checkbox', width: 40 }, { type: 'checkbox', width: 40 },
{ type: 'seq',title:'序号', width: 60 }, { type: 'seq',title:'序号', width: 50 },
{ field: 'gdh',title:'派工单号', width: 120,formatter: gdhFormat}, { field: 'djh',title:'派工单号', width: 120,formatter: gdhFormat},
{field: '', title: '抛丸位置', width: 80}, {field: 'lldw', title: '垛位', width: 80,formatter: dwFormat},
{field: '', title: '垛位', width: 60}, {field: 'llcs', title: '层数', width: 60},
{field: '', title: '层数', width: 60},
{field: 'dcCh', title: '船号', width: 80}, {field: 'dcCh', title: '船号', width: 80},
{field: 'dcPl', title: '批量', width: 80}, {field: 'dcPl', title: '批量', width: 80},
{field: '', title: '材质', width: 80}, {field: 'wpgg', title: '材质', width: 80},
{field: '', title: '规格', width: 100}, {field: 'wpxh', title: '规格', width: 70},
{field: '', title: '炉批号', width: 100}, {field: 'slwlh', title: '炉批号', width: 100},
{field: 'tzbh', title: '套料图号', width: 100}, {field: 'tzbh', title: '套料图号', width: 100},
{field: '', title: '接收人', width: 80}, {field: 'hxry', title: '接收人', width: 80,formatter: nameFormat},
{field: '', title: '接收时间', width: 100}, {field: 'hxpgry', title: '派工人', width: 80,formatter: nameFormat},
{field: '', title: '反馈人', width: 80}, {field: 'hxpgrq', title: '派工时间', width: 100},
{field: '', title: '反馈时间', width: 100}, ]
{field: '', title: '状态', width: 60},
const ycldw=[
{"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"}
] ]
return { return {
options, options,
columns, columns,
setExt
} }
} }

@ -1,7 +1,8 @@
<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="pwpgd" ref="pwpgd" @initPgd="initPgd" :worker="getWorker" /> <HxianPgd id="pwpgd" ref="pwpgd" @initPgd="initPgd" :worker="getWorker" :workers="workers" />
<ZyjhSelectComp id="selectComp" ref="selRef" @initWorkers="initWorkers"/>
</div> </div>
</template> </template>
@ -14,10 +15,11 @@ import drawPgd from './comps/pgd'
import {getBzryList} from "@/api/sjzx/bzzGL"; import {getBzryList} from "@/api/sjzx/bzzGL";
import {getYcldw} from "@/api/zyjh"; import {getYcldw} from "@/api/zyjh";
import HxianPgd from "@/views/zyjhzx/hxianpgong/comps/HxianPgd.vue"; import HxianPgd from "@/views/zyjhzx/hxianpgong/comps/HxianPgd.vue";
import ZyjhSelectComp from "@/views/zyjhzx/components/SelectComp.vue";
export default { export default {
name:'HxianPGong', name:'HxianPGong',
components: {HxianPgd}, components: {ZyjhSelectComp, HxianPgd},
data(){ data(){
return { return {
title:'划 线 作 业 派 工', title:'划 线 作 业 派 工',
@ -28,6 +30,9 @@ export default {
pgdGroup:null, pgdGroup:null,
drawGd:null, drawGd:null,
getCurrentWorker:null, getCurrentWorker:null,
workers:null,
workerGroup:null,
person:null,
} }
}, },
mounted() { mounted() {
@ -78,17 +83,26 @@ export default {
getWorker(){ getWorker(){
return this.getCurrentWorker() return this.getCurrentWorker()
}, },
initWorkers(){ initWorkers(bzType){
getBzryList({resourcesCode:'4KB002'}).then(res=>{ if (this.workerGroup){
this.workerGroup.destroyChildren()
}else{
const {container,person,getCurrentWorker}=workers(this.width,this.height) const {container,person,getCurrentWorker}=workers(this.width,this.height)
this.getCurrentWorker=getCurrentWorker this.getCurrentWorker=getCurrentWorker
this.person=person
const {layer,group}=container() const {layer,group}=container()
this.workerGroup=group
this.stage.add(layer) this.stage.add(layer)
}
this.workerGroup.x(0)
this.workerGroup.y(0)
console.log(this.$route.query)
getBzryList({zyq:this.$route.query.zyq,zt:bzType}).then(res=>{
this.workers=res.data
for (let i=0;i<res.data.length;i++){ for (let i=0;i<res.data.length;i++){
const item=res.data[i] const item=res.data[i]
const worker=person(i,item) const worker=this.person(i,item)
group.add(worker) this.workerGroup.add(worker)
} }
}) })
}, },
@ -102,7 +116,7 @@ export default {
const titel=drawTitle(this.width,this.height,this.title) const titel=drawTitle(this.width,this.height,this.title)
this.layer.add(titel) this.layer.add(titel)
this.initWorkers() this.initWorkers(this.$refs.selRef.getData().bzType)
this.initDw() this.initDw()
@ -118,6 +132,16 @@ export default {
</script> </script>
<style> <style>
#selectComp {
width:50%;
height: auto;
position: absolute;
top:10px;
left:20px;
border: none;
margin: 0;
}
#pwpgd { #pwpgd {
width:50%; width:50%;
height: auto; height: auto;

@ -147,6 +147,6 @@ export default function (width,height){
} }
return{ return{
container,person container,person,getCurrentWorker
} }
} }

@ -43,7 +43,6 @@ export default function (width,height){
const drawGd=function (data){ const drawGd=function (data){
// this.layer.destroyChildren(); // this.layer.destroyChildren();
window.localStorage.setItem('zyjh',JSON.stringify(data))
const group=new Konva.Group({ const group=new Konva.Group({
x:13, x:13,
@ -92,7 +91,7 @@ export default function (width,height){
width:_width-48, width:_width-48,
height:15, height:15,
fill:'#fff', fill:'#fff',
text:`单号:${data.gdh?'PW_'+data.gdh:''}`, text:`单号:${data.djh?'LL'+data.djh:''}`,
align:'left', align:'left',
fontSize:12, fontSize:12,
}) })
@ -122,7 +121,7 @@ export default function (width,height){
group0.add(group7) group0.add(group7)
const group8=drawQz(data) const group8=drawQz(data)
group0.add(group8) group0.add(group8)
generateQRCode(data.gdh,group0) generateQRCode(data.djh,group0)
return group return group
} }
@ -287,13 +286,15 @@ export default function (width,height){
}) })
group.add(plRect) group.add(plRect)
const name=formatWorker(data.pwry)
const plText=new Konva.Text({ const plText=new Konva.Text({
x:0, x:0,
y:30, y:30,
width:(_width-60)/2, width:(_width-60)/2,
height:30, height:30,
fill:'#fff', fill:'#fff',
text:formatWorker(data.pwry), text:name,
fontSize:18, fontSize:18,
align:'center', align:'center',
verticalAlign:'middle' verticalAlign:'middle'

@ -34,26 +34,22 @@ export default function () {
} }
const ztEnmu={ const ztEnmu={
'31':'派工', '31':'派工',
'32':'反馈' '32':'报工'
} }
const columns = [ const columns = [
{ type: 'checkbox', width: 40 }, { type: 'checkbox', width: 40 },
{ type: 'seq',title:'序号', width: 60 }, { type: 'seq',title:'序号', width: 60 },
{ field: 'gdh',title:'派工单号', width: 120,formatter: gdhFormat}, { field: 'djh',title:'派工单号', width: 120,formatter: gdhFormat},
{field: '', title: '抛丸位置', width: 80},
{field: '', title: '垛位', width: 60},
{field: '', title: '层数', width: 60},
{field: 'dcCh', title: '船号', width: 80}, {field: 'dcCh', title: '船号', width: 80},
{field: 'dcPl', title: '批量', width: 80}, {field: 'dcPl', title: '批量', width: 80},
{field: '', title: '材质', width: 80}, {field: 'wpgg', title: '材质', width: 80},
{field: '', title: '规格', width: 100}, {field: 'wpxh', title: '规格', width: 70},
{field: '', title: '炉批号', width: 100}, {field: 'slwlh', title: '炉批号', width: 100},
{field: 'tzbh', title: '套料图号', width: 100}, {field: 'tzbh', title: '套料图号', width: 100},
{field: 'pwry', title: '接收人', width: 80,formatter:nameFormat}, {field: 'pwry', title: '接收人', width: 80},
{field: 'pwpgrq', title: '接收时间', width: 100}, {field: 'pwjssj', title: '接收时间', width: 100},
{field: 'pwfkr', title: '反馈人', width: 80,formatter:nameFormat}, {field: 'pgr', title: '派工人', width: 80},
{field: 'pwfkrq', title: '反馈时间', width: 100}, {field: 'pgsj', title: '派工时间', width: 100},
{field: 'zt', title: '状态', width: 60,formatter:ztFormat},
] ]
return { return {

@ -19,7 +19,7 @@ export default {
name:'PWanFKui', name:'PWanFKui',
data(){ data(){
return { return {
title:'理 料 作 业 反 馈', title:'理 料 作 业 报 工',
width:0, width:0,
height:0, height:0,
stage:null, stage:null,
@ -32,10 +32,26 @@ export default {
dwGroup:null, dwGroup:null,
pgd:[], pgd:[],
slGroup:null, slGroup:null,
getCurrentWorker:null,
currentWorker:null, currentWorker:null,
setWorkers:null, setWorkers:null,
workers:null, workers:null,
drawItem:null, drawItem:null,
kwBm:[
{"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"}
]
} }
}, },
mounted() { mounted() {
@ -121,7 +137,6 @@ export default {
this.sljhGroup.destroyChildren() this.sljhGroup.destroyChildren()
} }
for (let i = 0; i < list.length; i++) { for (let i = 0; i < list.length; i++) {
const qyGroup=this.drawItem(i,list[i]) const qyGroup=this.drawItem(i,list[i])
const _layer=this.layer const _layer=this.layer
const _sljhGroup=this.sljhGroup; const _sljhGroup=this.sljhGroup;
@ -162,32 +177,47 @@ export default {
const maxY=y+that.height*0.8-20 const maxY=y+that.height*0.8-20
if(thisX>=x&&thisY>=y&&thisX<=maxX&&thisY<=maxY){ if(thisX>=x&&thisY>=y&&thisX<=maxX&&thisY<=maxY){
const item=this.getAttr('item') const item=this.getAttr('item')
const data={ if (!!that.currentDw.tzbh&&item.kw===that.currentDw.tzbh){
ydjh:item, item.lldw=that.currentDw.id
ydid:item.id, item.llcs=that.dw[that.currentDwIndex].list.length+1
dwId:that.currentDw.id, item.llfkry=that.getCurrentWorker()?.userCode
ceng:that.dw[that.currentDwIndex].list.length+1, const tmpZxData={
czbh:item.dcCh, id:item.id,
pl:item.dcPl, lldw:that.currentDw.id,
fd:item.dcFd, llcs:that.dw[that.currentDwIndex].list.length+1,
kw:item.kw, llfkry:that.getCurrentWorker()?.userCode
zl:item.zl, }
tlth:item.tzbh, const data={
wph:item.wpxh, ydjh:tmpZxData,
wpgg:item.wpgg, ydid:item.id,
sljhrq:item.sljhrq, dwId:that.currentDw.id,
qgjhrq:item.qgjhrq, ceng:that.dw[that.currentDwIndex].list.length+1,
bfr:that.currentWorker?.userCode, czbh:item.dcCh,
type:'LLJ' pl:item.dcPl,
} fd:item.dcFd,
kw:item.kw,
zl:item.zl,
tlth:item.tzbh,
wph:item.wpxh,
wpgg:item.wpgg,
sljhrq:item.sljhrq,
qgjhrq:item.qgjhrq,
bfr:that.currentWorker?.userCode,
type:'LLJ'
}
shangLiao(data).then(res=>{}) shangLiao(data).then(res=>{})
this.remove() this.remove()
that.sljhItemList.splice(this.getAttr('index'),1) that.sljhItemList.splice(this.getAttr('index'),1)
that.sljhGroup.destroyChildren() that.sljhGroup.destroyChildren()
that.drawSljhItem(that.sljhItemList) that.drawSljhItem(that.sljhItemList)
}else{
that.$message.warning(`理料跨位错误,请放入${that.kwNameFormat(item.kw)}所在垛位`)
this.remove()
_that.visible(true)
}
}else{ }else{
this.remove() this.remove()
_that.visible(true) _that.visible(true)
@ -228,9 +258,10 @@ export default {
initWorkers(){ initWorkers(){
const that=this const that=this
getBzryList({resourcesCode:'4KB002'}).then(res=>{ getBzryList({resourcesCode:'4KB002'}).then(res=>{
const {container,person}=workers(this.width,this.height) const {container,person,getCurrentWorker}=workers(this.width,this.height)
const {bgGroup,group}=container() const {bgGroup,group}=container()
this.layer.add(bgGroup) this.layer.add(bgGroup)
this.getCurrentWorker=getCurrentWorker
this.workers=res.data this.workers=res.data
that.setWorkers(res.data) that.setWorkers(res.data)
@ -276,6 +307,13 @@ export default {
this.initBaiFang() this.initBaiFang()
}, },
kwNameFormat(code){
for (const item of this.kwBm) {
if (item.bm===code){
return item.bmsm
}
}
}
} }
} }

@ -13,6 +13,10 @@ export default {
worker:{ worker:{
type:Function, type:Function,
default:function (){} default:function (){}
},
workers:{
type:Array,
default:[]
} }
}, },
data() { data() {
@ -20,10 +24,12 @@ export default {
type: 'llpg', type: 'llpg',
gridOptions: {}, gridOptions: {},
list: {}, list: {},
setExt:null,
} }
}, },
created() { created() {
const {options, columns} = paoWanPgdConfig() const {options, columns,setExt} = paoWanPgdConfig()
this.setExt=setExt
this.gridOptions = options this.gridOptions = options
this.gridOptions.columns = columns this.gridOptions.columns = columns
this.initData() this.initData()
@ -32,6 +38,7 @@ export default {
initData() { initData() {
getPgd({zt: '32'}).then(res => { getPgd({zt: '32'}).then(res => {
this.gridOptions.data = res.data this.gridOptions.data = res.data
this.setExt('workers',this.$props.workers)
}) })
}, },
checkboxAll({checked}) { checkboxAll({checked}) {

@ -2,7 +2,7 @@ import Konva from "konva";
import QRCode from 'qrcode' import QRCode from 'qrcode'
export default function (width,height){ export default function (width,height){
const x=width*0.66+40,y=40,_width=width*0.30,_height=height*0.954 const x=width*0.66+40,y=40,_width=width*0.30,_height=height*0.95
const container=function (){ const container=function (){
const group=new Konva.Group({ const group=new Konva.Group({
@ -91,7 +91,7 @@ export default function (width,height){
width:_width-48, width:_width-48,
height:15, height:15,
fill:'#fff', fill:'#fff',
text:`单号:${data.gdh?'LL_'+data.gdh:''}`, text:`单号:${data.djh?'LL'+data.djh:''}`,
align:'left', align:'left',
fontSize:12, fontSize:12,
}) })
@ -121,7 +121,7 @@ export default function (width,height){
group0.add(group7) group0.add(group7)
const group8=drawQz(data) const group8=drawQz(data)
group0.add(group8) group0.add(group8)
generateQRCode(data.gdh,group0) generateQRCode(data.djh,group0)
return group return group
} }

@ -11,6 +11,19 @@ export default function () {
scrollY:{enable:true}, scrollY:{enable:true},
data:[] data:[]
} }
const ext={}
const setExt=function (key,value){
ext[key]=value
}
const nameFormat=function ({cellValue}){
const workers=ext.workers
for (const item of workers) {
if(item.userCode===cellValue){
return item.userName
}
}
}
const gdhFormat=function ({cellValue}){ const gdhFormat=function ({cellValue}){
if (cellValue){ if (cellValue){
return 'PW'+cellValue return 'PW'+cellValue
@ -20,25 +33,22 @@ export default function () {
const columns = [ const columns = [
{ type: 'checkbox', width: 40 }, { type: 'checkbox', width: 40 },
{ type: 'seq',title:'序号', width: 60 }, { type: 'seq',title:'序号', width: 60 },
{ field: 'gdh',title:'派工单号', width: 120,formatter: gdhFormat}, { field: 'djh',title:'派工单号', width: 120,formatter: gdhFormat},
{field: '', title: '抛丸位置', width: 80},
{field: '', title: '垛位', width: 60},
{field: '', title: '层数', width: 60},
{field: 'dcCh', title: '船号', width: 80}, {field: 'dcCh', title: '船号', width: 80},
{field: 'dcPl', title: '批量', width: 80}, {field: 'dcPl', title: '批量', width: 80},
{field: '', title: '材质', width: 80}, {field: 'wpgg', title: '材质', width: 80},
{field: '', title: '规格', width: 100}, {field: 'wpxh', title: '规格', width: 70},
{field: '', title: '炉批号', width: 100}, {field: 'slwlh', title: '炉批号', width: 100},
{field: 'tzbh', title: '套料图号', width: 100}, {field: 'tzbh', title: '套料图号', width: 100},
{field: '', title: '接收人', width: 80}, {field: 'pwry', title: '接收人', width: 80,formatter:nameFormat},
{field: '', title: '接收时间', width: 100}, {field: 'pwjssj', title: '接收时间', width: 100},
{field: '', title: '反馈人', width: 80}, {field: 'pgr', title: '派工人', width: 80},
{field: '', title: '反馈时间', width: 100}, {field: 'pgsj', title: '派工时间', width: 100},
{field: '', title: '状态', width: 60},
] ]
return { return {
options, options,
columns, columns,
setExt
} }
} }

@ -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>
<LliaoPgd id="pwpgd" ref="llpgd" @initPgd="initPgd" :worker="getWorker" /> <LliaoPgd id="pwpgd" ref="llpgd" @initPgd="initPgd" :worker="getWorker" :workers="workers" />
</div> </div>
</template> </template>

@ -51,7 +51,7 @@ const baifang=function (option={}) {
const gangban=function (index,item,slList){ const gangban=function (index,item,slList){
const group=new Konva.Group({ const group=new Konva.Group({
x:0, x:0,
y:thatHeight-310-index*40, y:thatHeight-350-index*40,
// draggable:true // draggable:true
}) })
@ -99,7 +99,13 @@ const baifang=function (option={}) {
const info=this.getAttr('item') const info=this.getAttr('item')
const zyjh=JSON.parse(window.localStorage.getItem('zyjh')) const zyjh=JSON.parse(window.localStorage.getItem('zyjh'))
if (!zyjh){ if (!zyjh){
VXETable.modal.message({content: '请先选择待反馈的派工单', status: 'warning'}) VXETable.modal.message({content: '请先选择待报工的派工单', status: 'warning'})
this.remove()
that.visible(true)
return
}
if (zyjh.dcCh!==info.czbh&&zyjh.dcPl!==info.pl&&zyjh.dcFd!==info.fd&&zyjh.tzbh!==info.tlth){
VXETable.modal.message({content: '板材与工单未对应', status: 'warning'})
this.remove() this.remove()
that.visible(true) that.visible(true)
return return

@ -96,7 +96,7 @@ export default function (width,height,callback){
y:0, y:0,
width: width, width: width,
height: height, height: height,
fill:'black', fill:'#fff',
text:`${item.name}\n${item.list.length}`, text:`${item.name}\n${item.list.length}`,
align:'center', align:'center',
verticalAlign:'middle', verticalAlign:'middle',

@ -139,7 +139,8 @@ export default function (width,height){
text: persons.userName, text: persons.userName,
align: 'center', align: 'center',
verticalAlign:'middle', verticalAlign:'middle',
fontSize:12 fill:'#fff',
fontSize:16
}) })
group.add(text) group.add(text)

@ -92,7 +92,7 @@ export default function (width,height){
width:_width-48, width:_width-48,
height:15, height:15,
fill:'#fff', fill:'#fff',
text:`单号:${data.gdh?'PW_'+data.gdh:''}`, text:`单号:${data.djh?'PW'+data.djh:''}`,
align:'left', align:'left',
fontSize:12, fontSize:12,
}) })
@ -122,7 +122,7 @@ export default function (width,height){
group0.add(group7) group0.add(group7)
const group8=drawQz(data) const group8=drawQz(data)
group0.add(group8) group0.add(group8)
generateQRCode(data.gdh,group0) generateQRCode(data.djh,group0)
return group return group
} }

@ -44,7 +44,7 @@ export default function () {
} }
const ztEnmu={ const ztEnmu={
'31':'派工', '31':'派工',
'32':'反馈' '32':'报工'
} }
const columns = [ const columns = [
{ type: 'checkbox', width: 40 }, { type: 'checkbox', width: 40 },
@ -60,8 +60,8 @@ export default function () {
{field: 'tzbh', title: '套料图号', width: 100}, {field: 'tzbh', title: '套料图号', width: 100},
{field: 'pwry', title: '接收人', width: 80,formatter:nameFormat}, {field: 'pwry', title: '接收人', width: 80,formatter:nameFormat},
{field: 'pwpgrq', title: '接收时间', width: 100}, {field: 'pwpgrq', title: '接收时间', width: 100},
{field: 'pwfkry', title: '反馈人', width: 80,formatter:nameFormat}, {field: 'pwfkry', title: '报工人', width: 80,formatter:nameFormat},
{field: 'pwfksj', title: '反馈时间', width: 100}, {field: 'pwfksj', title: '报工时间', width: 100},
{field: 'pgr', title: '派工人', width: 80}, {field: 'pgr', title: '派工人', width: 80},
{field: 'pwpgrq', title: '派工时间', width: 100}, {field: 'pwpgrq', title: '派工时间', width: 100},
] ]

@ -22,7 +22,7 @@ export default {
components: {PWanPgd}, components: {PWanPgd},
data(){ data(){
return { return {
title:'抛 丸 作 业 反 馈', title:'抛 丸 作 业 报 工',
width:0, width:0,
height:0, height:0,
stage:null, stage:null,
@ -37,6 +37,7 @@ export default {
setWorkers:null, setWorkers:null,
workers:null, workers:null,
slGroup:null, slGroup:null,
dwGroup:null,
} }
}, },
mounted() { mounted() {
@ -64,6 +65,7 @@ export default {
} }
this.drawBaiFang(this.dw[this.currentDwIndex].list) this.drawBaiFang(this.dw[this.currentDwIndex].list)
this.$refs.pwpgd.initData(this.currentWorker.userCode,'31') this.$refs.pwpgd.initData(this.currentWorker.userCode,'31')
this.initDw()
} }
}) })
this.sockets.subscribe('zyjhzx', data => { this.sockets.subscribe('zyjhzx', data => {
@ -98,6 +100,9 @@ export default {
this.drawBaiFang=handler this.drawBaiFang=handler
}, },
initDw(){ initDw(){
if (this.dwGroup){
this.dwGroup.destroyChildren()
}
const that=this const that=this
getYcldw({type:'ycl'}).then(res=>{ getYcldw({type:'ycl'}).then(res=>{
const {container,dw}=drawDw(this.width,this.height,that.initDwInfo) const {container,dw}=drawDw(this.width,this.height,that.initDwInfo)

@ -32,18 +32,20 @@ export default {
this.setExt=setExt this.setExt=setExt
this.gridOptions=options this.gridOptions=options
this.gridOptions.columns=columns this.gridOptions.columns=columns
this.initData() getDw({type:'ycl'}).then(res=>{
this.gridOptions.ycldw=res.data
})
}, },
methods:{ methods:{
initData(){ initData(){
getDw({type:'ycl'}).then(res=>{
this.gridOptions.ycldw=res.data
})
getPgd({zt:'21'}).then(res=>{ getPgd({zt:'21'}).then(res=>{
this.gridOptions.data=res.data this.gridOptions.data=res.data
this.setExt('workers',this.$props.workers)
}) })
}, },
setWorkers(workers){
this.setExt('workers',workers)
this.initData()
},
checkboxAll({checked}){ checkboxAll({checked}){
const worker=this.$props.worker() const worker=this.$props.worker()
if (!worker){ if (!worker){

@ -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>
<PWanPgd id="pwpgd" ref="pwpgd" @initPgd="initPgd" :worker="getWorker" /> <PWanPgd id="pwpgd" ref="pwpgd" @initPgd="initPgd" :worker="getWorker" :workers="workers"/>
</div> </div>
</template> </template>
@ -29,6 +29,7 @@ export default {
drawGd:null, drawGd:null,
getCurrentWorker:null, getCurrentWorker:null,
setWorkers:null, setWorkers:null,
workers:null,
tlt:null, tlt:null,
zt:'21' zt:'21'
} }
@ -87,6 +88,8 @@ export default {
this.getCurrentWorker=getCurrentWorker this.getCurrentWorker=getCurrentWorker
const {layer,group}=container() const {layer,group}=container()
this.stage.add(layer) this.stage.add(layer)
this.workers=res.data
this.$refs.pwpgd.setWorkers(this.workers)
this.setWorkers(res.data) this.setWorkers(res.data)
for (let i=0;i<res.data.length;i++){ for (let i=0;i<res.data.length;i++){

@ -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 {getPgd, zx} from "@/api/zyjh"; import {getDw, getPgd, zx} from "@/api/zyjh";
export default { export default {
name: 'QgePgd', name: 'QgePgd',
@ -13,6 +13,10 @@ export default {
worker:{ worker:{
type:Function, type:Function,
default:function (){} default:function (){}
},
workers:{
type:Array,
default:[]
} }
}, },
data() { data() {
@ -21,19 +25,25 @@ export default {
list: {}, list: {},
currentWorker:null, currentWorker:null,
zt:null, zt:null,
setExt:null,
} }
}, },
created() { created() {
const {options, columns} = paoWanPgdConfig() const {options,columns,setExt}=paoWanPgdConfig()
this.setExt=setExt
this.gridOptions = options this.gridOptions = options
this.gridOptions.columns = columns this.gridOptions.columns = columns
}, },
methods: { methods: {
initData(worker, zt) { initData(worker, zt) {
getDw({type:'llj'}).then(res=>{
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 => { getPgd({user: worker, zt: zt, field: 'qgry'}).then(res => {
this.gridOptions.data = res.data this.gridOptions.data = res.data
this.setExt('workers',this.$props.workers)
}) })
}, },
getCurrentData() { getCurrentData() {
@ -77,7 +87,7 @@ export default {
zxZtName: 'QGFK', zxZtName: 'QGFK',
list: tmpArr list: tmpArr
} }
VXETable.modal.confirm('您确定反馈吗?').then(res => { VXETable.modal.confirm('您确定报工吗?').then(res => {
res === 'confirm' && zx(data).then(res=>{ res === 'confirm' && zx(data).then(res=>{
this.initData(this.currentWorker,this.zt) this.initData(this.currentWorker,this.zt)
}) })

@ -98,7 +98,13 @@ const baifang=function (option={}) {
const info=this.getAttr('item') const info=this.getAttr('item')
const zyjh=JSON.parse(window.localStorage.getItem('qgfk')) const zyjh=JSON.parse(window.localStorage.getItem('qgfk'))
if (!zyjh){ if (!zyjh){
VXETable.modal.message({content: '请先选择待反馈的派工单', status: 'warning'}) VXETable.modal.message({content: '请先选择待报工的派工单', status: 'warning'})
this.remove()
that.visible(true)
return
}
if (zyjh.dcCh!==info.czbh&&zyjh.dcPl!==info.pl&&zyjh.dcFd!==info.fd&&zyjh.tzbh!==info.tlth){
VXETable.modal.message({content: '板材与工单未对应', status: 'warning'})
this.remove() this.remove()
that.visible(true) that.visible(true)
return return
@ -106,6 +112,7 @@ const baifang=function (option={}) {
zx({ zx({
field:'qgfkrq', field:'qgfkrq',
zxZtName:'QGFK', zxZtName:'QGFK',
zt:'42',
list:[{ list:[{
id:zyjh.id, id:zyjh.id,
qgfkry: worker.userCode qgfkry: worker.userCode

@ -43,7 +43,6 @@ export default function (width,height){
const drawGd=function (data){ const drawGd=function (data){
// this.layer.destroyChildren(); // this.layer.destroyChildren();
window.localStorage.setItem('zyjh',JSON.stringify(data))
const group=new Konva.Group({ const group=new Konva.Group({
x:13, x:13,
@ -92,7 +91,7 @@ export default function (width,height){
width:_width-48, width:_width-48,
height:15, height:15,
fill:'#fff', fill:'#fff',
text:`单号:${data.gdh?'PW_'+data.gdh:''}`, text:`单号:${data.djh?'QG'+data.djh:''}`,
align:'left', align:'left',
fontSize:12, fontSize:12,
}) })
@ -122,7 +121,7 @@ export default function (width,height){
group0.add(group7) group0.add(group7)
const group8=drawQz(data) const group8=drawQz(data)
group0.add(group8) group0.add(group8)
generateQRCode(data.gdh,group0) generateQRCode(data.djh,group0)
return group return group
} }
@ -287,13 +286,15 @@ export default function (width,height){
}) })
group.add(plRect) group.add(plRect)
const name=formatWorker(data.pwry)
const plText=new Konva.Text({ const plText=new Konva.Text({
x:0, x:0,
y:30, y:30,
width:(_width-60)/2, width:(_width-60)/2,
height:30, height:30,
fill:'#fff', fill:'#fff',
text:formatWorker(data.pwry), text:name,
fontSize:18, fontSize:18,
align:'center', align:'center',
verticalAlign:'middle' verticalAlign:'middle'

@ -10,36 +10,78 @@ export default function () {
showOverflow: true, showOverflow: true,
scrollY:{enable:true}, scrollY:{enable:true},
highlightCurrentRow:true, highlightCurrentRow:true,
data:[] data:[],
ycldw:null,
}
const ext={}
const setExt=function (key,value){
ext[key]=value
}
const nameFormat=function ({cellValue}){
console.log(ext)
const workers=ext.workers
for (const item of workers) {
if(item.userCode===cellValue){
return item.userName
}
}
} }
const gdhFormat=function ({cellValue}){ const gdhFormat=function ({cellValue}){
if (cellValue){ if (cellValue){
return 'PW'+cellValue return 'QG'+cellValue
} }
return '' return ''
} }
const dwFormat=function ({cellValue}){
for (const item of options.ycldw) {
if (cellValue===(item.id+"")){
for (const it of ycldw){
if (it.bm===item.tzbh){
return it.bmsm
}
}
}
}
}
const columns = [ const columns = [
{ type: 'checkbox', width: 40 }, { type: 'checkbox', width: 40 },
{ type: 'seq',title:'序号', width: 60 }, { type: 'seq',title:'序号', width: 50 },
{ field: 'gdh',title:'派工单号', width: 120,formatter: gdhFormat}, { field: 'djh',title:'派工单号', width: 120,formatter: gdhFormat},
{field: '', title: '抛丸位置', width: 80}, {field: 'lldw', title: '垛位', width: 80,formatter: dwFormat},
{field: '', title: '垛位', width: 60}, {field: 'llcs', title: '层数', width: 60},
{field: '', title: '层数', width: 60},
{field: 'dcCh', title: '船号', width: 80}, {field: 'dcCh', title: '船号', width: 80},
{field: 'dcPl', title: '批量', width: 80}, {field: 'dcPl', title: '批量', width: 80},
{field: '', title: '材质', width: 80}, {field: 'wpgg', title: '材质', width: 80},
{field: '', title: '规格', width: 100}, {field: 'wpxh', title: '规格', width: 70},
{field: '', title: '炉批号', width: 100}, {field: 'slwlh', title: '炉批号', width: 100},
{field: 'tzbh', title: '套料图号', width: 100}, {field: 'tzbh', title: '套料图号', width: 100},
{field: '', title: '接收人', width: 80}, {field: 'qgry', title: '接收人', width: 80,formatter: nameFormat},
{field: '', title: '接收时间', width: 100}, {field: 'qgpgry', title: '派工人', width: 80,formatter: nameFormat},
{field: '', title: '反馈人', width: 80}, {field: 'qgpgrq', title: '派工时间', width: 100},
{field: '', title: '反馈时间', width: 100},
{field: '', title: '状态', width: 60},
] ]
const ycldw=[
{"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"}
]
return { return {
options, options,
columns, columns,
setExt
} }
} }

@ -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="pwpgd" ref="hxpgd" @initPgd="initPgd" :pgd="pgd" :worker="getWorker" /> <QgePgd id="pwpgd" ref="hxpgd" @initPgd="initPgd" :pgd="pgd" :worker="getWorker" :workers="workers"/>
</div> </div>
</template> </template>
@ -22,7 +22,7 @@ export default {
components: {QgePgd}, components: {QgePgd},
data() { data() {
return { return {
title: '切 割 作 业 反 馈', title: '切 割 作 业 报 工',
width:0, width:0,
height:0, height:0,
stage:null, stage:null,
@ -39,6 +39,7 @@ export default {
getCurrentWorker:null, getCurrentWorker:null,
setWorkers:null, setWorkers:null,
workers:null, workers:null,
dwGroup:null,
} }
}, },
mounted() { mounted() {
@ -66,6 +67,7 @@ export default {
} }
this.drawBaiFang(this.dw[this.currentDwIndex].list) this.drawBaiFang(this.dw[this.currentDwIndex].list)
this.initDw() this.initDw()
this.$refs.hxpgd.initData(this.currentWorker.userCode,'61')
} }
}) })
this.sockets.subscribe('zyjhzx', data => { this.sockets.subscribe('zyjhzx', data => {
@ -100,10 +102,14 @@ export default {
this.drawBaiFang=handler this.drawBaiFang=handler
}, },
initDw() { initDw() {
if (this.dwGroup){
this.dwGroup.destroyChildren()
}
const that = this const that = this
getYcldw({type:'llj'}).then(res => { getYcldw({type:'llj'}).then(res => {
const {container, dw} = drawDw(this.width, this.height, that.initDwInfo) const {container, dw} = drawDw(this.width, this.height, that.initDwInfo)
const {bgGroup,group} = container() const {bgGroup,group} = container()
this.dwGroup=group
this.layer.add(bgGroup) this.layer.add(bgGroup)
this.dw=res.data this.dw=res.data
@ -118,7 +124,6 @@ export default {
return this.getCurrentWorker() return this.getCurrentWorker()
}, },
initWorkers() { initWorkers() {
const that = this
getBzryList({resourcesCode: '4KB002'}).then(res => { getBzryList({resourcesCode: '4KB002'}).then(res => {
const {container,person,getCurrentWorker}=workers(this.width,this.height) const {container,person,getCurrentWorker}=workers(this.width,this.height)
this.getCurrentWorker=getCurrentWorker this.getCurrentWorker=getCurrentWorker

@ -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 {getPgd, zx} from "@/api/zyjh"; import {getDw, getPgd, zx} from "@/api/zyjh";
export default { export default {
name:'QgePgd', name:'QgePgd',
@ -13,6 +13,10 @@ export default {
worker:{ worker:{
type:Function, type:Function,
default:function (){} default:function (){}
},
workers:{
type:Array,
default:[]
} }
}, },
data(){ data(){
@ -20,18 +24,24 @@ export default {
type:'qgpg', type:'qgpg',
gridOptions:{}, gridOptions:{},
list:{}, list:{},
setExt:null,
} }
}, },
created(){ created(){
const {options,columns}=paoWanPgdConfig() const {options,columns,setExt}=paoWanPgdConfig()
this.setExt=setExt
this.gridOptions=options this.gridOptions=options
this.gridOptions.columns=columns this.gridOptions.columns=columns
this.initData() this.initData()
}, },
methods:{ methods:{
initData() { initData() {
getDw({type:'llj'}).then(res=>{
this.gridOptions.ycldw=res.data
})
getPgd({zt: '42',ztHx:'52'}).then(res => { getPgd({zt: '42',ztHx:'52'}).then(res => {
this.gridOptions.data = res.data this.gridOptions.data = res.data
this.setExt('workers',this.$props.workers)
}) })
}, },
checkboxAll({checked}) { checkboxAll({checked}) {

@ -2,7 +2,7 @@ import Konva from "konva";
import QRCode from 'qrcode' import QRCode from 'qrcode'
export default function (width,height){ export default function (width,height){
const x=width*0.66+40,y=40,_width=width*0.30,_height=height*0.955 const x=width*0.66+40,y=40,_width=width*0.30,_height=height*0.95
const container=function (){ const container=function (){
const group=new Konva.Group({ const group=new Konva.Group({
@ -28,6 +28,19 @@ export default function (width,height){
return group return group
} }
let workers=[]
const setWorkers=function (persons){
workers=persons
}
const formatWorker=function (code){
for (const item of workers) {
if(item.userCode===code){
return item.userName
}
}
}
const drawGd=function (data){ const drawGd=function (data){
// this.layer.destroyChildren(); // this.layer.destroyChildren();
@ -78,7 +91,7 @@ export default function (width,height){
width:_width-48, width:_width-48,
height:15, height:15,
fill:'#fff', fill:'#fff',
text:`单号:${data.gdh?'PW_'+data.gdh:''}`, text:`单号:${data.djh?'QG'+data.djh:''}`,
align:'left', align:'left',
fontSize:12, fontSize:12,
}) })
@ -108,7 +121,7 @@ export default function (width,height){
group0.add(group7) group0.add(group7)
const group8=drawQz(data) const group8=drawQz(data)
group0.add(group8) group0.add(group8)
generateQRCode(data.gdh,group0) generateQRCode(data.djh,group0)
return group return group
} }
@ -273,13 +286,15 @@ export default function (width,height){
}) })
group.add(plRect) group.add(plRect)
const name=formatWorker(data.pwry)
const plText=new Konva.Text({ const plText=new Konva.Text({
x:0, x:0,
y:30, y:30,
width:(_width-60)/2, width:(_width-60)/2,
height:30, height:30,
fill:'#fff', fill:'#fff',
text:data.pwry, text:name,
fontSize:18, fontSize:18,
align:'center', align:'center',
verticalAlign:'middle' verticalAlign:'middle'
@ -485,6 +500,6 @@ export default function (width,height){
} }
return { return {
container,drawGd container,drawGd,setWorkers
} }
} }

@ -9,38 +9,77 @@ export default function () {
size:'mini', size:'mini',
showOverflow: true, showOverflow: true,
scrollY:{enable:true}, scrollY:{enable:true},
data:[ data:[],
{dcCh:'G175K-6',gdh:'20240812101',dcPl:'001',dcFd:'2302','tzbh':'1231232'} ycldw:[]
] }
const ext={}
const setExt=function (key,value){
console.log(key,value)
ext[key]=value
}
const nameFormat=function ({cellValue}){
const workers=ext.workers
for (const item of workers) {
if(item.userCode===cellValue){
return item.userName
}
}
} }
const gdhFormat=function ({cellValue}){ const gdhFormat=function ({cellValue}){
if (cellValue){ if (cellValue){
return 'PW'+cellValue return 'QG'+cellValue
} }
return '' return ''
} }
const dwFormat=function ({cellValue}){
for (const item of options.ycldw) {
if (cellValue===(item.id+"")){
for (const it of ycldw){
if (it.bm===item.tzbh){
return it.bmsm
}
}
}
}
}
const columns = [ const columns = [
{ type: 'checkbox', width: 40 }, { type: 'checkbox', width: 40 },
{ type: 'seq',title:'序号', width: 60 }, { type: 'seq',title:'序号', width: 50 },
{ field: 'gdh',title:'派工单号', width: 120,formatter: gdhFormat}, { field: 'djh',title:'派工单号', width: 120,formatter: gdhFormat},
{field: '', title: '抛丸位置', width: 80}, {field: 'lldw', title: '垛位', width: 80,formatter: dwFormat},
{field: '', title: '垛位', width: 60}, {field: 'llcs', title: '层数', width: 60},
{field: '', title: '层数', width: 60},
{field: 'dcCh', title: '船号', width: 80}, {field: 'dcCh', title: '船号', width: 80},
{field: 'dcPl', title: '批量', width: 80}, {field: 'dcPl', title: '批量', width: 80},
{field: '', title: '材质', width: 80}, {field: 'wpgg', title: '材质', width: 80},
{field: '', title: '规格', width: 100}, {field: 'wpxh', title: '规格', width: 70},
{field: '', title: '炉批号', width: 100}, {field: 'slwlh', title: '炉批号', width: 100},
{field: 'tzbh', title: '套料图号', width: 100}, {field: 'tzbh', title: '套料图号', width: 100},
{field: '', title: '接收人', width: 80}, {field: 'qgry', title: '接收人', width: 80,formatter: nameFormat},
{field: '', title: '接收时间', width: 100}, {field: 'qgpgry', title: '派工人', width: 80,formatter: nameFormat},
{field: '', title: '反馈人', width: 80}, {field: 'qgpgrq', title: '派工时间', width: 100},
{field: '', title: '反馈时间', width: 100}, ]
{field: '', title: '状态', width: 60},
const ycldw=[
{"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"}
] ]
return { return {
options, options,
columns, columns,
setExt
} }
} }

@ -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="pwpgd" ref="pwpgd" @initPgd="initPgd" :worker="getWorker" /> <QgePgd id="pwpgd" ref="pwpgd" @initPgd="initPgd" :worker="getWorker" :workers="workers" />
</div> </div>
</template> </template>
@ -28,6 +28,7 @@ export default {
pgdGroup:null, pgdGroup:null,
drawGd:null, drawGd:null,
getCurrentWorker:null, getCurrentWorker:null,
workers:null,
} }
}, },
mounted() { mounted() {
@ -84,6 +85,7 @@ export default {
this.getCurrentWorker = getCurrentWorker this.getCurrentWorker = getCurrentWorker
const {layer, group} = container() const {layer, group} = container()
this.stage.add(layer) this.stage.add(layer)
this.workers=res.data
for (let i = 0; i < res.data.length; i++) { for (let i = 0; i < res.data.length; i++) {
const item = res.data[i] const item = res.data[i]

@ -23,7 +23,7 @@ export default {
components: {SliaoSearch}, components: {SliaoSearch},
data(){ data(){
return { return {
title:'上 料 作 业 ', title:'上 料 作 业 报 工',
width:0, width:0,
height:0, height:0,
stage:null, stage:null,
@ -288,6 +288,34 @@ export default {
}) })
infoGroup.add(info3) infoGroup.add(info3)
const info4=new Konva.Text({
x: 0,
y: 64,
width: 65,
height:20,
fontSize:12,
fontStyle:'bold',
fill:'#fff',
align:'center',
verticalAlign:'middle',
text:item.slkcdw
})
infoGroup.add(info4)
const info5=new Konva.Text({
x: 0,
y: 86,
width: 65,
height:20,
fontSize:12,
fontStyle:'bold',
fill:'#fff',
align:'center',
verticalAlign:'middle',
text:item.slcs
})
infoGroup.add(info5)
const _layer=this.layer const _layer=this.layer
const _sljhGroup=this.sljhGroup; const _sljhGroup=this.sljhGroup;
let touchingFlag=false; let touchingFlag=false;
@ -324,6 +352,9 @@ export default {
const maxY=y+that.height*0.8-20 const maxY=y+that.height*0.8-20
if(thisX>=x&&thisY>=y&&thisX<=maxX&&thisY<=maxY){ if(thisX>=x&&thisY>=y&&thisX<=maxX&&thisY<=maxY){
const item=this.getAttr('item') const item=this.getAttr('item')
item.slycldw=that.currentDw.id
item.slyclcs=that.dw[that.currentDwIndex].list.length+1
item.slfkry=that.getCurrentWorker()?.userCode
const data={ const data={
ydjh:item, ydjh:item,
ydid:item.id, ydid:item.id,

Loading…
Cancel
Save