|
@@ -25,6 +25,9 @@ class InquiryAssignment extends Form
|
|
|
if (DistInquiry::assessTheStatus($ids) == false) {
|
|
|
return $this->response()->error('The data cannot be assigned!');
|
|
|
}
|
|
|
+ if (empty($distId)) {
|
|
|
+ return $this->response()->error('No distributor selected!');
|
|
|
+ }
|
|
|
//分配数据
|
|
|
DistInquiry::assignData($ids, $distId);
|
|
|
return $this->response()->success(admin_trans_label('update_success'))->refresh();
|
|
@@ -32,10 +35,12 @@ class InquiryAssignment extends Form
|
|
|
|
|
|
public function form()
|
|
|
{
|
|
|
- $this->selectTable('distId', admin_trans_label('select_distributor'))
|
|
|
- ->title(admin_trans_label('select_distributor'))
|
|
|
- ->model(DistAdminDistributor::class, 'id', 'client_code')
|
|
|
- ->from(DistDistributorTable::make());
|
|
|
+// $this->selectTable('distId', admin_trans_label('select_distributor'))
|
|
|
+// ->title(admin_trans_label('select_distributor'))
|
|
|
+// ->model(DistAdminDistributor::class, 'id', 'client_code')
|
|
|
+// ->from(DistDistributorTable::make());
|
|
|
+
|
|
|
+ $this->select('distId',admin_trans_label('select_distributor'))->options('/api/dist')->required();
|
|
|
// 设置隐藏表单,传递用户id
|
|
|
$this->hidden('id')->attribute('id', 'inquiryIds');
|
|
|
}
|