| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526 |
- <template>
- <cwg-page-wrapper class="create-page" :isHeaderFixed="true">
- <view class="content-container">
- <!-- 动态字段列表 -->
- <view class="content-title">
- <cwg-header :title="t('Documentary.TundManagement.item11')" />
- <view class="content-title-btns">
- <view class="btn-primary btn-primary1" @click="getCustomLoginDownLogin()">
- <cwg-icon icon="crm-plus" :size="16" color="#fff" />
- <text v-t="'Documentary.TundManagement.item12'" />
- </view>
- </view>
- </view>
- <uni-loading v-if="accountDataLoading" />
- <template v-else>
- <view class="field-container" v-if="accountData.length > 0">
- <view class="account-l-con" v-for="(item, index) in accountData" :key="index">
- <view class="tit">
- <view>
- <i class="el-icon-success green-icon"></i><text class="tit-tit"
- v-t="'Documentary.TundManagement.item13'"></text>
- - {{ item.dealLogin || "--" }}
- </view>
- <view class="caozuo">
- <cwg-icon class="cwg-cursor" @click="dialogFllowDele(item)" name="crm-trash-can"
- color="#fff" />
- <cwg-icon class="cwg-cursor" @click="dialogFllowUpdate(item)" name="cog-outline"
- color="#fff" />
- </view>
- </view>
- <view class="account-grid">
- <view class="account-grid-item">
- <view class="sub" v-t="'Label.TradingAccount'"></view>
- <view class="num">{{ item.dealLogin || "--" }}</view>
- </view>
- <view class="account-grid-item">
- <view class="sub" v-t="'Label.PlatformType'"></view>
- <view class="num">{{ item.dealPlatform || "--" }}</view>
- </view>
- <view class="account-grid-item">
- <view class="sub" v-t="'Label.AccountType'"></view>
- <view class="num">
- <text>{{ groupTypeName(item.dealLoginType) }}</text>
- </view>
- </view>
- <view class="account-grid-item">
- <view class="sub" v-t="'Label.Leverage'"></view>
- <view class="num">
- <text v-if="item.dealLeverage">1:{{ item.dealLeverage }}</text>
- <text v-else>{{ "--" }}</text>
- </view>
- </view>
- <view class="account-grid-item">
- <view class="sub" v-t="'Label.Balance'"></view>
- <view class="num">
- {{ numberFormat(item.dealBalance || 0) }}
- </view>
- </view>
- <view class="account-grid-item">
- <view class="sub" v-t="'Label.Equity'"></view>
- <view class="num">{{ numberFormat(item.dealEquity || 0) }}</view>
- </view>
- <view class="account-grid-item">
- <view class="sub" v-t="'Documentary.TundManagement.item14'"></view>
- <view class="num">{{ item.settlementCycle || "--" }}</view>
- </view>
- <view class="account-grid-item">
- <view class="sub" v-t="'Documentary.TundManagement.item15'"></view>
- <view class="num">
- <text v-if="item.distributionType == 1"
- v-t="'Documentary.TundManagement.item59'"></text>
- </view>
- </view>
- <view class="account-grid-item">
- <view class="sub" v-t="'Documentary.TundManagement.item16'"></view>
- <view class="num">{{ item.distributionRatio || "0" }}%</view>
- </view>
- </view>
- </view>
- </view>
- <cwg-empty-state v-if="accountData.length == 0" />
- </template>
- </view>
- <!-- 删除信号源 -->
- <cwg-popup v-model:visible="dialogFllowDelete" type="center" :mask-click="false" :show-footers="true"
- :title="t('Documentary.TundManagement.item28')">
- <view class="dia-content">
- <view class="fllow-title delete-title">
- <text class="title">{{ t('Documentary.TundManagement.item29') }}</text>
- </view>
- <view class="delete-grid">
- <view class="delete-row">
- <view class="delete-item">
- <text class="delete-label">{{ t('Documentary.tradingCenter.item29') }}</text>
- <text class="delete-value">{{ dialogFllowDataDelete.dealLogin || '--' }}</text>
- </view>
- <view class="delete-item">
- <text class="delete-label">{{ t('Documentary.console.item3') }}</text>
- <text class="delete-value">{{ dialogFllowDataDelete.dealPlatform || '--' }}</text>
- </view>
- </view>
- <view class="delete-row">
- <view class="delete-item">
- <text class="delete-label">{{ t('Documentary.console.item7') }}</text>
- <text class="delete-value">{{ numberFormat(dialogFllowDataDelete.dealBalance || 0) }}</text>
- </view>
- <view class="delete-item">
- <text class="delete-label">{{ t('Label.AccountType') }}</text>
- <text class="delete-value">
- <text> {{ groupTypeName(dialogFllowDataDelete.dealLoginType) }}</text>
- </text>
- </view>
- </view>
- <view class="delete-row">
- <view class="delete-item">
- <text class="delete-label">{{ t('Documentary.console.item6') }}</text>
- <text class="delete-value">{{ numberFormat(dialogFllowDataDelete.dealEquity) }}</text>
- </view>
- <view class="delete-item">
- <text class="delete-label">{{ t('Documentary.tradingCenter.item30') }}</text>
- <text class="delete-value">
- <text v-if="dialogFllowDataDelete.distributionType == 1"
- v-t="'Documentary.TundManagement.item59'"></text>
- </text>
- </view>
- </view>
- <view class="delete-row">
- <view class="delete-item">
- <text class="delete-label">{{ t('Label.Credit') }}</text>
- <text class="delete-value">{{ numberFormat(dialogFllowDataDelete.dealCredit || 0) }}</text>
- </view>
- <view class="delete-item">
- <text class="delete-label">{{ t('Documentary.tradingCenter.item31') }}</text>
- <text class="delete-value">{{ dialogFllowDataDelete.distributionRatio || '0' }}%</text>
- </view>
- </view>
- <view class="delete-row">
- <view class="delete-item">
- <text class="delete-label">{{ t('Label.Leverage') }}</text>
- <text class="delete-value">1:{{ dialogFllowDataDelete.dealLeverage || '0' }}</text>
- </view>
- <view class="delete-item">
- <text class="delete-label">{{ t('Documentary.tradingCenter.item32') }}</text>
- <text class="delete-value">{{ dialogFllowDataDelete.settlementCycle || '--' }}</text>
- </view>
- </view>
- </view>
- <view class="delete-tip">
- <text v-t="'Documentary.TundManagement.item30'"></text>
- </view>
- </view>
- <template #footer>
- <button @click="FllowDeleCancel">{{ t('Btn.Cancel') }}</button>
- <button type="primary" @click="FllowDele">{{ t('Btn.Confirm') }}</button>
- </template>
- </cwg-popup>
- <!-- 信号源设置 -->
- <cwg-popup v-model:visible="dialogFllow" type="center" :mask-click="false" :show-footers="true"
- :title="t('Documentary.TundManagement.item31')" width="650px">
- <uni-forms ref="formRef" :model="dialogFllowData" :rules="rules" label-position="top">
- <!-- 名片信息 -->
- <view class="dia-content">
- <!-- 名片信息 -->
- <view class="fllow-title">
- <text class="title">{{ t('Documentary.tradingCenter.item126') }}</text>
- </view>
- <view class="form-item">
- <uni-forms-item name="nickname" :label="t('Documentary.console.item20')">
- <uni-easyinput v-model="dialogFllowData.nickname" :placeholder="t('placeholder.input')"
- @blur="validateAmount" />
- </uni-forms-item>
- </view>
- <view class="form-row">
- <view class="form-col">
- <view class="form-item">
- <uni-forms-item name="personalSignature" :label="t('Documentary.console.item21')">
- <uni-easyinput v-model="dialogFllowData.personalSignature"
- :placeholder="t('placeholder.input')" type="textarea"
- @input="filterChineseEnglishOnlyForApply('personalSignature', $event, 1)" />
- </uni-forms-item>
- </view>
- </view>
- <view class="form-col">
- <view class="form-item">
- <uni-forms-item name="traderStrategy" :label="t('Documentary.console.item22')">
- <uni-easyinput v-model="dialogFllowData.traderStrategy"
- :placeholder="t('placeholder.input')" type="textarea"
- @input="filterChineseEnglishOnlyForApply('traderStrategy', $event, 1)" />
- </uni-forms-item>
- </view>
- </view>
- </view>
- <view class="tip-red">
- <text v-t="'Documentary.console.item37'"></text>
- </view>
- <!-- 账户信息 -->
- <view class="fllow-title">
- <text class="title">{{ t('Documentary.TundManagement.item29') }}</text>
- </view>
- <view class="delete-grid">
- <view class="delete-row">
- <view class="delete-item">
- <text class="delete-label">{{ t('Documentary.console.item3') }}</text>
- <text class="delete-value">{{ dialogFllowData.dealPlatform || '--' }}</text>
- </view>
- <view class="delete-item">
- <text class="delete-label">{{ t('Documentary.tradingCenter.item29') }}</text>
- <text class="delete-value">{{ dialogFllowData.dealLogin || '--' }}</text>
- </view>
- </view>
- <view class="delete-row">
- <view class="delete-item">
- <text class="delete-label">{{ t('Label.AccountType') }}</text>
- <text class="delete-value">
- <text> {{ groupTypeName(dialogFllowData.dealLoginType) }}</text>
- </text>
- </view>
- <view class="delete-item">
- <text class="delete-label">{{ t('Label.Leverage') }}</text>
- <text class="delete-value">1:{{ dialogFllowData.dealLeverage || '0' }}</text>
- </view>
- </view>
- </view>
- <!-- 展示设置 -->
- <view class="fllow-title">
- <text class="title">{{ t('Documentary.TundManagement.item32') }}</text>
- </view>
- <view class="form-row">
- <view class="form-col">
- <view class="form-item">
- <uni-forms-item name="historyShow" :label="t('Documentary.TundManagement.item34')">
- <cwg-combox v-model:value="dialogFllowData.historyShow" :clearable="false"
- :options="[{ text: t('Btn.item6'), value: 1 }, { text: t('Btn.item7'), value: 0 }]"
- :placeholder="t('placeholder.choose')" />
- </uni-forms-item>
- </view>
- </view>
- <view class="form-col">
- <view class="form-item">
- <uni-forms-item name="historyTime" :label="t('Documentary.TundManagement.item35')">
- <uni-datetime-picker v-model="dialogFllowData.historyTime" type="date"
- :placeholder="t('placeholder.input')" @change="handleDateChange" />
- <!-- <uni-date-picker type="date" v-model="dialogFllowData.historyTime" /> -->
- </uni-forms-item>
- </view>
- </view>
- </view>
- <view class="form-item">
- <uni-forms-item name="introduceShow" :label="t('Documentary.TundManagement.item36')">
- <cwg-combox v-model:value="dialogFllowData.historyShow" :clearable="false"
- :options="[{ text: t('Btn.item6'), value: 1 }, { text: t('Btn.item7'), value: 0 }]"
- :placeholder="t('placeholder.choose')" />
- </uni-forms-item>
- </view>
- <!-- 分润设置 -->
- <view class="fllow-title">
- <text class="title">{{ t('Documentary.TundManagement.item33') }}</text>
- </view>
- <!-- 已有订阅 → 只读 -->
- <view v-if="dialogFllowData.followCount" class="delete-grid">
- <view class="delete-row">
- <view class="delete-item">
- <text class="delete-label">{{ t('Documentary.TundManagement.item38') }}</text>
- <text class="delete-value">{{ dialogFllowData.distributionType || '--' }}</text>
- </view>
- <view class="delete-item">
- <text class="delete-label">{{ t('Documentary.tradingCenter.item32') }}</text>
- <text class="delete-value">{{ dialogFllowData.settlementCycle || '--' }}</text>
- </view>
- </view>
- <view class="delete-row">
- <view class="delete-item">
- <text class="delete-label">{{ t('Documentary.TundManagement.item39') }}</text>
- <text class="delete-value">{{ dialogFllowData.distributionRatio || '--' }}</text>
- </view>
- <view class="delete-item">
- <text class="delete-label">{{ t('Documentary.tradingCenter.item32') }}</text>
- <text class="delete-value">{{ dialogFllowData.settlementCycle || '--' }}</text>
- </view>
- </view>
- </view>
- <!-- 无订阅 → 可编辑 -->
- <view v-else class="form-row">
- <view class="form-col">
- <view class="form-item">
- <uni-forms-item name="distributionType" :label="t('Documentary.TundManagement.item38')">
- <cwg-combox v-model:value="dialogFllowData.distributionType" :clearable="false"
- :options="[{ text: t('Documentary.TundManagement.item59'), value: 1 }]"
- :placeholder="t('placeholder.choose')" />
- </uni-forms-item>
- </view>
- </view>
- <view class="form-col">
- <view class="form-item">
- <uni-forms-item name="distributionRatio"
- :label="t('Documentary.TundManagement.item39') + '(%)'">
- <uni-easyinput v-model="dialogFllowData.distributionRatio"
- :placeholder="t('placeholder.input')" />
- </uni-forms-item>
- </view>
- </view>
- <view class="form-col">
- <view class="form-item">
- <uni-forms-item name="settlementCycle" :label="t('Documentary.tradingCenter.item32')">
- <cwg-combox v-model:value="dialogFllowData.settlementCycle" :clearable="false"
- :options="[{ text: 7, value: 7 }, { text: 15, value: 15 }, { text: 30, value: 30 }]"
- :placeholder="t('placeholder.choose')" />
- </uni-forms-item>
- </view>
- </view>
- </view>
- </view>
- </uni-forms>
- <template #footer>
- <button @click="FllowUpdateCancel">{{ t('Btn.Cancel') }}</button>
- <button type="primary" @click="FllowUpdate">{{ t('Btn.Confirm') }}</button>
- </template>
- </cwg-popup>
- <!--申请成为信号源-->
- <cwg-popup v-model:visible="dialogFllowApply" type="center" :mask-click="false" :show-footers="true"
- :title="t('Documentary.TundManagement.item41')" width="650px">
- <uni-forms ref="applyRef" :model="dialogFllowDataApply" :rules="rules" label-position="top"
- label-width="200px">
- <!-- 名片信息 -->
- <view class="dia-content">
- <!-- 名片信息 -->
- <view class="fllow-title">
- <text class="title">{{ t('Documentary.tradingCenter.item126') }}</text>
- </view>
- <view class="form-item">
- <uni-forms-item name="nickname" :label="t('Documentary.console.item20')">
- <uni-easyinput v-model="dialogFllowDataApply.nickname" :placeholder="t('placeholder.input')"
- @blur="validateAmount" />
- </uni-forms-item>
- </view>
- <view class="form-row">
- <view class="form-col">
- <view class="form-item">
- <uni-forms-item name="personalSignature" :label="t('Documentary.console.item21')">
- <uni-easyinput v-model="dialogFllowDataApply.personalSignature"
- :placeholder="t('placeholder.input')" type="textarea"
- @input="filterChineseEnglishOnlyForApply('personalSignature', $event, 2)" />
- </uni-forms-item>
- </view>
- </view>
- <view class="form-col">
- <view class="form-item">
- <uni-forms-item name="traderStrategy" :label="t('Documentary.console.item22')">
- <uni-easyinput v-model="dialogFllowDataApply.traderStrategy"
- :placeholder="t('placeholder.input')" type="textarea"
- @input="filterChineseEnglishOnlyForApply('traderStrategy', $event, 2)" />
- </uni-forms-item>
- </view>
- </view>
- </view>
- <view class="tip-red">
- <text v-t="'Documentary.console.item37'"></text>
- </view>
- <!-- 账户信息 -->
- <view class="fllow-title">
- <text class="title">{{ t('Documentary.TundManagement.item29') }}{{ fundRequirementText }}</text>
- </view>
- <view class="form-row">
- <view class="form-col">
- <view class="form-item">
- <uni-forms-item name="dealLogin" :label="t('Label.TradingAccount')">
- <cwg-combox v-model:value="dialogFllowDataApply.dealLogin" :clearable="false"
- :options="loginOptions" :placeholder="t('placeholder.choose')"
- @change="selectLoginDeal" />
- </uni-forms-item>
- </view>
- </view>
- <view class="form-col">
- <view class="form-item">
- <uni-forms-item name="platform" :label="t('Label.PlatformType')">
- <cwg-combox v-model:value="dialogFllowDataApply.platform" :clearable="false"
- :options="[{ text: 'MT4', value: 'MT4' }, { text: 'MT5', value: 'MT5' }]"
- :placeholder="t('placeholder.choose')" :disabled="true" />
- </uni-forms-item>
- </view>
- </view>
- </view>
- <view class="form-row">
- <view class="form-col">
- <view class="form-item">
- <uni-forms-item name="loginType" :label="t('Label.AccountType')">
- <cwg-combox v-model:value="dialogFllowDataApply.loginType" :clearable="false"
- :options="[
- { text: t('AccountType.ClassicAccount'), value: 1 },
- { text: t('AccountType.SeniorAccount'), value: 2 },
- { text: t('AccountType.SpeedAccount'), value: 5 },
- { text: t('AccountType.SpeedAccount'), value: 6 },
- { text: t('AccountType.StandardAccount'), value: 7 },
- { text: t('AccountType.CentAccount'), value: 8 }
- ]" :placeholder="t('placeholder.choose')" :disabled="true" />
- </uni-forms-item>
- </view>
- </view>
- <view class="form-col">
- <view class="form-item">
- <uni-forms-item name="leverage" :label="t('Label.Leverage')">
- <uni-easyinput v-model="dialogFllowDataApply.leverage"
- :placeholder="t('placeholder.input')" :disabled="true" />
- </uni-forms-item>
- </view>
- </view>
- </view>
- <!-- 展示设置 -->
- <view class="fllow-title">
- <text class="title">{{ t('Documentary.TundManagement.item32') }}</text>
- </view>
- <view class="form-row">
- <view class="form-col">
- <view class="form-item">
- <uni-forms-item name="historyShow" :label="t('Documentary.TundManagement.item34')">
- <cwg-combox v-model:value="dialogFllowDataApply.historyShow" :clearable="false"
- :options="[{ text: t('Btn.item6'), value: 1 }, { text: t('Btn.item7'), value: 0 }]"
- :placeholder="t('placeholder.choose')" />
- </uni-forms-item>
- </view>
- </view>
- <view class="form-col">
- <view class="form-item">
- <uni-forms-item name="historyTime" :label="t('Documentary.TundManagement.item35')">
- <uni-datetime-picker v-model="dialogFllowDataApply.historyTime" type="date"
- :placeholder="t('Documentary.TundManagement.item37')" />
- </uni-forms-item>
- </view>
- </view>
- </view>
- <view class="form-item">
- <uni-forms-item name="introduceShow" :label="t('Documentary.TundManagement.item36')">
- <cwg-combox v-model:value="dialogFllowDataApply.introduceShow" :clearable="false"
- :options="[{ text: t('Btn.item6'), value: 1 }, { text: t('Btn.item7'), value: 0 }]"
- :placeholder="t('placeholder.choose')" />
- </uni-forms-item>
- </view>
- <!-- 分润设置 -->
- <view class="fllow-title">
- <text class="title">{{ t('Documentary.TundManagement.item33') }}</text>
- </view>
- <view class="form-row">
- <view class="form-col">
- <view class="form-item">
- <uni-forms-item name="distributionType" :label="t('Documentary.TundManagement.item38')">
- <cwg-combox v-model:value="dialogFllowDataApply.distributionType" :clearable="false"
- :options="[{ text: t('Documentary.TundManagement.item59'), value: 1 }]"
- :placeholder="t('placeholder.choose')" />
- </uni-forms-item>
- </view>
- </view>
- <view class="form-col">
- <view class="form-item">
- <uni-forms-item name="distributionRatio"
- :label="t('Documentary.TundManagement.item39') + '(%)'">
- <uni-easyinput v-model="dialogFllowDataApply.distributionRatio"
- :placeholder="t('placeholder.input')" />
- </uni-forms-item>
- </view>
- </view>
- <view class="form-col">
- <view class="form-item">
- <uni-forms-item name="settlementCycle" :label="t('Documentary.tradingCenter.item32')">
- <cwg-combox v-model:value="dialogFllowDataApply.settlementCycle" :clearable="false"
- :options="[{ text: 7, value: 7 }, { text: 15, value: 15 }, { text: 30, value: 30 }]"
- :placeholder="t('placeholder.choose')" />
- </uni-forms-item>
- </view>
- </view>
- </view>
- <view class="form-item agree">
- <uni-forms-item name="agree">
- <checkbox-group :value="dialogFllowDataApply.agree ? ['1'] : []" @change="onAgreeChange">
- <label class="checkbox-agree">
- <checkbox value="1" :checked="dialogFllowDataApply.agree" />
- <text class="agree-text">
- {{ t('Documentary.TundManagement.item42') }}
- <cwg-link style="text-decoration: underline;" class="a"
- :url="isZh ? 'pdf/CopyTradeUserAgreementcn.pdf' : 'pdf/CopyTradeUserAgreement.pdf'"
- target="_blank" title="Documentary.TundManagement.item43" />
- {{ t('Documentary.TundManagement.item42_2') }}
- </text>
- </label>
- </checkbox-group>
- </uni-forms-item>
- </view>
- </view>
- </uni-forms>
- <template #footer>
- <button @click="ApplyFllowCancel">{{ t('Btn.Cancel') }}</button>
- <button type="primary" @click="ApplyFllow">{{ t('Btn.Confirm') }}</button>
- </template>
- </cwg-popup>
- </cwg-page-wrapper>
- </template>
- <script setup lang="ts">
- import { computed, ref, nextTick, onMounted, reactive, watch } from 'vue';
- import { isAfterJuly28 } from '@/utils/dateUtils'
- import { useI18n } from 'vue-i18n';
- const { t, locale } = useI18n();
- import { documentaryApi } from '@/service/documentary';
- import useUserStore from "@/stores/use-user-store";
- const userStore = useUserStore();
- const userInfo = computed(() => userStore.userInfo);
- import { useFilters } from '@/composables/useFilters'
- const { numberFormat, numberDecimal } = useFilters()
- const isZh = computed(() => ['cn', 'zh', 'zhHant'].includes(locale.value));
- const formRef = ref(null)
- const rules = {
- password: {
- rules: [
- {
- required: true,
- validateFunction: (rule, value, data, callback) => {
- if (Config.Pattern.Password.test(value)) {
- callback()
- } else {
- callback(t('vaildate.password.format'))
- }
- return true
- }
- }
- ]
- },
- agree: {
- rules: [
- {
- validateFunction: (rule, value, data, callback) => {
- if (value) {
- callback()
- } else {
- callback(t('vaildate.agree.empty'))
- }
- return true
- }
- }
- ]
- },
- platform: {
- rules: [
- {
- required: true,
- errorMessage: t('vaildate.select.empty')
- }
- ]
- },
- currency: {
- rules: [
- {
- required: true,
- errorMessage: t('vaildate.select.empty')
- }
- ]
- },
- leverage: {
- rules: [
- {
- required: true,
- errorMessage: t('vaildate.select.empty')
- }
- ]
- },
- loginType: {
- rules: [
- {
- required: true,
- errorMessage: t('vaildate.select.empty')
- }
- ]
- },
- dealLogin: {
- rules: [
- {
- required: true,
- errorMessage: t('vaildate.select.empty')
- }
- ]
- },
- distributionType: {
- rules: [
- {
- required: true,
- errorMessage: t('vaildate.select.empty')
- }
- ]
- },
- distributionRatio: {
- rules: [
- {
- required: true,
- errorMessage: t('vaildate.input.empty')
- },
- {
- validateFunction: (rule, value, data, callback) => {
- if (value >= 0 && value <= 50) {
- callback()
- } else {
- callback('0-50')
- }
- return true
- }
- }
- ]
- },
- settlementCycle: {
- rules: [
- {
- required: true,
- errorMessage: t('vaildate.input.empty')
- }
- ]
- },
- historyShow: {
- rules: [
- {
- required: true,
- errorMessage: t('vaildate.select.empty')
- }
- ]
- },
- historyTime: {
- rules: [
- {
- required: true,
- errorMessage: t('vaildate.select.empty')
- }
- ]
- },
- introduceShow: {
- rules: [
- {
- required: true,
- errorMessage: t('vaildate.select.empty')
- }
- ]
- },
- protectAmount: {
- rules: [
- {
- required: true,
- errorMessage: t('vaildate.input.empty')
- }
- ]
- },
- protectRatio: {
- rules: [
- {
- required: true,
- errorMessage: t('vaildate.input.empty')
- }
- ]
- },
- nickname: {
- rules: [
- {
- required: true,
- errorMessage: t('vaildate.input.empty')
- },
- {
- validateFunction: (rule, value, data, callback) => {
- if (value && /^[0-9a-zA-Z]{1,24}$/.test(value)) {
- callback()
- } else {
- callback(t('Msg.nickname'))
- }
- return true
- }
- }
- ]
- },
- personalSignature: {
- rules: [
- {
- required: true,
- errorMessage: t('vaildate.input.empty')
- },
- {
- validateFunction: (rule, value, data, callback) => {
- if (!value || /^[\u4e00-\u9fa5a-zA-Z\s]*$/.test(value)) {
- callback()
- } else {
- callback(t('Documentary.console.item38'))
- }
- return true
- }
- }
- ]
- },
- traderStrategy: {
- rules: [
- {
- required: true,
- errorMessage: t('vaildate.input.empty')
- },
- {
- validateFunction: (rule, value, data, callback) => {
- if (!value || /^[\u4e00-\u9fa5a-zA-Z\s]*$/.test(value)) {
- callback()
- } else {
- callback(t('Documentary.console.item38'))
- }
- return true
- }
- }
- ]
- },
- followType: {
- rules: [
- {
- required: true,
- errorMessage: t('vaildate.select.empty')
- }
- ]
- },
- volume: {
- rules: [
- {
- required: true,
- errorMessage: t('vaildate.input.empty')
- }
- ]
- },
- ratio: {
- rules: [
- {
- required: true,
- errorMessage: t('vaildate.input.empty')
- }
- ]
- }
- }
- const filterChineseEnglishOnlyForApply = (field, value, type) => {
- // 只保留中文、英文和空格
- const filtered = value.replace(/[^\u4e00-\u9fa5a-zA-Z\s]/g, '');
- // 去掉前后空格,如果没有正文内容(全是空格)就设置为空字符串
- const trimmed = filtered.trim();
- if (type == 1) {
- nextTick(() => {
- dialogFllowData.value[field] = trimmed;
- })
- } else {
- nextTick(() => {
- dialogFllowDataApply[field] = trimmed;
- })
- }
- }
- //获取客户跟单账户的下拉列表
- const isSubscribeLoading = ref(false)
- const SubscribeDownData = ref([])
- const getSubscribeLoginDown = async () => {
- isSubscribeLoading.value = true
- let res = await documentaryApi.followDealSubscribeLoginList({
- platform: "",
- page: null,
- });
- if (res.code == 200) {
- SubscribeDownData.value = res.data?.map(item => ({
- text: t('Documentary.console.item28') + '-' + item.dealLogin || '--',
- value: item.dealLogin
- })) || []
- } else {
- uni.showToast({
- title: res.msg,
- icon: 'none'
- })
- }
- isSubscribeLoading.value = false
- }
- const onAgreeChange = (e) => {
- dialogFllowDataApply.agree = e.detail.value.length > 0
- }
- // 单位类型
- function groupCurrency(type) {
- const map = { GBP: ': £', USD: ': $', EUR: ': €', USC: ': ¢' }
- return map[type] || ': $'
- }
- // 账户类型
- function groupTypeName(type) {
- const typeMap = {
- '1': t('AccountType.ClassicAccount'),
- '2': t('AccountType.SeniorAccount'),
- '3': isAfterJuly28() ? '--' : t('AccountType.AgencyAccount'),
- '5': t('AccountType.SpeedAccount'),
- '6': t('AccountType.SpeedAccount'),
- '7': t('AccountType.StandardAccount'),
- '8': t('AccountType.CentAccount')
- }
- return typeMap[type] || ''
- }
- const loginOptions = computed(() => loginOptionsLogin.value.map(item => ({
- text: `${item.login} - ${groupTypeName(item.type)} - ${t('Custom.Deposit.AvailableBalance')}${groupCurrency(item.currency)}${item.balance}`,
- value: item.login,
- disable: item.balance < 200
- })))
- const selectLoginDeal = () => {
- loginOptionsLogin.value.forEach((item) => {
- if (item.login == dialogFllowDataApply.dealLogin) {
- dialogFllowDataApply.leverage = "1:" + item.leverage;
- dialogFllowDataApply.loginType = item.type;
- dialogFllowDataApply.platform = item.platform;
- }
- });
- }
- const applyRef = ref(null)
- const dialogFllowDataApply = reactive({
- dealLogin: '',
- leverage: '',
- loginType: '',
- platform: '',
- currency: '',
- leverageStatus: '',
- withdrawStatus: '',
- depositStatus: '',
- accountStatus: '',
- status: '',
- note: '',
- followType: '',
- volume: '',
- ratio: '',
- traderStrategy: '',
- personalSignature: '',
- nickname: '',
- protectAmount: '',
- protectRatio: '',
- introduceShow: '',
- historyShow: '',
- historyTime: '',
- settlementCycle: '',
- distributionType: '',
- distributionRatio: '',
- withdrawCurrency: '',
- withdrawAmount: '',
- depositCurrency: '',
- depositAmount: '',
- withdrawLogin: '',
- depositLogin: '',
- addTime: '',
- title: '',
- })
- const loginOptionsLogin = ref([])
- const dialogFllowApply = ref(false)
- //获取申请信号源交易账户下拉
- const getCustomLoginDownLogin = async () => {
- if (flag.value) {
- return;
- } else {
- flag.value = true;
- }
- let res = await documentaryApi.CustomDropdownData({
- platform: "",
- });
- if (res.code == 200) {
- loginOptionsLogin.value = res.data;
- dialogFllowApply.value = true;
- } else {
- uni.showToast({
- title: res.msg,
- icon: 'none'
- });
- }
- flag.value = false;
- }
- watch(() => dialogFllowDataApply.dealLogin, (newVal, oldVal) => {
- if (newVal !== oldVal) {
- selectLoginDeal();
- }
- })
- //申请信号源
- const ApplyFllow = async () => {
- try {
- await applyRef.value.validate()
- if (flag.value) {
- return;
- } else {
- flag.value = true;
- }
- let res = await documentaryApi.followDealApply({
- ...dialogFllowDataApply,
- });
- if (res.code == 200) {
- uni.showToast({
- title: t("Msg.Success"),
- icon: 'none'
- });
- ApplyFllowCancel();
- getDealLogin();
- flag.value = false;
- } else {
- uni.showToast({
- title: res.msg,
- icon: 'none'
- });
- flag.value = false;
- }
- } catch (error) {
- return false;
- } finally {
- flag.value = false;
- }
- }
- const ApplyFllowCancel = () => {
- applyRef.value &&
- applyRef.value.clearValidate();
- dialogFllowApply.value = false;
- }
- //获取客户信号源账户
- const accountDataLoading = ref(false)
- const accountData = ref([])
- const accountPager = ref({
- current: 1,
- row: 10,
- rowTotal: 0,
- pageTotal: 0
- })
- const getDealLogin = async () => {
- accountDataLoading.value = true;
- let res = await documentaryApi.followDealList({
- platform: null,
- status: 2,
- page: {
- current: accountPager.value.current,
- row: accountPager.value.row,
- },
- });
- if (res.code == 200) {
- accountData.value = res.data || []
- accountPager.value.rowTotal = res.page.rowTotal;
- accountPager.value.pageTotal = res.page.pageTotal;
- } else {
- uni.showToast({
- title: res.msg,
- icon: 'none'
- });
- }
- accountDataLoading.value = false;
- }
- //修改信号源
- const dialogFllowData = ref({})
- const dialogFllow = ref(false)
- const dialogFllowDataDelete = ref({})
- const dialogFllowDelete = ref(false)
- const flag = ref(false)
- const dialogFllowUpdate = (item) => {
- dialogFllowData.value = item;
- dialogFllow.value = true;
- }
- const FllowUpdate = async () => {
- try {
- await formRef.value.validate()
- if (flag.value) {
- return;
- } else {
- flag.value = true;
- }
- let res = await documentaryApi.followDealUpdate({
- ...dialogFllowData.value,
- });
- if (res.code == 200) {
- uni.showToast({
- title: t("Msg.Success"),
- icon: 'none'
- });
- FllowUpdateCancel();
- tableRef.value.refreshTable()
- getDealLogin();
- getSubscribeLoginDown()
- flag.value = false;
- } else {
- uni.showToast({
- title: res.msg,
- icon: 'none'
- });
- flag.value = false;
- }
- } catch (error) {
- flag.value = false;
- }
- }
- const FllowUpdateCancel = () => {
- formRef.value && formRef.value.clearValidate();
- dialogFllow.value = false;
- }
- //删除信号源
- const dialogFllowDele = (item) => {
- dialogFllowDataDelete.value = item;
- dialogFllowDelete.value = true;
- }
- const FllowDele = async () => {
- if (flag.value) {
- return;
- } else {
- flag.value = true;
- }
- let res = await documentaryApi.followDealDelete({
- ids: [dialogFllowDataDelete.value.id],
- });
- if (res.code == 200) {
- uni.showToast({
- title: t("Msg.Success"),
- icon: 'none'
- });
- FllowDeleCancel();
- tableRef.value.refreshTable()
- getDealLogin();
- getSubscribeLoginDown()
- flag.value = false;
- } else {
- uni.showToast({
- title: res.msg,
- icon: 'none'
- });
- flag.value = false;
- }
- }
- const FllowDeleCancel = () => {
- dialogFllowDelete.value = false;
- }
- const listApi = ref(null)
- onMounted(() => {
- getDealLogin()
- getSubscribeLoginDown()
- listApi.value = documentaryApi.followDealSubscribeDealList
- })
- </script>
- <style scoped lang="scss">
- @import "@/uni.scss";
- .content-container {
- .field-container {
- display: grid;
- grid-template-columns: repeat(3, 1fr);
- gap: px2rpx(16);
- min-width: 0;
- overflow: hidden;
- @media (max-width: 991px) {
- grid-template-columns: 1fr;
- }
- .account-l-con {
- background-color: transparent;
- border-radius: px2rpx(8);
- padding: px2rpx(20);
- margin-bottom: px2rpx(16);
- transition: all 0.3s ease;
- box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
- width: 100%;
- border: 1px solid var(--bs-border-color);
- box-sizing: border-box;
- &:hover {
- box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
- transform: translateY(-2px);
- }
- .tit {
- display: flex;
- justify-content: space-between;
- align-items: center;
- margin-bottom: px2rpx(20);
- padding-bottom: px2rpx(12);
- border-bottom: 1px solid var(--bs-border-color);
- view:first-child {
- display: flex;
- align-items: center;
- gap: px2rpx(8);
- .green-icon {
- color: #28a745;
- font-size: px2rpx(16);
- }
- .tit-tit {
- font-size: px2rpx(16);
- font-weight: 600;
- color: var(--bs-emphasis-color);
- }
- text:last-child {
- font-size: px2rpx(14);
- font-weight: 500;
- color: var(--bs-body-color);
- }
- }
- .caozuo {
- display: flex;
- gap: px2rpx(12);
- i {
- font-size: px2rpx(18);
- color: var(--bs-body-color);
- transition: all 0.2s ease;
- &:hover {
- color: #eb3f57;
- cursor: pointer;
- }
- &:active {
- transform: scale(0.9);
- }
- }
- }
- }
- .account-grid {
- display: grid;
- grid-template-columns: repeat(3, 1fr);
- gap: px2rpx(16);
- width: 100%;
- box-sizing: border-box;
- @media (max-width: 480px) {
- grid-template-columns: repeat(3, 1fr);
- }
- .account-grid-item {
- /* 🔥 核心修复 3:去掉强制最小宽度,避免超宽 */
- /* min-width: px2rpx(200); */
- margin-bottom: px2rpx(16);
- .sub {
- font-size: px2rpx(12);
- font-weight: 500;
- color: var(--bs-body-color);
- margin-bottom: px2rpx(4);
- text-transform: uppercase;
- letter-spacing: px2rpx(0.5);
- white-space: nowrap;
- overflow: hidden;
- text-overflow: ellipsis;
- }
- .num {
- font-size: px2rpx(14);
- font-weight: 400;
- color: var(--bs-emphasis-color);
- line-height: 1.4;
- white-space: nowrap;
- overflow: hidden;
- text-overflow: ellipsis;
- }
- }
- }
- }
- }
- }
- .avatar {
- width: px2rpx(60);
- height: px2rpx(60);
- border-radius: 4px;
- }
- .content-title {
- display: flex;
- justify-content: space-between;
- align-items: center;
- .content-title-btns {
- display: flex;
- align-items: center;
- justify-content: center;
- gap: px2rpx(12);
- margin-bottom: px2rpx(24);
- .btn-primary {
- min-width: px2rpx(120);
- background-color: var(--color-error);
- color: #fff;
- padding: 0 px2rpx(12);
- border: none;
- font-size: px2rpx(14);
- text-align: center;
- cursor: pointer;
- display: flex;
- align-items: center;
- justify-content: center;
- gap: px2rpx(8);
- }
- .btn-primary1 {
- background-color: #cf1322;
- ;
- }
- .btn-primary2 {
- background-color: var(--color-secondary-focus);
- }
- }
- }
- .operation-btn {
- :deep(text) {
- display: flex;
- align-items: center;
- justify-content: center;
- gap: px2rpx(4);
- cursor: pointer;
- background-color: var(--color-slate-150);
- padding: px2rpx(8) 0;
- }
- }
- .operation-btn.disabled {
- cursor: not-allowed;
- opacity: 0.5;
- }
- .search-bar {
- display: flex;
- align-items: center;
- justify-content: flex-start;
- flex-wrap: wrap;
- gap: px2rpx(16);
- margin: px2rpx(16) 0;
- .cwg-combox,
- .uni-easyinput,
- .uni-date {
- width: px2rpx(240) !important;
- flex: none;
- }
- }
- .dia-content {
- padding: px2rpx(20);
- .uni-forms-item {
- width: 100%;
- }
- .grid-layout {
- display: grid;
- grid-template-columns: 1fr 1fr;
- gap: px2rpx(20);
- margin: px2rpx(24) 0;
- padding: px2rpx(20);
- background-color: transparent;
- border-radius: px2rpx(8);
- box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
- }
- .fllow-title {
- display: flex;
- align-items: center;
- justify-content: space-between;
- border-bottom: 1px solid #eee;
- padding-bottom: 10px;
- margin-bottom: 10px;
- .title {
- font-weight: bold;
- color: var(--bs-heading-color);
- padding-left: 8px;
- border-left: 4px solid #eb3f57;
- font-size: 16px;
- }
- }
- .delete-grid {
- margin: px2rpx(16) 0;
- }
- .delete-row {
- display: grid;
- grid-template-columns: 1fr 1fr;
- gap: px2rpx(12);
- @media screen and (max-width: 768px) {
- grid-template-columns: 1fr;
- }
- }
- .delete-item {
- flex: 1;
- display: flex;
- justify-content: space-between;
- align-items: center;
- padding: px2rpx(12) 0;
- border-bottom: 1px dashed #e9ecef;
- &:first-child {
- padding-right: px2rpx(16);
- }
- &:last-child {
- padding-left: px2rpx(16);
- }
- }
- .delete-label {
- font-size: px2rpx(14);
- color: var(--bs-body-color);
- }
- .delete-value {
- font-size: px2rpx(14);
- color: var(--bs-emphasis-color);
- font-weight: 400;
- }
- .delete-tip {
- margin-top: px2rpx(16);
- font-size: px2rpx(14);
- color: var(--bs-body-color);
- line-height: 1.5;
- padding-top: px2rpx(16);
- }
- .tip-star {
- color: #dc3545;
- margin-right: px2rpx(4);
- }
- .agree {
- margin-top: px2rpx(20);
- }
- .checkbox-agree {
- display: flex;
- align-items: flex-start;
- gap: px2rpx(8);
- .agree-text {
- font-size: px2rpx(14);
- color: var(--bs-body-color);
- line-height: 1.5;
- width: 100%;
- white-space: wrap;
- .a {
- color: #007bff;
- text-decoration: underline;
- margin: 0 px2rpx(4);
- &:hover {
- color: #0056b3;
- }
- }
- }
- }
- .fllow-content {
- margin-bottom: px2rpx(16);
- .tit {
- font-size: px2rpx(14);
- font-weight: 500;
- color: var(--bs-body-color);
- margin-bottom: px2rpx(6);
- text-transform: uppercase;
- letter-spacing: px2rpx(0.5);
- }
- .con {
- font-size: px2rpx(16);
- font-weight: 400;
- color: var(--bs-emphasis-color);
- line-height: 1.4;
- }
- }
- .form-row {
- display: grid;
- grid-template-columns: 1fr 1fr;
- gap: px2rpx(20);
- margin-top: px2rpx(16);
- @media screen and (max-width: 768px) {
- grid-template-columns: 1fr;
- }
- }
- .form-item {
- display: flex;
- flex-direction: column;
- align-items: flex-start;
- text {
- font-size: px2rpx(14);
- font-weight: 500;
- color: var(--bs-body-color);
- margin-bottom: px2rpx(8);
- white-space: nowrap;
- }
- input,
- select,
- textarea {
- width: 100%;
- padding: px2rpx(10);
- border: 1px solid #ced4da;
- border-radius: px2rpx(4);
- font-size: px2rpx(14);
- transition: all 0.2s ease;
- &:focus {
- outline: none;
- border-color: #4dabf7;
- box-shadow: 0 0 0 2px rgba(77, 171, 247, 0.2);
- }
- }
- textarea {
- resize: vertical;
- min-height: px2rpx(100);
- }
- }
- .tip-red {
- color: #dc3545;
- font-size: px2rpx(14);
- margin: px2rpx(12) 0 px2rpx(24) 0;
- }
- .tip-text {
- margin-top: px2rpx(24);
- font-size: px2rpx(14);
- color: var(--bs-body-color);
- line-height: 1.5;
- padding: px2rpx(16);
- background-color: #e7f3ff;
- border-radius: px2rpx(4);
- border-left: 4px solid #4dabf7;
- }
- }
- /* 弹窗按钮样式 */
- :deep(.cwg-popup__footer) {
- display: flex;
- gap: px2rpx(20);
- padding: px2rpx(20);
- border-top: 1px solid #e9ecef;
- button {
- flex: 1;
- padding: px2rpx(12) 0;
- border-radius: px2rpx(4);
- font-size: px2rpx(14);
- font-weight: 500;
- transition: all 0.2s ease;
- &:first-child {
- background-color: rgba(var(--bs-body-bg-rgb), var(--bs-bg-opacity)) !important;
- color: #495057;
- border: 1px solid #ced4da;
- &:hover {
- background-color: transparent;
- border-color: #adb5bd;
- }
- &:active {
- transform: scale(0.98);
- }
- }
- &:last-child {
- background-color: #dc3545;
- color: white;
- border: 1px solid #dc3545;
- &:hover {
- background-color: #c82333;
- border-color: #bd2130;
- }
- &:active {
- transform: scale(0.98);
- }
- }
- }
- }
- </style>
|