report-config.ts 6.0 KB

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