1.各种调整

master
董哲奇 5 months ago
parent 539f778774
commit 4786a5d42d

@ -97,7 +97,7 @@ Object.keys(filters).forEach(key => {
})
Vue.use(new VueSocketIO({
debug: false,
debug: true,
connection: process.env.VUE_APP_WEBSOCKET, //
options: { autoConnect:false,path: "",transports: ['websocket', 'xhr-polling', 'jsonp-polling'], } //Optional options
}))

@ -142,6 +142,15 @@ export default {
tableColumn: [
{ type: "checkbox", width: "50", align: "center" },
{ type: "seq", width: "50", title: "序号", align: "center" },
{ field: 'zyq', title: '作业区', width: 120,formatter:['dictFormat','BMBM'],
editRender: {
name: "$select",
options: [],
props: { clearable: true },
},
filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
filterRender: { name: 'FilterCombination', },
},
{ field: 'tzbh', title: '套料图名称', width: 120,formatter:['dictFormat','QGKW'],
editRender: {
name: "$select",
@ -547,6 +556,13 @@ export default {
}).then((res) => {
const tableRef = this.$refs.tableRef;
if (params == "bmbm") {
const zyq=this.$refs.tableRef.getColumnByField('zyq');
const list=[]
res.data.forEach(item=>{
const data={label:item.bmsm,value:item.bm}
list.push(data)
})
zyq.editRender.options = list
//
// this.departmentOptions = res.data;
// const sbztText = tableRef.getColumnByField("szcs");
@ -751,7 +767,7 @@ export default {
rowspanMethod({row, _rowIndex, column, visibleData}) {
//vxe-grid :scroll-y="{enabled: false}"
//
let fields = ['tzbh'];//
let fields = ['zyq','tzbh'];//
const cellValue = row[column.property];//
if (cellValue && fields.includes(column.property)) {
const prevRow = visibleData[_rowIndex - 1];

@ -36,7 +36,7 @@ export default {
return
}
//
const djhWhLengh=3
const djhWhLengh=4
const tmpList=this.list.filter(item=>item.djh===data.msg.orderNumber||item.djh.slice(-djhWhLengh)===data.msg.orderNumber)
if (tmpList.length>1){
this.list=tmpList

@ -242,9 +242,9 @@ const baifang=function (option={}) {
x: 40,
y: 0,
width: imgSize,
height:40,
fill:'white',
text:`${item.wph||''},${item.wpgg}`,
height:30,
fill:'black',
text:`${item.tlth}\n${item.wph||''},${item.wpgg}`,
align:'center',
verticalAlign:'middle',
})
@ -257,7 +257,7 @@ const baifang=function (option={}) {
width: imgSize-20,
height:40,
fill:'white',
text:`${item.czbh},${item.pl},${item.fd}\n上料:${item.bfrq||''},切割:${item.qgjhrq||''}`,
text:`${item.czbh},${item.pl},${item.fd},工单号:${item.djh||''}\n上料:${item.bfrq||''},切割:${item.qgjhrq||''}`,
align:'center',
verticalAlign:'middle',
})

@ -25,6 +25,7 @@ export default function () {
return item.userName
}
}
return cellValue
}
const gdhFormat=function ({cellValue}){
if (cellValue){

@ -46,7 +46,7 @@ export default {
return
}
//
const djhWhLengh=3
const djhWhLengh=4
const tmpList=this.list.filter(item=>item.djh===data.msg.orderNumber||item.djh.slice(-djhWhLengh)===data.msg.orderNumber)
if (tmpList.length>1){
this.list=tmpList

@ -238,9 +238,9 @@ const baifang=function (option={}) {
x: 40,
y: 0,
width: imgSize,
height:40,
fill:'white',
text:`${item.wph||''},${item.wpgg}`,
height:30,
fill:'black',
text:`${item.tlth}\n${item.wph||''},${item.wpgg}`,
align:'center',
verticalAlign:'middle',
})
@ -253,7 +253,7 @@ const baifang=function (option={}) {
width: imgSize-20,
height:40,
fill:'white',
text:`${item.czbh},${item.pl},${item.fd}\n上料:${item.bfrq||''},切割:${item.qgjhrq||''}`,
text:`${item.czbh},${item.pl},${item.fd},工单号:${item.djh||''}\n上料:${item.bfrq||''},切割:${item.qgjhrq||''}`,
align:'center',
verticalAlign:'middle',
})

@ -56,8 +56,8 @@ export default function () {
{ type: 'checkbox', width: 40 },
{ type: 'seq',title:'序号', width: 60 },
{ field: 'djh',title:'派工单号', width: 120},
{field: 'slycldw', title: '垛位', width: 60,formatter: dwFormat},
{field: 'slyclcs', title: '层数', width: 60},
// {field: 'slycldw', title: '垛位', width: 60,formatter: dwFormat},
// {field: 'slyclcs', title: '层数', width: 60},
{field: 'dcCh', title: '船号', width: 80},
{field: 'dcPl', title: '批量', width: 80},
{field: 'wpgg', title: '材质', width: 80},

@ -55,6 +55,9 @@ export default {
worker:this.$props.worker().userCode,
list:this.gridOptions.data,
}
// aa(data).then(()=>{
//
// })
pwpg(data).then(res=>{
if (res.success){
this.export()

@ -89,6 +89,7 @@ export default function (_height=0) {
{field: 'ceng', title: '层数', width: 50},
{field: 'czbh', title: '船号', width: 80},
{field: 'pl', title: '批量', width: 50},
{field: 'djh', title: '工单号', width: 100},
{field: 'fd', title: '分段',width: 50,visible:false},
{field: 'tlth', title: '套料图号',width: 120},
{field: 'wph', title: '材质', width: 60,},

@ -7,7 +7,7 @@
<div id="pdf" class="pdf" :style="{height:height,overflowY:'auto'}" v-if="pdfShow">
<pdf v-for="i in numPages" :key="i" :page="i" :src="pdfUrl" />
</div>
<TipsComp />
<!-- <TipsComp />-->
<Drawer ref="drawer"/>
</div>
</template>

@ -38,7 +38,7 @@ export default {
return
}
//
const djhWhLengh=3
const djhWhLengh=4
const tmpList=this.list.filter(item=>item.djh===data.msg.orderNumber||item.djh.slice(-djhWhLengh)===data.msg.orderNumber)
if (tmpList.length>1){
this.list=tmpList

@ -232,9 +232,9 @@ const baifang=function (option={}) {
x: 40,
y: 0,
width: imgSize,
height:40,
fill:'white',
text:`${item.wph||''},${item.wpgg}`,
height:30,
fill:'black',
text:`${item.tlth}\n${item.wph||''},${item.wpgg}`,
align:'center',
verticalAlign:'middle',
})
@ -247,7 +247,7 @@ const baifang=function (option={}) {
width: imgSize-20,
height:40,
fill:'white',
text:`${item.czbh},${item.pl},${item.fd}\n上料:${item.bfrq||''},切割:${item.qgjhrq||''}`,
text:`${item.czbh},${item.pl},${item.fd},工单号:${item.djh||''}\n上料:${item.bfrq||''},切割:${item.qgjhrq||''}`,
align:'center',
verticalAlign:'middle',
})

@ -1,4 +1,5 @@
import Konva from "konva";
import {daoduo} from "@/api/zyjh";
const baifang=function (option={}) {
const width=option.width,height=option.height,image=require('@/assets/gb.png')
@ -77,7 +78,7 @@ const baifang=function (option={}) {
if(_index===0){
_index=this.getAttr('index')
}
this.zIndex(999)
this.zIndex(4)
const {y:thisY}=this.absolutePosition()
const dir=thisY-this.startPos.y>0?-40:40
@ -119,7 +120,6 @@ const baifang=function (option={}) {
for (const it of movedList) {
mList.push(it.getAttr('item'))
}
//todo 倒剁
const data={
id:item.id,
lastCeng:item.ceng,
@ -128,23 +128,22 @@ const baifang=function (option={}) {
duo:item.dwId,
movedList:mList
}
const element = slList.splice(index-1, 1)[0];
slList.splice(_index-1, 0, element);
this.setAttr('index',_index)
_index=0
handler(slList)
//todo 倒剁
// daoduo(data).then(res=>{
// if (res.success){
// const element = slList.splice(index-1, 1)[0];
// slList.splice(_index-1, 0, element);
// this.setAttr('index',_index)
// _index=0
// handler(slList)
// }else {
//
// }
// })
daoduo(data).then(res=>{
if (res.success){
const element = slList.splice(index-1, 1)[0];
slList.splice(_index-1, 0, element);
this.setAttr('index',_index)
_index=0
handler(slList)
}else {
}
})
})
const indexRect=new Konva.Rect({
@ -186,9 +185,9 @@ const baifang=function (option={}) {
x: 60,
y: 0,
width: imgSize,
height:40,
fill:'white',
text:`${item.wph||''},${item.wpgg}`,
height:30,
fill:'black',
text:`${item.tlth}\n${item.wph||''},${item.wpgg}`,
align:'center',
verticalAlign:'middle',
})
@ -201,7 +200,7 @@ const baifang=function (option={}) {
width: imgSize+40,
height:40,
fill:'white',
text:`${item.czbh},${item.pl},${item.fd}\n上料:${item.bfrq||''},切割计划日期:${item.qgjhrq||''}`,
text:`${item.czbh},${item.pl},${item.fd},工单号:${item.djh||''}\n上料:${item.bfrq||''},切割计划日期:${item.qgjhrq||''}`,
align:'center',
verticalAlign:'middle',
})
@ -212,7 +211,7 @@ const baifang=function (option={}) {
slGroup.destroyChildren()
for (let i = 1; i <= slList.length; i++) {
const item=slList[i-1]
gangban(i,item)
gangban(i,item,slList)
}
}

@ -54,6 +54,10 @@ const liliao=function (width,height,dw,callback) {
let selectedShape=null;
const getSelectedShape=function (){
return selectedShape;
}
const duowei=function (index,item){
const alignSize=3
const width=((_width-60)/alignSize),height=208
@ -131,7 +135,7 @@ const liliao=function (width,height,dw,callback) {
}
return {
container,duowei,getCurrentDw
container,duowei,getCurrentDw,getSelectedShape
}
}

@ -3,6 +3,7 @@
<div id="sliao" class="sliao" ref="sliao"></div>
<SliaoSearch ref="sliaoSearch" @search="search" :workers="workers"/>
<ZyjhSelectComp id="selectComp" ref="selRef" @initWorkers="initWorkers" @clear="clear"/>
<TipsComp />
</div>
</template>
@ -35,6 +36,7 @@ export default {
sljhGroup:null,
drawBaiFang:null,
ycldwGroup:null,
getSelectedShape:null,
canSl:false,
workerGroup:null,
getCurrentWorker:null,
@ -65,12 +67,12 @@ export default {
},
sockets:{
zyjhzx(data){
console.log(data)
if (this.deviceId!==data.msg.deviceId&&data.msg.actionType!=='开始报工'){
return
}
//
const djhWhLengh=3
const djhWhLengh=4
const tmpList=this.list.filter(item=>item.djh===data.msg.orderNumber||item.djh?.slice(-djhWhLengh)===data.msg.orderNumber)
if (tmpList.length>1){
this.list=tmpList
@ -141,10 +143,7 @@ export default {
this.dw[data.dwId].list.push(data)
}
this.initYcldw();
for (const item of this.list) {
}
// this.getSelectedShape()
})
this.sockets.subscribe('pwComplete', data => {
this.initYcldw()
@ -494,8 +493,9 @@ export default {
this.ycldwGroup.destroyChildren()
}
this.dw=res.data
const {container,getCurrentDw}= liliao(this.width,this.height,this.dw,this.initDwInfo)
const {container,getCurrentDw,getSelectedShape}= liliao(this.width,this.height,this.dw,this.initDwInfo)
const group=container()
this.getSelectedShape=getSelectedShape
this.ycldwGroup=group
this.layer.add(group)
})

Loading…
Cancel
Save