columns.js 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206
  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. const TableColumns = [
  90. {
  91. item: { key: "status", title: "单据状态", width: 100, },
  92. attr: {
  93. is: "el-dict-tag",
  94. dictName: "sys_status",
  95. clearable: true,
  96. }
  97. },
  98. {
  99. item: { key: "code", title: "单据号", width: 150, },
  100. attr: {}
  101. },
  102. {
  103. item: { key: "projectName", title: "项目名称" },
  104. attr: {}
  105. },
  106. {
  107. item: { key: "supplierName", title: "供应商" },
  108. attr: {}
  109. },
  110. {
  111. item: { key: "calculateSupplierName", title: "结算供应商" },
  112. attr: {}
  113. },
  114. {
  115. item: { key: "startDate", title: "结算开始日期", width: 120, },
  116. attr: {}
  117. },
  118. {
  119. item: { key: "endDate", title: "结算截止日期", width: 120, },
  120. attr: {}
  121. },
  122. {
  123. item: { key: "spdProjectName", title: "SPD项目" },
  124. attr: {}
  125. },
  126. {
  127. item: { key: "profileCenterName", title: "利润中心" },
  128. attr: {}
  129. },
  130. {
  131. item: { key: "saleOrgName", title: "销售组织" },
  132. attr: {}
  133. },
  134. {
  135. item: { key: "saleMonth", title: "销售月份", width: 100, },
  136. attr: {}
  137. },
  138. {
  139. item: { key: "priceSum", title: "价税合计", width: 120, },
  140. attr: {}
  141. },
  142. {
  143. item: { key: "serviceFee", title: "服务费", width: 120, },
  144. attr: {}
  145. },
  146. {
  147. item: { key: "materialCode", title: "物料编码" },
  148. attr: {}
  149. },
  150. {
  151. item: { key: "num", title: "数量", width: 100, },
  152. attr: {}
  153. },
  154. {
  155. item: { key: "isSaleOrder", title: "是否转销售订单", width: 100, },
  156. attr: {
  157. is: "el-dict-tag",
  158. dictName: "sys_yes_no",
  159. }
  160. },
  161. {
  162. item: { key: "saleOrderNo", title: "销售订单号" },
  163. attr: {}
  164. },
  165. {
  166. item: { key: "isReturnMoney", title: "是否回款", width: 80, },
  167. attr: {
  168. is: "el-dict-tag",
  169. dictName: "sys_return_money",
  170. }
  171. },
  172. {
  173. item: { key: "isTicket", title: "是否开票", width: 80, },
  174. attr: {
  175. is: "el-dict-tag",
  176. dictName: "sys_yes_no",
  177. }
  178. },
  179. {
  180. item: { key: "isOpen", title: "单据打开状态", width: 100, },
  181. attr: {
  182. is: "el-dict-tag",
  183. dictName: "sys_open_status",
  184. clearable: true,
  185. }
  186. },
  187. {
  188. item: { key: "isWhether", title: "是否带量", width: 100, },
  189. attr: {
  190. is: "el-dict-tag",
  191. dictName: "carry_or_not",
  192. clearable: true,
  193. }
  194. },
  195. ].map(({ item, attr }) => ({
  196. attr,
  197. item: {
  198. ...item,
  199. sortabled: true,
  200. fixedabled: true,
  201. filterabled: true,
  202. hiddenabled: true,
  203. },
  204. }));
  205. return { SearchColumns, TableColumns }
  206. }