transfer.vue 29 KB

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