| | |
| | | }, |
| | | {field: 'completed', width: 90, title:t('reportingWorks.completed'),}, |
| | | {field: 'onceBroken', width: 90, title: t('reportingWorks.onceBroken'),}, |
| | | { |
| | | field: 'reviewed_state', |
| | | title: t('processCard.reviewedState'), |
| | | filters: [{data: ''}], |
| | | slots: {filter: 'num1_filter'}, |
| | | filterMethod: filterChanged |
| | | }, |
| | | |
| | | ], |
| | | //表单验证 |
| | |
| | | |
| | | //绑定下方表格 |
| | | detail.value = res.data.Detail |
| | | xGrid.value.reloadData(detail.value) |
| | | // 使用map方法来处理每个对象 |
| | | let modifiedCollection = detail.value.map(item => { |
| | | if (item.reviewed_state === 1) { |
| | | return { ...item, reviewed_state: "已审核" }; |
| | | } |
| | | else if (item.reviewed_state === 0) { |
| | | return { ...item, reviewed_state: "未审核" }; |
| | | } |
| | | else { |
| | | // 其他情况保持不变 |
| | | return item; |
| | | } |
| | | }); |
| | | xGrid.value.reloadData(modifiedCollection) |
| | | } else { |
| | | ElMessage.warning(res.msg) |
| | | } |
| | |
| | | if (retrievedData!=null){ |
| | | Integer reviewedState = retrievedData.getReviewedState(); |
| | | //根据审核状态查询未审核数据 |
| | | if (reviewedState==1){//已审核 |
| | | // if (reviewedState==1){//已审核 |
| | | //不是第一道工序,查询报工数据 |
| | | List<Map<String,String>> details = reportingWorkMapper.SelectReworlDetailMp(processIdStr, technologyStr, process,previousProcess,laminating); |
| | | if(process.equals("中空")){ |
| | |
| | | }); |
| | | } |
| | | map.put("Detail",details ); |
| | | }else { |
| | | //不是第一道工序,查询报工数据 |
| | | List<Map<String,String>> details = reportingWorkMapper.SelectReworlDetailMpReview(processIdStr, technologyStr, process,previousProcess,laminating); |
| | | if(process.equals("中空")){ |
| | | String orderId = reportingWorkMapper.selectOrderid(processIdStr); |
| | | details.forEach( detail -> { |
| | | Integer glassId = orderGlassDetailMapper. |
| | | getMinIdByGroup(orderId, |
| | | String.valueOf(detail.get("order_number")), |
| | | String.valueOf(detail.get("group"))); |
| | | int listGlassId = Integer.parseInt(String.valueOf(detail.get("glassId"))); |
| | | if(listGlassId !=glassId){ |
| | | detail.put("rowClass","latter"); |
| | | } |
| | | }); |
| | | } |
| | | map.put("Detail",details ); |
| | | } |
| | | // }else { |
| | | // //不是第一道工序,查询报工数据 |
| | | // List<Map<String,String>> details = reportingWorkMapper.SelectReworlDetailMpReview(processIdStr, technologyStr, process,previousProcess,laminating); |
| | | // if(process.equals("中空")){ |
| | | // String orderId = reportingWorkMapper.selectOrderid(processIdStr); |
| | | // details.forEach( detail -> { |
| | | // Integer glassId = orderGlassDetailMapper. |
| | | // getMinIdByGroup(orderId, |
| | | // String.valueOf(detail.get("order_number")), |
| | | // String.valueOf(detail.get("group"))); |
| | | // int listGlassId = Integer.parseInt(String.valueOf(detail.get("glassId"))); |
| | | // if(listGlassId !=glassId){ |
| | | // detail.put("rowClass","latter"); |
| | | // } |
| | | // }); |
| | | // } |
| | | // map.put("Detail",details ); |
| | | // } |
| | | } |
| | | } |
| | | |
| | |
| | | ogd.`group`, |
| | | if(fc.quantity -odpd.reporting_work_num = 0 ,true,false) as saveFlag, -- 判断是否已经完成,已经完成不序号和同序号数量相同才能提交 |
| | | od.other_columns, |
| | | ogd.id as 'glassId' |
| | | ogd.id as 'glassId',IFNULL(rws.reviewed_state,0) as reviewed_state |
| | | |
| | | FROM |
| | | sd.order_detail AS od |
| | |
| | | and POSITION(technology_number in #{technologyStr}) |
| | | limit 1) |
| | | </if> |
| | | |
| | | |
| | | LEFT JOIN flow_card AS fc |
| | | ON fc.order_id = ogd.order_id |
| | |
| | | on c.process_id = fc.process_id |
| | | and c.order_sort = fc.order_number |
| | | and c.technology_number = fc.technology_number |
| | | |
| | | left join (select reviewed_state as reviewed_state , |
| | | process_id,a.reporting_work_id,b.technology_number,b.order_number |
| | | from reporting_work as a |
| | | left join reporting_work_detail as b on a.reporting_work_id = b.reporting_work_id |
| | | where this_process=#{previousProcess} and process_id= #{processIdStr} |
| | | <if test="laminating != 'laminating'"> |
| | | AND POSITION(b.technology_number in #{technologyStr}) |
| | | </if> |
| | | GROUP BY a.reporting_work_id,b.order_number,b.technology_number |
| | | ) as rws |
| | | on rws.process_id = fc.process_id and rws.order_number=fc.order_number and rws.technology_number=fc.technology_number |
| | | WHERE |
| | | fc.process_id = #{processIdStr} |
| | | |
| | | AND odpd.process = #{process} |
| | | <if test="laminating != 'laminating'"> |
| | | AND POSITION(fc.technology_number in #{technologyStr}) |
| | | </if> |
| | | AND odpd.process = #{process} |
| | | order by fc.order_number |
| | | </select> |
| | | |