transfer.vue 30 KB

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