index.vue 2.7 KB

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