超管后台 - 新增多功能账号显示账号类型

This commit is contained in:
柳清爽
2025-04-25 15:15:56 +08:00
parent 561db965a1
commit 2e0efa227d
4 changed files with 24 additions and 12 deletions

View File

@@ -158,7 +158,7 @@ class CreateCompanyController extends BaseController
]; ];
foreach ($seedCols as $seeds) { foreach ($seedCols as $seeds) {
$this->s2CreateUser(array_merge($params, ArrHelper::getValue('account,username', $seeds))); $this->s2CreateUser (array_merge($params, ArrHelper::getValue('account,username', $seeds)));
$this->ckbCreateUser(array_merge($params, $seeds)); $this->ckbCreateUser(array_merge($params, $seeds));
} }
} }
@@ -172,7 +172,7 @@ class CreateCompanyController extends BaseController
*/ */
protected function ckbCreateUser(array $params): void protected function ckbCreateUser(array $params): void
{ {
$params = ArrHelper::getValue('username,account,password,companyId,s2_accountId,status,phone', $params); $params = ArrHelper::getValue('username,account,password,companyId,s2_accountId,status,phone,isAdmin,typeId', $params);
$params = array_merge($params, [ $params = array_merge($params, [
'passwordLocal' => localEncrypt($params['password']), 'passwordLocal' => localEncrypt($params['password']),

View File

@@ -275,20 +275,20 @@ export default function EditProjectPage({ params }: { params: { id: string } })
<table className="w-full table-fixed"> <table className="w-full table-fixed">
<thead className="bg-muted" style={{ fontFamily: "'Microsoft YaHei', sans-serif" }}> <thead className="bg-muted" style={{ fontFamily: "'Microsoft YaHei', sans-serif" }}>
<tr> <tr>
<th className="text-left p-2 w-[14%]"></th> <th className="text-left p-2 w-[12%]"></th>
<th className="text-left p-2 w-[14%]">IMEI</th> <th className="text-left p-2 w-[22%]">IMEI</th>
<th className="text-left p-2 w-[14%]"></th> <th className="text-left p-2 w-[15%]"></th>
<th className="text-left p-2 w-[14%]"></th> <th className="text-left p-2 w-[12%]"></th>
<th className="text-left p-2 w-[14%]"></th> <th className="text-left p-2 w-[10%]"></th>
<th className="text-left p-2 w-[14%]"></th> <th className="text-left p-2 w-[8%]"></th>
<th className="text-left p-2 w-[14%]"></th> <th className="text-left p-2 w-[13%]"></th>
</tr> </tr>
</thead> </thead>
<tbody className="text-sm" style={{ fontFamily: "'Microsoft YaHei', sans-serif" }}> <tbody className="text-sm" style={{ fontFamily: "'Microsoft YaHei', sans-serif" }}>
{project.devices.map((device) => ( {project.devices.map((device) => (
<tr key={device.id} className="border-t"> <tr key={device.id} className="border-t">
<td className="p-2 truncate" title={device.memo}>{device.memo}</td> <td className="p-2 truncate" title={device.memo}>{device.memo}</td>
<td className="p-2 truncate" title={device.imei || '-'}>{device.imei || '-'}</td> <td className="p-2" title={device.imei || '-'}>{device.imei || '-'}</td>
<td className="p-2 truncate" title={device.phone || '-'}>{device.phone || '-'}</td> <td className="p-2 truncate" title={device.phone || '-'}>{device.phone || '-'}</td>
<td className="p-2 truncate" title={device.model || '-'}>{device.model || '-'}</td> <td className="p-2 truncate" title={device.model || '-'}>{device.model || '-'}</td>
<td className="p-2 truncate" title={device.brand || '-'}>{device.brand || '-'}</td> <td className="p-2 truncate" title={device.brand || '-'}>{device.brand || '-'}</td>

View File

@@ -342,7 +342,13 @@ export default function ProjectDetailPage({ params }: ProjectDetailPageProps) {
{user.status === 1 ? "启用" : "禁用"} {user.status === 1 ? "启用" : "禁用"}
</Badge> </Badge>
</TableCell> </TableCell>
<TableCell>{user.typeId === 1 ? "操盘手" : "门店顾问"}</TableCell> <TableCell>
{user.typeId === -1
? "系统账号"
: user.typeId === 1
? "操盘手"
: "门店顾问"}
</TableCell>
<TableCell className="text-right">{user.createTime}</TableCell> <TableCell className="text-right">{user.createTime}</TableCell>
</TableRow> </TableRow>
))} ))}

View File

@@ -329,7 +329,13 @@ export default function ProjectDetail({ projectId, onEdit }: ProjectDetailProps)
{user.status === 1 ? "启用" : "禁用"} {user.status === 1 ? "启用" : "禁用"}
</Badge> </Badge>
</TableCell> </TableCell>
<TableCell>{user.typeId === 1 ? "操盘手" : "门店顾问"}</TableCell> <TableCell>
{user.typeId === -1
? "系统账号"
: user.typeId === 1
? "操盘手"
: "门店顾问"}
</TableCell>
<TableCell className="text-right">{user.createTime}</TableCell> <TableCell className="text-right">{user.createTime}</TableCell>
</TableRow> </TableRow>
))} ))}