优化客户管理客户组等
This commit is contained in:
parent
abd7a3afc9
commit
c76a81cdda
|
|
@ -12,6 +12,7 @@
|
|||
namespace Beike\Admin\Http\Controllers;
|
||||
|
||||
use Beike\Admin\Http\Requests\CustomerGroupRequest;
|
||||
use Beike\Admin\Http\Resources\CustomerGroupDetail;
|
||||
use Beike\Admin\Services\CustomerGroupService;
|
||||
use Beike\Repositories\CustomerGroupRepo;
|
||||
use Beike\Repositories\LanguageRepo;
|
||||
|
|
|
|||
|
|
@ -23,6 +23,7 @@ class CustomerGroupDetail extends JsonResource
|
|||
'discount_factor' => $this->discount_factor,
|
||||
'level' => $this->level,
|
||||
'name' => $this->description->name ?? '',
|
||||
'description' => $this->description->description ?? '',
|
||||
];
|
||||
|
||||
return $data;
|
||||
|
|
|
|||
|
|
@ -25,8 +25,8 @@
|
|||
<tbody>
|
||||
<tr v-for="group, index in customer_groups" :key="index">
|
||||
<td>@{{ group.id }}</td>
|
||||
<td>@{{ group.description.name }}</td>
|
||||
<td>@{{ group.description.description }}</td>
|
||||
<td>@{{ group.description?.name || '' }}</td>
|
||||
<td>@{{ group.description?.description || '' }}</td>
|
||||
<td>@{{ group.level }}</td>
|
||||
<td>@{{ group.total }}</td>
|
||||
<td>@{{ group.discount_factor }}</td>
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@
|
|||
</el-form-item>
|
||||
<el-form-item label="用户组">
|
||||
<el-select v-model="form.customer_group_id" placeholder="请选择">
|
||||
<el-option v-for="item in source.customer_group" :key="item.id" :label="item.description.name"
|
||||
<el-option v-for="item in source.customer_group" :key="item.id" :label="item.name"
|
||||
:value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@
|
|||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="customer, index in customers" :key="index">
|
||||
<tr v-for="customer, index in customers.data" :key="index">
|
||||
<td>@{{ customer.id }}</td>
|
||||
<td>@{{ customer.email }}</td>
|
||||
<td>
|
||||
|
|
@ -42,7 +42,7 @@
|
|||
</tbody>
|
||||
</table>
|
||||
|
||||
{{ $customers->links('admin::vendor/pagination/bootstrap-4') }}
|
||||
{{-- {{ $customers->links('admin::vendor/pagination/bootstrap-4') }} --}}
|
||||
</div>
|
||||
|
||||
<el-dialog title="创建顾客" :visible.sync="dialogCustomers.show" width="600px"
|
||||
|
|
@ -59,7 +59,7 @@
|
|||
</el-form-item>
|
||||
<el-form-item label="用户组">
|
||||
<el-select v-model="dialogCustomers.form.customer_group_id" placeholder="请选择">
|
||||
<el-option v-for="item in source.customer_group" :key="item.id" :label="item.description.name"
|
||||
<el-option v-for="item in source.customer_group" :key="item.id" :label="item.name"
|
||||
:value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
|
|
|
|||
Loading…
Reference in New Issue