columns.ts 8.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300
  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: 'operater', 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' , fixed: 'right'},
  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: 'operater', 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', slots: { header: 'total_header' },
  100. children: [
  101. { field: 'total_sales_current_monthly', title: '当月累计销售额', width: 120 },
  102. {
  103. field: 'total_sales_current_monthly_original',
  104. title: '当月累计销售额(本币)',
  105. editRender: {},
  106. slots: { edit: 'total_sales_current_monthly_edit' },
  107. width: 180,
  108. align: 'center'
  109. },
  110. ]
  111. },
  112. {
  113. field: 'impression',
  114. title: '广告曝光',
  115. editRender: {},
  116. slots: { edit: 'impression_edit' },
  117. width: 100,
  118. align: 'center'
  119. },
  120. {
  121. field: 'ad_click',
  122. title: '广告点击',
  123. editRender: {},
  124. slots: { edit: 'ad_click_edit' },
  125. width: 100,
  126. align: 'center'
  127. },
  128. {
  129. field: 'ad_order',
  130. title: '广告订单',
  131. editRender: {},
  132. slots: { edit: 'ad_order_edit' },
  133. width: 95,
  134. align: 'center'
  135. },
  136. {
  137. field: 'money_by_amazon',
  138. title: 'Amazon回款金额',
  139. editRender: {},
  140. slots: { edit: 'money_by_amazon_edit' },
  141. width: 134, align: 'center'
  142. },
  143. { field: 'currencyCodePlatform', title: '回款/余额币种', width: 115 ,align: 'center'},
  144. {
  145. field: 'money_by_other',
  146. title: 'Other回款金额',
  147. editRender: {},
  148. slots: { edit: 'money_by_other_edit' },
  149. width: 134, align: 'center'
  150. },
  151. { field: 'session', title: '流量', editRender: {}, slots: { edit: 'session_edit' }, width: 95, align: 'center' },
  152. { field: 'order', title: '订单', editRender: {}, slots: { edit: 'order_edit' }, width: 95, align: 'center' },
  153. {
  154. field: 'availableSalesDay',
  155. title: '当前存货可售天',
  156. editRender: {},
  157. slots: { edit: 'availableSalesDay_edit'},
  158. width: 120, align: 'center'
  159. },
  160. {
  161. field: 'intransitInventory',
  162. title: '当前在途库存',
  163. editRender: {},
  164. slots: { edit: 'intransitInventory_edit' },
  165. width: 120, align: 'center'
  166. },
  167. {
  168. field: 'overseasStorage',
  169. title: '当前海外仓库存',
  170. editRender: {},
  171. slots: { edit: 'overseasStorage_edit' },
  172. width: 120, align: 'center'
  173. },
  174. {
  175. field: 'refundRate',
  176. title: '最近90天平台退货率',
  177. editRender: {},
  178. slots: { edit: 'refundRate_edit' ,default: 'refundRate_default'},
  179. width: 120,
  180. align: 'center'
  181. },
  182. { title: '操作', width: 120, slots: { default: 'operate' }, fixed: 'right' },
  183. ]);
  184. export const monthColumns = ref([
  185. { field: 'platformNumber', title: '平台编号', fixed: 'left', width: 81, align: 'center' },
  186. { field: 'platformName', title: '平台名称', fixed: 'left', width: 142, align: 'center' },
  187. { field: 'country', title: '国家', fixed: 'left', width: 80, align: 'center' },
  188. { field: 'brandName', title: '品牌', fixed: 'left', width: 60 },
  189. { field: 'operater', title: '运营', fixed: 'left', width: 80, align: 'center' },
  190. { field: 'currencyCode', title: '平台币种', fixed: 'left', width: 80, align: 'center' },
  191. {
  192. title: '销售额', align: 'center', children: [
  193. { field: 'sales', title: '销售额', width: 120 },
  194. {
  195. field: 'sales_original',
  196. title: '销售额(本币)',
  197. editRender: {},
  198. slots: { edit: 'sales_original_edit' },
  199. minWidth: 123,
  200. },
  201. ]
  202. },
  203. {
  204. title: '广告销售额', align: 'center', children: [
  205. { field: 'ad_sales', title: '广告销售额', width: 120 },
  206. {
  207. field: 'ad_sales_original',
  208. title: '广告销售额(本币)',
  209. editRender: {},
  210. slots: { edit: 'ad_sales_original_edit' },
  211. minWidth: 151,
  212. },
  213. ]
  214. },
  215. {
  216. title: '广告花费', align: 'center', children: [
  217. { field: 'ad_cost', title: '广告花费', width: 120 },
  218. {
  219. field: 'ad_cost_original',
  220. title: '广告花费(本币)',
  221. editRender: {},
  222. slots: { edit: 'ad_cost_original_edit' },
  223. minWidth: 138,
  224. },
  225. ]
  226. },
  227. { field: 'impression', title: '广告曝光', editRender: {}, slots: { edit: 'impression_edit' }, width: 120 },
  228. { field: 'ad_click', title: '广告点击', editRender: {}, slots: { edit: 'ad_click_edit' }, width: 120 },
  229. { field: 'ad_order', title: '广告订单', editRender: {}, slots: { edit: 'ad_order_edit' }, width: 120 },
  230. { title: '操作', width: 120, slots: { default: 'operate' }, fixed: 'right' },
  231. ]);
  232. export const universal = [
  233. {
  234. field: 'platformNumber',
  235. title: '平台编号',
  236. fixed: 'left',
  237. align: 'center',
  238. minWidth: 75,
  239. slots: { default: 'platformNumber_default' }
  240. },
  241. {
  242. field: 'platformName',
  243. title: '平台名称',
  244. fixed: 'left',
  245. minWidth: 100,
  246. slots: { default: 'platformName_default' },
  247. align: 'center',
  248. titlePrefix: { icon: 'vxe-icon-goods-fill' },
  249. },
  250. {
  251. field: 'operater',
  252. title: '运营',
  253. fixed: 'left',
  254. minWidth: 75,
  255. align: 'center',
  256. titlePrefix: { icon: 'vxe-icon-user' }
  257. },
  258. {
  259. field: 'country',
  260. title: '国家',
  261. fixed: 'left',
  262. minWidth: 75,
  263. titlePrefix: { icon: 'vxe-icon-location' },
  264. align: 'center'
  265. },
  266. {
  267. field: 'brandName',
  268. title: '品牌',
  269. fixed: 'left',
  270. minWidth: 80,
  271. align: 'center',
  272. titlePrefix: { icon: 'vxe-icon-brand' },
  273. },
  274. //{
  275. // field: 'currencyCode',
  276. // title: '平台币种',
  277. // fixed: 'left',
  278. // minWidth: 75,
  279. // align: 'center',
  280. // slots: { default: 'currencyCode_default' }
  281. //},
  282. ];
  283. // 表格展示
  284. export const dayDataColumns = ref([
  285. ...universal
  286. ]);
  287. export const weekDataColumns = ref([
  288. ...universal
  289. ]);
  290. export const monthDataColumns = ref([
  291. ...universal
  292. ]);