index.vue 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. <template>
  2. <Detail :selectedRow="selectedRow">
  3. <fieldset class="formFieldSet">
  4. <legend>其它信息</legend>
  5. <Des :list="desList" />
  6. </fieldset>
  7. </Detail>
  8. </template>
  9. <script lang="ts">
  10. import { defineComponent, PropType, ref, watchEffect } from 'vue';
  11. import { Ermcp3ContractRsp } from '@/services/go/ermcp/spot-contract/interface';
  12. import { formatValue } from '@/common/methods';
  13. import { ErmcpLoginUserEx } from '@/services/go/ermcp/account/interface';
  14. import Detail from '../common-detail/index.vue';
  15. import { Des, handleDesList } from '@/common/components/commonDes';
  16. import { handlerManagerList } from '@/common/setup/user';
  17. export default defineComponent({
  18. name: 'spot-contract-info-detail',
  19. components: { Detail, Des },
  20. props: {
  21. selectedRow: {
  22. type: Object as PropType<Ermcp3ContractRsp>,
  23. default: {},
  24. },
  25. businessManager: {
  26. type: Array as PropType<ErmcpLoginUserEx[]>,
  27. default: [],
  28. },
  29. },
  30. setup(props, context) {
  31. const loading = ref<boolean>(false);
  32. // 预览附件
  33. const { desList, getDesList } = handleDesList();
  34. // 获取 业务账户
  35. const { findManagerName } = handlerManagerList(loading, 1);
  36. watchEffect(() => {
  37. if (props.selectedRow.contracctstatus) {
  38. const data = props.selectedRow;
  39. const list = [
  40. { label: '保证金', value: formatValue(data.contractmargin) },
  41. { label: '业务员', value: formatValue(findManagerName(data.saleuserid, props.businessManager)) },
  42. { label: '跟单员', value: formatValue(findManagerName(data.meruserid, props.businessManager)) },
  43. { label: '交易用户', value: formatValue(data.tradeusername) },
  44. { label: '备注', value: formatValue(data.remark) },
  45. ];
  46. getDesList(list);
  47. }
  48. });
  49. return {
  50. desList,
  51. };
  52. },
  53. });
  54. </script>
  55. <style lang="less">
  56. .custom-detail {
  57. .upload {
  58. .look {
  59. margin-left: 0;
  60. }
  61. }
  62. }
  63. </style>;