transfer.vue 26 KB

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