transfer.vue 30 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967
  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. }
  253. const submitting = ref(false);
  254. const toTransfer = async () => {
  255. // 防止重复提交
  256. if (submitting.value) return;
  257. submitting.value = true;
  258. try {
  259. // 表单验证(验证失败会抛出异常)
  260. await formRef.value?.validate()
  261. // 检查活动参与情况(仅内部转账检查转出账户)[保留注释]
  262. if (transferType.value === 'internal') {
  263. // 活动检查代码已注释,保留原样
  264. }
  265. dialogCheckWait.value = true;
  266. let res;
  267. if (transferType.value === 'internal') {
  268. res = await financialApi.TransferApply({ ...form });
  269. } else if (transferType.value === 'agent') {
  270. res = await ibApi.agentTransCtaferApply({ ...form });
  271. } else if (transferType.value === 'system') {
  272. const selectedAccount = accountList.value.find(item => item.login === form.depositLogin);
  273. res = await financialApi.transferSystemApply({
  274. currency: form.currency,
  275. depositLogin: form.depositLogin,
  276. withdrawLogin: form.withdrawLogin,
  277. amount: form.amount,
  278. depositPlatform: selectedAccount?.platform || 'MT4',
  279. depositCurrency: selectedAccount?.currency || form.currency,
  280. depositType: selectedAccount?.type || 2,
  281. });
  282. }
  283. dialogCheckWait.value = false;
  284. if (res.code == Code.StatusOK) {
  285. dialogCheck.value = true;
  286. dialogVisible.value = true;
  287. } else {
  288. RES.value = res.msg;
  289. dialogCheck.value = true;
  290. dialogVisible.value = false;
  291. }
  292. } catch (error) {
  293. console.log(error, 12121);
  294. if (error instanceof Array) {
  295. uni.showToast({ title: error[0].errorMessage, icon: 'none' });
  296. return
  297. } else {
  298. console.log(232312);
  299. RES.value = error.msg;
  300. dialogCheck.value = true;
  301. dialogVisible.value = false;
  302. resetForm()
  303. }
  304. } finally {
  305. submitting.value = false;
  306. flag.value = false;
  307. if (dialogCheckWait.value) dialogCheckWait.value = false;
  308. }
  309. };
  310. const cancle = () => {
  311. step2.value = false
  312. loginValue.value = null
  313. transferType.value = 'internal'
  314. }
  315. // 转出账户列表
  316. const withdrawDisplayList = computed(() => {
  317. return loginOptions.value.map(item => ({
  318. text: `${item.login} - ${groupTypeName(item.type)} - ${t('Custom.Deposit.AvailableBalance')}${groupCurrency(item.currency)}${numberDecimal(item.balance)}`,
  319. value: item.login,
  320. disable: isWithdrawDisabled(item)
  321. }))
  322. })
  323. const transferTypeOptions = computed(() => [
  324. { value: 'internal', text: t('Home.page_customer.item5') },
  325. ...(getInfoAgentTransfer.value ? [{ value: 'agent', text: t('Home.page_ib.item9') }] : []),
  326. // ...(systemTransferType.value === 1 ? [{ value: 'system', text: t('Home.page_ib.item9') }] : []),
  327. ]);
  328. const currencyOptions = ref([{ value: 'USD', text: 'USD' }])
  329. // 转入账户列表
  330. const depositDisplayList = computed(() => {
  331. return toOptions.value.map(item => ({
  332. text: `${item.login} - ${groupTypeName(item.type)} - ${t('Custom.Deposit.AvailableBalance')}${groupCurrency(item.currency)}${numberDecimal(item.balance)}`,
  333. value: item.login,
  334. disable: isDepositDisabled(item)
  335. }))
  336. })
  337. // 转出账户是否禁用
  338. const isWithdrawDisabled = (item) => {
  339. const closeFunc = item.closeFunctions || []
  340. const transType = transferType.value // transferType 是 ref
  341. return (
  342. closeFunc.indexOf('5') !== -1 || // 包含'5'时禁用
  343. closeFunc.indexOf('6') !== -1 || // 包含'6'时禁用
  344. (transType === 'agent' && closeFunc.indexOf('3') !== -1) ||
  345. (transType === 'internal' && closeFunc.indexOf('7') !== -1) ||
  346. (transType === 'system' && closeFunc.indexOf('7') !== -1)
  347. )
  348. }
  349. // 转入账户是否禁用
  350. function isDepositDisabled(item) {
  351. const closeFunc = item.closeFunctions || []
  352. if (transferType.value === 'agent' && closeFunc.indexOf('3') !== -1) return true
  353. if (transferType.value === 'internal' && closeFunc.indexOf('7') !== -1) return true
  354. if (transferType.value === 'system' && closeFunc.indexOf('7') !== -1) return true
  355. return false
  356. }
  357. const loading = ref(false)
  358. const getDateList = async () => {
  359. loading.value = true
  360. let res = await customApi.CustomDropdown({ platform: '' })
  361. if (res.code == Code.StatusOK) {
  362. loginOptions.value = res.data
  363. // 默认选中第一个
  364. nextTick(() => {
  365. loginValue.value = loginOptions.value?.[0].login
  366. })
  367. nextTick(() => {
  368. handleRouteParams()
  369. })
  370. } else {
  371. uni.showToast({ title: res.msg, icon: 'none' })
  372. }
  373. loading.value = false
  374. }
  375. // 获取代理列表
  376. const getAgentList = async () => {
  377. let res = await financialApi.getAgentList({})
  378. if (res.code == Code.StatusOK) {
  379. toOptions.value = res.data
  380. } else {
  381. uni.showToast({ title: res.msg, icon: 'none' })
  382. }
  383. }
  384. //获取内转数额区间
  385. const getAmount = async () => {
  386. let res = await financialApi.transferInfo({})
  387. if (res.code == Code.StatusOK) {
  388. Object.assign(amountLimits, res.data)
  389. } else {
  390. uni.showToast({ title: res.msg, icon: 'none' })
  391. }
  392. }
  393. // 获取跨系统转账下拉列表
  394. const getTransferSystemDropdown = async () => {
  395. let res = await financialApi.transferSystemDropdown({})
  396. if (res.code == Code.StatusOK && res.data) {
  397. systemTransferType.value = res.data.transferType ?? 0
  398. console.log(systemTransferType.value, 'systemTransferType')
  399. accountList.value = res.data.accountList || []
  400. }
  401. }
  402. // 生命周期
  403. onLoad((options) => {
  404. pageQuery.value = options
  405. })
  406. // 更新转出账户选项
  407. function updateToOptions() {
  408. toOptions.value = []
  409. if (transferType.value === 'internal') {
  410. loginOptions.value.forEach(item => {
  411. if (form.withdrawLogin != null || item.login != form.withdrawLogin) {
  412. toOptions.value.push(item)
  413. }
  414. })
  415. } else if (transferType.value === 'agent') {
  416. getAgentList()
  417. } else if (transferType.value === 'system') {
  418. toOptions.value = accountList.value.filter(item => form.withdrawLogin != null || item.login != form.withdrawLogin)
  419. }
  420. }
  421. // 处理路由参数
  422. function handleRouteParams() {
  423. nextTick(() => {
  424. if (pageQuery.value.login) {
  425. const loginNum = pageQuery.value.login ? Number(pageQuery.value.login) : null
  426. form.withdrawLogin = loginNum
  427. step2.value = loginNum ? true : false
  428. loginValue.value = loginNum
  429. }
  430. })
  431. updateToOptions()
  432. }
  433. const showCentAccountTransferTip = (login) => {
  434. const selectedAccount = loginOptions.value.find(
  435. (item) => item.login == login,
  436. );
  437. if (!selectedAccount) {
  438. return;
  439. }
  440. const isCentAccount =
  441. selectedAccount.type == "8" || selectedAccount.currency === "USC";
  442. if (isCentAccount) {
  443. confirm({
  444. title: t("Msg.SystemPrompt"),
  445. content: t("vu.item14") + t("vu.item15") + t("vu.item16"),
  446. confirmText: t("Btn.Confirm"),
  447. cancelText: t("Btn.Cancel"),
  448. })
  449. }
  450. }
  451. onMounted(() => {
  452. getDateList()
  453. getAmount()
  454. // getTransferSystemDropdown()
  455. })
  456. const resetForm = async () => {
  457. await nextTick();
  458. formRef.value?.clearValidate();
  459. form.customBankCode = ""
  460. form.depositLogin = null
  461. // form.withdrawLogin = null
  462. form.amount = ""
  463. amountErrorMessage.value = ""
  464. submitting.value = false;
  465. flag.value = false;
  466. // loginValue.value = null
  467. }
  468. // 侦听器
  469. watch(loginValue, (newVal) => {
  470. if (newVal != null) {
  471. step2.value = true
  472. form.withdrawLogin = Number(newVal)
  473. const found = loginOptions.value.find(opt => opt.login === Number(newVal))
  474. balance.value = found.balance
  475. form.depositLogin = null
  476. form.amount = ''
  477. amountErrorMessage.value = ''
  478. showCentAccountTransferTip(newVal)
  479. toOptions.value = []
  480. if (transferType.value === 'internal') {
  481. // 内部转账逻辑
  482. loginOptions.value.forEach((item) => {
  483. if (item.login != newVal) {
  484. toOptions.value.push(item)
  485. }
  486. })
  487. } else if (transferType.value === 'agent') {
  488. // 代理内转逻辑
  489. getAgentList()
  490. } else if (transferType.value === 'system') {
  491. // 跨系统内转,排除当前选择的转出账户
  492. toOptions.value = accountList.value.filter(
  493. (item) => item.login != form.withdrawLogin
  494. )
  495. }
  496. }
  497. })
  498. watch(transferType, (newVal) => {
  499. if (form.depositLogin) {
  500. form.depositLogin = null
  501. }
  502. if (loginValue.value && step2.value) {
  503. toOptions.value = []
  504. if (newVal === 'internal') {
  505. // 内部转账逻辑
  506. loginOptions.value.forEach((item) => {
  507. if (item.login != loginValue.value) {
  508. toOptions.value.push(item)
  509. }
  510. })
  511. } else if (newVal === 'agent') {
  512. // 代理内转逻辑
  513. getAgentList()
  514. } else if (newVal === 'system') {
  515. // 跨系统内转,排除当前选择的转出账户
  516. toOptions.value = accountList.value.filter(
  517. (item) => item.login != form.withdrawLogin
  518. )
  519. }
  520. }
  521. })
  522. </script>
  523. <style lang="scss" scoped>
  524. @import "@/uni.scss";
  525. .card-body {
  526. color: var(--bs-emphasis-color);
  527. }
  528. .text-color {
  529. font-size: px2rpx(15);
  530. line-height: 1.5;
  531. }
  532. .amount-box {
  533. display: flex;
  534. align-items: center;
  535. gap: px2rpx(12);
  536. .amount-input {
  537. flex: 1;
  538. }
  539. .btn {
  540. margin-bottom: px2rpx(22);
  541. }
  542. }
  543. .transfer-page {
  544. width: 100%;
  545. padding-bottom: px2rpx(20);
  546. .main-content {
  547. text-align: left;
  548. .box {
  549. padding-top: px2rpx(5);
  550. color: #303133;
  551. .b-card {
  552. border: 1px solid var(--bs-border-color);
  553. background-color: rgba(var(--bs-body-bg-rgb), var(--bs-bg-opacity)) !important;
  554. margin-bottom: px2rpx(10);
  555. border-radius: px2rpx(6);
  556. box-shadow: 0 px2rpx(1) px2rpx(6) 0 rgba(0, 0, 0, 0.05);
  557. &:hover {
  558. box-shadow: 0 px2rpx(2) px2rpx(8) 0 rgba(0, 0, 0, 0.1);
  559. }
  560. .card-top {
  561. padding: px2rpx(15) px2rpx(20);
  562. .card-row {
  563. margin-bottom: px2rpx(30);
  564. &:last-child {
  565. margin-bottom: 0;
  566. }
  567. }
  568. .card-tit {
  569. margin-bottom: px2rpx(0) !important;
  570. }
  571. .tit {
  572. font-size: px2rpx(16);
  573. font-weight: 600;
  574. margin-bottom: px2rpx(16);
  575. display: flex;
  576. align-items: center;
  577. color: var(--bs-heading-color);
  578. position: relative;
  579. padding-left: 20px;
  580. &:after {
  581. content: '';
  582. position: absolute;
  583. left: 0;
  584. top: 50%;
  585. transform: translateY(-50%);
  586. width: 0;
  587. height: 0;
  588. border-top: 6px solid transparent;
  589. border-bottom: 6px solid transparent;
  590. border-left: 8px solid currentColor;
  591. }
  592. .iconfont {
  593. margin-right: px2rpx(8);
  594. color: var(--color-primary);
  595. font-size: px2rpx(18);
  596. }
  597. }
  598. .title-wrapper {
  599. display: flex;
  600. justify-content: space-between;
  601. align-items: center;
  602. }
  603. }
  604. }
  605. }
  606. .box-step2 {
  607. .form-row {
  608. display: flex;
  609. flex-wrap: wrap;
  610. margin-bottom: px2rpx(12);
  611. gap: px2rpx(12);
  612. &:last-child {
  613. margin-bottom: 0;
  614. }
  615. .form-col {
  616. flex: 1;
  617. min-width: px2rpx(140);
  618. @media screen and (max-width: 991px) {
  619. flex: 0 0 100%;
  620. width: 100%;
  621. }
  622. }
  623. .form-col-full {
  624. width: 100%;
  625. padding: 0 px2rpx(5);
  626. }
  627. }
  628. .tips {
  629. line-height: 1.8;
  630. font-size: px2rpx(12);
  631. color: var(--bs-heading-color);
  632. background-color: rgba(var(--bs-body-bg-rgb), 1) !important;
  633. padding: px2rpx(12);
  634. border-radius: px2rpx(4);
  635. border-left: px2rpx(2) solid #cf1322;
  636. .title {
  637. font-weight: 600;
  638. margin-bottom: px2rpx(6);
  639. color: var(--bs-heading-color);
  640. }
  641. }
  642. }
  643. }
  644. .picker-select {
  645. background-color: rgba(var(--bs-body-bg-rgb), var(--bs-bg-opacity)) !important;
  646. border: 1px solid #dcdfe6;
  647. border-radius: px2rpx(4);
  648. padding: px2rpx(12) px2rpx(14);
  649. font-size: px2rpx(14);
  650. color: #606266;
  651. line-height: 1.4;
  652. width: 100%;
  653. box-sizing: border-box;
  654. &:hover {
  655. border-color: #409eff;
  656. }
  657. &.picker-disabled {
  658. background-color: rgba(var(--bs-body-bg-rgb), var(--bs-bg-opacity)) !important;
  659. color: #c0c4cc;
  660. cursor: not-allowed;
  661. }
  662. }
  663. .disabled-input {
  664. background-color: rgba(var(--bs-body-bg-rgb), var(--bs-bg-opacity)) !important;
  665. border: 1px solid #dcdfe6;
  666. border-radius: px2rpx(4);
  667. padding: px2rpx(12) px2rpx(14);
  668. font-size: px2rpx(14);
  669. color: #606266;
  670. width: 100%;
  671. box-sizing: border-box;
  672. }
  673. .m-input {
  674. background-color: rgba(var(--bs-body-bg-rgb), var(--bs-bg-opacity)) !important;
  675. border: 1px solid #dcdfe6;
  676. border-radius: px2rpx(4);
  677. padding: px2rpx(12) px2rpx(14);
  678. font-size: px2rpx(14);
  679. width: 100%;
  680. box-sizing: border-box;
  681. &:focus {
  682. border-color: #409eff;
  683. outline: none;
  684. box-shadow: 0 0 0 px2rpx(1) rgba(64, 158, 255, 0.2);
  685. }
  686. }
  687. .popup-content {
  688. padding: px2rpx(30) px2rpx(20);
  689. text-align: center;
  690. min-width: px2rpx(250);
  691. max-width: 80%;
  692. margin: 0 auto;
  693. @media screen and (max-width: 991px) {
  694. min-width: 80%;
  695. max-width: 90%;
  696. margin: 0 px2rpx(10);
  697. }
  698. position: relative;
  699. .icon {
  700. .iconfont {
  701. font-size: px2rpx(60);
  702. display: block;
  703. margin: 0 auto;
  704. }
  705. .icon-chenggong {
  706. color: #67c23a;
  707. }
  708. .icon-jingshi {
  709. color: #f56c6c;
  710. }
  711. .icon-dengdai {
  712. color: #e6a23c;
  713. }
  714. }
  715. .des1 {
  716. font-weight: 600;
  717. font-size: px2rpx(16);
  718. margin: px2rpx(20) 0 px2rpx(15);
  719. color: #303133;
  720. line-height: 1.4;
  721. padding: 0 px2rpx(10);
  722. }
  723. .dialog-footer {
  724. display: flex;
  725. justify-content: center;
  726. gap: px2rpx(10);
  727. margin-top: px2rpx(10);
  728. @media (max-width: 750rpx) {
  729. flex-direction: column;
  730. align-items: center;
  731. gap: px2rpx(6);
  732. }
  733. button {
  734. min-width: px2rpx(90);
  735. padding: 0 px2rpx(12);
  736. border-radius: px2rpx(4);
  737. font-size: px2rpx(14);
  738. transition: all 0.3s ease;
  739. cursor: pointer;
  740. &[type="primary"] {
  741. background-color: #409eff;
  742. color: var(--bs-emphasis-color);
  743. border: none;
  744. &:hover {
  745. background-color: #66b1ff;
  746. transform: translateY(px2rpx(-1));
  747. box-shadow: 0 px2rpx(2) px2rpx(6) 0 rgba(64, 158, 255, 0.3);
  748. }
  749. &:active {
  750. background-color: #3a8ee6;
  751. transform: translateY(0);
  752. }
  753. }
  754. &:not([type="primary"]) {
  755. background-color: rgba(var(--bs-body-bg-rgb), var(--bs-bg-opacity)) !important;
  756. border: 1px solid #dcdfe6;
  757. color: #606266;
  758. &:hover {
  759. border-color: #409eff;
  760. color: #409eff;
  761. transform: translateY(px2rpx(-1));
  762. }
  763. &:active {
  764. transform: translateY(0);
  765. }
  766. }
  767. }
  768. }
  769. }
  770. .wait-popup {
  771. .des1 {
  772. margin-top: px2rpx(10);
  773. }
  774. .icon {
  775. .iconfont {
  776. animation: spin 1s linear infinite;
  777. }
  778. }
  779. }
  780. }
  781. // 动画
  782. @keyframes popupFadeIn {
  783. from {
  784. opacity: 0;
  785. transform: scale(0.9);
  786. }
  787. to {
  788. opacity: 1;
  789. transform: scale(1);
  790. }
  791. }
  792. @keyframes fadeIn {
  793. from {
  794. opacity: 0;
  795. transform: translateY(px2rpx(10));
  796. }
  797. to {
  798. opacity: 1;
  799. transform: translateY(0);
  800. }
  801. }
  802. @keyframes pulse {
  803. 0% {
  804. transform: scale(1);
  805. }
  806. 50% {
  807. transform: scale(1.05);
  808. }
  809. 100% {
  810. transform: scale(1);
  811. }
  812. }
  813. @keyframes spin {
  814. from {
  815. transform: rotate(0deg);
  816. }
  817. to {
  818. transform: rotate(360deg);
  819. }
  820. }
  821. // 表单错误信息样式
  822. .uni-forms-item__error {
  823. font-size: px2rpx(12);
  824. color: #f56c6c;
  825. margin-top: px2rpx(4);
  826. }
  827. // 适配不同屏幕尺寸(媒体查询中的 750rpx 保持不变)
  828. @media (max-width: 750rpx) {
  829. .transfer-page {
  830. .main-content {
  831. padding: px2rpx(8);
  832. .box {
  833. .b-card {
  834. .card-top {
  835. padding: px2rpx(12) px2rpx(16);
  836. .tit {
  837. font-size: px2rpx(14);
  838. .iconfont {
  839. font-size: px2rpx(16);
  840. }
  841. }
  842. }
  843. }
  844. }
  845. }
  846. .s-btn {
  847. font-size: px2rpx(14);
  848. padding: px2rpx(10) px2rpx(16);
  849. }
  850. .popup-content {
  851. padding: px2rpx(20) px2rpx(16);
  852. .icon {
  853. .iconfont {
  854. font-size: px2rpx(50);
  855. }
  856. }
  857. .des1 {
  858. font-size: px2rpx(14);
  859. margin: px2rpx(15) 0 px2rpx(10);
  860. }
  861. .dialog-footer {
  862. button {
  863. min-width: px2rpx(80);
  864. font-size: px2rpx(13);
  865. }
  866. }
  867. }
  868. }
  869. }
  870. </style>