applyIbDialog.vue 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738
  1. <template>
  2. <cwg-popup :title="t(title)" :visible="visible" @close="closeDia" @confirm="confirmDia" :width="'900px'">
  3. <view class="dia-content">
  4. <uni-forms ref="formRef" labelWidth="200">
  5. <uni-forms-item v-if="isFormApplyIb" :label="t('Ib.Custom.Manage3') + ':'" prop="customerId">
  6. <cwg-combox v-model:value="addAgentForm.customerId" :options="customerList"
  7. :placeholder="t('placeholder.choose')" @change="changeCustomer" style="max-width: 280px" />
  8. </uni-forms-item>
  9. <uni-loading v-if="laoding" />
  10. <view v-else class="commission-table-container" v-if="addAgentForm.customerId">
  11. <table class="commission-table">
  12. <thead>
  13. <tr>
  14. <th class="status-col">{{ t('Ib.Custom.Status') }}</th>
  15. <th class="group-col"></th>
  16. <th class="type-col"></th>
  17. <th class="value-col" v-for="(item, index) in tableData" :key="index">{{ item }}</th>
  18. <!-- <th class="value-col">FX({{ t('vu.tradingCenter.item72') }})</th>
  19. <th class="value-col">ENERGY({{ t('vu.tradingCenter.item73') }})</th>
  20. <th class="value-col">CFD({{ t('vu.tradingCenter.item74') }})</th>
  21. <th class="value-col">INDEX({{ t('vu.tradingCenter.item75') }})</th> -->
  22. <!-- <th class="value-col">CRYPTO({{ t('vu.tradingCenter.item76') }})</th> -->
  23. </tr>
  24. </thead>
  25. <tbody v-for="(group, gIndex) in commissionTemplateTableData" :key="gIndex">
  26. <tr v-for="(item, iIndex) in group.items" :key="iIndex">
  27. <td v-if="iIndex === 0" :rowspan="group.items.length" class="center-td">
  28. <switch :checked="group.isOpen" @change="(e) => onGroupSwitchChange(e, group)" color="#2b5aed"
  29. style="transform:scale(0.7)" />
  30. </td>
  31. <td v-if="iIndex === 0" :rowspan="group.items.length" class="center-td group-name-td">
  32. {{ group.accountGroup }}
  33. </td>
  34. <td class="center-td type-td">
  35. {{ item.type }}
  36. </td>
  37. <td class="value-col">
  38. <!-- {{ formatOptions(item.energyOptions) }} -->
  39. <cwg-combox v-model:value="item.energy" :options="formatOptions(item.energyOptions)"
  40. :placeholder="t('placeholder.choose')" />
  41. </td>
  42. <td class="value-col">
  43. <cwg-combox v-model:value="item.forex" :options="formatOptions(item.forexOptions)"
  44. :placeholder="t('placeholder.choose')" />
  45. </td>
  46. <td class="value-col">
  47. <cwg-combox v-model:value="item.energy2" :options="formatOptions(item.energy2Options)"
  48. :placeholder="t('placeholder.choose')" />
  49. </td>
  50. <td class="value-col">
  51. <cwg-combox v-model:value="item.index" :options="formatOptions(item.indexOptions)"
  52. :placeholder="t('placeholder.choose')" />
  53. </td>
  54. <td class="value-col">
  55. <cwg-combox v-model:value="item.metal" :options="formatOptions(item.metalOptions)"
  56. :placeholder="t('placeholder.choose')" />
  57. </td>
  58. <!-- <td>-->
  59. <!-- <cwg-combox v-model:value="item.crypto" :options="formatOptions(item.cryptoOptions)"-->
  60. <!-- :placeholder="t('placeholder.choose')" />-->
  61. <!-- </td>-->
  62. </tr>
  63. </tbody>
  64. </table>
  65. </view>
  66. <!-- <view v-else style="height: 50px"/>-->
  67. </uni-forms>
  68. </view>
  69. </cwg-popup>
  70. </template>
  71. <script setup lang="ts">
  72. import { ref, reactive, computed, onMounted, onUnmounted, watch } from 'vue'
  73. import { onLoad } from '@dcloudio/uni-app'
  74. import { useI18n, } from 'vue-i18n' // uni-app 中已集成,但需配置
  75. import { customApi } from '@/service/custom'
  76. import { financialApi } from '@/service/financial'
  77. import Config from '@/config/index'
  78. import { ibApi } from '@/service/ib'
  79. import useUserStore from '@/stores/use-user-store'
  80. import { lang } from '@/composables/config'
  81. const props = defineProps({
  82. paramsType: {
  83. type: String,
  84. default: '',
  85. },
  86. title: {
  87. type: String,
  88. default: 'Ib.Report.Title5',
  89. },
  90. // 是否显示弹窗
  91. visible: {
  92. type: Boolean,
  93. default: false,
  94. },
  95. // 详情tableData
  96. detail: { type: Object, default: () => ({}) },
  97. // 是否需要选择客户
  98. isFormApplyIb: {
  99. type: Boolean,
  100. default: false,
  101. },
  102. })
  103. const { Code, Host80 } = Config
  104. const { t, locale } = useI18n()
  105. const formRef = ref(null)
  106. const addAgentForm = ref({
  107. customerId: '',
  108. })
  109. const tableData = computed(() => locale.value != 'cn' ? ['FX',
  110. 'ENERGY',
  111. 'CFD',
  112. 'INDEX',
  113. 'METAL',
  114. // 'CRYPTO'
  115. ] : [
  116. t('vu.tradingCenter.item71'),
  117. t('vu.tradingCenter.item72'),
  118. t('vu.tradingCenter.item73'),
  119. t('vu.tradingCenter.item74'),
  120. t('vu.tradingCenter.item75'),
  121. // t('vu.tradingCenter.item76')
  122. ])
  123. const customerList = ref([])
  124. const commissionAccountTypeSettings = ref({
  125. ecn: { selectedIndex: null, selectedItem: null, loginType: '2' },
  126. standard: { selectedIndex: null, selectedItem: null, loginType: '7' },
  127. cent: { selectedIndex: null, selectedItem: null, loginType: '8' },
  128. })
  129. const commissionAccountTypeData = ref({
  130. ecn: [],
  131. standard: [],
  132. cent: [],
  133. })
  134. const commissionTemplateTableData = ref<any[]>([])
  135. const emit = defineEmits(['close', 'confirm'])
  136. const laoding = ref(false)
  137. onMounted(() => {
  138. // initCommissionTemplateData(29634)
  139. })
  140. watch(() => props.visible, async (val) => {
  141. if (val) {
  142. laoding.value = true
  143. if (props.isFormApplyIb) {
  144. await loadCustomerList()
  145. }
  146. if (props.detail.id) {
  147. let params = {
  148. customId: props.detail.id,
  149. }
  150. addAgentForm.value = {
  151. customerId: props.detail.id,
  152. }
  153. if (props.paramsType == 'vietnam') {
  154. params = {
  155. agentId: props.detail.id,
  156. }
  157. }
  158. await initCommissionTemplateData(params)
  159. }
  160. laoding.value = false
  161. }
  162. })
  163. const getSpreadLabelCommission = (item) => {
  164. return item.groupName || ''
  165. }
  166. const handleCommissionAccountTypeChange = (type, loginType) => {
  167. const setting = commissionAccountTypeSettings.value[type]
  168. const availableSpreads = getAvailableSpreadsCommission(loginType)
  169. if (
  170. setting.selectedIndex !== null &&
  171. setting.selectedIndex !== undefined
  172. ) {
  173. setting.selectedItem = availableSpreads[setting.selectedIndex] || null
  174. } else {
  175. setting.selectedItem = null
  176. }
  177. }
  178. const generateOptions = (currentValue) => {
  179. const options = []
  180. for (let i = 0; i <= currentValue; i++) {
  181. options.push(i)
  182. }
  183. return options
  184. }
  185. // 格式化 options 为 combox 期望的格式
  186. const formatOptions = (opts) => {
  187. if (!opts || !Array.isArray(opts)) return []
  188. return opts.map(val => ({ text: String(val), value: val }))
  189. }
  190. const toggleGroup = (group) => {
  191. group.isOpen = !group.isOpen
  192. }
  193. const onGroupSwitchChange = (e, group) => {
  194. group.isOpen = e.detail.value
  195. }
  196. const initCommissionTemplateData = async (params) => {
  197. try {
  198. const res = await ibApi.getVietnamPoints(params)
  199. if (res.code == Code.StatusOK && res.data && Array.isArray(res.data)) {
  200. const groupedData: Record<string, any[]> = {}
  201. res.data.forEach((group: any) => {
  202. const accountGroup = group.groupCategoryName || '--'
  203. const isOpen = group.valid !== undefined ? group.valid : 1
  204. if (!groupedData[accountGroup]) {
  205. groupedData[accountGroup] = []
  206. }
  207. const rebates = Array.isArray(group.rebates) ? group.rebates : []
  208. const superRebates = Array.isArray(group.superRebates) ? group.superRebates : []
  209. if (superRebates.length > 0) {
  210. const rebateRow: any = {
  211. accountGroup,
  212. groupCategoryId: group.groupCategoryId,
  213. dataType: 'rebates',
  214. type: group.rebateTypeName || 'Point',
  215. isOpen,
  216. forex: 0,
  217. index: 0,
  218. metal: 0,
  219. energy: 0,
  220. energy2: 0,
  221. energy2Max: 0,
  222. forex1: 0,
  223. index1: 0,
  224. metal1: 0,
  225. energy1: 0,
  226. // crypto: 0,
  227. // crypto1: 0,
  228. }
  229. rebates.forEach((rebate: any) => {
  230. if (rebate.symbolCategory === 1) rebateRow.forex = rebate.point || 0
  231. else if (rebate.symbolCategory === 2) rebateRow.index = rebate.point || 0
  232. else if (rebate.symbolCategory === 3) rebateRow.metal = rebate.point || 0
  233. else if (rebate.symbolCategory === 4) rebateRow.energy = rebate.point || 0
  234. else if (rebate.symbolCategory === 5) rebateRow.energy2 = rebate.point || 0
  235. // else if (rebate.symbolCategory === 6) rebateRow.crypto = rebate.point || 0
  236. })
  237. superRebates.forEach((rebate: any) => {
  238. if (rebate.symbolCategory === 1) rebateRow.forex1 = rebate.point || 0
  239. else if (rebate.symbolCategory === 2) rebateRow.index1 = rebate.point || 0
  240. else if (rebate.symbolCategory === 3) rebateRow.metal1 = rebate.point || 0
  241. else if (rebate.symbolCategory === 4) rebateRow.energy1 = rebate.point || 0
  242. else if (rebate.symbolCategory === 5) rebateRow.energy2Max = rebate.point || 0
  243. // else if (rebate.symbolCategory === 6) rebateRow.crypto1 = rebate.point || 0
  244. })
  245. rebateRow.forexOptions = generateOptions(rebateRow.forex1)
  246. rebateRow.indexOptions = generateOptions(rebateRow.index1)
  247. rebateRow.metalOptions = generateOptions(rebateRow.metal1)
  248. rebateRow.energyOptions = generateOptions(rebateRow.energy1)
  249. rebateRow.energy2Options = generateOptions(rebateRow.energy2Max)
  250. // rebateRow.cryptoOptions = generateOptions(rebateRow.crypto1)
  251. groupedData[accountGroup].push(rebateRow)
  252. }
  253. const commissions = Array.isArray(group.commissions) ? group.commissions : []
  254. const superCommissions = Array.isArray(group.superCommissions) ? group.superCommissions : []
  255. if (superCommissions.length > 0) {
  256. const commissionRow: any = {
  257. accountGroup,
  258. groupCategoryId: group.groupCategoryId,
  259. dataType: 'commissions',
  260. type: group.commissionTypeName || 'Commission',
  261. isOpen,
  262. forex: 0,
  263. index: 0,
  264. metal: 0,
  265. energy: 0,
  266. energy2: 0,
  267. energy2Max: 0,
  268. forex1: 0,
  269. index1: 0,
  270. metal1: 0,
  271. energy1: 0,
  272. // crypto: 0,
  273. // crypto1: 0,
  274. }
  275. commissions.forEach((comm: any) => {
  276. if (comm.symbolCategory === 1) commissionRow.forex = comm.point || 0
  277. else if (comm.symbolCategory === 2) commissionRow.index = comm.point || 0
  278. else if (comm.symbolCategory === 3) commissionRow.metal = comm.point || 0
  279. else if (comm.symbolCategory === 4) commissionRow.energy = comm.point || 0
  280. else if (comm.symbolCategory === 5) commissionRow.energy2 = comm.point || 0
  281. // else if (comm.symbolCategory === 6) commissionRow.crypto = comm.point || 0
  282. })
  283. superCommissions.forEach((comm: any) => {
  284. if (comm.symbolCategory === 1) commissionRow.forex1 = comm.point || 0
  285. else if (comm.symbolCategory === 2) commissionRow.index1 = comm.point || 0
  286. else if (comm.symbolCategory === 3) commissionRow.metal1 = comm.point || 0
  287. else if (comm.symbolCategory === 4) commissionRow.energy1 = comm.point || 0
  288. else if (comm.symbolCategory === 5) commissionRow.energy2Max = comm.point || 0
  289. // else if (comm.symbolCategory === 6) commissionRow.crypto1 = comm.point || 0
  290. })
  291. commissionRow.forexOptions = generateOptions(commissionRow.forex1)
  292. commissionRow.indexOptions = generateOptions(commissionRow.index1)
  293. commissionRow.metalOptions = generateOptions(commissionRow.metal1)
  294. commissionRow.energyOptions = generateOptions(commissionRow.energy1)
  295. commissionRow.energy2Options = generateOptions(commissionRow.energy2Max)
  296. // commissionRow.cryptoOptions = generateOptions(commissionRow.crypto1)
  297. groupedData[accountGroup].push(commissionRow)
  298. }
  299. })
  300. // 将按 accountGroup 聚合后的对象转换为包含 accountGroup 和 items 数组的结构
  301. const finalData = Object.keys(groupedData).map((accountGroup) => {
  302. return {
  303. accountGroup,
  304. // 默认不展开
  305. isOpen: groupedData[accountGroup].some(item => item.isOpen == 1) || false,
  306. items: groupedData[accountGroup],
  307. }
  308. }).filter(item => item.items.length > 0)
  309. console.log('tableData', finalData)
  310. commissionTemplateTableData.value = finalData
  311. return
  312. }
  313. commissionTemplateTableData.value = []
  314. uni.showToast({
  315. title: res.msg || t('Ib.Custom.GetDataFailed'),
  316. icon: 'none',
  317. })
  318. } catch (error) {
  319. commissionTemplateTableData.value = []
  320. uni.showToast({ title: t('Ib.Custom.GetDataFailed'), icon: 'none' })
  321. }
  322. }
  323. // 加载客户列表
  324. const loadCustomerList = async () => {
  325. try {
  326. let res = await ibApi.customerSubsList({
  327. ibStatus: 1,
  328. })
  329. if (res.code == Code.StatusOK) {
  330. customerList.value = res.data.map(item => ({
  331. text: `${item.name || ''}-${item.cId}`,
  332. value: item.id || '',
  333. cId: item.cId, // 保存 cId 供后续提交使用
  334. })) || []
  335. } else {
  336. uni.showToast({ title: res.msg, icon: 'none' })
  337. customerList.value = []
  338. }
  339. } catch (error) {
  340. console.error('加载客户列表失败:', error)
  341. customerList.value = []
  342. } finally {
  343. }
  344. }
  345. // 客户选择改变时触发
  346. const changeCustomer = async (val) => {
  347. if (val) {
  348. laoding.value = true
  349. await initCommissionTemplateData({ customId: val })
  350. laoding.value = false
  351. } else {
  352. commissionTemplateTableData.value = []
  353. }
  354. }
  355. // 构建佣金模板points数据
  356. const buildCommissionTemplatePoints = () => {
  357. const points: any[] = []
  358. const groupedData: Record<string, any> = {}
  359. // 由于现在的 commissionTemplateTableData 是 { accountGroup, isOpen, items } 嵌套结构,需要双层遍历提取
  360. commissionTemplateTableData.value.forEach((groupObj) => {
  361. groupObj.items.forEach((row: any) => {
  362. const groupId = row.groupCategoryId
  363. if (!groupedData[groupId]) {
  364. groupedData[groupId] = {
  365. groupCategoryId: groupId,
  366. commissions: [],
  367. rebates: [],
  368. valid: groupObj.isOpen ? 1 : 0,
  369. }
  370. }
  371. // 根据dataType添加到对应的数组
  372. const pointList = row.dataType === 'commissions'
  373. ? groupedData[groupId].commissions
  374. : groupedData[groupId].rebates
  375. // 添加各个symbolCategory的数据
  376. if (row.forex !== undefined && row.forex !== null) {
  377. pointList.push({ symbolCategory: 1, point: row.forex }) // FX
  378. }
  379. if (row.index !== undefined && row.index !== null) {
  380. pointList.push({ symbolCategory: 2, point: row.index }) // CFD
  381. }
  382. if (row.metal !== undefined && row.metal !== null) {
  383. pointList.push({ symbolCategory: 3, point: row.metal }) // INDEX
  384. }
  385. if (row.energy !== undefined && row.energy !== null) {
  386. pointList.push({ symbolCategory: 4, point: row.energy }) // METAL
  387. }
  388. if (row.energy2 !== undefined && row.energy2 !== null) {
  389. pointList.push({ symbolCategory: 5, point: row.energy2 }) // Energy
  390. }
  391. // if (row.crypto !== undefined && row.crypto !== null) {
  392. // pointList.push({ symbolCategory: 6, point: row.crypto }) // Crypto
  393. // }
  394. })
  395. })
  396. // 转换为数组格式
  397. Object.keys(groupedData).forEach((groupId) => {
  398. const group = groupedData[groupId]
  399. if (group.commissions.length > 0 || group.rebates.length > 0) {
  400. points.push({
  401. groupCategoryId: group.groupCategoryId,
  402. commissions: group.commissions.length > 0 ? group.commissions : undefined,
  403. rebates: group.rebates.length > 0 ? group.rebates : undefined,
  404. valid: group.valid,
  405. })
  406. }
  407. })
  408. return points
  409. }
  410. const toVerified = () => {
  411. // 确认按钮点击事件
  412. emit('confirm')
  413. }
  414. const closeDia = () => {
  415. addAgentForm.value = {
  416. customerId: '',
  417. }
  418. commissionTemplateTableData.value = []
  419. emit('close')
  420. }
  421. const confirmDia = async () => {
  422. // 越南分配也用,看怎么调整提交接口
  423. let customId, cId
  424. // 越南佣金分配不用判断customId
  425. if (props.paramsType !== 'vietnam') {
  426. if (!props.isFormApplyIb) {
  427. if (!props.detail.id) {
  428. uni.showToast({ title: t('Ib.Custom.CustomerNotExist'), icon: 'none' })
  429. return
  430. }
  431. const applyIbRowData: any = props.detail || {}
  432. customId = applyIbRowData.id
  433. cId = applyIbRowData.cId
  434. } else {
  435. // 从其他地方打开,需要选择客户
  436. if (!addAgentForm.value.customerId) {
  437. uni.showToast({ title: t('placeholder.choose'), icon: 'none' })
  438. return
  439. }
  440. // 从客户列表中找到选中的客户对象
  441. const selectedCustomer: any = customerList.value.find(
  442. (item: any) => item.value === addAgentForm.value.customerId,
  443. )
  444. if (!selectedCustomer) {
  445. uni.showToast({ title: t('Ib.Custom.CustomerNotFound'), icon: 'none' })
  446. return
  447. }
  448. customId = selectedCustomer.value
  449. cId = selectedCustomer.cId
  450. }
  451. }
  452. try {
  453. // 构建points数据
  454. const points = buildCommissionTemplatePoints()
  455. // console.log(points)
  456. // 调用新增代理申请接口
  457. let params = {
  458. customId: customId,
  459. cId: cId,
  460. points: points,
  461. }
  462. if (props.paramsType === 'vietnam') {
  463. params = {
  464. agentId: props.detail.id,
  465. points: points,
  466. }
  467. }
  468. // 越南分配和新增代理
  469. const res = props.paramsType === 'vietnam' ? await ibApi.saveVietnamPoints(params) : await ibApi.agentApplyAddPoint(params)
  470. if (res.code == Code.StatusOK) {
  471. uni.showToast({
  472. title: res.msg || props.paramsType ? t('Ib.Custom.SaveSuccess') : t('Ib.Custom.SubmitSuccess'),
  473. icon: 'success',
  474. })
  475. closeDia()
  476. emit('confirm')
  477. } else {
  478. uni.showToast({
  479. title: res.msg || props.paramsType ? t('Ib.Custom.SaveFailed') : t('Ib.Custom.SubmitFailed'),
  480. icon: 'none',
  481. })
  482. }
  483. } catch (error) {
  484. console.error('新增代理失败或保存越南分配数据失败:', error)
  485. uni.showToast({ title: props.paramsType ? t('Ib.Custom.SaveFailed') : t('Ib.Custom.SubmitFailed'), icon: 'none' })
  486. }
  487. }
  488. </script>
  489. <style lang="scss" scoped>
  490. @import "@/uni.scss";
  491. .commission-table-container {
  492. margin-top: px2rpx(10);
  493. padding-bottom: px2rpx(150);
  494. /* 预留底部空间,防止最下面的下拉框被截断或遮挡 */
  495. width: 100%;
  496. overflow-x: auto;
  497. }
  498. .commission-table {
  499. width: 100%;
  500. table-layout: fixed;
  501. border-collapse: collapse;
  502. border-spacing: 0;
  503. font-size: px2rpx(14);
  504. color: var(--bs-emphasis-color);
  505. border: 1px solid #ebeef5;
  506. .status-col {
  507. width: 60px;
  508. }
  509. .group-col {
  510. min-width: px2rpx(150);
  511. }
  512. .type-col {
  513. min-width: px2rpx(150);
  514. }
  515. .value-col {
  516. width: calc((100% - 295px) / 5);
  517. min-width: px2rpx(100);
  518. padding: px2rpx(4);
  519. box-sizing: border-box;
  520. // overflow: hidden;
  521. :deep(.cwg-combox) {
  522. width: 100%;
  523. display: block;
  524. :deep(.uni-select) {
  525. width: 100%;
  526. min-height: px2rpx(32);
  527. box-sizing: border-box;
  528. }
  529. :deep(.uni-select__input-box) {
  530. flex: 1;
  531. width: 0;
  532. min-width: 0;
  533. }
  534. :deep(.uni-select__input-text) {
  535. text-align: center;
  536. overflow: hidden;
  537. text-overflow: ellipsis;
  538. white-space: nowrap;
  539. }
  540. }
  541. }
  542. thead {
  543. background-color: rgba(var(--bs-body-bg-rgb), var(--bs-bg-opacity)) !important;
  544. }
  545. th {
  546. padding: px2rpx(12) px2rpx(5);
  547. text-align: center;
  548. font-weight: bold;
  549. color: var(--bs-emphasis-color);
  550. border: 1px solid #ebeef5;
  551. font-size: px2rpx(13);
  552. white-space: nowrap;
  553. }
  554. td {
  555. padding: px2rpx(8) px2rpx(7);
  556. border: 1px solid #ebeef5;
  557. vertical-align: middle;
  558. }
  559. .center-td {
  560. text-align: center;
  561. }
  562. .group-name-td {
  563. color: var(--bs-emphasis-color);
  564. font-weight: 500;
  565. }
  566. .type-td {
  567. color: var(--bs-emphasis-color);
  568. }
  569. }
  570. @media screen and (max-width: 768px) {
  571. .commission-table {
  572. table-layout: auto !important;
  573. }
  574. }
  575. .dialog-account-adjust-body {
  576. padding: 20rpx;
  577. }
  578. .account-adjust-cid-row {
  579. display: flex;
  580. align-items: center;
  581. margin-bottom: 20rpx;
  582. }
  583. .account-adjust-cid-label {
  584. color: #606266;
  585. margin-right: px2rpx(5);
  586. }
  587. .account-adjust-cid-value {
  588. font-weight: bold;
  589. color: #303133;
  590. }
  591. .form-section {
  592. margin-bottom: 20rpx;
  593. }
  594. .section-title {
  595. display: flex;
  596. align-items: center;
  597. margin-bottom: px2rpx(15);
  598. font-weight: bold;
  599. font-size: px2rpx(14);
  600. }
  601. .section-title i {
  602. margin-right: 10rpx;
  603. }
  604. .account-type-grid {}
  605. .account-type-card {
  606. display: flex;
  607. flex-direction: column;
  608. margin-bottom: px2rpx(20);
  609. }
  610. .account-type-label {
  611. margin-bottom: 10rpx;
  612. font-size: 14rpx;
  613. }
  614. .account-select {
  615. width: 100%;
  616. }
  617. .dialog-account-adjust-footer {
  618. padding: 20rpx;
  619. }
  620. .account-adjust-notes-panel {
  621. margin-bottom: 20rpx;
  622. }
  623. .account-adjust-notes-section {
  624. background-color: rgba(var(--bs-body-bg-rgb), var(--bs-bg-opacity)) !important;
  625. padding: 15rpx;
  626. border-radius: 8rpx;
  627. }
  628. .account-adjust-notes-title {
  629. display: flex;
  630. align-items: center;
  631. margin-bottom: px2rpx(10);
  632. font-weight: bold;
  633. font-size: px2rpx(13);
  634. }
  635. .account-adjust-notes-title-icon {
  636. margin-right: px2rpx(10);
  637. }
  638. .account-adjust-notes-list {
  639. margin-left: px2rpx(20);
  640. color: #606266;
  641. font-size: px2rpx(13);
  642. }
  643. .account-adjust-notes-list .list {
  644. margin-bottom: px2rpx(5);
  645. margin-left: px2rpx(10);
  646. }
  647. .account-adjust-footer-buttons {
  648. display: flex;
  649. justify-content: flex-end;
  650. gap: 15rpx;
  651. }
  652. .account-adjust-footer-buttons button {
  653. min-width: 120rpx;
  654. }
  655. </style>