columns.ts 8.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299
  1. import { ref } from 'vue';
  2. //数据录入
  3. export const dayColumns = ref([
  4. { field: 'platformNumber', title: '平台编号', align: 'center', width: 90, },
  5. { field: 'platformName', title: '平台名称', align: 'center', width: 142, },
  6. { field: 'country', title: '国家', align: 'center', width: 90, },
  7. { field: 'brandName', title: '品牌', align: 'center', width: 90, },
  8. { field: 'user_name', title: '运营', align: 'center', width: 100 },
  9. { field: 'currencyCode', title: '平台币种', align: 'center', width: 100 },
  10. {
  11. title: '销售额', align: 'center', children: [
  12. { field: 'sales', title: '销售额', align: 'center', minWidth: 120 },
  13. {
  14. field: 'sales_original',
  15. title: '销售额(本币)',
  16. editRender: {},
  17. slots: { edit: 'sales_original_edit' },
  18. width: 123,
  19. align: 'center'
  20. },
  21. ]
  22. },
  23. {
  24. title: '广告销售额', align: 'center', children: [
  25. { field: 'ad_sales', title: '广告销售额', align: 'center', minWidth: 120 },
  26. {
  27. field: 'ad_sales_original',
  28. title: '广告销售额(本币)',
  29. editRender: {},
  30. slots: { edit: 'ad_sales_original_edit' },
  31. width: 151,
  32. align: 'center'
  33. },
  34. ]
  35. },
  36. //{field: 'sales', title: '销售额', editRender: {}, slots: {edit: 'sales_edit', default: 'sales_default',header: 'sales_header'}},
  37. {
  38. title: '广告花费', align: 'center', children: [
  39. { field: 'ad_cost', title: '广告花费', align: 'center', minWidth: 120 },
  40. {
  41. field: 'ad_cost_original',
  42. title: '广告花费(本币)',
  43. editRender: {},
  44. slots: { edit: 'ad_cost_original_edit' },
  45. width: 138,
  46. align: 'center'
  47. },
  48. ]
  49. },
  50. { title: '操作', width: 120, slots: { default: 'operate' }, align: 'center' },
  51. ]);
  52. export const weekColumns = ref([
  53. { field: 'platformNumber', title: '平台编号', fixed: 'left', width: 81, align: 'center' },
  54. { field: 'platformName', title: '平台名称', fixed: 'left', width: 142, align: 'center' },
  55. { field: 'country', title: '国家', fixed: 'left', width: 80, align: 'center' },
  56. { field: 'brandName', title: '品牌', fixed: 'left', width: 60 },
  57. { field: 'user_name', title: '运营', fixed: 'left', width: 80, align: 'center' },
  58. { field: 'currencyCode', title: '平台币种', fixed: 'left', width: 80, align: 'center' },
  59. {
  60. title: '销售额', align: 'center', children: [
  61. { field: 'sales', title: '销售额', width: 120, align: 'center' },
  62. {
  63. field: 'sales_original',
  64. title: '销售额(本币)',
  65. editRender: {},
  66. slots: { edit: 'sales_original_edit' },
  67. width: 123,
  68. align: 'center'
  69. },
  70. ]
  71. },
  72. {
  73. title: '广告销售额', align: 'center', children: [
  74. { field: 'ad_sales', title: '广告销售额', width: 120 },
  75. {
  76. field: 'ad_sales_original',
  77. title: '广告销售额(本币)',
  78. editRender: {},
  79. slots: { edit: 'ad_sales_original_edit' },
  80. width: 151,
  81. align: 'center'
  82. },
  83. ]
  84. },
  85. {
  86. title: '广告花费', align: 'center', children: [
  87. { field: 'ad_cost', title: '广告花费', width: 120, align: 'center' },
  88. {
  89. field: 'ad_cost_original',
  90. title: '广告花费(本币)',
  91. editRender: {},
  92. slots: { edit: 'ad_cost_original_edit' },
  93. width: 138,
  94. align: 'center'
  95. },
  96. ]
  97. },
  98. {
  99. title: '当月累计销售额', align: 'center', children: [
  100. { field: 'total_sales_current_monthly', title: '当月累计销售额', width: 120 },
  101. {
  102. field: 'total_sales_current_monthly_original',
  103. title: '当月累计销售额(本币)',
  104. editRender: {},
  105. slots: { edit: 'total_sales_current_monthly_edit' },
  106. width: 180,
  107. align: 'center'
  108. },
  109. ]
  110. },
  111. {
  112. field: 'impression',
  113. title: '广告曝光',
  114. editRender: {},
  115. slots: { edit: 'impression_edit' },
  116. width: 100,
  117. align: 'center'
  118. },
  119. {
  120. field: 'ad_click',
  121. title: '广告点击',
  122. editRender: {},
  123. slots: { edit: 'ad_click_edit' },
  124. width: 100,
  125. align: 'center'
  126. },
  127. {
  128. field: 'ad_order',
  129. title: '广告订单',
  130. editRender: {},
  131. slots: { edit: 'ad_order_edit' },
  132. width: 95,
  133. align: 'center'
  134. },
  135. {
  136. field: 'money_by_amazon',
  137. title: 'Amazon回款金额',
  138. editRender: {},
  139. slots: { edit: 'money_by_amazon_edit' },
  140. width: 134, align: 'center'
  141. },
  142. { field: 'currencyCodePlatform', title: '回款/余额币种', width: 115 ,align: 'center'},
  143. {
  144. field: 'money_by_other',
  145. title: 'Other回款金额',
  146. editRender: {},
  147. slots: { edit: 'money_by_other_edit' },
  148. width: 134, align: 'center'
  149. },
  150. { field: 'session', title: '流量', editRender: {}, slots: { edit: 'session_edit' }, width: 95, align: 'center' },
  151. { field: 'order', title: '订单', editRender: {}, slots: { edit: 'order_edit' }, width: 95, align: 'center' },
  152. {
  153. field: 'availableSalesDay',
  154. title: '当前存货可售天',
  155. editRender: {},
  156. slots: { edit: 'availableSalesDay_edit'},
  157. width: 120, align: 'center'
  158. },
  159. {
  160. field: 'intransitInventory',
  161. title: '当前在途库存',
  162. editRender: {},
  163. slots: { edit: 'intransitInventory_edit' },
  164. width: 120, align: 'center'
  165. },
  166. {
  167. field: 'overseasStorage',
  168. title: '当前海外仓库存',
  169. editRender: {},
  170. slots: { edit: 'overseasStorage_edit' },
  171. width: 120, align: 'center'
  172. },
  173. {
  174. field: 'refundRate',
  175. title: '最近90天平台退货率',
  176. editRender: {},
  177. slots: { edit: 'refundRate_edit' ,default: 'refundRate_default'},
  178. width: 120,
  179. align: 'center'
  180. },
  181. { title: '操作', width: 120, slots: { default: 'operate' }, fixed: 'right' },
  182. ]);
  183. export const monthColumns = ref([
  184. { field: 'platformNumber', title: '平台编号', fixed: 'left', width: 81, align: 'center' },
  185. { field: 'platformName', title: '平台名称', fixed: 'left', width: 142, align: 'center' },
  186. { field: 'country', title: '国家', fixed: 'left', width: 80, align: 'center' },
  187. { field: 'brandName', title: '品牌', fixed: 'left', width: 60 },
  188. { field: 'user_name', title: '运营', fixed: 'left', width: 80, align: 'center' },
  189. { field: 'currencyCode', title: '平台币种', fixed: 'left', width: 80, align: 'center' },
  190. {
  191. title: '销售额', align: 'center', children: [
  192. { field: 'sales', title: '销售额', width: 120 },
  193. {
  194. field: 'sales_original',
  195. title: '销售额(本币)',
  196. editRender: {},
  197. slots: { edit: 'sales_original_edit' },
  198. width: 123,
  199. },
  200. ]
  201. },
  202. {
  203. title: '广告销售额', align: 'center', children: [
  204. { field: 'ad_sales', title: '广告销售额', width: 120 },
  205. {
  206. field: 'ad_sales_original',
  207. title: '广告销售额(本币)',
  208. editRender: {},
  209. slots: { edit: 'ad_sales_original_edit' },
  210. width: 151,
  211. },
  212. ]
  213. },
  214. {
  215. title: '广告花费', align: 'center', children: [
  216. { field: 'ad_cost', title: '广告花费', width: 120 },
  217. {
  218. field: 'ad_cost_original',
  219. title: '广告花费(本币)',
  220. editRender: {},
  221. slots: { edit: 'ad_cost_original_edit' },
  222. width: 138,
  223. },
  224. ]
  225. },
  226. { field: 'impression', title: '广告曝光', editRender: {}, slots: { edit: 'impression_edit' }, width: 120 },
  227. { field: 'ad_click', title: '广告点击', editRender: {}, slots: { edit: 'ad_click_edit' }, width: 120 },
  228. { field: 'ad_order', title: '广告订单', editRender: {}, slots: { edit: 'ad_order_edit' }, width: 120 },
  229. { title: '操作', width: 120, slots: { default: 'operate' }, fixed: 'right' },
  230. ]);
  231. export const universal = [
  232. {
  233. field: 'platformNumber',
  234. title: '平台编号',
  235. fixed: 'left',
  236. align: 'center',
  237. minWidth: 75,
  238. slots: { default: 'platformNumber_default' }
  239. },
  240. {
  241. field: 'platformName',
  242. title: '平台名称',
  243. fixed: 'left',
  244. minWidth: 93,
  245. slots: { default: 'platformName_default' },
  246. align: 'center',
  247. titlePrefix: { icon: 'vxe-icon-goods-fill' },
  248. },
  249. {
  250. field: 'user_name',
  251. title: '运营',
  252. fixed: 'left',
  253. minWidth: 75,
  254. align: 'center',
  255. titlePrefix: { icon: 'vxe-icon-user' }
  256. },
  257. {
  258. field: 'country',
  259. title: '国家',
  260. fixed: 'left',
  261. minWidth: 75,
  262. titlePrefix: { icon: 'vxe-icon-location' },
  263. align: 'center'
  264. },
  265. {
  266. field: 'brandName',
  267. title: '品牌',
  268. fixed: 'left',
  269. minWidth: 75,
  270. align: 'center',
  271. titlePrefix: { icon: 'vxe-icon-brand' },
  272. },
  273. {
  274. field: 'currencyCode',
  275. title: '平台币种',
  276. fixed: 'left',
  277. minWidth: 75,
  278. align: 'center',
  279. slots: { default: 'currencyCode_default' }
  280. },
  281. ];
  282. // 表格展示
  283. export const dayDataColumns = ref([
  284. ...universal
  285. ]);
  286. export const weekDataColumns = ref([
  287. ...universal
  288. ]);
  289. export const monthDataColumns = ref([
  290. ...universal
  291. ]);