transfer.vue 29 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947
  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 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. 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. .amount-box {
  515. display: flex;
  516. align-items: center;
  517. gap: px2rpx(12);
  518. .amount-input {
  519. flex: 1;
  520. }
  521. .btn {
  522. margin-bottom: px2rpx(22);
  523. }
  524. }
  525. .transfer-page {
  526. width: 100%;
  527. padding-bottom: px2rpx(20);
  528. .main-content {
  529. text-align: left;
  530. .box {
  531. padding-top: px2rpx(5);
  532. color: #303133;
  533. .b-card {
  534. border: 1px solid var(--bs-border-color);
  535. background-color: rgba(var(--bs-body-bg-rgb), var(--bs-bg-opacity)) !important;
  536. margin-bottom: px2rpx(10);
  537. border-radius: px2rpx(6);
  538. box-shadow: 0 px2rpx(1) px2rpx(6) 0 rgba(0, 0, 0, 0.05);
  539. &:hover {
  540. box-shadow: 0 px2rpx(2) px2rpx(8) 0 rgba(0, 0, 0, 0.1);
  541. }
  542. .card-top {
  543. padding: px2rpx(15) px2rpx(20);
  544. .card-row {
  545. margin-bottom: px2rpx(30);
  546. &:last-child {
  547. margin-bottom: 0;
  548. }
  549. }
  550. .card-tit {
  551. margin-bottom: px2rpx(0) !important;
  552. }
  553. .tit {
  554. font-size: px2rpx(16);
  555. font-weight: 600;
  556. margin-bottom: px2rpx(16);
  557. display: flex;
  558. align-items: center;
  559. color: var(--bs-heading-color);
  560. position: relative;
  561. padding-left: 20px;
  562. &:after {
  563. content: '';
  564. position: absolute;
  565. left: 0;
  566. top: 50%;
  567. transform: translateY(-50%);
  568. width: 0;
  569. height: 0;
  570. border-top: 6px solid transparent;
  571. border-bottom: 6px solid transparent;
  572. border-left: 8px solid currentColor;
  573. }
  574. .iconfont {
  575. margin-right: px2rpx(8);
  576. color: var(--color-primary);
  577. font-size: px2rpx(18);
  578. }
  579. }
  580. .title-wrapper {
  581. display: flex;
  582. justify-content: space-between;
  583. align-items: center;
  584. }
  585. }
  586. }
  587. }
  588. .box-step2 {
  589. .form-row {
  590. display: flex;
  591. flex-wrap: wrap;
  592. margin-bottom: px2rpx(12);
  593. gap: px2rpx(12);
  594. &:last-child {
  595. margin-bottom: 0;
  596. }
  597. .form-col {
  598. flex: 1;
  599. min-width: px2rpx(140);
  600. @media screen and (max-width: 991px) {
  601. flex: 0 0 100%;
  602. width: 100%;
  603. }
  604. }
  605. .form-col-full {
  606. width: 100%;
  607. padding: 0 px2rpx(5);
  608. }
  609. }
  610. .tips {
  611. line-height: 1.8;
  612. font-size: px2rpx(12);
  613. color: var(--bs-heading-color);
  614. background-color: rgba(var(--bs-body-bg-rgb), 1) !important;
  615. padding: px2rpx(12);
  616. border-radius: px2rpx(4);
  617. border-left: px2rpx(2) solid #cf1322;
  618. .title {
  619. font-weight: 600;
  620. margin-bottom: px2rpx(6);
  621. color: var(--bs-heading-color);
  622. }
  623. }
  624. }
  625. }
  626. .picker-select {
  627. background-color: rgba(var(--bs-body-bg-rgb), var(--bs-bg-opacity)) !important;
  628. border: 1px solid #dcdfe6;
  629. border-radius: px2rpx(4);
  630. padding: px2rpx(12) px2rpx(14);
  631. font-size: px2rpx(14);
  632. color: #606266;
  633. line-height: 1.4;
  634. width: 100%;
  635. box-sizing: border-box;
  636. &:hover {
  637. border-color: #409eff;
  638. }
  639. &.picker-disabled {
  640. background-color: rgba(var(--bs-body-bg-rgb), var(--bs-bg-opacity)) !important;
  641. color: #c0c4cc;
  642. cursor: not-allowed;
  643. }
  644. }
  645. .disabled-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. color: #606266;
  652. width: 100%;
  653. box-sizing: border-box;
  654. }
  655. .m-input {
  656. background-color: rgba(var(--bs-body-bg-rgb), var(--bs-bg-opacity)) !important;
  657. border: 1px solid #dcdfe6;
  658. border-radius: px2rpx(4);
  659. padding: px2rpx(12) px2rpx(14);
  660. font-size: px2rpx(14);
  661. width: 100%;
  662. box-sizing: border-box;
  663. &:focus {
  664. border-color: #409eff;
  665. outline: none;
  666. box-shadow: 0 0 0 px2rpx(1) rgba(64, 158, 255, 0.2);
  667. }
  668. }
  669. .popup-content {
  670. padding: px2rpx(30) px2rpx(20);
  671. text-align: center;
  672. min-width: px2rpx(250);
  673. max-width: 80%;
  674. margin: 0 auto;
  675. @media screen and (max-width: 991px) {
  676. min-width: 80%;
  677. max-width: 90%;
  678. margin: 0 px2rpx(10);
  679. }
  680. position: relative;
  681. .icon {
  682. .iconfont {
  683. font-size: px2rpx(60);
  684. display: block;
  685. margin: 0 auto;
  686. }
  687. .icon-chenggong {
  688. color: #67c23a;
  689. }
  690. .icon-jingshi {
  691. color: #f56c6c;
  692. }
  693. .icon-dengdai {
  694. color: #e6a23c;
  695. }
  696. }
  697. .des1 {
  698. font-weight: 600;
  699. font-size: px2rpx(16);
  700. margin: px2rpx(20) 0 px2rpx(15);
  701. color: #303133;
  702. line-height: 1.4;
  703. padding: 0 px2rpx(10);
  704. }
  705. .dialog-footer {
  706. display: flex;
  707. justify-content: center;
  708. gap: px2rpx(10);
  709. margin-top: px2rpx(10);
  710. @media (max-width: 750rpx) {
  711. flex-direction: column;
  712. align-items: center;
  713. gap: px2rpx(6);
  714. }
  715. button {
  716. min-width: px2rpx(90);
  717. padding: 0 px2rpx(12);
  718. border-radius: px2rpx(4);
  719. font-size: px2rpx(14);
  720. transition: all 0.3s ease;
  721. cursor: pointer;
  722. &[type="primary"] {
  723. background-color: #409eff;
  724. color: var(--bs-emphasis-color);
  725. border: none;
  726. &:hover {
  727. background-color: #66b1ff;
  728. transform: translateY(px2rpx(-1));
  729. box-shadow: 0 px2rpx(2) px2rpx(6) 0 rgba(64, 158, 255, 0.3);
  730. }
  731. &:active {
  732. background-color: #3a8ee6;
  733. transform: translateY(0);
  734. }
  735. }
  736. &:not([type="primary"]) {
  737. background-color: rgba(var(--bs-body-bg-rgb), var(--bs-bg-opacity)) !important;
  738. border: 1px solid #dcdfe6;
  739. color: #606266;
  740. &:hover {
  741. border-color: #409eff;
  742. color: #409eff;
  743. transform: translateY(px2rpx(-1));
  744. }
  745. &:active {
  746. transform: translateY(0);
  747. }
  748. }
  749. }
  750. }
  751. }
  752. .wait-popup {
  753. .des1 {
  754. margin-top: px2rpx(10);
  755. }
  756. .icon {
  757. .iconfont {
  758. animation: spin 1s linear infinite;
  759. }
  760. }
  761. }
  762. }
  763. // 动画
  764. @keyframes popupFadeIn {
  765. from {
  766. opacity: 0;
  767. transform: scale(0.9);
  768. }
  769. to {
  770. opacity: 1;
  771. transform: scale(1);
  772. }
  773. }
  774. @keyframes fadeIn {
  775. from {
  776. opacity: 0;
  777. transform: translateY(px2rpx(10));
  778. }
  779. to {
  780. opacity: 1;
  781. transform: translateY(0);
  782. }
  783. }
  784. @keyframes pulse {
  785. 0% {
  786. transform: scale(1);
  787. }
  788. 50% {
  789. transform: scale(1.05);
  790. }
  791. 100% {
  792. transform: scale(1);
  793. }
  794. }
  795. @keyframes spin {
  796. from {
  797. transform: rotate(0deg);
  798. }
  799. to {
  800. transform: rotate(360deg);
  801. }
  802. }
  803. // 表单错误信息样式
  804. .uni-forms-item__error {
  805. font-size: px2rpx(12);
  806. color: #f56c6c;
  807. margin-top: px2rpx(4);
  808. }
  809. // 适配不同屏幕尺寸(媒体查询中的 750rpx 保持不变)
  810. @media (max-width: 750rpx) {
  811. .transfer-page {
  812. .main-content {
  813. padding: px2rpx(8);
  814. .box {
  815. .b-card {
  816. .card-top {
  817. padding: px2rpx(12) px2rpx(16);
  818. .tit {
  819. font-size: px2rpx(14);
  820. .iconfont {
  821. font-size: px2rpx(16);
  822. }
  823. }
  824. }
  825. }
  826. }
  827. }
  828. .s-btn {
  829. font-size: px2rpx(14);
  830. padding: px2rpx(10) px2rpx(16);
  831. }
  832. .popup-content {
  833. padding: px2rpx(20) px2rpx(16);
  834. .icon {
  835. .iconfont {
  836. font-size: px2rpx(50);
  837. }
  838. }
  839. .des1 {
  840. font-size: px2rpx(14);
  841. margin: px2rpx(15) 0 px2rpx(10);
  842. }
  843. .dialog-footer {
  844. button {
  845. min-width: px2rpx(80);
  846. font-size: px2rpx(13);
  847. }
  848. }
  849. }
  850. }
  851. }
  852. </style>