1.优化调整,修复bug

master
董哲奇 7 months ago
parent 243f4a77ba
commit eae2d8e3be

@ -43,6 +43,7 @@ export default {
this.$message.warning('短号有重复,请使用全工单号重新派工!!!') this.$message.warning('短号有重复,请使用全工单号重新派工!!!')
return return
} }
console.log(this.list)
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=[{
@ -64,7 +65,7 @@ export default {
}, },
methods:{ methods:{
checkboxAll({checked}) { checkboxAll({checked}) {
const worker = this.$props.worker const worker = this.$props.worker()
if (!worker) { if (!worker) {
this.$message.warning('请选择操作人') this.$message.warning('请选择操作人')
return; return;
@ -84,6 +85,7 @@ export default {
} }
}, },
baogong(tmpArr,data){ baogong(tmpArr,data){
console.log(312)
let ycldwInfo=null let ycldwInfo=null
for (const dw of this.dw) { for (const dw of this.dw) {
for (const info of dw.list) { for (const info of dw.list) {
@ -94,8 +96,9 @@ export default {
} }
} }
if (!ycldwInfo){ if (!ycldwInfo){
this.$message.warning(`理料垛位上板材与记录不符,需查验后再进行报工!`) ycldwInfo={}
return; // this.$message.warning(`,!`)
// return;
} }
zx({ zx({
field:'hxfkrq', field:'hxfkrq',
@ -110,47 +113,46 @@ export default {
}) })
}, },
fankgui(worker) { fankgui(worker) {
const list = this.$refs.hxPgd.getCheckboxRecords() VXETable.modal.confirm('您确定报工吗?').then(async res => {
const tmpArr = [] if (res === 'confirm') {
for (const item of list) { const list = this.$refs.hxPgd.getCheckboxRecords()
const data = { for (const item of list) {
id: item.id, const tmpArr = []
hxfkry: worker.userCode, const data = {
zt:item.zt id: item.id,
hxfkry: worker.userCode,
zt:item.zt
}
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
}
await zx(data1)
}
this.initData(this.$props.worker().userCode, '51')
} }
tmpArr.push(data)
}
let ycldwInfo=null
// for (const dw of this.dw) {
// for (const info of dw.list) {
// if (data.dcCh===info.czbh&&data.dcPl===info.pl&&data.dcFd===info.fd&&data.tzbh===info.tlth){
// ycldwInfo=info
// break
// }
// }
// }
if (!ycldwInfo){
ycldwInfo={}
}
const data = {
type: this.type,
field: 'hxfkrq',
zxZtName: 'HXFK',
list: tmpArr,
ycldwInfo:ycldwInfo
}
VXETable.modal.confirm('您确定报工吗?').then(res => {
res === 'confirm' && zx(data).then(res=>{
this.initData(this.$props.worker().userCode,'51')
})
}) })
}, },
initData(worker,zt){ initData(worker,zt){
getDw({type:'llj'}).then(res=>{ getDw({type:'llj'}).then(res=>{
this.gridOptions.ycldw=res.data this.gridOptions.ycldw=res.data
getForemanByWorker({worker:worker}).then(res=>{ getForemanByWorker({worker:worker}).then(res=>{
getYdjhByZtOrForeman({foreman:res.data.userCode,zt:zt,field:'hxpgry'}).then(res=>{ getYdjhByZtOrForeman({foreman:res.data.userCode,zt:zt,field:'hxpgry'}).then(res=>{
this.list=res.data.filter(item=>item.hxfkry) this.list=res.data
this.gridOptions.data=res.data this.gridOptions.data=res.data
this.setExt('workers',this.$props.workers) this.setExt('workers',this.$props.workers)
}) })

@ -41,6 +41,7 @@ export default {
}, },
sockets:{ sockets:{
zyjhzx(data){ zyjhzx(data){
console.log(data)
if (this.deviceId!==data.msg.deviceId&&data.msg.actionType!=='开始报工'){ if (this.deviceId!==data.msg.deviceId&&data.msg.actionType!=='开始报工'){
return return
} }
@ -73,11 +74,16 @@ export default {
const tmpArr=[{ const tmpArr=[{
id:row.id, id:row.id,
pwfkry: this.$props.worker().userCode, pwfkry: this.$props.worker().userCode,
zt:row.zt zt:row.zt,
dcCh:row.dcCh,
dcPl:row.dcPl,
dcFd:row.dcFd,
tzbh:row.tzbh,
}] }]
this.baogong0(tmpArr,row) this.baogong0(tmpArr,row)
}, },
baogong(tmpArr,data){ baogong(tmpArr,data){
console.log(123)
let ycldwInfo=null let ycldwInfo=null
for (const dw of this.dw) { for (const dw of this.dw) {
for (const info of dw.list) { for (const info of dw.list) {

@ -66,7 +66,6 @@ export default {
}, },
methods: { methods: {
baogong(tmpArr,data){ baogong(tmpArr,data){
console.log(data)
let ycldwInfo=null let ycldwInfo=null
for (const dw of this.dw) { for (const dw of this.dw) {
for (const info of dw.list) { for (const info of dw.list) {
@ -104,21 +103,13 @@ export default {
}) })
}) })
}) })
// getDw({type:'llj'}).then(res=>{
// this.gridOptions.ycldw=res.data
// getPgd({user:worker,zt:zt,field:'qgpgry'}).then(res => {
// this.list=res.data
// this.gridOptions.data = res.data
// this.setExt('workers',this.$props.workers)
// })
// })
}, },
getCurrentData() { getCurrentData() {
const data = this.$refs.qgpgd.getCurrentRecord() const data = this.$refs.qgpgd.getCurrentRecord()
window.localStorage.setItem("qgfk", JSON.stringify(data)) window.localStorage.setItem("qgfk", JSON.stringify(data))
}, },
checkboxAll({checked}) { checkboxAll({checked}) {
const worker = this.$props.worker const worker = this.$props.worker()
if (!worker) { if (!worker) {
this.$message.warning('请选择操作人') this.$message.warning('请选择操作人')
return; return;
@ -138,26 +129,37 @@ export default {
} }
}, },
fankgui(worker) { fankgui(worker) {
const list = this.$refs.qgpgd.getCheckboxRecords() VXETable.modal.confirm('您确定报工吗?').then(async res => {
const tmpArr = [] if (res === 'confirm') {
for (const item of list) { const list = this.$refs.qgpgd.getCheckboxRecords()
const data = { for (const item of list) {
id: item.id, const tmpArr = []
qgfkry: worker.userCode, const data = {
zt:item.zt id: item.id,
qgfkry: worker.userCode,
zt: item.zt
}
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
}
await zx(data1)
}
this.initData(this.$props.worker().userCode, '61')
} }
tmpArr.push(data)
}
const data = {
type: this.type,
field: 'qgfkrq',
zxZtName: 'QGFK',
list: tmpArr
}
VXETable.modal.confirm('您确定报工吗?').then(res => {
res === 'confirm' && zx(data).then(res=>{
this.initData(this.$props.worker().userCode,'61')
})
}) })
}, },
cellClick({row}) { cellClick({row}) {

@ -35,11 +35,9 @@ export default function () {
const dwFormat=function ({cellValue}){ const dwFormat=function ({cellValue}){
for (const item of options.ycldw) { for (const item of options.ycldw) {
if (cellValue===(item.id+"")){ for (const item of options.ycldw) {
for (const it of ycldw){ if (cellValue===item.id+''){
if (it.bm===item.tzbh){ return item.name
return it.bmsm
}
} }
} }
} }

@ -93,7 +93,7 @@ export default {
queryParam.dcch=queryParam.dcCh queryParam.dcch=queryParam.dcCh
getSljhPgd(queryParam).then(res=>{ getSljhPgd(queryParam).then(res=>{
this.sljhItemList=res.data this.sljhItemList=res.data
this.drawSljhItem(this.sljhItemList.r('0:20')) this.drawSljhItem(this.sljhItemList.r('0:200'))
}) })
}, },
initDwInfo(index,dw){ initDwInfo(index,dw){

Loading…
Cancel
Save