transfer.vue 30 KB

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