| | |
| | | </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> |
| | |
| | | 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: |
| | |
| | | onMounted(() => { |
| | | fetchTableData(); |
| | | parseAndSetTime(); |
| | | selectReportData() |
| | | // socket = initializeWebSocket(socketUrl, handleMessage); |
| | | }); |
| | | onUnmounted(() => { |