agentList.vue 5.0 KB

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