| | |
| | | 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) => { |
| | |
| | | return new Error(t('reportingWorks.enterIntegerGreaterThanEqualTo')) |
| | | }else if((row.completedQuantity*1+brokenNum*1)>row.quantity*1){ |
| | | return new Error((`${row.completedQuantity}+${brokenNum}>${row.quantity}`)) |
| | | }else if(row.quantity_card<row.completedQuantity){ |
| | | return new Error("完工数不能大于流程卡数量") |
| | | } |
| | | if(titleUploadData.value.reportingWorkId!=null && row.completedQuantity<row.minQuantity){ |
| | | const completedNum = |
| | | (row.completedQuantity === undefined || row.completedQuantity===null || row.completedQuantity==='') ? 0 : row.completedQuantity |
| | | if(titleUploadData.value.reportingWorkId!=null && completedNum>row.minQuantity){ |
| | | return new Error(`${t('reportingWorks.pleaseGreaterThanOrEqual1')} |
| | | ${row.minQuantity} |
| | | ${t('reportingWorks.pleaseGreaterThanOrEqual2')}`) |
| | |
| | | } |
| | | 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}) { |
| | |
| | | |
| | | //第一次加载数据 |
| | | let groupChangeProcess = ref(false)//用于本班组显示问题 |
| | | request.post(`/reportingWork/selectProcess`).then((res) => { |
| | | request.post(`/reportingWork/selectProcess/${user.user.userId}`).then((res) => { |
| | | if (res.code == 200) { |
| | | titleSelectJson.value.processType = res.data.process |
| | | 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 |
| | | groupChangeProcess.value = true |
| | | if (user.user.address==='技术部多曲' || user.user.address==='夹胶'){ |
| | | groupChangeProcess.value = false |
| | | } |
| | | gridOptions.toolbarConfig.buttons[1].visible=false |
| | | } |
| | |
| | | process: titleUploadData.value.previousProcess, |
| | | processId:processId, |
| | | thisProcess:titleUploadData.value.thisProcess, |
| | | technologyStr:technologyStr |
| | | technologyStr:technologyStr, |
| | | userName:user.user.userName |
| | | } |
| | | loadingFlag.value= true |
| | | request.post("/reportingWork/reviewReportingWork",reportWork).then((res) =>{ |
| | |
| | | return row?.rowClass |
| | | |
| | | } |
| | | const editConfigDisable = reactive({ |
| | | trigger: 'click', |
| | | mode: 'cell', |
| | | beforeEditMethod ({ row }) { |
| | | if (row.patchStatusOther === '已补片') { |
| | | return false |
| | | } |
| | | return true |
| | | } |
| | | }) |
| | | |
| | | </script> |
| | | |
| | |
| | | v-on="gridEvents" |
| | | @edit-closed="editClosedEvent" |
| | | :cell-class-name="cellClassName" |
| | | :edit-config="editConfigDisable" |
| | | |
| | | > |
| | | |
| | |
| | | <template #num1_filter="{ column, $panel }"> |
| | | <div> |
| | | <div v-for="(option, index) in column.filters" :key="index"> |
| | | <input v-model="option.data" type="type" @input="changeFilterEvent($event, option, $panel)"/> |
| | | <input v-model="option.data" type="type" |
| | | @keyup.enter.native="$panel.confirmFilter()" |
| | | @input="changeFilterEvent($event, option, $panel)"/> |
| | | </div> |
| | | </div> |
| | | </template> |