columns.js 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226
  1. export default function useColumns() {
  2. const SearchColumns = [
  3. {
  4. item: { key: "projectName", title: "项目名称" },
  5. attr: {
  6. is: "el-input",
  7. clearable: true,
  8. }
  9. },
  10. {
  11. item: { key: "supplierName", title: "供应商" },
  12. attr: {
  13. is: "el-popover-select-v2",
  14. referName: "SUPPLIER_PARAM",
  15. valueKey: "name",
  16. dataMapping: {
  17. supplier: "code",
  18. supplierName: "name",
  19. },
  20. clearable: true,
  21. }
  22. },
  23. {
  24. item: { key: "spdProjectName", title: "SPD项目" },
  25. attr: {
  26. is: "el-popover-select-v2",
  27. referName: "CUSTOMER_PARAM",
  28. valueKey: "name",
  29. dataMapping: {
  30. spdProject: "code",
  31. spdProjectName: "name",
  32. },
  33. clearable: true,
  34. }
  35. },
  36. {
  37. item: { key: "saleOrgName", title: "销售组织" },
  38. attr: {
  39. is: "el-popover-select-v2",
  40. referName: "ORG_PARAM",
  41. valueKey: "name",
  42. dataMapping: {
  43. saleOrg: "id",
  44. saleOrgName: "name",
  45. },
  46. clearable: true,
  47. }
  48. },
  49. {
  50. item: { key: "materialCode", title: "物料编码" },
  51. attr: {
  52. clearable: true,
  53. is: "el-popover-select-v2",
  54. valueKey: "code",
  55. referName: "MATERIAL_PARAM",
  56. }
  57. },
  58. {
  59. item: { key: "isTicket", title: "是否开票" },
  60. attr: {
  61. is: "el-select",
  62. dictName: "sys_yes_no",
  63. clearable: true,
  64. }
  65. },
  66. {
  67. item: { key: "saleOrderNo", title: "销售订单号" },
  68. attr: {
  69. is: "el-input",
  70. clearable: true,
  71. }
  72. },
  73. {
  74. item: { key: "status", title: "单据状态" },
  75. attr: {
  76. is: "el-select",
  77. dictName: "sys_status",
  78. clearable: true,
  79. }
  80. },
  81. {
  82. item: { key: "code", title: "单据号" },
  83. attr: {
  84. is: "el-input",
  85. clearable: true,
  86. }
  87. },
  88. {
  89. item: { key: "sumTimeRange", title: "汇总时间", span: 12 },
  90. attr: {
  91. is: "el-date-picker",
  92. type: "datetimerange",
  93. placeholder: "请选择",
  94. valueFormat: "yyyy-MM-dd HH:mm:ss",
  95. clearable: true,
  96. }
  97. },
  98. ];
  99. const TableColumns = [
  100. {
  101. item: { key: "status", title: "单据状态", width: 100, },
  102. attr: {
  103. is: "el-dict-tag",
  104. dictName: "sys_status",
  105. clearable: true,
  106. }
  107. },
  108. {
  109. item: { key: "code", title: "单据号", width: 150, },
  110. attr: {}
  111. },
  112. {
  113. item: { key: "projectName", title: "项目名称" },
  114. attr: {}
  115. },
  116. {
  117. item: { key: "supplierName", title: "供应商" },
  118. attr: {}
  119. },
  120. {
  121. item: { key: "calculateSupplierName", title: "结算供应商" },
  122. attr: {}
  123. },
  124. {
  125. item: { key: "startDate", title: "结算开始日期", width: 120, },
  126. attr: {}
  127. },
  128. {
  129. item: { key: "endDate", title: "结算截止日期", width: 120, },
  130. attr: {}
  131. },
  132. {
  133. item: { key: "spdProjectName", title: "SPD项目" },
  134. attr: {}
  135. },
  136. {
  137. item: { key: "profileCenterName", title: "利润中心" },
  138. attr: {}
  139. },
  140. {
  141. item: { key: "saleOrgName", title: "销售组织" },
  142. attr: {}
  143. },
  144. {
  145. item: { key: "saleMonth", title: "销售月份", width: 100, },
  146. attr: {}
  147. },
  148. {
  149. item: { key: "priceSum", title: "价税合计", width: 120, },
  150. attr: {}
  151. },
  152. {
  153. item: { key: "serviceFee", title: "服务费", width: 120, },
  154. attr: {}
  155. },
  156. {
  157. item: { key: "materialCode", title: "物料编码" },
  158. attr: {}
  159. },
  160. {
  161. item: { key: "num", title: "数量", width: 100, },
  162. attr: {}
  163. },
  164. {
  165. item: { key: "isSaleOrder", title: "是否转销售订单", width: 100, },
  166. attr: {
  167. is: "el-dict-tag",
  168. dictName: "sys_yes_no",
  169. }
  170. },
  171. {
  172. item: { key: "saleOrderNo", title: "销售订单号" },
  173. attr: {}
  174. },
  175. {
  176. item: { key: "isReturnMoney", title: "是否回款", width: 80, },
  177. attr: {
  178. is: "el-dict-tag",
  179. dictName: "sys_return_money",
  180. }
  181. },
  182. {
  183. item: { key: "isTicket", title: "是否开票", width: 80, },
  184. attr: {
  185. is: "el-dict-tag",
  186. dictName: "sys_yes_no",
  187. }
  188. },
  189. {
  190. item: { key: "isOpen", title: "单据打开状态", width: 100, },
  191. attr: {
  192. is: "el-dict-tag",
  193. dictName: "sys_open_status",
  194. clearable: true,
  195. }
  196. },
  197. {
  198. item: { key: "isWhether", title: "是否带量", width: 100, },
  199. attr: {
  200. is: "el-dict-tag",
  201. dictName: "carry_or_not",
  202. clearable: true,
  203. }
  204. },
  205. {
  206. item: { key: "createTime", title: "汇总时间", width: 150, },
  207. attr: {}
  208. },
  209. {
  210. item: { key: "remark", title: "备注", },
  211. attr: {}
  212. },
  213. ].map(({ item, attr }) => ({
  214. attr,
  215. item: {
  216. ...item,
  217. sortabled: true,
  218. fixedabled: true,
  219. filterabled: true,
  220. hiddenabled: true,
  221. },
  222. }));
  223. return { SearchColumns, TableColumns }
  224. }