| | |
| | | </el-select> |
| | | <el-button type="primary" style="margin-left: 10px;" @click="selectReportData()">{{ $t('reportmanage.inquire') |
| | | }}</el-button> |
| | | <el-button type="success" style="margin-left: 10px;" :disabled="(!selectedStatus)" @click="handleConfirm">{{ |
| | | <el-button type="success" style="margin-left: 10px;" :disabled="isConfirmDisabled" @click="handleConfirm">{{ |
| | | $t('reportmanage.signingwork') |
| | | }}</el-button> |
| | | </div> |
| | |
| | | <el-table height="700" ref="table" :data="reportData" |
| | | :header-cell-style="{ background: '#F2F3F5 ', color: '#1D2129' }"> |
| | | <el-table-column prop="teamsGroupsName" align="center" :label="$t('reportmanage.reporteam')" |
| | | min-width="135" /> |
| | | min-width="100" /> |
| | | <el-table-column prop="deviceName" align="center" :label="$t('reportmanage.reportingequipment')" |
| | | min-width="156" /> |
| | | min-width="100" /> |
| | | <el-table-column prop="line" align="center" :label="$t('reportmanage.line')" min-width="120" /> |
| | | <el-table-column prop="workingProcedure" align="center" :label="$t('reportmanage.process')" min-width="120" /> |
| | | <el-table-column prop="glassId" align="center" :label="$t('reportmanage.glassID')" min-width="130" /> |
| | | <el-table-column prop="engineerId" align="center" :label="$t('reportmanage.projectnumber')" min-width="120" /> |
| | | <el-table-column prop="workingProcedure" align="center" :label="$t('reportmanage.process')" min-width="100" /> |
| | | <el-table-column prop="glassId" align="center" :label="$t('reportmanage.glassID')" min-width="100" /> |
| | | <el-table-column prop="engineerId" align="center" :label="$t('reportmanage.projectnumber')" min-width="100" /> |
| | | <el-table-column prop="temperingLayoutId" align="center" :label="$t('reportmanage.layoutID')" |
| | | min-width="120" /> |
| | | min-width="100" /> |
| | | <el-table-column prop="formattedCreateTime" align="center" :label="$t('reportmanage.productiontime')" |
| | | min-width="230" /> |
| | | <el-table-column |
| | |
| | | </el-tag> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="processId" align="center" :label="$t('reportmanage.processcards')" min-width="140" /> |
| | | <el-table-column prop="orderNumber" align="center" :label="$t('reportmanage.number')" min-width="120" /> |
| | | <el-table-column prop="technologyNumber" align="center" :label="$t('reportmanage.layer')" min-width="120" /> |
| | | <el-table-column prop="breakageType" align="center" :label="$t('reportmanage.typebreakage')" min-width="180"> |
| | | <el-table-column prop="processId" align="center" :label="$t('reportmanage.processcards')" min-width="100" /> |
| | | <el-table-column prop="orderNumber" align="center" :label="$t('reportmanage.number')" min-width="100" /> |
| | | <el-table-column prop="technologyNumber" align="center" :label="$t('reportmanage.layer')" min-width="50" /> |
| | | <el-table-column prop="width" align="center" :label="$t('processCard.width')" min-width="70" /> |
| | | <el-table-column prop="height" align="center" :label="$t('processCard.height')" min-width="70" /> |
| | | <el-table-column prop="breakageType" align="center" :label="$t('reportmanage.typebreakage')" min-width="100"> |
| | | <template #default="{ row }"> |
| | | <el-select v-model="row.breakageType" filterable :placeholder="$t('reportmanage.pcausebreakage')" :disabled="selectedType" |
| | | clearable @input="handleInputChangea($event, row.id)"> |
| | |
| | | import { useI18n } from 'vue-i18n' |
| | | import { inject } from 'vue'; |
| | | const globalDate = inject('globalDate'); |
| | | const currentPage = ref(1) |
| | | const totalRecords = ref(0) |
| | | const pageSize = ref(20) |
| | | const currentPage = ref(1) |
| | | const { t } = useI18n() |
| | | const timeRange = ref([]) |
| | | const reportData = ref([]) |
| | |
| | | status: '1', |
| | | workingProcedure: '0', |
| | | }); |
| | | const isConfirmDisabled = computed(() => { |
| | | return report.value.type === '1' || !selectedStatus.value; |
| | | }); |
| | | // 查询数据 |
| | | const selectReportData = async () => { |
| | | const response = await request.post("/cacheVerticalGlass/damage/selectDamage", { |
| | | pageNo: currentPage.value, |
| | | pageSize: pageSize.value, |
| | | startTime: (timeRange.value && timeRange.value[0]) || '', |
| | | endTime: (timeRange.value && timeRange.value[1]) || '', |
| | | type: report.value.type, |
| | |
| | | selectedStatus.value = false; |
| | | } |
| | | if (response.code === 200) { |
| | | const formattedData = response.data.map(record => ({ |
| | | const formattedData = response.data.records.map(record => ({ |
| | | ...record, |
| | | formattedCreateTime: formatTimestamp(record.damageTime), |
| | | })); |
| | | reportData.value = formattedData; |
| | | ElMessage.success(response.message); |
| | | |
| | | totalRecords.value = response.data.total || 0 |
| | | } else { |
| | | ElMessage.error(response.message); |
| | | } |
| | | // const responses = await request.post("/cacheVerticalGlass/damage/insertDamage", { |
| | | // glassId:"P24081502|1|1", |
| | | // line:"1001", |
| | | // workingProcedure:"切割", |
| | | // remark:"", |
| | | // status:"0" |
| | | // }) |
| | | }; |
| | | // 报工 |
| | | const handleConfirm = async () => { |
| | |
| | | } |
| | | }; |
| | | const handlePageChange = (newPage) => { |
| | | currentPage.value = newPage; |
| | | window.localStorage.setItem('pagenumber', currentPage.value) |
| | | historicala(currentPage.value); |
| | | Dailya(currentPage.value); |
| | | currentPage.value = newPage; |
| | | selectReportData(); |
| | | }; |
| | | const handleInputChangea = (value, rowId) => { |
| | | // 更新对应行的 select 值 |
| | |
| | | inputValuesa[rowId] = value; |
| | | inputValuesb[rowId] = value; |
| | | }; |
| | | fetchTableData(); |
| | | // fetchTableData(); |
| | | function gettypeType(type: number) { |
| | | switch (type) { |
| | | case 9: |
| | | case 1: |
| | | return 'success'; |
| | | case 8: |
| | | case 9: |
| | | return 'danger'; |
| | | case 8: |
| | | return 'warning'; |
| | | } |
| | | } |
| | | function gettypeText(type: number) { |
| | | switch (type) { |
| | | case 1: |
| | | return t('reportmanage.completed'); |
| | | case 9: |
| | | return t('reportmanage.takeout'); |
| | | case 8: |
| | |
| | | } |
| | | } |
| | | let socket = null; |
| | | // const socketUrl = `ws://${WebSocketHost}:${host}/api/temperingGlass/api/talk/screen`; |
| | | // const socketUrl = `ws://${window.ipConfig.serverUrl}/api/temperingGlass/api/talk/screen`; |
| | | // const handleMessage = (data) => { |
| | | // adjustedRects.value = data.device[0].map(rect => ({ |
| | | // ...rect, |
| | |
| | | onMounted(() => { |
| | | fetchTableData(); |
| | | parseAndSetTime(); |
| | | selectReportData() |
| | | // socket = initializeWebSocket(socketUrl, handleMessage); |
| | | }); |
| | | onUnmounted(() => { |