From 5c3ff1f9bddc84b2a127d70d46dd90751cf6a052 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E8=91=A3=E5=93=B2=E5=A5=87?= <13840175730@139.com>
Date: Tue, 3 Sep 2024 09:02:19 +0800
Subject: [PATCH] =?UTF-8?q?1.=E4=B8=B4=E6=97=B6=E6=8F=90=E4=BA=A4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/api/zyjh.js | 2 +-
src/views/jhzx/zrcWH.vue | 2 +-
src/views/sjzx/bomwh.vue | 19 +++++--
src/views/zyjhzx/hxianfkui/comps/baifang.js | 4 +-
src/views/zyjhzx/hxianfkui/comps/dw.js | 4 +-
src/views/zyjhzx/hxianfkui/comps/person.js | 2 +-
src/views/zyjhzx/hxianfkui/comps/pgd.js | 4 +-
src/views/zyjhzx/hxianfkui/comps/pgdTable.js | 9 ++-
src/views/zyjhzx/hxianfkui/index.vue | 56 ++++++++-----------
src/views/zyjhzx/hxianpgong/comps/person.js | 41 ++++++++++++--
src/views/zyjhzx/hxianpgong/comps/pgd.js | 4 +-
src/views/zyjhzx/hxianpgong/comps/pgdTable.js | 9 ++-
src/views/zyjhzx/hxianpgong/index.vue | 40 ++++++-------
src/views/zyjhzx/lliaofkui/comps/person.js | 2 +-
src/views/zyjhzx/lliaofkui/comps/pgd.js | 4 +-
src/views/zyjhzx/lliaofkui/comps/pgdTable.js | 9 +--
src/views/zyjhzx/lliaofkui/index.vue | 49 +++++++---------
src/views/zyjhzx/lliaopgong/comps/person.js | 41 ++++++++++++--
src/views/zyjhzx/lliaopgong/comps/pgd.js | 4 +-
src/views/zyjhzx/lliaopgong/comps/pgdTable.js | 11 ++--
src/views/zyjhzx/lliaopgong/index.vue | 42 +++++++-------
src/views/zyjhzx/pwanfkui/index.vue | 12 ++--
src/views/zyjhzx/pwanpgong/comps/PwanPgd.vue | 12 +++-
src/views/zyjhzx/pwanpgong/comps/pgdTable.js | 8 +--
src/views/zyjhzx/qgefkui/comps/baifang.js | 4 +-
src/views/zyjhzx/qgefkui/comps/dw.js | 4 +-
src/views/zyjhzx/qgefkui/comps/person.js | 2 +-
src/views/zyjhzx/qgefkui/comps/pgd.js | 4 +-
src/views/zyjhzx/qgefkui/comps/pgdTable.js | 9 ++-
src/views/zyjhzx/qgefkui/comps/sb.js | 2 +-
src/views/zyjhzx/qgefkui/index.vue | 53 ++++++++----------
src/views/zyjhzx/qgepgong/comps/person.js | 41 ++++++++++++--
src/views/zyjhzx/qgepgong/comps/pgd.js | 4 +-
src/views/zyjhzx/qgepgong/comps/pgdTable.js | 5 +-
src/views/zyjhzx/qgepgong/index.vue | 40 ++++++-------
src/views/zyjhzx/sliao/index.vue | 2 +-
36 files changed, 310 insertions(+), 250 deletions(-)
diff --git a/src/api/zyjh.js b/src/api/zyjh.js
index 7580c0d..e55df43 100644
--- a/src/api/zyjh.js
+++ b/src/api/zyjh.js
@@ -10,7 +10,7 @@ export const daoduo=function(data){
export const zx=function(data){
return request({
- url: '/zyjh/pgfk',
+ url: '/zyjh/zx',
method: 'post',
data: data
})
diff --git a/src/views/jhzx/zrcWH.vue b/src/views/jhzx/zrcWH.vue
index 569309c..54ffe80 100644
--- a/src/views/jhzx/zrcWH.vue
+++ b/src/views/jhzx/zrcWH.vue
@@ -870,7 +870,7 @@ export default {
created() {
window.addEventListener("resize", this.getHeight);
this.getHeight();
- this.initList();
+ // this.initList();
this.getCzxx();
},
methods: {
diff --git a/src/views/sjzx/bomwh.vue b/src/views/sjzx/bomwh.vue
index 8159b9d..f5522f4 100644
--- a/src/views/sjzx/bomwh.vue
+++ b/src/views/sjzx/bomwh.vue
@@ -1219,15 +1219,22 @@ export default {
formData.set('isupload', '02')
uploadBom(formData).then(res => {
console.log(res.data)
- if (res.data.zt == "01") {
- this.$message({ message: '导入成功', type: 'success' })
- this.dialogVisible=false;
- this.tableData=res.data.data;
- }
+ this.$message({ message: '导入成功', type: 'success' })
+ this.dialogVisible=false;
+ this.tableData=res.data.data;
+ // if (res.data.zt == "01") {
+ // this.$message({ message: '导入成功', type: 'success' })
+ // this.dialogVisible=false;
+ // this.tableData=res.data.data;
+ // }
})
})
}else if (res.data.zt == "03") {
- this.$message.error('上传的套料图PDF格式错误,请联系开发人员!');
+ //fixme 用于临时显示数据
+ this.dialogVisible=false;
+ this.tableData=res.data.data;
+ //fixme 临时显示数据结束
+ //this.$message.error('上传的套料图PDF格式错误,请联系开发人员!');
}
this.fileList = []
this.tltList=[]
diff --git a/src/views/zyjhzx/hxianfkui/comps/baifang.js b/src/views/zyjhzx/hxianfkui/comps/baifang.js
index 2271f19..cd20411 100644
--- a/src/views/zyjhzx/hxianfkui/comps/baifang.js
+++ b/src/views/zyjhzx/hxianfkui/comps/baifang.js
@@ -2,9 +2,9 @@ import Konva from "konva";
const baifang=function (option={}) {
const width=option.width,height=option.height,slList=option.dw,image=require('@/assets/gb.png')
- const _width=width*0.232,_height=height*0.67
+ const _width=width*0.25,_height=height*0.67
const container=function (){
- const x=width*0.22+30,y=300
+ const x=width*0.30+30,y=300
const group=new Konva.Group({
x:x,
diff --git a/src/views/zyjhzx/hxianfkui/comps/dw.js b/src/views/zyjhzx/hxianfkui/comps/dw.js
index 5df14e4..4516c4d 100644
--- a/src/views/zyjhzx/hxianfkui/comps/dw.js
+++ b/src/views/zyjhzx/hxianfkui/comps/dw.js
@@ -2,7 +2,7 @@ import Konva from "konva";
export default function (width,height,callback){
console.log(callback)
- const x=0,y=0,_width=width*0.08,_height=height*0.67
+ const x=0,y=0,_width=width*0.16,_height=height*0.67
const container=function (){
const x=width*0.134+30,y=300
@@ -30,7 +30,7 @@ export default function (width,height,callback){
const dw=function (index,item=[]){
- const alignSize=1
+ const alignSize=2
const width=((_width-20)/alignSize),height=150
const x=index%alignSize*width+index%alignSize*10+5,y=height*(Math.floor(index/alignSize))+(Math.floor(index/alignSize)+1)*10
const group=new Konva.Group({
diff --git a/src/views/zyjhzx/hxianfkui/comps/person.js b/src/views/zyjhzx/hxianfkui/comps/person.js
index 99851c2..7528657 100644
--- a/src/views/zyjhzx/hxianfkui/comps/person.js
+++ b/src/views/zyjhzx/hxianfkui/comps/person.js
@@ -53,7 +53,7 @@ export default function (width,height){
y:0,
width:width,
height:height,
- text: persons.name,
+ text: persons.userName,
align: 'center',
verticalAlign:'middle',
fontSize:12
diff --git a/src/views/zyjhzx/hxianfkui/comps/pgd.js b/src/views/zyjhzx/hxianfkui/comps/pgd.js
index 5c339b0..efd3864 100644
--- a/src/views/zyjhzx/hxianfkui/comps/pgd.js
+++ b/src/views/zyjhzx/hxianfkui/comps/pgd.js
@@ -66,7 +66,7 @@ export default function (width,height){
lineHeight:1,
stroke:'black',
strokeWidth:1,
- text:'划线施工单',
+ text:'抛丸施工单',
align:'center',
fontSize:20,
})
@@ -78,7 +78,7 @@ export default function (width,height){
width:_width-48,
height:15,
lineHeight:1,
- text:'单号:HX_'+data.gdh,
+ text:'单号:PW_'+data.gdh,
align:'right',
fontSize:12,
})
diff --git a/src/views/zyjhzx/hxianfkui/comps/pgdTable.js b/src/views/zyjhzx/hxianfkui/comps/pgdTable.js
index 5a50d33..e6b16ac 100644
--- a/src/views/zyjhzx/hxianfkui/comps/pgdTable.js
+++ b/src/views/zyjhzx/hxianfkui/comps/pgdTable.js
@@ -9,13 +9,11 @@ export default function () {
size:'mini',
showOverflow: true,
scrollY:{enable:true},
- data:[
- {dcCh:'G175K-6',gdh:'20240812101',dcPl:'002',dcFd:'2302','tzbh':'1231232'}
- ]
+ data:[]
}
const gdhFormat=function ({cellValue}){
if (cellValue){
- return 'HX'+cellValue
+ return 'PW'+cellValue
}
return ''
}
@@ -23,7 +21,8 @@ export default function () {
{ type: 'checkbox', width: 40 },
{ type: 'seq',title:'序号', width: 60 },
{ field: 'gdh',title:'派工单号', width: 120,formatter: gdhFormat},
- {field: '', title: '理料垛位', width: 80},
+ {field: '', title: '抛丸位置', width: 80},
+ {field: '', title: '垛位', width: 60},
{field: '', title: '层数', width: 60},
{field: 'dcCh', title: '船号', width: 80},
{field: 'dcPl', title: '批量', width: 80},
diff --git a/src/views/zyjhzx/hxianfkui/index.vue b/src/views/zyjhzx/hxianfkui/index.vue
index 158b923..e63d8df 100644
--- a/src/views/zyjhzx/hxianfkui/index.vue
+++ b/src/views/zyjhzx/hxianfkui/index.vue
@@ -1,7 +1,7 @@
@@ -12,32 +12,25 @@ import workers from "./comps/person";
import drawDw from './comps/dw'
import drawPgd from './comps/pgd'
import baifang from "./comps/baifang";
-import drawSb from './comps/sb'
+import {getPgd, getYcldw} from "@/api/zyjh";
+import {getBzryList} from "@/api/sjzx/bzzGL";
import HxianPgd from "@/views/zyjhzx/hxianfkui/comps/HxianPgd.vue";
export default {
name:'PWanFKui',
- components: {HxianPgd,},
+ components: {HxianPgd},
data(){
return {
- title:'划 线 作 业 反 馈',
+ title:'抛 丸 作 业 反 馈',
width:0,
height:0,
stage:null,
layer:null,
pgdGroup:null,
drawGd:null,
- dw:[
- {name:'理料垛位\n垛位1\n摆放预览',
- list:['板材1','板材2','板材3','板材4','板材5','板材6','板材7','板材8','板材9','板材10','板材11','板材12','板材13','板材14',]
- },
- {name:'理料垛位\n垛位2\n摆放预览',
- list:['板材1','板材2','板材3','板材4','板材5','板材6','板材7','板材8','板材9','板材10','板材11','板材12','板材13','板材14',]
- },
- {name:'理料垛位\n垛位2\n摆放预览',
- list:['板材1','板材2','板材3','板材4','板材5','板材6','板材7','板材8','板材9','板材10','板材11','板材12','板材13','板材14',]
- },
- ]
+ dw:[],
+ pgd:[],
+ currentWorker:null,
}
},
mounted() {
@@ -61,35 +54,34 @@ export default {
},
initDw(){
const that=this
- new Promise(resolve => {
- return resolve(this.dw)
- }).then(res=>{
- console.log(this)
+ getYcldw().then(res=>{
const {container,dw}=drawDw(this.width,this.height,that.initBaiFang)
const group=container()
this.layer.add(group)
- for (let i=0;i {
- return resolve([
- {name:'张三1'},{name:'张三2'},
- {name:'张三1'},{name:'张三2'},
- ])
- }).then(res=>{
- const {container,person}=workers(this.width,this.height,res)
+ const that=this
+ getBzryList({resourcesCode:'4KB002'}).then(res=>{
+ const {container,person}=workers(this.width,this.height)
const group=container()
+ group.on('click touchstart',function (){
+ that.currentWorker=person
+ getPgd({field:'',jhrqField:'',user:that.currentWorker.userCode}).then(res=>[
+ that.pgd=res.data
+ ])
+ })
this.layer.add(group)
- for (let i=0;i
#pwpgd {
- width:66%;
+ width:55%;
height: auto;
position: absolute;
top:45px;
diff --git a/src/views/zyjhzx/hxianpgong/comps/person.js b/src/views/zyjhzx/hxianpgong/comps/person.js
index e661e58..67f9b99 100644
--- a/src/views/zyjhzx/hxianpgong/comps/person.js
+++ b/src/views/zyjhzx/hxianpgong/comps/person.js
@@ -1,17 +1,20 @@
import Konva from "konva";
export default function (width,height){
- const x=0,y=0,_width=width*0.5,_height=120
+ const _width=width*0.5,_height=120
const container=function (){
const x=20,y=45
- const group=new Konva.Group({
+ const layer=new Konva.Layer({
x:x,
y:y,
width:_width,
height:_height
})
+ layer.clipFunc(function(ctx) {
+ ctx.rect(0, 0, _width, _height);
+ });
const rect=new Konva.Rect({
x:0,
@@ -22,9 +25,31 @@ export default function (width,height){
strokeWidth:1,
})
- group.add(rect)
+ layer.add(rect)
- return group
+ const group=new Konva.Group({
+ x:0,
+ y:0,
+ width:_width,
+ height:_height,
+ draggable: true,
+ dragBoundFunc:function (pos){
+ return {
+ x:pos.x,
+ y:y
+ }
+ },
+ })
+ layer.add(group)
+
+
+ return {layer,group}
+ }
+
+ let currentWork=null;
+
+ const getCurrentWorker=function (){
+ return currentWork
}
const person=function (index,persons={}){
@@ -38,6 +63,10 @@ export default function (width,height){
height:height
})
+ group.on('click touchstart',function (){
+ currentWork=persons
+ })
+
const rect=new Konva.Rect({
x:0,
y:0,
@@ -53,7 +82,7 @@ export default function (width,height){
y:0,
width:width,
height:height,
- text: persons.name,
+ text: persons.userName,
align: 'center',
verticalAlign:'middle',
fontSize:12
@@ -64,6 +93,6 @@ export default function (width,height){
}
return{
- container,person
+ container,person,getCurrentWorker
}
}
diff --git a/src/views/zyjhzx/hxianpgong/comps/pgd.js b/src/views/zyjhzx/hxianpgong/comps/pgd.js
index 5c339b0..efd3864 100644
--- a/src/views/zyjhzx/hxianpgong/comps/pgd.js
+++ b/src/views/zyjhzx/hxianpgong/comps/pgd.js
@@ -66,7 +66,7 @@ export default function (width,height){
lineHeight:1,
stroke:'black',
strokeWidth:1,
- text:'划线施工单',
+ text:'抛丸施工单',
align:'center',
fontSize:20,
})
@@ -78,7 +78,7 @@ export default function (width,height){
width:_width-48,
height:15,
lineHeight:1,
- text:'单号:HX_'+data.gdh,
+ text:'单号:PW_'+data.gdh,
align:'right',
fontSize:12,
})
diff --git a/src/views/zyjhzx/hxianpgong/comps/pgdTable.js b/src/views/zyjhzx/hxianpgong/comps/pgdTable.js
index ba99bde..d3c17fd 100644
--- a/src/views/zyjhzx/hxianpgong/comps/pgdTable.js
+++ b/src/views/zyjhzx/hxianpgong/comps/pgdTable.js
@@ -9,13 +9,11 @@ export default function () {
size:'mini',
showOverflow: true,
scrollY:{enable:true},
- data:[
- {dcCh:'G175K-6',gdh:'20240812101',dcPl:'001',dcFd:'2302','tzbh':'1231232'}
- ]
+ data:[]
}
const gdhFormat=function ({cellValue}){
if (cellValue){
- return 'HX'+cellValue
+ return 'PW'+cellValue
}
return ''
}
@@ -23,7 +21,8 @@ export default function () {
{ type: 'checkbox', width: 40 },
{ type: 'seq',title:'序号', width: 60 },
{ field: 'gdh',title:'派工单号', width: 120,formatter: gdhFormat},
- {field: '', title: '理料垛位', width: 80},
+ {field: '', title: '抛丸位置', width: 80},
+ {field: '', title: '垛位', width: 60},
{field: '', title: '层数', width: 60},
{field: 'dcCh', title: '船号', width: 80},
{field: 'dcPl', title: '批量', width: 80},
diff --git a/src/views/zyjhzx/hxianpgong/index.vue b/src/views/zyjhzx/hxianpgong/index.vue
index e251a13..f97bc8e 100644
--- a/src/views/zyjhzx/hxianpgong/index.vue
+++ b/src/views/zyjhzx/hxianpgong/index.vue
@@ -1,7 +1,7 @@
@@ -11,6 +11,8 @@ import drawTitle from './comps/title'
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 HxianPgd from "@/views/zyjhzx/hxianpgong/comps/HxianPgd.vue";
export default {
@@ -25,6 +27,7 @@ export default {
layer:null,
pgdGroup:null,
drawGd:null,
+ getCurrentWorker:null,
}
},
mounted() {
@@ -32,41 +35,34 @@ export default {
},
methods:{
initPgd(pgd={}){
- console.log(pgd)
const group=this.drawGd(pgd)
this.pgdGroup.add(group)
},
initDw(){
- new Promise(resolve => {
- return resolve([
- {name:'理料垛位1\n预览信息'},{name:'理料垛位2\n预览信息'},
- {name:'理料垛位3\n预览信息'},{name:'理料垛位4\n预览信息'},
- ])
- }).then(res=>{
- const {container,dw}=drawDw(this.width,this.height,res)
+ getYcldw().then(res=>{
+ const {container,dw}=drawDw(this.width,this.height)
const group=container()
this.layer.add(group)
- for (let i=0;i {
- return resolve([
- {name:'张三1'},{name:'张三2'},
- {name:'张三1'},{name:'张三2'},
- ])
- }).then(res=>{
- const {container,person}=workers(this.width,this.height,res)
- const group=container()
- this.layer.add(group)
+ getBzryList({resourcesCode:'4KB002'}).then(res=>{
+ const {container,person,getCurrentWorker}=workers(this.width,this.height)
+ this.getCurrentWorker=getCurrentWorker
+ const {layer,group}=container()
+ this.stage.add(layer)
- for (let i=0;i
@@ -13,6 +13,8 @@ import drawDw from './comps/dw'
import drawPgd from './comps/pgd'
import baifang from "./comps/baifang";
import drawCsd from './comps/csd'
+import {getPgd, getYcldw} from "@/api/zyjh";
+import {getBzryList} from "@/api/sjzx/bzzGL";
import LliaoPgd from "@/views/zyjhzx/lliaofkui/comps/LliaoPgd.vue";
export default {
@@ -20,24 +22,16 @@ export default {
components: {LliaoPgd},
data(){
return {
- title:'理料 作 业 反 馈',
+ title:'抛 丸 作 业 反 馈',
width:0,
height:0,
stage:null,
layer:null,
pgdGroup:null,
drawGd:null,
- dw:[
- {name:'理料垛位\n垛位1\n摆放预览',
- list:['板材1','板材2','板材3','板材4','板材5','板材6','板材7','板材8','板材9','板材10','板材11','板材12','板材13','板材14',]
- },
- {name:'理料垛位\n垛位2\n摆放预览',
- list:['板材1','板材2','板材3','板材4','板材5','板材6','板材7','板材8','板材9','板材10','板材11','板材12','板材13','板材14',]
- },
- {name:'理料垛位\n垛位2\n摆放预览',
- list:['板材1','板材2','板材3','板材4','板材5','板材6','板材7','板材8','板材9','板材10','板材11','板材12','板材13','板材14',]
- },
- ]
+ dw:[],
+ pgd:[],
+ currentWorker:null,
}
},
mounted() {
@@ -61,35 +55,34 @@ export default {
},
initDw(){
const that=this
- new Promise(resolve => {
- return resolve(this.dw)
- }).then(res=>{
- console.log(this)
+ getYcldw().then(res=>{
const {container,dw}=drawDw(this.width,this.height,that.initBaiFang)
const group=container()
this.layer.add(group)
- for (let i=0;i {
- return resolve([
- {name:'张三1'},{name:'张三2'},
- {name:'张三1'},{name:'张三2'},
- ])
- }).then(res=>{
- const {container,person}=workers(this.width,this.height,res)
+ const that=this
+ getBzryList({resourcesCode:'4KB002'}).then(res=>{
+ const {container,person}=workers(this.width,this.height)
const group=container()
+ group.on('click touchstart',function (){
+ that.currentWorker=person
+ getPgd({field:'',jhrqField:'',user:that.currentWorker.userCode}).then(res=>[
+ that.pgd=res.data
+ ])
+ })
this.layer.add(group)
- for (let i=0;i
@@ -11,6 +11,8 @@ import drawTitle from './comps/title'
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 LliaoPgd from "@/views/zyjhzx/lliaopgong/comps/LliaoPgd.vue";
export default {
@@ -18,13 +20,14 @@ export default {
components: {LliaoPgd},
data(){
return {
- title:'理 料 作 业 派 工',
+ title:'划 线 作 业 派 工',
width:0,
height:0,
stage:null,
layer:null,
pgdGroup:null,
drawGd:null,
+ getCurrentWorker:null,
}
},
mounted() {
@@ -32,41 +35,34 @@ export default {
},
methods:{
initPgd(pgd={}){
- console.log(pgd)
const group=this.drawGd(pgd)
this.pgdGroup.add(group)
},
initDw(){
- new Promise(resolve => {
- return resolve([
- {name:'垛位1\n预览信息'},{name:'垛位2\n预览信息'},
- {name:'垛位3\n预览信息'},{name:'垛位4\n预览信息'},
- ])
- }).then(res=>{
- const {container,dw}=drawDw(this.width,this.height,res)
+ getYcldw().then(res=>{
+ const {container,dw}=drawDw(this.width,this.height)
const group=container()
this.layer.add(group)
- for (let i=0;i {
- return resolve([
- {name:'张三1'},{name:'张三2'},
- {name:'张三1'},{name:'张三2'},
- ])
- }).then(res=>{
- const {container,person}=workers(this.width,this.height,res)
- const group=container()
- this.layer.add(group)
+ getBzryList({resourcesCode:'4KB002'}).then(res=>{
+ const {container,person,getCurrentWorker}=workers(this.width,this.height)
+ this.getCurrentWorker=getCurrentWorker
+ const {layer,group}=container()
+ this.stage.add(layer)
- for (let i=0;i{
const {container,person}=workers(this.width,this.height)
const group=container()
- group.on('click touchstart',function (){
- that.currentWorker=person
- getPgd({field:'',jhrqField:'',user:that.currentWorker.userName}).then(res=>[
- that.pgd=res.data
- ])
- })
this.layer.add(group)
for (let i=0;i[
+ that.pgd=res.data
+ ])
+ })
group.add(worker)
}
})
diff --git a/src/views/zyjhzx/pwanpgong/comps/PwanPgd.vue b/src/views/zyjhzx/pwanpgong/comps/PwanPgd.vue
index a9af05d..56131f3 100644
--- a/src/views/zyjhzx/pwanpgong/comps/PwanPgd.vue
+++ b/src/views/zyjhzx/pwanpgong/comps/PwanPgd.vue
@@ -5,7 +5,7 @@