newFactoryProductionScheduling.columns.js 6.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328
  1. export function createSchedulingColumns() {
  2. return [
  3. {
  4. width: 45,
  5. type: 'selection',
  6. columnKey: 'selection',
  7. align: 'center',
  8. slot: 'selection'
  9. },
  10. {
  11. label: '序号',
  12. prop: 'serialNumber',
  13. width: 55,
  14. align: 'center',
  15. showOverflowTooltip: true
  16. },
  17. {
  18. prop: 'batchNo',
  19. label: '批次号',
  20. align: 'center',
  21. minWidth: 140
  22. },
  23. {
  24. prop: 'code',
  25. label: '计划编号',
  26. align: 'center',
  27. minWidth: 160
  28. },
  29. {
  30. prop: 'productionLineName',
  31. label: '产线名称',
  32. align: 'center',
  33. minWidth: 160
  34. },
  35. {
  36. prop: 'productionLineRhythm',
  37. label: '产线节拍',
  38. align: 'center',
  39. minWidth: 160
  40. },
  41. {
  42. prop: 'startTime',
  43. label: '计划开始时间',
  44. align: 'center',
  45. width: 150,
  46. showOverflowTooltip: true
  47. },
  48. {
  49. prop: 'endTime',
  50. label: '计划结束时间',
  51. align: 'center',
  52. width: 150,
  53. showOverflowTooltip: true
  54. },
  55. {
  56. prop: 'deliveryTime',
  57. label: '交期',
  58. align: 'center',
  59. minWidth: 150
  60. },
  61. {
  62. prop: 'productCode',
  63. label: '编码',
  64. align: 'center',
  65. showOverflowTooltip: true,
  66. minWidth: 140
  67. },
  68. {
  69. prop: 'productName',
  70. label: '名称',
  71. align: 'center',
  72. showOverflowTooltip: true,
  73. minWidth: 140
  74. },
  75. {
  76. prop: 'specification',
  77. label: '规格',
  78. align: 'center',
  79. minWidth: 150,
  80. showOverflowTooltip: true
  81. },
  82. {
  83. prop: 'brandNo',
  84. label: '牌号',
  85. minWidth: 150,
  86. align: 'center',
  87. showOverflowTooltip: true
  88. },
  89. {
  90. prop: 'model',
  91. minWidth: 150,
  92. label: '型号',
  93. align: 'center',
  94. showOverflowTooltip: true
  95. },
  96. {
  97. prop: 'productionType',
  98. label: '生产类型',
  99. align: 'center',
  100. showOverflowTooltip: true,
  101. minWidth: 140
  102. },
  103. {
  104. prop: 'productNum',
  105. label: '计划数量',
  106. minWidth: 140,
  107. showOverflowTooltip: true,
  108. align: 'center'
  109. },
  110. {
  111. prop: 'unit',
  112. label: '单位',
  113. minWidth: 140,
  114. showOverflowTooltip: true,
  115. align: 'center'
  116. },
  117. {
  118. prop: 'assignmentName',
  119. label: '作业名称',
  120. minWidth: 140,
  121. showOverflowTooltip: true,
  122. align: 'center'
  123. },
  124. {
  125. prop: 'contractor',
  126. label: '承制单位',
  127. minWidth: 140,
  128. showOverflowTooltip: true,
  129. align: 'center'
  130. },
  131. {
  132. prop: 'planType',
  133. label: '计划类别',
  134. minWidth: 140,
  135. showOverflowTooltip: true,
  136. align: 'center',
  137. formatter: (row) => {
  138. const planTypeMap = [
  139. { label: '内销计划', value: '1' },
  140. { label: '外销计划', value: '2' },
  141. { label: '预制计划', value: '3' },
  142. { label: '改型计划', value: '4' },
  143. { label: '返工返修计划', value: '5' }
  144. ];
  145. const obj = planTypeMap.find((i) => i.value == row.planType);
  146. return obj && obj.label;
  147. }
  148. },
  149. {
  150. prop: 'dotLineStatus',
  151. slot: 'dotLineStatus',
  152. label: '布点状态',
  153. align: 'center',
  154. width: 80,
  155. showOverflowTooltip: true
  156. },
  157. {
  158. prop: 'produceType',
  159. label: 'BOM类型',
  160. align: 'center',
  161. showOverflowTooltip: true,
  162. width: 120,
  163. formatter: (row) => {
  164. if (row.produceType == 1) {
  165. return 'PBOM';
  166. }
  167. if (row.produceType == 2) {
  168. return 'MBOM';
  169. }
  170. if (row.produceType == 3) {
  171. return 'ABOM';
  172. }
  173. return '';
  174. }
  175. },
  176. {
  177. prop: 'bomCategoryName',
  178. label: 'BOM版本',
  179. align: 'center',
  180. showOverflowTooltip: true,
  181. width: 130,
  182. formatter: (row) => {
  183. if (row.bomCategoryName) {
  184. return `${row.bomCategoryName} (V${row.bomCategoryVersions}.0)`;
  185. }
  186. return '';
  187. }
  188. },
  189. {
  190. prop: 'produceRoutingName',
  191. label: '工艺路线',
  192. align: 'center',
  193. width: 140,
  194. showOverflowTooltip: true
  195. },
  196. {
  197. prop: 'priority',
  198. label: '优先级',
  199. align: 'center',
  200. minWidth: 120,
  201. slot: 'priority',
  202. sortable: 'custom'
  203. },
  204. {
  205. label: '操作',
  206. align: 'center',
  207. width: 100,
  208. slot: 'action',
  209. fixed: 'right'
  210. }
  211. ];
  212. }
  213. export function createWorkOrderSchedulingColumns() {
  214. return [
  215. {
  216. width: 45,
  217. type: 'selection',
  218. columnKey: 'selection',
  219. align: 'center',
  220. slot: 'selection'
  221. },
  222. {
  223. label: '序号',
  224. prop: 'serialNumber',
  225. width: 55,
  226. align: 'center',
  227. showOverflowTooltip: true
  228. },
  229. {
  230. prop: 'batchNo',
  231. label: '批次号',
  232. align: 'center',
  233. minWidth: 120,
  234. showOverflowTooltip: true
  235. },
  236. {
  237. prop: 'code',
  238. label: '生产订单号',
  239. align: 'center',
  240. minWidth: 170,
  241. showOverflowTooltip: true
  242. },
  243. {
  244. prop: 'workOrderType',
  245. label: '订单类型',
  246. align: 'center',
  247. width: 100,
  248. slot: 'workOrderType'
  249. },
  250. {
  251. prop: 'productionPlanCode',
  252. label: '计划编号',
  253. align: 'center',
  254. minWidth: 160,
  255. showOverflowTooltip: true
  256. },
  257. {
  258. prop: 'productCode',
  259. label: '产品编码',
  260. align: 'center',
  261. minWidth: 140,
  262. showOverflowTooltip: true
  263. },
  264. {
  265. prop: 'productName',
  266. label: '产品名称',
  267. align: 'center',
  268. minWidth: 170,
  269. showOverflowTooltip: true
  270. },
  271. {
  272. prop: 'productionCodes',
  273. label: '生产编号',
  274. align: 'center',
  275. minWidth: 150,
  276. showOverflowTooltip: true
  277. },
  278. {
  279. prop: 'formingNum',
  280. label: '订单数量',
  281. align: 'center',
  282. minWidth: 120,
  283. showOverflowTooltip: true,
  284. formatter: (row) => {
  285. const unit = row.measuringUnit || row.unit;
  286. return [row.formingNum, unit]
  287. .filter((item) => item !== null && item !== undefined && item !== '')
  288. .join('');
  289. }
  290. },
  291. {
  292. prop: 'planStartTime',
  293. label: '计划开始时间',
  294. align: 'center',
  295. width: 150,
  296. showOverflowTooltip: true
  297. },
  298. {
  299. prop: 'planCompleteTime',
  300. label: '计划结束时间',
  301. align: 'center',
  302. width: 150,
  303. showOverflowTooltip: true
  304. },
  305. {
  306. prop: 'firstTaskName',
  307. label: '首工序',
  308. align: 'center',
  309. minWidth: 120,
  310. showOverflowTooltip: true
  311. },
  312. {
  313. prop: 'workCenterName',
  314. label: '工作中心',
  315. align: 'center',
  316. minWidth: 120,
  317. showOverflowTooltip: true
  318. },
  319. {
  320. label: '操作',
  321. align: 'center',
  322. width: 100,
  323. slot: 'action',
  324. fixed: 'right'
  325. }
  326. ];
  327. }