transfer.vue 30 KB

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