agentList.vue 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211
  1. <template>
  2. <cwg-page-wrapper class="create-page" :isHeaderFixed="true">
  3. <cwg-header :title="t('Documentary.console.item23')" />
  4. <view class="account-content">
  5. <view class="search-content">
  6. <view class="search-bar">
  7. <uni-easyinput v-model="search.cId" placeholder="CID" />
  8. </view>
  9. <view class="search-bar">
  10. <button type="primary" class="search-button" @click="addSub">
  11. <cwg-icon name="icon_add" :size="18" color="#fff"></cwg-icon>
  12. {{t('Ib.Report.Title5')}}
  13. </button>
  14. </view>
  15. </view>
  16. <cwg-tabel
  17. class="table-container"
  18. ref="tableRef"
  19. :columns="columns"
  20. :mobilePrimaryFields="mobilePrimaryFields"
  21. :queryParams="search"
  22. :api="listApi"
  23. :show-operation="true"
  24. :showPagination="true"
  25. >
  26. <template #action="{ row }">
  27. <cwg-dropdown :menu-list="menuList(row)" @menuClick="handleMenuClick">
  28. <view class="pc-header-btn">
  29. <cwg-icon name="crm-ellipsis" :size="24" />
  30. </view>
  31. </cwg-dropdown>
  32. </template>
  33. </cwg-tabel>
  34. </view>
  35. </cwg-page-wrapper>
  36. </template>
  37. <script setup lang="ts">
  38. // 信号源管理
  39. import { ref, reactive, computed, onMounted, onUnmounted } from 'vue'
  40. import { onLoad } from '@dcloudio/uni-app'
  41. import { useI18n } from 'vue-i18n' // uni-app 中已集成,但需配置
  42. import Config from '@/config/index'
  43. import { lang } from '@/composables/config'
  44. import { ibApi } from '@/service/ib'
  45. import { useFilters } from '@/composables/useFilters'
  46. const { numberFormat, numberDecimal } = useFilters()
  47. const search = ref({
  48. cId: '',
  49. })
  50. const { t, locale } = useI18n()
  51. // 表格列配置
  52. const columns = ref([
  53. {
  54. prop: 'dealCId',
  55. label: t('Label.CidAccount'),
  56. align: 'center',
  57. },
  58. {
  59. prop: 'pIbNo',
  60. label: t('Label.AgentNumber'),
  61. align: 'center',
  62. },
  63. {
  64. prop: 'nickname',
  65. label: t('Documentary.console.item20'),
  66. align: 'center',
  67. },
  68. {
  69. prop: 'dealLogin',
  70. label: t('Documentary.tradingCenter.item18'),
  71. align: 'center',
  72. },
  73. {
  74. prop: 'dealPlatform',
  75. label: t('Label.Platform'),
  76. align: 'center',
  77. },
  78. {
  79. prop: 'dealLeverage',
  80. label: t('Label.Leverage'),
  81. align: 'center',
  82. },
  83. {
  84. prop: 'dealLoginType',
  85. type: 'tag',
  86. label: t('Label.AccountType'),
  87. align: 'center',
  88. tagMap: {
  89. 1: t('AccountType.ClassicAccount'),
  90. 2: t('AccountType.SeniorAccount'),
  91. 5: t('AccountType.SpeedAccount'),
  92. 6: t('AccountType.SpeedAccount'),
  93. 7: t('AccountType.StandardAccount'),
  94. 8: t('AccountType.CentAccount'),
  95. },
  96. },
  97. {
  98. prop: 'distributionType',
  99. label: t('Documentary.AgentBackground.item11'),
  100. align: 'center',
  101. formatter: ({ row }) => row.distributionType === 1 ? t('Documentary.TundManagement.item59') : '--',
  102. },
  103. {
  104. prop: 'distributionRatio',
  105. label: t('Documentary.Report.item5'),
  106. align: 'center',
  107. },
  108. {
  109. prop: 'settlementCycle',
  110. label: t('Documentary.AgentBackground.item13'),
  111. align: 'center',
  112. },
  113. {
  114. prop: 'approveTime',
  115. label: t('Label.ApplyTime'),
  116. align: 'center',
  117. },
  118. {
  119. prop: 'permissionDisplay',
  120. type: 'tag',
  121. label: t('Documentary.AgentBackground.item14'),
  122. align: 'center',
  123. tagMap: {
  124. 1: t('Documentary.AgentBackground.item16'),
  125. 2: t('Documentary.AgentBackground.item15'),
  126. },
  127. },
  128. {
  129. prop: 'action',
  130. label: t('Label.Action'),
  131. align: 'center',
  132. slot: 'action',
  133. },
  134. ])
  135. const mobilePrimaryFields = ref([
  136. {
  137. prop: 'cId',
  138. label: t('Label.CidAccount'),
  139. align: 'center',
  140. },
  141. {
  142. prop: 'ibNo',
  143. label: t('Label.IbAccount'),
  144. align: 'center',
  145. },
  146. {
  147. prop: 'name',
  148. label: t('Ib.Custom.NameLabel'),
  149. align: 'center',
  150. },
  151. {
  152. prop: 'more',
  153. type: 'more',
  154. width: 20,
  155. align: 'right',
  156. },
  157. ])
  158. const listApi = ref(ibApi.IbSubs)
  159. const handleDateChange = (val) => {
  160. search.value.startDate = val[0]
  161. search.value.endDate = val[1]
  162. }
  163. // 下拉菜单配置
  164. const menuList = (row) => {
  165. return [
  166. {
  167. label: t('Ib.Custom.Btn'),
  168. type: 'DisplaySettings',
  169. row,
  170. show: row.agentUpdatePurview == '1',
  171. },
  172. ].filter((item) => item.show)
  173. }
  174. const handleMenuClick = (item) => {
  175. if (item.type == 'DisplaySettings') {
  176. const { cId, id, permissionDisplay } = item.row
  177. formInfoRow.value = {
  178. cId, id, permissionDisplay,
  179. }
  180. docVisible.value = true
  181. } else if (item.type == 'exclusiveCommission') {
  182. const { cId, id, comPoint1, hide1 } = item.row
  183. pointForm.value = {
  184. cId, id, comPoint1, hide1,
  185. }
  186. pointVisible.value = true
  187. }
  188. }
  189. </script>
  190. <style lang="scss" scoped>
  191. @import "@/uni.scss";
  192. .search-content {
  193. display: flex;
  194. justify-content: space-between;
  195. }
  196. .search-button{
  197. display: flex;
  198. align-items: center;
  199. height: px2rpx(36);
  200. line-height: px2rpx(36);
  201. }
  202. </style>