transfer.vue 27 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848
  1. <template>
  2. <cwg-page-wrapper class="create-page" :isHeaderFixed="true">
  3. <cwg-header :title="t('Home.page_ib.item9')" />
  4. <view id="custom_IbTransfer" class="transfer-page">
  5. <view class="main-content">
  6. <!-- 步骤1:选择转出账户 -->
  7. <cwg-asset-tabs v-model="activeTab" :tabs="tabsConfig" />
  8. <!-- 步骤2:转账表单 -->
  9. <view class="box box-step2">
  10. <view class="b-card">
  11. <view class="card-top">
  12. <uni-forms ref="formRef" :model="form" :rules="rules" label-width="300" label-position="top"
  13. validate-trigger="submit">
  14. <view class="form-row">
  15. <view class="form-col">
  16. <!-- 转出账户 -->
  17. <uni-forms-item :label="t('Custom.Transfer.TransferAccounts')">
  18. <uni-easyinput v-model="fromInfo" disabled
  19. :placeholder="t('placeholder.input')" @blur="validateAmount" />
  20. </uni-forms-item>
  21. </view>
  22. <view class="form-col">
  23. <!-- 转入账户 -->
  24. <uni-forms-item :label="toLabel" name="to"
  25. :error-message="deposittoErrorMessage">
  26. <cwg-combox v-model:value="form.to" :clearable="false"
  27. :options="depositDisplayList" :placeholder="t('placeholder.choose')" />
  28. </uni-forms-item>
  29. </view>
  30. </view>
  31. <view class="form-row">
  32. <view class="form-col">
  33. <!-- 货币类型 -->
  34. <uni-forms-item :label="t('Custom.Transfer.CurrencyType')" name="currency">
  35. <cwg-combox v-model:value="form.currency" :clearable="false"
  36. :options="currencyOptions" :placeholder="t('placeholder.choose')" />
  37. </uni-forms-item>
  38. </view>
  39. <view class="form-col">
  40. <!-- 转账金额 -->
  41. <uni-forms-item :label="t('Custom.Transfer.Amount')" name="amount"
  42. :error-message="amountErrorMessage">
  43. <uni-easyinput v-model="form.amount" :placeholder="t('placeholder.input')"
  44. @blur="validateAmount" />
  45. </uni-forms-item>
  46. </view>
  47. </view>
  48. <!-- 20%赠金-年中赠金 -->
  49. <view class="form-row" v-if="tableData4TwoFlag">
  50. <view class="form-col-full">
  51. <uni-forms-item class="agree" name="agree5">
  52. <view class="agree-content">
  53. <checkbox :checked="form.agree5" @click="form.agree5 = !form.agree5" />
  54. <view class="agree-text">
  55. <view class="agree-title">{{
  56. t('news_add_field1.activitiesNZTwo.itemDeposit1') }}</view>
  57. </view>
  58. </view>
  59. </uni-forms-item>
  60. <view class="agree-detail">
  61. <text>{{ t('news_add_field1.activitiesNZTwo.itemDeposit2') }}</text>
  62. <text class="clause" @click="dialogClauseNZTwo = true">{{
  63. t('news_add_field1.activitiesNZTwo.itemDeposit3') }}</text>
  64. <text>{{ t('news_add_field1.activitiesNZTwo.itemDeposit4') }}</text>
  65. </view>
  66. </view>
  67. </view>
  68. <!-- 赠送活动 -->
  69. <view class="form-row" v-if="tableDataNewListFlag">
  70. <view class="form-col-full">
  71. <uni-forms-item class="agree" name="agree6">
  72. <view class="agree-content">
  73. <checkbox :checked="form.agree6" @click="form.agree6 = !form.agree6" />
  74. <view class="agree-text">
  75. <view class="agree-title">{{ tableDataNewList.title }}</view>
  76. </view>
  77. </view>
  78. </uni-forms-item>
  79. <view class="agree-detail">
  80. <text>{{ t('news_add_field1.activitiesNewList.item1') }}</text>
  81. <text class="clause" @click="dialogClauseNewList = true">{{
  82. tableDataNewList.title }}</text>
  83. <text>{{ t('news_add_field1.activitiesNewList.item2') }}</text>
  84. </view>
  85. </view>
  86. </view>
  87. <view class="form-row">
  88. <button class="s-btn reselect" type="primary" @click="toTransfer">{{ locale === 'es'
  89. ?
  90. 'Enviar solicitud' : t('Btn.Submit') }}</button>
  91. </view>
  92. </uni-forms>
  93. </view>
  94. </view>
  95. </view>
  96. </view>
  97. <!-- 失败弹窗 -->
  98. <cwg-error-popup v-model:visible="dialogError" @confirm="closeDia" />
  99. <!-- 成功弹窗 -->
  100. <cwg-success-popup v-model:visible="dialogSuccess" @confirm="closeDia" />
  101. <!-- 等待弹窗 -->
  102. <cwg-wait-popup v-model:visible="dialogCheckWait" :showFooters="false" />
  103. <!-- 不参加活动弹出框 -->
  104. <cwg-dont-active-popup v-model:visible="dialogDontActive" :showFooters="true" @confirm="tosubmitConfirm" />
  105. <!-- 功能关闭弹出 -->
  106. <cwg-function-disabled-popup v-model:visible="InfoStatus5" :showFooters="false" @confirm="toHome" />
  107. <!-- 赠金协议20年中 -->
  108. <BonusAgreementPopup v-model:visible="dialogClauseNZTwo" :title="t('news_add_field1.activitiesNZTwo.item6')"
  109. :type="nzTwo" :tableData4Two="tableData4Two" />
  110. <!-- 赠送活动协议 -->
  111. <BonusAgreementPopup v-model:visible="dialogClauseNewList" :title="tableDataNewList.title"
  112. :content="tableDataNewList.content" :type="newList" />
  113. </view>
  114. </cwg-page-wrapper>
  115. </template>
  116. <script setup>
  117. import { ref, reactive, computed, onMounted, watch, nextTick } from 'vue'
  118. import { useI18n } from 'vue-i18n'
  119. import { onLoad } from '@dcloudio/uni-app'
  120. import { getCurrentInstance } from 'vue'
  121. import { ibApi } from '@/service/ib'
  122. import { activityApi } from '@/service/activity'
  123. import Config from '@/config/index'
  124. import useUserStore from '@/stores/use-user-store'
  125. import BonusAgreementPopup from './components/BonusAgreementPopup.vue'
  126. const userStore = useUserStore()
  127. const ibInfo = computed(() => {
  128. return userStore?.userInfo?.ibInfo || {}
  129. })
  130. const { Code } = Config
  131. const { t, locale } = useI18n()
  132. const activeTab = ref(1)
  133. const tabsConfig = computed(() => [
  134. { text: t('Ib.Transfer.CommissionTransfer'), value: 1, type: 'commission' },
  135. { text: t('Ib.Transfer.CommissionIssue'), value: 2, type: 'commissionIssue' },
  136. { text: t('Ib.Transfer.IbAccountTransfer'), value: 3, type: 'ib' },
  137. ])
  138. const toLabel = computed(() => activeTab.value == '1' || activeTab.value == '2' ? t('Label.IntoAccount') : t('Ib.Transfer.IbAccountTransfer'))
  139. // 获取全局实例(用于访问 Session、$pigeon 等)
  140. const { proxy } = getCurrentInstance()
  141. const $pigeon = proxy?.$pigeon
  142. // 响应式数据
  143. const loginValue = ref('')
  144. const flag = ref(false)
  145. const responseMessage = ref('') // 弹窗响应信息
  146. const giveLoginJoin = ref('')
  147. const step2 = ref(false)
  148. const amountLimits = reactive({
  149. minAmount: '',
  150. maxAmount: '',
  151. })
  152. const form = reactive({
  153. currency: 'USD',
  154. depositLogin: null,
  155. to: null,
  156. amount: '',
  157. agree5: false,
  158. agree6: false,
  159. })
  160. const resetForm = async () => {
  161. await nextTick();
  162. formRef.value?.clearValidate(); // 再次清除可能因数据重置产生的新错误
  163. form.customBankCode = ""
  164. form.depositLogin = ""
  165. form.withdrawLogin = ""
  166. form.to = ""
  167. form.amount = ""
  168. form.agree5 = false
  169. form.agree6 = false
  170. amountErrorMessage.value = ""
  171. submitting.value = false
  172. flag.value = false
  173. }
  174. const dialogSuccess = computed(() => dialogCheck.value && dialogVisible.value)
  175. const dialogError = computed(() => dialogCheck.value && !dialogVisible.value)
  176. const dialogCheck = ref(false)
  177. const dialogVisible = ref(false)
  178. const dialogCheckWait = ref(false)
  179. const InfoStatus5 = ref(false)
  180. const dialogClauseNZTwo = ref(false)
  181. const tableData4TwoFlag = ref(false)
  182. const tableData4Two = ref({})
  183. const dialogClauseNewList = ref(false)
  184. const tableDataNewListFlag = ref(false)
  185. const tableDataNewList = ref({})
  186. const dialogDontActive = ref(false)
  187. const submitting = ref(false)
  188. // 错误信息
  189. const depositErrorMessage = ref('')
  190. const depositLogin1ErrorMessage = ref('')
  191. const amountErrorMessage = ref('')
  192. // 表单验证规则
  193. const rules = {
  194. withdrawLogin: {
  195. rules: [
  196. {
  197. required: true,
  198. errorMessage: t('vaildate.select.empty')
  199. },
  200. ],
  201. },
  202. to: {
  203. rules: [
  204. {
  205. required: true,
  206. errorMessage: t('vaildate.select.empty')
  207. },
  208. ],
  209. },
  210. amount: {
  211. rules: [
  212. {
  213. required: true,
  214. errorMessage: t('vaildate.amount.format'),
  215. },
  216. {
  217. validateFunction: (rule, value, data, callback) => {
  218. if (!value) {
  219. callback(t('vaildate.amount.format'))
  220. } else if (
  221. amountLimits.minAmount &&
  222. amountLimits.maxAmount &&
  223. (parseFloat(amountLimits.minAmount) > parseFloat(value) ||
  224. parseFloat(amountLimits.maxAmount) < parseFloat(value))
  225. ) {
  226. callback(t('vaildate.amount.amount') +
  227. amountLimits.minAmount +
  228. '-' +
  229. amountLimits.maxAmount)
  230. } else if (!/^[0-9]+([.]{1}[0-9]{1,2})?$/.test(value)) {
  231. callback(t('vaildate.amount.format'))
  232. }
  233. return true
  234. }
  235. },
  236. ],
  237. }
  238. }
  239. function validateAmount() {
  240. const amount = form.amount
  241. if (!amount) {
  242. amountErrorMessage.value = t('vaildate.amount.format')
  243. return false
  244. }
  245. const numValue = parseFloat(amount)
  246. if (isNaN(numValue)) {
  247. amountErrorMessage.value = t('vaildate.amount.format')
  248. return false
  249. }
  250. if (amountLimits.minAmount && numValue < parseFloat(amountLimits.minAmount)) {
  251. amountErrorMessage.value = t('vaildate.amount.amount') + amountLimits.minAmount + '-' + amountLimits.maxAmount
  252. return false
  253. }
  254. if (amountLimits.maxAmount && numValue > parseFloat(amountLimits.maxAmount)) {
  255. amountErrorMessage.value = t('vaildate.amount.amount') + amountLimits.minAmount + '-' + amountLimits.maxAmount
  256. return false
  257. }
  258. if (!/^[0-9]+([.]{1}[0-9]{1,2})?$/.test(amount)) {
  259. amountErrorMessage.value = t('vaildate.amount.format')
  260. return false
  261. }
  262. amountErrorMessage.value = ''
  263. return true
  264. }
  265. // 模板引用
  266. const formRef = ref(null)
  267. // 计算属性
  268. const getInfoStatus5 = computed(() => {
  269. if (ibInfo.value?.closeFunctions) {
  270. return ibInfo.value.closeFunctions.indexOf('5') !== -1
  271. }
  272. return false
  273. })
  274. // 转入账户列表
  275. const depositDisplayList = computed(() => {
  276. if (activeTab.value != 3) {
  277. return toInfo.value.map(item => ({
  278. text: [item.login, item.platform, item.cId, item.balance, item.groupTypeName].filter(field => field !== null && field !== undefined && field !== '').join('-'),
  279. value: item.login
  280. }))
  281. } else {
  282. return agentInfo.value.map(item => ({
  283. text: `${item.ibNo} - ${item.name}`,
  284. value: item.id
  285. }))
  286. }
  287. })
  288. const fromInfo = ref('')
  289. const toInfo = ref([])
  290. const agentInfo = ref([])
  291. //转出账户信息
  292. const ransferInfo = async function () {
  293. let res = await ibApi.agentBalanceTransferFrom({});
  294. if (res.code == Code.StatusOK) {
  295. fromInfo.value =
  296. res.data.ibNo +
  297. " - " +
  298. t("Custom.Deposit.AvailableBalance") +
  299. ": $" +
  300. (res.data.balance ? res.data.balance : 0);
  301. } else {
  302. $pigeon.MessageError(res.msg);
  303. }
  304. }
  305. //转入账户信息
  306. const ransferToInfo = async function () {
  307. let res;
  308. // 佣金内转使用新接口 /account/dropdown
  309. if (activeTab.value == 1) {
  310. res = await ibApi.CustomDropdown({ platform: "" });
  311. } else {
  312. // 佣金下发和其他情况使用原接口
  313. res = await ibApi.agentTransferToList({});
  314. }
  315. if (res.code == Code.StatusOK) {
  316. toInfo.value = res.data || [];
  317. toInfo.value.forEach((item) => {
  318. if (item.closeFunctions && item.closeFunctions.length > 0) {
  319. const targetValues = ["7", "5", "9"];
  320. const hasTargetValue = item.closeFunctions.some(func => targetValues.includes(func));
  321. if (hasTargetValue) {
  322. item.status = true;
  323. }
  324. }
  325. })
  326. } else {
  327. $pigeon.MessageError(res.msg);
  328. }
  329. }
  330. //获取代理账户信息
  331. const getAgentInfo = async function () {
  332. let res = await ibApi.ibTreeForTransfer({});
  333. if (res.code == Code.StatusOK) {
  334. agentInfo.value = res.data || [];
  335. } else {
  336. $pigeon.MessageError(res.msg);
  337. }
  338. }
  339. const currencyOptions = ref([{ value: 'USD', text: 'USD' }])
  340. function toHome() {
  341. uni.navigateTo({ url: '/pages/ib/index' })
  342. InfoStatus5.value = false
  343. }
  344. function closeDia() {
  345. resetForm()
  346. formRef.value?.resetFields?.()
  347. step2.value = false
  348. loginValue.value = ''
  349. dialogCheck.value = false
  350. dialogVisible.value = false
  351. tableData4TwoFlag.value = false
  352. tableDataNewListFlag.value = false
  353. }
  354. // 内转
  355. async function toTransfer() {
  356. if (submitting.value) return
  357. try {
  358. const valid = await formRef.value?.validate()
  359. if (!valid) {
  360. console.log('表单验证失败')
  361. return
  362. }
  363. openDontActive()
  364. } catch (error) {
  365. console.error('验证失败:', error)
  366. }
  367. }
  368. // 打开不参加活动弹窗
  369. function openDontActive() {
  370. tosubmitConfirm()
  371. }
  372. function tosubmitConfirm() {
  373. dialogDontActive.value = false
  374. transferConfig()
  375. }
  376. async function transferConfig() {
  377. if (submitting.value) return
  378. submitting.value = true
  379. try {
  380. if (flag.value) {
  381. return
  382. }
  383. flag.value = true
  384. form.activityTwoPercentGive = form.agree5 ? 1 : 0
  385. form.activityGive = form.agree6 ? 1 : 0
  386. dialogCheckWait.value = true
  387. let api
  388. if (activeTab.value != 3) {
  389. api = ibApi.agentBalanceTransfer
  390. } else {
  391. api = ibApi.agentBalanceCommissionAdd
  392. }
  393. const res = await api({ ...form })
  394. dialogCheckWait.value = false
  395. if (res.code == Code.StatusOK) {
  396. dialogCheck.value = true
  397. dialogVisible.value = true
  398. flag.value = false
  399. } else {
  400. responseMessage.value = res.msg
  401. dialogCheck.value = true
  402. dialogVisible.value = false
  403. flag.value = false
  404. }
  405. } catch (error) {
  406. console.error('转账失败:', error)
  407. responseMessage.value = error.msg || t('Msg.Fail')
  408. dialogCheck.value = true
  409. dialogVisible.value = false
  410. } finally {
  411. submitting.value = false
  412. flag.value = false
  413. resetForm()
  414. if (dialogCheckWait.value) dialogCheckWait.value = false
  415. }
  416. }
  417. async function Activity24nianzhongTwoInfo() {
  418. const res = await activityApi.Activity23nianzhongTwoInfo({})
  419. if (res.code == Code.StatusOK) {
  420. tableData4Two.value = res.data
  421. } else {
  422. $pigeon?.MessageError(res.msg)
  423. }
  424. }
  425. // 活动相关方法
  426. function togetActivity() {
  427. get23nianzhongTwoLogin()
  428. getActivityExtensionGiveLogin()
  429. getActivityExtensionGiveLoginJoin()
  430. }
  431. async function get23nianzhongTwoLogin() {
  432. const res = await activityApi.Activity23nianzhongTwoLogin({
  433. login: form.to,
  434. })
  435. if (res.code == Code.StatusOK) {
  436. tableData4Two.value = res.data
  437. if (tableData4Two.value.show == 1) {
  438. tableData4TwoFlag.value = true
  439. } else if (tableData4Two.value.show == 0) {
  440. tableData4TwoFlag.value = false
  441. }
  442. } else {
  443. $pigeon?.MessageError(res.msg)
  444. }
  445. }
  446. async function getActivityExtensionGiveLogin() {
  447. const res = await activityApi.ActivityExtensionGiveLogin({
  448. login: form.to,
  449. })
  450. if (res.code == Code.StatusOK) {
  451. tableDataNewList.value = res.data
  452. if (tableDataNewList.value.show == 1) {
  453. tableDataNewListFlag.value = true
  454. } else if (tableDataNewList.value.show == 0) {
  455. tableDataNewListFlag.value = false
  456. }
  457. } else {
  458. $pigeon?.MessageError(res.msg)
  459. }
  460. }
  461. async function getActivityExtensionGiveLoginJoin() {
  462. const res = await activityApi.ActivityExtensionGiveLoginJoin({
  463. login: form.to,
  464. })
  465. if (res.code == Code.StatusOK) {
  466. giveLoginJoin.value = res.data
  467. } else {
  468. $pigeon?.MessageError(res.msg)
  469. giveLoginJoin.value = ''
  470. }
  471. }
  472. // 监听 activeTab 变化
  473. watch(activeTab, (newVal) => {
  474. if (newVal) {
  475. console.log(newVal, 1212);
  476. if (newVal == 3) {
  477. getAgentInfo()
  478. } else {
  479. ransferToInfo()
  480. }
  481. form.to = ''
  482. form.amount = ''
  483. }
  484. })
  485. //
  486. watch(loginValue, (newVal) => {
  487. if (newVal) {
  488. step2.value = true
  489. form.withdrawLogin = newVal
  490. }
  491. })
  492. watch(() => form.to, (newVal) => {
  493. if (activeTab.value == 3) {
  494. getAgentInfo()
  495. } else {
  496. togetActivity()
  497. }
  498. })
  499. // 监听 agree6 变化
  500. watch(() => form.agree6, (newVal) => {
  501. if (newVal && giveLoginJoin.value?.flag === false) {
  502. let tips = ''
  503. if (giveLoginJoin.value.promptType == 1) {
  504. tips = t('surplusList.item10')
  505. } else {
  506. tips = t('surplusList.item11')
  507. }
  508. return
  509. // 活动相关方法,后续需要在调整
  510. if (giveLoginJoin.value.activityCategory == 1) {
  511. $pigeon?.MessageConfirm(
  512. tips,
  513. t('Msg.SystemPrompt'),
  514. t('surplusList.item12'),
  515. t('Home.msg.item3'),
  516. () => {
  517. $pigeon?.MessageConfirm(
  518. t('surplusList.item13'),
  519. t('Msg.SystemPrompt'),
  520. t('Btn.Confirm'),
  521. t('Btn.Cancel'),
  522. async () => {
  523. try {
  524. const res = await activityApi.ActivityGiveCancel({
  525. login: loginValue.value,
  526. })
  527. if (res.code == Code.StatusOK) {
  528. $pigeon?.MessageOK(res.msg || t('Msg.Success'))
  529. } else {
  530. $pigeon?.MessageError(res.msg)
  531. }
  532. } catch (error) {
  533. $pigeon?.MessageError(t('Msg.Fail'))
  534. }
  535. },
  536. () => {
  537. form.agree6 = false
  538. }
  539. )
  540. },
  541. () => {
  542. form.agree6 = false
  543. }
  544. )
  545. } else {
  546. $pigeon?.MessageConfirm(
  547. tips,
  548. t('Msg.SystemPrompt'),
  549. t('Btn.Confirm'),
  550. t('Btn.Cancel'),
  551. () => { },
  552. () => {
  553. form.agree6 = false
  554. }
  555. )
  556. }
  557. }
  558. })
  559. onMounted(() => {
  560. if (getInfoStatus5.value) {
  561. InfoStatus5.value = true
  562. }
  563. ransferInfo();
  564. ransferToInfo();
  565. // Activity24nianzhongTwoInfo()
  566. })
  567. onLoad((options) => {
  568. if (options?.login) {
  569. loginValue.value = options.login
  570. step2.value = true
  571. form.withdrawLogin = options.login
  572. }
  573. })
  574. </script>
  575. <style lang="scss" scoped>
  576. @import "@/uni.scss";
  577. .transfer-page {
  578. width: 100%;
  579. padding-bottom: px2rpx(20);
  580. .main-content {
  581. text-align: left;
  582. .box {
  583. padding-top: px2rpx(5);
  584. color: #303133;
  585. .b-card {
  586. background-color: #fff;
  587. margin-bottom: px2rpx(10);
  588. border-radius: px2rpx(6);
  589. box-shadow: 0 px2rpx(1) px2rpx(6) 0 rgba(0, 0, 0, 0.05);
  590. &:hover {
  591. box-shadow: 0 px2rpx(2) px2rpx(8) 0 rgba(0, 0, 0, 0.1);
  592. }
  593. .card-top {
  594. padding: px2rpx(15) px2rpx(20);
  595. box-sizing: border-box;
  596. .card-row {
  597. margin-bottom: px2rpx(12);
  598. &:last-child {
  599. margin-bottom: 0;
  600. }
  601. }
  602. .tit {
  603. font-size: px2rpx(16);
  604. margin-bottom: px2rpx(12);
  605. font-weight: 600;
  606. .iconfont {
  607. font-size: px2rpx(18);
  608. margin-right: px2rpx(8);
  609. color: #409eff;
  610. }
  611. }
  612. .title-wrapper {
  613. display: flex;
  614. justify-content: space-between;
  615. align-items: center;
  616. }
  617. }
  618. }
  619. }
  620. .box-step2 {
  621. .form-row {
  622. display: flex;
  623. flex-wrap: wrap;
  624. margin-bottom: px2rpx(12);
  625. gap: px2rpx(12);
  626. &:last-child {
  627. margin-bottom: 0;
  628. }
  629. .form-col {
  630. flex: 1;
  631. min-width: px2rpx(140);
  632. @media screen and (max-width: 991px) {
  633. flex: 0 0 100%;
  634. width: 100%;
  635. }
  636. }
  637. .form-col-full {
  638. width: 100%;
  639. padding: 0 px2rpx(5);
  640. }
  641. }
  642. .tips {
  643. line-height: 1.8;
  644. font-size: px2rpx(12);
  645. color: #909399;
  646. background-color: #f9f9f9;
  647. padding: px2rpx(12);
  648. border-radius: px2rpx(4);
  649. border-left: px2rpx(2) solid #409eff;
  650. .title {
  651. font-weight: 600;
  652. margin-bottom: px2rpx(6);
  653. color: #606266;
  654. }
  655. }
  656. }
  657. }
  658. .picker-select {
  659. background-color: #f5f7fa;
  660. border: 1px solid #dcdfe6;
  661. border-radius: px2rpx(4);
  662. padding: px2rpx(12) px2rpx(14);
  663. font-size: px2rpx(14);
  664. color: #606266;
  665. line-height: 1.4;
  666. width: 100%;
  667. box-sizing: border-box;
  668. &:hover {
  669. border-color: #409eff;
  670. }
  671. &.picker-disabled {
  672. background-color: #f5f7fa;
  673. color: #c0c4cc;
  674. cursor: not-allowed;
  675. }
  676. }
  677. .disabled-input {
  678. background-color: #f5f7fa;
  679. border: 1px solid #dcdfe6;
  680. border-radius: px2rpx(4);
  681. padding: px2rpx(12) px2rpx(14);
  682. font-size: px2rpx(14);
  683. color: #606266;
  684. width: 100%;
  685. box-sizing: border-box;
  686. }
  687. .m-input {
  688. background-color: #f5f7fa;
  689. border: 1px solid #dcdfe6;
  690. border-radius: px2rpx(4);
  691. padding: px2rpx(12) px2rpx(14);
  692. font-size: px2rpx(14);
  693. width: 100%;
  694. box-sizing: border-box;
  695. &:focus {
  696. border-color: #409eff;
  697. outline: none;
  698. box-shadow: 0 0 0 px2rpx(1) rgba(64, 158, 255, 0.2);
  699. }
  700. }
  701. }
  702. // 动画
  703. @keyframes popupFadeIn {
  704. from {
  705. opacity: 0;
  706. transform: scale(0.9);
  707. }
  708. to {
  709. opacity: 1;
  710. transform: scale(1);
  711. }
  712. }
  713. @keyframes fadeIn {
  714. from {
  715. opacity: 0;
  716. transform: translateY(px2rpx(10));
  717. }
  718. to {
  719. opacity: 1;
  720. transform: translateY(0);
  721. }
  722. }
  723. @keyframes pulse {
  724. 0% {
  725. transform: scale(1);
  726. }
  727. 50% {
  728. transform: scale(1.05);
  729. }
  730. 100% {
  731. transform: scale(1);
  732. }
  733. }
  734. @keyframes spin {
  735. from {
  736. transform: rotate(0deg);
  737. }
  738. to {
  739. transform: rotate(360deg);
  740. }
  741. }
  742. // 表单错误信息样式
  743. .uni-forms-item__error {
  744. font-size: px2rpx(12);
  745. color: #f56c6c;
  746. margin-top: px2rpx(4);
  747. }
  748. // 适配不同屏幕尺寸(媒体查询中的 750rpx 保持不变)
  749. @media (max-width: 750rpx) {
  750. .transfer-page {
  751. .main-content {
  752. padding: px2rpx(8);
  753. .box {
  754. .b-card {
  755. .card-top {
  756. padding: px2rpx(12) px2rpx(16);
  757. .tit {
  758. font-size: px2rpx(14);
  759. .iconfont {
  760. font-size: px2rpx(16);
  761. }
  762. }
  763. }
  764. }
  765. }
  766. }
  767. .s-btn {
  768. font-size: px2rpx(14);
  769. padding: px2rpx(10) px2rpx(16);
  770. }
  771. }
  772. }
  773. </style>