1.取消月度计划审核生成工单号

2.优化处理结果显示
master
董哲奇 5 months ago
parent 7607499986
commit 98b462a7d5

@ -4,6 +4,7 @@
<script> <script>
import * as Tips from './tips' import * as Tips from './tips'
import {EventBus} from "@/event-bus";
export default { export default {
name: "TipsComp", name: "TipsComp",
@ -29,6 +30,9 @@ export default {
}, },
mounted(){ mounted(){
this.initKonvaStage() this.initKonvaStage()
EventBus.$on('error', item => {
this.onMsg(item.msg)
})
}, },
created(){ created(){
this.deviceId=this.$route.query.deviceId||'' this.deviceId=this.$route.query.deviceId||''
@ -46,6 +50,10 @@ export default {
// },10000) // },10000)
// } // }
let msg let msg
if (data.success&&data.data.deviceId===this.deviceId){
msg=`处理成功`
}
if (data.code===3000&&data.msg.deviceId===this.deviceId){ if (data.code===3000&&data.msg.deviceId===this.deviceId){
msg=`识别结果:${data.msg.orderNumber}` msg=`识别结果:${data.msg.orderNumber}`
} }

@ -6,6 +6,7 @@
import { VXETable } from 'vxe-table' import { VXETable } from 'vxe-table'
import paoWanPgdConfig from './pgdTable' import paoWanPgdConfig from './pgdTable'
import {getDw, getForemanByWorker, getPgd, getPgd2, getYdjhByZtOrForeman, zx} from "@/api/zyjh"; import {getDw, getForemanByWorker, getPgd, getPgd2, getYdjhByZtOrForeman, zx} from "@/api/zyjh";
import {EventBus} from "@/event-bus";
export default { export default {
name:'HxianPgd', name:'HxianPgd',
@ -44,7 +45,7 @@ export default {
this.$message.warning('短号有重复,请使用全工单号重新派工!!!') this.$message.warning('短号有重复,请使用全工单号重新派工!!!')
return return
} }
console.log(this.list) let errorFlag=true
for (const item of this.list) { for (const item of this.list) {
if (item.djh===data.msg.orderNumber||item.djh.slice(-djhWhLengh)===data.msg.orderNumber){ if (item.djh===data.msg.orderNumber||item.djh.slice(-djhWhLengh)===data.msg.orderNumber){
const tmpArr=[{ const tmpArr=[{
@ -53,9 +54,17 @@ export default {
zt:item.zt zt:item.zt
}] }]
this.baogong(tmpArr,item) this.baogong(tmpArr,item)
errorFlag=false
break break
} }
} }
if (errorFlag){
setTimeout(()=>{
EventBus.$emit('error', {
msg:'识别失败'
})
},3000)
}
} }
}, },
created(){ created(){

@ -6,6 +6,7 @@
import { VXETable } from 'vxe-table' import { VXETable } from 'vxe-table'
import paoWanPgdConfig from './pgdTable' import paoWanPgdConfig from './pgdTable'
import {bgControl, getDw, getPgd, getPgd2, getYdjhByZt, pdfList, pgWithForeman, zx} from "@/api/zyjh"; import {bgControl, getDw, getPgd, getPgd2, getYdjhByZt, pdfList, pgWithForeman, zx} from "@/api/zyjh";
import {EventBus} from "@/event-bus";
export default { export default {
name:'HxianPgd', name:'HxianPgd',
@ -41,14 +42,23 @@ export default {
this.$message.warning('短号有重复,请使用完整工单号重新派工!!!') this.$message.warning('短号有重复,请使用完整工单号重新派工!!!')
return return
} }
let errorFlag=true
for (const item of this.list) { for (const item of this.list) {
console.log(item.plxh?.slice(-djhWhLengh)) console.log(item.plxh?.slice(-djhWhLengh))
if (item.plxh===data.msg.orderNumber||item.plxh?.slice(-djhWhLengh)===data.msg.orderNumber){ if (item.plxh===data.msg.orderNumber||item.plxh?.slice(-djhWhLengh)===data.msg.orderNumber){
console.log(item) console.log(item)
this.paigong0(item) this.paigong0(item)
errorFlag=false
break break
} }
} }
if (errorFlag){
setTimeout(()=>{
EventBus.$emit('error', {
msg:'识别失败'
})
},3000)
}
} }
}, },
created(){ created(){
@ -126,7 +136,10 @@ export default {
zt:'42' zt:'42'
} }
const tmpArr=[data] const tmpArr=[data]
pgWithForeman(tmpArr).then(()=>{ pgWithForeman(tmpArr).then((res)=>{
if (res.success){
this.$message.success('处理成功')
}
this.initData() this.initData()
}) })
}, },

