WIP
parent
99f7ca84ba
commit
232c0db983
|
|
@ -49,10 +49,10 @@ class Distribution extends Form
|
|||
->value($appSettings['price_diff_fee_rate'] ?? 0)
|
||||
->rules('required|int|min:0|max:100')
|
||||
->saving(function ($value) {
|
||||
return $value/100;
|
||||
return bcdiv($value, 100);
|
||||
})
|
||||
->customFormat(function ($value) {
|
||||
return $value*100;
|
||||
return bcmul($value, 100);
|
||||
});
|
||||
|
||||
$this->text('lvl_same_bonus_fee_rate', '平级奖励手续费')
|
||||
|
|
@ -60,10 +60,10 @@ class Distribution extends Form
|
|||
->value($appSettings['lvl_same_bonus_fee_rate'] ?? 0)
|
||||
->rules('required|int|min:0|max:100')
|
||||
->saving(function ($value) {
|
||||
return $value/100;
|
||||
return bcdiv($value, 100);
|
||||
})
|
||||
->customFormat(function ($value) {
|
||||
return $value*100;
|
||||
return bcmul($value, 100);
|
||||
});
|
||||
|
||||
$this->text('lvl_diff_bonus_fee_rate', '级差奖励手续费')
|
||||
|
|
@ -71,10 +71,10 @@ class Distribution extends Form
|
|||
->value($appSettings['lvl_diff_bonus_fee_rate'] ?? 0)
|
||||
->rules('required|int|min:0|max:100')
|
||||
->saving(function ($value) {
|
||||
return $value/100;
|
||||
return bcdiv($value, 100);
|
||||
})
|
||||
->customFormat(function ($value) {
|
||||
return $value*100;
|
||||
return bcmul($value, 100);
|
||||
});
|
||||
|
||||
$this->text('quota_v2_rate', '获得配额比例')
|
||||
|
|
@ -82,10 +82,10 @@ class Distribution extends Form
|
|||
->value($appSettings['quota_v2_rate'] ?? 0)
|
||||
->rules('required|int|min:0|max:100')
|
||||
->saving(function ($value) {
|
||||
return $value/100;
|
||||
return bcdiv($value, 100);
|
||||
})
|
||||
->customFormat(function ($value) {
|
||||
return $value*100;
|
||||
return bcmul($value, 100);
|
||||
});
|
||||
|
||||
// $this->divider();
|
||||
|
|
@ -97,20 +97,20 @@ class Distribution extends Form
|
|||
->prepend('%')
|
||||
->rules('required|int|min:0|max:100')
|
||||
->saving(function ($value) {
|
||||
return $value/100;
|
||||
return bcdiv($value, 100);
|
||||
})
|
||||
->customFormat(function ($value) {
|
||||
return $value*100;
|
||||
return bcmul($value, 100);
|
||||
});
|
||||
|
||||
$table->text('lvl_diff_bonus_rate', '级差奖励比例')
|
||||
->prepend('%')
|
||||
->rules('required|int|min:0|max:100')
|
||||
->saving(function ($value) {
|
||||
return $value/100;
|
||||
return bcdiv($value, 100);
|
||||
})
|
||||
->customFormat(function ($value) {
|
||||
return $value*100;
|
||||
return bcmul($value, 100);
|
||||
});
|
||||
})->customFormat(function ($v) use ($appSettings) {
|
||||
$_rules = $appSettings['rules'] ?? [];
|
||||
|
|
|
|||
Loading…
Reference in New Issue