<?php

use Illuminate\Http\Request;
use Illuminate\Support\Facades\Route;

/*
地址前缀：/apiLocal/
*/
Route::post('rejected/recoverSelected', 'RejectedController@apiRecoverSelected');
Route::post('owner/restoreSelected', 'OwnerController@restoreSelected');
Route::post('rejectedBillItem/store', 'RejectedBillItemController@apiStore');
Route::post('rejectedBillItem/update', 'RejectedBillItemController@apiUpdate');
Route::post('rejectedBillItem/apiGet', 'RejectedBillItemController@apiGet');
Route::post('rejectedBillItem/apiDelete', 'RejectedBillItemController@apiDelete');
Route::post('rejectedBillItem/packConfirm', 'RejectedBillItemController@apiPackConfirm');
Route::post('rejectedBillItem/packDestroy', 'RejectedBillItemController@apiPackDestroy');
Route::post('rejectedBill/store', 'RejectedBillController@apiStore');
Route::post('rejectedBill/update', 'RejectedBillController@apiUpdate');
Route::post('rejectedBill/apiGetRecent', 'RejectedBillController@apiGetRecent');
Route::post('rejectedBill/apiSetIsLoadedAll', 'RejectedBillController@apiSetIsLoadedAll');
Route::post('rejectedBill/apiConfirmBeStored', 'RejectedBillController@apiConfirmBeStored');
Route::post('rejectedBill/seekOrder','RejectedBillController@seekOrder');
Route::post('rejectedBill/importRejectedNumber','RejectedBillController@disposeImportApi');

Route::post('logistic/numberFeatures/computeLogisticByNumber', 'LogisticNumberFeatureController@apiComputeLogisticByNumber');
Route::post('logistic/logisticNumberReturnIsUnique', 'RejectedBillController@apiLogisticNumberReturnIsUnique');

Route::post('commodity/getCommodityByBarcode', 'CommodityController@apiGetCommodityByBarcode');

Route::post('waybill/recoverSelected', 'WaybillController@apiRestoreSelected');
Route::post('waybill/changeFee', 'WaybillController@changeFee');
Route::post('waybill/changeCharge', 'WaybillController@changeCharge');

Route::post('rejectedBill/getRejectedByLogisticNumberReturn','RejectedController@apiGetRejectedByLogisticNumberReturn');

Route::group(['prefix' => 'order'], function () {
    Route::group(['prefix'=>'issue'],function(){

        Route::post('orderIssueHasClientCode', 'OrderIssueController@apiOrderIssueHasClientCode');
        Route::post('orderIssueHasLogisticNumberReturn', 'OrderIssueController@apiOrderIssueHasLogisticNumberReturn');
        Route::post('update', 'OrderIssueController@updateApi');
        Route::post('updateColumn','OrderIssueController@updateColumnApi');
        Route::post('destroy', 'OrderIssueController@apiDestroy');
        Route::post('batchDestroy', 'OrderIssueController@batchDestroyApi');
        Route::any('orderIssueTag', 'OrderIssueController@apiOrderIssueTag');
        Route::post('disposeOrderIssue', 'OrderIssueController@apiDisposeOrderIssue');
        Route::post('endOrderIssue', 'OrderIssueController@apiEndOrderIssue');
        Route::post('getOrderInfoByClientNo', 'OrderIssueController@apiGetOrderInfoByClientNo');
        Route::post('isExistByOrderNo','OrderIssueController@isExistByOrderNoApi');
        Route::post('updateLogisticNumberReturn','OrderIssueController@updateLogisticNumberReturnApi');
        Route::post('editSecondClientNo','OrderIssueController@editSecondClientNoApi');
        Route::post('endOrderIssues','OrderIssueController@endOrderIssuesApi');
        Route::post('editSecondLogisticNumber','OrderIssueController@editSecondLogisticNumberApi');
        Route::post('importPasteData','OrderIssueController@importPasteDataApi');
        Route::match(['get','post'],'disposeImport','OrderIssueController@disposeImportApi');
        Route::post('financeConfirm','OrderIssueController@financeConfirmApi');

         Route::group(['prefix'=>'onTop'],function(){
            Route::post('/store', 'OrderIssueOnTopController@apiStore');
            Route::post('/cancelTop', 'OrderIssueOnTopController@apiDestroy');
        });

        Route::group(['prefix'=>'log'],function(){
            Route::post('store', 'OrderIssueProcessLogController@apiStore');
            Route::post('destroy', 'OrderIssueProcessLogController@apiDestroy');
            Route::post('batchStore','OrderIssueProcessLogController@batchStoreApi');
        });
        Route::group(['prefix'=>'recycle'],function(){
            Route::post('recover','OrderIssueController@recoverOrderIssueApi');
        });
    });

    Route::group(['prefix'=>'tracking'],function (){
        Route::get('update','OrderTrackingController@updateApi');
        Route::any('logisticUpdate','OrderTrackingController@logisticUpdateApi');
        Route::any('warehouseUpdate','OrderTrackingController@warehouseUpdateApi');
        Route::post('updateLogisticId','OrderTrackingController@updateLogisticIdApi');
    });

    Route::group(['prefix'=>'trackingOwner'],function (){
        Route::any('all','OrderTrackingOwnerController@getAllApi');
        Route::any('updateStatus','OrderTrackingOwnerController@updateStatusApi');
    });

});

Route::group(['prefix'=>'maintenance'],function (){
    Route::group(['prefix'=>'owner'],function (){
        Route::post('getOwners','OwnerController@getOwners');
    });
});

/** 控制台 */
Route::group(['prefix'=>'control'],function () {
    Route::post('panel/menu/orderCountingRecordApi','ControlPanelController@orderCountingRecordsApi') ;
    Route::post('panel/menu/logisticsCountingRecordsApi','ControlPanelController@logisticsCountingRecordsApi');
    Route::post('panel/menu/warehouseCountingRecordsApi','ControlPanelController@warehouseCountingRecordsApi');
    Route::post('panel/menu/laborReportsCountingRecordApi','ControlPanelController@laborReportsCountingRecordApi');
    Route::post('panel/menu/laborReportsUserGroupsCountApi','ControlPanelController@laborReportsUserGroupsCountApi');
});