@ -6,6 +6,7 @@
import { VXETable } from 'vxe-table' import { VXETable } from 'vxe-table'
import paoWanPgdConfig from './pgdTable' import paoWanPgdConfig from './pgdTable'
import {getDw, getForeman, getForemanByWorker, getPgd, getYcldw, getYdjhByZtOrForeman, zx} from "@/api/zyjh"; import {getDw, getForeman, getForemanByWorker, getPgd, getYcldw, getYdjhByZtOrForeman, zx} from "@/api/zyjh";
import {EventBus} from "@/event-bus";
export default { export default {
name:'PwanPgd', name:'PwanPgd',
props:{ props:{
@ -54,6 +55,7 @@ export default {
this.$message.warning('短号有重复,请使用全工单号重新派工!!!') this.$message.warning('短号有重复,请使用全工单号重新派工!!!')
return return
} }
let errorFlag=true
for (const item of this.list) { for (const item of this.list) {
if (item.djh===data.msg.orderNumber||item.djh.slice(-djhWhLengh)===data.msg.orderNumber){ if (item.djh===data.msg.orderNumber||item.djh.slice(-djhWhLengh)===data.msg.orderNumber){
const tmpArr=[{ const tmpArr=[{
@ -62,9 +64,17 @@ export default {
zt:item.zt zt:item.zt
}] }]
this.baogong(tmpArr,item) this.baogong(tmpArr,item)
errorFlag=false
break break
} }
} }
if (errorFlag){
setTimeout(()=>{
EventBus.$emit('error', {
msg:'识别失败'
})
},3000)
}
} }
}, },
methods:{ methods:{

@ -6,6 +6,7 @@
import { VXETable } from 'vxe-table' import { VXETable } from 'vxe-table'
import paoWanPgdConfig from './pgdTable' import paoWanPgdConfig from './pgdTable'
import {getDw, getForemanByWorker, getPgd, getPgd2, getYdjhByZtOrForeman, zx} from "@/api/zyjh"; import {getDw, getForemanByWorker, getPgd, getPgd2, getYdjhByZtOrForeman, zx} from "@/api/zyjh";
import {EventBus} from "@/event-bus";
export default { export default {
name: 'QgePgd', name: 'QgePgd',
@ -46,6 +47,7 @@ export default {
this.$message.warning('短号有重复,请使用全工单号重新派工!!!') this.$message.warning('短号有重复,请使用全工单号重新派工!!!')
return return
} }
let errorFlag=true
for (const item of this.list) { for (const item of this.list) {
if (item.djh===data.msg.orderNumber||item.djh.slice(-djhWhLengh)===data.msg.orderNumber){ if (item.djh===data.msg.orderNumber||item.djh.slice(-djhWhLengh)===data.msg.orderNumber){
const tmpArr=[{ const tmpArr=[{
@ -54,9 +56,17 @@ export default {
zt:item.zt zt:item.zt
}] }]
this.baogong(tmpArr,item) this.baogong(tmpArr,item)
errorFlag=false
break break
} }
} }
if (errorFlag){
setTimeout(()=>{
EventBus.$emit('error', {
msg:'识别失败'
})
},3000)
}
} }
}, },
created() { created() {

@ -6,6 +6,7 @@
import { VXETable } from 'vxe-table' import { VXETable } from 'vxe-table'
import paoWanPgdConfig from './pgdTable' import paoWanPgdConfig from './pgdTable'
import {bgControl, getDw, getPgd, getPgd2, getYdjhByZt, pdfList, pgWithForeman, zx} from "@/api/zyjh"; import {bgControl, getDw, getPgd, getPgd2, getYdjhByZt, pdfList, pgWithForeman, zx} from "@/api/zyjh";
import {EventBus} from "@/event-bus";
export default { export default {
name:'QgePgd', name:'QgePgd',
@ -41,12 +42,21 @@ export default {
this.$message.warning('短号有重复,请使用完整工单号重新派工!!!') this.$message.warning('短号有重复,请使用完整工单号重新派工!!!')
return return
} }
let errorFlag=true
for (const item of this.list) { for (const item of this.list) {
if (item.plxh===data.msg.orderNumber||item.plxh?.slice(-djhWhLengh)===data.msg.orderNumber){ if (item.plxh===data.msg.orderNumber||item.plxh?.slice(-djhWhLengh)===data.msg.orderNumber){
this.paigong0(item) this.paigong0(item)
errorFlag=false
break break
} }
} }
if (errorFlag){
setTimeout(()=>{
EventBus.$emit('error', {
msg:'识别失败'
})
},3000)
}
} }
}, },
created(){ created(){
@ -148,6 +158,9 @@ export default {
// } // }
VXETable.modal.confirm('您确定派工吗?').then(res => { VXETable.modal.confirm('您确定派工吗?').then(res => {
res === 'confirm' && pgWithForeman(tmpArr).then(res=>{ res === 'confirm' && pgWithForeman(tmpArr).then(res=>{
EventBus.$emit('error', {
msg:'处理成功'
})
this.initData() this.initData()
}) })
}) })

@ -21,6 +21,7 @@ import {dict, getSljhPgd, getYcldw, shangLiao} from "@/api/zyjh";
import {getBzryList} from "@/api/sjzx/bzzGL"; import {getBzryList} from "@/api/sjzx/bzzGL";
import TipsComp from "@/views/zyjhzx/components/TipsComp.vue"; import TipsComp from "@/views/zyjhzx/components/TipsComp.vue";
import ZyjhSelectComp from "@/views/zyjhzx/components/SelectComp.vue"; import ZyjhSelectComp from "@/views/zyjhzx/components/SelectComp.vue";
import {EventBus} from "@/event-bus";
export default { export default {
name:'SLiao', name:'SLiao',
@ -66,7 +67,6 @@ export default {
}, },
sockets:{ sockets:{
zyjhzx(data){ zyjhzx(data){
if (this.deviceId!==data.msg.deviceId&&data.msg.actionType!=='开始报工'){ if (this.deviceId!==data.msg.deviceId&&data.msg.actionType!=='开始报工'){
return return
} }
@ -79,19 +79,17 @@ export default {
this.$message.warning('短号有重复,请使用全工单号重新派工!!!') this.$message.warning('短号有重复,请使用全工单号重新派工!!!')
return return
} }
console.log(this.currentDw,this.currentDwIndex)
if(!this.currentDw||this.currentDwIndex===-1){ if(!this.currentDw||this.currentDwIndex===-1){
this.$message.warning('请选择上料垛位') this.$message.warning('请选择上料垛位')
return; return;
} }
console.log(this.currentDw)
const currentWorker=this.getCurrentWorker() const currentWorker=this.getCurrentWorker()
if (!currentWorker){ if (!currentWorker){
this.$message.warning('请选择报工人') this.$message.warning('请选择报工人')
} }
let index=-1 let index=-1
let errorFlag=true
for (const item of this.list) { for (const item of this.list) {
index+=1 index+=1
if (item.djh===data.msg.orderNumber||item.djh?.slice(-djhWhLengh)===data.msg.orderNumber){ if (item.djh===data.msg.orderNumber||item.djh?.slice(-djhWhLengh)===data.msg.orderNumber){
@ -117,15 +115,24 @@ export default {
lph:item.sllph, lph:item.sllph,
nbsbm:item.nbsbm, nbsbm:item.nbsbm,
bfr:currentWorker.userCode, bfr:currentWorker.userCode,
type:'YCL' type:'YCL',
deviceId:this.deviceId
} }
shangLiao(data).then(res=>{ shangLiao(data).then(res=>{
this.list.splice(index,1) this.list.splice(index,1)
this.drawSljhItem(this.list) this.drawSljhItem(this.list)
}) })
errorFlag=false
break break
} }
} }
if (errorFlag){
setTimeout(()=>{
EventBus.$emit('error', {
msg:'识别失败'
})
},3000)
}
} }
}, },
methods:{ methods:{
@ -539,7 +546,7 @@ export default {
const {group}=initSearch() const {group}=initSearch()
this.layer.add(group) this.layer.add(group)
//this.search(this.$refs.sliaoSearch.getQueryParam()) this.search(this.$refs.sliaoSearch.getQueryParam())
const {layer:sljhLayer,group:sljhGroup}=sljh(this.width,this.height) const {layer:sljhLayer,group:sljhGroup}=sljh(this.width,this.height)
this.sljhGroup=sljhGroup this.sljhGroup=sljhGroup

Loading…
Cancel
Save