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/jhzx/sygdCX.vue b/src/views/jhzx/sygdCX.vue index fbd6a33..358693a 100644 --- a/src/views/jhzx/sygdCX.vue +++ b/src/views/jhzx/sygdCX.vue @@ -431,11 +431,10 @@ export default { return } getSygdList(this.queryParam).then((res) => { - this.list = res.data.list + this.list = res.data if (this.$refs.xGrid) { this.$refs.xGrid.loadData(this.list) } - }) }, tj(){ 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/kban/comps/GxChanLiang.vue b/src/views/kban/comps/GxChanLiang.vue index 6838fac..6228420 100644 --- a/src/views/kban/comps/GxChanLiang.vue +++ b/src/views/kban/comps/GxChanLiang.vue @@ -42,9 +42,9 @@ export default { methods: { async getData() { const res=await getGkjhwcqk() - const {计划, 理料, 划线, 切割,预配盘} = this.createData(res.data) + const {计划, 抛丸,理料, 划线, 切割} = this.createData(res.data) this.show = false - this.cards = [计划, 理料, 划线, 切割,预配盘] + this.cards = [计划, 抛丸,理料, 划线, 切割] this.show = true }, clear(){ @@ -284,8 +284,8 @@ export default { color: ['#03d3ec'] } }, - "预配盘": { - title: '预配盘', + "抛丸": { + title: '抛丸', total: { number: [0], content: '{nt}', @@ -347,13 +347,14 @@ export default { let totalZl=0 for (const item of list) { totalZl+=(item.bcshzl/1000)||0 - if (item.zt==='11'){ - if (!!item.sljhrq){ - data.计划.total.number[0]+=1 - data.计划.num.number[0]+=(item.bcshzl/1000)||0 - } + if (item.zt>='2'){ + data.计划.total.number[0]+=1 + data.计划.num.number[0]+=(item.bcshzl/1000)||0 + } + if (item.zt>='22'&&!!item.qgfkrq){ + data.抛丸.total.number[0]+=1 + data.抛丸.num.number[0]+=(item.bcshzl/1000)||0 } - if (item.zt>='42'&&!!item.llfkrq){ data.理料.total.number[0]+=1 data.理料.num.number[0]+=(item.bcshzl/1000)||0 @@ -366,27 +367,30 @@ export default { data.切割.total.number[0]+=1 data.切割.num.number[0]+=(item.bcshzl/1000)||0 } - } - let d1=data.计划.num.number[0]/totalZl*100 - d1=d1>0&&d1<1?1:d1 - data.计划.ring.series[0].data[0].value=parseFloat(d1.toFixed(2)) - let d3=data.理料.num.number[0]/totalZl*100 - d3=d3>0&&d3<1?1:d3 - data.理料.ring.series[0].data[0].value=parseFloat(d3.toFixed(2)) + if (totalZl!==0){ + let d1=data.计划.num.number[0]/totalZl*100 + d1=d1>0&&d1<1?1:d1 + data.计划.ring.series[0].data[0].value=parseFloat(d1.toFixed(2)) - let d4=data.划线.num.number[0]/totalZl*100 - d4=d4>0&&d4<1?1:d4 - data.划线.ring.series[0].data[0].value=parseFloat(d4.toFixed(2)) + let d3=data.理料.num.number[0]/totalZl*100 + d3=d3>0&&d3<1?1:d3 + data.理料.ring.series[0].data[0].value=parseFloat(d3.toFixed(2)) - let d5=data.切割.num.number[0]/totalZl*100 - d5=d5>0&&d5<1?1:d5 - data.切割.ring.series[0].data[0].value=parseFloat(d5.toFixed(2)) + let d4=data.划线.num.number[0]/totalZl*100 + d4=d4>0&&d4<1?1:d4 + data.划线.ring.series[0].data[0].value=parseFloat(d4.toFixed(2)) + + let d5=data.切割.num.number[0]/totalZl*100 + d5=d5>0&&d5<1?1:d5 + data.切割.ring.series[0].data[0].value=parseFloat(d5.toFixed(2)) + + let d6=data.抛丸.num.number[0]/totalZl*100 + d6=d6>0&&d6<1?1:d6 + data.抛丸.ring.series[0].data[0].value=parseFloat(d5.toFixed(2)) + } - let d6=data.预配盘.num.number[0]/totalZl*100 - d6=d6>0&&d6<1?1:d6 - data.预配盘.ring.series[0].data[0].value=parseFloat(d5.toFixed(2)) return data }, }, diff --git a/src/views/kban/comps/MainCq.vue b/src/views/kban/comps/MainCq.vue index b50736e..6ea4917 100644 --- a/src/views/kban/comps/MainCq.vue +++ b/src/views/kban/comps/MainCq.vue @@ -3,6 +3,7 @@
出勤情况
总人数{{totalPerson}}人 + ,出勤率100%
diff --git a/src/views/kban/comps/MainYueChanLiang.vue b/src/views/kban/comps/MainYueChanLiang.vue index 18755f7..4aa4152 100644 --- a/src/views/kban/comps/MainYueChanLiang.vue +++ b/src/views/kban/comps/MainYueChanLiang.vue @@ -20,7 +20,7 @@ export default { show:false, dun:0, config: { - data: [], + data: [0], shape: 'round', waveHeight: 25, waveNum: 2 @@ -40,6 +40,7 @@ export default { methods:{ getData(){ getJhwcqk().then(res=>{ + console.log(res.data) this.show=false let total=0 for (const item of res.data) { @@ -49,7 +50,8 @@ export default { total+=item.t||0 } const point=(this.dun/total*100).toFixed(2) - this.config.data=[point] + console.log(point) + this.config.data[0]=point this.show=true }) }, 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 @@