| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563 |
- <template>
- <cwg-page-wrapper class="create-page" :isHeaderFixed="true">
- <view class="container">
- <view class="row">
- <view class="col-12">
- <view class="border-0 card-header">
- <view class="d-flex flex-wrap gap-3 align-items-center justify-content-between mb-3">
- <h3 class="mb-0" style="align-self: flex-start" v-t="'Documentary.TundManagement.item11'">
- </h3>
- <button class="btn btn-secondary btn-shadow waves-effect" @click="getCustomLoginDownLogin">
- <view class="d-flex align-items-center">
- <cwg-icon icon="crm-plus" :size="16" color="#fff" />
- <text v-t="'Documentary.TundManagement.item12'" />
- </view>
- </button>
- </view>
- </view>
- </view>
- </view>
- </view>
- <view class="content-container list-content-empty" v-if="accountDataLoading || accountData.length > 0">
- <uni-loading v-if="accountDataLoading" />
- <view class="field-container" v-else>
- <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 cursor-pointer"
- :data-tooltip="t('Documentary.TundManagement.item28')" name="crm-trash-can"
- @click="dialogFllowDele(item)" />
- <cwg-icon class="cwg-cursor cursor-pointer"
- :data-tooltip="t('Documentary.TundManagement.item31')" name="cog-outline"
- @click="dialogFllowUpdate(item)" />
- </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">{{ optObj[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>
- </view>
- <view v-else class="content-container list-content-empty">
- <view class="list-empty-state">
- <cwg-empty-state />
- </view>
- </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">{{ optObj[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="optList1" :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="optList1" :placeholder="t('placeholder.choose')" />
- </uni-forms-item>
- </view>
- </view>
- </view>
- <uni-forms-item class="agree" 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 type="pdf" 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>
- </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()
- import { useFollowEnum } from '@/pages/follow/const/enum'
- const { optObj, optList1 } = useFollowEnum()
- const isZh = computed(() => ['cn', 'zh', 'zhHant'].includes(locale.value));
- const formRef = ref(null)
- const rules = computed(() => ({
- 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')
- }
- ]
- }
- }));
- watch(locale, () => {
- formRef.value?.clearValidate()
- })
- 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)}${numberDecimal(item.balance || 0)}`,
- value: item.login,
- disable: item.balance < 1000
- })))
- 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) {
- uni.showToast({ title: error.msg, icon: 'none' });
- } 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";
- .btn {
- margin: 0;
- }
- .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) px2rpx(20) px2rpx(100) 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);
- }
- }
- @media screen and (max-width: 768px) {
- .delete-item {
- &:first-child {
- padding-right: px2rpx(0);
- }
- &:last-child {
- padding-left: px2rpx(0);
- }
- }
- }
- .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-emphasis-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);
- :deep(.uni-checkbox-input) {
- width: px2rpx(18);
- height: px2rpx(18);
- }
- .agree-text {
- font-size: px2rpx(14);
- color: var(--bs-emphasis-color);
- line-height: 1.3;
- font-weight: normal;
- 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>
|