shared.ts 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. export const typeOptions = [
  2. { value: '1', label: '入库' },
  3. // { value: '2', label: '出库' },
  4. { value: '3', label: '入库红冲' },
  5. // { value: '4', label: '出库红冲' },
  6. ]
  7. export const mapLabelToType = typeOptions.reduce((prev, current) => ({
  8. ...prev,
  9. [current.label]: current.value
  10. }), {})
  11. export const sourceOptions = [
  12. { value: '1', label: '采销结算' },
  13. { value: '2', label: '线下订单' }
  14. ]
  15. export const mapLabelToSource = sourceOptions.reduce((prev, current) => ({
  16. ...prev,
  17. [current.label]: current.value
  18. }), {})
  19. export const statusOptions = [
  20. { value: '1', label: '待处理', type: 'warning' },
  21. { value: '2', label: '处理完成', type: 'success' }
  22. ]
  23. export const managerStatusOptions = [
  24. { value: '1', label: '正常' },
  25. { value: '2', label: '计提' },
  26. { value: '3', label: '异常' }
  27. ]
  28. export const diffOptions = [
  29. { value: '1', label: '一致' },
  30. { value: '2', label: '不一致' },
  31. ]
  32. export const mapDiffOptions =diffOptions.reduce((prev, current) => ({
  33. ...prev,
  34. [current.label]: current.value
  35. }), {})