transfer.vue 27 KB

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