OrderReviewContent.vue 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. <template>
  2. <div class="order-review-card-content">
  3. <InfoCard title="基本信息">
  4. <OrderDescInfo :orderInfo="orderInfo.orderData"></OrderDescInfo>
  5. </InfoCard>
  6. <!-- 产品信息 -->
  7. <OrderDetailCardProduct></OrderDetailCardProduct>
  8. <InfoCard title="协议信息">
  9. <ContractInfoSignModule></ContractInfoSignModule>
  10. </InfoCard>
  11. <PaymentPlan></PaymentPlan>
  12. <InfoCard title="最新业绩归属">
  13. <div class="performmace-belongs-content">
  14. <PerformanceBelongsModule></PerformanceBelongsModule>
  15. </div>
  16. </InfoCard>
  17. <InfoCard title="其他信息">
  18. <OrderDetailCardOther></OrderDetailCardOther>
  19. </InfoCard>
  20. </div>
  21. </template>
  22. <script>
  23. import { mapState, mapActions } from 'vuex';
  24. import InfoCard from '../../ui/InfoCard.vue';
  25. import PerformanceBelongsModule from '../order-detail-submodule/PerformanceBelongsModule.vue';
  26. import ContractInfoSignModule from '../order-detail-submodule/ContractInfoSignModule.vue';
  27. import PaymentPlan from '../order-detail-submodule/PaymentPlan.vue';
  28. import OrderDescInfo from './OrderDescInfo.vue';
  29. import OrderDetailCardProduct from '../order-detail-submodule/OrderDetailCardProduct.vue';
  30. import OrderDetailCardOther from '../order-detail-submodule/OrderDetailCardOther.vue';
  31. export default {
  32. name: 'OrderReviewContent',
  33. props: {
  34. orderCode: {
  35. type: String,
  36. default: ''
  37. },
  38. },
  39. components: {
  40. InfoCard,
  41. OrderDescInfo,
  42. PaymentPlan,
  43. OrderDetailCardProduct,
  44. OrderDetailCardOther,
  45. ContractInfoSignModule,
  46. PerformanceBelongsModule,
  47. },
  48. data() {
  49. return {
  50. orderDetail: {},
  51. loading: true,
  52. }
  53. },
  54. computed: {
  55. ...mapState({
  56. orderInfo: state => state.order.orderDetail
  57. })
  58. },
  59. watch: {
  60. orderCode: {
  61. immediate: true,
  62. handler(val) {
  63. this.getOrderDetailFn(val)
  64. }
  65. }
  66. },
  67. methods: {
  68. ...mapActions('order', ['getOrderDetail']),
  69. getOrderDetailFn(id = this.orderCode) {
  70. if (!id) {
  71. return
  72. }
  73. this.getOrderDetail({ id }).then(res => {
  74. this.orderDetail = res || {}
  75. })
  76. .finally(() => {
  77. this.$emit('detail', this.orderDetail)
  78. this.loading = false
  79. })
  80. },
  81. },
  82. }
  83. </script>
  84. <style lang="scss" scoped>
  85. .order-review-card-content {
  86. background: #F2F2F4;
  87. ::v-deep {
  88. .info-card {
  89. $padding: 16px;
  90. padding-top: $padding;
  91. padding-bottom: $padding;
  92. }
  93. .order-detail-card-product {
  94. .info-card {
  95. margin-bottom: 0;
  96. }
  97. }
  98. }
  99. }
  100. </style>