ActivityDialogs.vue 31 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716
  1. <template>
  2. <view>
  3. <!-- 盈利转换弹窗 -->
  4. <uni-popup ref="dialogChinaUnionPayPopup" type="center" :mask-click="false">
  5. <view class="popup-content">
  6. <view class="popup-header">
  7. <text class="popup-title">{{ t('common.tip') }}</text>
  8. <uni-icons type="closeempty" size="20" color="#999"
  9. @click="closeDialog('dialogChinaUnionPay')"></uni-icons>
  10. </view>
  11. <view class="popup-body">
  12. <text class="message-text">{{ t('news_add_field1.activities.item11') }}</text>
  13. </view>
  14. <view class="popup-footer">
  15. <button hover-class="" class="btn-cancel" @click="closeDialog('dialogChinaUnionPay')">{{
  16. t('Btn.Cancel')
  17. }}</button>
  18. <button hover-class="" class="btn-confirm" type="primary"
  19. @click="handleConfirm('toTransformActive')">{{
  20. t('Btn.Confirm') }}</button>
  21. </view>
  22. </view>
  23. </uni-popup>
  24. <!-- 盈利变现弹窗 -->
  25. <uni-popup ref="dialogChinaUnionPay1Popup" type="center" :mask-click="false">
  26. <view class="popup-content">
  27. <view class="popup-header">
  28. <text class="popup-title">{{ t('common.tip') }}</text>
  29. <uni-icons type="closeempty" size="20" color="#999"
  30. @click="closeDialog('dialogChinaUnionPay1')"></uni-icons>
  31. </view>
  32. <view class="popup-body">
  33. <text class="message-text">{{ t('news_add_field1.activities.item12') }}</text>
  34. </view>
  35. <view class="popup-footer">
  36. <button hover-class="" class="btn-cancel" @click="closeDialog('dialogChinaUnionPay1')">{{
  37. t('Btn.Cancel')
  38. }}</button>
  39. <button hover-class="" class="btn-confirm" type="primary"
  40. @click="handleConfirm('toRealizationActive')">{{
  41. t('Btn.Confirm') }}</button>
  42. </view>
  43. </view>
  44. </uni-popup>
  45. <!-- 活动过期弹窗 -->
  46. <uni-popup ref="dialogChinaUnionPayJXPopup" type="center" :mask-click="false">
  47. <view class="popup-content">
  48. <view class="popup-header">
  49. <text class="popup-title">{{ t('common.tip') }}</text>
  50. <uni-icons type="closeempty" size="20" color="#999"
  51. @click="closeDialog('dialogChinaUnionPayJX')"></uni-icons>
  52. </view>
  53. <view class="popup-body">
  54. <text class="message-text">{{ t('news_add_field1.activitiesJX.item24') }}</text>
  55. </view>
  56. <view class="popup-footer">
  57. <button hover-class="" class="btn-cancel" @click="closeDialog('dialogChinaUnionPayJX')">{{
  58. t('Btn.Cancel')
  59. }}</button>
  60. <button hover-class="" class="btn-confirm" type="primary"
  61. @click="closeDialog('dialogChinaUnionPayJX')">{{
  62. t('Btn.Confirm') }}</button>
  63. </view>
  64. </view>
  65. </uni-popup>
  66. <!-- 23迎新活动申请弹窗 -->
  67. <uni-popup ref="dialogDealResultPopup" type="center" :mask-click="false">
  68. <view class="popup-content" style="width: 650rpx;">
  69. <view class="popup-header">
  70. <text class="popup-title">{{ t('Custom.Activity.Apply') }}</text>
  71. <uni-icons type="closeempty" size="20" color="#999"
  72. @click="closeDialog('dialogDealResult')"></uni-icons>
  73. </view>
  74. <scroll-view class="popup-body" scroll-y style="max-height: 600rpx;">
  75. <view class="form-item">
  76. <text class="form-label">{{ t('Label.TradingAccount') }}</text>
  77. <picker mode="selector" :range="loginOptions" range-key="login"
  78. @change="onLoginChange('dialogDealResult', $event)">
  79. <view class="picker-value">{{ selectedLogin?.login || t('placeholder.choose') }}</view>
  80. </picker>
  81. </view>
  82. </scroll-view>
  83. <view class="popup-footer">
  84. <button hover-class="" class="btn-cancel" @click="closeDialog('dialogDealResult')">{{
  85. t('Btn.Cancel') }}</button>
  86. <button hover-class="" class="btn-confirm" type="primary" @click="handleConfirm('toApply23')">{{
  87. t('Btn.Confirm')
  88. }}</button>
  89. </view>
  90. </view>
  91. </uni-popup>
  92. <!-- 23匠鑫活动申请弹窗 -->
  93. <uni-popup ref="dialogDealResultJxPopup" type="center" :mask-click="false">
  94. <view class="popup-content" style="width: 650rpx;">
  95. <view class="popup-header">
  96. <text class="popup-title">{{ t('Custom.Activity.Apply') }}</text>
  97. <uni-icons type="closeempty" size="20" color="#999"
  98. @click="closeDialog('dialogDealResultJx')"></uni-icons>
  99. </view>
  100. <scroll-view class="popup-body" scroll-y style="max-height: 600rpx;">
  101. <view class="form-item">
  102. <text class="form-label">{{ t('Label.TradingAccount') }}</text>
  103. <picker mode="selector" :range="loginOptions" range-key="login"
  104. @change="onLoginChange('dialogDealResultJx', $event)">
  105. <view class="picker-value">{{ selectedJxLogin?.login || t('placeholder.choose') }}</view>
  106. </picker>
  107. </view>
  108. </scroll-view>
  109. <view class="popup-footer">
  110. <button hover-class="" class="btn-cancel" @click="closeDialog('dialogDealResultJx')">{{
  111. t('Btn.Cancel') }}</button>
  112. <button hover-class="" class="btn-confirm" type="primary" @click="handleConfirm('toApply23Jx')">{{
  113. t('Btn.Confirm')
  114. }}</button>
  115. </view>
  116. </view>
  117. </uni-popup>
  118. <!-- 23匠鑫VIP活动申请弹窗 -->
  119. <uni-popup ref="dialogDealResultJxVipPopup" type="center" :mask-click="false">
  120. <view class="popup-content" style="width: 650rpx;">
  121. <view class="popup-header">
  122. <text class="popup-title">{{ t('Custom.Activity.Apply') }}</text>
  123. <uni-icons type="closeempty" size="20" color="#999"
  124. @click="closeDialog('dialogDealResultJxVip')"></uni-icons>
  125. </view>
  126. <scroll-view class="popup-body" scroll-y style="max-height: 600rpx;">
  127. <view class="form-item">
  128. <text class="form-label">{{ t('Label.TradingAccount') }}</text>
  129. <picker mode="selector" :range="loginOptions" range-key="login"
  130. @change="onLoginChange('dialogDealResultJxVip', $event)">
  131. <view class="picker-value">{{ selectedJxVipLogin?.login || t('placeholder.choose') }}</view>
  132. </picker>
  133. </view>
  134. </scroll-view>
  135. <view class="popup-footer">
  136. <button hover-class="" class="btn-cancel" @click="closeDialog('dialogDealResultJxVip')">{{
  137. t('Btn.Cancel')
  138. }}</button>
  139. <button hover-class="" class="btn-confirm" type="primary"
  140. @click="handleConfirm('toApply23JxVip')">{{
  141. t('Btn.Confirm') }}</button>
  142. </view>
  143. </view>
  144. </uni-popup>
  145. <!-- 交易大赛申请弹窗 -->
  146. <uni-popup ref="dialogDealResultCptPopup" type="center" :mask-click="false">
  147. <view class="popup-content" style="width: 650rpx;">
  148. <view class="popup-header">
  149. <text class="popup-title">{{ t('Custom.Activity.Apply') }}</text>
  150. <uni-icons type="closeempty" size="20" color="#999"
  151. @click="closeDialog('dialogDealResultCpt')"></uni-icons>
  152. </view>
  153. <scroll-view class="popup-body" scroll-y style="max-height: 800rpx;">
  154. <view class="form-item">
  155. <text class="form-label">{{ t('Label.TradingAccount') }}</text>
  156. <picker mode="selector" :range="loginOptions" range-key="login"
  157. @change="onLoginChange('dialogDealResultCpt', $event)">
  158. <view class="picker-value">{{ selectedCptLogin?.login || t('placeholder.choose') }}</view>
  159. </picker>
  160. </view>
  161. <view class="form-item">
  162. <text class="form-label">{{ t('Documentary.console.item20') }}</text>
  163. <input class="form-input" v-model="formData.dialogDealResultCpt_form.nickname"
  164. :placeholder="t('placeholder.input')" />
  165. </view>
  166. <view class="form-item">
  167. <text class="form-label">{{ t('news_add_field1.activitiesJYDS.item4_3') }}</text>
  168. <input class="form-input" v-model="formData.dialogDealResultCpt_form.recipient"
  169. :placeholder="t('placeholder.input')" />
  170. </view>
  171. <view class="form-item">
  172. <text class="form-label">{{ t('news_add_field1.activitiesJYDS.item4_2') }}</text>
  173. <input class="form-input" v-model="formData.dialogDealResultCpt_form.mobile"
  174. :placeholder="t('placeholder.input')" />
  175. </view>
  176. <view class="form-item">
  177. <text class="form-label">{{ t('Shop.Address.DetailedAddress') }}</text>
  178. <input class="form-input" v-model="formData.dialogDealResultCpt_form.address"
  179. :placeholder="t('placeholder.input')" />
  180. </view>
  181. <view class="form-tip">{{ t('news_add_field1.activitiesJYDS.item4_4') }}</view>
  182. </scroll-view>
  183. <view class="popup-footer">
  184. <button hover-class="" class="btn-cancel" @click="closeDialog('dialogDealResultCpt')">{{
  185. t('Btn.Cancel')
  186. }}</button>
  187. <button hover-class="" class="btn-confirm" type="primary" @click="handleConfirm('toApplyCpt')">{{
  188. t('Btn.Confirm')
  189. }}</button>
  190. </view>
  191. </view>
  192. </uni-popup>
  193. <!-- 24精英杯申请弹窗 -->
  194. <uni-popup ref="dialogDealResultJxJYBPopup" type="center" :mask-click="false">
  195. <view class="popup-content" style="width: 650rpx;">
  196. <view class="popup-header">
  197. <text class="popup-title">{{ t('Custom.Activity.Apply') }}</text>
  198. <uni-icons type="closeempty" size="20" color="#999"
  199. @click="closeDialog('dialogDealResultJxJYB')"></uni-icons>
  200. </view>
  201. <scroll-view class="popup-body" scroll-y style="max-height: 600rpx;">
  202. <view class="form-item">
  203. <text class="form-label">{{ t('Label.TradingAccount') }}</text>
  204. <picker mode="selector" :range="loginOptions" range-key="login"
  205. @change="onLoginChange('dialogDealResultJxJYB', $event)">
  206. <view class="picker-value">{{ selectedJYBLogin?.login || t('placeholder.choose') }}</view>
  207. </picker>
  208. </view>
  209. </scroll-view>
  210. <view class="popup-footer">
  211. <button hover-class="" class="btn-cancel" @click="closeDialog('dialogDealResultJxJYB')">{{
  212. t('Btn.Cancel')
  213. }}</button>
  214. <button hover-class="" class="btn-confirm" type="primary"
  215. @click="handleConfirm('toApply24JYBVip')">{{
  216. t('Btn.Confirm') }}</button>
  217. </view>
  218. </view>
  219. </uni-popup>
  220. <!-- 无忧交易申请弹窗 -->
  221. <uni-popup ref="dialogDealResultNoWorriesPopup" type="center" :mask-click="false">
  222. <view class="popup-content" style="width: 650rpx;">
  223. <view class="popup-header">
  224. <text class="popup-title">{{ t('Custom.Activity.Apply') }}</text>
  225. <uni-icons type="closeempty" size="20" color="#999"
  226. @click="closeDialog('dialogDealResultNoWorries')"></uni-icons>
  227. </view>
  228. <scroll-view class="popup-body" scroll-y style="max-height: 600rpx;">
  229. <view class="form-item">
  230. <text class="form-label">{{ t('Label.TradingAccount') }}</text>
  231. <picker mode="selector" :range="loginOptions" range-key="login"
  232. @change="onLoginChange('dialogDealResultNoWorries', $event)">
  233. <view class="picker-value">{{ selectedNoWorriesLogin?.login || t('placeholder.choose') }}
  234. </view>
  235. </picker>
  236. </view>
  237. </scroll-view>
  238. <view class="popup-footer">
  239. <button hover-class="" class="btn-cancel" @click="closeDialog('dialogDealResultNoWorries')">{{
  240. t('Btn.Cancel')
  241. }}</button>
  242. <button hover-class="" class="btn-confirm" type="primary"
  243. @click="handleConfirm('toApplyNoWorries')">{{
  244. t('news_add_field1.activitiesNoWorries.item6_1') }}</button>
  245. </view>
  246. </view>
  247. </uni-popup>
  248. <!-- 无忧交易变现弹窗 -->
  249. <uni-popup ref="dialogNoWorriesPopup" type="center" :mask-click="false">
  250. <view class="popup-content">
  251. <view class="popup-header">
  252. <text class="popup-title">{{ t('common.tip') }}</text>
  253. <uni-icons type="closeempty" size="20" color="#999"
  254. @click="closeDialog('dialogNoWorries')"></uni-icons>
  255. </view>
  256. <view class="popup-body">
  257. <text class="message-text">{{ t('news_add_field1.activitiesNoWorries.item7') }}</text>
  258. </view>
  259. <view class="popup-footer">
  260. <button hover-class="" class="btn-cancel" @click="closeDialog('dialogNoWorries')">{{ t('Btn.Cancel')
  261. }}</button>
  262. <button hover-class="" class="btn-confirm" type="primary"
  263. @click="handleConfirm('realizationNoWorries')">{{
  264. t('Btn.Confirm') }}</button>
  265. </view>
  266. </view>
  267. </uni-popup>
  268. <!-- 无忧交易申请成功弹窗 -->
  269. <uni-popup ref="dialogNoWorriesApplyPopup" type="center" :mask-click="false">
  270. <view class="popup-content">
  271. <view class="popup-header">
  272. <text class="popup-title">{{ t('common.success') }}</text>
  273. <uni-icons type="closeempty" size="20" color="#999"
  274. @click="closeDialog('dialogNoWorriesApply')"></uni-icons>
  275. </view>
  276. <view class="popup-body">
  277. <text class="message-text">{{ t('news_add_field1.activitiesNoWorries.item6') }}</text>
  278. </view>
  279. <view class="popup-footer">
  280. <button hover-class="" class="btn-confirm" type="primary"
  281. @click="closeDialog('dialogNoWorriesApply')">{{
  282. t('Btn.Confirm') }}</button>
  283. </view>
  284. </view>
  285. </uni-popup>
  286. <!-- 新任务提示弹窗 -->
  287. <uni-popup ref="dialogNewTaskPopup" type="center" :mask-click="false">
  288. <view class="popup-content" style="width: 650rpx;">
  289. <view class="popup-header">
  290. <text class="popup-title">{{ t('wallet.item16') }}</text>
  291. <uni-icons type="closeempty" size="20" color="#999"
  292. @click="closeDialog('dialogNewTask')"></uni-icons>
  293. </view>
  294. <view class="popup-body">
  295. <view class="task-info">
  296. <text>{{ t('wallet.item17') }}{{ newTaskList?.endTime }}</text>
  297. <text>{{ t('wallet.item18') }}{{ newTaskList?.tradeVolume }}</text>
  298. <text>{{ t('wallet.item19') }}{{ newTaskList?.raffleNumber }}</text>
  299. <text>{{ t('wallet.item20') }}</text>
  300. </view>
  301. </view>
  302. <view class="popup-footer">
  303. <button hover-class="" class="btn-cancel" @click="closeDialog('dialogNewTask')">{{
  304. t('Home.msg.item3') }}</button>
  305. <button hover-class="" class="btn-confirm" type="primary" @click="closeDialog('dialogNewTask')">{{
  306. t('Btn.Confirm')
  307. }}</button>
  308. </view>
  309. </view>
  310. </uni-popup>
  311. <!-- 抽奖弹窗 -->
  312. <uni-popup ref="dialogNewTaskDrawPopup" type="center" :mask-click="false">
  313. <view class="popup-content" style="width: 700rpx;">
  314. <view class="popup-header">
  315. <text class="popup-title">{{ t('wallet.item65') }}</text>
  316. <uni-icons type="closeempty" size="20" color="#999"
  317. @click="closeDialog('dialogNewTaskDraw')"></uni-icons>
  318. </view>
  319. <view class="popup-body">
  320. <DrawLotteryRaffle :curLuckyDrawTimesF="luckyDrawsNumber" @draw-complete="handleDrawComplete" />
  321. </view>
  322. <view class="popup-footer">
  323. <button hover-class="" class="btn-cancel" @click="closeDialog('dialogNewTaskDraw')">{{
  324. t('Home.msg.item3')
  325. }}</button>
  326. </view>
  327. </view>
  328. </uni-popup>
  329. <!-- Surplus活动弹窗 -->
  330. <uni-popup ref="dialogSurplusActivityPopup" type="center" :mask-click="false">
  331. <view class="popup-content" style="width: 650rpx;">
  332. <view class="popup-header">
  333. <text class="popup-title">{{ t('surplusList.item1') }}</text>
  334. <uni-icons type="closeempty" size="20" color="#999"
  335. @click="closeDialog('dialogSurplusActivity')"></uni-icons>
  336. </view>
  337. <scroll-view class="popup-body" scroll-y style="max-height: 800rpx;">
  338. <view class="form-item">
  339. <text class="form-label">{{ t('Custom.Deposit.Title1') }}:</text>
  340. <picker mode="selector" :range="loginOptions1" range-key="login" @change="onAccountChange">
  341. <view class="picker-value">{{ selectedAccount?.login || t('placeholder.choose') }}</view>
  342. </picker>
  343. </view>
  344. <view v-if="selectedAccount" class="form-item">
  345. <text class="form-label">{{ t('surplusList.item3') }}:</text>
  346. <picker mode="selector" :range="surplusOptions.options" range-key="label"
  347. @change="onSurplusChange">
  348. <view class="picker-value">{{ selectedSurplusLabel || t('placeholder.choose') }}</view>
  349. </picker>
  350. </view>
  351. </scroll-view>
  352. <view class="popup-footer">
  353. <button hover-class="" class="btn-cancel" @click="closeDialog('dialogSurplusActivity')">{{
  354. t('Btn.Cancel')
  355. }}</button>
  356. <button hover-class="" class="btn-confirm" type="primary"
  357. @click="handleConfirm('confirmSurplusActivity')"
  358. :disabled="!selectedAccount || !selectedSurplusValue">{{ t('Btn.Confirm') }}</button>
  359. </view>
  360. </view>
  361. </uni-popup>
  362. <!-- 月赏礼遇弹窗 -->
  363. <uni-popup ref="dialogSurplusActivity1Popup" type="center" :mask-click="false">
  364. <view class="popup-content" style="width: 650rpx;">
  365. <view class="popup-header">
  366. <text class="popup-title">{{ t('MonthlyActivities.item1') }}</text>
  367. <uni-icons type="closeempty" size="20" color="#999"
  368. @click="closeDialog('dialogSurplusActivity1')"></uni-icons>
  369. </view>
  370. <view class="popup-body">
  371. <text class="message-text" style="font-size: 32rpx; font-weight: bold;">{{
  372. t('MonthlyActivities.item8') }}</text>
  373. </view>
  374. <view class="popup-footer">
  375. <button hover-class="" class="btn-cancel" @click="closeDialog('dialogSurplusActivity1')">{{
  376. t('Btn.Cancel')
  377. }}</button>
  378. <button hover-class="" class="btn-confirm" type="primary"
  379. @click="handleConfirm('confirmSurplusActivity1')">{{
  380. t('Btn.Confirm') }}</button>
  381. </view>
  382. </view>
  383. </uni-popup>
  384. <!-- 收益模拟器弹窗 -->
  385. <uni-popup ref="openCalculatorFlagPopup" type="center" :mask-click="false">
  386. <view class="popup-content" style="width: 650rpx;">
  387. <view class="popup-header">
  388. <text class="popup-title">{{ t('news_add_field1.NewYear24.item4') }}</text>
  389. <uni-icons type="closeempty" size="20" color="#999"
  390. @click="closeDialog('openCalculatorFlag')"></uni-icons>
  391. </view>
  392. <view class="popup-body">
  393. <view class="calculator-item">
  394. <text class="calculator-label">{{ t('news_add_field1.NewYear24.item5') }}</text>
  395. <input class="calculator-input" type="digit" v-model="balanceInput"
  396. :placeholder="t('placeholder.input')" />
  397. </view>
  398. <view class="calculator-result">
  399. <text>{{ t('news_add_field1.NewYear24.item6') }}</text>
  400. <text class="red">${{ balanceResult }}</text>
  401. <text>{{ t('news_add_field1.NewYear24.item7') }}</text>
  402. <text class="red">${{ incomeResult }}</text>
  403. <text>{{ t('news_add_field1.NewYear24.item8') }}</text>
  404. </view>
  405. </view>
  406. <view class="popup-footer">
  407. <button hover-class="" class="btn-cancel" @click="closeDialog('openCalculatorFlag')">{{
  408. t('news_add_field1.NewYear24.item8_2') }}</button>
  409. <button hover-class="" class="btn-confirm" type="primary"
  410. @click="handleConfirm('calculateIncome')">{{
  411. t('news_add_field1.NewYear24.item8_1') }}</button>
  412. </view>
  413. </view>
  414. </uni-popup>
  415. </view>
  416. </template>
  417. <script setup lang="ts">
  418. import { ref, computed, watch } from 'vue'
  419. import { useI18n } from 'vue-i18n'
  420. import DrawLotteryRaffle from './DrawLotteryRaffle.vue'
  421. const { t } = useI18n()
  422. const props = defineProps<{
  423. visible: Record<string, any>
  424. formData: any
  425. loginOptions: any[]
  426. loginOptions1?: any[]
  427. surplusOptions: {
  428. options: any[]
  429. loading: boolean
  430. }
  431. newTaskList?: any
  432. luckyDrawsNumber?: string
  433. }>()
  434. const emit = defineEmits(['update:visible', 'action'])
  435. // 弹窗引用
  436. const popupRefs: Record<string, any> = {}
  437. // 选中的登录账号
  438. const selectedLogin = computed(() => {
  439. const login = props.formData.dialogDealResult_form?.login
  440. return props.loginOptions.find(item => item.login === login)
  441. })
  442. const selectedJxLogin = computed(() => {
  443. const login = props.formData.dialogDealResultJx_form?.login
  444. return props.loginOptions.find(item => item.login === login)
  445. })
  446. const selectedJxVipLogin = computed(() => {
  447. const login = props.formData.dialogDealResultJx_formVip?.login
  448. return props.loginOptions.find(item => item.login === login)
  449. })
  450. const selectedCptLogin = computed(() => {
  451. const login = props.formData.dialogDealResultCpt_form?.login
  452. return props.loginOptions.find(item => item.login === login)
  453. })
  454. const selectedJYBLogin = computed(() => {
  455. const login = props.formData.dialogDealResultJx_formJYB?.login
  456. return props.loginOptions.find(item => item.login === login)
  457. })
  458. const selectedNoWorriesLogin = computed(() => {
  459. const login = props.formData.dialogDeal_formNoWorries?.login
  460. return props.loginOptions.find(item => item.login === login)
  461. })
  462. // 选中的账户
  463. const selectedAccount = computed(() => props.formData.selectedAccount)
  464. const selectedSurplusValue = computed(() => props.formData.selectedSurplusActivity)
  465. const selectedSurplusLabel = computed(() => {
  466. const option = props.surplusOptions.options.find(item => item.value === selectedSurplusValue.value)
  467. return option?.label || ''
  468. })
  469. // 收益模拟器
  470. const balanceInput = ref('')
  471. const balanceResult = ref(0)
  472. const incomeResult = ref(0)
  473. // 监听弹窗可见性
  474. watch(() => props.visible, (newVal) => {
  475. Object.entries(newVal).forEach(([key, value]) => {
  476. const popup = popupRefs[key + 'Popup']
  477. if (popup) {
  478. if (value) {
  479. popup.open()
  480. } else {
  481. popup.close()
  482. }
  483. }
  484. })
  485. }, { deep: true })
  486. // 关闭弹窗
  487. const closeDialog = (key: string) => {
  488. emit('update:visible', key, false)
  489. }
  490. // 登录账号选择
  491. const onLoginChange = (type: string, e: any) => {
  492. const index = e.detail.value
  493. const login = props.loginOptions[index]?.login
  494. switch (type) {
  495. case 'dialogDealResult':
  496. props.formData.dialogDealResult_form.login = login
  497. break
  498. case 'dialogDealResultJx':
  499. props.formData.dialogDealResultJx_form.login = login
  500. break
  501. case 'dialogDealResultJxVip':
  502. props.formData.dialogDealResultJx_formVip.login = login
  503. break
  504. case 'dialogDealResultCpt':
  505. props.formData.dialogDealResultCpt_form.login = login
  506. break
  507. case 'dialogDealResultJxJYB':
  508. props.formData.dialogDealResultJx_formJYB.login = login
  509. break
  510. case 'dialogDealResultNoWorries':
  511. props.formData.dialogDeal_formNoWorries.login = login
  512. break
  513. }
  514. }
  515. // 账户选择
  516. const onAccountChange = (e: any) => {
  517. const index = e.detail.value
  518. const account = props.loginOptions1?.[index]
  519. emit('action', 'accountChange', account)
  520. }
  521. // Surplus选项选择
  522. const onSurplusChange = (e: any) => {
  523. const index = e.detail.value
  524. const option = props.surplusOptions.options[index]
  525. emit('action', 'surplusChange', option)
  526. }
  527. // 确认操作
  528. const handleConfirm = (action: string) => {
  529. emit('action', action)
  530. }
  531. // 抽奖完成
  532. const handleDrawComplete = (result: any) => {
  533. emit('action', 'drawComplete', result)
  534. }
  535. // 设置弹窗引用
  536. const setPopupRef = (el: any, key: string) => {
  537. if (el) {
  538. popupRefs[key] = el
  539. }
  540. }
  541. </script>
  542. <style scoped lang="scss">
  543. .popup-content {
  544. width: 580rpx;
  545. background-color: rgba(var(--bs-body-bg-rgb), var(--bs-bg-opacity)) !important;
  546. border-radius: 16rpx;
  547. overflow: hidden;
  548. .popup-header {
  549. display: flex;
  550. align-items: center;
  551. justify-content: space-between;
  552. padding: 30rpx;
  553. border-bottom: 1rpx solid #e5e5e5;
  554. .popup-title {
  555. font-size: 32rpx;
  556. font-weight: bold;
  557. color: var(--bs-heading-color);
  558. }
  559. }
  560. .popup-body {
  561. padding: 30rpx;
  562. .message-text {
  563. display: block;
  564. font-size: 28rpx;
  565. line-height: 1.6;
  566. color: var(--bs-heading-color);
  567. text-align: center;
  568. }
  569. .form-item {
  570. margin-bottom: 30rpx;
  571. .form-label {
  572. display: block;
  573. margin-bottom: 16rpx;
  574. font-size: 28rpx;
  575. color: var(--bs-heading-color);
  576. }
  577. .form-input {
  578. padding: 20rpx;
  579. border: 1rpx solid #e5e5e5;
  580. border-radius: 8rpx;
  581. font-size: 28rpx;
  582. width: 100%;
  583. box-sizing: border-box;
  584. }
  585. .picker-value {
  586. padding: 20rpx;
  587. border: 1rpx solid #e5e5e5;
  588. border-radius: 8rpx;
  589. font-size: 28rpx;
  590. color: var(--bs-heading-color);
  591. }
  592. }
  593. .form-tip {
  594. font-size: 24rpx;
  595. color: var(--bs-heading-color);
  596. margin-top: 10rpx;
  597. }
  598. .task-info {
  599. display: flex;
  600. flex-direction: column;
  601. gap: 20rpx;
  602. font-size: 28rpx;
  603. line-height: 1.6;
  604. color: var(--bs-heading-color);
  605. }
  606. .calculator-item {
  607. margin-bottom: 30rpx;
  608. .calculator-label {
  609. display: block;
  610. margin-bottom: 16rpx;
  611. font-size: 28rpx;
  612. color: var(--bs-heading-color);
  613. }
  614. .calculator-input {
  615. padding: 20rpx;
  616. border: 1rpx solid #e5e5e5;
  617. border-radius: 8rpx;
  618. font-size: 28rpx;
  619. width: 100%;
  620. box-sizing: border-box;
  621. }
  622. }
  623. .calculator-result {
  624. font-size: 28rpx;
  625. line-height: 1.8;
  626. color: var(--bs-heading-color);
  627. .red {
  628. color: #ff4d4f;
  629. font-weight: bold;
  630. }
  631. }
  632. }
  633. .popup-footer {
  634. display: flex;
  635. padding: 30rpx;
  636. border-top: 1rpx solid #e5e5e5;
  637. button {
  638. flex: 1;
  639. margin: 0 10rpx;
  640. height: 80rpx;
  641. line-height: 80rpx;
  642. font-size: 28rpx;
  643. border-radius: 8rpx;
  644. &.btn-cancel {
  645. background-color: #f5f5f5;
  646. color: var(--bs-heading-color);
  647. }
  648. &.btn-confirm {
  649. background-color: #cf1322;
  650. color: var(--bs-emphasis-color);
  651. &:disabled {
  652. opacity: 0.5;
  653. }
  654. }
  655. }
  656. }
  657. }
  658. </style>