transfer.vue 30 KB

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