| | |
| | | {field: 'patch_area', title: t('order.area'),width:80}, |
| | | {field: 'responsible_team', title: t('reportingWorks.responsibleTeam'),width:110}, |
| | | {field: 'responsible_equipment', title: t('reportingWorks.responsibleEquipment'),width:110}, |
| | | {field: 'responsible_personnel', title: t('reportingWorks.responsiblePersonnel'),width:110}, |
| | | {field: 'responsible_personnel', title: '责任信息',width:110}, |
| | | {field: 'patch_type', title: t('reportingWorks.breakageType'),width:110}, |
| | | {field: 'patch_reason', title: t('reportingWorks.breakageReason'),width:110}, |
| | | {field: 'patch_processes', title: t('reportingWorks.responsibleProcess'),width:110}, |
| | |
| | | return row.order_number === brokenRow.value.order_number |
| | | }) |
| | | const maxQuantity = Math.max(...equalByOrderNum.map(item =>item.breakageQuantity || 0)) |
| | | let process = titleUploadData.value.thisProcess |
| | | equalByOrderNum.forEach((row) =>{ |
| | | row.completedQuantity= brokenRow.value.quantity*1-maxQuantity |
| | | if (process=='夹胶' || process=='中空' || process=='包装' ||process=='打胶和粘框'){ |
| | | row.completedQuantity= brokenRow.value.quantity*1-maxQuantity |
| | | } |
| | | |
| | | }) |
| | | |
| | | |
| | |
| | | const notFinishList = xGrid.value.getTableData().fullData.filter(item =>{ |
| | | return item.saveFlag === 0 |
| | | }) |
| | | |
| | | let process = titleUploadData.value.thisProcess |
| | | for(let item of uniqueByOrderNum){ |
| | | if(!checkSameNumForId(notFinishList,item.order_number )){ |
| | | if(!checkSameNumForId(notFinishList,item.order_number ) && (process=='夹胶' || process=='中空' || process=='包装' ||process=='打胶和粘框')){ |
| | | ElMessage.error(`${t('reportingWorks.pleaseCheckTheOrderNumber1')}':' |
| | | ${item.order_number} |
| | | ${t('reportingWorks.pleaseCheckTheOrderNumber1')}`) |
| | |
| | | userName:user.user.userName, |
| | | qualityInsStatus:status |
| | | } |
| | | console.log('requestData',requestData) |
| | | gridOptions.toolbarConfig.buttons[0].disabled=true |
| | | gridOptions.toolbarConfig.buttons[1].disabled=true |
| | | //判断保存还是修改 |
| | |
| | | ElMessage.warning(t('reportingWorks.firstProcessNotReview')) |
| | | return |
| | | } |
| | | //匹配“/”前后字符串 |
| | | const regex = /([^\/]+)\/([^\/]+)/; |
| | | //查找匹配的字符串 |
| | | const result = processId.match(regex); |
| | | //流程卡号 |
| | | let processIdStr = result[1]; |
| | | //层号 |
| | | let technologyStr = result[2]; |
| | | const reportWork = { |
| | | process: titleUploadData.value.previousProcess, |
| | | processId:processId, |
| | | thisProcess:titleUploadData.value.thisProcess |
| | | thisProcess:titleUploadData.value.thisProcess, |
| | | technologyStr:technologyStr |
| | | } |
| | | loadingFlag.value= true |
| | | request.post("/reportingWork/reviewReportingWork",reportWork).then((res) =>{ |
| | |
| | | } |
| | | |
| | | const editClosedEvent = ({ row, column }) => { |
| | | let process = titleUploadData.value.thisProcess |
| | | if (column.property==='completedQuantity') { |
| | | xGrid.value.getTableData().fullData.forEach((item, index) =>{ |
| | | if(item.order_number===row.order_number){ |
| | | if(item.order_number===row.order_number && (process=='夹胶' || process=='中空' || process=='包装' ||process=='打胶和粘框')){ |
| | | item.completedQuantity=row.completedQuantity |
| | | } |
| | | }) |
| | |
| | | case 'delete':{ |
| | | let userId=user.user.userId; |
| | | let userName=user.user.userName; |
| | | request.post(`/reportingWork/deleteWork/${row.reportingWorkId}/${row.processId}/${row.thisProcess}/${userId}/${userName}`).then((res) => { |
| | | const str=row.processId |
| | | let processId=str.split('/')[0]; |
| | | request.post(`/reportingWork/deleteWork/${row.reportingWorkId}/${processId}/${row.thisProcess}/${userId}/${userName}`).then((res) => { |
| | | if (res.code == 200 && res.data===true) { |
| | | ElMessage.success(t('workOrder.deleteOk')) |
| | | router.push({path: '/main/reportingWorks/SelectReportingWorks', query: {random:Math.random()}}) |
| | |
| | | {field: 'rework_area', title: t('order.area'),width:70}, |
| | | {field: 'rework_team', title: t('reportingWorks.responsibleTeam'),width:90}, |
| | | {field: 'responsible_equipment', title: t('reportingWorks.responsibleEquipment'),width:120}, |
| | | {field: 'responsible_personnel', title: t('reportingWorks.responsiblePersonnel'),width:100}, |
| | | {field: 'responsible_personnel', title: '责任信息',width:100}, |
| | | {field: 'rework_type', title: t('reportingWorks.breakageType'),width:80}, |
| | | {field: 'rework_reason', title: t('reportingWorks.breakageReason'),width:90}, |
| | | {field: 'rework_processes', title: t('reportingWorks.responsibleProcess'),width:80}, |
| | |
| | | String thisProcess = reportingWork.get("thisProcess"); |
| | | int index = processId.lastIndexOf("/") + 1; |
| | | String result = processId.substring(index); |
| | | String technologyStr = reportingWork.get("technologyStr"); |
| | | |
| | | if (thisProcess.equals("夹胶") || thisProcess.equals("中空") || thisProcess.equals("仓储")){ |
| | | if (thisProcess.equals("夹胶") || thisProcess.equals("中空") || thisProcess.equals("包装")){ |
| | | LambdaUpdateWrapper |
| | | <ReportingWork> updateWrapper = new LambdaUpdateWrapper<>(); |
| | | updateWrapper |
| | |
| | | .setSql("reviewed_state =1"); |
| | | reportingWorkMapper.update(null, updateWrapper); |
| | | }else { |
| | | reportingWorkMapper.ReviewReportingWorkMp(processId.substring(0, 14),reportingWork.get("process"),result); |
| | | reportingWorkMapper.ReviewReportingWorkMp(processId.substring(0, 14),reportingWork.get("process"),technologyStr); |
| | | |
| | | } |
| | | return true; |
| | |
| | | od.building_number as buildingNumber, |
| | | od.product_name as productName, |
| | | od.edging_type as edgingType, |
| | | p.remarks, |
| | | od.remarks, |
| | | c.customer_abbreviation as customerAbbreviation, |
| | | p.product_abbreviation as productAbbreviation, |
| | | fc.process_id as processId, |
| | |
| | | from sd.order_detail as od |
| | | left join flow_card as fc on od.order_id = fc.order_id and od.order_number = fc.order_number |
| | | where fc.process_id = #{processId} |
| | | and fc.technology_number = #{technologyNumber} |
| | | and POSITION(fc.technology_number in #{technologyNumber}) |
| | | GROUP BY other_columns |
| | | order by IF(fc.sort != NULL or fc.sort != '', fc.sort, fc.order_number) |
| | | </select> |
| | | |
| | |
| | | od.building_number as buildingNumber, |
| | | od.product_name as productName, |
| | | od.edging_type as edgingType, |
| | | p.remarks, |
| | | od.remarks, |
| | | c.customer_abbreviation as customerAbbreviation, |
| | | p.product_abbreviation as productAbbreviation, |
| | | CONCAT(fc.process_id, '/', fc.technology_number) as processId, |
| | |
| | | od.building_number as buildingNumber, |
| | | od.product_name as productName, |
| | | od.edging_type as edgingType, |
| | | p.remarks, |
| | | od.remarks, |
| | | c.customer_abbreviation as customerAbbreviation, |
| | | p.product_abbreviation as productAbbreviation, |
| | | fc.process_id as processId, |
| | |
| | | process_id,a.reporting_work_id |
| | | 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 reviewed_state=0 and process_id=#{processIdStr} and b.technology_number=#{technologyStr}) as rw |
| | | where this_process=#{previousProcess} and reviewed_state=0 and process_id=#{processIdStr} |
| | | and POSITION(b.technology_number in #{technologyStr}) |
| | | ) as rw |
| | | on rw.process_id = fc.process_id |
| | | left join reporting_work_detail as rwd on rw.reporting_work_id = rwd.reporting_work_id and rwd.technology_number=fc.technology_number |
| | | where fc.process_id = #{processIdStr} |
| | | and fc.technology_number = #{technologyStr} |
| | | and POSITION(fc.technology_number in #{technologyStr}) |
| | | and if(#{reportType}=1,o.order_type!='样品订单',o.order_id!='') |
| | | GROUP BY fc.process_id |
| | | </select> |
| | |
| | | select ifnull((select ogd.process |
| | | from sd.order_glass_detail as ogd |
| | | where ogd.production_id = LEFT(#{processIdStr}, 11) |
| | | and ogd.technology_number=#{technologyStr} |
| | | and POSITION(ogd.technology_number in #{technologyStr}) |
| | | limit 1),'') as process |
| | | |
| | | </select> |
| | |
| | | where |
| | | reporting_work.this_process = #{process} |
| | | and a.process_id=#{processIdStr} |
| | | and a.technology_number = #{technologyStr} |
| | | and POSITION(a.technology_number in #{technologyStr}) |
| | | and a.review_status = 1 |
| | | group by a.process_id,a.order_sort,a.technology_number |
| | | ) as patch |
| | |
| | | |
| | | WHERE |
| | | fc.process_id = #{processIdStr} |
| | | AND fc.technology_number = #{technologyStr} |
| | | AND POSITION(fc.technology_number in #{technologyStr}) |
| | | AND odpd.process = #{process} |
| | | and if(#{reportType}=1,o.order_type!='样品订单',o.order_id!='') |
| | | group by fc.order_number, |
| | | ogd.technology_number |
| | | order by fc.order_number |
| | | </select> |
| | | |
| | |
| | | from sd.order_glass_detail |
| | | where order_id = ogd.order_id |
| | | and order_number = ogd.order_number |
| | | and technology_number =#{technologyStr} |
| | | and POSITION(technology_number in #{technologyStr}) |
| | | limit 1) |
| | | </if> |
| | | |
| | |
| | | WHERE |
| | | fc.process_id = #{processIdStr} |
| | | <if test="process != '中空' and process != '夹胶' and process != '包装' and process != '打胶和粘框' "> |
| | | AND fc.technology_number = #{technologyStr} |
| | | AND POSITION(fc.technology_number in #{technologyStr}) |
| | | </if> |
| | | AND odpd.process = #{process} |
| | | order by fc.order_number |
| | |
| | | left join reporting_work_detail as rwd on rw.reporting_work_id = rwd.reporting_work_id |
| | | set rw.reviewed_state = 1 |
| | | where rw.process_id = #{substring} and rw.this_process=#{process} |
| | | and rwd.technology_number = #{result} and reviewed_state=0 |
| | | and POSITION(rwd.technology_number in #{result}) and reviewed_state=0 |
| | | </update> |
| | | |
| | | <select id="getPatchConditionMp"> |