ActivityDialogs.vue 28 KB

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