Compare commits

...

5 Commits

Author SHA1 Message Date
vine_liutk 4162e6946e 完善首页 2023-06-09 16:20:46 +08:00
vine_liutk c8c4b65aff 完善费用清单 2023-06-08 18:58:53 +08:00
vine_liutk 4525c3e4e9 调整 2023-06-08 17:53:30 +08:00
vine_liutk f3f6fe6df1 调整展示内容 2023-06-08 16:56:53 +08:00
vine_liutk 2e6ed6b5be 完善结算动作 2023-06-07 15:23:10 +08:00
149 changed files with 11696 additions and 199 deletions

View File

@ -2,6 +2,7 @@
namespace App\Admin;
use Carbon\Carbon;
use App\Models\Keyword;
use Slowlyo\OwlAdmin\Renderers\BaseRenderer;
@ -109,7 +110,7 @@ class Components extends BaseRenderer {
$tips.= '<br/> {a'.$i.'}: {c'.$i.'}'.($item['unit'] ?? '');
//纵坐标
$yAxisData[] = [
'name'=>$item['name'].($item['unit'] ?? ''),
// 'name'=>$item['unit'] ?? '',
'type' =>'value',
'axisTick' => true,
'alignTicks' => true,
@ -128,6 +129,8 @@ class Components extends BaseRenderer {
'name' => $item['name'] ?? '',
'data' => $item['data'] ?? [],
'type' => $item['type'] ?? 'line',
// 'smooth'=> true,
// 'symbol'=>'none',
'yAxisIndex' => $i,
];
switch($item['type']){
@ -164,6 +167,8 @@ class Components extends BaseRenderer {
'grid' => [
'left' => '8%',
'right' => '8%',
'top' => 60,
'bottom' => 30
],
'xAxis' => [
'type' => 'category',
@ -176,9 +181,39 @@ class Components extends BaseRenderer {
/**
* 生成饼状图config
* -todo
*
*/
public function chartPieConfig(){
return ;
public function chartPieConfig($title, $data){
return [
'title' => [
'text' => $title,
],
"tooltip" => [//提示
'trigger'=>'item',
],
"legend" => [
"bottom"=> '0',
"left" => 'center',
],
"series" => [
"name" => $title,
"type" => 'pie',
"avoidLabelOverlap" => false,
"itemStyle" => [
"borderRadius"=> 10,
"borderColor"=>'#fff',
"borderWidth" => 2,
],
"label" => [
"show"=>true,
// "position"=>'center',
"formatter" => '{b} {d}%',
],
"labelLive"=>[
"show"=>false,
],
"data" => $data,
]
];
}
}

View File

@ -0,0 +1,88 @@
<?php
namespace App\Admin\Controllers;
use App\Models\ConstFlow;
use Slowlyo\OwlAdmin\Renderers\Page;
use Slowlyo\OwlAdmin\Renderers\Form;
use Slowlyo\OwlAdmin\Controllers\AdminController;
use App\Services\Admin\ConstFlowService;
use Illuminate\Http\Request;
/**
* 费用明细
*
* @property ConstFlowService $service
*/
class ConstFlowController extends AdminController
{
protected string $serviceName = ConstFlowService::class;
public function list(): Page
{
$crud = $this->baseCRUD()
->filterTogglable(false)
->headerToolbar([
])
->filter(
$this->baseFilter()->body([
amisMake()->TextControl('name', '名称')->size('md'),
amisMake()->TextControl('card_no', '身份证')->size('md'),
amis('button')->label(__('admin.reset'))->actionType('clear-and-submit'),
amis('submit')->label(__('admin.search'))->level('primary'),
])->actions([])
)
->columns([
amisMake()->TableColumn('id', 'ID')->sortable(),
amisMake()->TableColumn('oldman.name', '客人'),
amisMake()->TableColumn('const_type', '缴费类型')->type('mapping')->map(ConstFlow::typeMapLabel())->className('text-primary'),
amisMake()->TableColumn('money', '金额'),
amisMake()->TableColumn('created_at', '办理时间')->type('datetime')->sortable(true),
amisMake()->Operation()->label(__('admin.actions'))->buttons([
$this->showFlow(),
//打印票据
]),
]);
return $this->baseList($crud);
}
public function form($isEdit = false): Form
{
return $this->baseForm()->body([
]);
}
public function showFlow(){
return amisMake()->DialogAction()->icon('fa-regular fa-eye')->label('费用清单')->level('link')->dialog(
amisMake()->Dialog()->title('查看详情')->body([
\amisMake()->Service()->schemaApi(admin_url('flow-list-tabs?id=${id}'))
])->size('lg')->actions([])
);
}
public function flowExtendList(Request $request)
{
$id = $request->input('id');
$rows = [];
$flow = $this->service->getDetail($id);
$rows = $this->service->makeFeelist($flow);
$page = amisMake()->table()->affixHeader(false)
->data([
'rows' => $rows
])
->title('')
->source('${rows}')
->combineNum(2)
->columns([
amisMake()->TableColumn()->name('name')->label('名称'),
amisMake()->TableColumn()->name('fee_name')->label('费用项'),
amisMake()->TableColumn()->name('fee_value')->label('费用'),
])->affixRow([
amis('text')->text('合计')->colSpan(2),
amis('tpl')->tpl('${SUM(ARRAYMAP(rows, item => item.fee_value))}')
]);
return $this->response()->success($page);
}
}

View File

@ -14,6 +14,12 @@ use Slowlyo\OwlAdmin\Renderers\Custom;
use Slowlyo\OwlAdmin\Renderers\Wrapper;
use Illuminate\Http\Resources\Json\JsonResource;
use Slowlyo\OwlAdmin\Controllers\AdminController;
use App\Admin\Components;
use App\Models\Oldmen;
use App\Models\ConstFlow;
use App\Models\Keyword;
use Carbon\Carbon;
use DB;
class HomeController extends AdminController
{
@ -21,19 +27,16 @@ class HomeController extends AdminController
{
$page = $this->basePage()->css($this->css())->body([
Grid::make()->columns([
$this->frameworkInfo()->md(5),
$this->frameworkInfo()->md(8),
Flex::make()->items([
$this->pieChart(),
$this->cube(),
]),
]),
Grid::make()->columns([
$this->lineChart()->md(8),
Flex::make()->className('h-full')->items([
$this->clock(),
$this->hitokoto(),
])->direction('column'),
]),
Grid::make()->columns([
$this->lineChart()->md(6),
$this->pieChart()->md(6),
]),
]);
return $this->response()->success($page);
@ -87,7 +90,7 @@ JS
])->body([
Custom::make()
->name('clock')
->html('<div id="clock" class="text-4xl"></div><div id="clock-date" class="mt-5"></div>')
->html('<div id="clock" class="text-5xl"></div><div id="clock-date" class="mt-5"></div>')
->onMount(<<<JS
const clock = document.getElementById('clock');
const tick = () => {
@ -114,23 +117,19 @@ JS
Flex::make()->className('w-64 mt-5')->justify('space-around')->items([
Action::make()
->level('link')
->label('GitHub')
->blank(true)
->label('客人入住')
->actionType('url')
->blank(true)
->link('https://github.com/slowlyo/owl-admin'),
->link('live-in-do'),
Action::make()
->level('link')
->label('OwlAdmin 文档')
->blank(true)
->label('客人续住')
->actionType('url')
->link('https://learnku.com/docs/owl-admin'),
->link('live-continue-do'),
Action::make()
->level('link')
->label('Amis 文档')
->blank(true)
->label('退住结算')
->actionType('url')
->link('https://aisuda.bce.baidu.com/amis/zh-CN/docs/index'),
->link('live-exit-do'),
]),
]),
])
@ -139,61 +138,45 @@ JS
public function pieChart(): Card
{
$lvList = Keyword::getByParentKey('nurse_lv')->pluck('name', 'value');
$listData = Oldmen::select(DB::raw('`nurse_lv`, count(`id`) as num'))->where('live_in', Oldmen::STATUS_LIVE)->groupBy('nurse_lv')->get()->keyBy('nurse_lv')->toArray();
$data = [];
foreach($lvList as $lv=>$name){
$data[] = [
"name"=>$name, "value"=>$listData[$lv]['num'] ?? 0
];
}
return Card::make()->className('h-96')->body(
Chart::make()->height(350)->config("{
tooltip: { trigger: 'item' },
legend: { bottom: 0, left: 'center' },
series: [
{
name: 'Access From',
type: 'pie',
radius: ['40%', '70%'],
avoidLabelOverlap: false,
itemStyle: { borderRadius: 10, borderColor: '#fff', borderWidth: 2 },
label: { show: false, position: 'center' },
emphasis: {
label: { show: true, fontSize: '40', fontWeight: 'bold' }
},
labelLine: { show: false },
data: [
{ value: 1048, name: 'Search Engine' },
{ value: 735, name: 'Direct' },
{ value: 580, name: 'Email' },
{ value: 484, name: 'Union Ads' },
{ value: 300, name: 'Video Ads' }
]
}
]
}")
Chart::make()->height(350)->config(Components::make()->chartPieConfig('当前护理占比', $data))
);
}
public function lineChart(): Card
{
$randArr = function () {
$_arr = [];
for ($i = 0; $i < 7; $i++) {
$_arr[] = random_int(10, 200);
}
return '[' . implode(',', $_arr) . ']';
};
$endDay = now()->format('Y-m-d');
$startDay = now()->subDays(7)->format('Y-m-d');
$random1 = $randArr();
$random2 = $randArr();
$data = [];
list($day, $diffDays, $xKeys) = $this->makeChartXkeys($startDay, $endDay);
$chart = Chart::make()->height(380)->className('h-96')->config("{
title:{ text: '会员增长情况', },
tooltip: { trigger: 'axis' },
xAxis: { type: 'category', boundaryGap: false, data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'] },
yAxis: { type: 'value' },
grid:{ left: '7%', right:'3%', top: 60, bottom: 30, },
legend: { data: ['访问量','注册量'] },
series: [
{ name: '访问量', data: {$random1}, type: 'line', areaStyle: {}, smooth: true, symbol: 'none', },
{ name:'注册量', data: {$random2}, type: 'line', areaStyle: {}, smooth: true, symbol: 'none', },
]}");
$listData = ConstFlow::select(DB::raw('DATE_FORMAT(`start_at`, "%Y-%m-%d") as ymd, count(`oldman_id`) as num'))
->where('const_type', ConstFlow::TYPE_IN)->whereBetween('start_at', [$startDay.' 00:00:00', $endDay.' 23:59:59'])->groupBy('ymd')->get()->keyBy('ymd')->toArray();
foreach($xKeys as $key){
$data[] = $listData[$key]['num'] ?? 0;
}
$chart = amisMake()->Chart()->config(Components::make()->chartLineBarConfig('入住情况', $xKeys, [
[
'name'=> '入住情况',
'type'=>'line',
'data' => $data,
'color' => '#3491fa',
'unit' => '人'
]
]));
return Card::make()->className('clear-card-mb')->body($chart);
return Card::make()->height(380)->className('h-96')->body($chart);
}
public function cube(): Card
@ -277,4 +260,40 @@ HTML
],
];
}
/**
* 根据时间处理X轴横坐标
*/
private function makeChartXkeys($startTime = null, $endTime = null){
$diffDays = 0;
$day = date('Y-m-d');
$xKeys = [];
if($startTime && $endTime){
if($startTime == $endTime){//查询某一天
$day = $startTime;
}else{
$startDay = Carbon::parse($startTime);
$endDay = Carbon::parse($endTime);
$diffDays = $startDay->diffInDays($endDay, false);
}
}
$xKeys = [];
if($diffDays){
for ($i = 0; $i<=$diffDays; $i++) {
$xKeys[] =(clone $startDay)->addDays($i)->startOfDay()->format('Y-m-d');
}
}else{
//调整截至到当前小时
$h = 23;
if($day == date('Y-m-d')){
$h = date('H');
}
for ($i = 0; $i < ($h+1); $i++) {
$xKeys[] = str_pad($i, 2, '0', STR_PAD_LEFT).':00';
}
}
return array($day, $diffDays, $xKeys);
}
}

View File

@ -20,7 +20,7 @@ class LiveContinueController extends AdminController
$crud = $this->baseCRUD()
->filterTogglable(false)
->headerToolbar([
...$this->baseHeaderToolBar(),
amis('button')->label('续住')->icon('fa fa-plus')->actionType('link')->level('primary')->link('live-in-continue'),
])
->filter(
$this->baseFilter()->body([
@ -43,7 +43,8 @@ class LiveContinueController extends AdminController
TableColumn::make()->name('client_phone')->label('委托人-手机号')->copyable(true),
TableColumn::make()->name('avliable_at')->label('截至时间')->type('datetime')->sortable(true),
amisMake()->Operation()->label(__('admin.actions'))->buttons([
amisMake()->LinkAction()->label('续住')->icon('fa fa-plus')->link('live-continue-do?oldman_id=${id}')->level('link'),
amisMake()->LinkAction()->label('结算')->icon('fa fa-external-link-alt')->link('live-exit-do?oldman_id=${id}')->level('link')
]),
]);

View File

@ -7,13 +7,13 @@ use Slowlyo\OwlAdmin\Renderers\Page;
use Slowlyo\OwlAdmin\Renderers\Form;
use Slowlyo\OwlAdmin\Renderers\TableColumn;
use Slowlyo\OwlAdmin\Controllers\AdminController;
use App\Services\Admin\LiveContinueService;
use App\Services\Admin\LiveExitService;
use Illuminate\Http\Request;
use App\Admin\Components;
class LiveExitController extends AdminController
{
protected string $serviceName = LiveContinueService::class;
protected string $serviceName = LiveExitService::class;
public function form(): Form
@ -37,7 +37,7 @@ class LiveExitController extends AdminController
amisMake()->Wrapper()->sm(8)->body([
amisMake()->Panel()->title('结算表单')->body(
amisMake()->form()->title('')->panelClassName('border-0')->mode('horizontal')->name('base_form')
->api(admin_url('live-continue-do'))
->api(admin_url('live-exit-do'))
->body([
amisMake()->FieldSetControl()->title('客人信息')->collapsable(true)->body([
amisMake()->Service()->api([
@ -101,16 +101,6 @@ class LiveExitController extends AdminController
]),
]),
amisMake()->FieldSetControl()->className('mt-10')->title('已缴费明细')->collapsable(true)->body(
amisMake()->FieldSetControl()->title('基础费用')->className('mt-5')->collapsable(true)->size('base')->body(
amisMake()->Service()->schemaApi([
"method"=>'get',
"url" => admin_url('live-const-flow').'?oldman_id=${oldman_id}',
])
),
),
amisMake()->FieldSetControl()->className('mt-10')->title('附加项')->collapsable(true)->body([
amisMake()->ComboControl('del_extends','收费项')->multiple(true)->items([
amisMake()->TextControl('name', '名称'),
@ -121,6 +111,13 @@ class LiveExitController extends AdminController
Components::make()->decimalControl('fee', '金额')
]),
]),
amisMake()->FieldSetControl()->className('mt-10')->title('已缴费明细')->collapsable(true)->body(
amisMake()->Service()->schemaApi([
"method"=>'get',
"url" => admin_url('live-const-flow').'?oldman_id=${oldman_id}',
])
),
])
->actions([
amis('button')->label("生成清单")->level('primary')
@ -142,7 +139,7 @@ class LiveExitController extends AdminController
]
]),
amis('submit')->label('确认结算')->confirmText('是否确认结算,并且已查看结算费用清单?')
->redirect('live-in')
->redirect('oldmen')
->level('danger'),
]),
),
@ -181,6 +178,16 @@ class LiveExitController extends AdminController
}
public function do(Request $request){
$oldManId = $request->input('oldman_id');
$addFee = $request->input('add_extends', []);
$delFee = $request->input('del_extends', []);
$res = $this->service->do($oldManId, [
'add_fee' => $addFee,
'del_fee' => $delFee,
]);
return $this->autoResponse($res, '结算');
}
}

View File

@ -20,7 +20,7 @@ class LiveInController extends AdminController
$crud = $this->baseCRUD()
->filterTogglable(false)
->headerToolbar([
...$this->baseHeaderToolBar(),
amis('button')->label('入住')->icon('fa fa-plus')->actionType('link')->level('primary')->link('live-in-do'),
])
->filter(
$this->baseFilter()->body([
@ -44,7 +44,8 @@ class LiveInController extends AdminController
TableColumn::make()->name('live_in_at')->label('入住时间')->type('datetime')->sortable(true),
TableColumn::make()->name('avliable_at')->label('截至时间')->type('datetime')->sortable(true),
amisMake()->Operation()->label(__('admin.actions'))->buttons([
amisMake()->LinkAction()->label('续住')->icon('fa fa-plus')->link('live-continue-do?oldman_id=${id}')->level('link'),
amisMake()->LinkAction()->label('结算')->icon('fa fa-external-link-alt')->link('live-exit-do?oldman_id=${id}')->level('link')
]),
]);

View File

@ -37,7 +37,6 @@ class OldmenController extends AdminController
->filterTogglable(false)
->headerToolbar([
$this->createButton(true, 'lg'),
...$this->baseHeaderToolBar(),
])
->filter(
$this->baseFilter()->body([
@ -52,15 +51,23 @@ class OldmenController extends AdminController
->columns([
// TableColumn::make()->name('id')->label('ID')->sortable(),
TableColumn::make()->name('name')->label('姓名'),
TableColumn::make()->name('age')->label('年龄')->sortable(),
TableColumn::make()->name('age')->label('年龄'),
TableColumn::make()->name('birthday')->label('生日'),
TableColumn::make()->name('card_no')->label('身份证')->copyable(true),
TableColumn::make()->name('floor_name')->label('楼栋'),
TableColumn::make()->name('nurse_lv')->type('mapping')->map(Keyword::getByParentKey('nurse_lv')->pluck('name', 'value'))->label('护理等级')->className('text-primary')->sortable(),
TableColumn::make()->name('client_name')->label('委托人'),
TableColumn::make()->name('client_phone')->label('委托人-手机号')->copyable(true),
//状态:未入住、已办理,未入住、已入住
//状态显示:已入住、未入住
TableColumn::make()->name('live_in')->type('mapping')->map([
"0"=>"<span class='label label-info'>未入住</span>",
"1"=>"<span class='label label-success'>已入住</span>",
"*"=> '其他:${live_in}'
])->label('状态')->sortable(),
TableColumn::make()->name('created_at')->label(__('admin.created_at'))->type('datetime')->sortable(true),
amisMake()->Operation()->label(__('admin.actions'))->buttons([
amisMake()->LinkAction()->label('入住')->icon('fa fa-plus')->link('live-in-do?oldman_id=${id}')->level('link')->hiddenOn('this.live_in == 1'),
amisMake()->LinkAction()->label('续住')->icon('fa fa-plus')->link('live-continue-do?oldman_id=${id}')->level('link')->hiddenOn('this.live_in == 0'),
$this->rowEditButton(true, 'lg'),
$this->rowDeleteButton()
]),
@ -161,99 +168,17 @@ class OldmenController extends AdminController
*/
public function liveFeelist(Request $request)
{
$rows = $addFee = $delFee = [];
foreach($request->input() as $key => $value){
if($key == 'add_extends'){
if(is_array($value)){
$addFee = $value;
}
}elseif($key == 'del_extends'){
if(is_array($value)){
$delFee = $value;
}
}else{
if(is_array($value)){
foreach($value as $item =>$vv){
$_fee = Keyword::where('key', $item)->first();
$rows[] = [
'name' => $_fee->parent->name,
'fee_name' => $_fee->name,
'fee_value' => $vv,
];
}
}else{
$_fee = Keyword::where('key', $key)->first();
$rows[] = [
'name' => $_fee->parent->name,
'fee_name' => $_fee->name,
'fee_value' => $value,
];
}
}
}
foreach($addFee as $item){
if(isset($item['name']) && isset($item['fee'])){
$rows[] = [
'name' => '收费项',
'fee_name' => $item['name'],
'fee_value' => $item['fee'],
];
}
}
foreach($delFee as $item){
if(isset($item['name']) && isset($item['fee'])){
$rows[] = [
'name' => '抵扣项',
'fee_name' => $item['name'],
'fee_value' => 0-$item['fee'],
];
}
}
return $this->response()->success([
'rows'=> $rows,
'rows'=> $this->service->makeFeelist(ConstFlow::TYPE_IN, $request->input()),
]);
}
public function exitFeelist(Request $request)
{
$rows = $addFee = $delFee = [];
$oldMan = Oldmen::find($request->input('oldman_id', 0));
if($oldMan){
$flowList = ConstFlow::where('oldman_id', $oldMan->id)
->whereIn('const_type', [ConstFlow::TYPE_IN, ConstFlow::TYPE_CONTINUE])
->whereBetween('start_at', [$oldMan->live_in_at, $oldMan->avliable_at])//开始时间在用户这段时间内的清单
->get();
foreach($flowList as $flow){
$rows[] = [
'name' => '缴费记录',
'fee_name' => ConstFlow::typeMap()[$flow->const_type].'【'.$flow->created_at->format('m-d H:i:s').'】',
'fee_value' => $flow->money,
];
}
}
$addFee = $request->input('add_extends') ?? [];
$delFee = $request->input('del_extends') ?? [];
foreach($addFee as $item){
if(isset($item['name']) && isset($item['fee'])){
$rows[] = [
'name' => '抵扣项',
'fee_name' => $item['name'],
'fee_value' => $item['fee'],
];
}
}
foreach($delFee as $item){
if(isset($item['name']) && isset($item['fee'])){
$rows[] = [
'name' => '收费项',
'fee_name' => $item['name'],
'fee_value' => 0-$item['fee'],
];
}
}
{
return $this->response()->success([
'rows'=> $rows,
'rows'=> $this->service->makeFeelist(ConstFlow::TYPE_EXIT, array_merge($request->input(), [
'oldman_id' => $request->input('oldman_id', 0)
])),
]);
}

View File

@ -42,6 +42,8 @@ Route::group([
$router->post('live-exit-do', '\App\Admin\Controllers\LiveExitController@do');
//费用设置
$router->resource('consts', \App\Admin\Controllers\ConstFlowController::class)->only(['index', 'show', 'destroy']);
$router->post('flow-list-tabs', '\App\Admin\Controllers\ConstFlowController@flowExtendList');
$router->get('const-setting', '\App\Admin\Controllers\SettingController@settingFeeConfig');
$router->post('const-setting', '\App\Admin\Controllers\SettingController@settingFeeConfigStore');

View File

@ -0,0 +1,34 @@
<?php
namespace App\Filters\Admin;
use EloquentFilter\ModelFilter;
class ConstFlowFilter extends ModelFilter
{
/**
* oldman
*/
public function oldman($oldmanId){
return $this->where('oldman_id', $oldmanId);
}
/**
* 名称
*/
public function name($name){
return $this->whereHas('oldman', function($q) use ($name) {
return $q->where('name', 'like', '%'.$name.'%');
});
}
/**
* 身份证
*/
public function cardNo($cardNo){
return $this->whereHas('oldman', function($q) use ($cardNo) {
return $q->where('card_no', 'like', '%'.$cardNo.'%');
});
}
}

View File

@ -2,12 +2,12 @@
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use EloquentFilter\Filterable;
class ConstFlow extends Model
{
use HasFactory;
use Filterable;
public const TYPE_IN = 1; //入住
public const TYPE_CONTINUE = 2; //续住
@ -22,6 +22,16 @@ class ConstFlow extends Model
];
}
public static function typeMapLabel()
{
return [
self::TYPE_IN => "<span class='label label-info'>入住缴费</span>",
self::TYPE_CONTINUE => "<span class='label label-warning'>续住缴费</span>",
self::TYPE_EXIT => "<span class='label label-danger'>离开结算</span>",
'*'=>'其他:${live_in}'
];
}
protected $casts = [
'extends' => 'array',
];
@ -30,4 +40,8 @@ class ConstFlow extends Model
'oldman_id', 'const_type', 'money', 'extends', 'start_at', 'end_at',
'change_lv', 'old_lv', 'new_lv'
];
public function oldman(){
return $this->belongsTo(Oldmen::class, 'oldman_id');
}
}

View File

@ -2,7 +2,9 @@
namespace App\Models;
use Carbon\Carbon;
use EloquentFilter\Filterable;
use Illuminate\Database\Eloquent\Casts\Attribute;
use Slowlyo\OwlAdmin\Models\BaseModel as Model;
class Oldmen extends Model
@ -22,6 +24,8 @@ class Oldmen extends Model
'birthday' => 'datetime:Y-m-d',
];
protected $appends = ['age'];
protected $fillable = [
'name', 'sex', 'birthday', 'card_no', 'card_city_code', 'card_province_id', 'card_city_id', 'card_area_id', 'card_address', 'card_complete_address',
'client_name', 'client_phone', 'client_city_code', 'client_province_id', 'client_city_id', 'client_area_id', 'client_address', 'client_complete_address',
@ -50,4 +54,11 @@ class Oldmen extends Model
}
});
}
protected function age():Attribute
{
return Attribute::make(
get: fn($value) => $this->birthday ? Carbon::parse($this->birthday)->diffInYears(now()).'岁' : "未知",
);
}
}

View File

@ -0,0 +1,31 @@
<?php
namespace App\Services\Admin;
use App\Models\ConstFlow;
use Slowlyo\OwlAdmin\Services\AdminService;
use App\Filters\Admin\ConstFlowFilter;
/**
* 费用明细
*
* @method ConstFlow getModel()
* @method ConstFlow|\Illuminate\Database\Query\Builder query()
*/
class ConstFlowService extends BaseService
{
protected string $modelName = ConstFlow::class;
protected string $modelFilterName = ConstFlowFilter::class;
protected array $withRelationships = ['oldman'];
public function makeFeelist(ConstFlow $flow)
{
return (new OldmenService())->makeFeelist($flow->const_type, array_merge($flow->extends, [
'oldman_id' => $flow->oldman_id,
'live_in_at' => $flow->start_at,
'avliable_at' => $flow->end_at
]));
}
}

View File

@ -39,7 +39,7 @@ class LiveContinueService extends OldmenService
return $this->setError('客人状态异常,请刷新后重试!');
}
//判断开始时间和用户截至时间是否相隔1秒-todo
//判断开始时间和用户截至时间是否相隔1秒
if(Carbon::parse($oldMan->avliable_at)->diffInSeconds($startAt) != 1){
return $this->setError('续住开始时间异常,请刷新重试!');
}
@ -68,7 +68,7 @@ class LiveContinueService extends OldmenService
$flow->save();
//更新客人信息状态;
$oldMan->update([
'live_in' => Oldmen::STATUS_LIVE,
'need_pay' => Oldmen::PAY_NORMAL,
'avliable_at' => $endAt,
'nurse_lv' => $newLv,
]);

View File

@ -0,0 +1,67 @@
<?php
namespace App\Services\Admin;
use App\Models\Oldmen;
use App\Models\ConstFlow;
use DB;
use Throwable;
/**
* @method Oldmen getModel()
* @method Oldmen|\Illuminate\Database\Query\Builder query()
*/
class LiveExitService extends OldmenService
{
public function do($oldManId, $feeArr = null){
$oldMan = $this->getDetail($oldManId);
if($oldMan){
//判断状态-是否是已经入住状态;未入住状态无法结算;
if($oldMan->live_in != Oldmen::STATUS_LIVE){
return $this->setError('客人状态异常,请刷新后重试!');
}
$flowList = ConstFlow::where('oldman_id', $oldMan->id)
->whereIn('const_type', [ConstFlow::TYPE_IN, ConstFlow::TYPE_CONTINUE])
->whereBetween('start_at', [$oldMan->live_in_at, $oldMan->avliable_at])//开始时间在用户这段时间内的清单
->get();
$flowMoney = 0;
foreach($flowList as $flow){
$flowMoney = bcadd($flowMoney, $flow->money, 2);
}
$flow = new ConstFlow();
$flow->oldman_id = $oldMan->id;
$flow->const_type = ConstFlow::TYPE_EXIT;
$flow->start_at = $oldMan->live_in_at;//开始入住时间
$flow->end_at = $oldMan->avliable_at;//办理结算时间
$flow->money = bcadd($flowMoney, $this->totalFee($feeArr), 2);
$flow->extends = $feeArr;
try{
DB::beginTransaction();
//缴费生成流水;
$flow->save();
//更新客人信息状态;
$oldMan->update([
'live_in' => Oldmen::STATUS_NORMAL,
'need_pay' => Oldmen::PAY_NORMAL,
'live_in_at' => null,
'avliable_at' => null,
'bonds' => 0,//保证金归零
]);
DB::commit();
}catch(Throwable $th){
DB::rollBack();
report($th);
return $this->setError('系统错误,请刷新后重试');
}
return true;
}else{
return $this->setError('未找到客人信息!');
}
}
}

View File

@ -3,7 +3,10 @@
namespace App\Services\Admin;
use App\Models\Oldmen;
use App\Models\Keyword;
use App\Filters\Admin\OldmenFilter;
use App\Models\ConstFlow;
use Illuminate\Support\Arr;
/**
* @method Oldmen getModel()
@ -100,4 +103,129 @@ class OldmenService extends BaseService
}
return $money;
}
public function makeFeelist($type, $extends = []){
$rows = $addFee = $delFee =[];
$oldMan = Oldmen::find(Arr::get($extends, 'oldman_id', 0));
switch($type){
case ConstFlow::TYPE_EXIT:
if($oldMan){
if(isset($extends['live_in_at']) && $extends['avliable_at']){
$startAt = $extends['live_in_at'];
$endAt = $extends['avliable_at'];
}else{
$startAt = $oldMan->live_in_at;
$endAt = $oldMan->avliable_at;
}
$flowList = ConstFlow::where('oldman_id', $oldMan->id)
->whereIn('const_type', [ConstFlow::TYPE_IN, ConstFlow::TYPE_CONTINUE])
->whereBetween('start_at', [$startAt, $endAt])//开始时间在用户这段时间内的清单
->get();
foreach($flowList as $flow){
$rows[] = [
'name' => '缴费记录',
'fee_name' => ConstFlow::typeMap()[$flow->const_type].'【'.$flow->created_at->format('m-d H:i:s').'】',
'fee_value' => $flow->money,
];
}
}
$addFee = Arr::get($extends, 'add_extends', []);
if(!$addFee){
$addFee = Arr::get($extends, 'add_fee', []);
}
$delFee = Arr::get($extends, 'del_extends', []);
if(!$delFee){
$delFee = Arr::get($extends, 'del_fee', []);
}
foreach($addFee as $item){
if(isset($item['name']) && isset($item['fee'])){
$rows[] = [
'name' => '抵扣项',
'fee_name' => $item['name'],
'fee_value' => $item['fee'],
];
}
}
foreach($delFee as $item){
if(isset($item['name']) && isset($item['fee'])){
$rows[] = [
'name' => '收费项',
'fee_name' => $item['name'],
'fee_value' => 0-$item['fee'],
];
}
}
break;
default:
unset($extends['oldman_id'], $extends['live_in_at'], $extends['avliable_at']);
foreach($extends as $key => $value){
if(in_array($key, ['add_extends', 'add_fee'])){
if(is_array($value)){
$addFee = $value;
}
}elseif(in_array($key, ['del_extends', 'del_fee'])){
if(is_array($value)){
$delFee = $value;
}
}else{
if(is_array($value)){
foreach($value as $item =>$vv){
$_fee = Keyword::where('key', $item)->first();
$rows[] = [
'name' => $_fee->parent?->name ?? '',
'fee_name' => $_fee->name,
'fee_value' => $vv,
];
}
}else{
$_fee = Keyword::where('key', $key)->first();
$rows[] = [
'name' => $_fee->parent?->name ?? '',
'fee_name' => $_fee->name,
'fee_value' => $value,
];
}
}
}
foreach($addFee as $item){
if(isset($item['name']) && isset($item['fee'])){
$rows[] = [
'name' => '收费项',
'fee_name' => $item['name'],
'fee_value' => $item['fee'],
];
}
}
foreach($delFee as $item){
if(isset($item['name']) && isset($item['fee'])){
$rows[] = [
'name' => '抵扣项',
'fee_name' => $item['name'],
'fee_value' => 0-$item['fee'],
];
}
}
break;
}
return $rows;
}
/**
* 删除
*
* @param string $ids
*
* @return mixed
*/
public function delete(string $ids): mixed
{
//检查删除的记录中是否有记录已经有缴费记录;有,则无法删除
if(ConstFlow::whereIn('oldman_id', explode(',', $ids))->count()){
return $this->setError('数据存在关联信息,已无法删除,请联系开发者删除。');
};
return $this->query()->whereIn($this->primaryKey(), explode(',', $ids))->delete();
}
}

17
composer.lock generated
View File

@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
"content-hash": "f9f1c22ac338b3bb4697fcbcc921a5bd",
"content-hash": "a483aafe1cb9cc540a4db897e1c35ac4",
"packages": [
{
"name": "brick/math",
@ -2353,16 +2353,16 @@
},
{
"name": "slowlyo/owl-admin",
"version": "v2.5.6",
"version": "v2.6.2",
"source": {
"type": "git",
"url": "https://github.com/Slowlyo/owl-admin.git",
"reference": "86c6117f681570a3862845ce182a3c80051098d3"
"reference": "97b4c760f6b2bf940d5b5fe828a32c381b2ac3ce"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/Slowlyo/owl-admin/zipball/86c6117f681570a3862845ce182a3c80051098d3",
"reference": "86c6117f681570a3862845ce182a3c80051098d3",
"url": "https://api.github.com/repos/Slowlyo/owl-admin/zipball/97b4c760f6b2bf940d5b5fe828a32c381b2ac3ce",
"reference": "97b4c760f6b2bf940d5b5fe828a32c381b2ac3ce",
"shasum": ""
},
"require": {
@ -2382,7 +2382,7 @@
},
"autoload": {
"files": [
"src/Libs/helpers.php"
"src/Support/helpers.php"
],
"psr-4": {
"Slowlyo\\OwlAdmin\\": "src/"
@ -2404,13 +2404,14 @@
"keywords": [
"OwlAdmin",
"admin",
"amis",
"laravel"
],
"support": {
"issues": "https://github.com/Slowlyo/owl-admin/issues",
"source": "https://github.com/Slowlyo/owl-admin/tree/v2.5.6"
"source": "https://github.com/Slowlyo/owl-admin/tree/v2.6.2"
},
"time": "2023-05-17T12:38:22+00:00"
"time": "2023-06-08T09:45:49+00:00"
},
{
"name": "symfony/console",

View File

@ -57,15 +57,8 @@ return [
// 是否显示 [权限] 功能中的自动生成按钮
'show_auto_generate_permission_button' => env('ADMIN_SHOW_AUTO_GENERATE_PERMISSION_BUTTON', true),
'dev_tools' => [
'terminal' => [
'php_alias' => 'php',
'composer_alias' => 'composer',
],
],
// 扩展
'extension' => [
'extension' => [
'dir' => base_path('extensions'),
],
@ -95,4 +88,11 @@ return [
// 底部信息
'footer' => '<a href="https://github.com/slowlyo/owl-admin" target="_blank">Owl Admin</a>',
],
'models' => [
'admin_user' => \Slowlyo\OwlAdmin\Models\AdminUser::class,
'admin_role' => \Slowlyo\OwlAdmin\Models\AdminRole::class,
'admin_menu' => \Slowlyo\OwlAdmin\Models\AdminMenu::class,
'admin_permission' => \Slowlyo\OwlAdmin\Models\AdminPermission::class,
],
];

View File

@ -22,6 +22,7 @@ return [
'edit' => 'Edit',
'show' => 'Show',
'delete' => 'Delete',
'copy' => 'Copy',
'confirm_delete' => 'Confirm Delete Selected Items?',
'back' => 'Back',
'reset' => 'Reset',
@ -53,6 +54,7 @@ return [
'yes' => 'Yes',
'no' => 'No',
'need_start_with_slash' => 'Need Start With /',
'cancel' => 'Cancel',
'code_generators' => [
'remark1' => 'For more parameters, please refer to',
@ -82,6 +84,41 @@ return [
'generate_code' => 'Generate Code',
'expand_more_settings' => 'More Settings',
'collapse_settings' => 'Collapse Settings',
'confirm_generate_code' => 'Confirm Generate Code?',
'preview' => 'Preview',
'base_info' => 'Base Info',
'column_info' => 'Column Info',
'route_config' => 'Route Config',
'page_config' => 'Page Config',
'gen_route_menu' => 'Generate Route And Menu',
'route' => 'Route',
'menu_name' => 'Menu Name',
'parent_menu' => 'Parent Menu',
'menu_icon' => 'Menu Icon',
'name_label_desc' => 'Name And Label Attribute Take Field Name And Comment',
'column_warning' => 'If the field name exists (no / status) will cause the form to fail to echo back!',
'add_column' => 'Add Column',
'scope' => 'Scope',
'list_component' => 'List Component',
'list_component_desc' => 'List Component, Default Is TableColumn',
'form_component' => 'Form Component',
'form_component_desc' => 'Form Component, Default Is TextControl',
'detail_component' => 'Detail Component',
'detail_component_desc' => 'Detail Component, Default Is TextControl',
'model_config' => 'Model Config',
'file_column' => 'File Column',
'file_column_desc' => 'File Column, Automatically Add Attribute Methods In The Model',
'preview_code' => 'Preview Code',
'property' => 'Property',
'property_name' => 'Property Name',
'value' => 'Value',
'dialog_form' => 'Dialog Form',
'dialog_size' => 'Dialog Size',
'copy_record' => 'Copy Record',
'copy_record_description' => 'You can copy and share to <a href="https://github.com/Slowlyo/owl-admin/discussions/categories/%E4%BB%A3%E7%A0%81%E7%94%9F%E6%88%90%E8%AE%B0%E5%BD%95" target="_blank">Github</a>',
'import_record' => 'Import Record',
'import_record_placeholder' => 'Please enter the imported json record',
'import_record_desc' => 'You can find some records shared by others on <a href="https://github.com/Slowlyo/owl-admin/discussions/categories/%E4%BB%A3%E7%A0%81%E7%94%9F%E6%88%90%E8%AE%B0%E5%BD%95" target="_blank">Github</a>',
],
'admin_users' => 'Admin Users',

View File

@ -22,6 +22,7 @@ return [
'edit' => '编辑',
'show' => '查看',
'delete' => '删除',
'copy' => '复制',
'confirm_delete' => '确认删除选中项?',
'back' => '返回',
'reset' => '重置',
@ -55,6 +56,7 @@ return [
'yes' => '是',
'no' => '否',
'need_start_with_slash' => '需要以 / 开头',
'cancel' => '取消',
'code_generators' => [
'remark1' => '额外参数请参考',
@ -84,6 +86,41 @@ return [
'generate_code' => '生成代码',
'expand_more_settings' => '更多设置',
'collapse_settings' => '收起设置',
'confirm_generate_code' => '确认生成代码?',
'preview' => '预览',
'base_info' => '基本信息',
'column_info' => '字段信息',
'route_config' => '路由配置',
'page_config' => '页面配置',
'gen_route_menu' => '生成路由&菜单',
'route' => '路由',
'menu_name' => '菜单名称',
'parent_menu' => '父级菜单',
'menu_icon' => '菜单图标',
'name_label_desc' => 'name和label属性取字段名和注释',
'column_warning' => '如果字段名存在 no、status 会导致 form 回显失败!',
'add_column' => '添加字段',
'scope' => '作用域',
'list_component' => '列表组件',
'list_component_desc' => '列表组件, 默认为 TableColumn',
'form_component' => '表单组件',
'form_component_desc' => '表单组件, 默认为 TextControl',
'detail_component' => '详情组件',
'detail_component_desc' => '详情组件, 默认为 TextControl',
'model_config' => '模型配置',
'file_column' => '文件字段',
'file_column_desc' => '文件字段会自动在模型中添加 获取/修改器 方法',
'preview_code' => '预览代码',
'property' => '属性',
'property_name' => '属性名称',
'value' => '值',
'dialog_form' => '弹窗表单',
'dialog_size' => '弹窗大小',
'copy_record' => '复制记录',
'copy_record_description' => '你可以复制后分享到 <a href="https://github.com/Slowlyo/owl-admin/discussions/categories/%E4%BB%A3%E7%A0%81%E7%94%9F%E6%88%90%E8%AE%B0%E5%BD%95" target="_blank">Github</a>',
'import_record' => '导入记录',
'import_record_placeholder' => '请输入导入的json记录',
'import_record_desc' => '你可以在 <a href="https://github.com/Slowlyo/owl-admin/discussions/categories/%E4%BB%A3%E7%A0%81%E7%94%9F%E6%88%90%E8%AE%B0%E5%BD%95" target="_blank">Github</a> 找到一些其他人分享的记录',
],
'admin_users' => '管理员',

File diff suppressed because one or more lines are too long

Binary file not shown.

File diff suppressed because one or more lines are too long

Binary file not shown.

File diff suppressed because one or more lines are too long

Binary file not shown.

File diff suppressed because one or more lines are too long

Binary file not shown.

File diff suppressed because one or more lines are too long

Binary file not shown.

File diff suppressed because one or more lines are too long

Binary file not shown.

File diff suppressed because one or more lines are too long

Binary file not shown.

File diff suppressed because one or more lines are too long

Binary file not shown.

File diff suppressed because one or more lines are too long

Binary file not shown.

File diff suppressed because one or more lines are too long

Binary file not shown.

File diff suppressed because one or more lines are too long

Binary file not shown.

File diff suppressed because one or more lines are too long

Binary file not shown.

File diff suppressed because one or more lines are too long

Binary file not shown.

File diff suppressed because one or more lines are too long

Binary file not shown.

File diff suppressed because one or more lines are too long

Binary file not shown.

File diff suppressed because one or more lines are too long

Binary file not shown.

File diff suppressed because one or more lines are too long

Binary file not shown.

File diff suppressed because one or more lines are too long

Binary file not shown.

File diff suppressed because one or more lines are too long

Binary file not shown.

File diff suppressed because one or more lines are too long

Binary file not shown.

File diff suppressed because one or more lines are too long

Binary file not shown.

File diff suppressed because one or more lines are too long

Binary file not shown.

View File

@ -0,0 +1 @@
import{l as e}from"./editor.main-2fff42fa.js";import"./index-416837cb.js";var t=["area","base","br","col","embed","hr","img","input","keygen","link","menuitem","meta","param","source","track","wbr"],r={wordPattern:/(-?\d*\.\d\w*)|([^\`\~\!\@\$\^\&\*\(\)\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\s]+)/g,comments:{blockComment:["<!--","-->"]},brackets:[["<!--","-->"],["<",">"],["{","}"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:'"',close:'"'},{open:"'",close:"'"},{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"<",close:">"}],onEnterRules:[{beforeText:new RegExp("<(?!(?:"+t.join("|")+"))([_:\\w][_:\\w-.\\d]*)([^/>]*(?!/)>)[^<]*$","i"),afterText:/^<\/([_:\w][_:\w-.\d]*)\s*>$/i,action:{indentAction:e.IndentAction.IndentOutdent}},{beforeText:new RegExp("<(?!(?:"+t.join("|")+"))(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$","i"),action:{indentAction:e.IndentAction.Indent}}],folding:{markers:{start:new RegExp("^\\s*<!--\\s*#region\\b.*-->"),end:new RegExp("^\\s*<!--\\s*#endregion\\b.*-->")}}},o={defaultToken:"",tokenPostfix:".html",ignoreCase:!0,tokenizer:{root:[[/<!DOCTYPE/,"metatag","@doctype"],[/<!--/,"comment","@comment"],[/(<)((?:[\w\-]+:)?[\w\-]+)(\s*)(\/>)/,["delimiter","tag","","delimiter"]],[/(<)(script)/,["delimiter",{token:"tag",next:"@script"}]],[/(<)(style)/,["delimiter",{token:"tag",next:"@style"}]],[/(<)((?:[\w\-]+:)?[\w\-]+)/,["delimiter",{token:"tag",next:"@otherTag"}]],[/(<\/)((?:[\w\-]+:)?[\w\-]+)/,["delimiter",{token:"tag",next:"@otherTag"}]],[/</,"delimiter"],[/[^<]+/]],doctype:[[/[^>]+/,"metatag.content"],[/>/,"metatag","@pop"]],comment:[[/-->/,"comment","@pop"],[/[^-]+/,"comment.content"],[/./,"comment.content"]],otherTag:[[/\/?>/,"delimiter","@pop"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/]],script:[[/type/,"attribute.name","@scriptAfterType"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/>/,{token:"delimiter",next:"@scriptEmbedded",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/(<\/)(script\s*)(>)/,["delimiter","tag",{token:"delimiter",next:"@pop"}]]],scriptAfterType:[[/=/,"delimiter","@scriptAfterTypeEquals"],[/>/,{token:"delimiter",next:"@scriptEmbedded",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptAfterTypeEquals:[[/"([^"]*)"/,{token:"attribute.value",switchTo:"@scriptWithCustomType.$1"}],[/'([^']*)'/,{token:"attribute.value",switchTo:"@scriptWithCustomType.$1"}],[/>/,{token:"delimiter",next:"@scriptEmbedded",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptWithCustomType:[[/>/,{token:"delimiter",next:"@scriptEmbedded.$S2",nextEmbedded:"$S2"}],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptEmbedded:[[/<\/script/,{token:"@rematch",next:"@pop",nextEmbedded:"@pop"}],[/[^<]+/,""]],style:[[/type/,"attribute.name","@styleAfterType"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/>/,{token:"delimiter",next:"@styleEmbedded",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/(<\/)(style\s*)(>)/,["delimiter","tag",{token:"delimiter",next:"@pop"}]]],styleAfterType:[[/=/,"delimiter","@styleAfterTypeEquals"],[/>/,{token:"delimiter",next:"@styleEmbedded",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleAfterTypeEquals:[[/"([^"]*)"/,{token:"attribute.value",switchTo:"@styleWithCustomType.$1"}],[/'([^']*)'/,{token:"attribute.value",switchTo:"@styleWithCustomType.$1"}],[/>/,{token:"delimiter",next:"@styleEmbedded",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleWithCustomType:[[/>/,{token:"delimiter",next:"@styleEmbedded.$S2",nextEmbedded:"$S2"}],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleEmbedded:[[/<\/style/,{token:"@rematch",next:"@pop",nextEmbedded:"@pop"}],[/[^<]+/,""]]}};export{r as conf,o as language};

Binary file not shown.

View File

@ -0,0 +1 @@
import{l as e}from"./editor.main-f271c605.js";import"./index-afa1c9ec.js";var t=["area","base","br","col","embed","hr","img","input","keygen","link","menuitem","meta","param","source","track","wbr"],r={wordPattern:/(-?\d*\.\d\w*)|([^\`\~\!\@\$\^\&\*\(\)\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\s]+)/g,comments:{blockComment:["<!--","-->"]},brackets:[["<!--","-->"],["<",">"],["{","}"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:'"',close:'"'},{open:"'",close:"'"},{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"<",close:">"}],onEnterRules:[{beforeText:new RegExp("<(?!(?:"+t.join("|")+"))([_:\\w][_:\\w-.\\d]*)([^/>]*(?!/)>)[^<]*$","i"),afterText:/^<\/([_:\w][_:\w-.\d]*)\s*>$/i,action:{indentAction:e.IndentAction.IndentOutdent}},{beforeText:new RegExp("<(?!(?:"+t.join("|")+"))(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$","i"),action:{indentAction:e.IndentAction.Indent}}],folding:{markers:{start:new RegExp("^\\s*<!--\\s*#region\\b.*-->"),end:new RegExp("^\\s*<!--\\s*#endregion\\b.*-->")}}},o={defaultToken:"",tokenPostfix:".html",ignoreCase:!0,tokenizer:{root:[[/<!DOCTYPE/,"metatag","@doctype"],[/<!--/,"comment","@comment"],[/(<)((?:[\w\-]+:)?[\w\-]+)(\s*)(\/>)/,["delimiter","tag","","delimiter"]],[/(<)(script)/,["delimiter",{token:"tag",next:"@script"}]],[/(<)(style)/,["delimiter",{token:"tag",next:"@style"}]],[/(<)((?:[\w\-]+:)?[\w\-]+)/,["delimiter",{token:"tag",next:"@otherTag"}]],[/(<\/)((?:[\w\-]+:)?[\w\-]+)/,["delimiter",{token:"tag",next:"@otherTag"}]],[/</,"delimiter"],[/[^<]+/]],doctype:[[/[^>]+/,"metatag.content"],[/>/,"metatag","@pop"]],comment:[[/-->/,"comment","@pop"],[/[^-]+/,"comment.content"],[/./,"comment.content"]],otherTag:[[/\/?>/,"delimiter","@pop"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/]],script:[[/type/,"attribute.name","@scriptAfterType"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/>/,{token:"delimiter",next:"@scriptEmbedded",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/(<\/)(script\s*)(>)/,["delimiter","tag",{token:"delimiter",next:"@pop"}]]],scriptAfterType:[[/=/,"delimiter","@scriptAfterTypeEquals"],[/>/,{token:"delimiter",next:"@scriptEmbedded",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptAfterTypeEquals:[[/"([^"]*)"/,{token:"attribute.value",switchTo:"@scriptWithCustomType.$1"}],[/'([^']*)'/,{token:"attribute.value",switchTo:"@scriptWithCustomType.$1"}],[/>/,{token:"delimiter",next:"@scriptEmbedded",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptWithCustomType:[[/>/,{token:"delimiter",next:"@scriptEmbedded.$S2",nextEmbedded:"$S2"}],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptEmbedded:[[/<\/script/,{token:"@rematch",next:"@pop",nextEmbedded:"@pop"}],[/[^<]+/,""]],style:[[/type/,"attribute.name","@styleAfterType"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/>/,{token:"delimiter",next:"@styleEmbedded",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/(<\/)(style\s*)(>)/,["delimiter","tag",{token:"delimiter",next:"@pop"}]]],styleAfterType:[[/=/,"delimiter","@styleAfterTypeEquals"],[/>/,{token:"delimiter",next:"@styleEmbedded",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleAfterTypeEquals:[[/"([^"]*)"/,{token:"attribute.value",switchTo:"@styleWithCustomType.$1"}],[/'([^']*)'/,{token:"attribute.value",switchTo:"@styleWithCustomType.$1"}],[/>/,{token:"delimiter",next:"@styleEmbedded",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleWithCustomType:[[/>/,{token:"delimiter",next:"@styleEmbedded.$S2",nextEmbedded:"$S2"}],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleEmbedded:[[/<\/style/,{token:"@rematch",next:"@pop",nextEmbedded:"@pop"}],[/[^<]+/,""]]}};export{r as conf,o as language};

Binary file not shown.

File diff suppressed because one or more lines are too long

Binary file not shown.

File diff suppressed because one or more lines are too long

Binary file not shown.

File diff suppressed because one or more lines are too long

Binary file not shown.

File diff suppressed because one or more lines are too long

Binary file not shown.

File diff suppressed because one or more lines are too long

Binary file not shown.

File diff suppressed because one or more lines are too long

Binary file not shown.

File diff suppressed because one or more lines are too long

Binary file not shown.

File diff suppressed because one or more lines are too long

Binary file not shown.

File diff suppressed because one or more lines are too long

Binary file not shown.

File diff suppressed because one or more lines are too long

Binary file not shown.

File diff suppressed because one or more lines are too long

Binary file not shown.

File diff suppressed because one or more lines are too long

Binary file not shown.

File diff suppressed because one or more lines are too long

Binary file not shown.

File diff suppressed because one or more lines are too long

Binary file not shown.

File diff suppressed because one or more lines are too long

Binary file not shown.

View File

@ -0,0 +1 @@
import{conf as t,language as e}from"./typescript-0a8bfe65.js";import"./editor.main-f271c605.js";import"./index-afa1c9ec.js";var r=t,a={defaultToken:"invalid",tokenPostfix:".js",keywords:["break","case","catch","class","continue","const","constructor","debugger","default","delete","do","else","export","extends","false","finally","for","from","function","get","if","import","in","instanceof","let","new","null","return","set","super","switch","symbol","this","throw","true","try","typeof","undefined","var","void","while","with","yield","async","await","of"],typeKeywords:[],operators:e.operators,symbols:e.symbols,escapes:e.escapes,digits:e.digits,octaldigits:e.octaldigits,binarydigits:e.binarydigits,hexdigits:e.hexdigits,regexpctl:e.regexpctl,regexpesc:e.regexpesc,tokenizer:e.tokenizer};export{r as conf,a as language};

View File

@ -0,0 +1 @@
import{conf as t,language as e}from"./typescript-3ed046ab.js";import"./editor.main-2fff42fa.js";import"./index-416837cb.js";var r=t,a={defaultToken:"invalid",tokenPostfix:".js",keywords:["break","case","catch","class","continue","const","constructor","debugger","default","delete","do","else","export","extends","false","finally","for","from","function","get","if","import","in","instanceof","let","new","null","return","set","super","switch","symbol","this","throw","true","try","typeof","undefined","var","void","while","with","yield","async","await","of"],typeKeywords:[],operators:e.operators,symbols:e.symbols,escapes:e.escapes,digits:e.digits,octaldigits:e.octaldigits,binarydigits:e.binarydigits,hexdigits:e.hexdigits,regexpctl:e.regexpctl,regexpesc:e.regexpesc,tokenizer:e.tokenizer};export{r as conf,a as language};

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