| | |
| | | titleSelectJson.value = res.data.basic |
| | | layer= res.data.layer |
| | | |
| | | //添加补片状态列 |
| | | let column = {field: 'patchStatusOther', width: 90,title: res.data.title} |
| | | gridOptions.columns.push(column) |
| | | |
| | | const s01Values = []; |
| | | for (let i = 0; i < res.data.reportingWorkDetails.length; i++) { |
| | | const s01Values = []; |
| | |
| | | }) |
| | | |
| | | const data = [{id:1,num:2},{id:1,num:3},{id:2,num:2},{id:1,num:2}]; |
| | | |
| | | |
| | | //表尾求和 |
| | | const sumNum = (list, field) => { |
| | |
| | | } |
| | | case 'update': { |
| | | //根据补片状态判断是否能修改 |
| | | request.post(`/reportingWork/getPatchCondition/${route.query.reportingWorkId}`).then(async (res) => { |
| | | if (res.code == 200) { |
| | | if (res.data > 0) { |
| | | ElMessage.error("该报工包含已补片数据,不可修改!") |
| | | return |
| | | } else { |
| | | // request.post(`/reportingWork/getPatchCondition/${route.query.reportingWorkId}`).then(async (res) => { |
| | | // if (res.code == 200) { |
| | | // if (res.data > 0) { |
| | | // ElMessage.error("该报工包含已补片数据,不可修改!") |
| | | // return |
| | | // } else { |
| | | getQuantity() |
| | | const errMap = await $grid.validate(true) |
| | | if (errMap) { |
| | |
| | | return |
| | | } |
| | | saveReportingWork(0, 'update') |
| | | } |
| | | } else { |
| | | ElMessage.warning(res.msg) |
| | | } |
| | | }) |
| | | // } |
| | | // } else { |
| | | // ElMessage.warning(res.msg) |
| | | // } |
| | | // }) |
| | | |
| | | break |
| | | } |
| | |
| | | const { rows, column, cell } = params; // 解构获取行、列和单元格信息 |
| | | //点击次破数量时打开明细界面 |
| | | if(column.field=="breakageQuantity"){ |
| | | brokenVisible.value = true |
| | | if (row.patchStatusOther!="已补片"){ |
| | | brokenVisible.value = true |
| | | } |
| | | } |
| | | }, |
| | | menuClick({menu, row, column}) { |
| | |
| | | return row?.rowClass |
| | | |
| | | } |
| | | const editConfig = reactive({ |
| | | trigger: 'click', |
| | | mode: 'cell', |
| | | beforeEditMethod ({ row }) { |
| | | if (row.patchStatusOther === '已补片') { |
| | | return false |
| | | } |
| | | return true |
| | | } |
| | | }) |
| | | |
| | | const editDisabledEvent = ({ row, column }) => { |
| | | VxeUI.modal.message({ |
| | | content: '禁止编辑', |
| | | status: 'error' |
| | | }) |
| | | console.log('禁止编辑', column.field, row) |
| | | } |
| | | </script> |
| | | |
| | | <template> |
| | |
| | | v-on="gridEvents" |
| | | @edit-closed="editClosedEvent" |
| | | :cell-class-name="cellClassName" |
| | | :edit-config="editConfig" |
| | | @edit-disabled="editDisabledEvent" |
| | | |
| | | > |
| | | |
| | |
| | | //返工面积 |
| | | // private double reworkArea; |
| | | |
| | | //报工修改用补片状态 |
| | | @TableField(select = false,exist= false) |
| | | private String patchStatusOther; |
| | | |
| | | //次破列表 |
| | | @TableField(select = false,exist= false) |
| | | private List<DamageDetails> |
| | |
| | | //根据报工编号获取层 |
| | | map.put("layer", reportingWorkMapper.selectLayerByReportingWorkId(reportingWorkId)); |
| | | map.put("numberList", flowCardMapper.getGlassNumber(reportingWorkMapper.selectLayerByReportingWorkId(reportingWorkId),reportingWork.getProcessId())); |
| | | |
| | | map.put("title", "补片状态"); |
| | | return map; |
| | | |
| | | } |
| | |
| | | ifnull(f.completed_quantity,0) as thisQuantitySum ,-- 本工序完工和 |
| | | if(c.quantity-f.completed_quantity = 0 ,true,false) as saveFlag, |
| | | e.other_columns, |
| | | IF(count(pl.id)>0,'已补片','') as patchStatusOther, |
| | | |
| | | <if test="nextProcess != null and nextProcess != ''"> -- 非最后一道工序 |
| | | ifnull(g.completed_quantity,0) as nextQuantitySum, -- 后工序已完成 |
| | | if((f.completed_quantity |
| | |
| | | and d.technology_number = c.technology_number |
| | | left join sd.order_detail as e |
| | | on e.order_id = d.order_id and e.order_number = d.order_number |
| | | left join patch_log as pl on pl.reporting_work_id=b.reporting_work_id |
| | | and pl.order_sort=a.order_number and pl.technology_number=a.technology_number |
| | | |
| | | left join (select sum(completed_quantity) as completed_quantity , |
| | | rw.process_id, |