DialogDayworkItemHistory.vue 2.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. <template>
  2. <el-dialog title="历史记录" v-model="visible" width="1400px" height="700px" @close="close" append-to-body draggable style="font-size: 14px;">
  3. <el-table ref="dialogTable" :data="recordsList" size="small" v-loading="loading" border height="500px" header-row-class-name="list-header-row" row-class-name="list-row" >
  4. <el-table-column label="批次号" align="center" prop="lotCode" />
  5. <el-table-column label="计划单号" align="center" prop="productionPlanNo" width="100" />
  6. <el-table-column label="产品描述" align="center" prop="productDescription" />
  7. <el-table-column label="工序" align="center" prop="processAlias" width="100" />
  8. <el-table-column label="投产量" align="center" prop="prodNum" width="80" />
  9. <el-table-column label="合格数" align="center" prop="qualifiedNum" width="80" />
  10. <el-table-column label="废品量" align="center" prop="rejectNum" width="80" />
  11. <el-table-column label="操作者" align="center" prop="nickName" width="80"/>
  12. <el-table-column label="开始时间" align="center" prop="startTime" >
  13. <template #default="scope">
  14. <span>{{
  15. proxy.moment(scope.row.startTime).format("YYYY-MM-DD HH:mm:ss")
  16. }}</span>
  17. </template>
  18. </el-table-column>
  19. <el-table-column label="结束时间" align="center" prop="endTime" >
  20. <template #default="scope">
  21. <span>{{
  22. proxy.moment(scope.row.endTime).format("YYYY-MM-DD HH:mm:ss")
  23. }}</span>
  24. </template>
  25. </el-table-column>
  26. <el-table-column label="修改人" align="center" prop="creatorName" width="80" />
  27. <el-table-column label="修改时间" align="center" prop="createTime" >
  28. <template #default="scope">
  29. <span>{{
  30. proxy.moment(scope.row.createTime).format("YYYY-MM-DD HH:mm:ss")
  31. }}</span>
  32. </template>
  33. </el-table-column>
  34. </el-table>
  35. </el-dialog>
  36. </template>
  37. <script setup>
  38. import { listHistory } from "@/api/business/dayworkItemHistory";
  39. const { proxy } = getCurrentInstance();
  40. /** 历史记录变量 */
  41. const recordsList = ref([])
  42. const visible = ref(false)
  43. const loading = ref(false)
  44. const data = reactive({
  45. queryParams: {
  46. dayworkId:null
  47. }
  48. })
  49. const { queryParams } = toRefs(data)
  50. /**
  51. * 对话框打开 事件
  52. */
  53. function open(data) {
  54. visible.value = true
  55. queryParams.value.dayworkId = data
  56. getList()
  57. }
  58. /**
  59. * 对话框关闭 事件
  60. */
  61. function close() {
  62. visible.value = false
  63. }
  64. /**
  65. * 加载数据
  66. */
  67. function getList() {
  68. loading.value = true
  69. listHistory(queryParams.value).then((res) => {
  70. recordsList.value = res.rows
  71. loading.value = false
  72. })
  73. }
  74. defineExpose({
  75. open
  76. })
  77. </script>
  78. <style scoped>
  79. .el-table--small {
  80. font-size: 14px;
  81. }</style>