report-config.ts 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153
  1. export interface ConstructionDailyReportRow {
  2. id?: number
  3. deptId?: number
  4. projectId?: number
  5. taskId?: number
  6. status?: number
  7. auditStatus?: number
  8. createTime?: number | string
  9. deptName?: string
  10. projectName?: string
  11. location?: string
  12. mainDeviceNum?: number | null
  13. wellName?: string
  14. wokDeviceNum?: number | null
  15. fiveStatusLabel?: string
  16. dailyWorkingLayers?: number | null
  17. dailySandVolume?: number | null
  18. dailyLiquidVolume?: number | null
  19. jingshu?: number | null
  20. cengshu?: number | null
  21. dailyFuel?: number | null
  22. nonProductionTime?: number | null
  23. nptReason?: string
  24. singleWellWorkload?: number | string | null
  25. productionStatus?: string
  26. planWorkingLayers?: number | null
  27. weather?: string
  28. temperature?: string
  29. deviceNames?: string
  30. customer?: string
  31. reportName?: string
  32. constructionEndDate?: string | number
  33. constructionStartDate?: string | number
  34. monthWorkingLayers?: number | null
  35. monthWorkingWells?: number | null
  36. }
  37. export interface ConstructionDailyReportQuery {
  38. pageNo: number
  39. pageSize: number
  40. deptId?: number
  41. projectName?: string
  42. wellName?: string
  43. createTime?: string[]
  44. }
  45. export interface ConstructionDailyReportField {
  46. prop: keyof ConstructionDailyReportRow
  47. label: string
  48. type?: 'text' | 'number' | 'textarea'
  49. span?: 1 | 2
  50. precision?: number
  51. }
  52. export interface ConstructionDailyReportSection {
  53. title: string
  54. fields: ConstructionDailyReportField[]
  55. }
  56. export const tableColumns: Array<{
  57. prop: keyof ConstructionDailyReportRow
  58. label: string
  59. width?: number
  60. minWidth?: number
  61. fixed?: 'left' | 'right'
  62. }> = [
  63. { prop: 'reportName', label: '日报名称', minWidth: 180, fixed: 'left' },
  64. { prop: 'createTime', label: '创建(施工)日期', width: 120 },
  65. // { prop: 'constructionStartDate', label: '施工开始日期', width: 120 },
  66. { prop: 'constructionEndDate', label: '施工结束日期', width: 120 },
  67. { prop: 'projectName', label: '项目', minWidth: 160, fixed: 'left' },
  68. { prop: 'location', label: '施工区域', minWidth: 140 },
  69. { prop: 'deptName', label: '队伍', minWidth: 140 },
  70. { prop: 'mainDeviceNum', label: '主设备(泵车)数量', width: 110 },
  71. { prop: 'wellName', label: '生产任务', minWidth: 140 },
  72. { prop: 'wokDeviceNum', label: '作业泵车数量', width: 120 },
  73. { prop: 'fiveStatusLabel', label: '队伍状态', minWidth: 120 },
  74. { prop: 'dailyWorkingLayers', label: '当日主压层数', width: 120 },
  75. { prop: 'dailySandVolume', label: '当日加砂量(吨)', width: 120 },
  76. { prop: 'dailyLiquidVolume', label: '当日注液量(‌m³)', width: 120 },
  77. { prop: 'monthWorkingWells', label: '当月作业井数', width: 120 },
  78. { prop: 'monthWorkingLayers', label: '当月作业层数', width: 120 },
  79. { prop: 'dailyFuel', label: '当日油耗(L)', width: 110 },
  80. { prop: 'nonProductionTime', label: '当日非生产时间', width: 130 },
  81. { prop: 'nptReason', label: '造成非生产时间原因', minWidth: 180 },
  82. { prop: 'singleWellWorkload', label: '单井工作量', width: 120 },
  83. { prop: 'productionStatus', label: '施工动态', minWidth: 180 },
  84. { prop: 'planWorkingLayers', label: '本月计划层数', width: 120 },
  85. { prop: 'weather', label: '天气', width: 100 },
  86. { prop: 'temperature', label: '气温', width: 100 },
  87. { prop: 'deviceNames', label: '设备名称', minWidth: 180 },
  88. { prop: 'customer', label: '合同甲方', minWidth: 140 }
  89. ]
  90. export const formSections: ConstructionDailyReportSection[] = [
  91. {
  92. title: '基础信息',
  93. fields: [
  94. { prop: 'reportName', label: '日报名称' },
  95. { prop: 'createTime', label: '日报日期' },
  96. { prop: 'constructionEndDate', label: '施工结束日期' },
  97. { prop: 'projectName', label: '项目' },
  98. { prop: 'location', label: '施工区域' },
  99. { prop: 'deptName', label: '队伍' },
  100. { prop: 'wellName', label: '生产任务' },
  101. { prop: 'deviceNames', label: '设备名称', span: 2 },
  102. { prop: 'customer', label: '合同甲方' }
  103. ]
  104. },
  105. {
  106. title: '生产数据',
  107. fields: [
  108. { prop: 'mainDeviceNum', label: '主设备数量', type: 'number' },
  109. { prop: 'wokDeviceNum', label: '作业泵车数量', type: 'number' },
  110. { prop: 'fiveStatusLabel', label: '队伍状态' },
  111. { prop: 'dailyWorkingLayers', label: '当日主压层数', type: 'number', precision: 2 },
  112. { prop: 'dailySandVolume', label: '当日加砂量', type: 'number', precision: 2 },
  113. { prop: 'dailyLiquidVolume', label: '当日注液量', type: 'number', precision: 2 },
  114. { prop: 'jingshu', label: '当月作业井数', type: 'number' },
  115. { prop: 'cengshu', label: '当月作业层数', type: 'number' },
  116. { prop: 'dailyFuel', label: '当日油耗', type: 'number', precision: 2 },
  117. { prop: 'nonProductionTime', label: '当日非生产时间', type: 'number', precision: 2 },
  118. { prop: 'singleWellWorkload', label: '单井工作量' },
  119. { prop: 'planWorkingLayers', label: '本月计划层数', type: 'number', precision: 2 }
  120. ]
  121. },
  122. {
  123. title: '现场说明',
  124. fields: [
  125. { prop: 'nptReason', label: '造成非生产时间原因', type: 'textarea', span: 2 },
  126. { prop: 'productionStatus', label: '施工动态', type: 'textarea', span: 2 },
  127. { prop: 'weather', label: '天气' },
  128. { prop: 'temperature', label: '气温' }
  129. ]
  130. }
  131. ]
  132. export function createEmptyConstructionDailyReport(): ConstructionDailyReportRow {
  133. return {
  134. mainDeviceNum: null,
  135. wokDeviceNum: null,
  136. dailyWorkingLayers: null,
  137. dailySandVolume: null,
  138. dailyLiquidVolume: null,
  139. jingshu: null,
  140. cengshu: null,
  141. dailyFuel: null,
  142. nonProductionTime: null,
  143. singleWellWorkload: null,
  144. planWorkingLayers: null
  145. }
  146. }