1.增加扫码枪扫码报工功能

master
董哲奇 2 months ago
parent 99384f511d
commit 1e6be58e08

@ -0,0 +1,42 @@
<template>
<VxeInput id="gdh" ref="gdhRef" v-model="gdh" placeholder="工单号" @change="gdhChange" clearable />
</template>
<script>
import {EventBus} from "@/event-bus";
export default {
name: 'GdhInput',
data(){
return {
gdh:'',
}
},
mounted(){
this.$refs.gdhRef.focus();
EventBus.$on('removeGdh', ()=>{
this.gdh=''
})
},
methods: {
gdhChange(){
if (this.gdh.length===10){
this.$nextTick(()=>{
EventBus.$emit('gdh', {
gdh:this.gdh
})
})
}
}
}
}
</script>
<style scoped>
#gdh{
width:200px;
position: absolute;
top:8px;
right:30px;
}
</style>

@ -85,8 +85,68 @@ export default {
this.gridOptions=options this.gridOptions=options
this.gridOptions.columns=columns this.gridOptions.columns=columns
this.zyq=this.$route.query.zyq this.zyq=this.$route.query.zyq
EventBus.$on('gdh', item=>{
this.gdhFk(item.gdh)
})
}, },
methods:{ methods:{
gdhFk(gdh){
const worker = this.$props.worker()
const sbbm=this.$props.getSelectSbbm()
if (!sbbm){
this.$message.warning('请选择设备')
this.$refs.hxPgd.clearCheckboxRow()
setTimeout(()=>{
EventBus.$emit('removeGdh', {})
},500)
return
}
if (!worker) {
this.$message.warning('请选择操作人')
this.$refs.hxPgd.clearCheckboxRow()
setTimeout(()=>{
EventBus.$emit('removeGdh', {})
},500)
return;
}
let bgFlag=false
for (const item of this.gridOptions.data) {
if (item.djh===gdh){
const tmpArr = []
const data = {
id: item.id,
hxfkry: worker.userCode,
zt:item.zt,
hxsb:sbbm
}
tmpArr.push(data)
let ycldwInfo=null
for (const dw of this.dw) {
for (const info of dw.list) {
if (item.dcCh===info.czbh&&item.dcPl===info.pl&&item.dcFd===info.fd&&item.tzbh===info.tlth){
ycldwInfo=info
break
}
}
}
const data1 = {
type: this.type,
field: 'hxfkrq',
zxZtName: 'HXFK',
list: tmpArr,
ycldwInfo:ycldwInfo
}
zx(data1)
bgFlag=true
}
}
if (!bgFlag){
this.$message.warning('工单号未找到')
setTimeout(()=>{
EventBus.$emit('removeGdh', {})
},500)
}
},
checkboxAll({checked}) { checkboxAll({checked}) {
const worker = this.$props.worker() const worker = this.$props.worker()
if (!worker) { if (!worker) {

@ -5,6 +5,7 @@
<ZyjhSelectComp id="selectComp" ref="selRef" @initWorkers="initWorkers"/> <ZyjhSelectComp id="selectComp" ref="selRef" @initWorkers="initWorkers"/>
<TipsComp /> <TipsComp />
<Drawer ref="drawer"/> <Drawer ref="drawer"/>
<GdhInput />
</div> </div>
</template> </template>
@ -22,10 +23,11 @@ import HxianPgd from "@/views/zyjhzx/hxianfkui/comps/HxianPgd.vue";
import ZyjhSelectComp from "@/views/zyjhzx/components/SelectComp.vue"; import ZyjhSelectComp from "@/views/zyjhzx/components/SelectComp.vue";
import TipsComp from "@/views/zyjhzx/components/TipsComp.vue"; import TipsComp from "@/views/zyjhzx/components/TipsComp.vue";
import Drawer from "@/views/zyjhzx/components/Drawer.vue"; import Drawer from "@/views/zyjhzx/components/Drawer.vue";
import GdhInput from "@/views/zyjhzx/components/GdhInput.vue";
export default { export default {
name:'PWanFKui', name:'PWanFKui',
components: {Drawer, TipsComp, ZyjhSelectComp, HxianPgd}, components: {GdhInput, Drawer, TipsComp, ZyjhSelectComp, HxianPgd},
data(){ data(){
return { return {
title:'划 线 作 业 报 工', title:'划 线 作 业 报 工',

@ -91,8 +91,72 @@ export default {
this.gridOptions = options this.gridOptions = options
this.gridOptions.columns = columns this.gridOptions.columns = columns
this.zyq=this.$route.query.zyq this.zyq=this.$route.query.zyq
EventBus.$on('gdh', item=>{
this.gdhFk(item.gdh)
})
}, },
methods: { methods: {
gdhFk(gdh){
const worker = this.$props.worker()
const sbbm=this.$props.getSelectSbbm()
if (!sbbm){
this.$message.warning('请选择设备')
this.$refs.qgpgd.clearCheckboxRow()
setTimeout(()=>{
EventBus.$emit('removeGdh', {})
},500)
return
}
if (!worker) {
this.$message.warning('请选择操作人')
this.$refs.qgpgd.clearCheckboxRow()
setTimeout(()=>{
EventBus.$emit('removeGdh', {})
},500)
return;
}
let bgFlag=false
for (const item of this.gridOptions.data) {
if (item.djh===gdh){
const tmpArr = []
const data = {
id: item.id,
qgfkry: worker.userCode,
zt: item.zt,
dcCh:item.dcCh,
dcPl:item.dcPl,
tzbh:item.tzbh,
sllph:item.sllph,
qgsb:sbbm
}
tmpArr.push(data)
let ycldwInfo=null
for (const dw of this.dw) {
for (const info of dw.list) {
if (item.dcCh===info.czbh&&item.dcPl===info.pl&&item.dcFd===info.fd&&item.tzbh===info.tlth){
ycldwInfo=info
break
}
}
}
const data1 = {
type: this.type,
field: 'qgfkrq',
zxZtName: 'QGFK',
list: tmpArr,
ycldwInfo: ycldwInfo
}
zx(data1)
bgFlag=true
}
}
if (!bgFlag){
this.$message.warning('工单号未找到')
setTimeout(()=>{
EventBus.$emit('removeGdh', {})
},500)
}
},
baogong(tmpArr,data){ baogong(tmpArr,data){
let ycldwInfo=null let ycldwInfo=null
for (const dw of this.dw) { for (const dw of this.dw) {

@ -5,6 +5,7 @@
<ZyjhSelectComp id="selectComp" ref="selRef" @initWorkers="initWorkers" @clear="clear"/> <ZyjhSelectComp id="selectComp" ref="selRef" @initWorkers="initWorkers" @clear="clear"/>
<TipsComp /> <TipsComp />
<Drawer ref="drawer"/> <Drawer ref="drawer"/>
<GdhInput />
</div> </div>
</template> </template>
@ -22,10 +23,11 @@ import QgePgd from "@/views/zyjhzx/qgefkui/comps/QgePgd.vue";
import ZyjhSelectComp from "@/views/zyjhzx/components/SelectComp.vue"; import ZyjhSelectComp from "@/views/zyjhzx/components/SelectComp.vue";
import TipsComp from "@/views/zyjhzx/components/TipsComp.vue"; import TipsComp from "@/views/zyjhzx/components/TipsComp.vue";
import Drawer from "@/views/zyjhzx/components/Drawer.vue"; import Drawer from "@/views/zyjhzx/components/Drawer.vue";
import GdhInput from "@/views/zyjhzx/components/GdhInput.vue";
export default { export default {
name: 'QGeFKui', name: 'QGeFKui',
components: {Drawer, TipsComp, ZyjhSelectComp, QgePgd}, components: {GdhInput, Drawer, TipsComp, ZyjhSelectComp, QgePgd},
data() { data() {
return { return {
title: '切 割 作 业 报 工', title: '切 割 作 业 报 工',

Loading…
Cancel
Save