1.优化代码

master
董哲奇 1 day ago
parent 916feae1b6
commit 6e5a2c309e

@ -79,7 +79,11 @@ export default {
const tmpArr=[{ const tmpArr=[{
id:item.id, id:item.id,
pwfkry: this.$props.worker().userCode, pwfkry: this.$props.worker().userCode,
zt:item.zt zt:item.zt,
dcCh:item.dcCh,
dcPl:item.dcPl,
dcFd:item.dcFd,
tzbh:item.tzbh,
}] }]
this.baogong(tmpArr,item) this.baogong(tmpArr,item)
errorFlag=false errorFlag=false
@ -112,7 +116,6 @@ export default {
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) {
@ -143,7 +146,7 @@ export default {
const data=this.$refs.pwfkRef.getCheckboxRecords(); const data=this.$refs.pwfkRef.getCheckboxRecords();
const tmpArr=[] const tmpArr=[]
for (const item of data) { for (const item of data) {
const data={ const _data={
id:item.id, id:item.id,
pwfkry: this.$props.worker().userCode, pwfkry: this.$props.worker().userCode,
zt:item.zt, zt:item.zt,
@ -152,7 +155,7 @@ export default {
dcFd:item.dcFd, dcFd:item.dcFd,
tzbh:item.tzbh, tzbh:item.tzbh,
} }
tmpArr.push(data) tmpArr.push(_data)
} }
VXETable.modal.confirm('您确定报工吗?').then(res => { VXETable.modal.confirm('您确定报工吗?').then(res => {
res === 'confirm' && zx({ res === 'confirm' && zx({

Loading…
Cancel
Save