|
@@ -1,87 +1,76 @@
|
|
|
<template>
|
|
<template>
|
|
|
- <cwg-popup :title="t(title)" :visible="visible" @close="closeDia" @confirm="confirmDia">
|
|
|
|
|
|
|
+ <cwg-popup :title="t(title)" :visible="visible" @close="closeDia" @confirm="confirmDia" :width="'900px'">
|
|
|
<view class="dia-content">
|
|
<view class="dia-content">
|
|
|
<uni-forms ref="formRef" labelWidth="200">
|
|
<uni-forms ref="formRef" labelWidth="200">
|
|
|
<uni-forms-item v-if="isFormApplyIb" :label="t('Ib.Custom.Manage3')+':'" prop="customerId">
|
|
<uni-forms-item v-if="isFormApplyIb" :label="t('Ib.Custom.Manage3')+':'" prop="customerId">
|
|
|
<cwg-combox v-model:value="addAgentForm.customerId" :options="customerList"
|
|
<cwg-combox v-model:value="addAgentForm.customerId" :options="customerList"
|
|
|
- :placeholder="t('placeholder.choose')" filterable @change="changeCustomer" />
|
|
|
|
|
|
|
+ :placeholder="t('placeholder.choose')" filterable @change="changeCustomer" style="max-width: 280px" />
|
|
|
</uni-forms-item>
|
|
</uni-forms-item>
|
|
|
<uni-loading v-if="laoding"/>
|
|
<uni-loading v-if="laoding"/>
|
|
|
- <view v-else class="commission-groups">
|
|
|
|
|
- <view v-for="(group, gIndex) in commissionTemplateTableData" :key="gIndex" class="group-card">
|
|
|
|
|
- <!-- 头部开关和标题 -->
|
|
|
|
|
- <view class="group-header" @click="toggleGroup(group)">
|
|
|
|
|
- <view class="group-title">
|
|
|
|
|
- <text class="title-text">{{ group.accountGroup }}</text>
|
|
|
|
|
- </view>
|
|
|
|
|
- <view class="group-switch" @click.stop>
|
|
|
|
|
- <switch :checked="group.isOpen" @change="(e) => onGroupSwitchChange(e, group)" color="#2b5aed"
|
|
|
|
|
- style="transform:scale(0.8)" />
|
|
|
|
|
- </view>
|
|
|
|
|
- </view>
|
|
|
|
|
-
|
|
|
|
|
- <!-- 展开的内容区 -->
|
|
|
|
|
- <view v-show="group.isOpen" class="group-body">
|
|
|
|
|
- <view v-for="(item, iIndex) in group.items" :key="iIndex" class="item-row">
|
|
|
|
|
- <view class="item-title">
|
|
|
|
|
- <!-- <text class="type-badge">{{ item.dataType === 'rebates' ? 'Rebates' : 'Commissions' }}</text>-->
|
|
|
|
|
- <text class="type-text">{{ item.type }}</text>
|
|
|
|
|
- </view>
|
|
|
|
|
-
|
|
|
|
|
- <view class="item-fields">
|
|
|
|
|
- <!-- METAL -->
|
|
|
|
|
- <view class="field-col">
|
|
|
|
|
- <text class="field-label">METAL</text>
|
|
|
|
|
- <cwg-combox
|
|
|
|
|
- v-model:value="item.energy"
|
|
|
|
|
- :options="formatOptions(item.energyOptions)"
|
|
|
|
|
- :placeholder="t('placeholder.choose')"
|
|
|
|
|
- />
|
|
|
|
|
- </view>
|
|
|
|
|
-
|
|
|
|
|
- <!-- FX -->
|
|
|
|
|
- <view class="field-col">
|
|
|
|
|
- <text class="field-label">FX</text>
|
|
|
|
|
- <cwg-combox
|
|
|
|
|
- v-model:value="item.forex"
|
|
|
|
|
- :options="formatOptions(item.forexOptions)"
|
|
|
|
|
- :placeholder="t('placeholder.choose')"
|
|
|
|
|
- />
|
|
|
|
|
- </view>
|
|
|
|
|
-
|
|
|
|
|
- <!-- ENERGY -->
|
|
|
|
|
- <view class="field-col">
|
|
|
|
|
- <text class="field-label">ENERGY</text>
|
|
|
|
|
- <cwg-combox
|
|
|
|
|
- v-model:value="item.energy2"
|
|
|
|
|
- :options="formatOptions(item.energy2Options)"
|
|
|
|
|
- :placeholder="t('placeholder.choose')"
|
|
|
|
|
- />
|
|
|
|
|
- </view>
|
|
|
|
|
-
|
|
|
|
|
- <!-- CFD -->
|
|
|
|
|
- <view class="field-col">
|
|
|
|
|
- <text class="field-label">CFD</text>
|
|
|
|
|
- <cwg-combox
|
|
|
|
|
- v-model:value="item.index"
|
|
|
|
|
- :options="formatOptions(item.indexOptions)"
|
|
|
|
|
- :placeholder="t('placeholder.choose')"
|
|
|
|
|
- />
|
|
|
|
|
- </view>
|
|
|
|
|
-
|
|
|
|
|
- <!-- INDEX -->
|
|
|
|
|
- <view class="field-col">
|
|
|
|
|
- <text class="field-label">INDEX</text>
|
|
|
|
|
- <cwg-combox
|
|
|
|
|
- v-model:value="item.metal"
|
|
|
|
|
- :options="formatOptions(item.metalOptions)"
|
|
|
|
|
- :placeholder="t('placeholder.choose')"
|
|
|
|
|
- />
|
|
|
|
|
- </view>
|
|
|
|
|
- </view>
|
|
|
|
|
- </view>
|
|
|
|
|
- </view>
|
|
|
|
|
- </view>
|
|
|
|
|
|
|
+ <view v-else class="commission-table-container">
|
|
|
|
|
+ <table class="commission-table">
|
|
|
|
|
+ <thead>
|
|
|
|
|
+ <tr>
|
|
|
|
|
+ <th style="width: 80px;">{{ t('Ib.Custom.Status') }}</th>
|
|
|
|
|
+ <th style="width: 100px;"></th>
|
|
|
|
|
+ <th style="width: 100px;"></th>
|
|
|
|
|
+ <th style="width: 80px;">METAL</th>
|
|
|
|
|
+ <th>FX</th>
|
|
|
|
|
+ <th>ENERGY</th>
|
|
|
|
|
+ <th>CFD</th>
|
|
|
|
|
+ <th>INDEX</th>
|
|
|
|
|
+ </tr>
|
|
|
|
|
+ </thead>
|
|
|
|
|
+ <tbody v-for="(group, gIndex) in commissionTemplateTableData" :key="gIndex">
|
|
|
|
|
+ <tr v-for="(item, iIndex) in group.items" :key="iIndex">
|
|
|
|
|
+ <td v-if="iIndex === 0" :rowspan="group.items.length" class="center-td">
|
|
|
|
|
+ <switch :checked="group.isOpen" @change="(e) => onGroupSwitchChange(e, group)" color="#2b5aed"
|
|
|
|
|
+ style="transform:scale(0.8)" />
|
|
|
|
|
+ </td>
|
|
|
|
|
+ <td v-if="iIndex === 0" :rowspan="group.items.length" class="center-td group-name-td">
|
|
|
|
|
+ {{ group.accountGroup }}
|
|
|
|
|
+ </td>
|
|
|
|
|
+ <td class="center-td type-td">
|
|
|
|
|
+ {{ item.type }}
|
|
|
|
|
+ </td>
|
|
|
|
|
+ <td style="width: 80px;">
|
|
|
|
|
+ <cwg-combox
|
|
|
|
|
+ v-model:value="item.energy"
|
|
|
|
|
+ :options="formatOptions(item.energyOptions)"
|
|
|
|
|
+ :placeholder="t('placeholder.choose')"
|
|
|
|
|
+ />
|
|
|
|
|
+ </td>
|
|
|
|
|
+ <td>
|
|
|
|
|
+ <cwg-combox
|
|
|
|
|
+ v-model:value="item.forex"
|
|
|
|
|
+ :options="formatOptions(item.forexOptions)"
|
|
|
|
|
+ :placeholder="t('placeholder.choose')"
|
|
|
|
|
+ />
|
|
|
|
|
+ </td>
|
|
|
|
|
+ <td>
|
|
|
|
|
+ <cwg-combox
|
|
|
|
|
+ v-model:value="item.energy2"
|
|
|
|
|
+ :options="formatOptions(item.energy2Options)"
|
|
|
|
|
+ :placeholder="t('placeholder.choose')"
|
|
|
|
|
+ />
|
|
|
|
|
+ </td>
|
|
|
|
|
+ <td>
|
|
|
|
|
+ <cwg-combox
|
|
|
|
|
+ v-model:value="item.index"
|
|
|
|
|
+ :options="formatOptions(item.indexOptions)"
|
|
|
|
|
+ :placeholder="t('placeholder.choose')"
|
|
|
|
|
+ />
|
|
|
|
|
+ </td>
|
|
|
|
|
+ <td>
|
|
|
|
|
+ <cwg-combox
|
|
|
|
|
+ v-model:value="item.metal"
|
|
|
|
|
+ :options="formatOptions(item.metalOptions)"
|
|
|
|
|
+ :placeholder="t('placeholder.choose')"
|
|
|
|
|
+ />
|
|
|
|
|
+ </td>
|
|
|
|
|
+ </tr>
|
|
|
|
|
+ </tbody>
|
|
|
|
|
+ </table>
|
|
|
</view>
|
|
</view>
|
|
|
</uni-forms>
|
|
</uni-forms>
|
|
|
</view>
|
|
</view>
|
|
@@ -521,90 +510,57 @@
|
|
|
<style lang="scss" scoped>
|
|
<style lang="scss" scoped>
|
|
|
@import "@/uni.scss";
|
|
@import "@/uni.scss";
|
|
|
|
|
|
|
|
- .commission-groups {
|
|
|
|
|
|
|
+ .commission-table-container {
|
|
|
margin-top: px2rpx(10);
|
|
margin-top: px2rpx(10);
|
|
|
padding-bottom: px2rpx(150); /* 预留底部空间,防止最下面的下拉框被截断或遮挡 */
|
|
padding-bottom: px2rpx(150); /* 预留底部空间,防止最下面的下拉框被截断或遮挡 */
|
|
|
|
|
+ width: 100%;
|
|
|
|
|
+ overflow-x: auto;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- .group-card {
|
|
|
|
|
- border: 1px solid #ebeef5;
|
|
|
|
|
- border-radius: px2rpx(6);
|
|
|
|
|
- margin-bottom: px2rpx(15);
|
|
|
|
|
- background-color: #fff;
|
|
|
|
|
- /* overflow: hidden; 移除此属性,防止下拉框被遮挡截断 */
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- .group-header {
|
|
|
|
|
- display: flex;
|
|
|
|
|
- justify-content: space-between;
|
|
|
|
|
- align-items: center;
|
|
|
|
|
- padding: px2rpx(10) px2rpx(15);
|
|
|
|
|
- background-color: #f5f7fa;
|
|
|
|
|
- border-bottom: 1px solid #ebeef5;
|
|
|
|
|
- border-top-left-radius: px2rpx(6);
|
|
|
|
|
- border-top-right-radius: px2rpx(6);
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- .group-title {
|
|
|
|
|
|
|
+ .commission-table {
|
|
|
|
|
+ width: 100%;
|
|
|
|
|
+ border-collapse: collapse;
|
|
|
|
|
+ border-spacing: 0;
|
|
|
font-size: px2rpx(14);
|
|
font-size: px2rpx(14);
|
|
|
- font-weight: bold;
|
|
|
|
|
- color: #303133;
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ color: #606266;
|
|
|
|
|
+ border: 1px solid #ebeef5;
|
|
|
|
|
|
|
|
- .group-body {
|
|
|
|
|
- padding: px2rpx(15);
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ thead {
|
|
|
|
|
+ background-color: #f5f7fa;
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
- .item-row {
|
|
|
|
|
- margin-bottom: px2rpx(15);
|
|
|
|
|
- padding-bottom: px2rpx(15);
|
|
|
|
|
- border-bottom: 1px dashed #ebeef5;
|
|
|
|
|
|
|
+ th {
|
|
|
|
|
+ padding: px2rpx(12) px2rpx(10);
|
|
|
|
|
+ text-align: center;
|
|
|
|
|
+ font-weight: bold;
|
|
|
|
|
+ color: #909399;
|
|
|
|
|
+ border: 1px solid #ebeef5;
|
|
|
|
|
+ font-size: px2rpx(13);
|
|
|
|
|
+ white-space: nowrap;
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
- &:last-child {
|
|
|
|
|
- margin-bottom: 0;
|
|
|
|
|
- padding-bottom: 0;
|
|
|
|
|
- border-bottom: none;
|
|
|
|
|
|
|
+ td {
|
|
|
|
|
+ padding: px2rpx(8) px2rpx(10);
|
|
|
|
|
+ border: 1px solid #ebeef5;
|
|
|
|
|
+ vertical-align: middle;
|
|
|
}
|
|
}
|
|
|
- }
|
|
|
|
|
|
|
|
|
|
- .item-title {
|
|
|
|
|
- margin-bottom: px2rpx(10);
|
|
|
|
|
- display: flex;
|
|
|
|
|
- align-items: center;
|
|
|
|
|
|
|
+ .center-td {
|
|
|
|
|
+ text-align: center;
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
- .type-badge {
|
|
|
|
|
- background-color: #e1f3d8;
|
|
|
|
|
- color: #67c23a;
|
|
|
|
|
- padding: px2rpx(2) px2rpx(8);
|
|
|
|
|
- border-radius: px2rpx(4);
|
|
|
|
|
- font-size: px2rpx(12);
|
|
|
|
|
- margin-right: px2rpx(8);
|
|
|
|
|
|
|
+ .group-name-td {
|
|
|
|
|
+ color: #303133;
|
|
|
|
|
+ font-weight: 500;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- .type-text {
|
|
|
|
|
- font-size: px2rpx(13);
|
|
|
|
|
|
|
+ .type-td {
|
|
|
color: #606266;
|
|
color: #606266;
|
|
|
}
|
|
}
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- .item-fields {
|
|
|
|
|
- display: flex;
|
|
|
|
|
- flex-wrap: wrap;
|
|
|
|
|
- gap: px2rpx(10);
|
|
|
|
|
- justify-content: flex-start;
|
|
|
|
|
- }
|
|
|
|
|
|
|
|
|
|
- .field-col {
|
|
|
|
|
- flex: 0 0 calc( 20% - px2rpx(10) );
|
|
|
|
|
- min-width: px2rpx(80);
|
|
|
|
|
- max-width: px2rpx(120);
|
|
|
|
|
- display: flex;
|
|
|
|
|
- flex-direction: column;
|
|
|
|
|
-
|
|
|
|
|
- .field-label {
|
|
|
|
|
- font-size: px2rpx(12);
|
|
|
|
|
- color: #909399;
|
|
|
|
|
- margin-bottom: px2rpx(5);
|
|
|
|
|
|
|
+ :deep(.cwg-combox) {
|
|
|
|
|
+ width: 100%;
|
|
|
|
|
+ min-width: px2rpx(80);
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|