From a62d88a55a6f668d3c2eb7a742069ab79c36ae89 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, 29 Oct 2024 11:16:35 +0800
Subject: [PATCH] =?UTF-8?q?1.=E4=BC=98=E5=8C=96=E4=BD=9C=E4=B8=9A=E8=AE=A1?=
=?UTF-8?q?=E5=88=92=E6=89=A7=E8=A1=8C,=E8=B0=83=E6=95=B4=E7=90=86?=
=?UTF-8?q?=E6=96=99=E9=97=B4=E5=9E=9B=E4=BD=8D=E5=8F=8A=E6=98=BE=E7=A4=BA?=
=?UTF-8?q?=E5=86=85=E5=AE=B9=202.=E4=BF=AE=E6=94=B9pc=E7=AB=AF=E4=BD=9C?=
=?UTF-8?q?=E4=B8=9A=E8=AE=A1=E5=88=92=E6=89=A7=E8=A1=8C=E5=90=84=E5=B7=A5?=
=?UTF-8?q?=E5=BA=8F=E6=95=B0=E6=8D=AE=E6=9F=A5=E7=9C=8B=E9=80=BB=E8=BE=91?=
=?UTF-8?q?,=E4=BB=A5=E4=B8=8A=E9=81=93=E5=BA=8F=E5=AE=8C=E5=B7=A5?=
=?UTF-8?q?=E4=B8=BA=E4=BE=9D=E6=8D=AE=E4=B8=8B=E9=81=93=E5=BA=8F=E6=89=8D?=
=?UTF-8?q?=E8=83=BD=E7=9C=8B=E5=88=B0=E5=8F=AF=E6=93=8D=E4=BD=9C=E6=95=B0?=
=?UTF-8?q?=E6=8D=AE=203.=E4=BF=AE=E6=AD=A3=E4=B8=8A=E6=96=99=E7=90=86?=
=?UTF-8?q?=E6=96=99=E5=AE=8C=E6=88=90=E5=90=8E=E5=9E=9B=E4=BD=8D=E6=9C=AA?=
=?UTF-8?q?=E6=9B=B4=E6=96=B0=E7=9A=84bug?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/views/jhzx/dhqdWH.vue | 2 +-
src/views/jhzxgl/hxjhD.vue | 4 +-
src/views/jhzxgl/pwjhD.vue | 2 +-
src/views/jhzxgl/qgjhD.vue | 2 +-
src/views/jhzxgl/qmjhD.vue | 8 +-
src/views/zyjhzx/hxianfkui/comps/dw.js | 2 +-
src/views/zyjhzx/hxianpgong/comps/dw.js | 2 +-
src/views/zyjhzx/lliaofkui/comps/dw.js | 2 +-
src/views/zyjhzx/lliaofkui/index.vue | 205 +++++++++-----------
src/views/zyjhzx/lliaopgong/comps/dw.js | 2 +-
src/views/zyjhzx/pwanfkui/comps/PwanPgd.vue | 14 +-
src/views/zyjhzx/pwanfkui/comps/dw.js | 3 -
src/views/zyjhzx/pwanfkui/index.vue | 24 +--
src/views/zyjhzx/pwanpgong/index.vue | 12 +-
src/views/zyjhzx/qgefkui/comps/dw.js | 2 +-
src/views/zyjhzx/qgepgong/comps/dw.js | 2 +-
src/views/zyjhzx/sliao/index.vue | 3 +
17 files changed, 145 insertions(+), 146 deletions(-)
diff --git a/src/views/jhzx/dhqdWH.vue b/src/views/jhzx/dhqdWH.vue
index 92a0d09..4c959a6 100644
--- a/src/views/jhzx/dhqdWH.vue
+++ b/src/views/jhzx/dhqdWH.vue
@@ -94,7 +94,7 @@ import {endLoading, startLoading} from "@/utils";
import {Message} from "element-ui";
import ProjectSelect from "@/components/ProjectSelect/index.vue";
export default {
- name: "dhqdWH",
+ name: "DhqdWH",
components: {ProjectSelect},
data() {
return {
diff --git a/src/views/jhzxgl/hxjhD.vue b/src/views/jhzxgl/hxjhD.vue
index 1cafdc8..3fc4143 100644
--- a/src/views/jhzxgl/hxjhD.vue
+++ b/src/views/jhzxgl/hxjhD.vue
@@ -200,7 +200,7 @@ export default {
field:'',
user:'',
jhrqField:'',
- zt:'11',
+ zt:'42',
qgkw:''
},
statusOptions: [
@@ -209,7 +209,7 @@ export default {
label: "已打印",
},
{
- value: "32",
+ value: "42",
label: "未派工",
},
{
diff --git a/src/views/jhzxgl/pwjhD.vue b/src/views/jhzxgl/pwjhD.vue
index 0a4c993..0da62a4 100644
--- a/src/views/jhzxgl/pwjhD.vue
+++ b/src/views/jhzxgl/pwjhD.vue
@@ -202,7 +202,7 @@ export default {
field:'',
user:'',
jhrqField:'',
- zt:'11',
+ zt:'21',
qgkw:''
},
zyqs:[],
diff --git a/src/views/jhzxgl/qgjhD.vue b/src/views/jhzxgl/qgjhD.vue
index 976c7ff..25288f4 100644
--- a/src/views/jhzxgl/qgjhD.vue
+++ b/src/views/jhzxgl/qgjhD.vue
@@ -192,7 +192,7 @@ export default {
field:'',
user:'',
jhrqField:'',
- zt:'11',
+ zt:'42',
ztHx:'52'
},
zyqs:[],
diff --git a/src/views/jhzxgl/qmjhD.vue b/src/views/jhzxgl/qmjhD.vue
index 2d69d36..4d2bcf0 100644
--- a/src/views/jhzxgl/qmjhD.vue
+++ b/src/views/jhzxgl/qmjhD.vue
@@ -205,18 +205,18 @@ export default {
pl:'',
fd:'',
fkyy:'',
- zt:'01',
+ zt:'62',
tlth:'',
'lx':'q',
qgkw:''
},
statusOptions: [
{
- value: "01",
- label: "编制",
+ value: "62",
+ label: "未派工",
},
{
- value: "02",
+ value: "82",
label: "派工",
},
{
diff --git a/src/views/zyjhzx/hxianfkui/comps/dw.js b/src/views/zyjhzx/hxianfkui/comps/dw.js
index 7e37b51..b1485da 100644
--- a/src/views/zyjhzx/hxianfkui/comps/dw.js
+++ b/src/views/zyjhzx/hxianfkui/comps/dw.js
@@ -130,7 +130,7 @@ export default function (width,height,callback){
width: width,
height: height,
fill:'white',
- text:`${formatName()}\n${item.list.length}张`,
+ text:`${item.name}\n${item.list.length}张`,
align:'center',
verticalAlign:'middle',
fontSize:14
diff --git a/src/views/zyjhzx/hxianpgong/comps/dw.js b/src/views/zyjhzx/hxianpgong/comps/dw.js
index df7cf7c..a882b9b 100644
--- a/src/views/zyjhzx/hxianpgong/comps/dw.js
+++ b/src/views/zyjhzx/hxianpgong/comps/dw.js
@@ -89,7 +89,7 @@ export default function (width,height){
width: width,
height: height,
fill:'white',
- text:`${formatName()}\n${item.list.length}张`,
+ text:`${item.name}\n${item.list.length}张`,
align:'center',
verticalAlign:'middle',
fontSize:14
diff --git a/src/views/zyjhzx/lliaofkui/comps/dw.js b/src/views/zyjhzx/lliaofkui/comps/dw.js
index e2dd131..b40ed94 100644
--- a/src/views/zyjhzx/lliaofkui/comps/dw.js
+++ b/src/views/zyjhzx/lliaofkui/comps/dw.js
@@ -123,7 +123,7 @@ export default function (width,height,callback){
width: width,
height: height,
fill:'white',
- text:`${formatName()}\n${item.list.length}张`,
+ text:`${item.name}\n${item.list.length}张`,
align:'center',
verticalAlign:'middle',
fontSize:14
diff --git a/src/views/zyjhzx/lliaofkui/index.vue b/src/views/zyjhzx/lliaofkui/index.vue
index b5255e8..2fcaa88 100644
--- a/src/views/zyjhzx/lliaofkui/index.vue
+++ b/src/views/zyjhzx/lliaofkui/index.vue
@@ -15,7 +15,7 @@ import drawDw from './comps/dw'
import drawPgd from './comps/pgd'
import baifang from "./comps/baifang";
import {sljh} from "@/views/zyjhzx/lliaofkui/comps/sljh";
-import {getPgd,getPgd2, getYcldw, shangLiao} from "@/api/zyjh";
+import {bgControl, getPgd, getPgd2, getYcldw, shangLiao} from "@/api/zyjh";
import {getBzryList} from "@/api/sjzx/bzzGL";
import ZyjhSelectComp from "@/views/zyjhzx/components/SelectComp.vue";
import TipsComp from "@/views/zyjhzx/components/TipsComp.vue";
@@ -65,6 +65,10 @@ export default {
}
},
mounted() {
+ Array.prototype.r = function(str){
+ const [start,end]=str.split(':').map(Number);
+ return this.slice(start, end);
+ }
this.$socket.open()
this.wsSubscribe()
this.initKonvaStage();
@@ -88,40 +92,41 @@ export default {
let index=0
for (const item of this.sljhItemList) {
if (item.djh===data.djh||item.djh.slice(-djhWhLengh)===data.msg.orderNumber){
- if (!!this.currentDw.tzbh&&item.kw===this.currentDw.tzbh){
- const tmpZxData={
- id:item.id,
- lldw:this.currentDw.id,
- llcs:this.dw[this.currentDwIndex].list.length+1,
- llfkry:this.getCurrentWorker()?.userCode
- }
- const data={
- ydjh:tmpZxData,
- ydid:item.id,
- dwId:this.currentDw.id,
- ceng:this.dw[this.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:this.currentWorker?.userCode,
- type:'LLJ'
- }
+ // if (!!this.currentDw.tzbh&&item.kw===this.currentDw.tzbh){
+ //
+ // }else{
+ // this.$message.warning(`理料垛位错误,请放入${this.kwNameFormat(item.kw)}所在垛位`)
+ // }
+ const tmpZxData={
+ id:item.id,
+ lldw:this.currentDw.id,
+ llcs:this.dw[this.currentDwIndex].list.length+1,
+ llfkry:this.getCurrentWorker()?.userCode
+ }
+ const data={
+ ydjh:tmpZxData,
+ ydid:item.id,
+ dwId:this.currentDw.id,
+ ceng:this.dw[this.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:this.currentWorker?.userCode,
+ type:'LLJ'
+ }
- shangLiao(data).then(res=>{})
+ shangLiao(data).then(res=>{})
- this.sljhItemList.splice(index,1)
- this.sljhGroup.destroyChildren()
- this.drawSljhItem(this.sljhItemList)
- }else{
- this.$message.warning(`理料垛位错误,请放入${this.kwNameFormat(item.kw)}所在垛位`)
- }
+ this.sljhItemList.splice(index,1)
+ this.sljhGroup.destroyChildren()
+ this.drawSljhItem(this.sljhItemList.r('0:20'))
break
}
index++
@@ -140,43 +145,9 @@ export default {
} else {
this.dw[data.dwId].list.push(data)
}
+ this.initSljhItem()
this.initDw()
})
- // this.sockets.subscribe('zyjhzx', data => {
- // if (this.zt===data.zt){
- // const item=data.zyjh
- // let dwId=0
- // let dwCeng=0
- // for (const dw of this.dw) {
- // if(dw.tzbh===data.zyjh.kw){
- // dwId=dw.dwId
- // dwCeng=dw.list.length
- // }
- // }
- // const tmp={
- // ydjh:item,
- // dwId:dwId,
- // ceng:dwCeng+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:data.zyjh.llry,
- // type:'LLJ'
- // }
- //
- // shangLiao(tmp).then(res=>{})
- //
- // }else{
- // this.$message.error(`工单号错误:${data.gdh}`)
- // }
- // })
},
initPgd(pgd={}){
const group=this.drawGd(pgd)
@@ -247,47 +218,48 @@ export default {
const maxY=y+that.height*0.8-20
if(thisX>=x&&thisY>=y&&thisX<=maxX&&thisY<=maxY){
const item=this.getAttr('item')
- 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'
- }
+ // if (!!that.currentDw.tzbh&&item.kw===that.currentDw.tzbh){
+ //
+ // }else{
+ // that.$message.warning(`理料跨位错误,请放入${that.kwNameFormat(item.kw)}所在垛位`)
+ // this.remove()
+ // _that.visible(true)
+ // }
+ 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)
- }else{
- that.$message.warning(`理料跨位错误,请放入${that.kwNameFormat(item.kw)}所在垛位`)
- this.remove()
- _that.visible(true)
- }
+ that.sljhItemList.splice(this.getAttr('index'),1)
+ that.sljhGroup.destroyChildren()
+ that.drawSljhItem(this.sljhItemList.r('0:20'))
}else{
this.remove()
_that.visible(true)
@@ -359,10 +331,25 @@ export default {
})
},
initSljhItem(){
- getPgd2({field:'llfkry'}).then(res=>{
- this.sljhItemList=res.data
- this.drawSljhItem(res.data)
+ bgControl({}).then(res=>{
+ const gx=res.data||'1'
+ if (gx==='1'){
+ const data={
+ zt:'32',
+ }
+ getPgd(data).then(res => {
+ this.sljhItemList=res.data
+ this.drawSljhItem(this.sljhItemList.r('0:20'))
+ })
+ }
+ if (gx==='0'){
+ getPgd2({field:'llfkry'}).then(res=>{
+ this.sljhItemList=res.data
+ this.drawSljhItem(this.sljhItemList.r('0:20'))
+ })
+ }
})
+
},
initKonvaStage(){
this.width=this.$refs.pwpg.clientWidth
diff --git a/src/views/zyjhzx/lliaopgong/comps/dw.js b/src/views/zyjhzx/lliaopgong/comps/dw.js
index 3018130..728e4ed 100644
--- a/src/views/zyjhzx/lliaopgong/comps/dw.js
+++ b/src/views/zyjhzx/lliaopgong/comps/dw.js
@@ -89,7 +89,7 @@ export default function (width,height){
width: width,
height: height,
fill:'white',
- text:`${formatName()}\n${item.list.length}张`,
+ text:`${item.name}\n${item.list.length}张`,
align:'center',
verticalAlign:'middle',
fontSize:14
diff --git a/src/views/zyjhzx/pwanfkui/comps/PwanPgd.vue b/src/views/zyjhzx/pwanfkui/comps/PwanPgd.vue
index bf280fa..6e6a601 100644
--- a/src/views/zyjhzx/pwanfkui/comps/PwanPgd.vue
+++ b/src/views/zyjhzx/pwanfkui/comps/PwanPgd.vue
@@ -1,5 +1,5 @@
-
+