transfer.vue 30 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968
  1. <template>
  2. <cwg-page-wrapper class="create-page" :isHeaderFixed="true">
  3. <cwg-header :title="t('Home.page_customer.item5')" />
  4. <uni-loading v-if="loading" />
  5. <view class="container" v-else>
  6. <view class="row">
  7. <view class="col-lg-8 col-sm-12">
  8. <view class="card">
  9. <view class="border-0 card-header">
  10. <uni-forms ref="formRef" :model="form" :rules="rules" label-position="top"
  11. validate-trigger="submit">
  12. <view class="row">
  13. <view class="col-lg-6">
  14. <h5 class="mb-3" v-t="'Custom.Transfer.Title1'"></h5>
  15. <uni-forms-item>
  16. <cwg-combox v-model:value="loginValue" :clearable="false"
  17. :options="withdrawDisplayList" :placeholder="t('placeholder.choose')" />
  18. </uni-forms-item>
  19. </view>
  20. <view class="col-lg-6">
  21. <h5 class="mb-3" v-t="'Custom.Transfer.Title2'"></h5>
  22. <uni-forms-item>
  23. <cwg-combox v-model:value="transferType" :clearable="false"
  24. :options="transferTypeOptions"
  25. :placeholder="t('placeholder.choose')" /></uni-forms-item>
  26. </view>
  27. <view class="col-lg-6">
  28. <h5 class="mb-3" v-t="'Custom.Transfer.IntoAccount'"></h5>
  29. <uni-forms-item name="depositLogin">
  30. <cwg-combox v-model:value="form.depositLogin" :clearable="false"
  31. :options="depositDisplayList" :placeholder="t('placeholder.choose')" />
  32. </uni-forms-item>
  33. </view>
  34. <view class="col-lg-6">
  35. <h5 class="mb-3" v-t="'Custom.Transfer.Amount'"></h5>
  36. <view class="card-row amount-box">
  37. <uni-forms-item name="amount" :error-message="amountErrorMessage"
  38. class="amount-input">
  39. <uni-easyinput v-model="form.amount"
  40. :placeholder="t('placeholder.input')" @blur="validateAmount" />
  41. </uni-forms-item>
  42. <view class="btn btn-gray waves-effect waves-light" v-t="'State.All'"
  43. @click="setAllAmount"></view>
  44. </view>
  45. </view>
  46. <button hover-class="" @click="toTransfer"
  47. class="btn btn-dark waves-effect waves-light"><i class="fi fi-rs-check"></i>
  48. <text v-t="'Btn.Submit'"></text></button>
  49. </view>
  50. </uni-forms>
  51. </view>
  52. </view>
  53. </view>
  54. <div class="col-lg-4 col-sm-12 card card-body">
  55. <h4 v-t="'Custom.Transfer.Tips'"></h4>
  56. <view class="fs-6 fw-semibold text-color">
  57. <view v-t="'Custom.Transfer.Tips1'"></view>
  58. <view v-t="'Custom.Transfer.Tips2'"></view>
  59. <view v-t="'Custom.Transfer.Tips3'"></view>
  60. <view v-t="'Custom.Transfer.Tips4'"></view>
  61. </view>
  62. </div>
  63. </view>
  64. </view>
  65. <!-- 步骤2:转账表单 -->
  66. <!-- 失败弹窗 -->
  67. <cwg-error-popup v-model:visible="dialogError" @confirm="closeDia" :responseMessage="RES" />
  68. <!-- 成功弹窗 -->
  69. <cwg-success-popup v-model:visible="dialogSuccess" @confirm="closeDia" />
  70. <!-- 等待弹窗 -->
  71. <cwg-wait-popup v-model:visible="dialogCheckWait" type="center" :mask-click="false" :showFooters="false" />
  72. <cwg-confirm-popup />
  73. </cwg-page-wrapper>
  74. </template>
  75. <script setup>
  76. import { ref, reactive, computed, onMounted, watch, nextTick } from 'vue'
  77. import { useI18n } from 'vue-i18n'
  78. import { onLoad, onReady } from '@dcloudio/uni-app'
  79. import { getCurrentInstance } from 'vue'
  80. import { isAfterJuly28 } from '@/utils/dateUtils'
  81. import { customApi } from '@/service/custom'
  82. import { financialApi } from '@/service/financial'
  83. import { ibApi } from '@/service/ib'
  84. import { useFilters } from '@/composables/useFilters'
  85. const { numberDecimal } = useFilters()
  86. // import ServiceA from "@/service/activity"; // 原注释保留
  87. import useUserStore from '@/stores/use-user-store'
  88. const userStore = useUserStore()
  89. const customInfo = computed(() => {
  90. return userStore?.userInfo?.customInfo || {}
  91. })
  92. import Config from '@/config/index'
  93. import { useConfirm } from '@/hooks/useConfirm'
  94. const confirm = useConfirm()
  95. const { Code } = Config
  96. const { t, locale } = useI18n()
  97. // 获取全局实例(用于访问 Session、$pigeon 等)
  98. const { proxy } = getCurrentInstance()
  99. const Session = proxy?.Session
  100. const $pigeon = proxy?.$pigeon
  101. const balance = ref(0)
  102. // 响应式数据
  103. const loginValue = ref(null)
  104. const flag = ref(false)
  105. const RES = ref('') // 弹窗响应信息
  106. const loginOptions = ref([])
  107. const toOptions = ref([])
  108. // 跨系统内转下拉数据
  109. const accountList = ref([])
  110. const systemTransferType = ref(0)
  111. const step2 = ref(false)
  112. const transferType = ref('internal')
  113. const amountLimits = reactive({
  114. minAmount: '',
  115. maxAmount: '',
  116. })
  117. const form = reactive({
  118. currency: 'USD',
  119. depositLogin: null,
  120. withdrawLogin: null,
  121. amount: ''
  122. })
  123. const amountErrorMessage = ref('')
  124. const setAllAmount = () => {
  125. form.amount = balance.value
  126. validateAmount()
  127. }
  128. const dialogSuccess = computed(() => dialogCheck.value && dialogVisible.value)
  129. const dialogError = computed(() => dialogCheck.value && !dialogVisible.value)
  130. const dialogCheck = ref(false)
  131. const dialogVisible = ref(false)
  132. const dialogCheckWait = ref(false)
  133. const pageQuery = ref({})
  134. const rules = computed(() => ({
  135. withdrawLogin: {
  136. rules: [
  137. {
  138. required: true,
  139. errorMessage: t('vaildate.select.empty')
  140. },
  141. ],
  142. },
  143. depositLogin: {
  144. rules: [
  145. {
  146. required: true,
  147. errorMessage: t('vaildate.select.empty')
  148. },
  149. ],
  150. },
  151. amount: {
  152. rules: [
  153. {
  154. required: true,
  155. errorMessage: t('vaildate.amount.format'),
  156. },
  157. {
  158. validateFunction: (rule, value, data, callback) => {
  159. console.log(rule, value, data, callback, 2121212);
  160. value = Number(value)
  161. if (!value) {
  162. callback(t('vaildate.amount.format'))
  163. } else if (
  164. amountLimits.minAmount &&
  165. amountLimits.maxAmount &&
  166. (parseFloat(amountLimits.minAmount) > parseFloat(value) ||
  167. parseFloat(amountLimits.maxAmount) < parseFloat(value))
  168. ) {
  169. callback(t('vaildate.amount.amount') +
  170. amountLimits.minAmount +
  171. '-' +
  172. amountLimits.maxAmount)
  173. } else if (!/^[0-9]+([.]{1}[0-9]{1,2})?$/.test(value)) {
  174. callback(t('vaildate.amount.format'))
  175. } else if (value > balance.value) {
  176. callback(t('Label.LoginBalance') + ':$' + balance.value);
  177. }
  178. return true
  179. }
  180. },
  181. ],
  182. }
  183. }));
  184. // 语言切换时 → 清除旧的校验提示(必须加!)
  185. watch(locale, () => {
  186. formRef.value?.clearValidate()
  187. amountErrorMessage.value = ''
  188. })
  189. function validateAmount() {
  190. const value = Number(form.amount)
  191. if (!value) {
  192. amountErrorMessage.value = t('vaildate.amount.format')
  193. return false
  194. } else if (
  195. amountLimits.minAmount &&
  196. amountLimits.maxAmount &&
  197. (parseFloat(amountLimits.minAmount) > parseFloat(value) ||
  198. parseFloat(amountLimits.maxAmount) < parseFloat(value))
  199. ) {
  200. amountErrorMessage.value = t('vaildate.amount.amount') +
  201. amountLimits.minAmount +
  202. '-' +
  203. amountLimits.maxAmount
  204. } else if (!/^[0-9]+([.]{1}[0-9]{1,2})?$/.test(value)) {
  205. amountErrorMessage.value = t('vaildate.amount.format')
  206. } else if (value > balance.value) {
  207. amountErrorMessage.value = t('Label.LoginBalance') + ':$' + balance.value
  208. }
  209. amountErrorMessage.value = ''
  210. return true
  211. }
  212. // 模板引用(对应原 this.$refs.form)
  213. const formRef = ref(null)
  214. // 计算属性
  215. const getInfoAgentTransfer = computed(() => {
  216. return customInfo.value?.agentTransfer
  217. })
  218. // 单位类型
  219. function groupCurrency(type) {
  220. const map = { GBP: ': £', USD: ': $', EUR: ': €', USC: ': ¢' }
  221. return map[type] || ': $'
  222. }
  223. // 单位类型
  224. function groupCurrency1(type) {
  225. const map = { GBP: '£', USD: '$', EUR: '€', USC: '¢' }
  226. return map[type] || '$'
  227. }
  228. // 账户类型
  229. function groupTypeName(type) {
  230. const typeMap = {
  231. '1': t('AccountType.ClassicAccount'),
  232. '2': t('AccountType.SeniorAccount'),
  233. '3': isAfterJuly28() ? '--' : t('AccountType.AgencyAccount'),
  234. '5': t('AccountType.SpeedAccount'),
  235. '6': t('AccountType.SpeedAccount'),
  236. '7': t('AccountType.StandardAccount'),
  237. '8': t('AccountType.CentAccount')
  238. }
  239. return typeMap[type] || ''
  240. }
  241. const closeDia = () => {
  242. formRef.value?.clearValidate()
  243. step2.value = false
  244. loginValue.value = null
  245. form.depositLogin = null
  246. form.withdrawLogin = null
  247. form.amount = ''
  248. transferType.value = 'internal'
  249. dialogCheck.value = false
  250. dialogVisible.value = false
  251. amountErrorMessage.value = ''
  252. getDateList()
  253. }
  254. const submitting = ref(false);
  255. const toTransfer = async () => {
  256. // 防止重复提交
  257. if (submitting.value) return;
  258. submitting.value = true;
  259. try {
  260. // 表单验证(验证失败会抛出异常)
  261. await formRef.value?.validate()
  262. // 检查活动参与情况(仅内部转账检查转出账户)[保留注释]
  263. if (transferType.value === 'internal') {
  264. // 活动检查代码已注释,保留原样
  265. }
  266. dialogCheckWait.value = true;
  267. let res;
  268. if (transferType.value === 'internal') {
  269. res = await financialApi.TransferApply({ ...form });
  270. } else if (transferType.value === 'agent') {
  271. res = await ibApi.agentTransCtaferApply({ ...form });
  272. } else if (transferType.value === 'system') {
  273. const selectedAccount = accountList.value.find(item => item.login === form.depositLogin);
  274. res = await financialApi.transferSystemApply({
  275. currency: form.currency,
  276. depositLogin: form.depositLogin,
  277. withdrawLogin: form.withdrawLogin,
  278. amount: form.amount,
  279. depositPlatform: selectedAccount?.platform || 'MT4',
  280. depositCurrency: selectedAccount?.currency || form.currency,
  281. depositType: selectedAccount?.type || 2,
  282. });
  283. }
  284. dialogCheckWait.value = false;
  285. if (res.code == Code.StatusOK) {
  286. dialogCheck.value = true;
  287. dialogVisible.value = true;
  288. } else {
  289. RES.value = res.msg;
  290. dialogCheck.value = true;
  291. dialogVisible.value = false;
  292. }
  293. } catch (error) {
  294. console.log(error, 12121);
  295. if (error instanceof Array) {
  296. uni.showToast({ title: error[0].errorMessage, icon: 'none' });
  297. return
  298. } else {
  299. console.log(232312);
  300. RES.value = error.msg;
  301. dialogCheck.value = true;
  302. dialogVisible.value = false;
  303. resetForm()
  304. }
  305. } finally {
  306. submitting.value = false;
  307. flag.value = false;
  308. if (dialogCheckWait.value) dialogCheckWait.value = false;
  309. }
  310. };
  311. const cancle = () => {
  312. step2.value = false
  313. loginValue.value = null
  314. transferType.value = 'internal'
  315. }
  316. // 转出账户列表
  317. const withdrawDisplayList = computed(() => {
  318. return loginOptions.value.map(item => ({
  319. text: `${item.login} - ${groupTypeName(item.type)} - ${t('Custom.Deposit.AvailableBalance')}${groupCurrency(item.currency)}${numberDecimal(item.balance)}`,
  320. value: item.login,
  321. disable: isWithdrawDisabled(item)
  322. }))
  323. })
  324. const transferTypeOptions = computed(() => [
  325. { value: 'internal', text: t('Home.page_customer.item5') },
  326. ...(getInfoAgentTransfer.value ? [{ value: 'agent', text: t('Home.page_ib.item9') }] : []),
  327. // ...(systemTransferType.value === 1 ? [{ value: 'system', text: t('Home.page_ib.item9') }] : []),
  328. ]);
  329. const currencyOptions = ref([{ value: 'USD', text: 'USD' }])
  330. // 转入账户列表
  331. const depositDisplayList = computed(() => {
  332. return toOptions.value.map(item => ({
  333. text: `${item.login} - ${groupTypeName(item.type)} - ${t('Custom.Deposit.AvailableBalance')}${groupCurrency(item.currency)}${numberDecimal(item.balance)}`,
  334. value: item.login,
  335. disable: isDepositDisabled(item)
  336. }))
  337. })
  338. // 转出账户是否禁用
  339. const isWithdrawDisabled = (item) => {
  340. const closeFunc = item.closeFunctions || []
  341. const transType = transferType.value // transferType 是 ref
  342. return (
  343. closeFunc.indexOf('5') !== -1 || // 包含'5'时禁用
  344. closeFunc.indexOf('6') !== -1 || // 包含'6'时禁用
  345. (transType === 'agent' && closeFunc.indexOf('3') !== -1) ||
  346. (transType === 'internal' && closeFunc.indexOf('7') !== -1) ||
  347. (transType === 'system' && closeFunc.indexOf('7') !== -1)
  348. )
  349. }
  350. // 转入账户是否禁用
  351. function isDepositDisabled(item) {
  352. const closeFunc = item.closeFunctions || []
  353. if (transferType.value === 'agent' && closeFunc.indexOf('3') !== -1) return true
  354. if (transferType.value === 'internal' && closeFunc.indexOf('7') !== -1) return true
  355. if (transferType.value === 'system' && closeFunc.indexOf('7') !== -1) return true
  356. return false
  357. }
  358. const loading = ref(false)
  359. const getDateList = async () => {
  360. loading.value = true
  361. let res = await customApi.CustomDropdown({ platform: '' })
  362. if (res.code == Code.StatusOK) {
  363. loginOptions.value = res.data
  364. // 默认选中第一个
  365. nextTick(() => {
  366. loginValue.value = loginOptions.value?.[0].login
  367. })
  368. nextTick(() => {
  369. handleRouteParams()
  370. })
  371. } else {
  372. uni.showToast({ title: res.msg, icon: 'none' })
  373. }
  374. loading.value = false
  375. }
  376. // 获取代理列表
  377. const getAgentList = async () => {
  378. let res = await financialApi.getAgentList({})
  379. if (res.code == Code.StatusOK) {
  380. toOptions.value = res.data
  381. } else {
  382. uni.showToast({ title: res.msg, icon: 'none' })
  383. }
  384. }
  385. //获取内转数额区间
  386. const getAmount = async () => {
  387. let res = await financialApi.transferInfo({})
  388. if (res.code == Code.StatusOK) {
  389. Object.assign(amountLimits, res.data)
  390. } else {
  391. uni.showToast({ title: res.msg, icon: 'none' })
  392. }
  393. }
  394. // 获取跨系统转账下拉列表
  395. const getTransferSystemDropdown = async () => {
  396. let res = await financialApi.transferSystemDropdown({})
  397. if (res.code == Code.StatusOK && res.data) {
  398. systemTransferType.value = res.data.transferType ?? 0
  399. console.log(systemTransferType.value, 'systemTransferType')
  400. accountList.value = res.data.accountList || []
  401. }
  402. }
  403. // 生命周期
  404. onLoad((options) => {
  405. pageQuery.value = options
  406. })
  407. // 更新转出账户选项
  408. function updateToOptions() {
  409. toOptions.value = []
  410. if (transferType.value === 'internal') {
  411. loginOptions.value.forEach(item => {
  412. if (form.withdrawLogin != null || item.login != form.withdrawLogin) {
  413. toOptions.value.push(item)
  414. }
  415. })
  416. } else if (transferType.value === 'agent') {
  417. getAgentList()
  418. } else if (transferType.value === 'system') {
  419. toOptions.value = accountList.value.filter(item => form.withdrawLogin != null || item.login != form.withdrawLogin)
  420. }
  421. }
  422. // 处理路由参数
  423. function handleRouteParams() {
  424. nextTick(() => {
  425. if (pageQuery.value.login) {
  426. const loginNum = pageQuery.value.login ? Number(pageQuery.value.login) : null
  427. form.withdrawLogin = loginNum
  428. step2.value = loginNum ? true : false
  429. loginValue.value = loginNum
  430. }
  431. })
  432. updateToOptions()
  433. }
  434. const showCentAccountTransferTip = (login) => {
  435. const selectedAccount = loginOptions.value.find(
  436. (item) => item.login == login,
  437. );
  438. if (!selectedAccount) {
  439. return;
  440. }
  441. const isCentAccount =
  442. selectedAccount.type == "8" || selectedAccount.currency === "USC";
  443. if (isCentAccount) {
  444. confirm({
  445. title: t("Msg.SystemPrompt"),
  446. content: t("vu.item14") + t("vu.item15") + t("vu.item16"),
  447. confirmText: t("Btn.Confirm"),
  448. cancelText: t("Btn.Cancel"),
  449. })
  450. }
  451. }
  452. onMounted(() => {
  453. getDateList()
  454. getAmount()
  455. // getTransferSystemDropdown()
  456. })
  457. const resetForm = async () => {
  458. await nextTick();
  459. formRef.value?.clearValidate();
  460. form.customBankCode = ""
  461. form.depositLogin = null
  462. // form.withdrawLogin = null
  463. form.amount = ""
  464. amountErrorMessage.value = ""
  465. submitting.value = false;
  466. flag.value = false;
  467. // loginValue.value = null
  468. }
  469. // 侦听器
  470. watch(loginValue, (newVal) => {
  471. if (newVal != null) {
  472. step2.value = true
  473. form.withdrawLogin = Number(newVal)
  474. const found = loginOptions.value.find(opt => opt.login === Number(newVal))
  475. balance.value = found.balance
  476. form.depositLogin = null
  477. form.amount = ''
  478. amountErrorMessage.value = ''
  479. showCentAccountTransferTip(newVal)
  480. toOptions.value = []
  481. if (transferType.value === 'internal') {
  482. // 内部转账逻辑
  483. loginOptions.value.forEach((item) => {
  484. if (item.login != newVal) {
  485. toOptions.value.push(item)
  486. }
  487. })
  488. } else if (transferType.value === 'agent') {
  489. // 代理内转逻辑
  490. getAgentList()
  491. } else if (transferType.value === 'system') {
  492. // 跨系统内转,排除当前选择的转出账户
  493. toOptions.value = accountList.value.filter(
  494. (item) => item.login != form.withdrawLogin
  495. )
  496. }
  497. }
  498. })
  499. watch(transferType, (newVal) => {
  500. if (form.depositLogin) {
  501. form.depositLogin = null
  502. }
  503. if (loginValue.value && step2.value) {
  504. toOptions.value = []
  505. if (newVal === 'internal') {
  506. // 内部转账逻辑
  507. loginOptions.value.forEach((item) => {
  508. if (item.login != loginValue.value) {
  509. toOptions.value.push(item)
  510. }
  511. })
  512. } else if (newVal === 'agent') {
  513. // 代理内转逻辑
  514. getAgentList()
  515. } else if (newVal === 'system') {
  516. // 跨系统内转,排除当前选择的转出账户
  517. toOptions.value = accountList.value.filter(
  518. (item) => item.login != form.withdrawLogin
  519. )
  520. }
  521. }
  522. })
  523. </script>
  524. <style lang="scss" scoped>
  525. @import "@/uni.scss";
  526. .card-body {
  527. color: var(--bs-emphasis-color);
  528. }
  529. .text-color {
  530. font-size: px2rpx(15);
  531. line-height: 1.5;
  532. }
  533. .amount-box {
  534. display: flex;
  535. align-items: center;
  536. gap: px2rpx(12);
  537. .amount-input {
  538. flex: 1;
  539. }
  540. .btn {
  541. margin-bottom: px2rpx(22);
  542. }
  543. }
  544. .transfer-page {
  545. width: 100%;
  546. padding-bottom: px2rpx(20);
  547. .main-content {
  548. text-align: left;
  549. .box {
  550. padding-top: px2rpx(5);
  551. color: #303133;
  552. .b-card {
  553. border: 1px solid var(--bs-border-color);
  554. background-color: rgba(var(--bs-body-bg-rgb), var(--bs-bg-opacity)) !important;
  555. margin-bottom: px2rpx(10);
  556. border-radius: px2rpx(6);
  557. box-shadow: 0 px2rpx(1) px2rpx(6) 0 rgba(0, 0, 0, 0.05);
  558. &:hover {
  559. box-shadow: 0 px2rpx(2) px2rpx(8) 0 rgba(0, 0, 0, 0.1);
  560. }
  561. .card-top {
  562. padding: px2rpx(15) px2rpx(20);
  563. .card-row {
  564. margin-bottom: px2rpx(30);
  565. &:last-child {
  566. margin-bottom: 0;
  567. }
  568. }
  569. .card-tit {
  570. margin-bottom: px2rpx(0) !important;
  571. }
  572. .tit {
  573. font-size: px2rpx(16);
  574. font-weight: 600;
  575. margin-bottom: px2rpx(16);
  576. display: flex;
  577. align-items: center;
  578. color: var(--bs-heading-color);
  579. position: relative;
  580. padding-left: 20px;
  581. &:after {
  582. content: '';
  583. position: absolute;
  584. left: 0;
  585. top: 50%;
  586. transform: translateY(-50%);
  587. width: 0;
  588. height: 0;
  589. border-top: 6px solid transparent;
  590. border-bottom: 6px solid transparent;
  591. border-left: 8px solid currentColor;
  592. }
  593. .iconfont {
  594. margin-right: px2rpx(8);
  595. color: var(--color-primary);
  596. font-size: px2rpx(18);
  597. }
  598. }
  599. .title-wrapper {
  600. display: flex;
  601. justify-content: space-between;
  602. align-items: center;
  603. }
  604. }
  605. }
  606. }
  607. .box-step2 {
  608. .form-row {
  609. display: flex;
  610. flex-wrap: wrap;
  611. margin-bottom: px2rpx(12);
  612. gap: px2rpx(12);
  613. &:last-child {
  614. margin-bottom: 0;
  615. }
  616. .form-col {
  617. flex: 1;
  618. min-width: px2rpx(140);
  619. @media screen and (max-width: 991px) {
  620. flex: 0 0 100%;
  621. width: 100%;
  622. }
  623. }
  624. .form-col-full {
  625. width: 100%;
  626. padding: 0 px2rpx(5);
  627. }
  628. }
  629. .tips {
  630. line-height: 1.8;
  631. font-size: px2rpx(12);
  632. color: var(--bs-heading-color);
  633. background-color: rgba(var(--bs-body-bg-rgb), 1) !important;
  634. padding: px2rpx(12);
  635. border-radius: px2rpx(4);
  636. border-left: px2rpx(2) solid #cf1322;
  637. .title {
  638. font-weight: 600;
  639. margin-bottom: px2rpx(6);
  640. color: var(--bs-heading-color);
  641. }
  642. }
  643. }
  644. }
  645. .picker-select {
  646. background-color: rgba(var(--bs-body-bg-rgb), var(--bs-bg-opacity)) !important;
  647. border: 1px solid #dcdfe6;
  648. border-radius: px2rpx(4);
  649. padding: px2rpx(12) px2rpx(14);
  650. font-size: px2rpx(14);
  651. color: #606266;
  652. line-height: 1.4;
  653. width: 100%;
  654. box-sizing: border-box;
  655. &:hover {
  656. border-color: #409eff;
  657. }
  658. &.picker-disabled {
  659. background-color: rgba(var(--bs-body-bg-rgb), var(--bs-bg-opacity)) !important;
  660. color: #c0c4cc;
  661. cursor: not-allowed;
  662. }
  663. }
  664. .disabled-input {
  665. background-color: rgba(var(--bs-body-bg-rgb), var(--bs-bg-opacity)) !important;
  666. border: 1px solid #dcdfe6;
  667. border-radius: px2rpx(4);
  668. padding: px2rpx(12) px2rpx(14);
  669. font-size: px2rpx(14);
  670. color: #606266;
  671. width: 100%;
  672. box-sizing: border-box;
  673. }
  674. .m-input {
  675. background-color: rgba(var(--bs-body-bg-rgb), var(--bs-bg-opacity)) !important;
  676. border: 1px solid #dcdfe6;
  677. border-radius: px2rpx(4);
  678. padding: px2rpx(12) px2rpx(14);
  679. font-size: px2rpx(14);
  680. width: 100%;
  681. box-sizing: border-box;
  682. &:focus {
  683. border-color: #409eff;
  684. outline: none;
  685. box-shadow: 0 0 0 px2rpx(1) rgba(64, 158, 255, 0.2);
  686. }
  687. }
  688. .popup-content {
  689. padding: px2rpx(30) px2rpx(20);
  690. text-align: center;
  691. min-width: px2rpx(250);
  692. max-width: 80%;
  693. margin: 0 auto;
  694. @media screen and (max-width: 991px) {
  695. min-width: 80%;
  696. max-width: 90%;
  697. margin: 0 px2rpx(10);
  698. }
  699. position: relative;
  700. .icon {
  701. .iconfont {
  702. font-size: px2rpx(60);
  703. display: block;
  704. margin: 0 auto;
  705. }
  706. .icon-chenggong {
  707. color: #67c23a;
  708. }
  709. .icon-jingshi {
  710. color: #f56c6c;
  711. }
  712. .icon-dengdai {
  713. color: #e6a23c;
  714. }
  715. }
  716. .des1 {
  717. font-weight: 600;
  718. font-size: px2rpx(16);
  719. margin: px2rpx(20) 0 px2rpx(15);
  720. color: #303133;
  721. line-height: 1.4;
  722. padding: 0 px2rpx(10);
  723. }
  724. .dialog-footer {
  725. display: flex;
  726. justify-content: center;
  727. gap: px2rpx(10);
  728. margin-top: px2rpx(10);
  729. @media (max-width: 750rpx) {
  730. flex-direction: column;
  731. align-items: center;
  732. gap: px2rpx(6);
  733. }
  734. button {
  735. min-width: px2rpx(90);
  736. padding: 0 px2rpx(12);
  737. border-radius: px2rpx(4);
  738. font-size: px2rpx(14);
  739. transition: all 0.3s ease;
  740. cursor: pointer;
  741. &[type="primary"] {
  742. background-color: #409eff;
  743. color: var(--bs-emphasis-color);
  744. border: none;
  745. &:hover {
  746. background-color: #66b1ff;
  747. transform: translateY(px2rpx(-1));
  748. box-shadow: 0 px2rpx(2) px2rpx(6) 0 rgba(64, 158, 255, 0.3);
  749. }
  750. &:active {
  751. background-color: #3a8ee6;
  752. transform: translateY(0);
  753. }
  754. }
  755. &:not([type="primary"]) {
  756. background-color: rgba(var(--bs-body-bg-rgb), var(--bs-bg-opacity)) !important;
  757. border: 1px solid #dcdfe6;
  758. color: #606266;
  759. &:hover {
  760. border-color: #409eff;
  761. color: #409eff;
  762. transform: translateY(px2rpx(-1));
  763. }
  764. &:active {
  765. transform: translateY(0);
  766. }
  767. }
  768. }
  769. }
  770. }
  771. .wait-popup {
  772. .des1 {
  773. margin-top: px2rpx(10);
  774. }
  775. .icon {
  776. .iconfont {
  777. animation: spin 1s linear infinite;
  778. }
  779. }
  780. }
  781. }
  782. // 动画
  783. @keyframes popupFadeIn {
  784. from {
  785. opacity: 0;
  786. transform: scale(0.9);
  787. }
  788. to {
  789. opacity: 1;
  790. transform: scale(1);
  791. }
  792. }
  793. @keyframes fadeIn {
  794. from {
  795. opacity: 0;
  796. transform: translateY(px2rpx(10));
  797. }
  798. to {
  799. opacity: 1;
  800. transform: translateY(0);
  801. }
  802. }
  803. @keyframes pulse {
  804. 0% {
  805. transform: scale(1);
  806. }
  807. 50% {
  808. transform: scale(1.05);
  809. }
  810. 100% {
  811. transform: scale(1);
  812. }
  813. }
  814. @keyframes spin {
  815. from {
  816. transform: rotate(0deg);
  817. }
  818. to {
  819. transform: rotate(360deg);
  820. }
  821. }
  822. // 表单错误信息样式
  823. .uni-forms-item__error {
  824. font-size: px2rpx(12);
  825. color: #f56c6c;
  826. margin-top: px2rpx(4);
  827. }
  828. // 适配不同屏幕尺寸(媒体查询中的 750rpx 保持不变)
  829. @media (max-width: 750rpx) {
  830. .transfer-page {
  831. .main-content {
  832. padding: px2rpx(8);
  833. .box {
  834. .b-card {
  835. .card-top {
  836. padding: px2rpx(12) px2rpx(16);
  837. .tit {
  838. font-size: px2rpx(14);
  839. .iconfont {
  840. font-size: px2rpx(16);
  841. }
  842. }
  843. }
  844. }
  845. }
  846. }
  847. .s-btn {
  848. font-size: px2rpx(14);
  849. padding: px2rpx(10) px2rpx(16);
  850. }
  851. .popup-content {
  852. padding: px2rpx(20) px2rpx(16);
  853. .icon {
  854. .iconfont {
  855. font-size: px2rpx(50);
  856. }
  857. }
  858. .des1 {
  859. font-size: px2rpx(14);
  860. margin: px2rpx(15) 0 px2rpx(10);
  861. }
  862. .dialog-footer {
  863. button {
  864. min-width: px2rpx(80);
  865. font-size: px2rpx(13);
  866. }
  867. }
  868. }
  869. }
  870. }
  871. </style>