提交 0da4fe72 authored 作者: matian's avatar matian

bug fixes

上级 959f9a73
......@@ -54,15 +54,14 @@ export default {
}
} else {
if (this.dealList.service_charge_ratio) {
return (
Math.round(
(JSON.parse(this.dealList.service_charge_ratio)[0].start /
JSON.parse(this.dealList.service_charge_ratio)[0].end) *
10000
) /
100.0 +
'%'
)
console.log(JSON.parse(this.dealList.service_charge_ratio))
if (this.dealList.service_charge_ratio) {
const radio = JSON.parse(this.dealList.service_charge_ratio).map(item => {
item.ratio = '范围从' + item.start + '到' + item.end + '的比例为 ' + item.value + '%'
return item.ratio
})
return radio.toString().replace(/,/g, '<br>')
}
}
}
} else if (this.dealList.service_fee_rules_type === '' || this.dealList.service_fee_rules_type === '0') {
......
......@@ -57,15 +57,15 @@
</tr>
<tr>
<th>首款首次缴费时间</th>
<td colspan="2">{{ firstFirstTime }}</td>
<td colspan="2">{{ dealList.first_first_time }}</td>
<th>首款末次缴费时间</th>
<td colspan="2">{{ firstLastTime }}</td>
<td colspan="2">{{ dealList.first_last_time }}</td>
</tr>
<tr>
<th>尾款首次缴费时间</th>
<td colspan="2">{{ finalFirstTime }}</td>
<td colspan="2">{{ dealList.final_first_time }}</td>
<th>尾款末次缴费时间</th>
<td colspan="2">{{ finalLastTime }}</td>
<td colspan="2">{{ dealList.final_last_time }}</td>
</tr>
</table>
</template>
......
......@@ -11,7 +11,7 @@
</tr>
<tr class="title">
<th>服务费比例</th>
<td>{{ serviceChargeRatio() }}</td>
<td v-html="serviceChargeRatio()"></td>
<th>代理服务费</th>
<td>{{ dealList.secondary_agency_service_fee }}</td>
<th>代理服务费(不含税金额)</th>
......@@ -58,15 +58,11 @@ export default {
}
} else {
if (this.dealList.secondary_service_charge_ratio) {
return (
Math.round(
(JSON.parse(this.dealList.secondary_service_charge_ratio)[0].start /
JSON.parse(this.dealList.secondary_service_charge_ratio)[0].end) *
10000
) /
100.0 +
'%'
)
const radio = JSON.parse(this.dealList.secondary_service_charge_ratio).map(item => {
item.ratio = '范围从' + item.start + '到' + item.end + '的比例为 ' + item.value + '%'
return item.ratio
})
return radio.toString().replace(/,/g, '<br>')
} else if (
this.dealList.secondary_service_fee_rules_type === '' ||
this.dealList.secondary_service_fee_rules_type === '0'
......
......@@ -297,7 +297,34 @@ export default {
{ label: '二级渠道', prop: 'secondary_channel_id_name', align: 'center', minWidth: 100 },
{ label: '二级渠道分成方式', prop: 'secondary_division_type', align: 'center', minWidth: 200 },
{ label: '二级渠道规则', prop: 'secondary_service_fee_rules', align: 'center', minWidth: 100 },
{ label: '二级渠道比例', prop: 'secondary_service_charge_ratio', align: 'center', minWidth: 100 },
{
label: '二级渠道比例',
prop: 'secondary_service_charge_ratio',
align: 'center',
minWidth: 300,
computed({ row }) {
console.log(row)
if (row.secondary_service_fee_rules_type) {
if (row.secondary_service_fee_rules_type === '1' || row.secondary_service_fee_rules_type === '3') {
if (row.secondary_service_charge_ratio) {
return row.secondary_service_charge_ratio + '%'
} else {
return 0 + '%'
}
} else {
if (row.secondary_service_charge_ratio) {
const radio = JSON.parse(row.secondary_service_charge_ratio).map(item => {
item.ratio = '范围从' + item.start + '到' + item.end + '的比例为 ' + item.value + '%'
return item.ratio
})
return radio.toString().replace(/,/g, '<br>')
}
}
} else if (row.secondary_service_fee_rules_type === '' || row.secondary_service_fee_rules_type === '0') {
return row.secondary_service_charge_ratio
}
}
},
{
label: '二级渠道不含税销售金额',
prop: 'secondary_sales_amount_excluding_tax',
......@@ -342,14 +369,11 @@ export default {
}
} else {
if (row.service_charge_ratio) {
return (
Math.round(
(JSON.parse(row.service_charge_ratio)[0].start / JSON.parse(row.service_charge_ratio)[0].end) *
10000
) /
100.0 +
'%'
)
const radio = JSON.parse(row.service_charge_ratio).map(item => {
item.ratio = '范围从' + item.start + '到' + item.end + '的比例为 ' + item.value + '%'
return item.ratio
})
return radio.toString().replace(/,/g, '<br>')
}
}
} else if (row.service_fee_rules_type === '' || row.service_fee_rules_type === '0') {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论