diff --git a/src/views/zyjhzx/components/GdhInput.vue b/src/views/zyjhzx/components/GdhInput.vue new file mode 100644 index 0000000..7629175 --- /dev/null +++ b/src/views/zyjhzx/components/GdhInput.vue @@ -0,0 +1,42 @@ + + + + + diff --git a/src/views/zyjhzx/hxianfkui/comps/HxianPgd.vue b/src/views/zyjhzx/hxianfkui/comps/HxianPgd.vue index 69332b6..7249904 100644 --- a/src/views/zyjhzx/hxianfkui/comps/HxianPgd.vue +++ b/src/views/zyjhzx/hxianfkui/comps/HxianPgd.vue @@ -85,8 +85,68 @@ export default { this.gridOptions=options this.gridOptions.columns=columns this.zyq=this.$route.query.zyq + EventBus.$on('gdh', item=>{ + this.gdhFk(item.gdh) + }) }, 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}) { const worker = this.$props.worker() if (!worker) { diff --git a/src/views/zyjhzx/hxianfkui/index.vue b/src/views/zyjhzx/hxianfkui/index.vue index 35ad2fc..5731c70 100644 --- a/src/views/zyjhzx/hxianfkui/index.vue +++ b/src/views/zyjhzx/hxianfkui/index.vue @@ -5,6 +5,7 @@ + @@ -22,10 +23,11 @@ import HxianPgd from "@/views/zyjhzx/hxianfkui/comps/HxianPgd.vue"; import ZyjhSelectComp from "@/views/zyjhzx/components/SelectComp.vue"; import TipsComp from "@/views/zyjhzx/components/TipsComp.vue"; import Drawer from "@/views/zyjhzx/components/Drawer.vue"; +import GdhInput from "@/views/zyjhzx/components/GdhInput.vue"; export default { name:'PWanFKui', - components: {Drawer, TipsComp, ZyjhSelectComp, HxianPgd}, + components: {GdhInput, Drawer, TipsComp, ZyjhSelectComp, HxianPgd}, data(){ return { title:'划 线 作 业 报 工', diff --git a/src/views/zyjhzx/qgefkui/comps/QgePgd.vue b/src/views/zyjhzx/qgefkui/comps/QgePgd.vue index 8518366..96dfc12 100644 --- a/src/views/zyjhzx/qgefkui/comps/QgePgd.vue +++ b/src/views/zyjhzx/qgefkui/comps/QgePgd.vue @@ -91,8 +91,72 @@ export default { this.gridOptions = options this.gridOptions.columns = columns this.zyq=this.$route.query.zyq + EventBus.$on('gdh', item=>{ + this.gdhFk(item.gdh) + }) }, 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){ let ycldwInfo=null for (const dw of this.dw) { diff --git a/src/views/zyjhzx/qgefkui/index.vue b/src/views/zyjhzx/qgefkui/index.vue index 7227461..108054b 100644 --- a/src/views/zyjhzx/qgefkui/index.vue +++ b/src/views/zyjhzx/qgefkui/index.vue @@ -5,6 +5,7 @@ + @@ -22,10 +23,11 @@ import QgePgd from "@/views/zyjhzx/qgefkui/comps/QgePgd.vue"; import ZyjhSelectComp from "@/views/zyjhzx/components/SelectComp.vue"; import TipsComp from "@/views/zyjhzx/components/TipsComp.vue"; import Drawer from "@/views/zyjhzx/components/Drawer.vue"; +import GdhInput from "@/views/zyjhzx/components/GdhInput.vue"; export default { name: 'QGeFKui', - components: {Drawer, TipsComp, ZyjhSelectComp, QgePgd}, + components: {GdhInput, Drawer, TipsComp, ZyjhSelectComp, QgePgd}, data() { return { title: '切 割 作 业 报 工',