transfer.vue 32 KB

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