分销配置
parent
2655a2eec0
commit
eaa3bd791e
|
|
@ -39,17 +39,78 @@ class Distribution extends Form
|
||||||
|
|
||||||
// dd(config('distribution'), app_settings('distribution'));
|
// dd(config('distribution'), app_settings('distribution'));
|
||||||
|
|
||||||
$this->number('settle_days', '订单结算时间(天)')->value($appSettings['settle_days'] ?? 0)->help('订单完成后,隔多少天可以结算');
|
$this->text('settle_days', '订单结算时间(天)')
|
||||||
$this->currency('price_diff_fee_rate', '会员差价手续费')->value($appSettings['price_diff_fee_rate'] ?? 0)->symbol('%');
|
->value($appSettings['settle_days'] ?? 0)
|
||||||
$this->currency('lvl_same_bonus_fee_rate', '平级奖励手续费')->value($appSettings['lvl_same_bonus_fee_rate'] ?? 0)->symbol('%');
|
->rules('required|numeric|min:0');
|
||||||
$this->currency('lvl_diff_bonus_fee_rate', '级差奖励手续费')->value($appSettings['lvl_diff_bonus_fee_rate'] ?? 0)->symbol('%');
|
|
||||||
|
$this->text('price_diff_fee_rate', '会员差价手续费')
|
||||||
|
->prepend('%')
|
||||||
|
->value($appSettings['price_diff_fee_rate'] ?? 0)
|
||||||
|
->rules('required|int|min:0|max:100')
|
||||||
|
->saving(function ($value) {
|
||||||
|
return $value/100;
|
||||||
|
})
|
||||||
|
->customFormat(function ($value) {
|
||||||
|
return $value*100;
|
||||||
|
});
|
||||||
|
|
||||||
|
$this->text('lvl_same_bonus_fee_rate', '平级奖励手续费')
|
||||||
|
->prepend('%')
|
||||||
|
->value($appSettings['lvl_same_bonus_fee_rate'] ?? 0)
|
||||||
|
->rules('required|int|min:0|max:100')
|
||||||
|
->saving(function ($value) {
|
||||||
|
return $value/100;
|
||||||
|
})
|
||||||
|
->customFormat(function ($value) {
|
||||||
|
return $value*100;
|
||||||
|
});
|
||||||
|
|
||||||
|
$this->text('lvl_diff_bonus_fee_rate', '级差奖励手续费')
|
||||||
|
->prepend('%')
|
||||||
|
->value($appSettings['lvl_diff_bonus_fee_rate'] ?? 0)
|
||||||
|
->rules('required|int|min:0|max:100')
|
||||||
|
->saving(function ($value) {
|
||||||
|
return $value/100;
|
||||||
|
})
|
||||||
|
->customFormat(function ($value) {
|
||||||
|
return $value*100;
|
||||||
|
});
|
||||||
|
|
||||||
|
$this->text('quota_v2_rate', '获得配额比例')
|
||||||
|
->prepend('%')
|
||||||
|
->value($appSettings['quota_v2_rate'] ?? 0)
|
||||||
|
->rules('required|int|min:0|max:100')
|
||||||
|
->saving(function ($value) {
|
||||||
|
return $value/100;
|
||||||
|
})
|
||||||
|
->customFormat(function ($value) {
|
||||||
|
return $value*100;
|
||||||
|
});
|
||||||
|
|
||||||
// $this->divider();
|
// $this->divider();
|
||||||
$this->table('rules', '规则', function ($table) {
|
$this->table('rules', '规则', function ($table) {
|
||||||
$table->hidden('lv_key');
|
$table->hidden('lv_key');
|
||||||
$table->text('lv_name_show', '等级名称')->disable();
|
$table->text('lv_name_show', '等级名称')->disable();
|
||||||
$table->hidden('lv_name');
|
$table->hidden('lv_name');
|
||||||
$table->currency('lvl_same_bonus_rate', '平级奖励比例')->symbol('%');
|
$table->text('lvl_same_bonus_rate', '平级奖励比例')
|
||||||
$table->currency('lvl_diff_bonus_rate', '级差奖励比例')->symbol('%');
|
->prepend('%')
|
||||||
|
->rules('required|int|min:0|max:100')
|
||||||
|
->saving(function ($value) {
|
||||||
|
return $value/100;
|
||||||
|
})
|
||||||
|
->customFormat(function ($value) {
|
||||||
|
return $value*100;
|
||||||
|
});
|
||||||
|
|
||||||
|
$table->text('lvl_diff_bonus_rate', '级差奖励比例')
|
||||||
|
->prepend('%')
|
||||||
|
->rules('required|int|min:0|max:100')
|
||||||
|
->saving(function ($value) {
|
||||||
|
return $value/100;
|
||||||
|
})
|
||||||
|
->customFormat(function ($value) {
|
||||||
|
return $value*100;
|
||||||
|
});
|
||||||
})->customFormat(function ($v) use ($appSettings) {
|
})->customFormat(function ($v) use ($appSettings) {
|
||||||
$_rules = $appSettings['rules'] ?? [];
|
$_rules = $appSettings['rules'] ?? [];
|
||||||
if ($_rules) {
|
if ($_rules) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue