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