1.作业计划执行修改未根据批次派工

master
董哲奇 7 months ago
parent 39c2405ba2
commit e8505f4a66

@ -42,6 +42,7 @@
"normalize.css": "7.0.0",
"nprogress": "0.2.0",
"path-to-regexp": "2.4.0",
"pdfjs-dist": "2.0.943",
"pizzip": "^3.1.1",
"pl-table": "^2.7.5",
"print-js": "^1.6.0",

File diff suppressed because it is too large Load Diff

@ -1,5 +1,45 @@
import request from '@/utils/request'
export const getYdjhByZtOrForeman=function(data){
return request({
url: '/zyjh/getYdjhByZtOrForeman',
method: 'get',
params: data
})
}
export const getForeman=function(data){
return request({
url: '/zyjh/getForeman',
method: 'get',
params: data
})
}
export const getForemanByWorker=function(data){
return request({
url: '/zyjh/getForemanByWorker',
method: 'get',
params: data
})
}
export const pgWithForeman=function(data){
return request({
url: '/zyjh/pgWithForeman',
method: 'post',
data: data
})
}
export const getYdjhByZt=function(data){
return request({
url: '/zyjh/getYdjhByZt',
method: 'get',
params: data
})
}
export const dict=function(data){
return request({
url: '/api/sy/getZhbmList',

@ -64,6 +64,9 @@ String.prototype.format = function(args) {
}
}
import { GlobalWorkerOptions } from 'pdfjs-dist';
GlobalWorkerOptions.workerSrc = 'pdf.worker.js';
/**
* If you don't want to use mock-server
* you want to use MockJs for mock api

@ -4,7 +4,7 @@
<script>
import paoWanPgdConfig from './pgdTable'
import {getDw, getPgd, getPgd2, zx} from "@/api/zyjh";
import {getDw, getForemanByWorker, getPgd, getPgd2, getYdjhByZtOrForeman, zx} from "@/api/zyjh";
export default {
name:'HxianPgd',
props:{
@ -85,11 +85,18 @@ export default {
initData(worker,zt){
getDw({type:'llj'}).then(res=>{
this.gridOptions.ycldw=res.data
getPgd({user:worker,zt:zt,field:'hxry'}).then(res=>{
this.list=res.data
this.gridOptions.data=res.data
this.setExt('workers',this.$props.workers)
getForemanByWorker({worker:worker}).then(res=>{
getYdjhByZtOrForeman({foreman:res.data.userCode,zt:zt,field:'hxpgry'}).then(res=>{
this.list=res.data
this.gridOptions.data=res.data
this.setExt('workers',this.$props.workers)
})
})
// getPgd({user:worker,zt:zt,field:'hxry'}).then(res=>{
// this.list=res.data
// this.gridOptions.data=res.data
// this.setExt('workers',this.$props.workers)
// })
})
},
getCurrentData(){

@ -136,6 +136,7 @@ export default function (width,height){
y:height,
width:width,
height:height*0.1,
fill:'#fff',
text: persons.userName,
align: 'center',
verticalAlign:'middle',

@ -5,7 +5,7 @@
<script>
import { VXETable } from 'vxe-table'
import paoWanPgdConfig from './pgdTable'
import {bgControl, getDw, getPgd, getPgd2, zx} from "@/api/zyjh";
import {bgControl, getDw, getPgd, getPgd2, getYdjhByZt, pgWithForeman, zx} from "@/api/zyjh";
export default {
name:'HxianPgd',
@ -72,17 +72,20 @@ export default {
initData() {
bgControl({}).then(res=>{
const gx=res.data||'1'
const data={
zt:'42',
wgzt:'52',
wclzt:'51'
}
if (gx==='1'){
const data={
zt:'42',
}
getPgd(data).then(res => {
getYdjhByZt(data).then(res => {
this.list=res.data
this.gridOptions.data = res.data
})
}
if (gx==='0'){
getPgd2({field:'hxry'}).then(res => {
data.zt='2'
getYdjhByZt(data).then(res => {
this.list=res.data
this.gridOptions.data = res.data
})
@ -129,20 +132,24 @@ export default {
const list = this.$refs.vxeGrid.getCheckboxRecords()
const tmpArr = []
for (const item of list) {
const data = {
id: item.id,
hxry: worker.userCode,//
const data={
id:item.id,
foremanId:worker.userCode,//
dcCh:item.dcCh,
dcPl:item.dcPl,
zxZtName:'HXPG',
zt:'42'
}
tmpArr.push(data)
}
const data = {
type: this.type,
field: 'hxpgrq',
zxZtName: 'HXPG',
list: tmpArr
}
// const data = {
// type: this.type,
// field: 'hxpgrq',
// zxZtName: 'HXPG',
// list: tmpArr
// }
VXETable.modal.confirm('您确定派工吗?').then(res => {
res === 'confirm' && zx(data).then(res=>{
res === 'confirm' && pgWithForeman(tmpArr).then(res=>{
this.initData()
})
})

@ -145,6 +145,7 @@ export default function (width,height){
y:75,
width:width,
height:height,
fill:'#fff',
text: persons.userName,
align: 'center',
verticalAlign:'middle',

@ -44,20 +44,42 @@ export default function () {
}
const columns = [
{ type: 'checkbox', width: 40 },
{ type: 'seq',title:'序号', width: 50 },
{ field: 'djh',title:'派工单号', width: 120,},
{field: 'lldw', title: '垛位', width: 80,formatter: dwFormat},
{field: 'llcs', title: '层数', width: 60},
{field: 'dcCh', title: '船号', width: 80},
{field: 'dcPl', title: '批量', width: 80},
{field: 'wpgg', title: '材质', width: 80},
{field: 'wpxh', title: '规格', width: 70},
{field: 'slwlh', title: '炉批号', width: 100},
{field: 'tzbh', title: '套料图号', width: 100},
{field: 'hxry', title: '接收人', width: 80,formatter: nameFormat},
{field: 'hxpgry', title: '派工人', width: 80,formatter: nameFormat},
{field: 'hxpgrq', title: '派工时间', width: 100},
{ type: 'seq',title:'序号', width: 60 },
// { field: 'djh',title:'派工单号', width: 120},
// {field: 'slycldw', title: '垛位', width: 60,formatter: dwFormat},
// {field: 'slyclcs', title: '层数', width: 60},
{field: 'dcCh', title: '船号'},
{field: 'dcPl', title: '批量', },
{field: 'total', title: '总数量', },
{field: 'wpg', title: '待处理数量', },
{field: 'comp', title: '已报工', },
{field: 'wwg', title: '未报工', },
{field: 'compOnLastGx', title: '上道序报工数量', },
// {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: 'pwjssj', title: '接收时间', width: 100},
// {field: 'pgr', title: '派工人', width: 80},
// {field: 'pgsj', title: '派工时间', width: 100},
]
// const columns = [
// { type: 'checkbox', width: 40 },
// { type: 'seq',title:'序号', width: 50 },
// { field: 'djh',title:'派工单号', width: 120,},
// {field: 'lldw', title: '垛位', width: 80,formatter: dwFormat},
// {field: 'llcs', title: '层数', width: 60},
// {field: 'dcCh', title: '船号', width: 80},
// {field: 'dcPl', title: '批量', width: 80},
// {field: 'wpgg', title: '材质', width: 80},
// {field: 'wpxh', title: '规格', width: 70},
// {field: 'slwlh', title: '炉批号', width: 100},
// {field: 'tzbh', title: '套料图号', width: 100},
// {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"},

@ -15,7 +15,7 @@ import workers from "./comps/person";
import drawDw from './comps/dw'
import drawPgd from './comps/pgd'
import {getBzryList} from "@/api/sjzx/bzzGL";
import {getYcldw} from "@/api/zyjh";
import {getForeman, getYcldw} from "@/api/zyjh";
import HxianPgd from "@/views/zyjhzx/hxianpgong/comps/HxianPgd.vue";
import ZyjhSelectComp from "@/views/zyjhzx/components/SelectComp.vue";
import TipsComp from "@/views/zyjhzx/components/TipsComp.vue";
@ -36,6 +36,8 @@ export default {
getCurrentWorker:null,
workers:null,
workerGroup:null,
zyq:null,
deviceId:null,
person:null,
}
},
@ -45,6 +47,8 @@ export default {
this.initKonvaStage();
},
created(){
this.zyq=this.$route.query.zyq
this.deviceId=this.$route.query.deviceId||''
window.addEventListener('resize', this.initKonvaStage)
},
sockets:{},
@ -100,15 +104,25 @@ export default {
}
this.workerGroup.x(0)
this.workerGroup.y(0)
getBzryList({zyq:this.$route.query.zyq,zt:bzType}).then(res=>{
getForeman({zyq:this.zyq}).then(res => {
this.workers=res.data
this.$refs.pwpgd.setWorkers(this.workers)
for (let i=0;i<res.data.length;i++){
const item=res.data[i]
item.userName="班组长:"+item.userName
const worker=this.person(i,item)
this.workerGroup.add(worker)
}
})
// getBzryList({zyq:this.$route.query.zyq,zt:bzType}).then(res=>{
// this.workers=res.data
// this.$refs.pwpgd.setWorkers(this.workers)
// for (let i=0;i<res.data.length;i++){
// const item=res.data[i]
// const worker=this.person(i,item)
// this.workerGroup.add(worker)
// }
// })
},
initKonvaStage(){
this.width=this.$refs.pwpg.clientWidth

@ -136,6 +136,7 @@ export default function (width,height){
y:height,
width:width,
height:height*0.1,
fill:'#fff',
text: persons.userName,
align: 'center',
verticalAlign:'middle',

@ -135,6 +135,7 @@ export default function (width,height){
x:0,
y:height,
width:width,
fill:'#fff',
height:height*0.1,
text: persons.userName,
align: 'center',

@ -136,6 +136,7 @@ export default function (width,height){
y:height,
width:width,
height:height*0.1,
fill:'#fff',
text: persons.userName,
align: 'center',
verticalAlign:'middle',

@ -145,6 +145,7 @@ export default function (width,height){
y:75,
width:width,
height:height,
fill:'#fff',
text: persons.userName,
align: 'center',
verticalAlign:'middle',

@ -4,7 +4,7 @@
<script>
import paoWanPgdConfig from './pgdTable'
import {getDw, getPgd, getYcldw, zx} from "@/api/zyjh";
import {getDw, getForeman, getForemanByWorker, getPgd, getYcldw, getYdjhByZtOrForeman, zx} from "@/api/zyjh";
export default {
name:'PwanPgd',
props:{
@ -23,9 +23,11 @@ export default {
setExt:null,
list:[],
deviceId:null,
zyq:null,
}
},
created(){
this.zyq=this.$route.query.zyq
this.deviceId=this.$route.query.deviceId||''
const {options,columns,setExt}=paoWanPgdConfig()
this.setExt=setExt
@ -96,11 +98,19 @@ export default {
},
initData(worker,zt){
this.gridOptions.ycldw=this.$props.dw
getPgd({user:worker,zt:zt,field:'pwry'}).then(res=>{
this.list=res.data
this.gridOptions.data=res.data
this.setExt('workers',this.$props.workers)
getForemanByWorker({worker:worker}).then(res=>{
getYdjhByZtOrForeman({foreman:res.data.userCode,zt:zt,field:'pwpgry'}).then(res=>{
this.list=res.data
this.gridOptions.data=res.data
this.setExt('workers',this.$props.workers)
})
})
// getPgd({user:worker,zt:zt,field:'pwry'}).then(res=>{
// this.list=res.data
// this.gridOptions.data=res.data
// this.setExt('workers',this.$props.workers)
// })
},
cellClick({row}){
this.$emit('pgdClick',row)

@ -136,6 +136,7 @@ export default function (width,height){
y:height,
width:width,
height:height*0.1,
fill:'#fff',
text: persons.userName,
align: 'center',
verticalAlign:'middle',

@ -5,7 +5,7 @@
<script>
import { VXETable } from 'vxe-table'
import paoWanPgdConfig from './pgdTable'
import {bgControl, getDw, getPgd, getPgd2, zx} from "@/api/zyjh";
import {bgControl, getDw, getForeman, getPgd, getPgd2, getYdjhByZt, pgWithForeman, zx} from "@/api/zyjh";
export default {
name:'PwanPgd',
@ -29,10 +29,12 @@ export default {
gridOptions:{},
list:{},
setExt:null,
zyq:null,
deviceId:null,
}
},
created(){
this.zyq=this.$route.query.zyq
this.deviceId=this.$route.query.deviceId||''
const {options,columns,setExt}=paoWanPgdConfig(this.$props.height)
this.setExt=setExt
@ -42,54 +44,26 @@ export default {
this.gridOptions.ycldw=res.data
})
},
sockets:{
zyjhzx(data){
if (this.deviceId!==data.msg.deviceId&&data.msg.actionType!=='开始派工'){
return
}
//
const djhWhLengh=3
const tmpList=this.list.filter(item=>item.djh===data.msg.orderNumber||item.djh.slice(-djhWhLengh)===data.msg.orderNumber)
if (tmpList.length>1){
this.list=tmpList
this.$message.warning('短号有重复,请使用全工单号重新派工!!!')
return
}
for (const item of this.list) {
if (item.djh===data.msg.orderNumber||item.djh.slice(-djhWhLengh)===data.msg.orderNumber){
const worker=this.$props.worker()
if (!worker){
this.$message.warning('请选择施工人员后再次派工!!!')
return
}
const tmpArr=[{
id:item.id,
pwry:worker.userCode
}]
this.paigong0(tmpArr)
break
}
}
}
},
methods:{
initData(){
bgControl({}).then(res=>{
const gx=res.data||'1'
const data={
zt:'21',
wgzt:'32',
wclzt:'31'
}
if (gx==='1'){
const data={
zt:'21',
}
getPgd(data).then(res => {
getYdjhByZt(data).then(res=>{
this.list=res.data
this.gridOptions.data = res.data
})
}
if (gx==='0'){
getPgd2({field:'pwry'}).then(res=>{
data.zt='2'
getYdjhByZt(data).then(res=>{
this.list=res.data
this.gridOptions.data=res.data
this.gridOptions.data = res.data
})
}
})
@ -133,18 +107,16 @@ export default {
for (const item of list) {
const data={
id:item.id,
pwry:worker.userCode,//
foremanId:worker.userCode,//
dcCh:item.dcCh,
dcPl:item.dcPl,
zxZtName:'PWPG',
zt:'21'
}
tmpArr.push(data)
}
const data={
type:this.type,
field:'pwpgrq',
zxZtName:'PWPG',
list:tmpArr
}
VXETable.modal.confirm('您确定派工吗?').then(res=>{
res==='confirm'&&zx(data).then(resp=>{
res==='confirm'&&pgWithForeman(tmpArr).then(resp=>{
this.initData()
})
})
@ -161,7 +133,11 @@ export default {
})
},
cellClick({row}){
this.$emit('initPgd',row)
// this.$emit('initPgd',row)
const url=`http://127.0.0.1:9080/upload/T110K-4/046/PDF/5203HC102HN%E7%AC%AC046%E6%89%B9%E9%87%8F5203%E5%88%86%E6%AE%B5%E9%85%8D%E5%A5%97%E8%A1%A82023-05-11.pdf`;
// const url=`http://127.0.0.1:9080/upload/${row.dcCh}/${row.dcPl}/PDF/5203HC102HN%E7%AC%AC046%E6%89%B9%E9%87%8F5203%E5%88%86%E6%AE%B5%E9%85%8D%E5%A5%97%E8%A1%A82023-05-11.pdf`;
this.$emit('loadPdf',url)
}
}
}

@ -0,0 +1,168 @@
<template>
<VxeGrid ref="vxeGrid" v-bind="gridOptions" @cell-click="cellClick" @checkbox-change="checkboxChange" @checkbox-all="checkboxAll" />
</template>
<script>
import { VXETable } from 'vxe-table'
import paoWanPgdConfig from './pgdTable'
import {bgControl, getDw, getPgd, getPgd2, zx} from "@/api/zyjh";
export default {
name:'PwanPgdTz',
props:{
height:{
type:Number,
default:0
},
worker:{
type:Function,
default:function (){}
},
workers:{
type:Array,
default:[]
}
},
data(){
return{
type:'pwpg',
gridOptions:{},
list:{},
setExt:null,
deviceId:null,
}
},
created(){
this.deviceId=this.$route.query.deviceId||''
const {options,columns,setExt}=paoWanPgdConfig(this.$props.height)
this.setExt=setExt
this.gridOptions=options
this.gridOptions.columns=columns
getDw({type:'ycl'}).then(res=>{
this.gridOptions.ycldw=res.data
})
},
sockets:{
zyjhzx(data){
if (this.deviceId!==data.msg.deviceId&&data.msg.actionType!=='开始派工'){
return
}
//
const djhWhLengh=3
const tmpList=this.list.filter(item=>item.djh===data.msg.orderNumber||item.djh.slice(-djhWhLengh)===data.msg.orderNumber)
if (tmpList.length>1){
this.list=tmpList
this.$message.warning('短号有重复,请使用全工单号重新派工!!!')
return
}
for (const item of this.list) {
if (item.djh===data.msg.orderNumber||item.djh.slice(-djhWhLengh)===data.msg.orderNumber){
const worker=this.$props.worker()
if (!worker){
this.$message.warning('请选择施工人员后再次派工!!!')
return
}
const tmpArr=[{
id:item.id,
pwry:worker.userCode
}]
this.paigong0(tmpArr)
break
}
}
}
},
methods:{
initData(){
bgControl({}).then(res=>{
const gx=res.data||'1'
if (gx==='1'){
const data={
zt:'21',
}
getPgd(data).then(res => {
this.list=res.data
this.gridOptions.data = res.data
})
}
if (gx==='0'){
getPgd2({field:'pwry'}).then(res=>{
this.list=res.data
this.gridOptions.data=res.data
})
}
})
},
setWorkers(workers){
this.setExt('workers',workers)
this.initData()
},
checkboxAll({checked}){
if (!this.privateCheck(checked)){
this.$refs.vxeGrid.setAllCheckboxRow(!checked);
return
}
if (checked){
const worker=this.$props.worker()
this.paigong(worker)
}
},
checkboxChange({checked}){
if (!this.privateCheck(checked)){
this.$refs.vxeGrid.setAllCheckboxRow(!checked);
return
}
if (checked){
const worker=this.$props.worker()
this.paigong(worker)
}
},
privateCheck(){
const worker=this.$props.worker()
if (!worker){
this.$message.warning('请选择操作人')
return false;
}
return true
},
paigong(worker){
const list=this.$refs.vxeGrid.getCheckboxRecords()
const tmpArr=[]
for (const item of list) {
const data={
id:item.id,
pwry:worker.userCode,//
}
tmpArr.push(data)
}
const data={
type:this.type,
field:'pwpgrq',
zxZtName:'PWPG',
list:tmpArr
}
VXETable.modal.confirm('您确定派工吗?').then(res=>{
res==='confirm'&&zx(data).then(resp=>{
this.initData()
})
})
},
paigong0(arr){
const data={
type:this.type,
field:'pwpgrq',
zxZtName:'PWPG',
list:arr
}
zx(data).then(resp=>{
this.initData()
})
},
cellClick({row}){
this.$emit('initPgd',row)
}
}
}
</script>

@ -145,6 +145,7 @@ export default function (width,height){
y:75,
width:width,
height:height,
fill:'#fff',
text: persons.userName,
align: 'center',
verticalAlign:'middle',

@ -48,19 +48,24 @@ export default function () {
const columns = [
{ type: 'checkbox', width: 40 },
{ type: 'seq',title:'序号', width: 60 },
{ field: 'djh',title:'派工单号', width: 120},
{field: 'slycldw', title: '垛位', width: 60,formatter: dwFormat},
{field: 'slyclcs', title: '层数', width: 60},
{field: 'dcCh', title: '船号', width: 80},
{field: 'dcPl', title: '批量', width: 80},
{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: 'pwjssj', title: '接收时间', width: 100},
{field: 'pgr', title: '派工人', width: 80},
{field: 'pgsj', title: '派工时间', width: 100},
// { field: 'djh',title:'派工单号', width: 120},
// {field: 'slycldw', title: '垛位', width: 60,formatter: dwFormat},
// {field: 'slyclcs', title: '层数', width: 60},
{field: 'dcCh', title: '船号'},
{field: 'dcPl', title: '批量', },
{field: 'total', title: '总数量', },
{field: 'wpg', title: '待处理数量', },
{field: 'comp', title: '已报工', },
{field: 'wwg', title: '未报工', },
{field: 'compOnLastGx', title: '上道序报工数量', },
// {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: 'pwjssj', title: '接收时间', width: 100},
// {field: 'pgr', title: '派工人', width: 80},
// {field: 'pgsj', title: '派工时间', width: 100},
]
return {

@ -1,7 +1,7 @@
<template>
<div class="container">
<div id="pwpg" class="pwpg" ref="pwpg"></div>
<PWanPgd id="pwpgd" ref="pwpgd" @initPgd="initPgd" :height="height" :worker="getWorker" :workers="workers"/>
<PWanPgd id="pwpgd" ref="pwpgd" @loadPdf="loadPdf" @initPgd="initPgd" :height="height" :worker="getWorker" :workers="workers"/>
<ZyjhSelectComp id="selectComp" ref="selRef" @initWorkers="initWorkers"/>
<TipsComp />
<Drawer ref="drawer"/>
@ -9,6 +9,7 @@
</template>
<script>
import * as pdfjsLib from 'pdfjs-dist';
import PWanPgd from "@/views/zyjhzx/pwanpgong/comps/PwanPgd.vue";
import container from "./comps/container";
import drawTitle from './comps/title'
@ -16,7 +17,7 @@ import workers from "./comps/person";
import drawDw from './comps/dw'
import drawPgd from './comps/pgd'
import {getBzryList} from "@/api/sjzx/bzzGL";
import {dict, getYcldw, shangLiao} from "@/api/zyjh";
import {dict, getForeman, getYcldw, shangLiao} from "@/api/zyjh";
import ZyjhSelectComp from "@/views/zyjhzx/components/SelectComp.vue";
import TipsComp from "@/views/zyjhzx/components/TipsComp.vue";
import Drawer from "@/views/zyjhzx/components/Drawer.vue";
@ -40,6 +41,7 @@ export default {
zt:'21',
workerGroup:null,
person:null,
zyq:null,
deviceId:null,
dwGroup:null,
}
@ -49,6 +51,7 @@ export default {
this.initKonvaStage();
},
created(){
this.zyq=this.$route.query.zyq
this.deviceId=this.$route.query.deviceId||''
window.addEventListener('resize', this.initKonvaStage)
},
@ -59,6 +62,46 @@ export default {
}
},
methods:{
loadPdf(url) {
const loadingTask = pdfjsLib.getDocument(url);
loadingTask.promise.then(pdf => {
pdf.getPage(3).then(page => {
const viewport = page.getViewport();
const canvas = document.createElement('canvas');
const context = canvas.getContext('2d');
canvas.height = this.height;
canvas.width = this.width/3;
context.setTransform(1, 0, 0, -1, 0, canvas.height)
const renderContext = {
canvasContext: context,
viewport: viewport
};
page.render(renderContext).promise.then(() => {
const image = new Konva.Image({
x: 10,
y: 10,
image: canvas,
width: canvas.width / (window.devicePixelRatio || 1),
height: canvas.height / (window.devicePixelRatio || 1)
});
image.scale({
x:0.6,
y:0.6
});
image.rotation(90)
image.offsetY(image.width()*1.45)
this.pgdGroup.add(image);
});
}).catch(err => {
console.error('Cannot load page', err);
});
}).catch(err => {
console.error('Cannot load PDF document', err);
});
},
initPgd(pgd={}){
const group=this.drawGd(pgd)
this.pgdGroup.add(group)
@ -96,15 +139,26 @@ export default {
}
this.workerGroup.x(0)
this.workerGroup.y(0)
getBzryList({zyq:this.$route.query.zyq,zt:bzType}).then(res=>{
getForeman({zyq:this.zyq}).then(res => {
this.workers=res.data
this.$refs.pwpgd.setWorkers(this.workers)
for (let i=0;i<res.data.length;i++){
const item=res.data[i]
item.userName="班组长:"+item.userName
const worker=this.person(i,item)
this.workerGroup.add(worker)
}
})
// getBzryList({zyq:this.$route.query.zyq,zt:bzType}).then(res=>{
// this.workers=res.data
// this.$refs.pwpgd.setWorkers(this.workers)
// for (let i=0;i<res.data.length;i++){
// const item=res.data[i]
// const worker=this.person(i,item)
// this.workerGroup.add(worker)
// }
// })
},
initKonvaStage(){
this.width=this.$refs.pwpg.clientWidth

@ -5,7 +5,7 @@
<script>
import { VXETable } from 'vxe-table'
import paoWanPgdConfig from './pgdTable'
import {getDw, getPgd, getPgd2, zx} from "@/api/zyjh";
import {getDw, getForemanByWorker, getPgd, getPgd2, getYdjhByZtOrForeman, zx} from "@/api/zyjh";
export default {
name: 'QgePgd',
@ -93,14 +93,24 @@ export default {
initData(worker, zt) {
this.currentWorker=worker
this.zt=zt
getDw({type:'llj'}).then(res=>{
this.gridOptions.ycldw=res.data
getPgd({user:worker,zt:zt,field:'qgry'}).then(res => {
this.list=res.data
this.gridOptions.data = res.data
this.setExt('workers',this.$props.workers)
getForemanByWorker({worker:worker}).then(result=>{
getDw({type:'llj'}).then(res=>{
this.gridOptions.ycldw=res.data
getYdjhByZtOrForeman({foreman:result.data.userCode,zt:zt,field:'qgpgry'}).then(res => {
this.list=res.data
this.gridOptions.data = res.data
this.setExt('workers',this.$props.workers)
})
})
})
// getDw({type:'llj'}).then(res=>{
// this.gridOptions.ycldw=res.data
// getPgd({user:worker,zt:zt,field:'qgpgry'}).then(res => {
// this.list=res.data
// this.gridOptions.data = res.data
// this.setExt('workers',this.$props.workers)
// })
// })
},
getCurrentData() {
const data = this.$refs.qgpgd.getCurrentRecord()

@ -136,6 +136,7 @@ export default function (width,height){
y:height,
width:width,
height:height*0.1,
fill:'#fff',
text: persons.userName,
align: 'center',
verticalAlign:'middle',

@ -5,7 +5,7 @@
<script>
import { VXETable } from 'vxe-table'
import paoWanPgdConfig from './pgdTable'
import {bgControl, getDw, getPgd, getPgd2, zx} from "@/api/zyjh";
import {bgControl, getDw, getPgd, getPgd2, getYdjhByZt, pgWithForeman, zx} from "@/api/zyjh";
export default {
name:'QgePgd',
@ -71,19 +71,20 @@ export default {
initData() {
bgControl({}).then(res=>{
const gx=res.data||'1'
const data={
zt:'52',
wgzt:'62',
wclzt:'61'
}
if (gx==='1'){
const data={
zt:'42',
ztHx:'52'
}
getPgd(data).then(res => {
getYdjhByZt(data).then(res => {
this.list=res.data
this.gridOptions.data = res.data
})
}
if (gx==='0'){
const data={field: 'qgry'}
getPgd2(data).then(res => {
data.zt='2'
getYdjhByZt(data).then(res => {
this.list=res.data
this.gridOptions.data = res.data
})
@ -129,20 +130,24 @@ export default {
const list = this.$refs.vxeGrid.getCheckboxRecords()
const tmpArr = []
for (const item of list) {
const data = {
id: item.id,
qgry: worker.userCode,//
const data={
id:item.id,
foremanId:worker.userCode,//
dcCh:item.dcCh,
dcPl:item.dcPl,
zxZtName:'QGPG',
zt:'52'
}
tmpArr.push(data)
}
const data = {
type: this.type,
field: 'qgpgrq',
zxZtName: 'QGPG',
list: tmpArr
}
// const data = {
// type: this.type,
// field: 'qgpgrq',
// zxZtName: 'QGPG',
// list: tmpArr
// }
VXETable.modal.confirm('您确定派工吗?').then(res => {
res === 'confirm' && zx(data).then(res=>{
res === 'confirm' && pgWithForeman(tmpArr).then(res=>{
this.initData()
})
})

@ -145,6 +145,7 @@ export default function (width,height){
y:75,
width:width,
height:height,
fill:'#fff',
text: persons.userName,
align: 'center',
verticalAlign:'middle',

@ -44,20 +44,42 @@ export default function () {
}
const columns = [
{ type: 'checkbox', width: 40 },
{ type: 'seq',title:'序号', width: 50 },
{ field: 'djh',title:'派工单号', width: 120,},
{field: 'lldw', title: '垛位', width: 80,formatter: dwFormat},
{field: 'llcs', title: '层数', width: 60},
{field: 'dcCh', title: '船号', width: 80},
{field: 'dcPl', title: '批量', width: 80},
{field: 'wpgg', title: '材质', width: 80},
{field: 'wpxh', title: '规格', width: 70},
{field: 'slwlh', title: '炉批号', width: 100},
{field: 'tzbh', title: '套料图号', width: 100},
{field: 'qgry', title: '接收人', width: 80,formatter: nameFormat},
{field: 'qgpgry', title: '派工人', width: 80,formatter: nameFormat},
{field: 'qgpgrq', title: '派工时间', width: 100},
{ type: 'seq',title:'序号', width: 60 },
// { field: 'djh',title:'派工单号', width: 120},
// {field: 'slycldw', title: '垛位', width: 60,formatter: dwFormat},
// {field: 'slyclcs', title: '层数', width: 60},
{field: 'dcCh', title: '船号'},
{field: 'dcPl', title: '批量', },
{field: 'total', title: '总数量', },
{field: 'wpg', title: '待处理数量', },
{field: 'comp', title: '已报工', },
{field: 'wwg', title: '未报工', },
{field: 'compOnLastGx', title: '上道序报工数量', },
// {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: 'pwjssj', title: '接收时间', width: 100},
// {field: 'pgr', title: '派工人', width: 80},
// {field: 'pgsj', title: '派工时间', width: 100},
]
// const columns = [
// { type: 'checkbox', width: 40 },
// { type: 'seq',title:'序号', width: 50 },
// { field: 'djh',title:'派工单号', width: 120,},
// {field: 'lldw', title: '垛位', width: 80,formatter: dwFormat},
// {field: 'llcs', title: '层数', width: 60},
// {field: 'dcCh', title: '船号', width: 80},
// {field: 'dcPl', title: '批量', width: 80},
// {field: 'wpgg', title: '材质', width: 80},
// {field: 'wpxh', title: '规格', width: 70},
// {field: 'slwlh', title: '炉批号', width: 100},
// {field: 'tzbh', title: '套料图号', width: 100},
// {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"},

@ -15,7 +15,7 @@ import workers from "./comps/person";
import drawDw from './comps/dw'
import drawPgd from './comps/pgd'
import {getBzryList} from "@/api/sjzx/bzzGL";
import {getYcldw} from "@/api/zyjh";
import {getForeman, getYcldw} from "@/api/zyjh";
import QgePgd from "@/views/zyjhzx/qgepgong/comps/QgePgd.vue";
import ZyjhSelectComp from "@/views/zyjhzx/components/SelectComp.vue";
import TipsComp from "@/views/zyjhzx/components/TipsComp.vue";
@ -37,6 +37,8 @@ export default {
getCurrentWorker:null,
workers:null,
workerGroup:null,
zyq:null,
deviceId:null,
person:null
}
},
@ -46,6 +48,8 @@ export default {
this.initKonvaStage();
},
created(){
this.zyq=this.$route.query.zyq
this.deviceId=this.$route.query.deviceId||''
window.addEventListener('resize', this.initKonvaStage)
},
sockets:{},
@ -101,15 +105,25 @@ export default {
}
this.workerGroup.x(0)
this.workerGroup.y(0)
getBzryList({zyq:this.$route.query.zyq,zt:bzType}).then(res=>{
getForeman({zyq:this.zyq}).then(res => {
this.workers=res.data
this.$refs.pwpgd.setWorkers(this.workers)
for (let i=0;i<res.data.length;i++){
const item=res.data[i]
item.userName="班组长:"+item.userName
const worker=this.person(i,item)
this.workerGroup.add(worker)
}
})
// getBzryList({zyq:this.$route.query.zyq,zt:bzType}).then(res=>{
// this.workers=res.data
// this.$refs.pwpgd.setWorkers(this.workers)
// for (let i=0;i<res.data.length;i++){
// const item=res.data[i]
// const worker=this.person(i,item)
// this.workerGroup.add(worker)
// }
// })
},
initKonvaStage() {
this.width = this.$refs.pwpg.clientWidth

Loading…
Cancel
Save