| | |
| | | sum:sum |
| | | }) |
| | | }) |
| | | |
| | | console.log(orderDetailList.value) |
| | | } else { |
| | | ElMessage.warning(res.msg) |
| | | router.push("/login") |
| | |
| | | |
| | | <template> |
| | | <div > |
| | | <div :class="'div_'+n " style="width: 46%;position: relative;margin-top: 20px" v-for="n in 2" > |
| | | <table v-for="page in orderDetailList" :key="page" style="width: 100%"> |
| | | <thead> |
| | | <div :class="'div_'+n " style="width: 46%;" v-for="n in 2" > |
| | | <div class="pages" v-for="page in orderDetailList" :key="page" style="width: 100%;position: relative;" > |
| | | <table > |
| | | <thead style="width: 100%"> |
| | | <tr> |
| | | <td colspan="1" style="text-align: center;font-weight: bolder;"> |
| | | <div style="width: 35px;height: 35px"> |
| | |
| | | <td>{{ row.size.area }}</td> |
| | | </tr> |
| | | |
| | | <tr id="footsum" v-else-if="row.type==='sum'" style="border: 0;font-size: 10px"> |
| | | <td colspan="5" style="border: 0;"> |
| | | <div style="display:flex;"> |
| | | <div>本页数量</div> |
| | | <div>{{row.sum.quantity}}</div> |
| | | <div>面积</div> |
| | | <div>{{row.sum.area}}(m²)</div> |
| | | <div>重量</div> |
| | | <div>{{row.sum.weight}}(kg)</div> |
| | | </div> |
| | | </td> |
| | | </tr> |
| | | |
| | | |
| | | </template> |
| | | </tbody> |
| | |
| | | </tr> |
| | | </tfoot> |
| | | </table> |
| | | |
| | | <table id="footsum"> |
| | | <template v-for="(row,index) in page" :key="index"> |
| | | <tr v-if="row.type==='sum'" style="border: 0;font-size: 10px"> |
| | | <td colspan="5" style="border: 0;"> |
| | | <div style="display:flex;"> |
| | | <div>本页数量</div> |
| | | <div>{{row.sum.quantity}}</div> |
| | | <div>面积</div> |
| | | <div>{{row.sum.area}}(m²)</div> |
| | | <div>重量</div> |
| | | <div>{{row.sum.weight}}(kg)</div> |
| | | </div> |
| | | </td> |
| | | </tr> |
| | | </template> |
| | | </table> |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | |
| | | </template> |
| | |
| | | display: flex; |
| | | flex-wrap: wrap |
| | | } |
| | | |
| | | table{ |
| | | .pages{ |
| | | width: 100%; |
| | | page-break-after: always; |
| | | } |
| | | table{ |
| | | width: 100%; |
| | | } |
| | | |
| | | @media print { |
| | |
| | | margin: 4mm 5mm 0mm 5mm /* this affects the margin in the printer settings */ |
| | | |
| | | } |
| | | .pages{ |
| | | height: 100%; |
| | | } |
| | | #footsum{ |
| | | position: fixed; |
| | | position: absolute; |
| | | bottom: 1.5cm; |
| | | width: 100%; /* 或者设置成具体的宽度 */ |
| | | } |
| | |
| | | qualityInsTime:'质检时间', |
| | | completedArea:'完工面积', |
| | | wornArea:'次破面积', |
| | | pleaseGreaterThanOrEqual1:'请输入小于等于', |
| | | pleaseGreaterThanOrEqual1:'请输入大于等于', |
| | | pleaseGreaterThanOrEqual2:'的数字', |
| | | lossCount1:'损耗数', |
| | | lossCount2:'不能大于', |
| | |
| | | const regex = /^[0-9]\d*$/ |
| | | const brokenNum = |
| | | (row.breakageQuantity === undefined || row.breakageQuantity===null) ? 0 : row.breakageQuantity |
| | | //整数验证 |
| | | if (row.completedQuantity && !regex.test(row.completedQuantity)) { |
| | | return new Error(t('reportingWorks.enterIntegerGreaterThanEqualTo')) |
| | | //完工+次破数量不能大于可完工数量 |
| | | }else if((row.completedQuantity*1+brokenNum*1)>row.quantity*1){ |
| | | return new Error((`${row.completedQuantity}+${brokenNum}>${row.quantity}`)) |
| | | return new Error((`完工+次破数量不能大于可完工数量`)) |
| | | //本次完工数量不能大于完工数量 |
| | | }else if(row.quantity_card<row.completedQuantity){ |
| | | return new Error(t('reportingWorks.pleaseNumber10')) |
| | | } |
| | |
| | | const totalQuantity = Number(row.quantity) //可完工数量 |
| | | const val = Number(cellValue) //输入值 |
| | | |
| | | //完工数 |
| | | const completedNum = |
| | | (row.completedQuantity === undefined || row.completedQuantity===null || row.completedQuantity==='') ? 0 : row.completedQuantity |
| | | const okVal = completedSum - totalQuantity + completedNum |
| | | if(val==0 && row.minQuantity==0){ |
| | | return new Error(t('reportingWorks.pleaseNumber11')) |
| | | } |
| | | if(titleUploadData.value.reportingWorkId!=null && nextQuantitySum>okVal |
| | | && val>totalQuantity && completedNum>totalQuantity && val>row.minQuantity && val>row.minQuantity){ |
| | | return new Error(`${t('reportingWorks.pleaseGreaterThanOrEqual1')} |
| | | ${row.minQuantity} |
| | | ${t('reportingWorks.pleaseGreaterThanOrEqual2')}`) |
| | | } |
| | | // |
| | | const okVal = completedSum - totalQuantity |
| | | |
| | | //当可操作数量为0,并且完工数量不等于可完工数量时 |
| | | if(row.minQuantity===0 && val!==totalQuantity ){ |
| | | return new Error(`本工序报工数:${okVal}+${val}=${okVal+val}\n |
| | | 下工序报工数:${nextQuantitySum}\n |
| | | 本工序修改数不能小于下工序报工数 |
| | | `) |
| | | } |
| | | if(titleUploadData.value.reportingWorkId!=null && (val>totalQuantity || val<(row.quantity-row.minQuantity) )){ |
| | | return new Error(`${row.quantity-row.minQuantity} |
| | | <=val<= |
| | | ${row.quantity}`) |
| | | } |
| | | } |
| | | } |
| | | ] |
| | |
| | | import com.example.erp.common.Constants; |
| | | import com.example.erp.dto.pp.OrderNumberTransferDTO; |
| | | import com.example.erp.entity.pp.*; |
| | | import com.example.erp.entity.sd.BasicData; |
| | | import com.example.erp.entity.sd.Order; |
| | | import com.example.erp.entity.sd.OrderDetail; |
| | | import com.example.erp.entity.sd.OrderProcessDetail; |
| | | import com.example.erp.entity.sd.*; |
| | | import com.example.erp.entity.userInfo.Log; |
| | | import com.example.erp.entity.userInfo.SysError; |
| | | import com.example.erp.exception.ServiceException; |
| | |
| | | |
| | | |
| | | |
| | | |
| | | List<Map<String, Object>> reportingWorkDetails = reportingWorkMapper.selectByReportingWorkId(reportingWorkId, reportingWork.getNextProcess()); |
| | | reportingWorkDetails.forEach(reportingWorkDetail -> { |
| | | List<DamageDetails> damageDetailsList = new ArrayList<>(); |
| | |
| | | |
| | | <!--查询修改报工明细数据--> |
| | | <select id="selectByReportingWorkId" > |
| | | select |
| | | select * from(select |
| | | a.reporting_work_id, |
| | | d.order_number, |
| | | d.glass_child, |
| | |
| | | d.child_height, |
| | | if(e.shape=1,'普形',if(e.shape=2,'异形','')) as shape, |
| | | if(ifnull(a.completed_quantity+a.breakage_quantity,0)=0, |
| | | c.quantity-ifnull(a.completed_quantity+a.breakage_quantity,0), |
| | | 0, |
| | | ifnull(a.completed_quantity+a.breakage_quantity,0)) as 'quantity', -- 可报工数 |
| | | ifnull(a.completed_quantity,0) as 'completedQuantity', -- 完工数 |
| | | ifnull(a.breakage_quantity,0) as 'breakageQuantity', -- 破损数 |
| | |
| | | from reporting_work as rw |
| | | left join reporting_work_detail as rwd |
| | | on rw.reporting_work_id = rwd.reporting_work_id |
| | | where rw.reviewed_state>-1 |
| | | group by rw.process_id, |
| | | rw.this_process, |
| | | rwd.order_number, |
| | |
| | | and g.technology_number = a.technology_number |
| | | </if> |
| | | where b.reporting_work_id = #{reportingWorkId} |
| | | GROUP BY c.order_number,c.technology_number |
| | | GROUP BY c.order_number,c.technology_number) as result |
| | | </select> |
| | | <select id="selectReportingWorkMp" resultMap="reportingWorkMap"> |
| | | select rw.reporting_work_id, |