feedBom.js 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210
  1. export const tableHeader = selectEquiType => {
  2. // 1:物料;4:生产设备; 5:模具;6:备品备件; 7:周转车;8:舟皿;9:产品;10:消耗材料,11:干燥区,12.质检,13.包装材料,14.工装夹具 ,15.刀具 ,99.其他
  3. switch (+selectEquiType) {
  4. case 1:
  5. return [
  6. {
  7. label: '名称',
  8. prop: 'name'
  9. },
  10. {
  11. label: '型号',
  12. prop: 'modelType'
  13. },
  14. {
  15. label: '规格',
  16. prop: 'specification'
  17. },
  18. {
  19. label: '牌号',
  20. prop: 'brandNum'
  21. }
  22. ]
  23. case 5:
  24. return [{
  25. label: '',
  26. prop: ['name', 'code'],
  27. write: false,
  28. extInfo: false
  29. },
  30. {
  31. label: '模具编号',
  32. prop: 'codeNumber',
  33. write: false,
  34. extInfo: false
  35. },
  36. {
  37. label: '已压制次数',
  38. prop: 'startCyTimes',
  39. write: false,
  40. extInfo: true
  41. },
  42. {
  43. label: '最大压制次数',
  44. prop: 'maxCyTimes',
  45. write: false,
  46. extInfo: true
  47. },
  48. ]
  49. case 7:
  50. return [{
  51. label: '规格',
  52. prop: 'specification'
  53. },
  54. {
  55. label: '材质',
  56. prop: 'texture',
  57. formatter(row) {
  58. if (!row?.extendField) return ''
  59. const extendField = JSON.parse(row.extendField)
  60. return extendField.texture
  61. }
  62. },
  63. {
  64. label: '长宽高',
  65. prop: '',
  66. formatter(row) {
  67. if (!row?.extendField) return ''
  68. const extendField = JSON.parse(row.extendField)
  69. return `${extendField.length || '-'}*${extendField.width || '-'}*${
  70. extendField.high || '-'
  71. }`
  72. }
  73. }
  74. ]
  75. case 8: //'舟皿'
  76. return [{
  77. label: '规格',
  78. prop: 'specification'
  79. },
  80. {
  81. label: '型号',
  82. prop: 'modelType'
  83. },
  84. {
  85. label: '槽数',
  86. prop: '',
  87. formatter(row) {
  88. return row.extInfo.slotNum
  89. }
  90. },
  91. ]
  92. case 10:
  93. return []
  94. case 13:
  95. return [
  96. {
  97. label: '规格',
  98. prop: 'specification'
  99. },
  100. {
  101. label: '型号',
  102. prop: 'modelType'
  103. },
  104. ]
  105. case 14:
  106. return []
  107. case 2:
  108. return [
  109. {
  110. label: '型号',
  111. prop: 'modelType'
  112. },
  113. {
  114. label: '规格',
  115. prop: 'specification'
  116. },
  117. {
  118. label: '牌号',
  119. prop: 'brandNum'
  120. }
  121. ]
  122. case 23:
  123. return [
  124. {
  125. label: '型号',
  126. prop: 'modelType'
  127. },
  128. {
  129. label: '规格',
  130. prop: 'specification'
  131. },
  132. {
  133. label: '牌号',
  134. prop: 'brandNum'
  135. }
  136. ]
  137. case 9:
  138. return [
  139. {
  140. label: '型号',
  141. prop: 'modelType'
  142. },
  143. {
  144. label: '规格',
  145. prop: 'specification'
  146. },
  147. {
  148. label: '牌号',
  149. prop: 'brandNum'
  150. }
  151. ]
  152. case 28:
  153. return [
  154. {
  155. label: '型号',
  156. prop: 'modelType'
  157. },
  158. {
  159. label: '规格',
  160. prop: 'specification'
  161. },
  162. {
  163. label: '牌号',
  164. prop: 'brandNum'
  165. }
  166. ]
  167. }
  168. return []
  169. }