You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

88 lines
4.5 KiB

2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
  1. <template>
  2. <div
  3. class="PaymentDetails tw-bg-white tw-rounded-[20px] tw-text-base-primary tw-p-5 tw-h-auto"
  4. v-if="BookingOrder.Payment && BookingOrder.OnSiteService.Provider"
  5. >
  6. <div class="tw-body-3 tw-font-bold tw-mb-[11.5px]">{{ $t('Payment Details') }}</div>
  7. <div class="tw-mb-[10px]">
  8. <div class="tw-py-[20px] t14 tw-font-bold tw-inline-block tw-mr-[40px]">
  9. <div class="tw-mb-[12px]">{{ $t('Payment Method') }}</div>
  10. <div class="tw-mb-[12px]">{{ $t('Payment Terms') }}</div>
  11. <div v-if="BookingOrder.Payment.PaymentDate" class="tw-mb-[12px]">{{ $t('Payment Date') }}</div>
  12. <div>{{ $t('Total Amount') }}</div>
  13. </div>
  14. <div class="t14 tw-inline-block">
  15. <div class="tw-mb-[12px]">
  16. {{ BookingOrder.PaymentType ? paymentMethodMap(BookingOrder.PaymentType) : "尚未確認付款方式" }}
  17. </div>
  18. <div class="tw-mb-[12px]">
  19. 全額付款
  20. </div>
  21. <div v-if="BookingOrder.Payment.PaymentDate" class="tw-mb-[12px]">
  22. {{ BookingOrder.Payment.PaymentDate ? new Date(BookingOrder.Payment.PaymentDate).toLocaleString() : "尚未付款" }}
  23. </div>
  24. <div>
  25. ${{ BookingOrder.TotalPrice }} {{ BookingOrder.Currency.CurrencyName }}
  26. </div>
  27. </div>
  28. </div>
  29. <div v-if="BookingOrder.PaymentStatus == '01' && BookingOrder.PaymentType == '3'" class="tw-flex">
  30. <img src="~/assets/img/icons/Icon.png" class="tw-w-[20px] tw-h-[20px] tw-mr-[5px]" />
  31. <div class="tw-text-[#ffb70a]">{{ $t('This Booking is Unpaid') }}</div>
  32. </div>
  33. <div v-if="BookingOrder.PaymentStatus == '01' && BookingOrder.PaymentType == '2' && BookingOrder.OnSiteService.Provider.ProviderStatus == null" class="tw-flex">
  34. <img src="~/assets/img/icons/Icon.png" class="tw-w-[20px] tw-h-[20px] tw-mr-[5px]" />
  35. <div class="tw-text-[#ffb70a]">等待供應商確認後提供匯款訊息</div>
  36. </div>
  37. <div
  38. class="tw-grid tw-grid-rows-[40px_40px_auto] tw-gap-[10px_12px] md:tw-grid-cols-[129px_175px_auto] md:tw-grid-rows-none md:tw-items-center md:tw-gap-[24px]"
  39. >
  40. <button v-if="BookingOrder.BookingStatus == '02' && BookingOrder.PaymentType == '2' && BookingOrder.OnSiteService.Provider.ProviderStatus != '04'"
  41. class="t14 tw-text-complementary-1 tw-p-[11px] tw-font-bold tw-bg-[#EFF3FF] tw-max-w-[129px] tw-rounded-[10px] hover:tw-text-[#A0B5FF] no-print"
  42. @click="$emit('banking-details')"
  43. >
  44. {{ $t('Banking Details') }}
  45. </button>
  46. <button v-if="BookingOrder.BookingStatus == '02' && BookingOrder.PaymentStatus == '01' && BookingOrder.PaymentType == '2' && BookingOrder.Payment.Remittance == null"
  47. class="button-border t14 tw-text-primary-1 tw-p-[11px] tw-font-bold tw-border tw-border-solid tw-rounded-[10px] tw-border-primary-1 tw-max-w-[175px] hover:tw-bg-primary-3 no-print"
  48. @click="$emit('upload-remittanceSlip')"
  49. >
  50. {{ $t('Upload Remittance Slip') }}
  51. </button>
  52. <button v-if="BookingOrder.BookingStatus == '02' && BookingOrder.PaymentStatus == '02' && BookingOrder.PaymentType == '2' && BookingOrder.Payment.Remittance != null"
  53. class="button-border t14 tw-text-primary-1 tw-p-[11px] tw-font-bold tw-border tw-border-solid tw-rounded-[10px] tw-border-primary-1 tw-max-w-[175px] hover:tw-bg-primary-3 no-print"
  54. @click="$emit('upload-remittanceSlip')"
  55. >
  56. {{ $t('Upload Remittance Slip Again') }}
  57. </button>
  58. <div v-if="BookingOrder.BookingStatus == '02' && BookingOrder.PaymentStatus == '01' && BookingOrder.PaymentType == '2' && BookingOrder.Payment.Remittance == null" class="t14 tw-font-normal tw-text-[#EE9546]">
  59. {{ $t('Please upload your remittance slip as soon as the bill has been transferred.') }}
  60. </div>
  61. <button v-if="BookingOrder.BookingStatus == '02' && BookingOrder.PaymentStatus == '02' && BookingOrder.PaymentType == '2' && BookingOrder.Payment.Remittance != null"
  62. class="t14 tw-text-complementary-1 tw-underline tw-underline-complementary-1 tw-max-w-[110px] no-print"
  63. @click="$emit('open-remittanceSlip', BookingOrder.Payment.Remittance)"
  64. >
  65. {{ BookingOrder.Payment.RemittanceFileName }}
  66. </button>
  67. </div>
  68. </div>
  69. </template>
  70. <script>
  71. import { paymentMethodMap, paymentTermMap } from '@/plugins/util.js'
  72. export default {
  73. components: {
  74. paymentMethodMap,
  75. paymentTermMap
  76. },
  77. props: {
  78. BookingOrder: {
  79. type: Object,
  80. },
  81. },
  82. methods: {
  83. paymentMethodMap,
  84. paymentTermMap
  85. }
  86. };
  87. </script>
  88. <style lang="scss" scoped></style>