| | |
| | | const multiple = ref(true); |
| | | const total = ref(0); |
| | | const title = ref(""); |
| | | const height = ref(document.documentElement.clientHeight - 270 + "px;") |
| | | const height = ref(document.documentElement.clientHeight - 220 + "px;") |
| | | |
| | | |
| | | const data = reactive({ |
| | |
| | | |
| | | // 表格配置 |
| | | const columns = ref([ |
| | | { type: 'seq', title: '序号', width: 60 }, |
| | | /* { type: 'seq', title: '序号', width: 60 },*/ |
| | | { |
| | | title: '工单号', |
| | | field: 'workOrderNo', |
| | |
| | | { |
| | | title: '工序名称', |
| | | field: 'processName', |
| | | width: 250, |
| | | }, |
| | | { |
| | | title: '工序号', |
| | | field: 'routeProcessNumber', |
| | | width: 150, |
| | | field: 'routeProcessNumberTxt', |
| | | width: 100, |
| | | }, |
| | | { |
| | | title: '当前工序号', |
| | | field: 'currentProcessNumber', |
| | | width: 150, |
| | | field: 'currentProcessNumberTxt', |
| | | width: 100, |
| | | }, |
| | | { |
| | | title: '生产数量', |
| | | field: 'productionQuantity', |
| | | width: 100, |
| | | width: 80, |
| | | }, |
| | | { |
| | | title: '标准工时', |
| | | field: 'standardTime', |
| | | width: 100, |
| | | width: 80, |
| | | }, |
| | | { |
| | | title: '工序总工时', |
| | | field: 'processTotalTime', |
| | | width: 100, |
| | | width: 80, |
| | | |
| | | }, |
| | | { |
| | | title: '计划开工日', |
| | | field: 'processPlanStartDay', |
| | | width: 200, |
| | | field: 'processPlanStartDaytxt', |
| | | width: 140, |
| | | type:'html' |
| | | }, |
| | | { |
| | | title: '计划完工日', |
| | | field: 'processPlanEndDay', |
| | | width: 200, |
| | | field: 'processPlanEndDaytxt', |
| | | width: 140, |
| | | type:'html' |
| | | }, |
| | | { |
| | | title: '订单完工日', |
| | | field: 'orderPlanEndDay', |
| | | width: 200, |
| | | width: 120, |
| | | format: 'YYYY-MM-DD' |
| | | } |
| | | ]); |
| | | |
| | |
| | | function getList() { |
| | | loading.value = true; |
| | | listPlateStat(queryParams.value).then(response => { |
| | | aps_plate_process_statList.value = response.rows; |
| | | const listValue = response.rows; |
| | | listValue.forEach(listItem => { |
| | | listItem[`processPlanStartDaytxt`]= listItem.warning? `<font color="red">${listItem.processPlanStartDay}</font>` :listItem.processPlanStartDay; |
| | | listItem[`processPlanEndDaytxt`]= listItem.warning? `<font color="red">${listItem.processPlanEndDay}</font>` :listItem.processPlanEndDay; |
| | | listItem[`routeProcessNumberTxt`]= listItem.routeProcessNumber.toString().padStart(3, '0'); |
| | | listItem[`currentProcessNumberTxt`]= listItem.currentProcessNumber.toString().padStart(3, '0'); |
| | | |
| | | |
| | | }); |
| | | aps_plate_process_statList.value =listValue |
| | | total.value = response.total; |
| | | loading.value = false; |
| | | }); |
| | |
| | | |
| | | /** 重置按钮操作 */ |
| | | function resetQuery() { |
| | | queryParams.value.workOrderNo =''; |
| | | proxy.resetForm("queryRef"); |
| | | handleQuery(); |
| | | } |
| | |
| | | reset(); |
| | | updateStat().then(response => { |
| | | form.value = response.data; |
| | | open.value = true; |
| | | title.value = "修改钣金统计"; |
| | | |
| | | ElMessage({ |
| | | message: '数据更新成功', |
| | | type: 'success', |
| | |
| | | ...queryParams.value |
| | | }, `aps_plate_process_stat_${new Date().getTime()}.xlsx`) |
| | | } |
| | | |
| | | const headerCellClassName = ({ column }) => { |
| | | if (column.field === 'name') { |
| | | return 'col-blue' |
| | | } |
| | | return null |
| | | } |
| | | const rowClassName = ({ rowIndex }) => { |
| | | if ([2, 3, 5].includes(rowIndex)) { |
| | | return 'row-green' |
| | | } |
| | | return null |
| | | } |
| | | const cellClassName = ({ row, column }) => { |
| | | if (column.field === 'processPlanStartDay'||column.field === 'processPlanEndDay') { |
| | | if (row.warning) { |
| | | return 'col-orange' |
| | | } |
| | | } |
| | | return null |
| | | } |
| | | getList(); |
| | | </script> |
| | | <style lang="scss" scoped> |
| | | ::v-deep(.mytable-style.vxe-table .vxe-body--row.row-green) { |
| | | background-color: #187; |
| | | color: #fff; |
| | | } |
| | | ::v-deep(.mytable-style.vxe-table .vxe-header--column.col-blue) { |
| | | background-color: #2db7f5; |
| | | color: #fff; |
| | | } |
| | | ::v-deep(.mytable-style.vxe-table .vxe-body--column.col-red) { |
| | | background-color: red; |
| | | color: #fff; |
| | | } |
| | | </style> |