|
@@ -2,73 +2,64 @@
|
|
|
<cwg-popup :title="t(title)" :visible="visible" @close="closeDia" @confirm="confirmDia" :width="'900px'">
|
|
<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" style="max-width: 280px" />
|
|
|
|
|
|
|
+ :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-table-container" v-if="addAgentForm.customerId">
|
|
<view v-else class="commission-table-container" v-if="addAgentForm.customerId">
|
|
|
<table class="commission-table">
|
|
<table class="commission-table">
|
|
|
<thead>
|
|
<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>
|
|
|
|
|
|
|
+ <tr>
|
|
|
|
|
+ <th style="width: 60px;">{{ t('Ib.Custom.Status') }}</th>
|
|
|
|
|
+ <th style="width: 135px;"></th>
|
|
|
|
|
+ <th style="width: 100px;"></th>
|
|
|
|
|
+ <th style="width: 80px;">METAL</th>
|
|
|
|
|
+ <th>FX</th>
|
|
|
|
|
+ <th>ENERGY</th>
|
|
|
|
|
+ <th>CFD</th>
|
|
|
|
|
+ <th>INDEX</th>
|
|
|
|
|
+ <th>CRYPTO</th>
|
|
|
|
|
+ </tr>
|
|
|
</thead>
|
|
</thead>
|
|
|
<tbody v-for="(group, gIndex) in commissionTemplateTableData" :key="gIndex">
|
|
<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>
|
|
|
|
|
|
|
+ <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.7)" />
|
|
|
|
|
+ </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: 75px;">
|
|
|
|
|
+ <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>
|
|
|
|
|
+ <td>
|
|
|
|
|
+ <cwg-combox v-model:value="item.crypto" :options="formatOptions(item.cryptoOptions)"
|
|
|
|
|
+ :placeholder="t('placeholder.choose')" />
|
|
|
|
|
+ </td>
|
|
|
|
|
+ </tr>
|
|
|
</tbody>
|
|
</tbody>
|
|
|
</table>
|
|
</table>
|
|
|
</view>
|
|
</view>
|
|
@@ -145,6 +136,9 @@
|
|
|
let params = {
|
|
let params = {
|
|
|
customId: props.detail.id,
|
|
customId: props.detail.id,
|
|
|
}
|
|
}
|
|
|
|
|
+ addAgentForm.value = {
|
|
|
|
|
+ customerId: props.detail.id,
|
|
|
|
|
+ }
|
|
|
if (props.paramsType == 'vietnam') {
|
|
if (props.paramsType == 'vietnam') {
|
|
|
params = {
|
|
params = {
|
|
|
agentId: props.detail.id,
|
|
agentId: props.detail.id,
|
|
@@ -229,6 +223,8 @@
|
|
|
index1: 0,
|
|
index1: 0,
|
|
|
metal1: 0,
|
|
metal1: 0,
|
|
|
energy1: 0,
|
|
energy1: 0,
|
|
|
|
|
+ crypto: 0,
|
|
|
|
|
+ crypto1: 0,
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
rebates.forEach((rebate: any) => {
|
|
rebates.forEach((rebate: any) => {
|
|
@@ -237,6 +233,7 @@
|
|
|
else if (rebate.symbolCategory === 3) rebateRow.metal = rebate.point || 0
|
|
else if (rebate.symbolCategory === 3) rebateRow.metal = rebate.point || 0
|
|
|
else if (rebate.symbolCategory === 4) rebateRow.energy = rebate.point || 0
|
|
else if (rebate.symbolCategory === 4) rebateRow.energy = rebate.point || 0
|
|
|
else if (rebate.symbolCategory === 5) rebateRow.energy2 = rebate.point || 0
|
|
else if (rebate.symbolCategory === 5) rebateRow.energy2 = rebate.point || 0
|
|
|
|
|
+ else if (rebate.symbolCategory === 6) rebateRow.crypto = rebate.point || 0
|
|
|
})
|
|
})
|
|
|
|
|
|
|
|
superRebates.forEach((rebate: any) => {
|
|
superRebates.forEach((rebate: any) => {
|
|
@@ -245,6 +242,7 @@
|
|
|
else if (rebate.symbolCategory === 3) rebateRow.metal1 = rebate.point || 0
|
|
else if (rebate.symbolCategory === 3) rebateRow.metal1 = rebate.point || 0
|
|
|
else if (rebate.symbolCategory === 4) rebateRow.energy1 = rebate.point || 0
|
|
else if (rebate.symbolCategory === 4) rebateRow.energy1 = rebate.point || 0
|
|
|
else if (rebate.symbolCategory === 5) rebateRow.energy2Max = rebate.point || 0
|
|
else if (rebate.symbolCategory === 5) rebateRow.energy2Max = rebate.point || 0
|
|
|
|
|
+ else if (rebate.symbolCategory === 6) rebateRow.crypto1 = rebate.point || 0
|
|
|
})
|
|
})
|
|
|
|
|
|
|
|
rebateRow.forexOptions = generateOptions(rebateRow.forex1)
|
|
rebateRow.forexOptions = generateOptions(rebateRow.forex1)
|
|
@@ -252,6 +250,7 @@
|
|
|
rebateRow.metalOptions = generateOptions(rebateRow.metal1)
|
|
rebateRow.metalOptions = generateOptions(rebateRow.metal1)
|
|
|
rebateRow.energyOptions = generateOptions(rebateRow.energy1)
|
|
rebateRow.energyOptions = generateOptions(rebateRow.energy1)
|
|
|
rebateRow.energy2Options = generateOptions(rebateRow.energy2Max)
|
|
rebateRow.energy2Options = generateOptions(rebateRow.energy2Max)
|
|
|
|
|
+ rebateRow.cryptoOptions = generateOptions(rebateRow.crypto1)
|
|
|
|
|
|
|
|
groupedData[accountGroup].push(rebateRow)
|
|
groupedData[accountGroup].push(rebateRow)
|
|
|
}
|
|
}
|
|
@@ -275,6 +274,8 @@
|
|
|
index1: 0,
|
|
index1: 0,
|
|
|
metal1: 0,
|
|
metal1: 0,
|
|
|
energy1: 0,
|
|
energy1: 0,
|
|
|
|
|
+ crypto: 0,
|
|
|
|
|
+ crypto1: 0,
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
commissions.forEach((comm: any) => {
|
|
commissions.forEach((comm: any) => {
|
|
@@ -283,6 +284,7 @@
|
|
|
else if (comm.symbolCategory === 3) commissionRow.metal = comm.point || 0
|
|
else if (comm.symbolCategory === 3) commissionRow.metal = comm.point || 0
|
|
|
else if (comm.symbolCategory === 4) commissionRow.energy = comm.point || 0
|
|
else if (comm.symbolCategory === 4) commissionRow.energy = comm.point || 0
|
|
|
else if (comm.symbolCategory === 5) commissionRow.energy2 = comm.point || 0
|
|
else if (comm.symbolCategory === 5) commissionRow.energy2 = comm.point || 0
|
|
|
|
|
+ else if (comm.symbolCategory === 6) commissionRow.crypto = comm.point || 0
|
|
|
})
|
|
})
|
|
|
|
|
|
|
|
superCommissions.forEach((comm: any) => {
|
|
superCommissions.forEach((comm: any) => {
|
|
@@ -291,6 +293,7 @@
|
|
|
else if (comm.symbolCategory === 3) commissionRow.metal1 = comm.point || 0
|
|
else if (comm.symbolCategory === 3) commissionRow.metal1 = comm.point || 0
|
|
|
else if (comm.symbolCategory === 4) commissionRow.energy1 = comm.point || 0
|
|
else if (comm.symbolCategory === 4) commissionRow.energy1 = comm.point || 0
|
|
|
else if (comm.symbolCategory === 5) commissionRow.energy2Max = comm.point || 0
|
|
else if (comm.symbolCategory === 5) commissionRow.energy2Max = comm.point || 0
|
|
|
|
|
+ else if (comm.symbolCategory === 6) commissionRow.crypto1 = comm.point || 0
|
|
|
})
|
|
})
|
|
|
|
|
|
|
|
commissionRow.forexOptions = generateOptions(commissionRow.forex1)
|
|
commissionRow.forexOptions = generateOptions(commissionRow.forex1)
|
|
@@ -298,6 +301,7 @@
|
|
|
commissionRow.metalOptions = generateOptions(commissionRow.metal1)
|
|
commissionRow.metalOptions = generateOptions(commissionRow.metal1)
|
|
|
commissionRow.energyOptions = generateOptions(commissionRow.energy1)
|
|
commissionRow.energyOptions = generateOptions(commissionRow.energy1)
|
|
|
commissionRow.energy2Options = generateOptions(commissionRow.energy2Max)
|
|
commissionRow.energy2Options = generateOptions(commissionRow.energy2Max)
|
|
|
|
|
+ commissionRow.cryptoOptions = generateOptions(commissionRow.crypto1)
|
|
|
|
|
|
|
|
groupedData[accountGroup].push(commissionRow)
|
|
groupedData[accountGroup].push(commissionRow)
|
|
|
}
|
|
}
|
|
@@ -308,7 +312,7 @@
|
|
|
return {
|
|
return {
|
|
|
accountGroup,
|
|
accountGroup,
|
|
|
// 默认不展开
|
|
// 默认不展开
|
|
|
- isOpen:groupedData[accountGroup].some(item => item.isOpen == 1) || false ,
|
|
|
|
|
|
|
+ isOpen: groupedData[accountGroup].some(item => item.isOpen == 1) || false,
|
|
|
items: groupedData[accountGroup],
|
|
items: groupedData[accountGroup],
|
|
|
}
|
|
}
|
|
|
}).filter(item => item.items.length > 0)
|
|
}).filter(item => item.items.length > 0)
|
|
@@ -403,6 +407,9 @@
|
|
|
if (row.energy2 !== undefined && row.energy2 !== null) {
|
|
if (row.energy2 !== undefined && row.energy2 !== null) {
|
|
|
pointList.push({ symbolCategory: 5, point: row.energy2 }) // Energy
|
|
pointList.push({ symbolCategory: 5, point: row.energy2 }) // Energy
|
|
|
}
|
|
}
|
|
|
|
|
+ if (row.crypto !== undefined && row.crypto !== null) {
|
|
|
|
|
+ pointList.push({ symbolCategory: 6, point: row.crypto }) // Crypto
|
|
|
|
|
+ }
|
|
|
})
|
|
})
|
|
|
})
|
|
})
|
|
|
|
|
|
|
@@ -429,7 +436,7 @@
|
|
|
|
|
|
|
|
const closeDia = () => {
|
|
const closeDia = () => {
|
|
|
addAgentForm.value = {
|
|
addAgentForm.value = {
|
|
|
- customerId: ''
|
|
|
|
|
|
|
+ customerId: '',
|
|
|
}
|
|
}
|
|
|
commissionTemplateTableData.value = []
|
|
commissionTemplateTableData.value = []
|
|
|
emit('close')
|
|
emit('close')
|
|
@@ -532,7 +539,7 @@
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
th {
|
|
th {
|
|
|
- padding: px2rpx(12) px2rpx(10);
|
|
|
|
|
|
|
+ padding: px2rpx(12) px2rpx(5);
|
|
|
text-align: center;
|
|
text-align: center;
|
|
|
font-weight: bold;
|
|
font-weight: bold;
|
|
|
color: #909399;
|
|
color: #909399;
|
|
@@ -542,7 +549,7 @@
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
td {
|
|
td {
|
|
|
- padding: px2rpx(8) px2rpx(10);
|
|
|
|
|
|
|
+ padding: px2rpx(8) px2rpx(7);
|
|
|
border: 1px solid #ebeef5;
|
|
border: 1px solid #ebeef5;
|
|
|
vertical-align: middle;
|
|
vertical-align: middle;
|
|
|
}
|
|
}
|
|
@@ -561,8 +568,8 @@
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
:deep(.cwg-combox) {
|
|
:deep(.cwg-combox) {
|
|
|
- width: 100%;
|
|
|
|
|
- min-width: px2rpx(80);
|
|
|
|
|
|
|
+ //width: 100%;
|
|
|
|
|
+ width: px2rpx(60);
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|