调整接口
parent
b122202479
commit
daa4d7f55f
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
namespace App\Admin\Forms\Settings;
|
||||
|
||||
use App\Enums\DealerLvl;
|
||||
use App\Models\Setting;
|
||||
use App\Services\SettingService;
|
||||
use Carbon\Carbon;
|
||||
|
|
@ -37,6 +38,9 @@ class Dealer extends Form
|
|||
public function form()
|
||||
{
|
||||
$this->currency('fee_rate', '手续费比例(百分比)')->symbol('%');
|
||||
$this->currency('upgrade_amount_'.DealerLvl::Contracted->value, '签约门槛')->symbol('¥');
|
||||
$this->currency('upgrade_amount_'.DealerLvl::Special->value, '特邀门槛')->symbol('¥');
|
||||
$this->currency('upgrade_amount_'.DealerLvl::Gold->value, '金牌门槛')->symbol('¥');
|
||||
$this->table('purchase_rules', '进货补贴规则', function ($table) {
|
||||
$table->number('price', '阶梯(万)');
|
||||
$table->currency('rate', '比例(百分比)')->symbol('%');
|
||||
|
|
@ -80,6 +84,9 @@ class Dealer extends Form
|
|||
$dealerSettings = (array) Setting::where('key', 'dealer')->value('value');
|
||||
return [
|
||||
'fee_rate'=>$dealerSettings['fee_rate'] ?? '',
|
||||
'upgrade_amount_'.DealerLvl::Contracted->value => $dealerSettings['upgrade_amount_'.DealerLvl::Contracted->value],
|
||||
'upgrade_amount_'.DealerLvl::Special->value => $dealerSettings['upgrade_amount_'.DealerLvl::Special->value],
|
||||
'upgrade_amount_'.DealerLvl::Gold->value => $dealerSettings['upgrade_amount_'.DealerLvl::Gold->value],
|
||||
'bank'=>$dealerSettings['bank'] ?? [],
|
||||
'alipay'=>$dealerSettings['alipay'] ?? [],
|
||||
'wechat' =>$dealerSettings['wechat'] ?? [],
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ class DealerResource extends JsonResource
|
|||
'lvl_name'=> $this->lvl_text,
|
||||
'sale_values'=> '0.00', //todo-当前团队业绩
|
||||
'guanli_values'=> '0.00', //todo-预计管理津贴
|
||||
'pay_info'=>$this->pay_info??null,
|
||||
'pay_info'=>$this->pay_info ?: null,
|
||||
];
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ class OrderResource extends JsonResource
|
|||
'total_amount' => $this->total_amount,
|
||||
'created_at' => $this->created_at->toDateTimeString(),
|
||||
'status' => $this->status,
|
||||
'pay_info' => $this->getConsignorPayInfo()??null,
|
||||
'pay_info' => $this->getConsignorPayInfo(),
|
||||
'pay_image'=> $this->pay_image,
|
||||
'is_consignor' => $request->user()->id == $this->consignor_id, //是否发货人身份
|
||||
'consignee_name'=>$this->consignee_name,
|
||||
|
|
|
|||
|
|
@ -230,6 +230,6 @@ class DealerOrder extends Model
|
|||
} else {
|
||||
$payInfo = $this->pay_info;
|
||||
}
|
||||
return $payInfo;
|
||||
return $payInfo ?: null;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue