<?php

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


/*
文件地址前缀：/api/thirdPart/weixin
*/

Route::group(['middleware'=>'auth.api'],function(){
    Route::get('waybill', "WxController@index");//微信小程序数据返回
    Route::post('waybill/show', "WxController@show");//微信小程序数据返回
    Route::post('waybill/update', "WxController@update");//微信小程序数据修改
});
Route::post('login', "WxLoginController@login");//微信小程序登录验证

Route::group(['prefix' => 'procurement','middleware'=>'procurement.auth.api'], function ($router) {
    Route::any('banding', 'AuthController@banding');
    Route::post('getWaitQuotation', 'ProcurementController@getWaitQuotation');
    Route::post('getQuotationDetailById', 'ProcurementController@getQuotationDetailById');
    Route::post('setOffer', 'ProcurementController@setOffer');
    Route::post('accept', 'ProcurementController@accept');
    Route::get('getProductionProcurement', 'ProcurementController@getProductionProcurement');
    Route::get('getProcurementDeliveries', 'ProcurementController@getProcurementDeliveries');
    Route::post('makeProcurementDelivery', 'ProcurementController@makeProcurementDelivery');
    Route::post('finishProductionProcurement', 'ProcurementController@finishProductionProcurement');
    Route::post('cancelProcurement', 'ProcurementController@cancelProcurement');
    Route::post('getProcurementDeliveryById', 'ProcurementController@getProcurementDeliveryById');
    Route::post('updateProcurementDeliveryAmount', 'ProcurementController@updateProcurementDeliveryAmount');
    Route::get('getProcurementTotalBill', 'ProcurementController@getProcurementTotalBill');
    Route::post('markProcurementTotalBillStatus', 'ProcurementController@markProcurementTotalBillStatus');
    Route::post('makeReceipt', 'ProcurementController@makeReceipt');
    Route::post('supplierDeliverConfirm', 'ProcurementController@supplierDeliverConfirm');
});
Route::group(['prefix' => 'procurement'], function ($router) {
    Route::post('login', 'AuthController@login');
});
