Compare commits

...

7 Commits

Author SHA1 Message Date
xinadmin c73910ba74 账单导出 2026-11-01 16:17:12 +08:00
xinadmin f91939f1f0 账单导出 2026-10-30 11:17:15 +08:00
xinadmin 7366d88baf 账单导出 2026-10-30 10:51:09 +08:00
xinadmin 42a3fa00d4 账单导出 2026-10-24 21:57:02 +08:00
xinadmin 5123065def 账单导出 2026-09-25 00:30:02 +08:00
xinadmin 9831355386 订单时间 2026-09-24 22:56:17 +08:00
xinadmin 2ca0ac4c22 订单时间 2026-09-22 13:22:15 +08:00
335 changed files with 2534 additions and 984 deletions
File diff suppressed because one or more lines are too long
+37
View File
@@ -0,0 +1,37 @@
<?php
namespace App\Exports;
use App\Models\BillModel;
use Illuminate\Support\Collection;
use Maatwebsite\Excel\Concerns\WithMultipleSheets;
/**
* 门店账单批量导出:同一门店的账单数据合并为一张表,不同门店拆分为多个工作表
*/
class BillBatchExport implements WithMultipleSheets
{
/**
* @param Collection<int, BillModel> $bills 导出账单(with store)
*/
public function __construct(private readonly Collection $bills)
{
}
/**
* @return array<int, BillExport>
*/
public function sheets(): array
{
$usedNames = [];
$sheets = [];
foreach ($this->bills->groupBy('store_id') as $storeBills) {
$store = $storeBills->first()->store;
$storeId = (int) $storeBills->first()->store_id;
$sheetTitle = SheetName::make($store->name ?? ('门店#' . $storeId), $storeId, $usedNames);
$sheets[] = new BillExport($storeBills->values(), 0, $sheetTitle);
}
return $sheets;
}
}
+159 -50
View File
@@ -7,19 +7,21 @@ use App\Models\BillModel;
use App\Models\ProductCategoryModel;
use App\Models\ProductModel;
use App\Services\BillDetailService;
use App\Services\WeightEstimator;
use Illuminate\Support\Collection;
use Maatwebsite\Excel\Concerns\FromCollection;
use Maatwebsite\Excel\Concerns\WithStyles;
use Maatwebsite\Excel\Concerns\WithTitle;
use PhpOffice\PhpSpreadsheet\Style\Alignment;
use PhpOffice\PhpSpreadsheet\Style\Border;
use PhpOffice\PhpSpreadsheet\Style\Fill;
use PhpOffice\PhpSpreadsheet\Worksheet\Worksheet;
/**
* 门店账单单独导出:账单内明细按商品合并(可按一级分类过滤),
* 表尾汇总商品金额/配送费/附加金额/售后金额/总金额
* 门店账单导出:单账单可直接下载;多账单按商品合并为一张汇总表(批量导出按门店分组),
* 明细可按一级分类过滤,表尾汇总商品金额/配送费/附加金额/售后金额/总金额
*/
class BillExport implements FromCollection, WithStyles
class BillExport implements FromCollection, WithStyles, WithTitle
{
/** 数量列填充色(浅黄) */
private const string QUANTITY_FILL = 'FFFFF2CC';
@@ -47,18 +49,29 @@ class BillExport implements FromCollection, WithStyles
/** 数据末行索引 */
private int $lastRow = 1;
/** @var Collection<int, BillModel> */
private Collection $bills;
/**
* @param BillModel $bill 导出账单(with store)
* @param BillModel|Collection<int, BillModel> $bills 导出账单(with store);多账单须属于同一门店
* @param int $categoryId 一级分类ID(0=全部)
* @param string $sheetTitle 工作表名称
*/
public function __construct(
private readonly BillModel $bill,
BillModel|Collection $bills,
private readonly int $categoryId = 0,
private readonly string $sheetTitle = '门店账单',
) {
$this->bills = $bills instanceof BillModel ? collect([$bills]) : $bills->values();
}
public function title(): string
{
return $this->sheetTitle;
}
/**
* 导出行:标题/范围/列头/明细/合计全部手工构建(行位置不固定,不用 WithHeadings)
* 导出行:所选门店账单合并为一张表格,同商品及账单级费用分别汇总
*/
public function collection(): Collection
{
@@ -66,26 +79,54 @@ class BillExport implements FromCollection, WithStyles
return $this->rows;
}
$items = app(BillDetailService::class)->mergedItems($this->bill);
$rows = [];
$rowIndex = 0;
$this->appendBillRows($this->bills, $rows, $rowIndex);
return $this->rows = collect($rows);
}
/**
* 追加所选账单的合并表格
*
* @param Collection<int, BillModel> $bills
* @param array<int, array<int, mixed>> $rows
*/
private function appendBillRows(Collection $bills, array &$rows, int &$rowIndex): void
{
$items = $this->mergedItems($bills);
// 商品 => 一级分类解析(明细行「一级分类」列与分类过滤共用同一份结果)
[$categories, $rootIds] = $this->resolveRootCategories($items);
$categoryName = '全部';
if ($this->categoryId > 0) {
[$items, $categoryName] = $this->filterByRootCategory($items);
[$items, $categoryName] = $this->filterByRootCategory($items, $categories, $rootIds);
}
$bill = $this->bill;
$rows = [];
$rowIndex = 0;
$bill = $bills->first();
$isMerged = $bills->count() > 1;
// 标题行
$rows[] = ['门店账单 ' . $bill->bill_no];
$rows[] = [$isMerged ? '门店账单 合并导出(' . $bills->count() . '张)' : '门店账单 ' . $bill->bill_no];
$this->specialRows[++$rowIndex] = 'title';
// 范围行:门店 / 账单日期 / 分类 / 导出时间
// 范围行:门店 / 账单日期(合并时取起止日期)/ 分类 / 导出时间
$billDate = $bill->bill_date?->toDateString();
if ($isMerged) {
$dates = $bills->map(static fn (BillModel $item): ?string => $item->bill_date?->toDateString())
->filter()
->sort()
->values();
$billDate = $dates->first() === $dates->last()
? $dates->first()
: $dates->first() . ' 至 ' . $dates->last();
}
$storeName = $bill->store->name ?? ('门店#' . $bill->store_id);
$rows[] = [
'门店:' . $storeName
. ' 账单日期:' . $bill->bill_date?->toDateString()
. ' 账单日期:' . $billDate
. ($isMerged ? ' 账单数量:' . $bills->count() : '')
. ' 分类:' . $categoryName
. ' 导出时间:' . now('Asia/Shanghai')->format('Y-m-d H:i:s'),
];
@@ -95,12 +136,12 @@ class BillExport implements FromCollection, WithStyles
$rows[] = [''];
$rowIndex++;
// 列头
$rows[] = ['序号', '品名', '包规', '单位', '单价', '数量', '重量(斤)', '金额'];
// 列头(包规=包规+单位合并;单价=每件零售价+单价单位;一级分类=商品根分类名)
$rows[] = ['序号', '品名', '一级分类', '包规', '单价', '数量', '重量(斤)', '金额'];
$this->specialRows[++$rowIndex] = 'header';
$this->headerRow = $rowIndex;
// 明细行(账单内同商品已合并,单价为加权平均)
// 明细行(所选账单的同商品已合并,单价为合并后的每件价折算零售价)
$totalQuantity = 0;
$totalWeight = '0';
$totalAmount = '0';
@@ -108,9 +149,9 @@ class BillExport implements FromCollection, WithStyles
$rows[] = [
$sort + 1,
$item['product_name'],
$item['product_spec'],
$item['unit'],
(float) $item['price'],
$categories->get($rootIds[$item['product_id']] ?? 0)?->name ?? '',
$item['product_spec'] . $item['unit'],
self::retailPriceLabel($item),
(int) $item['quantity'],
(float) $item['weight'],
(float) $item['amount'],
@@ -129,10 +170,19 @@ class BillExport implements FromCollection, WithStyles
$this->fillCells[] = ['row' => $rowIndex, 'column' => 'F', 'value' => (float) $totalQuantity];
$this->fillCells[] = ['row' => $rowIndex, 'column' => 'H', 'value' => (float) $totalAmount];
// 配送费/附加金额/售后金额/总金额(账单级费用全额计入,不受分类过滤影响)
$deliveryTotal = (string) $bill->delivery_fee;
$addedTotal = (string) $bill->added_amount;
$afterSaleTotal = (string) $bill->after_sale;
// 配送费/附加金额/售后金额按所选账单分别累加,不受分类过滤影响
$deliveryTotal = '0';
$addedTotal = '0';
$afterSaleTotal = '0';
$boxNum = 0;
$trayNum = 0;
foreach ($bills as $selectedBill) {
$deliveryTotal = bcadd($deliveryTotal, (string) $selectedBill->delivery_fee, 2);
$addedTotal = bcadd($addedTotal, (string) $selectedBill->added_amount, 2);
$afterSaleTotal = bcadd($afterSaleTotal, (string) $selectedBill->after_sale, 2);
$boxNum += (int) $selectedBill->box_num;
$trayNum += (int) $selectedBill->tray_num;
}
$grandTotal = bcadd(bcadd(bcadd($totalAmount, $deliveryTotal, 2), $addedTotal, 2), $afterSaleTotal, 2);
$rows[] = ['配送费', '', '', '', '', '', '', (float) $deliveryTotal];
@@ -140,7 +190,7 @@ class BillExport implements FromCollection, WithStyles
$this->mergeRows[] = $rowIndex;
$this->fillCells[] = ['row' => $rowIndex, 'column' => 'H', 'value' => (float) $deliveryTotal];
$rows[] = ['附加金额(周转筐 ' . (int) $bill->box_num . ' 个 / 周转托盘 ' . (int) $bill->tray_num . ' 个)', '', '', '', '', '', '', (float) $addedTotal];
$rows[] = ['附加金额(周转筐 ' . $boxNum . ' 个 / 周转托盘 ' . $trayNum . ' 个)', '', '', '', '', '', '', (float) $addedTotal];
$this->specialRows[++$rowIndex] = 'summary';
$this->mergeRows[] = $rowIndex;
$this->fillCells[] = ['row' => $rowIndex, 'column' => 'H', 'value' => (float) $addedTotal];
@@ -155,12 +205,42 @@ class BillExport implements FromCollection, WithStyles
$this->mergeRows[] = $rowIndex;
$this->fillCells[] = ['row' => $rowIndex, 'column' => 'H', 'value' => (float) $grandTotal];
$this->lastRow = $rowIndex;
return $this->rows = collect($rows);
}
/**
* 标题/列头/合计行加粗,合计行标签左合并 A:G;全表居中 + 全边框;金额类列货币格式;
* 合并所选账单商品:数量、重量、金额累加,单价按总金额 ÷ 总数量重新加权
*
* @param Collection<int, BillModel> $bills
* @return array<int, array{product_id: int, product_name: string, product_spec: string, unit: string, price: string, quantity: int, weight: string, amount: string, spec: string, price_unit: string, image: string}>
*/
private function mergedItems(Collection $bills): array
{
$merged = [];
$service = app(BillDetailService::class);
foreach ($bills as $bill) {
foreach ($service->mergedItems($bill) as $item) {
$productId = (int) $item['product_id'];
if (! isset($merged[$productId])) {
$merged[$productId] = $item;
continue;
}
$merged[$productId]['quantity'] += (int) $item['quantity'];
$merged[$productId]['weight'] = bcadd($merged[$productId]['weight'], $item['weight'], 3);
$merged[$productId]['amount'] = bcadd($merged[$productId]['amount'], $item['amount'], 2);
$merged[$productId]['price'] = bcdiv(
$merged[$productId]['amount'],
(string) $merged[$productId]['quantity'],
2
);
}
}
return array_values($merged);
}
/**
* 标题合并 A:H 并居中;标题/列头/合计行加粗,合计行标签左合并 A:G;全表居中 + 全边框;金额列货币格式;
* 数量(浅黄)/金额(浅红)非 0 条件填色(0 不填、列头固定填色),冻结列头
*/
public function styles(Worksheet $sheet): array
@@ -170,13 +250,15 @@ class BillExport implements FromCollection, WithStyles
$sheet->freezePane('A' . ($this->headerRow + 1));
$sheet->getColumnDimension('A')->setWidth(6);
$sheet->getColumnDimension('B')->setWidth(24);
$sheet->getColumnDimension('C')->setWidth(14);
$sheet->getColumnDimension('D')->setWidth(8);
$sheet->getColumnDimension('E')->setWidth(10);
$sheet->getColumnDimension('C')->setWidth(12);
$sheet->getColumnDimension('D')->setWidth(14);
$sheet->getColumnDimension('E')->setWidth(12);
$sheet->getColumnDimension('F')->setWidth(10);
$sheet->getColumnDimension('G')->setWidth(12);
$sheet->getColumnDimension('H')->setWidth(12);
$sheet->mergeCells('A1:H1');
foreach ($this->mergeRows as $row) {
$sheet->mergeCells('A' . $row . ':G' . $row);
}
@@ -196,12 +278,10 @@ class BillExport implements FromCollection, WithStyles
->getAllBorders()
->setBorderStyle(Border::BORDER_THIN);
// 金额类列(单价/金额)货币格式:¥ + 两位小数
foreach (['E', 'H'] as $column) {
$sheet->getStyle($column . ($this->headerRow + 1) . ':' . $column . $this->lastRow)
// 金额列货币格式:¥ + 两位小数(单价列为文本,不设格式)
$sheet->getStyle('H' . ($this->headerRow + 1) . ':H' . $this->lastRow)
->getNumberFormat()
->setFormatCode(self::CURRENCY_FORMAT);
}
// 列头固定填色:数量列(F)浅黄、金额列(H)浅红
$this->fillCell($sheet, 'F' . $this->headerRow, self::QUANTITY_FILL);
@@ -247,16 +327,55 @@ class BillExport implements FromCollection, WithStyles
}
/**
* 按一级分类过滤明细:沿 parent_id 上溯取根分类(商品含软删除,保证历史账单可导出),
* 仅保留根分类为所选分类的行
* 单价列文本:每件零售价(明细每件价 ÷ 包规折算每件斤数)+ 单价单位(如「1.74元/斤」);
* 包规无法折算(散装/无数字)时按每件原价显示
*
* @param array{price: string, product_spec: string, unit: string, price_unit?: string} $item
*/
private static function retailPriceLabel(array $item): string
{
$jinPerPiece = WeightEstimator::perUnitJin($item['product_spec'], $item['unit']);
$retail = (float) $jinPerPiece > 0
? bcdiv($item['price'], $jinPerPiece, 2)
: $item['price'];
return $retail . ($item['price_unit'] ?? '');
}
/**
* 按一级分类过滤明细:仅保留根分类为所选分类的行
*
* @param array<int, array> $items 合并后的商品明细
* @param Collection<int, ProductCategoryModel> $categories 全部分类(id => 分类)
* @param array<int, int> $rootIds 商品ID => 一级分类ID
* @return array{0: array<int, array>, 1: string} [过滤后明细, 一级分类名]
*/
private function filterByRootCategory(array $items): array
private function filterByRootCategory(array $items, Collection $categories, array $rootIds): array
{
$categoryName = $categories->get($this->categoryId)?->name ?? ('分类#' . $this->categoryId);
$categoryId = $this->categoryId;
$filtered = array_values(array_filter(
$items,
static fn (array $row): bool => ($rootIds[$row['product_id']] ?? 0) === $categoryId
));
if ($filtered === []) {
throw new RepositoryException('所选账单在「' . $categoryName . '」分类下无商品明细');
}
return [$filtered, $categoryName];
}
/**
* 解析明细商品的一级分类:沿 parent_id 上溯取根分类(商品含软删除,保证历史账单可导出)
*
* @param array<int, array> $items 合并后的商品明细
* @return array{0: Collection<int, ProductCategoryModel>, 1: array<int, int>} [全部分类(id=>分类), 商品ID=>一级分类ID]
*/
private function resolveRootCategories(array $items): array
{
$categories = ProductCategoryModel::all()->keyBy('id');
$categoryName = $categories->get($this->categoryId)->name ?? ('分类#' . $this->categoryId);
$productCategoryIds = ProductModel::withTrashed()
->whereIn('id', array_column($items, 'product_id'))
@@ -279,16 +398,6 @@ class BillExport implements FromCollection, WithStyles
$rootIds[(int) $productId] = $rootId;
}
$categoryId = $this->categoryId;
$filtered = array_values(array_filter(
$items,
static fn (array $row): bool => ($rootIds[$row['product_id']] ?? 0) === $categoryId
));
if ($filtered === []) {
throw new RepositoryException('该账单在「' . $categoryName . '」分类下无商品明细');
}
return [$filtered, $categoryName];
return [$categories, $rootIds];
}
}
+3 -1
View File
@@ -144,7 +144,7 @@ class ContainerReturnExport implements FromCollection, WithStyles, WithStrictNul
}
/**
* 标题/列头/合计行加粗;全表居中 + 全边框;金额区货币格式;
* 标题按实际列数合并居中;标题/列头/合计行加粗;全表居中 + 全边框;金额区货币格式;
* 门店列(浅蓝)/合计列(浅红)非 0 条件填色(0 不填、列头固定填色),冻结列头行
*/
public function styles(Worksheet $sheet): array
@@ -161,6 +161,8 @@ class ContainerReturnExport implements FromCollection, WithStyles, WithStrictNul
$storeIds = array_map(intval(...), array_keys($this->storeNames));
$lastColumn = Coordinate::stringFromColumnIndex($columnCount);
$sheet->mergeCells('A1:' . $lastColumn . '1');
// 全部单元格水平/垂直居中
$sheet->getStyle('A1:' . $lastColumn . $this->lastRow)
->getAlignment()
+2 -1
View File
@@ -252,7 +252,7 @@ class PurchaseOrderExport implements FromCollection, WithStrictNullComparison, W
}
/**
* 标题/列头/合计加粗;全表居中 + 全边框;金额类列货币格式;
* 标题按实际列数合并居中;标题/列头/合计加粗;全表居中 + 全边框;金额类列货币格式;
* 数量(浅黄)/门店数量(浅蓝)/金额(浅红)按值条件填色(0 不填、列头固定填色),冻结列头
*/
public function styles(Worksheet $sheet): array
@@ -279,6 +279,7 @@ class PurchaseOrderExport implements FromCollection, WithStrictNullComparison, W
}
// 全部单元格水平/垂直居中
$sheet->mergeCells('A1:' . $lastColumn . '1');
$sheet->getStyle('A1:' . $lastColumn . $this->lastRow)
->getAlignment()
->setHorizontal(Alignment::HORIZONTAL_CENTER)
+2 -1
View File
@@ -120,7 +120,7 @@ class PurchaseStoreSheet implements FromCollection, WithStrictNullComparison, Wi
}
/**
* 标题/列头/合计加粗;全表居中 + 全边框;金额类列货币格式;
* 标题合并 A:I 并居中;标题/列头/合计加粗;全表居中 + 全边框;金额类列货币格式;
* 数量(浅黄)/金额(浅红)按值条件填色(0 不填、列头固定填色),冻结列头
*/
public function styles(Worksheet $sheet): array
@@ -135,6 +135,7 @@ class PurchaseStoreSheet implements FromCollection, WithStrictNullComparison, Wi
}
// 全部单元格水平/垂直居中
$sheet->mergeCells('A1:I1');
$sheet->getStyle('A1:I' . $this->lastRow)
->getAlignment()
->setHorizontal(Alignment::HORIZONTAL_CENTER)
+6 -5
View File
@@ -122,7 +122,7 @@ class PurchaseSupplierSheet implements FromCollection, WithStrictNullComparison,
}
/**
* 标题合并 A1:C2、备注合并 D1:I2(红色 22 号字);标题/列头加粗;全表居中 + 全边框 + 列头行自动换行;
* 标题合并 A1:C2、备注从 D1 合并至实际末列(红色 22 号字);标题/列头加粗;全表居中 + 全边框 + 列头行自动换行;
* 汇总列(浅黄)/门店数量列(浅蓝)按值条件填色(0 不填、列头固定填色),冻结列头
*/
public function styles(Worksheet $sheet): array
@@ -131,16 +131,17 @@ class PurchaseSupplierSheet implements FromCollection, WithStrictNullComparison,
$sheet->freezePane('A' . ($this->headerRow + 1));
// 标题合并前三列占两行(A1:C2),备注合并六列两行(D1:I2)
$sheet->mergeCells('A1:C2');
$sheet->mergeCells('D1:I2');
$widths = [24, 10, 6];
foreach ($widths as $index => $width) {
$sheet->getColumnDimension(Coordinate::stringFromColumnIndex($index + 1))->setWidth($width);
}
$storeIds = array_map('intval', array_keys($this->stores));
$lastColumn = Coordinate::stringFromColumnIndex(3 + max(count($storeIds), 1));
// 标题占前三列,备注占其余实际表格列,均合并两行
$sheet->mergeCells('A1:C2');
$sheet->mergeCells('D1:' . $lastColumn . '2');
foreach ($storeIds as $i => $storeId) {
$sheet->getColumnDimension(Coordinate::stringFromColumnIndex(4 + $i))->setWidth(6);
}
@@ -3,6 +3,7 @@
namespace App\Http\Controllers\Mini;
use App\Exceptions\RepositoryException;
use App\Exports\BillBatchExport;
use App\Exports\BillExport;
use App\Models\BillModel;
use App\Services\BillDetailService;
@@ -86,6 +87,37 @@ class BillController extends BaseMiniController
return $this->success($data);
}
/**
* 批量导出账单:仅可导出本店账单,所选账单数据合并为一张表
*/
#[GetRoute('/bill/batch-export', authorize: true)]
public function batchExport(Request $request): Response
{
$data = $request->validate([
'ids' => 'required|array|min:1|max:100',
'ids.*' => 'required|integer|distinct',
], [
'ids.required' => '请选择要导出的账单',
'ids.max' => '单次最多导出 100 张账单',
'ids.*.distinct' => '账单不能重复选择',
]);
$store = $this->currentStore($request);
$bills = BillModel::query()
->with('store:id,name')
->where('store_id', $store->id)
->whereIn('id', $data['ids'])
->orderBy('bill_date')
->orderBy('id')
->get();
if ($bills->count() !== count($data['ids'])) {
throw new RepositoryException('包含不存在或不属于当前门店的账单');
}
return Excel::download(new BillBatchExport($bills), '门店账单_批量导出.xlsx');
}
/**
* 单独导出账单:仅可导出本店账单(强制 store_id 过滤);
* ?category_id= 一级分类过滤(0/缺省=全部)
@@ -352,7 +352,7 @@ class OrderController extends BaseMiniController
return;
}
$now = (int) now()->format('H') * 60 + (int) now()->format('i');
$now = (int) now('Asia/Shanghai')->format('H') * 60 + (int) now('Asia/Shanghai')->format('i');
$allowed = match (true) {
// 跨天时段:当晚开始时间之后 或 次日截单时间之前
$start !== null && $end !== null && $start > $end => $now >= $start || $now <= $end,
@@ -3,6 +3,7 @@
namespace App\Http\Controllers\Recon;
use App\Exceptions\RepositoryException;
use App\Exports\BillBatchExport;
use App\Exports\BillExport;
use App\Models\BillModel;
use App\Models\StoreModel;
@@ -60,6 +61,27 @@ class BillController extends BaseController
return $this->success($data);
}
/**
* 批量导出账单:同一门店的账单数据合并为一张表,不同门店拆分为多个工作表
*/
#[GetRoute(route: '/batch-export', authorize: 'export')]
public function batchExport(Request $request): Response
{
$data = $request->validate([
'ids' => 'required|array|min:1|max:100',
'ids.*' => 'required|integer|distinct|exists:bill,id',
]);
$bills = BillModel::query()
->with('store:id,name')
->whereIn('id', $data['ids'])
->orderBy('bill_date')
->orderBy('id')
->get();
return Excel::download(new BillBatchExport($bills), '门店账单_批量导出.xlsx');
}
/**
* 单独导出账单:账单内明细按商品合并(可按一级分类过滤),
* 表尾汇总商品金额/配送费/附加金额/售后金额/总金额
+15
View File
@@ -0,0 +1,15 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class BaseModel extends Model
{
protected function serializeDate(\DateTimeInterface $date)
{
return $date->setTimezone('Asia/Shanghai')->format('Y-m-d H:i:s');
}
}
+1 -2
View File
@@ -3,7 +3,6 @@
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Database\Eloquent\Relations\HasMany;
use Modules\SystemUser\Models\SysUserModel;
@@ -11,7 +10,7 @@ use Modules\SystemUser\Models\SysUserModel;
/**
* 门店账单模型(采购单完成后按门店生成;商品金额由订单汇总快照,生成后不可修改)
*/
class BillModel extends Model
class BillModel extends BaseModel
{
use HasFactory;
+1 -2
View File
@@ -3,13 +3,12 @@
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
/**
* 小程序购物车模型(门店订货车:按门店归属,同商品唯一行、加购合并数量)
*/
class CartModel extends Model
class CartModel extends BaseModel
{
use HasFactory;
+2 -2
View File
@@ -3,7 +3,7 @@
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Modules\SystemUser\Models\SysUserModel;
@@ -12,7 +12,7 @@ use Modules\SystemUser\Models\SysUserModel;
*
* 数量正数=压筐(附加金额),负数=回筐(抵扣金额);数量为 0 不写记录
*/
class ContainerReturnModel extends Model
class ContainerReturnModel extends BaseModel
{
use HasFactory;
+2 -2
View File
@@ -3,7 +3,7 @@
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\HasMany;
use Illuminate\Database\Eloquent\Relations\HasOne;
use Modules\SystemTool\Models\SysFileModel;
@@ -11,7 +11,7 @@ use Modules\SystemTool\Models\SysFileModel;
/**
* 客户等级模型(同一商品按等级上浮比例定价:售价 = 成本价 × (100 + percent) / 100)
*/
class CustomerLevelModel extends Model
class CustomerLevelModel extends BaseModel
{
use HasFactory;
+2 -2
View File
@@ -2,14 +2,14 @@
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\HasOne;
use Modules\SystemTool\Models\SysFileModel;
/**
* 小程序首页轮播图
*/
class HomeBannerModel extends Model
class HomeBannerModel extends BaseModel
{
/** 状态:停用 */
public const int STATUS_DISABLED = 0;
+2 -2
View File
@@ -2,14 +2,14 @@
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\HasOne;
use Modules\SystemTool\Models\SysFileModel;
/**
* 小程序首页宫格导航
*/
class HomeNavModel extends Model
class HomeNavModel extends BaseModel
{
/** 状态:停用 */
public const int STATUS_DISABLED = 0;
+2 -2
View File
@@ -2,14 +2,14 @@
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\HasOne;
use Modules\SystemTool\Models\SysFileModel;
/**
* 小程序首页促销推荐卡片
*/
class HomePromoModel extends Model
class HomePromoModel extends BaseModel
{
/** 状态:停用 */
public const int STATUS_DISABLED = 0;
+2 -2
View File
@@ -2,13 +2,13 @@
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
/**
* 小程序首页特价推荐商品
*/
class HomeSpecialModel extends Model
class HomeSpecialModel extends BaseModel
{
/** 状态:停用 */
public const int STATUS_DISABLED = 0;
+2 -2
View File
@@ -2,13 +2,13 @@
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
/**
* 通知模型(小程序端消息:订单 / 价格变更 / 系统;store_id=0 为全员广播)
*/
class NoticeModel extends Model
class NoticeModel extends BaseModel
{
/** 通知类型:订单 */
public const TYPE_ORDER = 'order';
+2 -2
View File
@@ -4,7 +4,7 @@ namespace App\Models;
use Illuminate\Database\Eloquent\Casts\Attribute;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Database\Eloquent\Relations\HasMany;
use Modules\SystemTool\Models\SysFileModel;
@@ -17,7 +17,7 @@ use Modules\SystemUser\Models\SysUserModel;
* - 1 线下凭证支付:门店提交汇款凭证,后台审核通过后关联账单批量置已支付
* - 2 旺铺在线支付:调起微信/支付宝在线支付,网关回调(或主动查询)确认后自动结账
*/
class PaymentModel extends Model
class PaymentModel extends BaseModel
{
use HasFactory;
+2 -2
View File
@@ -2,14 +2,14 @@
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Database\Eloquent\Relations\HasMany;
/**
* 商品分类模型(蔬菜/水果/其他,多级分类自关联)
*/
class ProductCategoryModel extends Model
class ProductCategoryModel extends BaseModel
{
/** 状态:停用 */
public const int STATUS_DISABLED = 0;
+2 -2
View File
@@ -4,7 +4,7 @@ namespace App\Models;
use Illuminate\Database\Eloquent\Casts\Attribute;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Database\Eloquent\SoftDeletes;
use Modules\SystemTool\Models\SysFileModel;
@@ -12,7 +12,7 @@ use Modules\SystemTool\Models\SysFileModel;
/**
* 商品档案模型(品名/规格包规/供应商/成本价;售价按客户等级上浮比例换算)
*/
class ProductModel extends Model
class ProductModel extends BaseModel
{
use SoftDeletes, HasFactory;
+2 -2
View File
@@ -2,14 +2,14 @@
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Modules\SystemUser\Models\SysUserModel;
/**
* 采购单单品对账标记模型(商品明细「已对账」勾选,入库持久化;存在记录=已标记)
*/
class PurchaseItemCheckModel extends Model
class PurchaseItemCheckModel extends BaseModel
{
protected $table = 'purchase_item_check';
protected $primaryKey = 'id';
+2 -2
View File
@@ -3,7 +3,7 @@
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Database\Eloquent\Relations\HasMany;
use Modules\SystemUser\Models\SysUserModel;
@@ -11,7 +11,7 @@ use Modules\SystemUser\Models\SysUserModel;
/**
* 采购单模型(按门店订单汇总生成;无独立明细表,明细直接溯源订货明细 store_order_item.purchase_id)
*/
class PurchaseOrderModel extends Model
class PurchaseOrderModel extends BaseModel
{
use HasFactory;
+5
View File
@@ -96,4 +96,9 @@ class StoreModel extends Authenticatable
{
return $this->hasMany(NoticeModel::class, 'store_id', 'id');
}
protected function serializeDate(\DateTimeInterface $date)
{
return $date->setTimezone('Asia/Shanghai')->format('Y-m-d H:i:s');
}
}
+2 -2
View File
@@ -4,14 +4,14 @@ namespace App\Models;
use Illuminate\Database\Eloquent\Casts\Attribute;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
/**
* 门店订单明细模型(下单时快照商品档案:品名/规格/单位/供应商/图文/成本价 + 等级单价,
* 商品调价或档案变更不影响历史单据)
*/
class StoreOrderItemModel extends Model
class StoreOrderItemModel extends BaseModel
{
use HasFactory;
+2 -2
View File
@@ -3,7 +3,7 @@
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Database\Eloquent\Relations\HasMany;
use Illuminate\Database\Eloquent\SoftDeletes;
@@ -11,7 +11,7 @@ use Illuminate\Database\Eloquent\SoftDeletes;
/**
* 门店订单模型(小程序下单,快照等级价;软删除,仅已取消订单可由后台删除)
*/
class StoreOrderModel extends Model
class StoreOrderModel extends BaseModel
{
use HasFactory, SoftDeletes;
+2 -2
View File
@@ -3,14 +3,14 @@
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\HasMany;
use Illuminate\Database\Eloquent\SoftDeletes;
/**
* 供应商模型(采购单接收方)
*/
class SupplierModel extends Model
class SupplierModel extends BaseModel
{
use SoftDeletes, HasFactory;
+9 -2
View File
@@ -5,6 +5,8 @@ namespace App\Services;
use App\Models\BillModel;
use App\Models\ProductModel;
use App\Models\StoreOrderItemModel;
use Illuminate\Contracts\Container\BindingResolutionException;
use Illuminate\Contracts\Container\CircularDependencyException;
use Illuminate\Support\Collection;
/**
@@ -16,7 +18,10 @@ class BillDetailService
* 合并后的商品明细:按商品聚合账单关联的全部订单明细
* 单价为加权平均口径(Σ金额÷Σ数量),保证 单价×数量=金额;附商品首图
*
* @return array<int, array{product_id: int, product_name: string, product_spec: string, unit: string, price: string, quantity: int, weight: string, amount: string, image: string}>
* @param BillModel $bill
* @return array<int, array{product_id: int, product_name: string, product_spec: string, unit: string, price: string, quantity: int, weight: string, amount: string, spec: string, price_unit: string, image: string}>
* @throws BindingResolutionException
* @throws CircularDependencyException
*/
public function mergedItems(BillModel $bill): array
{
@@ -34,7 +39,9 @@ class BillDetailService
* 首图取明细快照 image_ids 批量解析,按「分类sort → 商品sort」排序
*
* @param Collection<int, StoreOrderItemModel> $items
* @return array<int, array{product_id: int, product_name: string, product_spec: string, unit: string, price: string, quantity: int, weight: string, amount: string, image: string}>
* @return array<int, array{product_id: int, product_name: string, product_spec: string, unit: string, price: string, quantity: int, weight: string, amount: string, spec: string, price_unit: string, image: string}>
* @throws BindingResolutionException
* @throws CircularDependencyException
*/
private function aggregateItems(Collection $items): array
{
+2 -2
View File
@@ -19,9 +19,9 @@ class WeightEstimator
}
/**
* 单个计价单位折算重量(斤)
* 单个计价单位折算重量(斤);规格无法解析时返回 '0'
*/
private static function perUnitJin(string $spec, string $unit): string
public static function perUnitJin(string $spec, string $unit): string
{
// 按重量计价的单位:订货量本身就是重量
$unitWeight = self::toJin('1', $unit);
+2
View File
@@ -0,0 +1,2 @@
allowBuilds:
es5-ext: set this to true or false
+1
View File
@@ -0,0 +1 @@
import"./request-xrnk7ZJV.js";import{Pr as e,t}from"./jsx-runtime-OfKoVykY.js";import{t as n}from"./button-DsOd0cni.js";import{t as r}from"./card-C-jMUkpS.js";import{t as i}from"./result-qtYAiD4_.js";e();var a=t(),o=()=>(0,a.jsx)(r,{variant:`borderless`,children:(0,a.jsx)(i,{status:`403`,title:`403`,subTitle:`Sorry, you are not authorized to access this page.`,extra:(0,a.jsx)(n,{type:`primary`,children:`Back Home`})})});export{o as default};
-1
View File
@@ -1 +0,0 @@
import"./request-DWqS4XYU.js";import{Pr as e,t}from"./jsx-runtime-Dk2XcqH2.js";import{t as n}from"./button-CdrnzceP.js";import{t as r}from"./card-CAlqEh_K.js";import{t as i}from"./result-DWumm-D4.js";e();var a=t(),o=()=>(0,a.jsx)(r,{variant:`borderless`,children:(0,a.jsx)(i,{status:`403`,title:`403`,subTitle:`Sorry, you are not authorized to access this page.`,extra:(0,a.jsx)(n,{type:`primary`,children:`Back Home`})})});export{o as default};
+1
View File
@@ -0,0 +1 @@
import"./request-xrnk7ZJV.js";import{Pr as e,t}from"./jsx-runtime-OfKoVykY.js";import{t as n}from"./button-DsOd0cni.js";import{t as r}from"./card-C-jMUkpS.js";import{t as i}from"./result-Cv0YlB7k.js";e();var a=t(),o=()=>(0,a.jsx)(r,{variant:`borderless`,children:(0,a.jsx)(i,{status:`403`,title:`403`,subTitle:`Sorry, you are not authorized to access this page.`,extra:(0,a.jsx)(n,{type:`primary`,children:`Back Home`})})});export{o as default};
+1
View File
@@ -0,0 +1 @@
import"./request-xrnk7ZJV.js";import{Pr as e,t}from"./jsx-runtime-OfKoVykY.js";import{t as n}from"./button-DsOd0cni.js";import{t as r}from"./card-C-jMUkpS.js";import{t as i}from"./result-CiRRu9Vo.js";e();var a=t(),o=()=>(0,a.jsx)(r,{variant:`borderless`,children:(0,a.jsx)(i,{status:`403`,title:`403`,subTitle:`Sorry, you are not authorized to access this page.`,extra:(0,a.jsx)(n,{type:`primary`,children:`Back Home`})})});export{o as default};
+1
View File
@@ -0,0 +1 @@
import"./request-xrnk7ZJV.js";import{Pr as e,t}from"./jsx-runtime-OfKoVykY.js";import{t as n}from"./button-DsOd0cni.js";import{t as r}from"./card-C-jMUkpS.js";import{t as i}from"./result-qtYAiD4_.js";e();var a=t(),o=()=>(0,a.jsx)(r,{variant:`borderless`,children:(0,a.jsx)(i,{status:`404`,title:`404`,subTitle:`Sorry, the page you visited does not exist.`,extra:(0,a.jsx)(n,{type:`primary`,children:`Back Home`})})});export{o as default};
-1
View File
@@ -1 +0,0 @@
import"./request-DWqS4XYU.js";import{Pr as e,t}from"./jsx-runtime-Dk2XcqH2.js";import{t as n}from"./button-CdrnzceP.js";import{t as r}from"./card-CAlqEh_K.js";import{t as i}from"./result-DWumm-D4.js";e();var a=t(),o=()=>(0,a.jsx)(r,{variant:`borderless`,children:(0,a.jsx)(i,{status:`404`,title:`404`,subTitle:`Sorry, the page you visited does not exist.`,extra:(0,a.jsx)(n,{type:`primary`,children:`Back Home`})})});export{o as default};
+1
View File
@@ -0,0 +1 @@
import"./request-xrnk7ZJV.js";import{Pr as e,t}from"./jsx-runtime-OfKoVykY.js";import{t as n}from"./button-DsOd0cni.js";import{t as r}from"./card-C-jMUkpS.js";import{t as i}from"./result-CiRRu9Vo.js";e();var a=t(),o=()=>(0,a.jsx)(r,{variant:`borderless`,children:(0,a.jsx)(i,{status:`404`,title:`404`,subTitle:`Sorry, the page you visited does not exist.`,extra:(0,a.jsx)(n,{type:`primary`,children:`Back Home`})})});export{o as default};
+1
View File
@@ -0,0 +1 @@
import"./request-xrnk7ZJV.js";import{Pr as e,t}from"./jsx-runtime-OfKoVykY.js";import{t as n}from"./button-DsOd0cni.js";import{t as r}from"./card-C-jMUkpS.js";import{t as i}from"./result-Cv0YlB7k.js";e();var a=t(),o=()=>(0,a.jsx)(r,{variant:`borderless`,children:(0,a.jsx)(i,{status:`404`,title:`404`,subTitle:`Sorry, the page you visited does not exist.`,extra:(0,a.jsx)(n,{type:`primary`,children:`Back Home`})})});export{o as default};
+1
View File
@@ -0,0 +1 @@
import"./request-xrnk7ZJV.js";import{Pr as e,t}from"./jsx-runtime-OfKoVykY.js";import{t as n}from"./button-DsOd0cni.js";import{t as r}from"./card-C-jMUkpS.js";import{t as i}from"./result-qtYAiD4_.js";e();var a=t(),o=()=>(0,a.jsx)(r,{variant:`borderless`,children:(0,a.jsx)(i,{status:`500`,title:`500`,subTitle:`Sorry, something went wrong.`,extra:(0,a.jsx)(n,{type:`primary`,children:`Back Home`})})});export{o as default};
-1
View File
@@ -1 +0,0 @@
import"./request-DWqS4XYU.js";import{Pr as e,t}from"./jsx-runtime-Dk2XcqH2.js";import{t as n}from"./button-CdrnzceP.js";import{t as r}from"./card-CAlqEh_K.js";import{t as i}from"./result-DWumm-D4.js";e();var a=t(),o=()=>(0,a.jsx)(r,{variant:`borderless`,children:(0,a.jsx)(i,{status:`500`,title:`500`,subTitle:`Sorry, something went wrong.`,extra:(0,a.jsx)(n,{type:`primary`,children:`Back Home`})})});export{o as default};
+1
View File
@@ -0,0 +1 @@
import"./request-xrnk7ZJV.js";import{Pr as e,t}from"./jsx-runtime-OfKoVykY.js";import{t as n}from"./button-DsOd0cni.js";import{t as r}from"./card-C-jMUkpS.js";import{t as i}from"./result-CiRRu9Vo.js";e();var a=t(),o=()=>(0,a.jsx)(r,{variant:`borderless`,children:(0,a.jsx)(i,{status:`500`,title:`500`,subTitle:`Sorry, something went wrong.`,extra:(0,a.jsx)(n,{type:`primary`,children:`Back Home`})})});export{o as default};
+1
View File
@@ -0,0 +1 @@
import"./request-xrnk7ZJV.js";import{Pr as e,t}from"./jsx-runtime-OfKoVykY.js";import{t as n}from"./button-DsOd0cni.js";import{t as r}from"./card-C-jMUkpS.js";import{t as i}from"./result-Cv0YlB7k.js";e();var a=t(),o=()=>(0,a.jsx)(r,{variant:`borderless`,children:(0,a.jsx)(i,{status:`500`,title:`500`,subTitle:`Sorry, something went wrong.`,extra:(0,a.jsx)(n,{type:`primary`,children:`Back Home`})})});export{o as default};
+1
View File
@@ -0,0 +1 @@
import{o as e}from"./request-xrnk7ZJV.js";import{Pr as t,t as n}from"./jsx-runtime-OfKoVykY.js";import{t as r}from"./user-BIny2SBS.js";var i=e(t(),1),a=n(),o=({auth:e,children:t})=>{let n=r(e=>e.access);return(0,i.useMemo)(()=>!e||n.includes(e),[n,e])?(0,a.jsx)(a.Fragment,{children:t}):null};export{o as t};
-1
View File
@@ -1 +0,0 @@
import{o as e}from"./request-DWqS4XYU.js";import{Pr as t,t as n}from"./jsx-runtime-Dk2XcqH2.js";import{t as r}from"./user-2bb2WM5y.js";var i=e(t(),1),a=n(),o=({auth:e,children:t})=>{let n=r(e=>e.access);return(0,i.useMemo)(()=>!e||n.includes(e),[n,e])?(0,a.jsx)(a.Fragment,{children:t}):null};export{o as t};
@@ -1 +1 @@
import{o as e}from"./request-DWqS4XYU.js";import{Pr as t,Rt as n}from"./jsx-runtime-Dk2XcqH2.js";var r=e(t()),i={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm193.5 301.7l-210.6 292a31.8 31.8 0 01-51.7 0L318.5 484.9c-3.8-5.3 0-12.7 6.5-12.7h46.9c10.2 0 19.9 4.9 25.9 13.3l71.2 98.8 157.2-218c6-8.3 15.6-13.3 25.9-13.3H699c6.5 0 10.3 7.4 6.5 12.7z`}}]},name:`check-circle`,theme:`filled`};function a(){return a=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},a.apply(this,arguments)}var o=r.forwardRef((e,t)=>r.createElement(n,a({},e,{ref:t,icon:i})));export{o as t};
import{o as e}from"./request-xrnk7ZJV.js";import{Pr as t,Rt as n}from"./jsx-runtime-OfKoVykY.js";var r=e(t()),i={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm193.5 301.7l-210.6 292a31.8 31.8 0 01-51.7 0L318.5 484.9c-3.8-5.3 0-12.7 6.5-12.7h46.9c10.2 0 19.9 4.9 25.9 13.3l71.2 98.8 157.2-218c6-8.3 15.6-13.3 25.9-13.3H699c6.5 0 10.3 7.4 6.5 12.7z`}}]},name:`check-circle`,theme:`filled`};function a(){return a=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},a.apply(this,arguments)}var o=r.forwardRef((e,t)=>r.createElement(n,a({},e,{ref:t,icon:i})));export{o as t};
@@ -1 +1 @@
import{o as e}from"./request-DWqS4XYU.js";import{Pr as t,Rt as n}from"./jsx-runtime-Dk2XcqH2.js";var r=e(t()),i={icon:{tag:`svg`,attrs:{"fill-rule":`evenodd`,viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M512 64c247.4 0 448 200.6 448 448S759.4 960 512 960 64 759.4 64 512 264.6 64 512 64zm127.98 274.82h-.04l-.08.06L512 466.75 384.14 338.88c-.04-.05-.06-.06-.08-.06a.12.12 0 00-.07 0c-.03 0-.05.01-.09.05l-45.02 45.02a.2.2 0 00-.05.09.12.12 0 000 .07v.02a.27.27 0 00.06.06L466.75 512 338.88 639.86c-.05.04-.06.06-.06.08a.12.12 0 000 .07c0 .03.01.05.05.09l45.02 45.02a.2.2 0 00.09.05.12.12 0 00.07 0c.02 0 .04-.01.08-.05L512 557.25l127.86 127.87c.04.04.06.05.08.05a.12.12 0 00.07 0c.03 0 .05-.01.09-.05l45.02-45.02a.2.2 0 00.05-.09.12.12 0 000-.07v-.02a.27.27 0 00-.05-.06L557.25 512l127.87-127.86c.04-.04.05-.06.05-.08a.12.12 0 000-.07c0-.03-.01-.05-.05-.09l-45.02-45.02a.2.2 0 00-.09-.05.12.12 0 00-.07 0z`}}]},name:`close-circle`,theme:`filled`};function a(){return a=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},a.apply(this,arguments)}var o=r.forwardRef((e,t)=>r.createElement(n,a({},e,{ref:t,icon:i})));export{o as t};
import{o as e}from"./request-xrnk7ZJV.js";import{Pr as t,Rt as n}from"./jsx-runtime-OfKoVykY.js";var r=e(t()),i={icon:{tag:`svg`,attrs:{"fill-rule":`evenodd`,viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M512 64c247.4 0 448 200.6 448 448S759.4 960 512 960 64 759.4 64 512 264.6 64 512 64zm127.98 274.82h-.04l-.08.06L512 466.75 384.14 338.88c-.04-.05-.06-.06-.08-.06a.12.12 0 00-.07 0c-.03 0-.05.01-.09.05l-45.02 45.02a.2.2 0 00-.05.09.12.12 0 000 .07v.02a.27.27 0 00.06.06L466.75 512 338.88 639.86c-.05.04-.06.06-.06.08a.12.12 0 000 .07c0 .03.01.05.05.09l45.02 45.02a.2.2 0 00.09.05.12.12 0 00.07 0c.02 0 .04-.01.08-.05L512 557.25l127.86 127.87c.04.04.06.05.08.05a.12.12 0 00.07 0c.03 0 .05-.01.09-.05l45.02-45.02a.2.2 0 00.05-.09.12.12 0 000-.07v-.02a.27.27 0 00-.05-.06L557.25 512l127.87-127.86c.04-.04.05-.06.05-.08a.12.12 0 000-.07c0-.03-.01-.05-.05-.09l-45.02-45.02a.2.2 0 00-.09-.05.12.12 0 00-.07 0z`}}]},name:`close-circle`,theme:`filled`};function a(){return a=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},a.apply(this,arguments)}var o=r.forwardRef((e,t)=>r.createElement(n,a({},e,{ref:t,icon:i})));export{o as t};
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
import{o as e}from"./request-DWqS4XYU.js";import{Pr as t,Rt as n}from"./jsx-runtime-Dk2XcqH2.js";var r=e(t()),i={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z`}}]},name:`down`,theme:`outlined`};function a(){return a=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},a.apply(this,arguments)}var o=r.forwardRef((e,t)=>r.createElement(n,a({},e,{ref:t,icon:i})));export{o as t};
import{o as e}from"./request-xrnk7ZJV.js";import{Pr as t,Rt as n}from"./jsx-runtime-OfKoVykY.js";var r=e(t()),i={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z`}}]},name:`down`,theme:`outlined`};function a(){return a=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},a.apply(this,arguments)}var o=r.forwardRef((e,t)=>r.createElement(n,a({},e,{ref:t,icon:i})));export{o as t};
@@ -1 +1 @@
import{o as e}from"./request-DWqS4XYU.js";import{Pr as t,Rt as n}from"./jsx-runtime-Dk2XcqH2.js";var r=e(t()),i={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm-32 232c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V296zm32 440a48.01 48.01 0 010-96 48.01 48.01 0 010 96z`}}]},name:`exclamation-circle`,theme:`filled`};function a(){return a=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},a.apply(this,arguments)}var o=r.forwardRef((e,t)=>r.createElement(n,a({},e,{ref:t,icon:i})));export{o as t};
import{o as e}from"./request-xrnk7ZJV.js";import{Pr as t,Rt as n}from"./jsx-runtime-OfKoVykY.js";var r=e(t()),i={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm-32 232c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V296zm32 440a48.01 48.01 0 010-96 48.01 48.01 0 010 96z`}}]},name:`exclamation-circle`,theme:`filled`};function a(){return a=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},a.apply(this,arguments)}var o=r.forwardRef((e,t)=>r.createElement(n,a({},e,{ref:t,icon:i})));export{o as t};
@@ -1 +1 @@
import{o as e}from"./request-DWqS4XYU.js";import{Pr as t,Rt as n}from"./jsx-runtime-Dk2XcqH2.js";var r=e(t()),i={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M942.2 486.2C847.4 286.5 704.1 186 512 186c-192.2 0-335.4 100.5-430.2 300.3a60.3 60.3 0 000 51.5C176.6 737.5 319.9 838 512 838c192.2 0 335.4-100.5 430.2-300.3 7.7-16.2 7.7-35 0-51.5zM512 766c-161.3 0-279.4-81.8-362.7-254C232.6 339.8 350.7 258 512 258c161.3 0 279.4 81.8 362.7 254C791.5 684.2 673.4 766 512 766zm-4-430c-97.2 0-176 78.8-176 176s78.8 176 176 176 176-78.8 176-176-78.8-176-176-176zm0 288c-61.9 0-112-50.1-112-112s50.1-112 112-112 112 50.1 112 112-50.1 112-112 112z`}}]},name:`eye`,theme:`outlined`};function a(){return a=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},a.apply(this,arguments)}var o=r.forwardRef((e,t)=>r.createElement(n,a({},e,{ref:t,icon:i})));export{o as t};
import{o as e}from"./request-xrnk7ZJV.js";import{Pr as t,Rt as n}from"./jsx-runtime-OfKoVykY.js";var r=e(t()),i={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M942.2 486.2C847.4 286.5 704.1 186 512 186c-192.2 0-335.4 100.5-430.2 300.3a60.3 60.3 0 000 51.5C176.6 737.5 319.9 838 512 838c192.2 0 335.4-100.5 430.2-300.3 7.7-16.2 7.7-35 0-51.5zM512 766c-161.3 0-279.4-81.8-362.7-254C232.6 339.8 350.7 258 512 258c161.3 0 279.4 81.8 362.7 254C791.5 684.2 673.4 766 512 766zm-4-430c-97.2 0-176 78.8-176 176s78.8 176 176 176 176-78.8 176-176-78.8-176-176-176zm0 288c-61.9 0-112-50.1-112-112s50.1-112 112-112 112 50.1 112 112-50.1 112-112 112z`}}]},name:`eye`,theme:`outlined`};function a(){return a=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},a.apply(this,arguments)}var o=r.forwardRef((e,t)=>r.createElement(n,a({},e,{ref:t,icon:i})));export{o as t};
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
-1
View File
@@ -1 +0,0 @@
import{o as e}from"./request-DWqS4XYU.js";import{Ct as t,Hn as n,Pr as r,Q as i,Wn as a,Z as o,at as s,mr as c,p as ee,u as te,wt as l,yt as u}from"./jsx-runtime-Dk2XcqH2.js";import{f as d,m as f,p}from"./tooltip-Up9y7xD6.js";import{a as m,o as h}from"./style-DRVsp3wL.js";import{r as g,t as _}from"./es-Hs1QDgUQ.js";var v=e(r());function y(e,t){let n=(0,v.useRef)([]),r=()=>{n.current.push(setTimeout(()=>{e.current?.input&&e.current?.input.getAttribute(`type`)===`password`&&e.current?.input.hasAttribute(`value`)&&e.current?.input.removeAttribute(`value`)}))};return(0,v.useEffect)(()=>(t&&r(),()=>n.current.forEach(e=>{e&&clearTimeout(e)})),[t]),r}function ne(e){return!!(e.prefix||e.suffix||e.allowClear||e.showCount)}var b=(0,v.forwardRef)((e,r)=>{let{prefixCls:b,bordered:re=!0,status:ie,size:ae,disabled:oe,onBlur:se,onFocus:ce,suffix:x,allowClear:S,addonAfter:C,addonBefore:w,className:T,style:E,styles:D,rootClassName:O,onChange:k,classNames:A,variant:j,...M}=e,{getPrefixCls:N,direction:P,allowClear:F,autoComplete:I,className:L,style:R,classNames:z,styles:B}=n(`input`),V=N(`input`,b),H=(0,v.useRef)(null),U=u(V),[W,le]=h(V,O);m(V,U);let{compactSize:ue,compactItemClassnames:de}=o(V,P),G=i(e=>ae??ue??e),fe=v.useContext(s),K=oe??fe,pe={...e,size:G,disabled:K},me=l(R),he=l(E),[q,J]=t([z,A],[B,me,D,he],{props:pe}),{status:ge,hasFeedback:Y,feedbackIcon:_e}=(0,v.useContext)(ee),X=d(ge,ie),ve=ne(e)||!!Y;(0,v.useRef)(ve);let Z=y(H,!0),ye=e=>{Z(),se?.(e)},be=e=>{Z(),ce?.(e)},xe=e=>{Z(),k?.(e)},Se=(Y||x)&&v.createElement(v.Fragment,null,x,Y&&_e),Ce=g({allowClear:S,contextAllowClear:F,componentName:`Input`}),[Q,$]=te(`input`,j,re);return v.createElement(_,{ref:c(r,H),prefixCls:V,autoComplete:I,...M,disabled:K,onBlur:ye,onFocus:be,style:J.root,styles:J,suffix:Se,allowClear:Ce,className:a(T,O,le,U,de,L,q.root),onChange:xe,addonBefore:w&&v.createElement(f,{form:!0,space:!0},w),addonAfter:C&&v.createElement(f,{form:!0,space:!0},C),classNames:{...q,input:a({[`${V}-sm`]:G===`small`,[`${V}-lg`]:G===`large`,[`${V}-rtl`]:P===`rtl`},q.input,W),variant:a({[`${V}-${Q}`]:$},p(V,X)),affixWrapper:a({[`${V}-affix-wrapper-sm`]:G===`small`,[`${V}-affix-wrapper-lg`]:G===`large`,[`${V}-affix-wrapper-rtl`]:P===`rtl`},W),wrapper:a({[`${V}-group-rtl`]:P===`rtl`},W),groupWrapper:a({[`${V}-group-wrapper-sm`]:G===`small`,[`${V}-group-wrapper-lg`]:G===`large`,[`${V}-group-wrapper-rtl`]:P===`rtl`,[`${V}-group-wrapper-${Q}`]:$},p(`${V}-group-wrapper`,X,Y),W)}})});export{y as n,b as t};
+1
View File
@@ -0,0 +1 @@
import{o as e}from"./request-xrnk7ZJV.js";import{Ct as t,Hn as n,Pr as r,Q as ee,Wn as i,Z as a,at as o,mr as s,p as te,u as c,wt as l,yt as ne}from"./jsx-runtime-OfKoVykY.js";import{f as re,m as u,p as d}from"./tooltip-DI_m69zk.js";import{a as f,o as p}from"./style-CSZsuTOx.js";import{r as m,t as h}from"./es-CSpN2d0Y.js";import{a as g}from"./useBreakpoint-DER0GTnn.js";var _=e(r()),v=e=>{let t=_.useRef(e),[,n]=g();return[()=>t.current,e=>{t.current=e,n()}]};function y(e,t){let n=(0,_.useRef)([]),r=()=>{n.current.push(setTimeout(()=>{e.current?.input&&e.current?.input.getAttribute(`type`)===`password`&&e.current?.input.hasAttribute(`value`)&&e.current?.input.removeAttribute(`value`)}))};return(0,_.useEffect)(()=>(t&&r(),()=>n.current.forEach(e=>{e&&clearTimeout(e)})),[t]),r}function ie(e){return!!(e.prefix||e.suffix||e.allowClear||e.showCount)}var b=(0,_.forwardRef)((e,r)=>{let{prefixCls:g,bordered:v=!0,status:b,size:ae,disabled:oe,onBlur:se,onFocus:ce,suffix:x,allowClear:le,addonAfter:S,addonBefore:C,className:w,style:T,styles:E,rootClassName:D,onChange:O,classNames:k,variant:A,...j}=e,{getPrefixCls:M,direction:N,allowClear:P,autoComplete:F,className:I,style:L,classNames:R,styles:z}=n(`input`),B=M(`input`,g),V=(0,_.useRef)(null),H=ne(B),[U,W]=p(B,D);f(B,H);let{compactSize:ue,compactItemClassnames:de}=a(B,N),G=ee(e=>ae??ue??e),fe=_.useContext(o),K=oe??fe,pe={...e,size:G,disabled:K},me=l(L),he=l(T),[q,J]=t([R,k],[z,me,E,he],{props:pe}),{status:ge,hasFeedback:Y,feedbackIcon:_e}=(0,_.useContext)(te),X=re(ge,b),ve=ie(e)||!!Y;(0,_.useRef)(ve);let Z=y(V,!0),ye=e=>{Z(),se?.(e)},be=e=>{Z(),ce?.(e)},xe=e=>{Z(),O?.(e)},Se=(Y||x)&&_.createElement(_.Fragment,null,x,Y&&_e),Ce=m({allowClear:le,contextAllowClear:P,componentName:`Input`}),[Q,$]=c(`input`,A,v);return _.createElement(h,{ref:s(r,V),prefixCls:B,autoComplete:F,...j,disabled:K,onBlur:ye,onFocus:be,style:J.root,styles:J,suffix:Se,allowClear:Ce,className:i(w,D,W,H,de,I,q.root),onChange:xe,addonBefore:C&&_.createElement(u,{form:!0,space:!0},C),addonAfter:S&&_.createElement(u,{form:!0,space:!0},S),classNames:{...q,input:i({[`${B}-sm`]:G===`small`,[`${B}-lg`]:G===`large`,[`${B}-rtl`]:N===`rtl`},q.input,U),variant:i({[`${B}-${Q}`]:$},d(B,X)),affixWrapper:i({[`${B}-affix-wrapper-sm`]:G===`small`,[`${B}-affix-wrapper-lg`]:G===`large`,[`${B}-affix-wrapper-rtl`]:N===`rtl`},U),wrapper:i({[`${B}-group-rtl`]:N===`rtl`},U),groupWrapper:i({[`${B}-group-wrapper-sm`]:G===`small`,[`${B}-group-wrapper-lg`]:G===`large`,[`${B}-group-wrapper-rtl`]:N===`rtl`,[`${B}-group-wrapper-${Q}`]:$},d(`${B}-group-wrapper`,X,Y),U)}})});export{y as n,v as r,b as t};
@@ -1,4 +1,4 @@
import{o as e}from"./request-DWqS4XYU.js";import{J as t,Nn as n,Pr as r,Rt as i}from"./jsx-runtime-Dk2XcqH2.js";var a=new n(`antMoveDownIn`,{"0%":{transform:`translate3d(0, 100%, 0)`,transformOrigin:`0 0`,opacity:0},"100%":{transform:`translate3d(0, 0, 0)`,transformOrigin:`0 0`,opacity:1}}),o=new n(`antMoveDownOut`,{"0%":{transform:`translate3d(0, 0, 0)`,transformOrigin:`0 0`,opacity:1},"100%":{transform:`translate3d(0, 100%, 0)`,transformOrigin:`0 0`,opacity:0}}),s=new n(`antMoveLeftIn`,{"0%":{transform:`translate3d(-100%, 0, 0)`,transformOrigin:`0 0`,opacity:0},"100%":{transform:`translate3d(0, 0, 0)`,transformOrigin:`0 0`,opacity:1}}),c=new n(`antMoveLeftOut`,{"0%":{transform:`translate3d(0, 0, 0)`,transformOrigin:`0 0`,opacity:1},"100%":{transform:`translate3d(-100%, 0, 0)`,transformOrigin:`0 0`,opacity:0}}),l=new n(`antMoveRightIn`,{"0%":{transform:`translate3d(100%, 0, 0)`,transformOrigin:`0 0`,opacity:0},"100%":{transform:`translate3d(0, 0, 0)`,transformOrigin:`0 0`,opacity:1}}),u=new n(`antMoveRightOut`,{"0%":{transform:`translate3d(0, 0, 0)`,transformOrigin:`0 0`,opacity:1},"100%":{transform:`translate3d(100%, 0, 0)`,transformOrigin:`0 0`,opacity:0}}),d={"move-up":{inKeyframes:new n(`antMoveUpIn`,{"0%":{transform:`translate3d(0, -100%, 0)`,transformOrigin:`0 0`,opacity:0},"100%":{transform:`translate3d(0, 0, 0)`,transformOrigin:`0 0`,opacity:1}}),outKeyframes:new n(`antMoveUpOut`,{"0%":{transform:`translate3d(0, 0, 0)`,transformOrigin:`0 0`,opacity:1},"100%":{transform:`translate3d(0, -100%, 0)`,transformOrigin:`0 0`,opacity:0}})},"move-down":{inKeyframes:a,outKeyframes:o},"move-left":{inKeyframes:s,outKeyframes:c},"move-right":{inKeyframes:l,outKeyframes:u}},f=(e,n)=>{let{antCls:r}=e,i=`${r}-${n}`,{inKeyframes:a,outKeyframes:o}=d[n];return[t(i,a,o,e.motionDurationMid),{[`
import{o as e}from"./request-xrnk7ZJV.js";import{J as t,Nn as n,Pr as r,Rt as i}from"./jsx-runtime-OfKoVykY.js";var a=new n(`antMoveDownIn`,{"0%":{transform:`translate3d(0, 100%, 0)`,transformOrigin:`0 0`,opacity:0},"100%":{transform:`translate3d(0, 0, 0)`,transformOrigin:`0 0`,opacity:1}}),o=new n(`antMoveDownOut`,{"0%":{transform:`translate3d(0, 0, 0)`,transformOrigin:`0 0`,opacity:1},"100%":{transform:`translate3d(0, 100%, 0)`,transformOrigin:`0 0`,opacity:0}}),s=new n(`antMoveLeftIn`,{"0%":{transform:`translate3d(-100%, 0, 0)`,transformOrigin:`0 0`,opacity:0},"100%":{transform:`translate3d(0, 0, 0)`,transformOrigin:`0 0`,opacity:1}}),c=new n(`antMoveLeftOut`,{"0%":{transform:`translate3d(0, 0, 0)`,transformOrigin:`0 0`,opacity:1},"100%":{transform:`translate3d(-100%, 0, 0)`,transformOrigin:`0 0`,opacity:0}}),l=new n(`antMoveRightIn`,{"0%":{transform:`translate3d(100%, 0, 0)`,transformOrigin:`0 0`,opacity:0},"100%":{transform:`translate3d(0, 0, 0)`,transformOrigin:`0 0`,opacity:1}}),u=new n(`antMoveRightOut`,{"0%":{transform:`translate3d(0, 0, 0)`,transformOrigin:`0 0`,opacity:1},"100%":{transform:`translate3d(100%, 0, 0)`,transformOrigin:`0 0`,opacity:0}}),d={"move-up":{inKeyframes:new n(`antMoveUpIn`,{"0%":{transform:`translate3d(0, -100%, 0)`,transformOrigin:`0 0`,opacity:0},"100%":{transform:`translate3d(0, 0, 0)`,transformOrigin:`0 0`,opacity:1}}),outKeyframes:new n(`antMoveUpOut`,{"0%":{transform:`translate3d(0, 0, 0)`,transformOrigin:`0 0`,opacity:1},"100%":{transform:`translate3d(0, -100%, 0)`,transformOrigin:`0 0`,opacity:0}})},"move-down":{inKeyframes:a,outKeyframes:o},"move-left":{inKeyframes:s,outKeyframes:c},"move-right":{inKeyframes:l,outKeyframes:u}},f=(e,n)=>{let{antCls:r}=e,i=`${r}-${n}`,{inKeyframes:a,outKeyframes:o}=d[n];return[t(i,a,o,e.motionDurationMid),{[`
${i}-enter,
${i}-appear
`]:{opacity:0,animationTimingFunction:e.motionEaseOutCirc},[`${i}-leave`]:{animationTimingFunction:e.motionEaseInOutCirc}}]},p=e(r()),m={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M724 218.3V141c0-6.7-7.7-10.4-12.9-6.3L260.3 486.8a31.86 31.86 0 000 50.3l450.8 352.1c5.3 4.1 12.9.4 12.9-6.3v-77.3c0-4.9-2.3-9.6-6.1-12.6l-360-281 360-281.1c3.8-3 6.1-7.7 6.1-12.6z`}}]},name:`left`,theme:`outlined`};function h(){return h=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},h.apply(this,arguments)}var g=p.forwardRef((e,t)=>p.createElement(i,h({},e,{ref:t,icon:m})));export{f as n,g as t};
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
import{o as e}from"./request-DWqS4XYU.js";import{Bn as t,Er as n,Pr as r}from"./jsx-runtime-Dk2XcqH2.js";import{t as i}from"./config-provider-C5VHLPRf.js";var a=e(r());function o(e){return t=>a.createElement(i,{theme:{token:{motion:!1,zIndexPopupBase:0}}},a.createElement(e,{...t}))}var s=(e,r,i,s,c)=>o(o=>{let{prefixCls:l,style:u}=o,d=a.useRef(null),[f,p]=a.useState(0),[m,h]=a.useState(0),[g,_]=n(!1,o.open),{getPrefixCls:v}=a.useContext(t),y=v(s||`select`,l);a.useEffect(()=>{if(_(!0),typeof ResizeObserver<`u`){let e=new ResizeObserver(e=>{let t=e[0].target;p(t.offsetHeight+8),h(t.offsetWidth)}),t=setInterval(()=>{let n=c?`.${c(y)}`:`.${y}-dropdown`,r=d.current?.querySelector(n);r&&(clearInterval(t),e.observe(r))},10);return()=>{clearInterval(t),e.disconnect()}}},[y]);let b={...o,style:{...u,margin:0},open:g,getPopupContainer:()=>d.current};i&&(b=i(b)),r&&(b={...b,[r]:{overflow:{adjustX:!1,adjustY:!1}}});let x={paddingBottom:f,position:`relative`,minWidth:m};return a.createElement(`div`,{ref:d,style:x},a.createElement(e,{...b}))});export{o as n,s as t};
import{o as e}from"./request-xrnk7ZJV.js";import{Bn as t,Er as n,Pr as r}from"./jsx-runtime-OfKoVykY.js";import{t as i}from"./config-provider-DDrois2A.js";var a=e(r());function o(e){return t=>a.createElement(i,{theme:{token:{motion:!1,zIndexPopupBase:0}}},a.createElement(e,{...t}))}var s=(e,r,i,s,c)=>o(o=>{let{prefixCls:l,style:u}=o,d=a.useRef(null),[f,p]=a.useState(0),[m,h]=a.useState(0),[g,_]=n(!1,o.open),{getPrefixCls:v}=a.useContext(t),y=v(s||`select`,l);a.useEffect(()=>{if(_(!0),typeof ResizeObserver<`u`){let e=new ResizeObserver(e=>{let t=e[0].target;p(t.offsetHeight+8),h(t.offsetWidth)}),t=setInterval(()=>{let n=c?`.${c(y)}`:`.${y}-dropdown`,r=d.current?.querySelector(n);r&&(clearInterval(t),e.observe(r))},10);return()=>{clearInterval(t),e.disconnect()}}},[y]);let b={...o,style:{...u,margin:0},open:g,getPopupContainer:()=>d.current};i&&(b=i(b)),r&&(b={...b,[r]:{overflow:{adjustX:!1,adjustY:!1}}});let x={paddingBottom:f,position:`relative`,minWidth:m};return a.createElement(`div`,{ref:d,style:x},a.createElement(e,{...b}))});export{o as n,s as t};
@@ -1 +1 @@
import{o as e}from"./request-DWqS4XYU.js";import{Pr as t,Rt as n}from"./jsx-runtime-Dk2XcqH2.js";var r=e(t()),i={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M824.8 613.2c-16-51.4-34.4-94.6-62.7-165.3C766.5 262.2 689.3 112 511.5 112 331.7 112 256.2 265.2 261 447.9c-28.4 70.8-46.7 113.7-62.7 165.3-34 109.5-23 154.8-14.6 155.8 18 2.2 70.1-82.4 70.1-82.4 0 49 25.2 112.9 79.8 159-26.4 8.1-85.7 29.9-71.6 53.8 11.4 19.3 196.2 12.3 249.5 6.3 53.3 6 238.1 13 249.5-6.3 14.1-23.8-45.3-45.7-71.6-53.8 54.6-46.2 79.8-110.1 79.8-159 0 0 52.1 84.6 70.1 82.4 8.5-1.1 19.5-46.4-14.5-155.8z`}}]},name:`qq`,theme:`outlined`};function a(){return a=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},a.apply(this,arguments)}var o=r.forwardRef((e,t)=>r.createElement(n,a({},e,{ref:t,icon:i})));export{o as t};
import{o as e}from"./request-xrnk7ZJV.js";import{Pr as t,Rt as n}from"./jsx-runtime-OfKoVykY.js";var r=e(t()),i={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M824.8 613.2c-16-51.4-34.4-94.6-62.7-165.3C766.5 262.2 689.3 112 511.5 112 331.7 112 256.2 265.2 261 447.9c-28.4 70.8-46.7 113.7-62.7 165.3-34 109.5-23 154.8-14.6 155.8 18 2.2 70.1-82.4 70.1-82.4 0 49 25.2 112.9 79.8 159-26.4 8.1-85.7 29.9-71.6 53.8 11.4 19.3 196.2 12.3 249.5 6.3 53.3 6 238.1 13 249.5-6.3 14.1-23.8-45.3-45.7-71.6-53.8 54.6-46.2 79.8-110.1 79.8-159 0 0 52.1 84.6 70.1 82.4 8.5-1.1 19.5-46.4-14.5-155.8z`}}]},name:`qq`,theme:`outlined`};function a(){return a=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},a.apply(this,arguments)}var o=r.forwardRef((e,t)=>r.createElement(n,a({},e,{ref:t,icon:i})));export{o as t};
@@ -1 +1 @@
import{o as e}from"./request-DWqS4XYU.js";import{Pr as t,Rt as n}from"./jsx-runtime-Dk2XcqH2.js";var r=e(t()),i={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M909.6 854.5L649.9 594.8C690.2 542.7 712 479 712 412c0-80.2-31.3-155.4-87.9-212.1-56.6-56.7-132-87.9-212.1-87.9s-155.5 31.3-212.1 87.9C143.2 256.5 112 331.8 112 412c0 80.1 31.3 155.5 87.9 212.1C256.5 680.8 331.8 712 412 712c67 0 130.6-21.8 182.7-62l259.7 259.6a8.2 8.2 0 0011.6 0l43.6-43.5a8.2 8.2 0 000-11.6zM570.4 570.4C528 612.7 471.8 636 412 636s-116-23.3-158.4-65.6C211.3 528 188 471.8 188 412s23.3-116.1 65.6-158.4C296 211.3 352.2 188 412 188s116.1 23.2 158.4 65.6S636 352.2 636 412s-23.3 116.1-65.6 158.4z`}}]},name:`search`,theme:`outlined`};function a(){return a=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},a.apply(this,arguments)}var o=r.forwardRef((e,t)=>r.createElement(n,a({},e,{ref:t,icon:i})));export{o as t};
import{o as e}from"./request-xrnk7ZJV.js";import{Pr as t,Rt as n}from"./jsx-runtime-OfKoVykY.js";var r=e(t()),i={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M909.6 854.5L649.9 594.8C690.2 542.7 712 479 712 412c0-80.2-31.3-155.4-87.9-212.1-56.6-56.7-132-87.9-212.1-87.9s-155.5 31.3-212.1 87.9C143.2 256.5 112 331.8 112 412c0 80.1 31.3 155.5 87.9 212.1C256.5 680.8 331.8 712 412 712c67 0 130.6-21.8 182.7-62l259.7 259.6a8.2 8.2 0 0011.6 0l43.6-43.5a8.2 8.2 0 000-11.6zM570.4 570.4C528 612.7 471.8 636 412 636s-116-23.3-158.4-65.6C211.3 528 188 471.8 188 412s23.3-116.1 65.6-158.4C296 211.3 352.2 188 412 188s116.1 23.2 158.4 65.6S636 352.2 636 412s-23.3 116.1-65.6 158.4z`}}]},name:`search`,theme:`outlined`};function a(){return a=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},a.apply(this,arguments)}var o=r.forwardRef((e,t)=>r.createElement(n,a({},e,{ref:t,icon:i})));export{o as t};
@@ -1 +1 @@
import{o as e}from"./request-DWqS4XYU.js";import{Pr as t,Rt as n}from"./jsx-runtime-Dk2XcqH2.js";var r=e(t()),i={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M858.5 763.6a374 374 0 00-80.6-119.5 375.63 375.63 0 00-119.5-80.6c-.4-.2-.8-.3-1.2-.5C719.5 518 760 444.7 760 362c0-137-111-248-248-248S264 225 264 362c0 82.7 40.5 156 102.8 201.1-.4.2-.8.3-1.2.5-44.8 18.9-85 46-119.5 80.6a375.63 375.63 0 00-80.6 119.5A371.7 371.7 0 00136 901.8a8 8 0 008 8.2h60c4.4 0 7.9-3.5 8-7.8 2-77.2 33-149.5 87.8-204.3 56.7-56.7 132-87.9 212.2-87.9s155.5 31.2 212.2 87.9C779 752.7 810 825 812 902.2c.1 4.4 3.6 7.8 8 7.8h60a8 8 0 008-8.2c-1-47.8-10.9-94.3-29.5-138.2zM512 534c-45.9 0-89.1-17.9-121.6-50.4S340 407.9 340 362c0-45.9 17.9-89.1 50.4-121.6S466.1 190 512 190s89.1 17.9 121.6 50.4S684 316.1 684 362c0 45.9-17.9 89.1-50.4 121.6S557.9 534 512 534z`}}]},name:`user`,theme:`outlined`};function a(){return a=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},a.apply(this,arguments)}var o=r.forwardRef((e,t)=>r.createElement(n,a({},e,{ref:t,icon:i})));export{o as t};
import{o as e}from"./request-xrnk7ZJV.js";import{Pr as t,Rt as n}from"./jsx-runtime-OfKoVykY.js";var r=e(t()),i={icon:{tag:`svg`,attrs:{viewBox:`64 64 896 896`,focusable:`false`},children:[{tag:`path`,attrs:{d:`M858.5 763.6a374 374 0 00-80.6-119.5 375.63 375.63 0 00-119.5-80.6c-.4-.2-.8-.3-1.2-.5C719.5 518 760 444.7 760 362c0-137-111-248-248-248S264 225 264 362c0 82.7 40.5 156 102.8 201.1-.4.2-.8.3-1.2.5-44.8 18.9-85 46-119.5 80.6a375.63 375.63 0 00-80.6 119.5A371.7 371.7 0 00136 901.8a8 8 0 008 8.2h60c4.4 0 7.9-3.5 8-7.8 2-77.2 33-149.5 87.8-204.3 56.7-56.7 132-87.9 212.2-87.9s155.5 31.2 212.2 87.9C779 752.7 810 825 812 902.2c.1 4.4 3.6 7.8 8 7.8h60a8 8 0 008-8.2c-1-47.8-10.9-94.3-29.5-138.2zM512 534c-45.9 0-89.1-17.9-121.6-50.4S340 407.9 340 362c0-45.9 17.9-89.1 50.4-121.6S466.1 190 512 190s89.1 17.9 121.6 50.4S684 316.1 684 362c0 45.9-17.9 89.1-50.4 121.6S557.9 534 512 534z`}}]},name:`user`,theme:`outlined`};function a(){return a=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},a.apply(this,arguments)}var o=r.forwardRef((e,t)=>r.createElement(n,a({},e,{ref:t,icon:i})));export{o as t};
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
import{t as e}from"./request-DWqS4XYU.js";async function t(){return e({url:`/ai/agent`,method:`get`})}async function n(t){return e({url:`/ai/agent/${t}`,method:`get`})}async function r(t,n){return e({url:`/ai/agent/${t}`,method:`put`,data:n})}export{t as n,r,n as t};
import{t as e}from"./request-xrnk7ZJV.js";async function t(){return e({url:`/ai/agent`,method:`get`})}async function n(t){return e({url:`/ai/agent/${t}`,method:`get`})}async function r(t,n){return e({url:`/ai/agent/${t}`,method:`put`,data:n})}export{t as n,r,n as t};
@@ -1 +1 @@
import{o as e}from"./request-DWqS4XYU.js";import{Pr as t,t as n}from"./jsx-runtime-Dk2XcqH2.js";import{o as r}from"./chunk-OB3PAWPO-6cTVLEZE.js";import{t as i}from"./typography-DvDsdb2f.js";import{t as a}from"./tooltip-Up9y7xD6.js";import{t as o}from"./space-DZlFkFGY.js";import{t as s}from"./button-CdrnzceP.js";import{t as c}from"./card-CAlqEh_K.js";import{t as l}from"./spin-BQRqgLXi.js";import{t as u}from"./tag-Dh4xJ3v_.js";import{t as d}from"./useTranslation-BktiQivz.js";import{$t as f,Ht as p,bt as m,lt as h,rn as g}from"./index-kOY0oRfZ.js";import{n as _,r as v}from"./agent-VZOA_xNn.js";var y=e(t(),1),b=n(),{Title:x,Text:S,Paragraph:C}=i;function w(){let{t:e}=d(),{token:t}=h.useToken(),{message:n}=g.useApp(),i=r(),[w,T]=(0,y.useState)([]),[E,D]=(0,y.useState)(!1),O=(0,y.useCallback)(async()=>{D(!0);try{let e=await _();T(e.data.data??[])}finally{D(!1)}},[]);(0,y.useEffect)(()=>{O()},[O]);let k=async(t,r)=>{try{await v(t,{enabled:r}),T(e=>e.map(e=>e.id===t?{...e,enabled:r}:e)),n.success(e(`ai.agent.update.success`))}catch{n.error(e(`ai.agent.update.failed`))}};return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`flex-start`,marginBottom:t.marginLG},children:(0,b.jsxs)(`div`,{children:[(0,b.jsx)(x,{level:3,style:{marginBottom:t.marginXS},children:e(`ai.agent.page.title`)}),(0,b.jsx)(S,{type:`secondary`,children:e(`ai.agent.page.description`)})]})}),(0,b.jsx)(l,{spinning:E,children:w.length>0?(0,b.jsx)(`div`,{className:`flex flex-wrap gap-6`,children:w.map(n=>(0,b.jsx)(a,{title:n.description,children:(0,b.jsxs)(c,{hoverable:!0,variant:`borderless`,styles:{body:{width:300,padding:20,overflow:`hidden`}},children:[(0,b.jsxs)(`div`,{className:`flex justify-between items-center mb-2.5`,children:[(0,b.jsxs)(o,{align:`center`,children:[(0,b.jsx)(p,{src:n.icon,size:32}),(0,b.jsx)(`span`,{style:{fontWeight:700,fontSize:18},children:n.name})]}),(0,b.jsx)(m,{checked:n.enabled,size:`small`,onChange:e=>k(n.id,e)})]}),(0,b.jsx)(C,{type:`secondary`,ellipsis:{rows:2},style:{marginBottom:t.marginSM},children:n.description}),(0,b.jsx)(o,{size:[4,4],wrap:!0,children:n.tags?.map(e=>(0,b.jsx)(u,{color:`blue`,children:e},e))}),(0,b.jsx)(`div`,{style:{marginTop:t.marginSM},children:(0,b.jsx)(s,{type:`primary`,size:`small`,block:!0,onClick:()=>i(`/ai/chat?agent_id=${n.id}`),children:e(`ai.agent.goChat`)})})]})}))}):(0,b.jsx)(f,{description:e(`ai.agent.empty`)})})]})}export{w as default};
import{o as e}from"./request-xrnk7ZJV.js";import{Pr as t,t as n}from"./jsx-runtime-OfKoVykY.js";import{o as r}from"./chunk-OB3PAWPO-D_lbwNck.js";import{t as i}from"./typography-C81dpVAv.js";import{t as a}from"./tooltip-DI_m69zk.js";import{t as o}from"./space-JYtHxLjg.js";import{t as s}from"./button-DsOd0cni.js";import{t as c}from"./card-C-jMUkpS.js";import{t as l}from"./spin-CELNGCax.js";import{t as u}from"./tag-CY8tAhzO.js";import{t as d}from"./useTranslation-C4ZVtLa2.js";import{$t as f,Ht as p,bt as m,lt as h,rn as g}from"./index-Cf1llsZx.js";import{n as _,r as v}from"./agent-CGxkD5Jw.js";var y=e(t(),1),b=n(),{Title:x,Text:S,Paragraph:C}=i;function w(){let{t:e}=d(),{token:t}=h.useToken(),{message:n}=g.useApp(),i=r(),[w,T]=(0,y.useState)([]),[E,D]=(0,y.useState)(!1),O=(0,y.useCallback)(async()=>{D(!0);try{let e=await _();T(e.data.data??[])}finally{D(!1)}},[]);(0,y.useEffect)(()=>{O()},[O]);let k=async(t,r)=>{try{await v(t,{enabled:r}),T(e=>e.map(e=>e.id===t?{...e,enabled:r}:e)),n.success(e(`ai.agent.update.success`))}catch{n.error(e(`ai.agent.update.failed`))}};return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`flex-start`,marginBottom:t.marginLG},children:(0,b.jsxs)(`div`,{children:[(0,b.jsx)(x,{level:3,style:{marginBottom:t.marginXS},children:e(`ai.agent.page.title`)}),(0,b.jsx)(S,{type:`secondary`,children:e(`ai.agent.page.description`)})]})}),(0,b.jsx)(l,{spinning:E,children:w.length>0?(0,b.jsx)(`div`,{className:`flex flex-wrap gap-6`,children:w.map(n=>(0,b.jsx)(a,{title:n.description,children:(0,b.jsxs)(c,{hoverable:!0,variant:`borderless`,styles:{body:{width:300,padding:20,overflow:`hidden`}},children:[(0,b.jsxs)(`div`,{className:`flex justify-between items-center mb-2.5`,children:[(0,b.jsxs)(o,{align:`center`,children:[(0,b.jsx)(p,{src:n.icon,size:32}),(0,b.jsx)(`span`,{style:{fontWeight:700,fontSize:18},children:n.name})]}),(0,b.jsx)(m,{checked:n.enabled,size:`small`,onChange:e=>k(n.id,e)})]}),(0,b.jsx)(C,{type:`secondary`,ellipsis:{rows:2},style:{marginBottom:t.marginSM},children:n.description}),(0,b.jsx)(o,{size:[4,4],wrap:!0,children:n.tags?.map(e=>(0,b.jsx)(u,{color:`blue`,children:e},e))}),(0,b.jsx)(`div`,{style:{marginTop:t.marginSM},children:(0,b.jsx)(s,{type:`primary`,size:`small`,block:!0,onClick:()=>i(`/ai/chat?agent_id=${n.id}`),children:e(`ai.agent.goChat`)})})]})}))}):(0,b.jsx)(f,{description:e(`ai.agent.empty`)})})]})}export{w as default};
+1
View File
@@ -0,0 +1 @@
import{o as e}from"./request-xrnk7ZJV.js";import{Pr as t,t as n}from"./jsx-runtime-OfKoVykY.js";import{o as r}from"./chunk-OB3PAWPO-D_lbwNck.js";import{t as i}from"./typography-C81dpVAv.js";import{t as a}from"./tooltip-DI_m69zk.js";import{t as o}from"./space-JYtHxLjg.js";import{t as s}from"./button-DsOd0cni.js";import{t as c}from"./card-C-jMUkpS.js";import{t as l}from"./spin-CELNGCax.js";import{t as u}from"./tag-CY8tAhzO.js";import{t as d}from"./useTranslation-C4ZVtLa2.js";import{$t as f,Ht as p,bt as m,lt as h,rn as g}from"./index-DMEx4_h0.js";import{n as _,r as v}from"./agent-CGxkD5Jw.js";var y=e(t(),1),b=n(),{Title:x,Text:S,Paragraph:C}=i;function w(){let{t:e}=d(),{token:t}=h.useToken(),{message:n}=g.useApp(),i=r(),[w,T]=(0,y.useState)([]),[E,D]=(0,y.useState)(!1),O=(0,y.useCallback)(async()=>{D(!0);try{let e=await _();T(e.data.data??[])}finally{D(!1)}},[]);(0,y.useEffect)(()=>{O()},[O]);let k=async(t,r)=>{try{await v(t,{enabled:r}),T(e=>e.map(e=>e.id===t?{...e,enabled:r}:e)),n.success(e(`ai.agent.update.success`))}catch{n.error(e(`ai.agent.update.failed`))}};return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`flex-start`,marginBottom:t.marginLG},children:(0,b.jsxs)(`div`,{children:[(0,b.jsx)(x,{level:3,style:{marginBottom:t.marginXS},children:e(`ai.agent.page.title`)}),(0,b.jsx)(S,{type:`secondary`,children:e(`ai.agent.page.description`)})]})}),(0,b.jsx)(l,{spinning:E,children:w.length>0?(0,b.jsx)(`div`,{className:`flex flex-wrap gap-6`,children:w.map(n=>(0,b.jsx)(a,{title:n.description,children:(0,b.jsxs)(c,{hoverable:!0,variant:`borderless`,styles:{body:{width:300,padding:20,overflow:`hidden`}},children:[(0,b.jsxs)(`div`,{className:`flex justify-between items-center mb-2.5`,children:[(0,b.jsxs)(o,{align:`center`,children:[(0,b.jsx)(p,{src:n.icon,size:32}),(0,b.jsx)(`span`,{style:{fontWeight:700,fontSize:18},children:n.name})]}),(0,b.jsx)(m,{checked:n.enabled,size:`small`,onChange:e=>k(n.id,e)})]}),(0,b.jsx)(C,{type:`secondary`,ellipsis:{rows:2},style:{marginBottom:t.marginSM},children:n.description}),(0,b.jsx)(o,{size:[4,4],wrap:!0,children:n.tags?.map(e=>(0,b.jsx)(u,{color:`blue`,children:e},e))}),(0,b.jsx)(`div`,{style:{marginTop:t.marginSM},children:(0,b.jsx)(s,{type:`primary`,size:`small`,block:!0,onClick:()=>i(`/ai/chat?agent_id=${n.id}`),children:e(`ai.agent.goChat`)})})]})}))}):(0,b.jsx)(f,{description:e(`ai.agent.empty`)})})]})}export{w as default};
+1
View File
@@ -0,0 +1 @@
import{o as e}from"./request-xrnk7ZJV.js";import{Pr as t,t as n}from"./jsx-runtime-OfKoVykY.js";import{o as r}from"./chunk-OB3PAWPO-D_lbwNck.js";import{t as i}from"./typography-C81dpVAv.js";import{t as a}from"./tooltip-DI_m69zk.js";import{t as o}from"./space-JYtHxLjg.js";import{t as s}from"./button-DsOd0cni.js";import{t as c}from"./card-C-jMUkpS.js";import{t as l}from"./spin-CELNGCax.js";import{t as u}from"./tag-CY8tAhzO.js";import{t as d}from"./useTranslation-C4ZVtLa2.js";import{$t as f,Ht as p,bt as m,lt as h,rn as g}from"./index-DLqXr84t.js";import{n as _,r as v}from"./agent-CGxkD5Jw.js";var y=e(t(),1),b=n(),{Title:x,Text:S,Paragraph:C}=i;function w(){let{t:e}=d(),{token:t}=h.useToken(),{message:n}=g.useApp(),i=r(),[w,T]=(0,y.useState)([]),[E,D]=(0,y.useState)(!1),O=(0,y.useCallback)(async()=>{D(!0);try{let e=await _();T(e.data.data??[])}finally{D(!1)}},[]);(0,y.useEffect)(()=>{O()},[O]);let k=async(t,r)=>{try{await v(t,{enabled:r}),T(e=>e.map(e=>e.id===t?{...e,enabled:r}:e)),n.success(e(`ai.agent.update.success`))}catch{n.error(e(`ai.agent.update.failed`))}};return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`flex-start`,marginBottom:t.marginLG},children:(0,b.jsxs)(`div`,{children:[(0,b.jsx)(x,{level:3,style:{marginBottom:t.marginXS},children:e(`ai.agent.page.title`)}),(0,b.jsx)(S,{type:`secondary`,children:e(`ai.agent.page.description`)})]})}),(0,b.jsx)(l,{spinning:E,children:w.length>0?(0,b.jsx)(`div`,{className:`flex flex-wrap gap-6`,children:w.map(n=>(0,b.jsx)(a,{title:n.description,children:(0,b.jsxs)(c,{hoverable:!0,variant:`borderless`,styles:{body:{width:300,padding:20,overflow:`hidden`}},children:[(0,b.jsxs)(`div`,{className:`flex justify-between items-center mb-2.5`,children:[(0,b.jsxs)(o,{align:`center`,children:[(0,b.jsx)(p,{src:n.icon,size:32}),(0,b.jsx)(`span`,{style:{fontWeight:700,fontSize:18},children:n.name})]}),(0,b.jsx)(m,{checked:n.enabled,size:`small`,onChange:e=>k(n.id,e)})]}),(0,b.jsx)(C,{type:`secondary`,ellipsis:{rows:2},style:{marginBottom:t.marginSM},children:n.description}),(0,b.jsx)(o,{size:[4,4],wrap:!0,children:n.tags?.map(e=>(0,b.jsx)(u,{color:`blue`,children:e},e))}),(0,b.jsx)(`div`,{style:{marginTop:t.marginSM},children:(0,b.jsx)(s,{type:`primary`,size:`small`,block:!0,onClick:()=>i(`/ai/chat?agent_id=${n.id}`),children:e(`ai.agent.goChat`)})})]})}))}):(0,b.jsx)(f,{description:e(`ai.agent.empty`)})})]})}export{w as default};
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
import"./request-DWqS4XYU.js";import{Pr as e,t}from"./jsx-runtime-Dk2XcqH2.js";import{t as n}from"./typography-DvDsdb2f.js";import{t as r}from"./image-Dk7hCtCg.js";import{t as i}from"./tag-Dh4xJ3v_.js";import{t as a}from"./XinTable-Ckq4e_EB.js";e();var o={0:{text:`停用`,color:`error`},1:{text:`正常`,color:`success`}},s=t(),{Title:c,Text:l}=n,u=()=>(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(`div`,{className:`mb-5`,children:[(0,s.jsx)(c,{level:3,children:`首页轮播图`}),(0,s.jsx)(l,{type:`secondary`,children:`小程序首页顶部轮播图;停用后不展示,排序越小越靠前;跳转链接为小程序页面路径,留空则点击不跳转。`})]}),(0,s.jsx)(a,{api:`/client/banner`,columns:[{title:`ID`,dataIndex:`id`,hideInForm:!0,hideInSearch:!0,width:70,align:`center`},{title:`标题`,dataIndex:`title`,valueType:`text`,required:!0,rules:[{required:!0,message:`请输入轮播图标题`}]},{title:`轮播图片`,dataIndex:`image_id`,valueType:`image`,required:!0,rules:[{required:!0,message:`请上传轮播图片`}],fieldProps:{action:`/client/banner/upload`,mode:`single`,maxCount:1,changeType:`id`},render:(e,t)=>{let n=t.image_url;return n?(0,s.jsx)(r,{src:n,width:80,height:40,style:{objectFit:`cover`,borderRadius:4}}):`-`},align:`center`,hideInSearch:!0},{title:`跳转链接`,dataIndex:`link`,valueType:`text`,hideInSearch:!0,fieldProps:{placeholder:`小程序页面路径,如 /pages/goods/detail?id=1`},render:(e,t)=>t.link||`-`},{title:`排序`,dataIndex:`sort`,valueType:`digit`,hideInSearch:!0,initialValue:0,fieldProps:{min:0,precision:0},align:`center`,width:80},{title:`状态`,dataIndex:`status`,valueType:`radioButton`,initialValue:1,fieldProps:{options:[{value:1,label:`正常`},{value:0,label:`停用`}]},render:(e,t)=>{let n=o[t.status??1];return(0,s.jsx)(i,{color:n?.color,children:n?.text})},align:`center`,width:90},{title:`创建时间`,dataIndex:`created_at`,hideInForm:!0,hideInSearch:!0,align:`center`}],rowKey:`id`,accessName:`client.banner`,formProps:{grid:!0,colProps:{span:12},layout:`vertical`,rowProps:{gutter:24}},modalProps:{width:640}})]});export{u as default};
import"./request-xrnk7ZJV.js";import{Pr as e,t}from"./jsx-runtime-OfKoVykY.js";import{t as n}from"./typography-C81dpVAv.js";import{t as r}from"./image-D2CF6Ecw.js";import{t as i}from"./tag-CY8tAhzO.js";import{t as a}from"./XinTable-1TzMt4Ci.js";e();var o={0:{text:`停用`,color:`error`},1:{text:`正常`,color:`success`}},s=t(),{Title:c,Text:l}=n,u=()=>(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(`div`,{className:`mb-5`,children:[(0,s.jsx)(c,{level:3,children:`首页轮播图`}),(0,s.jsx)(l,{type:`secondary`,children:`小程序首页顶部轮播图;停用后不展示,排序越小越靠前;跳转链接为小程序页面路径,留空则点击不跳转。`})]}),(0,s.jsx)(a,{api:`/client/banner`,columns:[{title:`ID`,dataIndex:`id`,hideInForm:!0,hideInSearch:!0,width:70,align:`center`},{title:`标题`,dataIndex:`title`,valueType:`text`,required:!0,rules:[{required:!0,message:`请输入轮播图标题`}]},{title:`轮播图片`,dataIndex:`image_id`,valueType:`image`,required:!0,rules:[{required:!0,message:`请上传轮播图片`}],fieldProps:{action:`/client/banner/upload`,mode:`single`,maxCount:1,changeType:`id`},render:(e,t)=>{let n=t.image_url;return n?(0,s.jsx)(r,{src:n,width:80,height:40,style:{objectFit:`cover`,borderRadius:4}}):`-`},align:`center`,hideInSearch:!0},{title:`跳转链接`,dataIndex:`link`,valueType:`text`,hideInSearch:!0,fieldProps:{placeholder:`小程序页面路径,如 /pages/goods/detail?id=1`},render:(e,t)=>t.link||`-`},{title:`排序`,dataIndex:`sort`,valueType:`digit`,hideInSearch:!0,initialValue:0,fieldProps:{min:0,precision:0},align:`center`,width:80},{title:`状态`,dataIndex:`status`,valueType:`radioButton`,initialValue:1,fieldProps:{options:[{value:1,label:`正常`},{value:0,label:`停用`}]},render:(e,t)=>{let n=o[t.status??1];return(0,s.jsx)(i,{color:n?.color,children:n?.text})},align:`center`,width:90},{title:`创建时间`,dataIndex:`created_at`,hideInForm:!0,hideInSearch:!0,align:`center`}],rowKey:`id`,accessName:`client.banner`,formProps:{grid:!0,colProps:{span:12},layout:`vertical`,rowProps:{gutter:24}},modalProps:{width:640}})]});export{u as default};
+1
View File
@@ -0,0 +1 @@
import"./request-xrnk7ZJV.js";import{Pr as e,t}from"./jsx-runtime-OfKoVykY.js";import{t as n}from"./typography-C81dpVAv.js";import{t as r}from"./image-De67jw-e.js";import{t as i}from"./tag-CY8tAhzO.js";import{t as a}from"./XinTable-C5M2dV7B.js";e();var o={0:{text:`停用`,color:`error`},1:{text:`正常`,color:`success`}},s=t(),{Title:c,Text:l}=n,u=()=>(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(`div`,{className:`mb-5`,children:[(0,s.jsx)(c,{level:3,children:`首页轮播图`}),(0,s.jsx)(l,{type:`secondary`,children:`小程序首页顶部轮播图;停用后不展示,排序越小越靠前;跳转链接为小程序页面路径,留空则点击不跳转。`})]}),(0,s.jsx)(a,{api:`/client/banner`,columns:[{title:`ID`,dataIndex:`id`,hideInForm:!0,hideInSearch:!0,width:70,align:`center`},{title:`标题`,dataIndex:`title`,valueType:`text`,required:!0,rules:[{required:!0,message:`请输入轮播图标题`}]},{title:`轮播图片`,dataIndex:`image_id`,valueType:`image`,required:!0,rules:[{required:!0,message:`请上传轮播图片`}],fieldProps:{action:`/client/banner/upload`,mode:`single`,maxCount:1,changeType:`id`},render:(e,t)=>{let n=t.image_url;return n?(0,s.jsx)(r,{src:n,width:80,height:40,style:{objectFit:`cover`,borderRadius:4}}):`-`},align:`center`,hideInSearch:!0},{title:`跳转链接`,dataIndex:`link`,valueType:`text`,hideInSearch:!0,fieldProps:{placeholder:`小程序页面路径,如 /pages/goods/detail?id=1`},render:(e,t)=>t.link||`-`},{title:`排序`,dataIndex:`sort`,valueType:`digit`,hideInSearch:!0,initialValue:0,fieldProps:{min:0,precision:0},align:`center`,width:80},{title:`状态`,dataIndex:`status`,valueType:`radioButton`,initialValue:1,fieldProps:{options:[{value:1,label:`正常`},{value:0,label:`停用`}]},render:(e,t)=>{let n=o[t.status??1];return(0,s.jsx)(i,{color:n?.color,children:n?.text})},align:`center`,width:90},{title:`创建时间`,dataIndex:`created_at`,hideInForm:!0,hideInSearch:!0,align:`center`}],rowKey:`id`,accessName:`client.banner`,formProps:{grid:!0,colProps:{span:12},layout:`vertical`,rowProps:{gutter:24}},modalProps:{width:640}})]});export{u as default};
+1
View File
@@ -0,0 +1 @@
import"./request-xrnk7ZJV.js";import{Pr as e,t}from"./jsx-runtime-OfKoVykY.js";import{t as n}from"./typography-C81dpVAv.js";import{t as r}from"./image-B23_bhQM.js";import{t as i}from"./tag-CY8tAhzO.js";import{t as a}from"./XinTable-B8iT02Iv.js";e();var o={0:{text:`停用`,color:`error`},1:{text:`正常`,color:`success`}},s=t(),{Title:c,Text:l}=n,u=()=>(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(`div`,{className:`mb-5`,children:[(0,s.jsx)(c,{level:3,children:`首页轮播图`}),(0,s.jsx)(l,{type:`secondary`,children:`小程序首页顶部轮播图;停用后不展示,排序越小越靠前;跳转链接为小程序页面路径,留空则点击不跳转。`})]}),(0,s.jsx)(a,{api:`/client/banner`,columns:[{title:`ID`,dataIndex:`id`,hideInForm:!0,hideInSearch:!0,width:70,align:`center`},{title:`标题`,dataIndex:`title`,valueType:`text`,required:!0,rules:[{required:!0,message:`请输入轮播图标题`}]},{title:`轮播图片`,dataIndex:`image_id`,valueType:`image`,required:!0,rules:[{required:!0,message:`请上传轮播图片`}],fieldProps:{action:`/client/banner/upload`,mode:`single`,maxCount:1,changeType:`id`},render:(e,t)=>{let n=t.image_url;return n?(0,s.jsx)(r,{src:n,width:80,height:40,style:{objectFit:`cover`,borderRadius:4}}):`-`},align:`center`,hideInSearch:!0},{title:`跳转链接`,dataIndex:`link`,valueType:`text`,hideInSearch:!0,fieldProps:{placeholder:`小程序页面路径,如 /pages/goods/detail?id=1`},render:(e,t)=>t.link||`-`},{title:`排序`,dataIndex:`sort`,valueType:`digit`,hideInSearch:!0,initialValue:0,fieldProps:{min:0,precision:0},align:`center`,width:80},{title:`状态`,dataIndex:`status`,valueType:`radioButton`,initialValue:1,fieldProps:{options:[{value:1,label:`正常`},{value:0,label:`停用`}]},render:(e,t)=>{let n=o[t.status??1];return(0,s.jsx)(i,{color:n?.color,children:n?.text})},align:`center`,width:90},{title:`创建时间`,dataIndex:`created_at`,hideInForm:!0,hideInSearch:!0,align:`center`}],rowKey:`id`,accessName:`client.banner`,formProps:{grid:!0,colProps:{span:12},layout:`vertical`,rowProps:{gutter:24}},modalProps:{width:640}})]});export{u as default};
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long

Some files were not shown because too many files have changed in this diff Show More