| | |
| | | const user=userInfo() |
| | | //定义表头数据 |
| | | const titleUploadData = ref({ |
| | | //是否合片工序 |
| | | laminating:'', |
| | | reportingWorkId: null, |
| | | //流程卡号 |
| | | processId: null, |
| | |
| | | }) |
| | | const maxQuantity = Math.max(...equalByOrderNum.map(item =>item.breakageQuantity || 0)) |
| | | let process = titleUploadData.value.thisProcess |
| | | let laminating = titleUploadData.value.laminating |
| | | equalByOrderNum.forEach((row) =>{ |
| | | if (process=='夹胶' || process=='中空' || process=='包装' ||process=='打胶和粘框'){ |
| | | if (laminating == 'laminating'){ |
| | | row.completedQuantity= brokenRow.value.quantity*1-maxQuantity |
| | | } |
| | | |
| | | }) |
| | | |
| | | |
| | |
| | | titleUploadData.value = res.data.data |
| | | titleUploadData.value.processId = processId |
| | | titleUploadData.value.teamsGroupsName = user.user.userName |
| | | titleUploadData.value.laminating = res.data.laminating |
| | | //设备下拉框 |
| | | titleSelectJson.value.deviceType = res.data.device |
| | | //班组下拉框 |
| | |
| | | |
| | | const editClosedEvent = ({ row, column }) => { |
| | | let process = titleUploadData.value.thisProcess |
| | | let laminating = titleUploadData.value.laminating |
| | | if (column.property==='completedQuantity') { |
| | | xGrid.value.getTableData().fullData.forEach((item, index) =>{ |
| | | if(item.order_number===row.order_number && (process=='夹胶' || process=='中空' || process=='包装' ||process=='打胶和粘框')){ |
| | | if(item.order_number===row.order_number && laminating == 'laminating'){ |
| | | item.completedQuantity=row.completedQuantity |
| | | } |
| | | }) |
| | |
| | | const getQuantity = () => { |
| | | titleUploadData.value.thisCompletedQuantity = 0 |
| | | titleUploadData.value.thisWornQuantity = 0 |
| | | let laminating = titleUploadData.value.laminating |
| | | const arr = xGrid.value.getTableData().fullData |
| | | const returnArr = arr.filter((obj, index, self) => |
| | | self.findIndex((t) => t.order_number === obj.order_number) === index |
| | | ) |
| | | |
| | | |
| | | //根据是否合片工序过滤 |
| | | const returnArr = |
| | | laminating === "laminating" |
| | | ? arr.filter((obj, index, self) => |
| | | self.findIndex((t) => t.order_number === obj.order_number) === index |
| | | ) |
| | | : arr; |
| | | let sumBreak = 0 |
| | | let sumQuantity = 0 |
| | | returnArr.forEach((item)=>{ |