ActivityDialogs.vue 30 KB

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