index.vue 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. <template>
  2. <!-- 商品合约 -->
  3. <section class="spot_warran">
  4. <component :is="componentId" v-if="componentId"></component>
  5. <thirdMenu :list="tabList" @selectMenu="changeTab" :value="'title'">
  6. <!-- 议价单 -->
  7. <div class="goods-apply" v-if="componentId === BARGIN">
  8. <!-- <span @click="changeBargain(ApplyType.my)">我的议价</span>
  9. <span @click="changeBargain(ApplyType.counterpart)">对方议价</span>-->
  10. <a-radio-group class="conditionCommonRadioGroup" v-model:value="bargainValue">
  11. <a-radio @focus="changeBargain(ApplyType.my)" :value="ApplyType.my">我的申请</a-radio>
  12. <a-radio @focus="changeBargain(ApplyType.counterpart)" :value="ApplyType.counterpart">对方申请</a-radio>
  13. </a-radio-group>
  14. </div>
  15. </thirdMenu>
  16. </section>
  17. </template>
  18. <script lang="ts">
  19. import { defineAsyncComponent, defineComponent, ref } from 'vue';
  20. import { enumOrderComponents } from '@/common/constants/enumOrderComponents';
  21. import thirdMenu from '@/common/components/thirdMenu/index.vue';
  22. import { handleOrderDetailList } from '@/common/setup/order/orderData';
  23. import Bus from '@/utils/eventBus/index';
  24. import { ApplyType } from '@/common/constants/enumCommon';
  25. const BARGIN = 'commodity_contract_bargain'; // 议价单
  26. export default defineComponent({
  27. name: enumOrderComponents.commodity_contract,
  28. components: {
  29. thirdMenu,
  30. [enumOrderComponents.commodity_contract_summary]: defineAsyncComponent(() => import('./components/commodity_contract_summary/index.vue')),
  31. [enumOrderComponents.commodity_contract_commission]: defineAsyncComponent(() => import('./components/commodity_contract_commission/index.vue')),
  32. [enumOrderComponents.commodity_contract_make_deal]: defineAsyncComponent(() => import('./components/commodity_contract_make_deal/index.vue')),
  33. [enumOrderComponents.commodity_contract_settlement]: defineAsyncComponent(() => import('./components/commodity_contract_settlement/index.vue')),
  34. [BARGIN]: defineAsyncComponent(() => import('./components/commodity_contract_bargain/index.vue')),
  35. },
  36. setup() {
  37. // 切换 我的
  38. function changeBargain(value: ApplyType) {
  39. Bus.$emit('bargain', value);
  40. }
  41. const bargainValue = ref<ApplyType>(ApplyType.my);
  42. return { ...handleOrderDetailList(enumOrderComponents.commodity_contract), changeBargain, BARGIN, ApplyType, bargainValue };
  43. },
  44. });
  45. </script>