| | |
| | | import request from "@/utils/request"; |
| | | import {ElMessage} from "element-plus"; |
| | | import {changeFilterEvent, filterChanged} from "@/hook" |
| | | import domZIndex from 'dom-zindex' |
| | | import {indexOf} from "xe-utils"; |
| | | import {addListener, toolbarButtonClickEvent} from "@/hook/mouseMove"; |
| | | import userInfo from "@/stores/userInfo" |
| | | import { useI18n } from 'vue-i18n' |
| | | import footSum from "@/hook/footSum" |
| | | domZIndex.setCurrent(3000) |
| | | //语言获取 |
| | | const { t } = useI18n() |
| | | let brokenVisible = ref(false) |
| | |
| | | button.name=t('basicData.review') |
| | | titleUploadData.value.qualityInspector=user.user.userName |
| | | } |
| | | |
| | | |
| | | gridOptions.toolbarConfig.buttons.push(button) |
| | | } |
| | |
| | | break |
| | | } |
| | | case 'update': { |
| | | getQuantity() |
| | | const errMap = await $grid.validate(true) |
| | | if (errMap) { |
| | | ElMessage.error(t('basicData.msg.checkoutLose')) |
| | | return |
| | | } |
| | | saveReportingWork(0,'update') |
| | | //根据补片状态判断是否能修改 |
| | | 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) { |
| | | ElMessage.error(t('basicData.msg.checkoutLose')) |
| | | return |
| | | } |
| | | saveReportingWork(0, 'update') |
| | | } |
| | | } else { |
| | | ElMessage.warning(res.msg) |
| | | } |
| | | }) |
| | | |
| | | break |
| | | } |
| | | } |
| | |
| | | }, |
| | | { |
| | | field: 'responsiblePersonnel', |
| | | title: t('reportingWorks.responsiblePersonnel'), |
| | | title: '责任信息', |
| | | editRender: {name: 'input', attrs: {placeholder: ''}} |
| | | |
| | | }, |
| | |
| | | |
| | | |
| | | //第一次加载数据 |
| | | |
| | | let groupChangeProcess = ref(false)//用于本班组显示问题 |
| | | request.post(`/reportingWork/selectProcess`).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 |
| | | groupChangeProcess.value = true |
| | | gridOptions.toolbarConfig.buttons[1].visible=false |
| | | } |
| | | |
| | | } else { |
| | |
| | | |
| | | for(let item of uniqueByOrderNum){ |
| | | if(!checkSameNumForId(notFinishList,item.order_number )){ |
| | | alert(1) |
| | | ElMessage.error(`${t('reportingWorks.pleaseCheckTheOrderNumber1')}':' |
| | | ${item.order_number} |
| | | ${t('reportingWorks.pleaseCheckTheOrderNumber1')}`) |
| | | return false |
| | | } |
| | | } |
| | | |
| | | |
| | | titleUploadData.value.creator = user.user.userName |
| | | titleUploadData.value.creatorId = user.user.userId |
| | |
| | | const requestData = { |
| | | title:titleUploadData.value, |
| | | detail:xGrid.value.getTableData().fullData, |
| | | type:state//审核状态 |
| | | type:state,//审核状态 |
| | | userId:user.user.userId, |
| | | userName:user.user.userName, |
| | | } |
| | | gridOptions.toolbarConfig.buttons[0].disabled=true |
| | | gridOptions.toolbarConfig.buttons[1].disabled=true |
| | |
| | | }) |
| | | // 查询责任班组 |
| | | const computedResponsibleTeam = computed((responsibleProcess) => { |
| | | titleSelectJson.value.historyTeams.push({basic_name: user.user.userName, process: titleUploadData.value.thisProcess, basic_type: 'teamsgroups', basic_category: 179, id: 555}) |
| | | return function (responsibleProcess){ |
| | | return titleSelectJson.value.historyTeams.filter((item) => { |
| | | return item.process === responsibleProcess |
| | |
| | | } |
| | | const reportWork = { |
| | | process: titleUploadData.value.previousProcess, |
| | | processId:processId |
| | | processId:processId, |
| | | thisProcess:titleUploadData.value.thisProcess |
| | | } |
| | | loadingFlag.value= true |
| | | request.post("/reportingWork/reviewReportingWork",reportWork).then((res) =>{ |
| | |
| | | //表头赋值 |
| | | titleUploadData.value = res.data.data |
| | | titleUploadData.value.processId = processId |
| | | titleUploadData.value.teamsGroupsName = user.user.userName |
| | | //设备下拉框 |
| | | titleSelectJson.value.deviceType = res.data.device |
| | | //班组下拉框 |
| | |
| | | |
| | | } |
| | | |
| | | |
| | | const cellClassName = ({ row, column }) => { |
| | | if (column.field === 'breakageQuantity') { |
| | | return 'col-red' |
| | | } |
| | | |
| | | } |
| | | const changeRowClass = ({ row, rowIndex, $rowIndex }) => { |
| | | return row?.rowClass |
| | | |
| | | } |
| | | |
| | | </script> |
| | | |
| | | <template> |
| | |
| | | <el-input :disabled="inputDisabled" v-if="titleUploadData.reportingWorkId" v-model="titleUploadData.reportingWorkId" :placeholder="$t('reportingWorks.reportingWorkId')" style="width: 200px" /> |
| | | <el-input :disabled="inputDisabled" v-model="titleUploadData.processId" :placeholder="$t('processCard.processId')" style="width: 200px" @keyup.enter.native="getWork();getQuantity()"/> |
| | | |
| | | <el-select :disabled="inputDisabled" v-model="titleUploadData.thisProcess" clearable :placeholder="$t('reportingWorks.selectProcess')" style="width: 120px" |
| | | <el-select :disabled="inputDisabled || groupChangeProcess" |
| | | v-model="titleUploadData.thisProcess" |
| | | clearable |
| | | :placeholder="$t('reportingWorks.selectProcess')" |
| | | style="width: 120px" |
| | | @change="getWork();getQuantity()"> |
| | | <el-option |
| | | v-for="item in titleSelectJson['processType']" |
| | |
| | | <el-text>{{$t('reportingWorks.teamsType')}}:</el-text> |
| | | </el-col> |
| | | <el-col :span="3"> |
| | | <el-select v-model="titleUploadData.teamsGroupsName" clearable :placeholder="$t('reportingWorks.selectTeam')"> |
| | | <el-select :disabled="groupChangeProcess" |
| | | v-model="titleUploadData.teamsGroupsName" |
| | | clearable |
| | | :placeholder="$t('reportingWorks.selectTeam')"> |
| | | <el-option |
| | | v-for="item in titleSelectJson['teamsType']" |
| | | :key="item.id" |
| | |
| | | <vxe-grid |
| | | ref="xGrid" |
| | | class="mytable-scrollbar" |
| | | :row-class-name="changeRowClass" |
| | | max-height="100%" |
| | | height="400px" |
| | | height="100%" |
| | | size="small" |
| | | v-bind="gridOptions" |
| | | v-on="gridEvents" |
| | | @edit-closed="editClosedEvent" |
| | | :cell-class-name="cellClassName" |
| | | |
| | | > |
| | | |
| | |
| | | user-select: none; |
| | | } |
| | | |
| | | ::v-deep(.mytable-scrollbar .col-red) { |
| | | background-color: rgb(66,159,254); |
| | | color: #fff; |
| | | } |
| | | |
| | | |
| | | ::v-deep(.latter) { |
| | | //display: none; |
| | | } |
| | | </style> |