| | |
| | | }, |
| | | { |
| | | code: 'SecondaryBreakage', |
| | | name: "次破相同", |
| | | name: "序号次破相同", |
| | | prefixIcon: 'vxe-icon-indicator', |
| | | visible: true, |
| | | disabled: false |
| | | }, |
| | | { |
| | | code: 'checkedBreakage', |
| | | name: "选中次破相同", |
| | | prefixIcon: 'vxe-icon-indicator', |
| | | visible: true, |
| | | disabled: false |
| | |
| | | } |
| | | case 'SecondaryBreakage' : { |
| | | let result = toolbarButtonClickEvent() |
| | | if (result.cell === "breakageQuantity"){ |
| | | if (result.cell === "breakageQuantity" || result.cell === "completedQuantity"){ |
| | | if (result) { |
| | | const dataList = xGrid.value.getTableData().visibleData |
| | | const seenOrders = {} |
| | |
| | | } |
| | | } |
| | | |
| | | }) |
| | | } |
| | | } |
| | | break |
| | | } |
| | | case 'checkedBreakage' : { |
| | | let result = toolbarButtonClickEvent() |
| | | if (result.cell === "breakageQuantity" || result.cell === "completedQuantity"){ |
| | | if (result) { |
| | | const dataList = xGrid.value.getTableData().visibleData |
| | | const val = dataList[result.start].damageDetails |
| | | const quantity = dataList[result.start].breakageQuantity |
| | | dataList.forEach((item, index) => { |
| | | if (index >= result.start && index <= result.end) { |
| | | item.damageDetails = val |
| | | item.breakageQuantity = quantity |
| | | if (index!=result.start){ |
| | | item.completedQuantity = item.completedQuantity - quantity |
| | | } |
| | | |
| | | } |
| | | }) |
| | | } |
| | | } |
| | |
| | | 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 |
| | | } |
| | | |
| | | }) |
| | | |
| | | |
| | |
| | | if(user.user.address!==null && user.user.address!==''){ |
| | | titleUploadData.value.thisProcess = user.user.address |
| | | titleUploadData.value.teamsGroupsName = user.user.userName |
| | | if (user.user.address!=='技术部多曲'){ |
| | | groupChangeProcess.value = true |
| | | console.log(user.user.address) |
| | | groupChangeProcess.value = true |
| | | if (user.user.address==='技术部多曲' || user.user.address==='夹胶'){ |
| | | groupChangeProcess.value = false |
| | | } |
| | | gridOptions.toolbarConfig.buttons[1].visible=false |
| | | } |
| | |
| | | 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, |
| | | userName:user.user.userName |
| | | } |
| | | 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 |
| | | } |
| | | }) |