detail.vue 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. <template>
  2. <div class="flex flex-col h-full">
  3. <div class="bg-white info flex-1 overflow-y-auto cellnormall">
  4. <van-cell title="合同编号" :value="info.number" />
  5. <van-cell title="合同名称" :value="info.name" />
  6. <van-cell title="合同金额" :value="info.amounts">
  7. <template #default>
  8. <span class="text-[#FF8B32]" v-if="info.amounts">¥ {{ info.amounts }}</span>
  9. </template>
  10. </van-cell>
  11. <van-cell title="已回款金额" :value="info.payment">
  12. <template #default>
  13. <span class="text-[#FF8B32]" v-if="info.payment">¥ {{ info.payment }}</span>
  14. </template>
  15. </van-cell>
  16. <van-cell title="已回款进度" :value="info.payment">
  17. <template #default>
  18. {{ info.payment ? (100 * info.payment / info.amounts).toFixed(1) + '%' : '0%' }}
  19. </template>
  20. </van-cell>
  21. <van-cell title="下笔回款日期" :value="info.nextPaymentDate">
  22. <template #default>
  23. {{ info.nextPaymentDate ? info.nextPaymentDate : '-' }}
  24. </template>
  25. </van-cell>
  26. <van-cell title="下笔回款金额" :value="info.payment">
  27. <template #default>
  28. <span class="text-[#FF8B32]" v-if="info.payment">¥ {{ info.payment.toFixed(2) }}</span>
  29. </template>
  30. </van-cell>
  31. <van-cell title="合同类型" :value="info.typeName" />
  32. <van-cell title="状态" :value="info.status">
  33. <template #default>
  34. <span :style="fixedFieldStatusArray[info.status].color">
  35. {{ fixedFieldStatusArray[info.status].label }}
  36. </span>
  37. </template>
  38. </van-cell>
  39. </div>
  40. </div>
  41. </template>
  42. <script setup>
  43. import { ref } from 'vue';
  44. import { useLifecycle } from '@hooks/useCommon.js';
  45. import { fixedFieldStatusArray } from '@/utility/defaultData.js';
  46. const props = defineProps({
  47. info: {
  48. type: Object,
  49. required: true,
  50. default: () => ({})
  51. }
  52. })
  53. useLifecycle({
  54. load: () => {
  55. // 添加加载逻辑
  56. }
  57. });
  58. </script>
  59. <style lang='scss' scoped>
  60. .bottomButton {
  61. margin: 0 14px;
  62. padding-bottom: 30px;
  63. :deep(.van-button) {
  64. margin-bottom: 20px;
  65. }
  66. }
  67. .info {
  68. margin: 8px 14px 30px 14px;
  69. padding: 14px;
  70. }
  71. </style>