Commit faf1913d by hcy001

1.0

parents
Showing with 4559 additions and 0 deletions

Too many changes to show.

To preserve performance only 1000 of 1000+ files are displayed.

APP_ENV=local
APP_DEBUG=true
APP_KEY=SomeRandomString
APP_URL=http://localhost
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=homestead
DB_USERNAME=homestead
DB_PASSWORD=secret
CACHE_DRIVER=file
SESSION_DRIVER=file
QUEUE_DRIVER=sync
REDIS_HOST=127.0.0.1
REDIS_PASSWORD=null
REDIS_PORT=6379
MAIL_DRIVER=smtp
MAIL_HOST=mailtrap.io
MAIL_PORT=2525
MAIL_USERNAME=null
MAIL_PASSWORD=null
MAIL_ENCRYPTION=null
* text=auto
*.css linguist-vendored
*.scss linguist-vendored
/node_modules
/public/storage
Homestead.yaml
Homestead.json
.idea
.env
websit.php
/public/php_errors.log
<?php
namespace App\Console\Commands;
use Illuminate\Console\Command;
class ClearDate extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'command:name';
/**
* The console command description.
*
* @var string
*/
protected $description = 'Command description';
/**
* Create a new command instance.
*
* @return void
*/
public function __construct()
{
parent::__construct();
}
/**
* Execute the console command.
*
* @return mixed
*/
public function handle()
{
$Arr=['purchase','purchase_delivery','purchase_delivery_items','purchase_items','putaway','putaway_items','upload_log'];
$DB=DB::connection('web');
foreach ($Arr as $k=>$v){
$result=$DB->table($v)->delete();
if($result){
echo $v.'清理成功';
}
}
}
}
<?php
namespace App\Console\Commands;
use Illuminate\Console\Command;
use Illuminate\Foundation\Inspiring;
class Inspire extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'inspire';
/**
* The console command description.
*
* @var string
*/
protected $description = 'Display an inspiring quote';
/**
* Execute the console command.
*
* @return mixed
*/
public function handle()
{
$this->comment(PHP_EOL.Inspiring::quote().PHP_EOL);
}
}
<?php
namespace App\Console\Commands;
use App\Model\PurchaseDeliveryItemsModel;
use App\Model\PurchaseItemsModel;
use Illuminate\Console\Command;
class ReData extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'ReData';
/**
* The console command description.
*
* @var string
*/
protected $description = 'Command description';
/**
* Create a new command instance.
*
* @return void
*/
public function __construct()
{
parent::__construct();
}
/**
* Execute the console command.
*
* @return mixed
*/
public function handle()
{
$PurchaseItemsModel=new PurchaseDeliveryItemsModel();
$Puc=new PurchaseItemsModel();
$i=0;
$list=$PurchaseItemsModel->where('picking_id','=',31)->select('picking_items_id','picking_id','sku_id','delivery_items_id')->orderBy('picking_items_id','asc')->get()->toArray();
echo '总数-》'.count($list);
foreach ($list as $k=>$v){
$Find=$Puc->where('sku_id','=',$v['sku_id'])->where('picking_id','=',31)->select('picking_items_id')->first();
if(!$Find){
echo 'not Find=>'.$v['sku_id'];
continue;
}else{
$i++;
$result=$PurchaseItemsModel->where('delivery_items_id','=',$v['delivery_items_id'])->update(['picking_items_id'=>$Find['picking_items_id']]);
if(!$result){
echo 'fail->'.$v['sku_id'];
}
}
}
echo '成功->'.$i;
}
}
<?php
namespace App\Console\Commands;
use App\Model\PutawayItemsModel;
use App\Model\PutawayModel;
use Illuminate\Console\Command;
class Warehousing extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'Wh';
/**
* The console command description.
*
* @var string
*/
protected $description = 'Command description';
/**
* Create a new command instance.
*
* @return void
*/
public function __construct()
{
parent::__construct();
}
/**
* Execute the console command.
*
* @return mixed
*/
public function handle()
{
$Model=new PutawayItemsModel();
$Auth=$Model->where('putaway_id','=',58)->select('putaway_number','picking_sn','picking_price','sku_id')->get()->toArray();
foreach ($Auth as $k=>$v){
$data['data'][]=['picking_sn'=>$v['picking_sn'],'putaway_sn'=>'IN18063000001','goods_id'=>$v['sku_id'],'num'=>$v['putaway_number'],'cost'=>$v['picking_price']];
}
dump( $data['data']);
$data['data']=urlencode(json_encode($Auth));
$data['timestamp']=time();
$data['type']='sku.instock';
$token=WMSencryption($data);
$url=Config('website.serviceUrl').'/wmsapi/WebApiStockAuthPush?token='.$token;
$result=curl($url,$data,true);
$result=json_decode($result,true);
if(!$result || $result['errcode']!=0) return [30114,'基石推送入库失败'];
}
}
<?php
namespace App\Console;
use Illuminate\Console\Scheduling\Schedule;
use Illuminate\Foundation\Console\Kernel as ConsoleKernel;
class Kernel extends ConsoleKernel
{
/**
* The Artisan commands provided by your application.
*
* @var array
*/
protected $commands = [
// Commands\Inspire::class,
Commands\ClearDate::class,
Commands\ReData::class,
Commands\Warehousing::class//手动入库
];
/**
* Define the application's command schedule.
*
* @param \Illuminate\Console\Scheduling\Schedule $schedule
* @return void
*/
protected function schedule(Schedule $schedule)
{
// $schedule->command('inspire')
// ->hourly();
}
}
<?php
namespace App\Events;
abstract class Event
{
//
}
<?php
namespace App\Exceptions;
use Exception;
use Illuminate\Validation\ValidationException;
use Illuminate\Auth\Access\AuthorizationException;
use Illuminate\Database\Eloquent\ModelNotFoundException;
use Symfony\Component\HttpKernel\Exception\HttpException;
use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler;
class Handler extends ExceptionHandler
{
/**
* A list of the exception types that should not be reported.
*
* @var array
*/
protected $dontReport = [
AuthorizationException::class,
HttpException::class,
ModelNotFoundException::class,
ValidationException::class,
];
/**
* Report or log an exception.
*
* This is a great spot to send exceptions to Sentry, Bugsnag, etc.
*
* @param \Exception $e
* @return void
*/
public function report(Exception $e)
{
\LogReport::write(\LogReport::anlyError($e->getMessage() , $e->getFile(), $e->getLine()));
parent::report($e);
}
/**
* Render an exception into an HTTP response.
*
* @param \Illuminate\Http\Request $request
* @param \Exception $e
* @return \Illuminate\Http\Response
*/
public function render($request, Exception $e)
{
return parent::render($request, $e);
}
}
<?php
namespace App\Http\Controllers;
use App\Model\CommonModel;
use App\Model\InquiryItemsReportModel;
use App\Model\InquiryModel;
use App\Model\InquiryItemsModel;
use App\Model\OperationLogModel;
use App\Jobs\FastDelivery;
use App\Model\OpLogModel;
use App\Model\PreSaleOrderModel;
use App\Jobs\PreSaleOrder;
use App\Jobs\PushFinancePeriod;
use App\Jobs\SafeStock;
use App\Model\ModuleModel;
use App\Model\QuoteModel;
use App\Model\Server\ExportModel;
use App\Model\SupplierChannelComModel;
use App\Model\SupplierChannelSelfModel;
use Illuminate\Http\Request;
use App\Http\Requests;
use RedisDB;
/*
* pc接口
*/
class ApiController extends Controller
{
public function Entrance(Request $request, $id){
// //统一入口
// $perm=perm($request->user->userId,$id,'api');
// if($perm!==true){
// $this->Export(10010,'没有操作权限');
// }
$this->$id($request, $id);
}
//关闭询价
private function ApiInquiryClose($request, $id){
$this->Export((new InquiryModel())->closeInquiry($request->input('inquiry_id')));
}
//询价列表
private function ApiInquiryList($request, $id){
$input = $_REQUEST;
$input["user_id"]=$request->user->userId;
$input["email"]=$request->user->email;
ExportLayui((new InquiryModel())->getList($input));
}
//询价池
private function ApiInquiryListPool($request, $id){
$input = $_REQUEST;
$input["user_id"]=$request->user->userId;
$input["email"]=$request->user->email;
ExportLayui((new InquiryModel())->getListPool($input));
}
//报价明细列表列表
private function ApiQuoteItemsList($request, $id){
ExportLayui((new QuoteModel())->ItemsList($_REQUEST));
}
//搜索品牌
private function ApiBrandList($request, $id){
(new CommonModel())->BrandList($request->input('k'));
}
//搜索型号
private function ApiSkuList($request, $id){
(new CommonModel())->SkuList($request->input('k'));
}
//搜索采购
private function ApiUserList($request, $id){
(new CommonModel())->UserList($request->input('k'));
}
//搜索供应商
private function ApiSupplierList($request, $id){
(new CommonModel())->SupplierList($request->input('k'));
}
//添加询价
private function ApiAddInquiry($request, $id){
(new CommonModel())->UserList($request->input('k'));
}
//生成报价/销售 询价单
private function ApiAddInquiryReport($request, $id){
(new InquiryItemsReportModel())->addOffer();
}
//清空询价列表
private function ApiDeleteInquiryItems($request, $id){
Export((new InquiryItemsModel())->DeleteInquiryItems($request->input('inquiry_id'), $request->user->userId));
}
//导出询价
private function ApiInquiryExport($request){
(new ExportModel())->InquiryExport($request->input(),$request->user->userId);
}
//生成报价pdf
private function ApiOfferPdf($request){
(new CommonModel())->Pdf();
}
//日志查询
private function ApiOpLogList($request){
ExportLayui((new OpLogModel())->getList());
}
// 领取询价
public function ApiTakeInquiry($request, $id)
{
Export((new InquiryItemsModel())->takeInquiry($request));
}
//报价列表
public function ApiQuoteList($request, $id)
{
ExportLayui((new QuoteModel())->lists($request));
}
// 撤销报价
public function ApiCancelQuote($request, $id)
{
Export((new QuoteModel())->cancel($request));
}
// 新增报价
public function ApiAddQuote($request, $id)
{
$this->Export((new QuoteModel())->add($request));
}
}
<?php
namespace App\Http\Controllers\Auth;
use App\User;
use Validator;
use App\Http\Controllers\Controller;
use Illuminate\Foundation\Auth\ThrottlesLogins;
use Illuminate\Foundation\Auth\AuthenticatesAndRegistersUsers;
class AuthController extends Controller
{
/*
|--------------------------------------------------------------------------
| Registration & Login Controller
|--------------------------------------------------------------------------
|
| This controller handles the registration of new users, as well as the
| authentication of existing users. By default, this controller uses
| a simple trait to add these behaviors. Why don't you explore it?
|
*/
use AuthenticatesAndRegistersUsers, ThrottlesLogins;
/**
* Where to redirect users after login / registration.
*
* @var string
*/
protected $redirectTo = '/';
/**
* Create a new authentication controller instance.
*
* @return void
*/
public function __construct()
{
$this->middleware($this->guestMiddleware(), ['except' => 'logout']);
}
/**
* Get a validator for an incoming registration request.
*
* @param array $data
* @return \Illuminate\Contracts\Validation\Validator
*/
protected function validator(array $data)
{
return Validator::make($data, [
'name' => 'required|max:255',
'email' => 'required|email|max:255|unique:users',
'password' => 'required|min:6|confirmed',
]);
}
/**
* Create a new user instance after a valid registration.
*
* @param array $data
* @return User
*/
protected function create(array $data)
{
return User::create([
'name' => $data['name'],
'email' => $data['email'],
'password' => bcrypt($data['password']),
]);
}
}
<?php
namespace App\Http\Controllers\Auth;
use App\Http\Controllers\Controller;
use Illuminate\Foundation\Auth\ResetsPasswords;
class PasswordController extends Controller
{
/*
|--------------------------------------------------------------------------
| Password Reset Controller
|--------------------------------------------------------------------------
|
| This controller is responsible for handling password reset requests
| and uses a simple trait to include this behavior. You're free to
| explore this trait and override any methods you wish to tweak.
|
*/
use ResetsPasswords;
/**
* Create a new password controller instance.
*
* @return void
*/
public function __construct()
{
$this->middleware('guest');
}
}
<?php
namespace App\Http\Controllers;
use Illuminate\Foundation\Bus\DispatchesJobs;
use Illuminate\Routing\Controller as BaseController;
use Illuminate\Foundation\Validation\ValidatesRequests;
use Illuminate\Foundation\Auth\Access\AuthorizesRequests;
use Illuminate\Foundation\Auth\Access\AuthorizesResources;
class Controller extends BaseController
{
use AuthorizesRequests, AuthorizesResources, DispatchesJobs, ValidatesRequests;
}
<?php
namespace App\Http\Controllers;
use App\Http\Requests;
use App\Http\Controllers\Controller;
use Request;
use Barryvdh\DomPDF\PDF;
use Illuminate\Support\Facades\App;
class HdController extends Controller
{
public function Entrance(Request $request, $id ){
//统一入口
$this->$id($request, $id);
}
private function Export($errcode=0,$errmsg='成功',$data=''){
echo json_encode(['errcode'=>$errcode,'errmsg'=>$errmsg,'data'=>$data]);
exit();
}
//pdf添加
private function a(){
$dompdf = new \Dompdf\Dompdf();
$options = new \Dompdf\Options();
$options->setIsPhpEnabled(true);
$options->setIsFontSubsettingEnabled(true);//启用字体子集,缩小pdf大小
$dompdf->loadHtml("dgaagagaga");
$dompdf->setPaper('A4', 'portrait');
$dompdf->setOptions($options);
$dompdf->render();
return $dompdf->stream('44444.pdf');
}
private function test(){
echo '{
"code": 0,
"msg": "",
"count": 1000,
"data": [
{
"id": 10000,
"username": "柳岩",
"sex": "女",
"sexId": 2,
"city": "湖南衡阳",
"sign": " 嘟嘟嘟 滴滴滴 哒哒哒",
"experience": 2556656,
"logins": 8848,
"wealth": "7000 000 000",
"classify": "武术家",
"classifyId": 1,
"score": 5700520520
},
{
"id": 10001,
"username": "成吉思汗",
"sex": "男",
"sexId": 1,
"city": "蒙古 乌兰巴托",
"sign": "世界很糟糕 幸好我可爱(1162年-1227年8月25日)",
"experience": 884808806,
"logins": 8848,
"wealth": 64928690,
"classify": "军事家",
"classifyId": 2,
"score": 27000000
},
{
"id": 10002,
"username": "杨过",
"sex": "男",
"sexId": 2,
"city": "襄阳城东30里小古屯村头",
"sign": "到了一定年龄,便要学会寡言,每一句话都要有用,有重量。喜怒不形于色,大事淡然",
"experience": 65555208848,
"logins": 8848,
"wealth": 6298078,
"classify": "侠客",
"score": 31985253
},
{
"id": 10003,
"username": "小龙女",
"sex": "女",
"sexId": 2,
"city": "湖北省 襄阳城 以北古墓村32号",
"sign": "想过过,过儿,过过,的生活",
"experience": 36254545587,
"logins": 8848,
"wealth": 37117017,
"classify": "古墓派第三代掌门人",
"classifyId": 2,
"score": 68555222552
},
{
"id": 10004,
"username": "郭靖",
"sex": "男",
"sexId": 1,
"city": "湖北省 襄阳城 城西 32号",
"sign": "谁曾从谁的青春里走过,留下了笑靥,谁曾在谁的花季里停留,温暖了想念,谁又从谁的雨季里消失,泛滥了眼泪。",
"experience": 8072520120,
"logins": 8848,
"wealth": 76263262,
"classify": "大将军",
"classifyId": 1,
"score": 612045254452
},
{
"id": 10005,
"username": "黄蓉",
"sex": "女",
"sexId": 2,
"city": "湖北省 襄阳城 城西 32号",
"sign": "签名-5",
"experience": 1710254523,
"logins": 8848,
"wealth": 603441402417,
"classify": "丐帮帮主 襄阳城CEO夫人",
"classifyId": 1,
"score": 8712455210
},
{
"id": 10006,
"username": "周伯通",
"sex": "男",
"sexId": 2,
"city": "湖北省 襄阳城",
"sign": " 如果我们都是孩子,就可以留在时光的原地,坐在一起一边听那些永不老去的故事一边慢慢皓首 —— 老顽童",
"experience": 9821213,
"logins": 8848,
"wealth": 57768166,
"classify": "作家",
"classifyId": 1,
"score": 3424245254
},
{
"id": 10007,
"username": "黄药师",
"sex": "男",
"sexId": 1,
"city": "湖北省 襄阳城",
"sign": " 生活总是让我们遍体鳞伤,但到后来,那些受伤的地方一定会变成我们最强壮的地方。 ",
"experience": 72721045202,
"logins": 8848,
"wealth": 82030578,
"classify": "侠客",
"classifyId": 1,
"score": 284525401
},
{
"id": 10008,
"username": "洪七公",
"sex": "男",
"sexId": 1,
"city": "湖北省 襄阳城",
"sign": "听弦断,断那三千痴缠。坠花湮,湮没一朝风涟。花若怜,落在谁的指尖。 ",
"experience": 951452154,
"logins": 8848,
"wealth": 16503371,
"classify": "降龙十八掌创始人(网红)",
"classifyId": 2,
"score": 1412455242
},
{
"id": 10009,
"username": "段智兴",
"sex": "男",
"sexId": 2,
"city": "湖北省 襄阳城",
"sign": " 怔怔的,凝望属于自己的人生,虽曾有过偶尔的欢欣,更多的,是否重来一次则会改变的选择?",
"experience": 48445210,
"logins": 8848,
"wealth": 86801934,
"classify": "侠客",
"classifyId": 2,
"score": 755420545
}
]
}
';
}
private function test1(){
$arr1= '{
"p": "1",
"is_export": "1"
}
';
// $res = (new ServerController())->InquiryServer($arr1);
// die();
$url = "http://frq.liexin.com/server/InquiryExport";
$client = new \Hprose\Http\Client($url,false);
$d = $client->InquiryServer($arr1);
print_r($d);
die();
}
}
<?php
namespace App\Http\Controllers;
use App\Model\InquiryModel;
use Illuminate\Http\Request;
use App\Http\Requests;
use DB;
use Hprose;
/*
* 对外接口(小程序,app, 云芯)
*/
class ServerController extends Controller
{
public function Entrance(Request $request, $id)
{
set_time_limit(0);
$this->$id($request, $id);
}
/*
* 询报价导出
*/
public function InquiryExport(){
$server=new Hprose\Http\Service();
$server->addMethod('InquiryServer',$this);
$server->handle();
}
public function InquiryServer($info){
$res= (new InquiryModel())->getList(json_decode($info,true));
return ExportLayuiReturn($res);
}
}
<?php
namespace App\Http;
use Illuminate\Foundation\Http\Kernel as HttpKernel;
class Kernel extends HttpKernel
{
/**
* The application's global HTTP middleware stack.
*
* These middleware are run during every request to your application.
*
* @var array
*/
protected $middleware = [
\Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode::class,
];
/**
* The application's route middleware groups.
*
* @var array
*/
protected $middlewareGroups = [
'web' => [
\App\Http\Middleware\CheckLogin::class,
\Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class,
],
'api' => [
],
'webapi'=>[
],
'WmsApi'=>[
\App\Http\Middleware\WmsVerification::class,
]
];
/**
* The application's route middleware.
*
* These middleware may be assigned to groups or used individually.
*
* @var array
*/
protected $routeMiddleware = [
'auth' => \App\Http\Middleware\Authenticate::class,
'auth.basic' => \Illuminate\Auth\Middleware\AuthenticateWithBasicAuth::class,
'can' => \Illuminate\Foundation\Http\Middleware\Authorize::class,
'guest' => \App\Http\Middleware\RedirectIfAuthenticated::class,
'throttle' => \Illuminate\Routing\Middleware\ThrottleRequests::class,
];
}
<?php
//日志目录位置
defined('REPORT_LOG_PATH') or define('REPORT_LOG_PATH', dirname($_SERVER['DOCUMENT_ROOT']).'/storage/logs/LogReport/');
//项目名
defined('REPORT_APP_NAME') or define('REPORT_APP_NAME', 'pur');
//单日志文件大小限制
defined('LOG_FILE_SIZE') or define('LOG_FILE_SIZE', 2097152); //2MB
// 设定错误和异常处理
error_reporting(0);
LogReport::auto();
class LogReport
{
static $handler = [
'finally_except' => ['Think\Think', 'appException'],
'finally_error' => ['Think\Think', 'appError'],
];
static $data = [
'msg' => '',// 错误信息
'msgCode' => '',// 自定义错误码 六位数字字符串 etc "100000"
'ts' => '',// 10位整形 时间戳
'dateStr' => '',// 日期 2018-06-28 21:24:09
'app' => '',// 应用名称
'serverIp' => '',// 服务器ip
'fileName' => '',// 文件名
'lineNo' => '',// 行数
'method' => '',// 函数名
];
/**
* 自动注册
* @return [type] [description]
*/
static function auto()
{
if (defined('APP_PATH')) {
self::register();
self::set();
} else {
self::$handler = array_map(function($v){
return [];
}, self::$handler);
}
}
/**
* 注册致命错误
* @return [type] [description]
*/
static function register()
{
register_shutdown_function('LogReport::fatalError');
}
/**
* 设置处理方法
*/
static function set()
{
set_error_handler('LogReport::appError');
set_exception_handler('LogReport::exception');
}
/**
* 错误数据格式
* @param string|array $e 错误内容|'message','file','line','code','method'
* @param string $file 错误文件
* @param string $line 错误行数
* @param string $code 错误码
* @param string $method 错误函数
* @return [type] [description]
*/
static function anlyError($e, $file = null, $line = null, $code = null, $method = null)
{
if (!is_array($e)) {
$e = [
'message' => $e,
'file' => !is_null($file) ? $file : '',
'line' => !is_null($line) ? $line : '',
'code' => !is_null($code) ? $code : '',
'method' => !is_null($method) ? $method : '',
];
}
$data = self::$data;
$data['msg'] = !empty($e['message']) ? $e['message'] : '';
$data['msgCode'] = str_pad($e['code'], 6, '0', STR_PAD_LEFT);
$data['ts'] = time();
$data['dateStr'] = date('Y-m-d H:i:s');
$data['app'] = REPORT_APP_NAME;
$data['serverIp'] = !empty($_SERVER['REMOTE_ADDR'])?$_SERVER['REMOTE_ADDR']:'0.0.0.0';
$data['fileName'] = !empty($e['file']) ? $e['file'] : '';
$data['lineNo'] = !empty($e['line']) ? $e['line'] : '';
$data['method'] = !empty($e['method']) ? $e['method'] : '';
return $data;
}
/**
* 致命错误处理
* @return [type] [description]
*/
static function fatalError()
{
if ($e = error_get_last()) {
switch ($e['type']) {
case E_ERROR:
case E_PARSE:
case E_CORE_ERROR:
case E_COMPILE_ERROR:
case E_USER_ERROR:
ob_end_clean();
self::write(self::anlyError($e));
break;
}
}
// exit();
}
/**
* 一般错误处理
* @param [type] $errno [description]
* @param [type] $errstr [description]
* @param [type] $errfile [description]
* @param [type] $errline [description]
* @return [type] [description]
*/
static function appError($errno, $errstr, $errfile, $errline)
{
switch ($errno) {
case E_ERROR:
case E_PARSE:
case E_CORE_ERROR:
case E_COMPILE_ERROR:
case E_USER_ERROR:
self::write(self::anlyError($errstr , $errfile, $errline));
break;
}
if (!empty(self::$handler['finally_error'])) {
call_user_func(self::$handler['finally_error'], $errno, $errstr, $errfile, $errline);
}
}
/**
* 异常处理
* @return [type] [description]
*/
static function exception($e)
{
self::write(self::anlyError($e->getMessage() , $e->getFile(), $e->getLine()));
if (!empty(self::$handler['finally_except'])) {
call_user_func(self::$handler['finally_except'], $e);
}
}
/**
* 日志记录
* @param string $log 日志内容
* @return [type] [description]
*/
static function write($log)
{
if (is_array($log)) {
$log = json_encode($log);
}
if (empty($log)) {
return false;
}
// 自动创建日志目录
if (!is_dir(REPORT_LOG_PATH)) {
mkdir(REPORT_LOG_PATH, 0755, true);
}
$name = date('Ymd');
$filename = REPORT_LOG_PATH.$name.'.log';
//检测日志文件大小,超过配置大小则备份日志文件重新生成
if (is_file($filename) && floor(LOG_FILE_SIZE) <= filesize($filename)) {
rename($filename, dirname($filename) . '/' . $name. '-' . time() . '.log');
}
$log .= PHP_EOL;
return file_put_contents($filename, $log, FILE_APPEND);
}
}
\ No newline at end of file
<?php
namespace App\Http\Middleware;
use Closure;
use App\Http\Output;
use App\Http\Error;
use Config;
use DB;
class CheckLogin
{
/**
* Handle an incoming request.
*
* @param \Illuminate\Http\Request $request
* @param \Closure $next
* @return mixed
*/
public function handle($request, Closure $next)
{
$userId = $request->cookie('oa_user_id');
$skey = $request->cookie('oa_skey');
$isApi = false;
$pos = strpos($request->path(), 'api/');
if ($pos === 0)
$isApi = true;
$login = Config::get('website.login');
if (!$userId || !$skey || (string)((int)$userId) != $userId || !preg_match('/^[a-zA-Z0-9]+$/', $skey)) {
if ($isApi)
return ["errcode" => 401, "errmsg" => "没有登录"];
return redirect($login['login'] . '?redirect=' . urlencode($request->url()));
}
$cookie = 'oa_user_id=' . $userId . '; oa_skey=' . $skey;
// $client = new \GuzzleHttp\Client();
// $rsp = $client->request('GET', $login['check'], [
// 'headers' => ['Cookie' => $cookie],
// 'connect_timeout' => 10,
// 'timeout' => 30
// ]);
$rsp=curl($login['check'],'',false,false,$cookie);
// if ($rsp->getStatusCode() != 200) {
// Log::error("query {$login['check']} failed: code " . $rsp->getStatusCode());
// if ($isApi)
// return ['errcode' => -$rsp->getStatusCode(), 'errmsg' => '鉴权失败'];
// abort(500);
// }
if (!$rsp) {
// Log::error("query {$login['check']} failed: code ");
if ($isApi)
return ['errcode' =>10001, 'errmsg' => '鉴权失败'];
abort(500);
}
// $ret = json_decode($rsp->getBody());
$ret = json_decode($rsp);
if ($ret->retcode != 0) {
if ($isApi)
return ["errcode" => $ret->retcode, "errmsg" => $ret->errMsg];
return redirect($login['login'] . '?redirect=' . urlencode($request->url()));
}
$user = $ret->data;
$user->code=DB::connection()->table('lie_intracode')->where('admin_id',$user->userId)->select('code_id')->first();
$user->header = $request->cookie('oa_header');
$request->user = $user;
$request->login_cookie = $cookie;
return $next($request);
}
}
<?php
namespace App\Http\Middleware;
use Closure;
use App\Http\Output;
use App\Http\Controllers\LoginController;
use App\Http\Error;
use Config;
class JsonpCallback
{
/**
* Handle an incoming request.
*
* @param \Illuminate\Http\Request $request
* @param \Closure $next
* @return mixed
*/
public function handle($request, Closure $next)
{
$callback = $request->input('callback', null);
$result = $next($request);
if (!$callback)
return $result;
if (strpos($request->path(), 'api/') !== 0)
return $result;
if (!preg_match('/^[_A-Za-z0-9]+$/', $callback))
return $result;
if (is_array($result)) {
$result = $callback . '(' . json_encode($result) . ')';
} else {
$result->setContent($callback . '(' . $result->content() . ')');
}
return $result;
}
}
<?php
namespace App\Http\Middleware;
use Closure;
use App\Http\Output;
use App\Http\Error;
use Config;
use DB;
use Request;
use RedisDB;
class WmsVerification
{
/**
* Handle an incoming request.
*
* @param \Illuminate\Http\Request $request
* @param \Closure $next
* @return mixed
*/
public function handle($request, Closure $next)
{
$data=Request::only('data','timestamp');
$token=Request::only('token');
if(empty($data['data']) || empty($data['timestamp']) || empty($token)) return $this->Export(30001,'参数缺失');
$token=$token['token'];
if(WMSVerification($data,$token)!==true) return $this->Export(30002,'签名验证失败');
$request->Wmsdata=json_decode(urldecode($data['data']),true);
return $next($request);
}
private function Export($errcode=0,$errmsg='成功',$data='',$total=''){
if(is_array($errcode)){
return json_encode(['errcode'=>$errcode[0],'errmsg'=>$errcode[1],'data'=>!empty($errcode[2])?$errcode[2]:'','total'=>!empty($errcode[3])?$errcode[3]:''], JSON_UNESCAPED_UNICODE|JSON_UNESCAPED_SLASHES);
}else{
return json_encode(['errcode'=>$errcode,'errmsg'=>$errmsg,'data'=>$data,'total'=>$total], JSON_UNESCAPED_UNICODE|JSON_UNESCAPED_SLASHES);
}
}
}
<?php
namespace App\Http\Requests;
use Illuminate\Foundation\Http\FormRequest;
abstract class Request extends FormRequest
{
//
}
<?php
Route::group(['middleware' => 'web'], function () {
Route::get('/', 'WebController@info');
Route::match(['get', 'post'],'/web/{key}', 'WebController@info');
Route::match(['get', 'post'],'/api/{key}', 'ApiController@Entrance');
Route::match(['get', 'post'],'/hd/{key}', 'HdController@Entrance');
});
Route::group(['middleware' => 'webapi'], function () {
Route::match(['get', 'post'],'/WebApi/{key}', 'WebApiController@Entrance');
});
Route::group(['middleware' => 'WmsApi'], function () {
Route::match(['get', 'post'],'/wmsapi/{key}','WmsApiController@Entrance');
});
Route::match(['get', 'post'],'/server/{key}', 'ServerController@Entrance'); //对外提供导出回调接口
\ No newline at end of file
<?php
namespace App\Jobs;
use Illuminate\Bus\Queueable;
abstract class Job
{
/*
|--------------------------------------------------------------------------
| Queueable Jobs
|--------------------------------------------------------------------------
|
| This job base class provides a central location to place any logic that
| is shared across all of your jobs. The trait included with the class
| provides access to the "onQueue" and "delay" queue helper methods.
|
*/
use Queueable;
}
<?php
namespace App\Model;
use Illuminate\Database\Eloquent\Model;
use Request;
use DB;
//公共模型
class CommonModel extends Model
{
//搜索联营品牌
public function BrandList($k)
{
$brandInfo = DB::connection("spu")->select("select brand_id as value,brand_name as name from lie_brand where brand_name like '%".$k."%' limit 10");
echo json_encode($brandInfo,JSON_UNESCAPED_UNICODE) ;
exit();
}
//导出pdf
public function Pdf(){
//pdf添加
$dompdf = new \Dompdf\Dompdf();
$options = new \Dompdf\Options();
$options->setIsPhpEnabled(true);
$options->setIsFontSubsettingEnabled(true);//启用字体子集,缩小pdf大小
$dompdf->loadHtml("dgaagagaga");
$dompdf->setPaper('A4', 'portrait');
$dompdf->setOptions($options);
$dompdf->render();
return $dompdf->stream("报价".date("Y-m-d H:i:s").'.pdf');
}
//模糊搜索sku型号
public function SkuList($k)
{
$url = "http://s.ichunt.com/api/think?k=".$k;
$res = post_curl($url,[]);
$resArr = \GuzzleHttp\json_decode($res,true);
$temp = [];
if (count($resArr["data"]) == 0){
array_push($temp,["value"=>$k,"name"=>$k]);
}else{
foreach ($resArr["data"] as $k=>$v){
array_push($temp,["value"=>$v,"name"=>$v]);
}
}
echo json_encode($temp,JSON_UNESCAPED_UNICODE) ;
}
/*
* 查询采购名称
*/
public function UserList($k){
$purInfo = DB::connection()->select("select userId as value,name as name from user_info where name like '%".$k."%' limit 10");
echo json_encode($purInfo,JSON_UNESCAPED_UNICODE) ;
}
// 搜索供应商
public function SupplierList($k)
{
$supplierInfo = DB::connection('ass')->select("select supplier_id as value, supplier_name as name from lie_supplier_channel where status = 2 and supplier_name like '%".$k."%' limit 10");
echo json_encode($supplierInfo,JSON_UNESCAPED_UNICODE) ;
}
}
\ No newline at end of file
<?php
namespace App\Model\Server;
use Request;
use DB;
//通用导出模型
class ExportModel
{
private $frqUrl ; //询报价网址
private $ExportUrl ; //导出网址
const IS_DEBUG = 0; //是否调试
public function __construct()
{
$this->ExportUrl = getHostUrl('export_domain');
$this->frqUrl = getHostUrl('frq_domain');
}
public function push($data){
$client = new \Hprose\Http\Client($this->ExportUrl."/insertExport",false);
$res = $client->insertExport(json_encode($data));
if (self::IS_DEBUG){
print_r($this->ExportUrl."/insertExport");
print_r("<br/>");
print_r($data);
print_r("<br/>");
print_r($res);
print_r("<br/>");
die();
}
return $res;
}
/*
* 询价导出
*/
public function InquiryExport($input,$create_uid){
$input["is_export"] = 1; #导出状态
$header = ["询价单号","询价型号","询价品牌","询价数量","询价客户","询价时间","客户目标报价","报价","状态"];
switch ($input["types"]){
case 1:
$file_name = "我的询价";
break;
case 2:
$file_name = "已关闭的询价";
break;
case 3:
$file_name = "全部询价";
break;
}
$data = [
"type"=> 2, # 类型 1:模板调用 2: api回调
"source_items_id"=>config("website.frq_export_inquiry"), #来源明细id,必填
"file_name"=> $file_name,
"excel_suf" => "csv", #导出文件格式 csv,xls
"header"=> $header,
"query_param"=>$input, #查询参数
"callbackurl"=> $this->frqUrl."/server/InquiryExport", #rpc回调网址
"callbackfuc"=>"InquiryServer", #rpc回调函数
"create_uid"=> $create_uid, #创建人id
];
echo self::push($data);
}
}
\ No newline at end of file
<?php
namespace App\Model\Server;
use App\Model\OpLogModel;
use League\Flysystem\Exception;
use Request;
use DB;
/*
对接go接口
*/
class GoModel
{
private $SERVICE_URL;
public function __construct()
{
$this->SERVICE_URL = Config('website.frq_go_server');
}
/*
*创建询价(单个)
*/
public function createInquiry($data){
$result=curl( $this->SERVICE_URL, http_build_query($data), true,false,'');
return json_decode($result,true);
}
}
<?php
namespace App\Model;
use Illuminate\Database\Eloquent\Model;
use App\Model\UserModel;
class InquiryItemsAssignModel extends Model
{
protected $connection = 'rfq';
protected $table = 'inquiry_items_assign';
protected $primaryKey = 'id';
public $timestamps = false;
// 指定或领取询价
public function assign($inquiry_items_id, $assign_uid, $types=1)
{
$UserModel = new UserModel;
$data = [];
$data['inquiry_items_id'] = $inquiry_items_id;
$data['assign_uid'] = $assign_uid;
$data['assign_name'] = $UserModel->FinduserInfoName($assign_uid);
$data['types'] = $types;
$data['create_time'] = time();
return $this->insert($data);
}
}
\ No newline at end of file
<?php
namespace App\Model;
use App\map\InquiryMap;
use App\map\QuoteMap;
use Illuminate\Database\Eloquent\Model;
use App\Model\InquiryItemsAssignModel;
use App\Model\OplogModel;
use App\Model\UserModel;
use DB;
class InquiryItemsModel extends Model
{
protected $connection = 'rfq';
protected $table = 'inquiry_items';
protected $primaryKey = 'id';
public $timestamps = false;
const CREATED_AT = 'create_time';
const UPDATED_AT = 'update_time';
public function fromDateTime($value)
{
return strtotime(parent::fromDateTime($value));
}
//生成报价单详情
public function ItemsOfferDetail($inquiry_id)
{
$con = DB::connection('rfq');
$list = $con->table('inquiry as a')
->selectRaw("lie_a.currency as currency,lie_b.*")
->join('inquiry_items as b','a.id','=','b.inquiry_id')->where("inquiry_id",$inquiry_id)->get();
$QuoteModel = new QuoteModel();
foreach ($list as $k=>&$v){
$v["create_time"] = timeToDate($v["create_time"]);
//查询最低报价
if ($v['currency'] == 1){ //人民币
$quote =$QuoteModel->selectRaw("price_rmb as quote_price")->where("status",QuoteMap::status_sure)->first();
} else { //美金
$quote = $QuoteModel->selectRaw("price_origin as quote_price")->where("status",QuoteMap::status_sure)->first();
}
if (@$quote["quote_price"] > 0 ){
$v['quote_price'] = $quote["quote_price"];
$v['quote_price_count'] = round($quote["quote_price"]*$v["inquiry_number"],4);
}else{
$v['quote_price'] = "";
$v['quote_price_count'] = "";
}
}
return $list;
}
//询价明细详情
public function ItemsDetail($inquiry_items_id)
{
$sql1 = "
SELECT
a.inquiry_sn,
a.delivery_place,
a.create_time,
a.create_time,
b.*,
(
SELECT
GROUP_CONCAT(assign_name)
FROM
lie_inquiry_items_assign c
WHERE
c.inquiry_items_id = b.id
) as assign_name
FROM
lie_inquiry a,
lie_inquiry_items b
WHERE
a.id = b.inquiry_id
and b.id = ".$inquiry_items_id;
$list = DB::connection('rfq')->select($sql1);
foreach ($list as $k=>&$v){
$v["create_time"] = timeToDate($v["create_time"]);
$v['status'] = InquiryMap::$status[$v["status"]];
}
return $list;
}
// 领取询价
public function takeInquiry($request)
{
$id = $request->input('id', 0);
if (!$id) return [-1, '参数缺失'];
try {
$this->where('id', $id)->update(['assign_type' => 2]);
$InquiryItemsAssignModel = new InquiryItemsAssignModel;
$map = [];
$map['inquiry_items_id'] = $id;
$map['assign_uid'] = $request->user->userId;
$res = $InquiryItemsAssignModel->where($map)->value('id');
if ($res) return [-1, '该询价已领取'];
$InquiryItemsAssignModel->assign($id, $request->user->userId);
// 添加操作日志
$inquiry_items = $this->find($id);
$UserModel = new UserModel;
$data = [];
$data['types'] = 1;
$data['relation_id'] = $id;
$data['content'] = '领取询价,商品名称:'.$inquiry_items['goods_name'];
$data['create_uid'] = $request->user->userId;
$data['create_name'] = $UserModel->FinduserInfoName($request->user->userId);
OplogModel::log($data);
} catch (Exception $e) {
return [-1, $e->getMessage()];
}
return [0, '领取成功,请及时报价'];
}
//删除列表
public function DeleteInquiryItems($inquiry_id,$create_uid){
$check = (new InquiryModel())->where(["inquiry_id"=>$inquiry_id,"create_uid"=>$create_uid])->first();
if (!$check){
return [1001,"不存在数据"];
}else{
$del = $this->where(["inquiry_id"=>$inquiry_id])->delete();
return [0,"删除成功"];
}
}
}
\ No newline at end of file
<?php
namespace App\Model;
use App\map\InquiryMap;
use Illuminate\Database\Eloquent\Model;
use App\Model\InquiryItemsAssignModel;
use App\Model\OplogModel;
use App\Model\UserModel;
use DB;
// 销售/报价 单
class InquiryItemsReportModel extends Model
{
protected $connection = 'rfq';
protected $table = 'inquiry_items_report';
protected $primaryKey = 'id';
public $timestamps = false;
//生成报价单
public function addOffer(){
if (!Request::has("abnormal_id")){
return false;
}
$input = Request::all();
print_r($input);
die();
$insertArr = []; //批量插入数组
foreach ($input as $k=>$v){
if (strpos($k,'items_') !== false){//实际数量
$inquiry_items_id= str_replace('items_','',$k); //异常明细ID
$abnormal_items_type = $input['abnormal_items_type_'.$itemId]; //处理类型
foreach ($v as $k1=>$v1){
if (!$v1){
jsonError("实际数量不得为0");
}
$insertArr[]=[
'abnormal_id'=>$abnormalID,
'picking_items_id'=>$picking_items_id,
'abnormal_number' => $k1 > 0 ? 0 : $abnormal_number, //原差异数量
'real_number' => $v1, //实际数量
'abnormal_items_type' => $abnormal_items_type[$k1], //不良品
];
}
}
}
try{
$con = DB::connection('web');
$con->beginTransaction();
$this->where('abnormal_id', '=', $abnormalID)->delete(); //先批量删除,再插入
$this->insert($insertArr); //批量插入
$con->commit();
jsonSucces('提交审核成功');
}catch (\Exception $e) {
jsonError("提交审核失败,请重试!".$e->getMessage());
}
}
}
\ No newline at end of file
<?php
namespace App\Model;
use Illuminate\Database\Eloquent\Model;
class InquiryItemsUrgeModel extends Model
{
protected $connection = 'rfq';
protected $table = 'inquiry_items_urge';
protected $primaryKey = 'id';
public $timestamps = false;
// 获取最近一条催价
public function getLastInfo($inquiry_items_id)
{
return $this->where('inquiry_items_id', $inquiry_items_id)->orderBy('id', 'desc')->first();
}
}
\ No newline at end of file
<?php
namespace App\Model;
use App\map\OpLogMap;
use Illuminate\Database\Eloquent\Model;
use Request;
use DB;
class OpLogModel extends Model
{
protected $connection='rfq';
protected $table='op_log_0';
protected $primaryKey='id';
public $timestamps = false;
//列表
public function getList()
{
$input = Request::all();
$list = $this->where(function ($query) use ($input) {
foreach ($input as $k => $v){
$v = trim($v);
if (empty($v)){
continue;
}
switch ($k){
case "relation_id":
case "types":
$query->where($k,$v);
break;
}
}
})->orderBy('id','desc')->paginate($input['limit'], ['*'], 'p', $input['p'])->toArray();
if (!$list) return [20001, '没有数据'];
foreach ($list['data'] as $k=>&$v){
$v['create_time'] = date("Y-m-d H:i:s",$v['create_time']);
}
return [0, '成功', $list['data'], $list['total']];
}
/*
* 插入操作日志
`id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '日志id',
`types` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '日志类型: 询价 1 报价 2 ',
`relation_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '关联操作表id',
`relation_sn` varchar(20) NOT NULL DEFAULT '' COMMENT '关联操作编号',
`content` varchar(255) NOT NULL DEFAULT '' COMMENT '操作内容',
`remark` varchar(255) NOT NULL DEFAULT '' COMMENT '备注',
`create_uid` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '操作人uid',
`create_name` varchar(20) NOT NULL DEFAULT '' COMMENT ' 操作人名称',
`create_time` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '添加时间',
* eg:
* OpLogModel::log(["types"=>"1","content"=>$input,'remark'=>'新增询价']); //日志
*/
static public function log($data)
{
$data['types'] = @$data['types'];
$data['relation_id'] = @$data['relation_id'] == "" ? 0: @$data['relation_id'];
$data['relation_sn'] = @$data['relation_sn'] == "" ? "": @$data['relation_sn'];
$data['content'] = empty(@$data['content']) ? "" : (is_array(@$data['content']) ? json_encode(@$data['content'],JSON_UNESCAPED_UNICODE) : @$data['content']);
$data['create_uid'] = @$data['create_uid'] == "" ? 0: @$data['create_uid'];
$data['create_name'] = @$data['create_name'] == "" ? "": @$data['create_name'];
$data['create_time'] = time();
return self::insert($data);
}
}
\ No newline at end of file
<?php
namespace App\Model;
use App\map\OperationLogMap;
use App\map\QuoteMap;
use Illuminate\Database\Eloquent\Model;
use Request;
use DB;
use App\Model\OplogModel;
use App\Model\UserModel;
use App\Http\Controllers\PermController;
//报价
class QuoteModel extends Model
{
protected $connection = 'rfq';
protected $table = 'quote';
protected $primaryKey = 'id';
public $timestamps = true;
const CREATED_AT = 'create_time';
const UPDATED_AT = 'update_time';
public function fromDateTime($value)
{
return strtotime(parent::fromDateTime($value));
}
//单个明细分页列表
public function ItemsList($input)
{
$list = $this
->where("inquiry_items_id",$input["inquiry_items_id"])
->orderBy('status','desc')
->paginate(@$input['limit'] ? $input["limit"] : 10, ['*'], 'p', @$input['p'] ? $input["p"] : 1)->toArray();
if (!$list) return [20001, '没有数据'];
foreach ($list['data'] as $k=>&$v){
$v['status'] = QuoteMap::$status[$v["status"]];
}
return [0, '成功', $list['data'], $list['total']];
}
//单个明细分组列表
public function ItemsListGroup($inquiry_items_id)
{
$list = $this
->where("inquiry_items_id",$inquiry_items_id)
->orderBy('status','desc')
->get()
->toArray();
if (!$list) return [20001, '没有数据'];
// 状态 -1:已撤销 1:已报价 2:已选中 3:已确认
$dataSure = []; //已确认
$dataCheck = []; //已选中
$dataDelete = []; //删除
$dataReady = []; //已报价
foreach ($list as $k=>&$v){
switch ($v["status"]){
case -1:
array_push($dataDelete,$v);
break;
case 1:
array_push($dataReady,$v);
break;
case 2:
array_push($dataCheck,$v);
break;
case 3:
array_push($dataSure,$v);
break;
}
$v['status'] = QuoteMap::$status[$v["status"]];
}
return ["dataSure"=>$dataSure,"dataCheck"=>$dataCheck,"dataDelete"=>$dataDelete,"dataReady"=>$dataReady];
}
// 获取报价列表
public function lists($request, $export='')
{
$page = $request->input('page', 1);
$limit = $request->input('limit', 10);
$type = $request->input('type', 1); // 1-我的报价,2-所有报价
$map['inquiry_sn'] = $request->input('inquiry_sn', ''); // 询价单号
$map['goods_name'] = $request->input('goods_name', ''); // 型号
$map['brand_name'] = $request->input('brand_name', ''); // 品牌
$map['quote_sn'] = $request->input('quote_sn', ''); // 报价单号
$map['status'] = $request->input('status', ''); // 报价状态
$map['create_uid'] = $request->input('create_uid', ''); // 报价制单人
$map['start_time'] = $request->input('start_time', '') ? strtotime($request->input('start_time')) : '';
$map['end_time'] = $request->input('end_time', '') ? strtotime($request->input('end_time')) + 86399 : '';
$field = ['q.id', 'q.inquiry_id', 'q.inquiry_sn', 'q.quote_sn', 'q.source', 'q.price_origin', 'q.price_rmb', 'q.price_other', 'q.currency', 'q.supplier_id', 'q.supplier_name', 'q.quote_number', 'q.status', 'q.create_uid', 'q.create_name', 'q.create_time', 'it.goods_name', 'it.brand_name', 'it.inquiry_number'];
$list = $this->from('quote as q')
->join('inquiry_items as it', 'q.inquiry_items_id', '=', 'it.id')
->where(function($query) use ($map) {
if ($map['inquiry_sn']) {
$query->where('q.inquiry_sn', '=', $map['inquiry_sn']);
}
if ($map['goods_name']) {
$query->where('it.goods_name', 'like', $map['goods_name'].'%');
}
if ($map['brand_name']) {
$query->where('it.brand_name', 'like', $map['brand_name'].'%');
}
if ($map['quote_sn']) {
$query->where('q.quote_sn', '=', $map['quote_sn']);
}
if ($map['status']) {
$query->where('q.status', '=', $map['status']);
}
// 创建时间
if(!empty($map['start_time']) && !empty($map['end_time'])) {
$query->whereBetween('q.create_time', [$map['start_time'], $map['end_time']]);
} else if(!empty($map['start_time'])) {
$query->where('q.create_time', '>=', $map['start_time']);
} else if(!empty($map['end_time'])) {
$query->where('q.create_time', '<=', $map['end_time']);
}
});
if ($type == 1) {
$list = $list->where('q.create_uid', $request->user->userId);
} else {
$perm = new PermController;
$role = $perm->getUserRole($request->user->userId, $request->user->name); // 用户角色
if ($role == 4) { // 采购查看下级
$sub_sale_ids = $perm->getSubSaleId($request->user->userId);
$list = $list->whereIn('q.create_uid', $sub_sale_ids);
}
}
if ($map['create_uid']) { // 制单人
$list = $list->where('q.create_uid', $map['create_uid']);
}
$list = $list->select($field)->orderBy('id', 'desc');
if ($export) {
$list = $list->get()->toArray();
if (empty($list)) {
echo '<script>alert("导出数据为空");history.go(-1);</script>';die;
}
return $list;
} else {
$list = $list->paginate($limit, ['*'], 'page', $page)->toArray();
$list['data'] = $this->handleData($list['data']);
return [0, '获取成功', $list['data'], $list['total']];
}
}
// 处理数据
public function handleData($data)
{
if (empty($data)) return $data;
foreach ($data as &$v) {
$currency_sign = $v['currency'] == 1 ? '¥' : '$';
$v['price'] = $v['currency'] == 1 ? $currency_sign.$v['price_rmb'] : $currency_sign.$v['price_origin'];
$v['status_val'] = array_get(Config('quote.quote_status'), $v['status'], '');
}
return $data;
}
// 撤销
public function cancel($request)
{
$id = $request->input('id', 0);
$cancel_reason = $request->input('cancel_reason', '');
if (!$id) return [-1, '参数缺失'];
$res = $this->where('id', $id)->update(['status' => -1, 'cancel_reason'=>$cancel_reason]);
$quote_info = $this->find($id);
$UserModel = new UserModel;
$data = [];
$data['types'] = 2;
$data['relation_id'] = $id;
$data['relation_sn'] = $quote_info['quote_sn'];
$data['content'] = '撤销报价,撤销原因:'.$cancel_reason.',报价单号:'.$quote_info['quote_sn'];
$data['create_uid'] = $request->user->userId;
$data['create_name'] = $UserModel->FinduserInfoName($request->user->userId);
OplogModel::log($data);
return [0, '撤销成功'];
}
// 新增
public function add($request)
{
$quote_info = $request->input('quote_info', '');
// 待转发到go接口
return [0, '新增报价成功'];
}
}
\ No newline at end of file
<?php
namespace App\Model;
use Illuminate\Support\Facades\Config;
use Request;
use Illuminate\Database\Eloquent\Model;
use DB;
use RedisDB;
//联营供应商模型
class SupplierChannelComModel extends Model
{
protected $connection='ass';
protected $table='supplier_channel';
public $timestamps = false;
/*
* 模糊查询联营供应商信息
*/
static function getComSupplier($supplier_name){
$brandInfo = DB::connection("ass")->select("select supplier_id,supplier_name,supplier_code from lie_supplier_channel where status = 2 and supplier_name like '%".$supplier_name."%' limit 100");
echo json_encode($brandInfo,JSON_UNESCAPED_UNICODE) ;
exit();
}
}
<?php
namespace App\Model;
use Illuminate\Support\Facades\Config;
use Request;
use Illuminate\Database\Eloquent\Model;
use DB;
use RedisDB;
//自营供应商模型
class SupplierChannelSelfModel extends Model
{
protected $connection='pur';
protected $table='supplier_channel';
public $timestamps = false;
/*
* 模糊查询自营供应商信息
*/
static function getSelfSupplier($supplier_name){
$brandInfo = DB::connection("pur")->select("select supplier_id,supplier_name,supplier_code from lie_supplier_channel where status = 2 and supplier_name like '%".$supplier_name."%' limit 100");
echo json_encode($brandInfo,JSON_UNESCAPED_UNICODE) ;
exit();
}
}
<?php
namespace App\Model;
use Illuminate\Database\Eloquent\Model;
use App\Model\OrganizationModel;
class UserModel extends Model
{
protected $table='user_info';
public $timestamps = false;
public function DepartmentUserInfo($Department=''){
if(!$Department) return false;
$OrganizationModel=new OrganizationModel();
$UserID=$OrganizationModel->ObtainDepartment($Department);
$result=$this->whereIn('userId',$UserID)->select('userId','name','email')->orderBy('status','asc')->get();
if(!$result) return false;
return $result->toArray();
}
public function FinduserInfoName($UserID=''){
if(empty($UserID)) return "";
$result=$this->where('userId','=',$UserID)->select('userId','name','email')->first();
if(!$result) return "";
$result=$result->toArray();
empty($result['name']) && $result['name']=$result['email'];
return $result['name'];
}
public function FindUserInfoNE($UserID=''){
if(empty($UserID)) return false;
$result=$this->where('userId','=',$UserID)->select('userId','name','email')->first();
if(!$result) return false;
$result=$result->toArray();
empty($result['name']) && $result['name']=$result['email'];
return $result;
}
}
<?php
namespace App\Providers;
use Illuminate\Support\ServiceProvider;
class AppServiceProvider extends ServiceProvider
{
/**
* Bootstrap any application services.
*
* @return void
*/
public function boot()
{
//
}
/**
* Register any application services.
*
* @return void
*/
public function register()
{
//
}
}
<?php
namespace App\Providers;
use Illuminate\Contracts\Auth\Access\Gate as GateContract;
use Illuminate\Foundation\Support\Providers\AuthServiceProvider as ServiceProvider;
class AuthServiceProvider extends ServiceProvider
{
/**
* The policy mappings for the application.
*
* @var array
*/
protected $policies = [
'App\Model' => 'App\Policies\ModelPolicy',
];
/**
* Register any application authentication / authorization services.
*
* @param \Illuminate\Contracts\Auth\Access\Gate $gate
* @return void
*/
public function boot(GateContract $gate)
{
$this->registerPolicies($gate);
//
}
}
<?php
namespace App\Providers;
use Illuminate\Contracts\Events\Dispatcher as DispatcherContract;
use Illuminate\Foundation\Support\Providers\EventServiceProvider as ServiceProvider;
class EventServiceProvider extends ServiceProvider
{
/**
* The event listener mappings for the application.
*
* @var array
*/
protected $listen = [
'App\Events\SomeEvent' => [
'App\Listeners\EventListener',
],
];
/**
* Register any other events for your application.
*
* @param \Illuminate\Contracts\Events\Dispatcher $events
* @return void
*/
public function boot(DispatcherContract $events)
{
parent::boot($events);
//
}
}
<?php
namespace App\Providers;
use Illuminate\Routing\Router;
use Illuminate\Foundation\Support\Providers\RouteServiceProvider as ServiceProvider;
class RouteServiceProvider extends ServiceProvider
{
/**
* This namespace is applied to your controller routes.
*
* In addition, it is set as the URL generator's root namespace.
*
* @var string
*/
protected $namespace = 'App\Http\Controllers';
/**
* Define your route model bindings, pattern filters, etc.
*
* @param \Illuminate\Routing\Router $router
* @return void
*/
public function boot(Router $router)
{
//
parent::boot($router);
}
/**
* Define the routes for the application.
*
* @param \Illuminate\Routing\Router $router
* @return void
*/
public function map(Router $router)
{
$this->mapWebRoutes($router);
//
}
/**
* Define the "web" routes for the application.
*
* These routes all receive session state, CSRF protection, etc.
*
* @param \Illuminate\Routing\Router $router
* @return void
*/
protected function mapWebRoutes(Router $router)
{
$router->group([
'namespace' => $this->namespace
], function ($router) {
require app_path('Http/routes.php');
});
}
}
<?php
namespace App;
use Illuminate\Foundation\Auth\User as Authenticatable;
class User extends Authenticatable
{
/**
* The attributes that are mass assignable.
*
* @var array
*/
protected $fillable = [
'name', 'email', 'password',
];
/**
* The attributes that should be hidden for arrays.
*
* @var array
*/
protected $hidden = [
'password', 'remember_token',
];
}
<?php
namespace App\map;
//询价枚举
class InquiryMap{
//状态 -1:已关闭 1:待报价 2:已报价 3:已选中 4:已固定 5:已确认
const status_close = -1;
const status_ready = 1;
const status_replay = 2;
const status_check = 3;
const status_fix = 4;
const status_sure = 5;
static $status =[
self::status_close => "已关闭",
self::status_ready => "待报价",
self::status_replay => "已报价",
self::status_check => "已选中",
self::status_fix => "已固定",
self::status_sure => "已确认",
];
}
<?php
namespace App\map;
class OpLogMap{
}
<?php
namespace App\map;
//报价枚举
class QuoteMap{
//状态 -1:已关闭 1:待报价 2:已报价 3:已选中 4:已固定 5:已确认
const status_close = -1;
const status_ready = 1;
const status_replay = 2;
const status_check = 3;
const status_fix = 4;
const status_sure = 5;
static $status =[
self::status_close => "已关闭",
self::status_ready => "待报价",
self::status_replay => "已报价",
self::status_check => "已选中",
self::status_fix => "已固定",
self::status_sure => "已确认",
];
//可用报价状态
static $status_used = [self::status_ready,self::status_replay,self::status_check,self::status_fix,self::status_sure];
}
#!/usr/bin/env php
<?php
/*
|--------------------------------------------------------------------------
| Register The Auto Loader
|--------------------------------------------------------------------------
|
| Composer provides a convenient, automatically generated class loader
| for our application. We just need to utilize it! We'll require it
| into the script here so that we do not have to worry about the
| loading of any our classes "manually". Feels great to relax.
|
*/
require __DIR__.'/bootstrap/autoload.php';
$app = require_once __DIR__.'/bootstrap/app.php';
/*
|--------------------------------------------------------------------------
| Run The Artisan Application
|--------------------------------------------------------------------------
|
| When we run the console application, the current CLI command will be
| executed in this console and the response sent back to a terminal
| or another output device for the developers. Here goes nothing!
|
*/
$kernel = $app->make(Illuminate\Contracts\Console\Kernel::class);
$status = $kernel->handle(
$input = new Symfony\Component\Console\Input\ArgvInput,
new Symfony\Component\Console\Output\ConsoleOutput
);
/*
|--------------------------------------------------------------------------
| Shutdown The Application
|--------------------------------------------------------------------------
|
| Once Artisan has finished running. We will fire off the shutdown events
| so that any final work may be done by the application before we shut
| down the process. This is the last thing to happen to the request.
|
*/
$kernel->terminate($input, $status);
exit($status);
<?php
/*
|--------------------------------------------------------------------------
| Create The Application
|--------------------------------------------------------------------------
|
| The first thing we will do is create a new Laravel application instance
| which serves as the "glue" for all the components of Laravel, and is
| the IoC container for the system binding all of the various parts.
|
*/
$app = new Illuminate\Foundation\Application(
realpath(__DIR__.'/../')
);
/*
|--------------------------------------------------------------------------
| Bind Important Interfaces
|--------------------------------------------------------------------------
|
| Next, we need to bind some important interfaces into the container so
| we will be able to resolve them when needed. The kernels serve the
| incoming requests to this application from both the web and CLI.
|
*/
$app->singleton(
Illuminate\Contracts\Http\Kernel::class,
App\Http\Kernel::class
);
$app->singleton(
Illuminate\Contracts\Console\Kernel::class,
App\Console\Kernel::class
);
$app->singleton(
Illuminate\Contracts\Debug\ExceptionHandler::class,
App\Exceptions\Handler::class
);
/*
|--------------------------------------------------------------------------
| Return The Application
|--------------------------------------------------------------------------
|
| This script returns the application instance. The instance is given to
| the calling script so we can separate the building of the instances
| from the actual running of the application and sending responses.
|
*/
return $app;
<?php
define('LARAVEL_START', microtime(true));
/*
|--------------------------------------------------------------------------
| Register The Composer Auto Loader
|--------------------------------------------------------------------------
|
| Composer provides a convenient, automatically generated class loader
| for our application. We just need to utilize it! We'll require it
| into the script here so that we do not have to worry about the
| loading of any our classes "manually". Feels great to relax.
|
*/
require __DIR__.'/../vendor/autoload.php';
/*
|--------------------------------------------------------------------------
| Include The Compiled Class File
|--------------------------------------------------------------------------
|
| To dramatically increase your application's performance, you may use a
| compiled class file which contains all of the classes commonly used
| by a request. The Artisan "optimize" is used to create this file.
|
*/
$compiledPath = __DIR__.'/cache/compiled.php';
if (file_exists($compiledPath)) {
require $compiledPath;
}
require __DIR__.'/../app/Http/LogReport.php';
require __DIR__.'/../app/Http/function.php';
require __DIR__.'/../config/define.php';
\ No newline at end of file
{
"name": "laravel/laravel",
"description": "The Laravel Framework.",
"keywords": ["framework", "laravel"],
"license": "MIT",
"type": "project",
"require": {
"php": ">=5.5.9",
"laravel/framework": "5.2.*",
"guzzlehttp/guzzle": "^6.0",
"predis/predis": "^1.1",
"maatwebsite/excel": "~2.0.0",
"vladimir-yuldashev/laravel-queue-rabbitmq": "5.2",
"artisaninweb/laravel-soap": "0.2.*",
"hprose/hprose": "^2.0",
"barryvdh/laravel-dompdf": "^0.8.2"
},
"require-dev": {
"fzaninotto/faker": "~1.4",
"mockery/mockery": "0.9.*",
"phpunit/phpunit": "~4.0",
"symfony/css-selector": "2.8.*|3.0.*",
"symfony/dom-crawler": "2.8.*|3.0.*"
},
"autoload": {
"classmap": [
"database"
],
"psr-4": {
"App\\": "app/"
}
},
"autoload-dev": {
"classmap": [
"tests/TestCase.php"
]
},
"scripts": {
"post-root-package-install": [
"php -r \"copy('.env.example', '.env');\""
],
"post-create-project-cmd": [
"php artisan key:generate"
],
"post-install-cmd": [
"Illuminate\\Foundation\\ComposerScripts::postInstall",
"php artisan optimize"
],
"post-update-cmd": [
"Illuminate\\Foundation\\ComposerScripts::postUpdate",
"php artisan optimize"
]
},
"config": {
"preferred-install": "dist"
}
}
This diff could not be displayed because it is too large.
<?php
return [
'PuchaseItemsTitle'=>[
0=>'*产品型号',
1=>'*制造商(品牌)',
2=>'*数量',
3=>'批次要求',
4=>'*包装/方式',
5=>'*采购单价',
6=>'*标准包装量(MPQ)',
7=>'封装/规格',
8=>'*交货日期'
]
];
<?php
return [
/*
|--------------------------------------------------------------------------
| Application Environment
|--------------------------------------------------------------------------
|
| This value determines the "environment" your application is currently
| running in. This may determine how you prefer to configure various
| services your application utilizes. Set this in your ".env" file.
|
*/
'env' => env('APP_ENV', 'production'),
/*
|--------------------------------------------------------------------------
| Application Debug Mode
|--------------------------------------------------------------------------
|
| When your application is in debug mode, detailed error messages with
| stack traces will be shown on every error that occurs within your
| application. If disabled, a simple generic error page is shown.
|
*/
'debug' => env('APP_DEBUG', false),
/*
|--------------------------------------------------------------------------
| Application URL
|--------------------------------------------------------------------------
|
| This URL is used by the console to properly generate URLs when using
| the Artisan command line tool. You should set this to the root of
| your application so that it is used when running Artisan tasks.
|
*/
'url' => env('APP_URL', 'http://localhost'),
/*
|--------------------------------------------------------------------------
| Application Timezone
|--------------------------------------------------------------------------
|
| Here you may specify the default timezone for your application, which
| will be used by the PHP date and date-time functions. We have gone
| ahead and set this to a sensible default for you out of the box.
|
*/
'timezone' => 'Asia/Shanghai',
/*
|--------------------------------------------------------------------------
| Application Locale Configuration
|--------------------------------------------------------------------------
|
| The application locale determines the default locale that will be used
| by the translation service provider. You are free to set this value
| to any of the locales which will be supported by the application.
|
*/
'locale' => 'en',
/*
|--------------------------------------------------------------------------
| Application Fallback Locale
|--------------------------------------------------------------------------
|
| The fallback locale determines the locale to use when the current one
| is not available. You may change the value to correspond to any of
| the language folders that are provided through your application.
|
*/
'fallback_locale' => 'en',
/*
|--------------------------------------------------------------------------
| Encryption Key
|--------------------------------------------------------------------------
|
| This key is used by the Illuminate encrypter service and should be set
| to a random, 32 character string, otherwise these encrypted strings
| will not be safe. Please do this before deploying an application!
|
*/
'key' => env('APP_KEY'),
'cipher' => 'AES-256-CBC',
/*
|--------------------------------------------------------------------------
| Logging Configuration
|--------------------------------------------------------------------------
|
| Here you may configure the log settings for your application. Out of
| the box, Laravel uses the Monolog PHP logging library. This gives
| you a variety of powerful log handlers / formatters to utilize.
|
| Available Settings: "single", "daily", "syslog", "errorlog"
|
*/
'log' => env('APP_LOG', 'daily'),
/*
|--------------------------------------------------------------------------
| Autoloaded Service Providers
|--------------------------------------------------------------------------
|
| The service providers listed here will be automatically loaded on the
| request to your application. Feel free to add your own services to
| this array to grant expanded functionality to your applications.
|
*/
'providers' => [
/*
* Laravel Framework Service Providers...
*/
Illuminate\Auth\AuthServiceProvider::class,
Illuminate\Broadcasting\BroadcastServiceProvider::class,
Illuminate\Bus\BusServiceProvider::class,
Illuminate\Cache\CacheServiceProvider::class,
Illuminate\Foundation\Providers\ConsoleSupportServiceProvider::class,
Illuminate\Cookie\CookieServiceProvider::class,
Illuminate\Database\DatabaseServiceProvider::class,
Illuminate\Encryption\EncryptionServiceProvider::class,
Illuminate\Filesystem\FilesystemServiceProvider::class,
Illuminate\Foundation\Providers\FoundationServiceProvider::class,
Illuminate\Hashing\HashServiceProvider::class,
Illuminate\Mail\MailServiceProvider::class,
Illuminate\Pagination\PaginationServiceProvider::class,
Illuminate\Pipeline\PipelineServiceProvider::class,
Illuminate\Queue\QueueServiceProvider::class,
Illuminate\Redis\RedisServiceProvider::class,
Illuminate\Auth\Passwords\PasswordResetServiceProvider::class,
Illuminate\Session\SessionServiceProvider::class,
Illuminate\Translation\TranslationServiceProvider::class,
Illuminate\Validation\ValidationServiceProvider::class,
Illuminate\View\ViewServiceProvider::class,
Maatwebsite\Excel\ExcelServiceProvider::class,
/*
* Application Service Providers...
*/
App\Providers\AppServiceProvider::class,
App\Providers\AuthServiceProvider::class,
App\Providers\EventServiceProvider::class,
App\Providers\RouteServiceProvider::class,
VladimirYuldashev\LaravelQueueRabbitMQ\LaravelQueueRabbitMQServiceProvider::class,
Artisaninweb\SoapWrapper\ServiceProvider::class,
Barryvdh\DomPDF\ServiceProvider::class,
],
/*
|--------------------------------------------------------------------------
| Class Aliases
|--------------------------------------------------------------------------
|
| This array of class aliases will be registered when this application
| is started. However, feel free to register as many as you wish as
| the aliases are "lazy" loaded so they don't hinder performance.
|
*/
'aliases' => [
'App' => Illuminate\Support\Facades\App::class,
'Artisan' => Illuminate\Support\Facades\Artisan::class,
'Auth' => Illuminate\Support\Facades\Auth::class,
'Blade' => Illuminate\Support\Facades\Blade::class,
'Cache' => Illuminate\Support\Facades\Cache::class,
'Config' => Illuminate\Support\Facades\Config::class,
'Cookie' => Illuminate\Support\Facades\Cookie::class,
'Crypt' => Illuminate\Support\Facades\Crypt::class,
'DB' => Illuminate\Support\Facades\DB::class,
'Eloquent' => Illuminate\Database\Eloquent\Model::class,
'Event' => Illuminate\Support\Facades\Event::class,
'File' => Illuminate\Support\Facades\File::class,
'Gate' => Illuminate\Support\Facades\Gate::class,
'Hash' => Illuminate\Support\Facades\Hash::class,
'Lang' => Illuminate\Support\Facades\Lang::class,
'Log' => Illuminate\Support\Facades\Log::class,
'Mail' => Illuminate\Support\Facades\Mail::class,
'Password' => Illuminate\Support\Facades\Password::class,
'Queue' => Illuminate\Support\Facades\Queue::class,
'Redirect' => Illuminate\Support\Facades\Redirect::class,
'RedisDB' => Illuminate\Support\Facades\Redis::class,
'Request' => Illuminate\Support\Facades\Request::class,
'Response' => Illuminate\Support\Facades\Response::class,
'Route' => Illuminate\Support\Facades\Route::class,
'Schema' => Illuminate\Support\Facades\Schema::class,
'Session' => Illuminate\Support\Facades\Session::class,
'Storage' => Illuminate\Support\Facades\Storage::class,
'URL' => Illuminate\Support\Facades\URL::class,
'Validator' => Illuminate\Support\Facades\Validator::class,
'View' => Illuminate\Support\Facades\View::class,
'Excel' => Maatwebsite\Excel\Facades\Excel::class,
'SoapWrapper' => Artisaninweb\SoapWrapper\Facades\SoapWrapper::class,
'PDF' => Barryvdh\DomPDF\Facade::class
],
];
<?php
return [
/*
|--------------------------------------------------------------------------
| Authentication Defaults
|--------------------------------------------------------------------------
|
| This option controls the default authentication "guard" and password
| reset options for your application. You may change these defaults
| as required, but they're a perfect start for most applications.
|
*/
'defaults' => [
'guard' => 'web',
'passwords' => 'users',
],
/*
|--------------------------------------------------------------------------
| Authentication Guards
|--------------------------------------------------------------------------
|
| Next, you may define every authentication guard for your application.
| Of course, a great default configuration has been defined for you
| here which uses session storage and the Eloquent user provider.
|
| All authentication drivers have a user provider. This defines how the
| users are actually retrieved out of your database or other storage
| mechanisms used by this application to persist your user's data.
|
| Supported: "session", "token"
|
*/
'guards' => [
'web' => [
'driver' => 'session',
'provider' => 'users',
],
'api' => [
'driver' => 'token',
'provider' => 'users',
],
],
/*
|--------------------------------------------------------------------------
| User Providers
|--------------------------------------------------------------------------
|
| All authentication drivers have a user provider. This defines how the
| users are actually retrieved out of your database or other storage
| mechanisms used by this application to persist your user's data.
|
| If you have multiple user tables or models you may configure multiple
| sources which represent each model / table. These sources may then
| be assigned to any extra authentication guards you have defined.
|
| Supported: "database", "eloquent"
|
*/
'providers' => [
'users' => [
'driver' => 'eloquent',
'model' => App\User::class,
],
// 'users' => [
// 'driver' => 'database',
// 'table' => 'users',
// ],
],
/*
|--------------------------------------------------------------------------
| Resetting Passwords
|--------------------------------------------------------------------------
|
| Here you may set the options for resetting passwords including the view
| that is your password reset e-mail. You may also set the name of the
| table that maintains all of the reset tokens for your application.
|
| You may specify multiple password reset configurations if you have more
| than one user table or model in the application and you want to have
| separate password reset settings based on the specific user types.
|
| The expire time is the number of minutes that the reset token should be
| considered valid. This security feature keeps tokens short-lived so
| they have less time to be guessed. You may change this as needed.
|
*/
'passwords' => [
'users' => [
'provider' => 'users',
'email' => 'auth.emails.password',
'table' => 'password_resets',
'expire' => 60,
],
],
];
<?php
return [
/*
|--------------------------------------------------------------------------
| Default Broadcaster
|--------------------------------------------------------------------------
|
| This option controls the default broadcaster that will be used by the
| framework when an event needs to be broadcast. You may set this to
| any of the connections defined in the "connections" array below.
|
*/
'default' => env('BROADCAST_DRIVER', 'pusher'),
/*
|--------------------------------------------------------------------------
| Broadcast Connections
|--------------------------------------------------------------------------
|
| Here you may define all of the broadcast connections that will be used
| to broadcast events to other systems or over websockets. Samples of
| each available type of connection are provided inside this array.
|
*/
'connections' => [
'pusher' => [
'driver' => 'pusher',
'key' => env('PUSHER_KEY'),
'secret' => env('PUSHER_SECRET'),
'app_id' => env('PUSHER_APP_ID'),
'options' => [
//
],
],
'redis' => [
'driver' => 'redis',
'connection' => 'default',
],
'log' => [
'driver' => 'log',
],
],
];
<?php
return [
/*
|--------------------------------------------------------------------------
| Default Cache Store
|--------------------------------------------------------------------------
|
| This option controls the default cache connection that gets used while
| using this caching library. This connection is used when another is
| not explicitly specified when executing a given caching function.
|
*/
'default' => env('CACHE_DRIVER', 'file'),
/*
|--------------------------------------------------------------------------
| Cache Stores
|--------------------------------------------------------------------------
|
| Here you may define all of the cache "stores" for your application as
| well as their drivers. You may even define multiple stores for the
| same cache driver to group types of items stored in your caches.
|
*/
'stores' => [
'apc' => [
'driver' => 'apc',
],
'array' => [
'driver' => 'array',
],
'database' => [
'driver' => 'database',
'table' => 'cache',
'connection' => null,
],
'file' => [
'driver' => 'file',
'path' => storage_path('framework/cache'),
],
'memcached' => [
'driver' => 'memcached',
'servers' => [
[
'host' => env('MEMCACHED_HOST', '127.0.0.1'),
'port' => env('MEMCACHED_PORT', 11211),
'weight' => 100,
],
],
],
'redis' => [
'driver' => 'redis',
'connection' => 'default',
],
],
/*
|--------------------------------------------------------------------------
| Cache Key Prefix
|--------------------------------------------------------------------------
|
| When utilizing a RAM based store such as APC or Memcached, there might
| be other applications utilizing the same cache. So, we'll specify a
| value to get prefixed to all our keys so we can avoid collisions.
|
*/
'prefix' => 'laravel',
];
<?php
return [
/*
|--------------------------------------------------------------------------
| Additional Compiled Classes
|--------------------------------------------------------------------------
|
| Here you may specify additional classes to include in the compiled file
| generated by the `artisan optimize` command. These should be classes
| that are included on basically every request into the application.
|
*/
'files' => [
//
],
/*
|--------------------------------------------------------------------------
| Compiled File Providers
|--------------------------------------------------------------------------
|
| Here you may list service providers which define a "compiles" function
| that returns additional files that should be compiled, providing an
| easy way to get common files from any packages you are utilizing.
|
*/
'providers' => [
//
],
];
<?php
return [
/*
|--------------------------------------------------------------------------
| PDO Fetch Style
|--------------------------------------------------------------------------
|
| By default, database results will be returned as instances of the PHP
| stdClass object; however, you may desire to retrieve records in an
| array format for simplicity. Here you can tweak the fetch style.
|
*/
'fetch' => PDO::FETCH_ASSOC,
/*
|--------------------------------------------------------------------------
| Default Database Connection Name
|--------------------------------------------------------------------------
|
| Here you may specify which of the database connections below you wish
| to use as your default connection for all database work. Of course
| you may use many connections at once using the Database library.
|
*/
'default' => env('DB_CONNECTION', 'mysql'),
/*
|--------------------------------------------------------------------------
| Database Connections
|--------------------------------------------------------------------------
|
| Here are each of the database connections setup for your application.
| Of course, examples of configuring each database platform that is
| supported by Laravel is shown below to make development simple.
|
|
| All database work in Laravel is done through the PHP PDO facilities
| so make sure you have the driver for your particular database of
| choice installed on your machine before you begin development.
|
*/
'connections' => [
'sqlite' => [
'driver' => 'sqlite',
'database' => env('DB_DATABASE', database_path('database.sqlite')),
'prefix' => '',
],
'mysql' => [
'driver' => 'mysql',
'host' => env('DB_HOST', 'localhost'),
'port' => env('DB_PORT', '3306'),
'database' => env('DB_DATABASE', 'forge'),
'username' => env('DB_USERNAME', 'forge'),
'password' => env('DB_PASSWORD', ''),
'charset' => 'utf8',
'collation' => 'utf8_general_ci',
'prefix' => '',
'strict' => false,
'engine' => null,
],
'rfq' => [ //询报价数据库
'driver' => 'mysql',
'host' => env('DB_HOST_RFQ', ''),
'database' => env('DB_DATABASE_RFQ', ''),
'username' => env('DB_USERNAME_RFQ', ''),
'password' => env('DB_PASSWORD_RFQ', ''),
'port' => env('DB_PORT_RFQ', 3306),
'charset' => 'utf8',
'collation' => 'utf8_unicode_ci',
'prefix' => 'lie_',
'strict' => false,
],
'spu' => [ //spu数据库
'driver' => 'mysql',
'host' => env('DB_HOST_SPU', ''),
'database' => env('DB_DATABASE_SPU', ''),
'username' => env('DB_USERNAME_SPU', ''),
'password' => env('DB_PASSWORD_SPU', ''),
'port' => env('DB_PORT_SPU', 3306),
'charset' => 'utf8',
'collation' => 'utf8_unicode_ci',
'prefix' => 'lie_',
'strict' => false,
],
'ass' => [ //ass数据库
'driver' => 'mysql',
'host' => env('DB_POOL_HOST', ''),
'database' => env('DB_POOL_DATABASE', ''),
'username' => env('DB_POOL_USERNAME', ''),
'password' => env('DB_POOL_PASSWORD', ''),
'port' => env('DB_POOL_PORT', 3306),
'charset' => 'utf8',
'collation' => 'utf8_unicode_ci',
'prefix' => 'lie_',
'strict' => false,
],
'rabbitmq' => [
'driver' => 'rabbitmq',
'host' => env('RABBITMQ_HOST', '127.0.0.1'),
'port' => env('RABBITMQ_PORT', 5672),
'vhost' => env('RABBITMQ_VHOST', '/'),
'login' => env('RABBITMQ_LOGIN', 'guest'),
'password' => env('RABBITMQ_PASSWORD', 'guest'),
'queue' => env('RABBITMQ_QUEUE'), // name of the default queue,
],
],
/*
|--------------------------------------------------------------------------
| Migration Repository Table
|--------------------------------------------------------------------------
|
| This table keeps track of all the migrations that have already run for
| your application. Using this information, we can determine which of
| the migrations on disk haven't actually been run in the database.
|
*/
'migrations' => 'migrations',
/*
|--------------------------------------------------------------------------
| Redis Databases
|--------------------------------------------------------------------------
|
| Redis is an open source, fast, and advanced key-value store that also
| provides a richer set of commands than a typical key-value systems
| such as APC or Memcached. Laravel makes it easy to dig right in.
|
*/
'redis' => [
'cluster' => false,
'default' => [
'host' => env('REDIS_HOST', 'localhost'),
'password' => env('REDIS_PASSWORD', null),
'port' => env('REDIS_PORT', 6379),
'database' => 0,
'prefix' =>env('PREFIX','Activity_')
],
],
];
<?php
/*
* 自定义全局变量
*/
#################接口常量#########################
define('STATUS_SUCCESS',200); //请求成功,正常返回
define('STATUS_SUCCESS_2',201); //缺少特定的参数
define('STATUS_NEED_LOGIN',100); //需要重新登录
define('STATUS_ILLEGAL_PARAM',300); //操作被拒绝,可能是参数不合法等
define('STATUS_ERROR',400); //列表的数据已被穷尽,没有更多数据
define('STATUS_UNKNOWN',500); //服务器未知错误
\ No newline at end of file
<?php
return [
/*
|--------------------------------------------------------------------------
| Default Filesystem Disk
|--------------------------------------------------------------------------
|
| Here you may specify the default filesystem disk that should be used
| by the framework. A "local" driver, as well as a variety of cloud
| based drivers are available for your choosing. Just store away!
|
| Supported: "local", "ftp", "s3", "rackspace"
|
*/
'default' => 'local',
/*
|--------------------------------------------------------------------------
| Default Cloud Filesystem Disk
|--------------------------------------------------------------------------
|
| Many applications store files both locally and in the cloud. For this
| reason, you may specify a default "cloud" driver here. This driver
| will be bound as the Cloud disk implementation in the container.
|
*/
'cloud' => 's3',
/*
|--------------------------------------------------------------------------
| Filesystem Disks
|--------------------------------------------------------------------------
|
| Here you may configure as many filesystem "disks" as you wish, and you
| may even configure multiple disks of the same driver. Defaults have
| been setup for each driver as an example of the required options.
|
*/
'disks' => [
'local' => [
'driver' => 'local',
'root' => storage_path('app'),
],
'public' => [
'driver' => 'local',
'root' => storage_path('app/public'),
'visibility' => 'public',
],
's3' => [
'driver' => 's3',
'key' => 'your-key',
'secret' => 'your-secret',
'region' => 'your-region',
'bucket' => 'your-bucket',
],
// 新建一个本地端uploads空间(目录) 用于存储上传的文件
'uploads' => [
'driver' => 'local',
// 文件将上传到storage/app/uploads目录
'root' => storage_path('app/uploads'),
],
],
];
<?php
return [
'supplier_login_slat'=>'N<*^&9781UO0&*<>~,.laGTVC',
//创建供应商账号重置密码
'supplier_reset_password'=>'ichunt123',
//网页不用验证授权方法
'NotAuth'=>array(
'ChoiceSupplierList','HoldItems','ObtainSkuList'
),
//采购单/来料通知单/入库单 列表只能查看自己的数据的用户角色
'NeedListAuth'=>array(
'采购'
),
//采购网址
'pur_domain'=>[
'local' =>'http://pur.liexin.com',
'sz'=>'http://szpur.ichunt.net',
'release'=>'http://pur.ichunt.net'
],
//api不用授权方法
'ApiNotAuth'=>array(
'ApiSpecialList','ApiSpeciaModulelList','ApiModuleConfigList','ApiLogList', 'ApiInitSupplier','ApiChoiceSupplier'
),
'MenuSign'=>'/web/',//菜单去除掉标记,生成菜单时用
'UploadKey'=>'fh6y5t4rr351d2c3bryi',//上传加密
'MD5KEY'=>'LX@ichunt.com82560956-0755',//接口加密密钥
'WMSKEY'=>'j9q##VRhaXBEtznIEeDiR@1Hvy0sW3wp',//WMS加密密钥
];
<?php
return [
'inquiry_item_status' => [ // 询价明细状态
-1 => '已关闭',
1 => '待报价',
2 => '已报价',
3 => '已选中',
4 => '已固定',
5 => '已确认',
],
];
<?php
return [
/*
|--------------------------------------------------------------------------
| Mail Driver
|--------------------------------------------------------------------------
|
| Laravel supports both SMTP and PHP's "mail" function as drivers for the
| sending of e-mail. You may specify which one you're using throughout
| your application here. By default, Laravel is setup for SMTP mail.
|
| Supported: "smtp", "mail", "sendmail", "mailgun", "mandrill",
| "ses", "sparkpost", "log"
|
*/
'driver' => env('MAIL_DRIVER', 'smtp'),
/*
|--------------------------------------------------------------------------
| SMTP Host Address
|--------------------------------------------------------------------------
|
| Here you may provide the host address of the SMTP server used by your
| applications. A default option is provided that is compatible with
| the Mailgun mail service which will provide reliable deliveries.
|
*/
'host' => env('MAIL_HOST', 'smtp.mailgun.org'),
/*
|--------------------------------------------------------------------------
| SMTP Host Port
|--------------------------------------------------------------------------
|
| This is the SMTP port used by your application to deliver e-mails to
| users of the application. Like the host we have set this value to
| stay compatible with the Mailgun e-mail application by default.
|
*/
'port' => env('MAIL_PORT', 587),
/*
|--------------------------------------------------------------------------
| Global "From" Address
|--------------------------------------------------------------------------
|
| You may wish for all e-mails sent by your application to be sent from
| the same address. Here, you may specify a name and address that is
| used globally for all e-mails that are sent by your application.
|
*/
'from' => ['address' => null, 'name' => null],
/*
|--------------------------------------------------------------------------
| E-Mail Encryption Protocol
|--------------------------------------------------------------------------
|
| Here you may specify the encryption protocol that should be used when
| the application send e-mail messages. A sensible default using the
| transport layer security protocol should provide great security.
|
*/
'encryption' => env('MAIL_ENCRYPTION', 'tls'),
/*
|--------------------------------------------------------------------------
| SMTP Server Username
|--------------------------------------------------------------------------
|
| If your SMTP server requires a username for authentication, you should
| set it here. This will get used to authenticate with your server on
| connection. You may also set the "password" value below this one.
|
*/
'username' => env('MAIL_USERNAME'),
/*
|--------------------------------------------------------------------------
| SMTP Server Password
|--------------------------------------------------------------------------
|
| Here you may set the password required by your SMTP server to send out
| messages from your application. This will be given to the server on
| connection so that the application will be able to send messages.
|
*/
'password' => env('MAIL_PASSWORD'),
/*
|--------------------------------------------------------------------------
| Sendmail System Path
|--------------------------------------------------------------------------
|
| When using the "sendmail" driver to send e-mails, we will need to know
| the path to where Sendmail lives on this server. A default path has
| been provided here, which will work well on most of your systems.
|
*/
'sendmail' => '/usr/sbin/sendmail -bs',
];
<?php
return [
// 菜单key
'perm_menus_data' => 'frq_menus_href_data',
'perm_menus_data_expire' => 7200,
// 用户角色
'roles' => [
'管理员' => 1,
'销售查看下级' => 2,
'销售查看自己' => 3,
'采购查看下级' => 4,
'采购查看自己' => 5,
'运营' => 6,
],
];
<?php
return [
/*
|--------------------------------------------------------------------------
| Default Queue Driver
|--------------------------------------------------------------------------
|
| The Laravel queue API supports a variety of back-ends via an unified
| API, giving you convenient access to each back-end using the same
| syntax for each one. Here you may set the default queue driver.
|
| Supported: "null", "sync", "database", "beanstalkd", "sqs", "redis"
|
*/
'default' => env('QUEUE_DRIVER', 'redis'),
/*
|--------------------------------------------------------------------------
| Queue Connections
|--------------------------------------------------------------------------
|
| Here you may configure the connection information for each server that
| is used by your application. A default configuration has been added
| for each back-end shipped with Laravel. You are free to add more.
|
*/
'connections' => [
'sync' => [
'driver' => 'sync',
],
'database' => [
'driver' => 'database',
'table' => 'jobs',
'queue' => 'default',
'expire' => 60,
],
'beanstalkd' => [
'driver' => 'beanstalkd',
'host' => 'localhost',
'queue' => 'default',
'ttr' => 60,
],
'sqs' => [
'driver' => 'sqs',
'key' => 'your-public-key',
'secret' => 'your-secret-key',
'prefix' => 'https://sqs.us-east-1.amazonaws.com/your-account-id',
'queue' => 'your-queue-name',
'region' => 'us-east-1',
],
'redis' => [
'driver' => 'redis',
'connection' => 'default',
'queue' => 'yunxin_admin',
'expire' => 6000,
'retry_after'=> 6000
],
],
/*
|--------------------------------------------------------------------------
| Failed Queue Jobs
|--------------------------------------------------------------------------
|
| These options configure the behavior of failed queue job logging so you
| can control which database and table are used to store the jobs that
| have failed. You may change them to any database / table you wish.
|
'failed' => [
'database' => env('DB_CONNECTION', 'mysql'),
'table' => 'failed_jobs',
],
*/
];
<?php
return [
'quote_status' => [ // 报价状态
-1 => '已撤销',
1 => '已报价',
2 => '已选中',
3 => '已确认',
],
'quote_tax_rate' => '0.13', // 报价税率
];
<?php
return [
/*
|--------------------------------------------------------------------------
| Third Party Services
|--------------------------------------------------------------------------
|
| This file is for storing the credentials for third party services such
| as Stripe, Mailgun, Mandrill, and others. This file provides a sane
| default location for this type of information, allowing packages
| to have a conventional place to find your various credentials.
|
*/
'mailgun' => [
'domain' => env('MAILGUN_DOMAIN'),
'secret' => env('MAILGUN_SECRET'),
],
'ses' => [
'key' => env('SES_KEY'),
'secret' => env('SES_SECRET'),
'region' => 'us-east-1',
],
'sparkpost' => [
'secret' => env('SPARKPOST_SECRET'),
],
'stripe' => [
'model' => App\User::class,
'key' => env('STRIPE_KEY'),
'secret' => env('STRIPE_SECRET'),
],
];
<?php
return [
/*
|--------------------------------------------------------------------------
| Default Session Driver
|--------------------------------------------------------------------------
|
| This option controls the default session "driver" that will be used on
| requests. By default, we will use the lightweight native driver but
| you may specify any of the other wonderful drivers provided here.
|
| Supported: "file", "cookie", "database", "apc",
| "memcached", "redis", "array"
|
*/
'driver' => env('SESSION_DRIVER', 'file'),
/*
|--------------------------------------------------------------------------
| Session Lifetime
|--------------------------------------------------------------------------
|
| Here you may specify the number of minutes that you wish the session
| to be allowed to remain idle before it expires. If you want them
| to immediately expire on the browser closing, set that option.
|
*/
'lifetime' => 120,
'expire_on_close' => false,
/*
|--------------------------------------------------------------------------
| Session Encryption
|--------------------------------------------------------------------------
|
| This option allows you to easily specify that all of your session data
| should be encrypted before it is stored. All encryption will be run
| automatically by Laravel and you can use the Session like normal.
|
*/
'encrypt' => false,
/*
|--------------------------------------------------------------------------
| Session File Location
|--------------------------------------------------------------------------
|
| When using the native session driver, we need a location where session
| files may be stored. A default has been set for you but a different
| location may be specified. This is only needed for file sessions.
|
*/
'files' => storage_path('framework/sessions'),
/*
|--------------------------------------------------------------------------
| Session Database Connection
|--------------------------------------------------------------------------
|
| When using the "database" or "redis" session drivers, you may specify a
| connection that should be used to manage these sessions. This should
| correspond to a connection in your database configuration options.
|
*/
'connection' => null,
/*
|--------------------------------------------------------------------------
| Session Database Table
|--------------------------------------------------------------------------
|
| When using the "database" session driver, you may specify the table we
| should use to manage the sessions. Of course, a sensible default is
| provided for you; however, you are free to change this as needed.
|
*/
'table' => 'sessions',
/*
|--------------------------------------------------------------------------
| Session Sweeping Lottery
|--------------------------------------------------------------------------
|
| Some session drivers must manually sweep their storage location to get
| rid of old sessions from storage. Here are the chances that it will
| happen on a given request. By default, the odds are 2 out of 100.
|
*/
'lottery' => [2, 100],
/*
|--------------------------------------------------------------------------
| Session Cookie Name
|--------------------------------------------------------------------------
|
| Here you may change the name of the cookie used to identify a session
| instance by ID. The name specified here will get used every time a
| new session cookie is created by the framework for every driver.
|
*/
'cookie' => 'laravel_session',
/*
|--------------------------------------------------------------------------
| Session Cookie Path
|--------------------------------------------------------------------------
|
| The session cookie path determines the path for which the cookie will
| be regarded as available. Typically, this will be the root path of
| your application but you are free to change this when necessary.
|
*/
'path' => '/',
/*
|--------------------------------------------------------------------------
| Session Cookie Domain
|--------------------------------------------------------------------------
|
| Here you may change the domain of the cookie used to identify a session
| in your application. This will determine which domains the cookie is
| available to in your application. A sensible default has been set.
|
*/
'domain' => null,
/*
|--------------------------------------------------------------------------
| HTTPS Only Cookies
|--------------------------------------------------------------------------
|
| By setting this option to true, session cookies will only be sent back
| to the server if the browser has a HTTPS connection. This will keep
| the cookie from being sent to you if it can not be done securely.
|
*/
'secure' => false,
/*
|--------------------------------------------------------------------------
| HTTP Access Only
|--------------------------------------------------------------------------
|
| Setting this value to true will prevent JavaScript from accessing the
| value of the cookie and the cookie will only be accessible through
| the HTTP protocol. You are free to modify this option if needed.
|
*/
'http_only' => true,
];
<?php
return [
/*
|--------------------------------------------------------------------------
| View Storage Paths
|--------------------------------------------------------------------------
|
| Most templating systems load templates from disk. Here you may specify
| an array of paths that should be checked for your views. Of course
| the usual Laravel view path has already been registered for you.
|
*/
'paths' => [
realpath(base_path('resources/views')),
],
/*
|--------------------------------------------------------------------------
| Compiled View Path
|--------------------------------------------------------------------------
|
| This option determines where all the compiled Blade templates will be
| stored for your application. Typically, this is within the storage
| directory. However, as usual, you are free to change this value.
|
*/
'compiled' => realpath(storage_path('framework/views')),
];
<?php
return [
'admin' => ['yyc@ichunt.com'],
'login' => [
'login' => 'http://' . env('LOGIN_DOMAIN', '') . '/login',
'logout'=> 'http://' . env('LOGIN_DOMAIN', '') . '/logout',
'check' => 'http://' . env('LOGIN_DOMAIN', '') . '/api/checklogin',
'search'=> 'http://' . env('LOGIN_DOMAIN', '') . '/api/search',
'dashboard'=>'http://'.env('LOGIN_DOMAIN', '') . '/dashboard',
],
'export_domain'=>[ //通用导入导出网址
'local1' =>'http://export.liexin.com',
'local2' =>'http://export.liexin.net',
'sz' =>'http://szexport.ichunt.net',
'release' =>'http://export.ichunt.net',
],
'frq_domain'=>[ //询报价系统网址
'local1' =>'http://frq.liexin.com',
'local2' =>'http://frq.liexin.net',
'sz' =>'http://szfrq.ichunt.net',
'release' =>'http://frq.ichunt.net',
],
"domain" => "liexin.net",
'export_domain' => "http://export.liexin.com", //通用导出网址
'frq_export_inquiry' => '23', //导出明细id
'frq_go_server' => 'http://frq.liexin.net', //询价go 对外项目
'frq_url' => 'http://frq.liexin.net',
// 权限系统
'perm_url' => 'http://perm.liexin.net',
// 获取用户权限接口
'perm_api' => 'http://perm.liexin.net/api/perms/',
// 获取用户许可权限接口
'check_access_api' => 'http://perm.liexin.net/api/perms/access',
//上传图片接口地址
'UploadUrl' => 'http://api.liexin.com/oss/upload',
'UploadKey' => 'fh6y5t4rr351d2c3bryi',
];
#添加云芯后台管理
数据库:liexin_yunxin
环境:正式+测试
执行sql:
-- 添加联营供应商信息
ALTER TABLE `lie_supplier_account`
CHANGE COLUMN `supplier_id` `supplier_self_id` smallint(5) UNSIGNED NOT NULL DEFAULT 0 COMMENT '自营供应商id,关联 liexin_wms.lie_supplier_channel' AFTER `id`,
ADD COLUMN `supplier_self_name` varchar(64) NOT NULL AFTER `supplier_self_id`,
ADD COLUMN `supplier_self_code` varchar(16) NOT NULL DEFAULT '' COMMENT '自营供应商编码' AFTER `supplier_self_name`,
ADD COLUMN `supplier_com_id` smallint(5) UNSIGNED NOT NULL DEFAULT 0 COMMENT '联营供应商id' AFTER `supplier_self_code`,
ADD COLUMN `supplier_com_name` varchar(64) NOT NULL DEFAULT '' COMMENT '联营供应商名称' AFTER `supplier_com_id`,
ADD COLUMN `supplier_com_code` varchar(16) NOT NULL DEFAULT '' COMMENT '联营供应商编码' AFTER `supplier_com_name`;
ALTER TABLE `lie_supplier_account`
ADD INDEX `idx_supplier_self_name` (`supplier_self_name`) ,
ADD INDEX `idx_supplier_com_name` (`supplier_com_name`) ;
-- 更改供应商id
ALTER TABLE `lie_goods_audit`
CHANGE COLUMN `supplier_id` `supplier_self_id` smallint(5) UNSIGNED NOT NULL DEFAULT 0 COMMENT '自营供应商ID' AFTER `sku_id`;
原因:添加联营账号
\ No newline at end of file
var elixir = require('laravel-elixir');
/*
|--------------------------------------------------------------------------
| Elixir Asset Management
|--------------------------------------------------------------------------
|
| Elixir provides a clean, fluent API for defining some basic Gulp tasks
| for your Laravel application. By default, we are compiling the Sass
| file for our application, as well as publishing vendor resources.
|
*/
elixir(function(mix) {
mix.sass('app.scss');
});
{
"private": true,
"scripts": {
"prod": "gulp --production",
"dev": "gulp watch"
},
"devDependencies": {
"gulp": "^3.9.1",
"laravel-elixir": "^5.0.0",
"bootstrap-sass": "^3.0.0"
}
}
<?xml version="1.0" encoding="UTF-8"?>
<phpunit backupGlobals="false"
backupStaticAttributes="false"
bootstrap="bootstrap/autoload.php"
colors="true"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
processIsolation="false"
stopOnFailure="false">
<testsuites>
<testsuite name="Application Test Suite">
<directory suffix="Test.php">./tests</directory>
</testsuite>
</testsuites>
<filter>
<whitelist processUncoveredFilesFromWhitelist="true">
<directory suffix=".php">./app</directory>
<exclude>
<file>./app/Http/routes.php</file>
</exclude>
</whitelist>
</filter>
<php>
<env name="APP_ENV" value="testing"/>
<env name="CACHE_DRIVER" value="array"/>
<env name="SESSION_DRIVER" value="array"/>
<env name="QUEUE_DRIVER" value="sync"/>
</php>
</phpunit>
#开发文档
## 库存异常对接wms
数据库:liexin_wms
环境:测试
执行sql:
-- 添加异常取消,已完成状态
ALTER TABLE `lie_abnormal`
MODIFY COLUMN `status` tinyint(1) NOT NULL DEFAULT '-1' COMMENT '状态:-10已取消 -1草稿,1待审核,2审核通过,3审核驳回 4已完成' AFTER `abnormal_type`;
-- 添加异常库内出库时间
ALTER TABLE `lie_abnormal`
ADD COLUMN `outstock_time` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '出库时间' AFTER `create_time`;
-- 添加供应商退货地址省市县
ALTER TABLE `lie_supplier_address`
ADD COLUMN `province` mediumint(8) unsigned NOT NULL DEFAULT '0' COMMENT '省',
ADD COLUMN `city` mediumint(8) unsigned NOT NULL DEFAULT '0' COMMENT '市',
ADD COLUMN `district` mediumint(8) unsigned NOT NULL DEFAULT '0' COMMENT '区\\县';
原因:添加采购对接库内异常
-- 对外提供接口
//wms出库(库内异常退货),推送到采购
url: /wmsapi/WebApiAbnormalStockReturn
//涉及地址推送来料通知到 仓库wms,推入mq
Array
(
[type] => delivery.syn
[data] => Array
(
[delivery_sn] => LL180521001
[supplier_id] => 10003
[currency] => USD
[supplier_sn] => shd001
[order_time] => 1526871322
[order_userid] => 1000
[stockup_type] => 1
[warehouse_code] => 01
[order_type] => 1
[detail] => Array
(
[0] => Array
(
[delivery_sn] => LL180521001
[delivery_items_id] => 100
[goods_id] => 10257
[picking_price] => 10.236900
[shipping_number] => 13
[purchase_sn] => ZC180518006
)
[1] => Array
(
[delivery_sn] => LL180521001
[delivery_items_id] => 101
[goods_id] => 10196
[picking_price] => 12.000000
[shipping_number] => 12000
[purchase_sn] => ZC180518006
)
)
[total_rows] => 2
)
)
##账期付款优化
数据库:liexin_wms
环境:测试+生产
执行sql:
ALTER TABLE `lie_purchase`
MODIFY COLUMN `pay_status` tinyint(1) NOT NULL DEFAULT 0 COMMENT '状态:0未付款 1付全款 2首款 3尾款 4:部分请款(用于账期)5:完全请款(用于账期)' AFTER `status`;
ALTER TABLE `lie_putaway`
MODIFY COLUMN `pay_status` tinyint(1) UNSIGNED NOT NULL DEFAULT 1 COMMENT '1未支付 2已同步 3不用支付(非账期) 4同步失败' AFTER `create_uid`;
同步所有账期为部分收款的为未付款: update lie_purchase set pay_status=0 where pay_status=4;
原因:账期付款优化
## 供应商多银行信息
DB:
数据库:liexin_wms
环境:生产
执行sql:
-- 添加供应商多币种等字段
ALTER TABLE `lie_supplier_receipt`
ADD COLUMN `status` tinyint(1) UNSIGNED NOT NULL DEFAULT 1 COMMENT '-2失效 -1禁用 1 启动 2待审核 3审核驳回' AFTER `certificate`,
ADD COLUMN `create_uid` smallint(5) UNSIGNED NOT NULL DEFAULT 0 COMMENT '创建用户' AFTER `status`,
ADD COLUMN `create_time` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '创建时间' AFTER `create_uid`,
ADD COLUMN `update_time` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '更新时间' AFTER `create_time`,
ADD COLUMN `currency` tinyint(3) UNSIGNED NOT NULL DEFAULT 1 COMMENT '币种:1人民币,2美金,3港币,4欧元,5英镑' AFTER `certificate`;
-- 同步旧数据币种到新添加的币种字段
update lie_supplier_receipt a, lie_supplier_channel b set a.currency= b.currency where a.supplier_id=b.supplier_id
原因:增加供应商多银行字段
<IfModule mod_rewrite.c>
<IfModule mod_negotiation.c>
Options -MultiViews
</IfModule>
RewriteEngine On
# Redirect Trailing Slashes If Not A Folder...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)/$ /$1 [L,R=301]
# Handle Front Controller...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]
# Handle Authorization Header
RewriteCond %{HTTP:Authorization} .
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
</IfModule>
This diff could not be displayed because it is too large.
.red{
color: red;
}
.block-42{
width: 42%
}
.float-l{
float: left;
}
/*td{
text-align: center !important;
}*/
.td-l{
text-align: left !important;
}
.nohand{
pointer-events: none;
}
\ No newline at end of file
/* cyrillic-ext */
@font-face {
font-family: 'Open Sans';
font-style: normal;
font-weight: 300;
src: local('Open Sans Light'), local('OpenSans-Light'), url(/fonts/opensans/v13/DXI1ORHCpsQm3Vp6mXoaTa-j2U0lmluP9RWlSytm3ho.woff2) format('woff2');
unicode-range: U+0460-052F, U+20B4, U+2DE0-2DFF, U+A640-A69F;
}
/* cyrillic */
@font-face {
font-family: 'Open Sans';
font-style: normal;
font-weight: 300;
src: local('Open Sans Light'), local('OpenSans-Light'), url(/fonts/opensans/v13/DXI1ORHCpsQm3Vp6mXoaTZX5f-9o1vgP2EXwfjgl7AY.woff2) format('woff2');
unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* greek-ext */
@font-face {
font-family: 'Open Sans';
font-style: normal;
font-weight: 300;
src: local('Open Sans Light'), local('OpenSans-Light'), url(/fonts/opensans/v13/DXI1ORHCpsQm3Vp6mXoaTRWV49_lSm1NYrwo-zkhivY.woff2) format('woff2');
unicode-range: U+1F00-1FFF;
}
/* greek */
@font-face {
font-family: 'Open Sans';
font-style: normal;
font-weight: 300;
src: local('Open Sans Light'), local('OpenSans-Light'), url(/fonts/opensans/v13/DXI1ORHCpsQm3Vp6mXoaTaaRobkAwv3vxw3jMhVENGA.woff2) format('woff2');
unicode-range: U+0370-03FF;
}
/* vietnamese */
@font-face {
font-family: 'Open Sans';
font-style: normal;
font-weight: 300;
src: local('Open Sans Light'), local('OpenSans-Light'), url(/fonts/opensans/v13/DXI1ORHCpsQm3Vp6mXoaTf8zf_FOSsgRmwsS7Aa9k2w.woff2) format('woff2');
unicode-range: U+0102-0103, U+1EA0-1EF1, U+20AB;
}
/* latin-ext */
@font-face {
font-family: 'Open Sans';
font-style: normal;
font-weight: 300;
src: local('Open Sans Light'), local('OpenSans-Light'), url(/fonts/opensans/v13/DXI1ORHCpsQm3Vp6mXoaTT0LW-43aMEzIO6XUTLjad8.woff2) format('woff2');
unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
font-family: 'Open Sans';
font-style: normal;
font-weight: 300;
src: local('Open Sans Light'), local('OpenSans-Light'), url(/fonts/opensans/v13/DXI1ORHCpsQm3Vp6mXoaTegdm0LZdjqr5-oayXSOefg.woff2) format('woff2');
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215, U+E0FF, U+EFFD, U+F000;
}
/* cyrillic-ext */
@font-face {
font-family: 'Open Sans';
font-style: normal;
font-weight: 400;
src: local('Open Sans'), local('OpenSans'), url(/fonts/opensans/v13/K88pR3goAWT7BTt32Z01mxJtnKITppOI_IvcXXDNrsc.woff2) format('woff2');
unicode-range: U+0460-052F, U+20B4, U+2DE0-2DFF, U+A640-A69F;
}
/* cyrillic */
@font-face {
font-family: 'Open Sans';
font-style: normal;
font-weight: 400;
src: local('Open Sans'), local('OpenSans'), url(/fonts/opensans/v13/RjgO7rYTmqiVp7vzi-Q5URJtnKITppOI_IvcXXDNrsc.woff2) format('woff2');
unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* greek-ext */
@font-face {
font-family: 'Open Sans';
font-style: normal;
font-weight: 400;
src: local('Open Sans'), local('OpenSans'), url(/fonts/opensans/v13/LWCjsQkB6EMdfHrEVqA1KRJtnKITppOI_IvcXXDNrsc.woff2) format('woff2');
unicode-range: U+1F00-1FFF;
}
/* greek */
@font-face {
font-family: 'Open Sans';
font-style: normal;
font-weight: 400;
src: local('Open Sans'), local('OpenSans'), url(/fonts/opensans/v13/xozscpT2726on7jbcb_pAhJtnKITppOI_IvcXXDNrsc.woff2) format('woff2');
unicode-range: U+0370-03FF;
}
/* vietnamese */
@font-face {
font-family: 'Open Sans';
font-style: normal;
font-weight: 400;
src: local('Open Sans'), local('OpenSans'), url(/fonts/opensans/v13/59ZRklaO5bWGqF5A9baEERJtnKITppOI_IvcXXDNrsc.woff2) format('woff2');
unicode-range: U+0102-0103, U+1EA0-1EF1, U+20AB;
}
/* latin-ext */
@font-face {
font-family: 'Open Sans';
font-style: normal;
font-weight: 400;
src: local('Open Sans'), local('OpenSans'), url(/fonts/opensans/v13/u-WUoqrET9fUeobQW7jkRRJtnKITppOI_IvcXXDNrsc.woff2) format('woff2');
unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
font-family: 'Open Sans';
font-style: normal;
font-weight: 400;
src: local('Open Sans'), local('OpenSans'), url(/fonts/opensans/v13/cJZKeOuBrn4kERxqtaUH3VtXRa8TVwTICgirnJhmVJw.woff2) format('woff2');
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215, U+E0FF, U+EFFD, U+F000;
}
/* cyrillic-ext */
@font-face {
font-family: 'Open Sans';
font-style: normal;
font-weight: 600;
src: local('Open Sans Semibold'), local('OpenSans-Semibold'), url(/fonts/opensans/v13/MTP_ySUJH_bn48VBG8sNSq-j2U0lmluP9RWlSytm3ho.woff2) format('woff2');
unicode-range: U+0460-052F, U+20B4, U+2DE0-2DFF, U+A640-A69F;
}
/* cyrillic */
@font-face {
font-family: 'Open Sans';
font-style: normal;
font-weight: 600;
src: local('Open Sans Semibold'), local('OpenSans-Semibold'), url(/fonts/opensans/v13/MTP_ySUJH_bn48VBG8sNSpX5f-9o1vgP2EXwfjgl7AY.woff2) format('woff2');
unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* greek-ext */
@font-face {
font-family: 'Open Sans';
font-style: normal;
font-weight: 600;
src: local('Open Sans Semibold'), local('OpenSans-Semibold'), url(/fonts/opensans/v13/MTP_ySUJH_bn48VBG8sNShWV49_lSm1NYrwo-zkhivY.woff2) format('woff2');
unicode-range: U+1F00-1FFF;
}
/* greek */
@font-face {
font-family: 'Open Sans';
font-style: normal;
font-weight: 600;
src: local('Open Sans Semibold'), local('OpenSans-Semibold'), url(/fonts/opensans/v13/MTP_ySUJH_bn48VBG8sNSqaRobkAwv3vxw3jMhVENGA.woff2) format('woff2');
unicode-range: U+0370-03FF;
}
/* vietnamese */
@font-face {
font-family: 'Open Sans';
font-style: normal;
font-weight: 600;
src: local('Open Sans Semibold'), local('OpenSans-Semibold'), url(/fonts/opensans/v13/MTP_ySUJH_bn48VBG8sNSv8zf_FOSsgRmwsS7Aa9k2w.woff2) format('woff2');
unicode-range: U+0102-0103, U+1EA0-1EF1, U+20AB;
}
/* latin-ext */
@font-face {
font-family: 'Open Sans';
font-style: normal;
font-weight: 600;
src: local('Open Sans Semibold'), local('OpenSans-Semibold'), url(/fonts/opensans/v13/MTP_ySUJH_bn48VBG8sNSj0LW-43aMEzIO6XUTLjad8.woff2) format('woff2');
unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
font-family: 'Open Sans';
font-style: normal;
font-weight: 600;
src: local('Open Sans Semibold'), local('OpenSans-Semibold'), url(/fonts/opensans/v13/MTP_ySUJH_bn48VBG8sNSugdm0LZdjqr5-oayXSOefg.woff2) format('woff2');
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215, U+E0FF, U+EFFD, U+F000;
}
/* cyrillic-ext */
@font-face {
font-family: 'Open Sans';
font-style: normal;
font-weight: 700;
src: local('Open Sans Bold'), local('OpenSans-Bold'), url(/fonts/opensans/v13/k3k702ZOKiLJc3WVjuplzK-j2U0lmluP9RWlSytm3ho.woff2) format('woff2');
unicode-range: U+0460-052F, U+20B4, U+2DE0-2DFF, U+A640-A69F;
}
/* cyrillic */
@font-face {
font-family: 'Open Sans';
font-style: normal;
font-weight: 700;
src: local('Open Sans Bold'), local('OpenSans-Bold'), url(/fonts/opensans/v13/k3k702ZOKiLJc3WVjuplzJX5f-9o1vgP2EXwfjgl7AY.woff2) format('woff2');
unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* greek-ext */
@font-face {
font-family: 'Open Sans';
font-style: normal;
font-weight: 700;
src: local('Open Sans Bold'), local('OpenSans-Bold'), url(/fonts/opensans/v13/k3k702ZOKiLJc3WVjuplzBWV49_lSm1NYrwo-zkhivY.woff2) format('woff2');
unicode-range: U+1F00-1FFF;
}
/* greek */
@font-face {
font-family: 'Open Sans';
font-style: normal;
font-weight: 700;
src: local('Open Sans Bold'), local('OpenSans-Bold'), url(/fonts/opensans/v13/k3k702ZOKiLJc3WVjuplzKaRobkAwv3vxw3jMhVENGA.woff2) format('woff2');
unicode-range: U+0370-03FF;
}
/* vietnamese */
@font-face {
font-family: 'Open Sans';
font-style: normal;
font-weight: 700;
src: local('Open Sans Bold'), local('OpenSans-Bold'), url(/fonts/opensans/v13/k3k702ZOKiLJc3WVjuplzP8zf_FOSsgRmwsS7Aa9k2w.woff2) format('woff2');
unicode-range: U+0102-0103, U+1EA0-1EF1, U+20AB;
}
/* latin-ext */
@font-face {
font-family: 'Open Sans';
font-style: normal;
font-weight: 700;
src: local('Open Sans Bold'), local('OpenSans-Bold'), url(/fonts/opensans/v13/k3k702ZOKiLJc3WVjuplzD0LW-43aMEzIO6XUTLjad8.woff2) format('woff2');
unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
font-family: 'Open Sans';
font-style: normal;
font-weight: 700;
src: local('Open Sans Bold'), local('OpenSans-Bold'), url(/fonts/opensans/v13/k3k702ZOKiLJc3WVjuplzOgdm0LZdjqr5-oayXSOefg.woff2) format('woff2');
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215, U+E0FF, U+EFFD, U+F000;
}
/* cyrillic-ext */
@font-face {
font-family: 'Roboto';
font-style: normal;
font-weight: 300;
src: local('Roboto Light'), local('Roboto-Light'), url(/fonts/roboto/v15/0eC6fl06luXEYWpBSJvXCBJtnKITppOI_IvcXXDNrsc.woff2) format('woff2');
unicode-range: U+0460-052F, U+20B4, U+2DE0-2DFF, U+A640-A69F;
}
/* cyrillic */
@font-face {
font-family: 'Roboto';
font-style: normal;
font-weight: 300;
src: local('Roboto Light'), local('Roboto-Light'), url(/fonts/roboto/v15/Fl4y0QdOxyyTHEGMXX8kcRJtnKITppOI_IvcXXDNrsc.woff2) format('woff2');
unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* greek-ext */
@font-face {
font-family: 'Roboto';
font-style: normal;
font-weight: 300;
src: local('Roboto Light'), local('Roboto-Light'), url(/fonts/roboto/v15/-L14Jk06m6pUHB-5mXQQnRJtnKITppOI_IvcXXDNrsc.woff2) format('woff2');
unicode-range: U+1F00-1FFF;
}
/* greek */
@font-face {
font-family: 'Roboto';
font-style: normal;
font-weight: 300;
src: local('Roboto Light'), local('Roboto-Light'), url(/fonts/roboto/v15/I3S1wsgSg9YCurV6PUkTORJtnKITppOI_IvcXXDNrsc.woff2) format('woff2');
unicode-range: U+0370-03FF;
}
/* vietnamese */
@font-face {
font-family: 'Roboto';
font-style: normal;
font-weight: 300;
src: local('Roboto Light'), local('Roboto-Light'), url(/fonts/roboto/v15/NYDWBdD4gIq26G5XYbHsFBJtnKITppOI_IvcXXDNrsc.woff2) format('woff2');
unicode-range: U+0102-0103, U+1EA0-1EF1, U+20AB;
}
/* latin-ext */
@font-face {
font-family: 'Roboto';
font-style: normal;
font-weight: 300;
src: local('Roboto Light'), local('Roboto-Light'), url(/fonts/roboto/v15/Pru33qjShpZSmG3z6VYwnRJtnKITppOI_IvcXXDNrsc.woff2) format('woff2');
unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
font-family: 'Roboto';
font-style: normal;
font-weight: 300;
src: local('Roboto Light'), local('Roboto-Light'), url(/fonts/roboto/v15/Hgo13k-tfSpn0qi1SFdUfVtXRa8TVwTICgirnJhmVJw.woff2) format('woff2');
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215, U+E0FF, U+EFFD, U+F000;
}
/* cyrillic-ext */
@font-face {
font-family: 'Roboto';
font-style: normal;
font-weight: 400;
src: local('Roboto'), local('Roboto-Regular'), url(/fonts/roboto/v15/ek4gzZ-GeXAPcSbHtCeQI_esZW2xOQ-xsNqO47m55DA.woff2) format('woff2');
unicode-range: U+0460-052F, U+20B4, U+2DE0-2DFF, U+A640-A69F;
}
/* cyrillic */
@font-face {
font-family: 'Roboto';
font-style: normal;
font-weight: 400;
src: local('Roboto'), local('Roboto-Regular'), url(/fonts/roboto/v15/mErvLBYg_cXG3rLvUsKT_fesZW2xOQ-xsNqO47m55DA.woff2) format('woff2');
unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* greek-ext */
@font-face {
font-family: 'Roboto';
font-style: normal;
font-weight: 400;
src: local('Roboto'), local('Roboto-Regular'), url(/fonts/roboto/v15/-2n2p-_Y08sg57CNWQfKNvesZW2xOQ-xsNqO47m55DA.woff2) format('woff2');
unicode-range: U+1F00-1FFF;
}
/* greek */
@font-face {
font-family: 'Roboto';
font-style: normal;
font-weight: 400;
src: local('Roboto'), local('Roboto-Regular'), url(/fonts/roboto/v15/u0TOpm082MNkS5K0Q4rhqvesZW2xOQ-xsNqO47m55DA.woff2) format('woff2');
unicode-range: U+0370-03FF;
}
/* vietnamese */
@font-face {
font-family: 'Roboto';
font-style: normal;
font-weight: 400;
src: local('Roboto'), local('Roboto-Regular'), url(/fonts/roboto/v15/NdF9MtnOpLzo-noMoG0miPesZW2xOQ-xsNqO47m55DA.woff2) format('woff2');
unicode-range: U+0102-0103, U+1EA0-1EF1, U+20AB;
}
/* latin-ext */
@font-face {
font-family: 'Roboto';
font-style: normal;
font-weight: 400;
src: local('Roboto'), local('Roboto-Regular'), url(/fonts/roboto/v15/Fcx7Wwv8OzT71A3E1XOAjvesZW2xOQ-xsNqO47m55DA.woff2) format('woff2');
unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
font-family: 'Roboto';
font-style: normal;
font-weight: 400;
src: local('Roboto'), local('Roboto-Regular'), url(/fonts/roboto/v15/CWB0XYA8bzo0kSThX0UTuA.woff2) format('woff2');
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215, U+E0FF, U+EFFD, U+F000;
}
/* cyrillic-ext */
@font-face {
font-family: 'Roboto';
font-style: normal;
font-weight: 500;
src: local('Roboto Medium'), local('Roboto-Medium'), url(/fonts/roboto/v15/ZLqKeelYbATG60EpZBSDyxJtnKITppOI_IvcXXDNrsc.woff2) format('woff2');
unicode-range: U+0460-052F, U+20B4, U+2DE0-2DFF, U+A640-A69F;
}
/* cyrillic */
@font-face {
font-family: 'Roboto';
font-style: normal;
font-weight: 500;
src: local('Roboto Medium'), local('Roboto-Medium'), url(/fonts/roboto/v15/oHi30kwQWvpCWqAhzHcCSBJtnKITppOI_IvcXXDNrsc.woff2) format('woff2');
unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* greek-ext */
@font-face {
font-family: 'Roboto';
font-style: normal;
font-weight: 500;
src: local('Roboto Medium'), local('Roboto-Medium'), url(/fonts/roboto/v15/rGvHdJnr2l75qb0YND9NyBJtnKITppOI_IvcXXDNrsc.woff2) format('woff2');
unicode-range: U+1F00-1FFF;
}
/* greek */
@font-face {
font-family: 'Roboto';
font-style: normal;
font-weight: 500;
src: local('Roboto Medium'), local('Roboto-Medium'), url(/fonts/roboto/v15/mx9Uck6uB63VIKFYnEMXrRJtnKITppOI_IvcXXDNrsc.woff2) format('woff2');
unicode-range: U+0370-03FF;
}
/* vietnamese */
@font-face {
font-family: 'Roboto';
font-style: normal;
font-weight: 500;
src: local('Roboto Medium'), local('Roboto-Medium'), url(/fonts/roboto/v15/mbmhprMH69Zi6eEPBYVFhRJtnKITppOI_IvcXXDNrsc.woff2) format('woff2');
unicode-range: U+0102-0103, U+1EA0-1EF1, U+20AB;
}
/* latin-ext */
@font-face {
font-family: 'Roboto';
font-style: normal;
font-weight: 500;
src: local('Roboto Medium'), local('Roboto-Medium'), url(/fonts/roboto/v15/oOeFwZNlrTefzLYmlVV1UBJtnKITppOI_IvcXXDNrsc.woff2) format('woff2');
unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
font-family: 'Roboto';
font-style: normal;
font-weight: 500;
src: local('Roboto Medium'), local('Roboto-Medium'), url(/fonts/roboto/v15/RxZJdnzeo3R5zSexge8UUVtXRa8TVwTICgirnJhmVJw.woff2) format('woff2');
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215, U+E0FF, U+EFFD, U+F000;
}
/* cyrillic-ext */
@font-face {
font-family: 'Roboto';
font-style: normal;
font-weight: 700;
src: local('Roboto Bold'), local('Roboto-Bold'), url(/fonts/roboto/v15/77FXFjRbGzN4aCrSFhlh3hJtnKITppOI_IvcXXDNrsc.woff2) format('woff2');
unicode-range: U+0460-052F, U+20B4, U+2DE0-2DFF, U+A640-A69F;
}
/* cyrillic */
@font-face {
font-family: 'Roboto';
font-style: normal;
font-weight: 700;
src: local('Roboto Bold'), local('Roboto-Bold'), url(/fonts/roboto/v15/isZ-wbCXNKAbnjo6_TwHThJtnKITppOI_IvcXXDNrsc.woff2) format('woff2');
unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* greek-ext */
@font-face {
font-family: 'Roboto';
font-style: normal;
font-weight: 700;
src: local('Roboto Bold'), local('Roboto-Bold'), url(/fonts/roboto/v15/UX6i4JxQDm3fVTc1CPuwqhJtnKITppOI_IvcXXDNrsc.woff2) format('woff2');
unicode-range: U+1F00-1FFF;
}
/* greek */
@font-face {
font-family: 'Roboto';
font-style: normal;
font-weight: 700;
src: local('Roboto Bold'), local('Roboto-Bold'), url(/fonts/roboto/v15/jSN2CGVDbcVyCnfJfjSdfBJtnKITppOI_IvcXXDNrsc.woff2) format('woff2');
unicode-range: U+0370-03FF;
}
/* vietnamese */
@font-face {
font-family: 'Roboto';
font-style: normal;
font-weight: 700;
src: local('Roboto Bold'), local('Roboto-Bold'), url(/fonts/roboto/v15/PwZc-YbIL414wB9rB1IAPRJtnKITppOI_IvcXXDNrsc.woff2) format('woff2');
unicode-range: U+0102-0103, U+1EA0-1EF1, U+20AB;
}
/* latin-ext */
@font-face {
font-family: 'Roboto';
font-style: normal;
font-weight: 700;
src: local('Roboto Bold'), local('Roboto-Bold'), url(/fonts/roboto/v15/97uahxiqZRoncBaCEI3aWxJtnKITppOI_IvcXXDNrsc.woff2) format('woff2');
unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
font-family: 'Roboto';
font-style: normal;
font-weight: 700;
src: local('Roboto Bold'), local('Roboto-Bold'), url(/fonts/roboto/v15/d-6IYplOFocCacKzxwXSOFtXRa8TVwTICgirnJhmVJw.woff2) format('woff2');
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215, U+E0FF, U+EFFD, U+F000;
}
.btn{
color: #fff;
background-color: #337ab7;
border-color: #2e6da4;
display: inline-block;
padding: 6px 12px;
margin-bottom: 0;
font-size: 14px;
font-weight: 400;
line-height: 1.42857143;
text-align: center;
white-space: nowrap;
text-decoration: none;
vertical-align: middle;
-ms-touch-action: manipulation;
touch-action: manipulation;
cursor: pointer;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
background-image: none;
border: 1px solid transparent;
border-radius: 4px;
}
a.btn:hover{
background-color: #3366b7;
}
.progress{
margin-top:2px;
width: 200px;
height: 14px;
margin-bottom: 10px;
overflow: hidden;
background-color: #f5f5f5;
border-radius: 4px;
-webkit-box-shadow: inset 0 1px 2px rgba(0,0,0,.1);
box-shadow: inset 0 1px 2px rgba(0,0,0,.1);
}
.progress-bar{
background-color: rgb(92, 184, 92);
background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.14902) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.14902) 50%, rgba(255, 255, 255, 0.14902) 75%, transparent 75%, transparent);
background-size: 40px 40px;
box-shadow: rgba(0, 0, 0, 0.14902) 0px -1px 0px 0px inset;
box-sizing: border-box;
color: rgb(255, 255, 255);
display: block;
float: left;
font-size: 12px;
height: 20px;
line-height: 20px;
text-align: center;
transition-delay: 0s;
transition-duration: 0.6s;
transition-property: width;
transition-timing-function: ease;
width: 266.188px;
}
\ No newline at end of file
This diff could not be displayed because it is too large.
No preview for this file type
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
No preview for this file type
This diff could not be displayed because it is too large.
No preview for this file type
No preview for this file type
This diff could not be displayed because it is too large.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment