transfer.vue 29 KB

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