<?php
declare(strict_types=1);

use think\facade\Route;
use app\api\middleware\AllowCrossDomain;

// 定义 API 路由组
Route::group('user', function () {
    Route::rule('login','user/login','POST');
    Route::rule('userinfo','user/userinfo','GET|POST');
    Route::rule('logout','user/logout','GET|POST');
    Route::rule('edit','user/edit','POST');
    Route::rule('password','user/password','POST');

    //平台
    Route::rule('platform','index/getPlatform','POST');
    //店铺
    Route::rule('shops','index/getShop','POST');
    //规格
    Route::rule('specs','index/getSpec','POST');
    //首页数据
    Route::rule('index','index/index','POST');
    //库存统计
    Route::rule('statistics','index/statistics','POST');
    //app版本升级配置
    Route::rule('appversion','index/getAppVersion','POST');

    //添加记录
    Route::rule('create','shops/create','POST');
    //发货记录
    Route::rule('delivery','shops/delivery','POST');
    //编辑录入
    Route::rule('deliveryedit','shops/deliveryedit','POST');
    //删除
    Route::rule('deliverydel','shops/deliverydel','POST');
    //发货数量汇总、重量汇总
    Route::rule('getCount','shops/getCount','POST');

    //出入库数据
    Route::rule('stockList','inventory/stockList','POST');
    //出入库
    Route::rule('stock','inventory/stock','POST');
    //库存记录
    Route::rule('stocklog','inventory/stocklog','POST');

    //记账
    Route::rule('money','MoneyLog/money','POST');
    //账单编辑
    Route::rule('moneyedit','MoneyLog/moneyedit','POST');
    //删除
    Route::rule('moneydel','MoneyLog/moneydel','POST');
    
    //记账记录
    Route::rule('moneylog','MoneyLog/moneylog','POST');
    //记账类型配置
    Route::rule('getMoneyType','moneyLog/getConfig','POST');
    //记账统计
    Route::rule('getMoneyCount','MoneyLog/getCount','POST');
    //记账统计每天
    Route::rule('getMoneyCountDay','MoneyLog/getCountDay','POST');

    //获取全部人员
    Route::rule('getAllUser','User/getAllUser','POST');
    //支收总览
    Route::rule('getMoneyCountAll','MoneyLog/getCountAll','POST');

    //组员列表
    
    Route::rule('groupList','GroupUser/group_list','POST');
    //添加组员
    Route::rule('add_group_user','GroupUser/add_group_user','POST');
    //修改组员
    Route::rule('edit_group_user','GroupUser/edit_group_user','POST');
    //出工人员列表
    Route::rule('get_worker_out_list','GroupUser/get_worker_out_list','POST');
    //出工人员设置
    Route::rule('set_worker_out','GroupUser/set_worker_out','POST');
    //清除今日出工人员
    Route::rule('clear_worker_out','GroupUser/clear_worker_out','POST');
    //打包汇总
    Route::rule('worker_pack_sum','GroupUser/worker_pack_sum','POST');
    
    
  })->middleware(AllowCrossDomain::class);

// 定义 API 路由组
Route::group('worker', function () {
    Route::rule('index','worker/index','POST');
    //扫码
    Route::rule('scan','worker/scan','POST');
    Route::rule('scanlog','worker/scanlog','POST');
    //数据统计，今日昨日,本周
    
    Route::rule('pack_data_statistics','worker/pack_data_statistics','POST');
    
})->middleware(AllowCrossDomain::class);
Route::rule('ceshi','index/getArr','GET|POST');

