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_WEBSOCKET = 'http://192.127.0.22:23456'

@ -96,7 +96,7 @@ Object.keys(filters).forEach(key => {
Vue.use(new VueSocketIO({
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
}))

@ -2665,14 +2665,14 @@ export default {
filterRender: { name: 'FilterCombination', },
sortable:true,
},
{ field: '白班时长', title: '白班', width: 70,
filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
filterRender: { name: 'FilterCombination', },
},
{ field: '二班时长', title: '夜班', width: 70,
filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
filterRender: { name: 'FilterCombination', },
},
// { field: '', title: '', width: 70,
// filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
// filterRender: { name: 'FilterCombination', },
// },
// { field: '', title: '', width: 70,
// filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
// filterRender: { name: 'FilterCombination', },
// },
{ field: 'kw', title: '套料图名称', width: 120,formatter:['dictFormat','QGKW'],
filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
filterRender: { name: 'FilterCombination', },

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

@ -83,7 +83,7 @@
<el-form-item style="float: right" >
<el-button type="success" @click="xdClick"></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-col>
</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>
import paoWanPgdConfig from './pgdTable'
import {getPgd} from "@/api/zyjh";
import {getDw, getPgd} from "@/api/zyjh";
export default {
name:'HxianPgd',
props:{
workers:{
type:Array,
default:[]
}
},
},
data(){
return{
gridOptions:{},
list:{},
setExt:null,
}
},
created(){
const {options,columns}=paoWanPgdConfig()
const {options,columns,setExt}=paoWanPgdConfig()
this.setExt=setExt
this.gridOptions=options
this.gridOptions.columns=columns
},
methods:{
initData(worker,zt){
getDw({type:'llj'}).then(res=>{
this.gridOptions.ycldw=res.data
})
getPgd({user:worker,zt:zt,field:'hxry'}).then(res=>{
this.gridOptions.data=res.data
this.setExt('workers',this.$props.workers)
})
},
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){
const info=this.getAttr('item')
const zyjh=JSON.parse(window.localStorage.getItem('hxfk'))
console.log(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()
that.visible(true)
return

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

@ -10,7 +10,21 @@ export default function () {
showOverflow: true,
scrollY:{enable: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}){
if (cellValue){
@ -18,27 +32,55 @@ export default function () {
}
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 = [
{ type: 'seq',title:'序号', width: 60 },
{ field: 'gdh',title:'派工单号', width: 120,formatter: gdhFormat},
{field: '', title: '抛丸位置', width: 80},
{field: '', title: '垛位', width: 60},
{field: '', title: '层数', width: 60},
{ type: 'checkbox', width: 40 },
{ type: 'seq',title:'序号', width: 50 },
{ field: 'djh',title:'派工单号', width: 120,formatter: gdhFormat},
{field: 'lldw', title: '垛位', width: 80,formatter: dwFormat},
{field: 'llcs', title: '层数', width: 60},
{field: 'dcCh', title: '船号', width: 80},
{field: 'dcPl', title: '批量', width: 80},
{field: '', title: '材质', width: 80},
{field: '', title: '规格', width: 100},
{field: '', title: '炉批号', width: 100},
{field: 'wpgg', title: '材质', width: 80},
{field: 'wpxh', title: '规格', width: 70},
{field: 'slwlh', title: '炉批号', width: 100},
{field: 'tzbh', title: '套料图号', width: 100},
{field: '', title: '接收人', width: 80},
{field: '', title: '接收时间', width: 100},
{field: '', title: '反馈人', width: 80},
{field: '', title: '反馈时间', width: 100},
{field: '', title: '状态', width: 60},
{field: 'hxry', title: '接收人', width: 80,formatter: nameFormat},
{field: 'hxpgry', title: '派工人', width: 80,formatter: nameFormat},
{field: 'hxpgrq', title: '派工时间', width: 100},
]
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 {
options,
columns,
setExt
}
}

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

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

@ -2,7 +2,7 @@ import Konva from "konva";
import QRCode from 'qrcode'
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 group=new Konva.Group({
@ -28,6 +28,19 @@ export default function (width,height){
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){
// this.layer.destroyChildren();
@ -78,7 +91,7 @@ export default function (width,height){
width:_width-48,
height:15,
fill:'#fff',
text:`单号:${data.gdh?'PW_'+data.gdh:''}`,
text:`单号:${data.djh?'HX'+data.djh:''}`,
align:'left',
fontSize:12,
})
@ -108,7 +121,7 @@ export default function (width,height){
group0.add(group7)
const group8=drawQz(data)
group0.add(group8)
generateQRCode(data.gdh,group0)
generateQRCode(data.djh,group0)
return group
}
@ -273,13 +286,15 @@ export default function (width,height){
})
group.add(plRect)
const name=formatWorker(data.pwry)
const plText=new Konva.Text({
x:0,
y:30,
width:(_width-60)/2,
height:30,
fill:'#fff',
text:data.pwry,
text:name,
fontSize:18,
align:'center',
verticalAlign:'middle'
@ -485,6 +500,6 @@ export default function (width,height){
}
return {
container,drawGd
container,drawGd,setWorkers
}
}

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

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

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

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

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

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

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

@ -2,7 +2,7 @@ import Konva from "konva";
import QRCode from 'qrcode'
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 group=new Konva.Group({
@ -91,7 +91,7 @@ export default function (width,height){
width:_width-48,
height:15,
fill:'#fff',
text:`单号:${data.gdh?'LL_'+data.gdh:''}`,
text:`单号:${data.djh?'LL'+data.djh:''}`,
align:'left',
fontSize:12,
})
@ -121,7 +121,7 @@ export default function (width,height){
group0.add(group7)
const group8=drawQz(data)
group0.add(group8)
generateQRCode(data.gdh,group0)
generateQRCode(data.djh,group0)
return group
}

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

@ -1,7 +1,7 @@
<template>
<div class="container">
<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>
</template>

@ -51,7 +51,7 @@ const baifang=function (option={}) {
const gangban=function (index,item,slList){
const group=new Konva.Group({
x:0,
y:thatHeight-310-index*40,
y:thatHeight-350-index*40,
// draggable:true
})
@ -99,7 +99,13 @@ const baifang=function (option={}) {
const info=this.getAttr('item')
const zyjh=JSON.parse(window.localStorage.getItem('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()
that.visible(true)
return

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

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

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

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

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

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

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

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

@ -98,7 +98,13 @@ const baifang=function (option={}) {
const info=this.getAttr('item')
const zyjh=JSON.parse(window.localStorage.getItem('qgfk'))
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()
that.visible(true)
return
@ -106,6 +112,7 @@ const baifang=function (option={}) {
zx({
field:'qgfkrq',
zxZtName:'QGFK',
zt:'42',
list:[{
id:zyjh.id,
qgfkry: worker.userCode

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

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

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

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

@ -2,7 +2,7 @@ import Konva from "konva";
import QRCode from 'qrcode'
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 group=new Konva.Group({
@ -28,6 +28,19 @@ export default function (width,height){
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){
// this.layer.destroyChildren();
@ -78,7 +91,7 @@ export default function (width,height){
width:_width-48,
height:15,
fill:'#fff',
text:`单号:${data.gdh?'PW_'+data.gdh:''}`,
text:`单号:${data.djh?'QG'+data.djh:''}`,
align:'left',
fontSize:12,
})
@ -108,7 +121,7 @@ export default function (width,height){
group0.add(group7)
const group8=drawQz(data)
group0.add(group8)
generateQRCode(data.gdh,group0)
generateQRCode(data.djh,group0)
return group
}
@ -273,13 +286,15 @@ export default function (width,height){
})
group.add(plRect)
const name=formatWorker(data.pwry)
const plText=new Konva.Text({
x:0,
y:30,
width:(_width-60)/2,
height:30,
fill:'#fff',
text:data.pwry,
text:name,
fontSize:18,
align:'center',
verticalAlign:'middle'
@ -485,6 +500,6 @@ export default function (width,height){
}
return {
container,drawGd
container,drawGd,setWorkers
}
}

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

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

@ -23,7 +23,7 @@ export default {
components: {SliaoSearch},
data(){
return {
title:'上 料 作 业 ',
title:'上 料 作 业 报 工',
width:0,
height:0,
stage:null,
@ -288,6 +288,34 @@ export default {
})
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 _sljhGroup=this.sljhGroup;
let touchingFlag=false;
@ -324,6 +352,9 @@ export default {
const maxY=y+that.height*0.8-20
if(thisX>=x&&thisY>=y&&thisX<=maxX&&thisY<=maxY){
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={
ydjh:item,
ydid:item.id,

Loading…
Cancel
Save