transfer.vue 30 KB

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