v1.0

parent 0c458127
Showing with 212 additions and 3182 deletions
......@@ -430,23 +430,20 @@ class HandleController extends Controller
print_r($result);
die();
}
private function hcytest3(){
$res = (new UploadItems($_GET['s']))->handle();
print_r($res);
die();
$Url=Config('website.FS_SELF_SKU_URL');
$map['data']['supplier_id']=10010;
$map['data']['goods_id']=100895;
$map['time']=time();
$key=Config('website.MD5KEY');
$map['AuthSign']=MD5(MD5(http_build_query($map)).$key);
$data['data']=$map;
$result=curl($Url,http_build_query($data),1);
$result = json_decode($result,true);
print_r($result);
die();
private function hcytest3(){
$conFinance =DB::connection('finance');
$conPur =DB::connection('web');
$info = $conFinance->select("select * from lie_supplier_bill");
foreach ($info as $k=>&$v) {
$putaway = $conPur->select("select create_time from lie_putaway where putaway_id =".$v['putaway_id']);
if ($putaway){
$up = $conFinance->update("update lie_supplier_bill set create_time = ".$putaway[0]['create_time']." where bill_id=".$v['bill_id']);
echo $v['bill_id']."<br/>";
}
}
echo "更新成功";
}
private function deletede($request){
......
<?php
namespace App\Http\Controllers;
use App\Http\Requests;
use Gregwar\Captcha\CaptchaBuilder;
use Illuminate\Http\Request;
use Session;
class HelperController extends Controller {
public function Entrance(Request $request, $id ){
$this->$id($request, $id);
}
//生成验证码
private function captcha($tmp) {
session_start(); // 初始化session
//生成验证码图片的Builder对象,配置相应属性
$builder = new CaptchaBuilder;
//可以设置图片宽高及字体
$builder->build($width = 120, $height = 30, $font = null);
//获取验证码的内容
$phrase = $builder->getPhrase();
//把内容存入session
$_SESSION['yunxin_captcha']= $phrase;
//生成图片
header("Cache-Control: no-cache, must-revalidate");
header('Content-Type: image/jpeg');
$builder->output();
}
//验证注册码的正确与否
private function verifyCaptcha() {
session_start();
$userInput = Request::input("code");
if ($_SESSION['yunxin_captcha'] == $userInput) {
//用户输入验证码正确
Export([0,'success']);
} else {
//用户输入验证码错误
Export([1001,'验证码输入错误']);
}
}
}
......@@ -19,56 +19,13 @@ class CheckLogin
*/
public function handle($request, Closure $next)
{
$userId = $request->cookie('oa_user_id');
$skey = $request->cookie('oa_skey');
$accountId = $request->cookie('yunxin_account_id');
$loginKey = $request->cookie('yunxin_login_key');
$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(trim($rsp, "\xEF\xBB\xBF")); //去掉bom头
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;
// $user->code=DB::connection()->table('lie_intracode')->where('admin_id',$user->userId)->select('code_id')->first();
// $request->user = $user;
return $next($request);
}
......
<?php
/**
* Created by PhpStorm.
* User: yemxing
* Date: 2018/1/2
* User: hcy
* Date: 2018/2/5
* Time: 10:19
*/
function curl($url, $params = false, $ispost = 0, $https = 0,$cookie='')
......@@ -73,22 +73,6 @@ function perm($userId,$perm1='',$type='web'){
return true;
}
}
//获取单个用户权限详情
function permInfo($userId){
$NeedListAuth = Config('fixed.NeedListAuth');
$permID = Config('website.PermId');
$url = Config('website.GoUrl') . '/api/perms/' . $userId . '/' . $permID ;
// $url = 'http://perm.ichunt.net/api/perms/' . 1496 . '/' . 17 ; //生产
$result = json_decode(curl($url, '', 0),true);
$roleName = $result['data']['roles'][0]['name'];
if (in_array($roleName,$NeedListAuth)){
return true;
}else{
return false;
}
}
//过滤数据
function TrimX($data='',$empty=true,$arr=false){
if(is_array($data)){
......@@ -1034,4 +1018,42 @@ function getFootstoneCurrentHost(){
*/
function SelectDb($db,$sql){
return \DB::connection($db)->select($sql);
}
function Export($errcode=0,$errmsg='成功',$data=''){
if(is_array($errcode)){
echo json_encode(['errcode'=>$errcode[0],'errmsg'=>$errcode[1],'data'=>!empty(@$errcode[2])?@$errcode[2]:''], JSON_UNESCAPED_UNICODE|JSON_UNESCAPED_SLASHES);
}else{
echo json_encode(['errcode'=>$errcode,'errmsg'=>$errmsg,'data'=>$data], JSON_UNESCAPED_UNICODE|JSON_UNESCAPED_SLASHES);
}
exit();
}
function ExportLayui($errcode=0,$errmsg=0,$data=[],$count=0,$other=''){
if(is_array($errcode)){
echo json_encode(['code'=>$errcode[0],'msg'=>$errcode[1],'data'=>@$errcode[2],'count'=>@$errcode[3],'other'=>!empty(@$errcode[4]) ? @$errcode[4] : ''], JSON_UNESCAPED_UNICODE|JSON_UNESCAPED_SLASHES);
}else{
echo json_encode(['code'=>$errcode,'msg'=>$errmsg,'data'=>$data,'count'=>$count,'other'=>$other], JSON_UNESCAPED_UNICODE|JSON_UNESCAPED_SLASHES);
}
exit();
}
/*
* 数组转json
*/
function utf8JsonEncode($arr){
return json_encode($arr, JSON_UNESCAPED_UNICODE|JSON_UNESCAPED_SLASHES);
}
/*
*创建密码
*@param string $passwd md5后的加密密码
*@return string
*/
function createPassword($passwd)
{
return hash('sha256', md5($passwd) . config("website.supplier_login_slat"));
}
/*
*创建随机密钥
*/
function createSlat($length = 32)
{
return base64_encode(openssl_random_pseudo_bytes($length));
}
\ No newline at end of file
......@@ -16,6 +16,7 @@ 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'],'/helper/{key}', 'HelperController@Entrance');
Route::match(['get', 'post'],'/hd/{key}', 'HandleController@Entrance');
Route::get('/pushAmq', 'QueuedController@pushAmq');
......
......@@ -73,10 +73,12 @@ class PushFinancePeriod extends Job implements ShouldQueue
$PutawayList=$PutawayItemsModel->where('putaway_id','=',$this->id)->select($PuItemArr)->get()->toArray();//查出所有的采购商品
$PurArr=['picking_sn','picking_id','purchaser_id','supplier_id','supplier_code','supplier_name','pay_type','day_num','currency',
'picking_amount','create_time','picking_info','status'];
'picking_amount','picking_info','status'];
$PurchaseInfo=$PurchaseModel->where('picking_id','=',$PutawayList[0]['picking_id'])->select($PurArr)->first();//查采购单信息
if(!$PurchaseInfo) return $LogModel->UpdateLogArr($LogID,'没有找到这个采购单',3,$Log);
$PurchaseInfo=$PurchaseInfo->toArray();
//todo 入库时间
$PurchaseInfo['create_time'] = $PutawayInfo['create_time'];
if($PurchaseInfo['pay_type']!=1 && $PurchaseInfo['pay_type']!=2){//不是账期订单
$result=$PutawayModel->where('putaway_id','=',$this->id)->update(['pay_status'=>3]);
......
<?php
namespace App\Model;
use App\Model\Server\FoostoneModel;
use App\Model\Server\PurToWmsModel;
use Illuminate\Database\Eloquent\Model;
use Request;
use DB;
class AbnormalModel extends Model
{
protected $connection='web';
protected $table='abnormal';
protected $primaryKey='abnormal_id';
public $timestamps = false;
//异常库存列表
public function getAbnormalList($export=array())
{
$arr = ['p', 'limit','self','create_time1','create_time2','deal_time1','deal_time2'
,'abnormal_sn','picking_sn','delivery_sn','putaway_sn','supplier_name','create_uid','abnormal_type','status'];
$input = Request::only($arr);
$input=TrimX($input,true,$arr);
// //查询数据
$list = $this->where(function ($query) use ($input) {
foreach ($input as $k => $v){
$v = trim($v);
switch ($k){
case "p":
case "limit":
continue;
break;
case "create_time1":
$query->where('create_time', '>=', strtotime($v));
break;
case "create_time2":
$query->where('create_time', '<=',strtotime($v));
break;
case "deal_time1":
$query->where('deal_time', '>=',strtotime($v));
break;
case "deal_time2":
$query->where('deal_time', '<=', strtotime($v));
break;
case "self":
$query->where('create_uid', '=', $v);
break;
default:
$query->whereIn($k, explode(',',trim($v,',')));
break;
}
}
});
$list = $list->orderBy('create_time','desc')->paginate($input['limit'], ['*'], 'p', $input['p'])->toArray();
//getSql();
if (!$list) return [20001, '没有数据'];
$UserModel = new UserModel();
$putAwayModel = new PutawayModel();
$PurDeliveryModel = new PurDeliveryModel();
$PurchaseModel = new PurchaseModel();
$abItemModel = new AbnormalItemsModel();
$fixed = Config('fixed');
$HLCurrency=Config('fixed.HLCurrency');
foreach ($list['data'] as $k=>&$v){
$userName = $UserModel->FinduserInfoName($v['create_uid']);
$v['create_uid_name'] = $userName ? $userName : "";
$v['abnormal_type'] =array_key_exists($v['abnormal_type'],$fixed['AbnormalType']) ? $fixed['AbnormalType'][$v['abnormal_type']] : "";
$v['abnormal_status'] =array_key_exists($v['status'],$fixed['AbnormalStatus']) ? $fixed['AbnormalStatus'][$v['status']] :"";
$v['create_time'] = date('Y-m-d H:i:s',$v['create_time']);
$v['putaway_id'] = !empty($v['putaway_sn']) ? $putAwayModel->getPutawayId($v['putaway_sn']) : "";
$v['delivery_id'] = !empty($v['delivery_sn']) ? $PurDeliveryModel->getDeliveryId($v['delivery_sn']) :"";
$v['picking_id'] = !empty($v['picking_sn']) ? $PurchaseModel->getPickingId($v['picking_sn']) :"";
//统计差异数量
$v['abnormal_number']= $abItemModel->countAbnormalNumber($v['abnormal_id']);
$v['currency'] = $HLCurrency[$v['currency']];
}
return [0, '成功', $list['data'], $list['total']];
}
// 编辑
public function safeStockEdit()
{
$safe_id = Request::input('safe_id');
$safe_stock = Request::input('safe_stock');
return $this->where('safe_id', $safe_id)->update(['safe_stock'=>$safe_stock]);
}
//生成异常通知单号
public function getAbnormalSn($AdminID=0,$abnormal_sn=''){
if(!$abnormal_sn) return false;
$data['abnormal_sn']=$abnormal_sn;
$data['create_uid']=$AdminID;
$data['create_time']=time();
$data['status']=-1;
$result=$this->insertGetId($data);
if(!$result) return false;
return $result;
}
//反写异常库存订单
public function SaveAbnormal($abnormalID,$data){
$Arr=['picking_id','picking_sn','delivery_sn','putaway_sn','supplier_id','currency','exchange_rate','supplier_code','supplier_name','abnormal_type','status','create_uid'];
if(!$abnormalID || !is_array($data)) return false;
foreach ($data as $k=>$v){
if(!in_array($k,$Arr)) unset($data[$k]);
}
return $this->where('abnormal_id','=',$abnormalID)->update($data);
}
/*
* 异常订单详情
*/
public function abnormalDetail(){
$input = TrimX(Request::only(['abnormalId']),true,['abnormalId']);
$abnormalObj = $this->where('abnormal_id','=',$input['abnormalId'])->orWhere('abnormal_sn',$input['abnormalId'])->first(); //异常主表
if (!$abnormalObj) return false;
$abnormalArr = $abnormalObj->toArray();
$abnormalId = $abnormalArr['abnormal_id'];
$userModel = new UserModel();
$createName = $userModel->FinduserInfoName($abnormalArr['create_uid']);
$dealName = $userModel->FinduserInfoName($abnormalArr['deal_uid']);
$abnormalArr['create_uid'] = $createName ? $createName :""; //创建人用户名
$abnormalArr['deal_uid'] = $dealName ? $dealName :""; //处理人用户名
$abnormalArr['deal_time'] = timeToDate($abnormalArr['deal_time']);
$abnormalArr['create_time'] = timeToDate($abnormalArr['create_time']);
$itemsArr = DB::connection($this->connection)
->select("SELECT
p.goods_name,
p.brand_name,
p.packing_id,
p.mpq,
p.encap,
p.picking_price,
t.abnormal_items_id,
t.abnormal_number,
t.abnormal_items_type,
t.real_number,
t.withdraw_amount,
t.picking_items_id,
t.deal_type1,
t.deal_type2,
a.currency
FROM
lie_abnormal_items t,
lie_purchase_items p,
lie_purchase a
WHERE
t.picking_items_id = p.picking_items_id
and a.picking_id = p.picking_id
and t.abnormal_id = $abnormalId
order by t.picking_items_id ASC "); //异常明细
//取出包装方式
$PackingModel = new PackingModel();
$PackList = $PackingModel->PackingList();
$Currency = Config('fixed.Currency');
$i = 0;
$itemGroupArr = arrayGroup($itemsArr,'picking_items_id');
foreach ($itemsArr as $k=>&$v){
$v['packing_id'] = $PackList[$v['packing_id']]; //转换包装
$v['currency'] = $Currency[$v['currency']]; //转换币种
$v['k'] = $v['abnormal_number'] > 0 ? $i+1: "";
$v['abnormal_numbers'] = current($itemGroupArr[$v['picking_items_id']])['abnormal_number'];
}
return ['itemsArr'=>$itemsArr,'abnormalArr'=>$abnormalArr];
}
/*
* 取消异常
*/
public function cancelAbnormal($abnormal_id){
$abInfo = $this->where("abnormal_id",$abnormal_id)->first();
$abItems = $this
->select("i.sku_id","a.real_number")
->from("abnormal_items as a")
->join("purchase_items as i","a.picking_items_id","=","i.picking_items_id")
->where("a.abnormal_id",$abnormal_id)
->get()->toArray();
if ($abInfo['abnormal_type'] == 2){ //库内异常要回滚订单
#通知仓库订单撤销
//状态:-10已取消 -1草稿,1待审核,2审核通过,3审核驳回 4已完成
if ($abInfo['status'] == 2){ //审核通过,需要撤销订单
$cancel = (new PurToWmsModel())->CancelOrder($abnormal_id,2);
if(empty($cancel['entity'][0]['Status']) ){
jsonError("订单撤销失败".isset($cancel['entity'][0]['Message'])?$cancel['entity'][0]['Message']:'');
}
}
$unlockSku = array_column($abItems,'real_number','sku_id');
#基石回滚库存
$unlockRes = (new FoostoneModel())->unlockSku($abnormal_id,$unlockSku,1);
if ($unlockRes['errcode'] != 0) {
jsonError("基石回滚库存失败,order_id: $abnormal_id sku_json: ".json_encode($unlockSku)." return: ".$unlockRes['errmsg']);
}
}
$pan = $this->where("abnormal_id",$abnormal_id)->update(['status'=>-10]);
if (!$pan){
jsonError("更新状态失败");
}
jsonSucces("取消成功!");
}
}
\ No newline at end of file
<?php
namespace App\Model;
use DB;
use Illuminate\Database\Eloquent\Model;
//公共模型,存放一些公共配置
class CommonModel extends Model
{
//获取省市县
public function getRegionAll()
{
$provinces = array(); $citys = array(); $towns = array();
$list = DB::connection('order')->table('lie_region')->orderBy('region_id', 'asc')->get();
foreach (@$list as $val) {
if (!$val['parent_id']) continue;
switch ($val['region_type']) {
case 1:
$provinces[$val['parent_id']]['parent_id'] = $val['parent_id'];
$provinces[$val['parent_id']]['children'][] = $val;
break;
case 2:
$citys[$val['parent_id']]['parent_id'] = $val['parent_id'];
$citys[$val['parent_id']]['children'][] = $val;
break;
case 3:
$towns[$val['parent_id']]['parent_id'] = $val['parent_id'];
$towns[$val['parent_id']]['children'][] = $val;
break;
}
}
echo json_encode(array(
'errcode'=>0,
'errmsg'=>'success',
'provinces'=> $provinces,
'citys'=> $citys,
'towns'=> $towns
),true);
}
//获取省市县名称
public function getRegionName($region_id){
if (empty($region_id)){
return "";
}
$list = DB::connection('order')->table('lie_region')->select("region_name")->where("region_id",$region_id)->get();
return !$list ? "" : current($list)['region_name'];
}
}
<?php
namespace App\Model;
use Illuminate\Database\Eloquent\Model;
use Excel;
class ContractModel extends Model
{
protected $connection=false;
protected $table=false;
public $timestamps = false;
function CnContract($array,$Items){
$FileName='采购合同(编码'.$array['picking_sn'].')';
Excel::create($FileName, function ($excel) use ($array, $Items) {
$excel->sheet('采购合同', function ($sheet) use ($array, $Items) {
//设置宽度
$sheet->setWidth(array(
'A' => '8.11',
'B' => '9.56',
'C' => '8.11',
'D' => '8.11',
'E' => '8.11',
'F' => '8.11',
'G' => '7.11',
'H' => '9.11',
'I' => '16'
));
//设置页边距
$sheet->setPageMargin(array(
0.7, 0.7, 0.7, 0.7
));
$count=count($Items);
$Arr=Config('fixed.ExcelSet');
//处理位置
$ConfArr=$Arr['conf'];
foreach ($ConfArr as $k=>$v){
foreach ($v as $k1=>$v1){
foreach ($v1 as $k2=>$v2){
if(strpos($v2,'+')){
preg_match_all('/\d+/',$v2,$row);//截取行
$ConfArr[$k][$k1][$k2]=(int)$row[0][0]+(int)$count;//重新结算位置
}
}
}
}
foreach ($ConfArr as $k=>$v) {
foreach ($v as $k1=>$v1){
$sheet->mergeCells($k.$v1[0].':'.$v1[1].$v1[2]);
}
}
//填充数据
$ValuesArr=$Arr['values'];
foreach ($ValuesArr as $k=>$v){
foreach ($v as $k1=>$v1){
$value=$array[$v1[1]];
empty($v1[2]) || $value=$value[$v1[2]];
if(strpos($v1[0],'+')) {
preg_match_all('/\d+/', $v1[0], $row);//截取行
$rownum=(int)$row[0][0]+(int)$count;
$sheet->setCellValue($k.$rownum, $value);
}else{
$sheet->setCellValue($k.$v1[0], $value);
}
}
}
//处理详细得位置
for($i=15;$i<$count+16;$i++){
$sheet->mergeCells('B'.$i.':C'.$i);
}
//填充详细数据
$rownum=15;
$i=1;
foreach ($Items as $k=>$v){
$sheet->setCellValue('A'.$rownum, $i);
$sheet->setCellValue('B'.$rownum, $v['goods_name']);
$sheet->setCellValue('D'.$rownum, $v['brand_name']);
$sheet->setCellValue('E'.$rownum, $v['picking_number']);
$sheet->setCellValue('F'.$rownum, $v['batch_number']);
$sheet->setCellValue('G'.$rownum, $v['delivery_time']);
$sheet->setCellValue('H'.$rownum, $v['picking_price']);
$sheet->setCellValue('I'.$rownum, $v['picking_price']*$v['picking_number']);
$rownum++;
$i++;
}
//设置值
$ValueArr=$Arr['value'];
foreach ($ValueArr as $k=>$v){
if(strpos($k,'+')){
preg_match_all('/\d+/',$k,$row);//截取行
$column=substr($k,0,1);
$sheet->setCellValue($column.((int)$row[0][0]+(int)$count), $v);
}else{
$sheet->setCellValue($k, $v);
}
}
//设置居中
$sheet->getStyle('A4')->getAlignment()>setHorizontal(\PHPExcel_Style_Alignment::VERTICAL_CENTER)->setVertical(\PHPExcel_Style_Alignment::VERTICAL_CENTER);
$sheet->getStyle('C1')->getAlignment()->setHorizontal(\PHPExcel_Style_Alignment::VERTICAL_CENTER)->setVertical(\PHPExcel_Style_Alignment::VERTICAL_CENTER);
$sheet->getStyle('C2')->getAlignment()->setHorizontal(\PHPExcel_Style_Alignment::VERTICAL_CENTER)->setVertical(\PHPExcel_Style_Alignment::VERTICAL_CENTER);
$sheet->getStyle('A5')->getAlignment()->setHorizontal(\PHPExcel_Style_Alignment::HORIZONTAL_RIGHT)->setVertical(\PHPExcel_Style_Alignment::VERTICAL_CENTER);
//写入logo
$objDrawing = new \PHPExcel_Worksheet_Drawing;
$objDrawing->setPath(public_path('img/logo.png'));
$objDrawing->setCoordinates('A1');
$objDrawing->setHeight(75);
$objDrawing->setWidth(100);
$objDrawing->setOffsetX(10);
$objDrawing->setRotation(10);
$objDrawing->setWorksheet($sheet);
//设置边框
$sheet->getStyle('A2:I2')->getBorders()->getBottom()->setBorderStyle(\PHPExcel_Style_Border::BORDER_THIN);
$border=$Arr['border'];
foreach ($border as $k=>$v){
for ($i=$v[0];$i<$v[2]+1;$i++){
$sheet->getStyle($k.$i.':'.$v[1].$i)->getBorders()->getBottom()->setBorderStyle(\PHPExcel_Style_Border::BORDER_THIN);
}
}
$sheet->getStyle('A14:I'.(18+(int)$count))->getBorders()->getAllBorders()->setBorderStyle(\PHPExcel_Style_Border::BORDER_THIN);
//设置加粗
$bold=$Arr['bold'];
foreach ($bold as $k=>$v){
if(strpos($k,'+')) {
preg_match_all('/\d+/', $k, $row);//截取行
$column = substr($k, 0, 1);
$k=$column . ((int)$row[0][0] + (int)$count);
}
$sheet->getStyle($k)->getFont()->setBold(true);
}
//设置字号
$size=$Arr['size'];
foreach ($size as $k=>$v){
if(strpos($k,'+')) {
preg_match_all('/\d+/', $k, $row);//截取行
$column = substr($k, 0, 1);
$k=$column . ((int)$row[0][0] + (int)$count);
}
$sheet->getStyle($k)->getFont()->setSize($v);
}
//设置宽度
$sheet->setHeight(array(
1 => '33.9',
4 => '40.6',
21+(int)$count => '34.5',
23+(int)$count => '34.5',
28+(int)$count => '34.5',
29+(int)$count => '34.5',
30+(int)$count => '34.5',
));
//设置自动折行
$sheet->getStyle('A1:I'.(38+(int)$count))->getAlignment()->setWrapText(true);
});
})->download('xls');
}
}
<?php
namespace App\Model;
use Illuminate\Database\Eloquent\Model;
class DepartmentModel extends Model
{
protected $table='department';
public $timestamps = false;
public function ObtainDepartmentIDArr($DepartmentID=''){
if(empty($DepartmentID)) return false;
$Arr[]=$DepartmentID;
$result=$this->where('parent','=',$DepartmentID)->select('departmentId')->get();
if(!$result) return $Arr;
$result=$result->toArray();
foreach ($result as $k=>$v){
$Arr[]=$v['departmentId'];
}
return $Arr;
}
//获取部门信息
public function DepartmentInfo($DepartmentID=''){
if(empty($DepartmentID)) return false;
$result=$this->where('departmentId','=',$DepartmentID)->select('title','departmentId')->first();
if(!$result) return false;
return $result->toArray();
}
}
......@@ -2,16 +2,18 @@
namespace App\Model;
use ClassPreloader\Config;
use Illuminate\Database\Eloquent\Model;
use League\Flysystem\Exception;
use Request;
use DB;
class PurchaseNeedItemsModel extends Model
class SupplierAccountModel extends Model
{
protected $connection='web';
protected $table='purchase_need_items';
protected $connection='yunxin';
protected $table='log_login';
protected $primaryKey='id';
public $timestamps = false;
}
}
\ No newline at end of file
<?php
namespace App\Model;
use App\map\OperationLogMap;
use Illuminate\Database\Eloquent\Model;
use Request;
use DB;
class OperationLogModel extends Model
{
protected $connection='web';
protected $table='operation_log';
protected $primaryKey='operation_id';
public $timestamps = false;
//列表
public function getList($export=array())
{
$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 "p":
case "limit":
case "_url":
continue;
break;
default:
$query->whereRaw("FIND_IN_SET($k,'".trim($v,',')."') > 0");
break;
}
}
})->orderBy('operation_id','desc')->paginate($input['limit'], ['*'], 'p', $input['p'])->toArray();
if (!$list) return [20001, '没有数据'];
$UserModel = new UserModel();
foreach ($list['data'] as $k=>&$v){
$userName = $UserModel->FinduserInfoName($v['user_id']);
$v['user_id_name'] = $userName ? $userName : "";
$v['relevance_type_name'] = OperationLogMap::$relevance_type[$v['relevance_type']];
$v['operation_type_name'] = OperationLogMap::$operation_type[$v['operation_type']];
$v['create_time'] = date("Y-m-d H:i:s",$v['create_time']);
}
return [0, '成功', $list['data'], $list['total']];
}
/*
* 插入操作日志
*@param `operation_type` '操作类型:1添加,2删除,3修改,4审核通过,5审核驳回,6导出',
*@param `relevance_type` '关联单据的类型或者模块: 参考 OperationLogMap
*@param `relevance_id` '关联ID',
*@param `relevance_sn` '关联单号',
*@param `content` '内容',
*@param `user_id` '操作人',
* @param `extend1` '扩展字段1',
*/
static function log($user_id,$operation_type=0,$relevance_type="",$relevance_id=0,$relevance_sn="",$content="",$extend1 = ""){
$data['operation_type'] = $operation_type ;
$data['relevance_type'] = $relevance_type;
$data['relevance_id'] =$relevance_id ;
$data['relevance_sn'] = $relevance_sn;
$data['content'] = is_array($content) ? json_encode($content,JSON_UNESCAPED_UNICODE) : $content;
$data['user_id'] = $user_id;
$data['extend1'] = is_array($extend1) ? json_encode($extend1,JSON_UNESCAPED_UNICODE) : $extend1;
$data['create_time'] = time();
return self::insert($data);
}
}
\ No newline at end of file
<?php
namespace App\Model;
use Illuminate\Database\Eloquent\Model;
class OrganizationModel extends Model
{
protected $table='organization';
public $timestamps = false;
//获取部门所有成员ID
public function ObtainDepartment($DepartmentID=''){
if(empty($DepartmentID)) return false;
$OrganizationModel=new DepartmentModel();
$DepartmentIDArr=$OrganizationModel->ObtainDepartmentIDArr($DepartmentID);
$result=$this->whereIn('departmentId',$DepartmentIDArr)->select('userId')->get();
if(!$result) return false;
$result=$result->toarray();
$Arr=[];
foreach ($result as $k=>$v){
$Arr[]=$v['userId'];
}
return $Arr;
}
public function FindUserdepartment($UserID=''){
if(empty($UserID)) return false;
$result=$this->where('userId','=',$UserID)->select('departmentId')->first();
if(!$result) return false;
$result=$result->toArray();
$DepartmentModel=new DepartmentModel();
return $DepartmentModel->DepartmentInfo($result['departmentId']);
}
}
<?php
namespace App\Model;
use Illuminate\Database\Eloquent\Model;
class PackingModel extends Model
{
protected $connection='web';
protected $table='packing';
protected $primaryKey = 'packing_id';
public $timestamps = false;
public function PackingList($status=1){
$map['status']=$status;
return $this->where($map)->lists('packing_name','packing_id')->toArray();
}
}
<?php
namespace App\Model;
use App\Jobs\AddAbnormal;
use App\Jobs\PushFinancePeriod;
use App\map\PreSaleOrderMap;
use ClassPreloader\Config;
use Illuminate\Database\Eloquent\Model;
use League\Flysystem\Exception;
use Request;
use DB;
class PreSaleOrderModel extends Model
{
protected $connection='web';
protected $table='pre_sale_order';
protected $primaryKey = 'id';
public $timestamps = false;
//列表
public function getList()
{
$arr = ['p', 'limit', 'start_time','end_time','sku_id','order_sn'];
$input = Request::only($arr);
$input=TrimX($input,true,$arr);
//查询数据
$list = $this->where(function ($query) use ($input) {
foreach ($input as $k => $v){
$v = trim($v);
switch ($k){
case "p":
case "limit":
continue;
break;
case "start_time":
$query->where('create_time', '>=', strtotime($v));
break;
case "end_time":
$query->where('create_time', '>=', strtotime($v));
break;
default:
$query->whereRaw("FIND_IN_SET($k,'".trim($v,',')."') > 0");
break;
}
}
});
$result = $list->orderBy('create_time','desc')->paginate($input['limit'], ['*'], 'p', $input['p'])->toArray();
if(!$result) return [20001,'没有数据'];
//查询包装单位
$packing = (new PackingModel())->get()->toArray();
$packingArr = array_column($packing ,null ,'packing_id');
if ($result['data']) {
foreach ($result['data'] as $k => &$v) {
$v['type'] = '订单';
$v['status'] = PreSaleOrderMap::$status[$v['status']];
$v['create_time'] = timeToDate($v['create_time']);
$v['deal_time'] = timeToDate($v['deal_time']);
$v['update_time'] = timeToDate($v['update_time']);
$v['goods_info'] = $v['goods_name'].'€€'.@$packingArr[$v['packing_id']]['packing_name'].'€€'.$v['encap'].'€€'.$v['mpq'];
$v['buy_price'] = sprintf('%.3f',$v['buy_price']/1.16);
$v['picking_type'] = $v['picking_type'] == 1 ? "自采": "寄售";
}
}
return [0, '成功', $result['data'], $result['total']];
}
/*
* 批量插入
* @param array $data =[
[
"order_sn"=>'1323336', // 订单号
"rec_id"=>"56489", //订单商品明细id
"sku_id"=>"10258", //商品id
"goods_name" =>"Rc04", //型号
"encap"=>"1", //封装.规格
"packing_name"=>"盒", //包装方式
"mpq"=>"1", //mpq
"need_number"=>456, //需求数量
"buy_price"=>"10.54", //购买价格
"brand_name"=>"YAGEO",//制造商
"brand_id"=>"5148",//制造商ID
"supplier_id"=>"10010" //供应商id
]
];
*/
public function bultInsert($data){
OperationLogModel::log(0,1,'pre_sale_order_add_get',0,0,$data,"获取到请求数据"); //日志
//接收数据
$param = ['order_sn','rec_id','sku_id','goods_name','encap','packing_name','mpq','need_number','buy_price','supplier_id'];
$nowTime = time();
//查询包装单位
$packing = (new PackingModel())->get()->toArray();
$packingArr = array_column($packing ,null ,'packing_name');
$temp = [];
$SupplierChannelModel = new SupplierChannelModel();
foreach ($data as $k=>&$v){
if (!checkRequire($v,$param)){
OperationLogModel::log(0,1,'pre_sale_order_add_error',0,0,$data,"超售error:缺少参数".checkRequire($v,$param,2)); //日志
return [10004,'缺少参数'.checkRequire($v,$param,2)];
}
if ($v['packing_name'] !== ""){ //如果存在包装
$packing_id = $packingArr[$v['packing_name']]['packing_id'];
}else{
$packing_id = 0;
}
$supplier_id = $supplier_code = $supplier_name = "";
$salesname_id = 0;
if($v['supplier_id'] == 10000){ //自采
$purchaseInfo = $this
->from("purchase as t")
->select(DB::Raw("lie_t.supplier_id,lie_t.supplier_code,lie_t.supplier_name,lie_t.create_uid"))
->join('purchase_items as i', 't.picking_id', '=', 'i.picking_id')
->where("i.sku_id",$v['sku_id'])
->orderBy("i.picking_id","desc")
->first();
if ($purchaseInfo){
$supplier_id = $purchaseInfo['supplier_id']; //最新供应商
$supplier_code = $purchaseInfo['supplier_code'];
$supplier_name = $purchaseInfo['supplier_name'];
$salesname_id = $purchaseInfo['create_uid'] ;
}
}else{
$supplierObj = $SupplierChannelModel->where("supplier_id",$v['supplier_id'])->first();
$v['supplier_type'] = "寄售";
$v['supplier_code'] = $supplierObj['supplier_code'];
$v['supplier_name'] = $supplierObj['supplier_name'];
$purchaseInfo = $this
->select(DB::Raw("lie_t.supplier_code,lie_t.supplier_name,lie_t.create_uid"))
->from("purchase as t")
->join('purchase_items as i', 't.picking_id', '=', 'i.picking_id')
->where("t.supplier_id",$v['supplier_id'])
->orderBy("i.picking_id","desc")
->first();
if ($purchaseInfo){
$supplier_code = $purchaseInfo['supplier_code'];
$supplier_name = $purchaseInfo['supplier_name'];
$salesname_id = $purchaseInfo['create_uid'] ;
}
}
array_push($temp,[
'picking_type'=>$v['supplier_id'] == 10000 ? 1:2,
'supplier_id'=>$supplier_id == "" ? $v['supplier_id'] : $supplier_id,
'supplier_code'=>$supplier_code,
'supplier_name'=>$supplier_name,
'salesman_id'=>$salesname_id,
'order_sn'=>$v['order_sn'],
'rec_id'=>$v['rec_id'],
'sku_id'=>$v['sku_id'],
'goods_name'=>$v['goods_name'],
'encap'=>$v['encap'],
'packing_id'=>$packing_id,
'mpq'=>$v['mpq'],
'need_number'=>$v['need_number'],
'buy_price'=>$v['buy_price'],
'create_time'=>$nowTime,
'deal_time'=>$nowTime,
'update_time'=>$nowTime,
'brand_id'=>$v['brand_id'],
'brand_name'=>$v['brand_name'],
]);
}
// print_r($temp);
// die();
//检测数据
$recIdArr = arrayToCommaStr($temp,'rec_id',1);
$find = $this->whereIn('rec_id',$recIdArr)->count();
if ($find > 0){
return [10001, '系统已经存在商品明细ID'];
}
try{
$con = DB::connection('web');
$con->beginTransaction();
$this->insert($temp);; //批量插入
OperationLogModel::log(0,1,'pre_sale_order_add_success',0,0,$temp,"批量插入超售订单明细数据成功"); //日志
$con->commit();
return [0, '成功'];
}catch (\Exception $e) {
$con->rollBack();
OperationLogModel::log(0,1,'pre_sale_order_add_error',0,0,$e->getMessage(),"批量插入超售订单明细数据失败"); //日志
return [10002, '失败'.$e->getMessage()];
}
}
/*
* 批量更新超售订单数据状态
* @param array $data = [
[
"rec_id"=>"1231", //订单商品明细id
"status" =>"1", //状态:-1已取消 1 处理中 2已处理 3已发货 4部分发货
"deal_time"=>"1526633313", //更新时间
]
];
*/
public function updateStatus($data){
//接收数据
$param = ['rec_id','status','deal_time'];
foreach ($data as $k=>$v){
if (!checkRequire($v,$param)){
OperationLogModel::log(0,1,'pre_sale_order_update_error',0,0,$data,"批量更新超售订单明细数据:缺少参数".checkRequire($v,$param,2)); //日志
return [10004,'缺少参数'.checkRequire($v,$param,2)];
}
}
try{
$con = DB::connection('web');
$con->beginTransaction();
foreach ($data as $a=>$b){
if (in_array($b['status'],PreSaleOrderMap::$statusAll)){
$this->where('rec_id',$b['rec_id'])->update(['status'=>$b['status'],'deal_time'=>$b['deal_time'],'update_time'=>time()]);
}else{
throw new Exception("更新状态不正确");
}
}
OperationLogModel::log(0,1,'pre_sale_order_update_success',0,0,"批量更新超售订单明细数据成功",$data); //日志
$con->commit();
return [0, '成功'];
}catch (\Exception $e) {
$con->rollBack();
OperationLogModel::log(0,1,'pre_sale_order_update_error',0,0,"批量更新超售订单明细数据失败",$data); //日志
return [10002, '失败:'.$e->getMessage()];
}
}
}
\ No newline at end of file
<?php
namespace App\Model;
use Illuminate\Database\Eloquent\Model;
class PurDeliveryItemsModel extends Model
{
protected $connection='web';
protected $table='purchase_delivery_items';
public $timestamps = false;
public function BatchADD($data){
return $this->insert($data);
}
public function FindSkuNum($PickingItemsID){
if(!$PickingItemsID) return false;
$list=$this->where('purchase_delivery_items.picking_items_id',$PickingItemsID)->join('purchase_delivery',function($join){
$join->on('purchase_delivery_items.delivery_id','=','purchase_delivery.delivery_id')->where('status','<>',-1);
})->sum('purchase_delivery_items.shipping_number');
return $list;
}
}
<?php
namespace App\Model;
use Illuminate\Database\Eloquent\Model;
use Sn;
class PurDeliveryModel extends Model
{
protected $connection='web';
protected $table='purchase_delivery';
public $timestamps = false;
//查询来料通知ID
public function getDeliveryId($deliverySn){
$Find=$this->where('delivery_sn','=',$deliverySn)->select('delivery_sn')->first();
if(!$Find) return '';
return $Find['delivery_id'];
}
}
<?php
namespace App\Model;
use Illuminate\Database\Eloquent\Model;
use DB;
class PurchaseAgentModel extends Model
{
protected $connection='web';
protected $table='purchasing_agent';
public $timestamps = false;
}
<?php
namespace App\Model;
use Illuminate\Database\Eloquent\Model;
use Request;
use DB;
class PurchaseDeliveryItemsModel extends Model
{
protected $connection='web';
protected $table='purchase_delivery_items';
public $timestamps = false;
public function ApiPurchaseDeliveryItemsList(){
$collert=Request::only('delivery_id','p','limit');
$limit=!empty($collert['limit'])?$collert['limit']:10;
$p=!empty($collert['p'])?$collert['p']:1;
$collert=TrimX($collert,true,['delivery_id']);
if(empty($collert['delivery_id'])) return [10001,'请添加','',''];
//查数据
$list=$this->where('delivery_id','=',$collert['delivery_id'])->paginate($limit,['*'],'p',$p)->toArray();
if(!$list && !empty($list['data']) && count($list['data'])>0) return [30001,'请添加','',''];
//取出包装方式
$PackingModel = new PackingModel();
$PackList = $PackingModel->PackingList();
//取出来料通知单信息
$PurchaseDeliveryModel = new PurchaseDeliveryModel();
$PurchaseDeliveryInfo = $PurchaseDeliveryModel->GetPurchaseDeliveryByID($collert['delivery_id']);
$Currency = Config('fixed.Currency');
//整理数据
foreach ($list['data'] as $k => $v){
$list['data'][$k]['currency'] = $Currency[$PurchaseDeliveryInfo['currency']];
$list['data'][$k]['delivery_sn'] = $PurchaseDeliveryInfo['delivery_sn'];
$list['data'][$k]['shipping_sn'] = $PurchaseDeliveryInfo['shipping_sn'];
$list['data'][$k]['number_diff'] = intval($list['data'][$k]['shipping_number']) - intval($list['data'][$k]['putaway_number']);
$list['data'][$k]['packing_name'] = @$PackList[$list['data'][$k]['packing_id']];
$list['data'][$k]['price_amount'] = round($list['data'][$k]['shipping_number'] * $list['data'][$k]['picking_price'],4);
}
return [0,'成功',$list['data'],$list['total']];
}
// 导出
public function export()
{
$picking_id = Request::input('picking_id');
$result = $this->where('picking_id','=',$picking_id)->get()->toArray();
if (!$result) return ['errcode' => 20001, 'errmsg' => '没有数据'];
//取出包装方式
$PackingModel = new PackingModel();
$PackList = $PackingModel->PackingList();
//整理数据
$PurchaseDeliveryModel = new PurchaseDeliveryModel();
$Currency = Config('fixed.Currency');
$temp = array();
// CSV写入数据
foreach ($result as $k => $v) {
$PurchaseDeliveryInfo = $PurchaseDeliveryModel->GetPurchaseDeliveryByID($v['delivery_id']);
$temp[$k]['count'] = $k + 1;
$temp[$k]['delivery_sn'] = $PurchaseDeliveryInfo['delivery_sn']."\t"; // 来料通知单号(防止科学计数法展示)
$temp[$k]['shipping_sn'] = $PurchaseDeliveryInfo['shipping_sn'];
$temp[$k]['picking_sn'] = $v['picking_sn'];
$temp[$k]['goods_name'] = $v['goods_name'];
$temp[$k]['packing_name'] = $PackList[$v['packing_id']];
$temp[$k]['brand_name'] = $v['brand_name'];
$temp[$k]['picking_price'] = $v['picking_price'];
$temp[$k]['currency'] = $Currency[$PurchaseDeliveryInfo['currency']];
$temp[$k]['price_amount'] = intval($v['putaway_number']) * $v['picking_price'];
$temp[$k]['shipping_number'] = $v['shipping_number'];
$temp[$k]['putaway_number'] = $v['putaway_number'];
$temp[$k]['number_diff'] = intval($v['shipping_number']) - intval($v['putaway_number']);
}
$column = array('序号', '来料通知单号', '客户单号', '采购单号', '产品型号', '包装方式', '制造商', '单价', '币种', '金额', '计划数量', '收货数量', '差异数量'); // 表头
$fileName = '发货物流导出'.date('YmdHis', time()).'.csv';
export_csv($temp, $column, $fileName);
}
public function GetPurchaseDeliveryItemsListByPickingID(){
$collert=Request::only('picking_id','p','limit');
$limit=!empty($collert['limit'])?$collert['limit']:10;
$p=!empty($collert['p'])?$collert['p']:1;
$collert=TrimX($collert,true,['picking_id']);
if(empty($collert['picking_id'])) return [10001,'请添加picking_id','',''];
//查数据
$list=$this->where('picking_id','=',$collert['picking_id'])->paginate($limit,['*'],'p',$p)->toArray();
if(!$list && !empty($list['data']) && count($list['data'])>0) return [30001,'暂无数据','',''];
//取出包装方式
$PackingModel = new PackingModel();
$PackList = $PackingModel->PackingList();
//取出来料通知单信息
$PurchaseDeliveryModel = new PurchaseDeliveryModel();
$Currency = Config('fixed.Currency');
//整理数据
foreach ($list['data'] as $k => $v){
$PurchaseDeliveryInfo = $PurchaseDeliveryModel->GetPurchaseDeliveryByID($list['data'][$k]['delivery_id']);
$list['data'][$k]['currency'] = $Currency[$PurchaseDeliveryInfo['currency']];
$list['data'][$k]['delivery_sn'] = $PurchaseDeliveryInfo['delivery_sn'];
$list['data'][$k]['shipping_sn'] = $PurchaseDeliveryInfo['shipping_sn'];
$list['data'][$k]['number_diff'] = intval($list['data'][$k]['shipping_number']) - intval($list['data'][$k]['putaway_number']);
$list['data'][$k]['packing_name'] = $PackList[$list['data'][$k]['packing_id']];
$list['data'][$k]['price_amount'] = intval($list['data'][$k]['putaway_number']) * $list['data'][$k]['picking_price'];
}
return [0,'成功',$list['data'],$list['total']];
}
public function ItemsList($delivery_id='',$delivery_sn=''){
if(!$delivery_id || !$delivery_sn) return false;
$list=$this->where('delivery_id','=',$delivery_id)->select('delivery_items_id','sku_id','picking_price','shipping_number','picking_sn')->get();
if(!$list) return false;
$list=$list->toArray();
foreach ($list as $k=>$v){
unset($list[$k]);
$list[$k]['delivery_sn']=$delivery_sn;
$list[$k]['delivery_items_id']=$v['delivery_items_id'];
$list[$k]['goods_id']=$v['sku_id'];
$list[$k]['picking_price']=$v['picking_price'];
$list[$k]['shipping_number']=$v['shipping_number'];
$list[$k]['purchase_sn']=$v['picking_sn'];
}
return $list;
}
public function OBItemsList($ArrID){
$Arr=['delivery_items_id','delivery_id','picking_id','picking_items_id','picking_sn','sku_id','goods_name','brand_id','brand_name','packing_id','picking_price','initial_price','shipping_number'];
$result=$this->whereIn('delivery_items_id',$ArrID)->select($Arr)->get();
if(!$result) return false;
return $result->toArray();
}
public function SavePutawayNumber($delivery_items_id,$num){
if(!$delivery_items_id && !$num>0) return false;
$result=$this->where('delivery_items_id','=',$delivery_items_id)->increment('putaway_number',$num);
if(!$result) return false;
return $result;
}
}
<?php
namespace App\Model;
use Illuminate\Database\Eloquent\Model;
use DB;
//发票明细模型
class PurchaseInvoiceItemsModel extends Model
{
protected $connection='web';
protected $table='purchase_invoice_items';
public $timestamps = false;
/*
* 获取详情
*/
public function getDetail($input){
return $this->where("invoice_id",$input['invoice_id'])->paginate($input['limit'], ['*'], 'p', $input['p'])->toArray();
}
}
<?php
namespace App\Model;
use Illuminate\Database\Eloquent\Model;
use DB;
//发票明细模型
class PurchaseInvoicePutawayModel extends Model
{
protected $connection='web';
protected $table='purchase_invoice_putaway';
public $timestamps = false;
/*
* 获取添加发票明细详情
* @param str $putaway_ids 入库单,多个逗号分割
* @param int $type 1为完全开票 2 部分开票
* @return array
*/
public function getAddList($putaway_ids,$type){
if ($type == 'all'){ //完全开票
$putawayInfo = $this
->from("putaway as t")
->select(DB::Raw("lie_t.putaway_id,lie_t.putaway_sn,lie_i.picking_sn,lie_t.putaway_number as total_number,
SUM(lie_i.picking_price*lie_i.putaway_number*lie_i.exchange_rate) total_price"))
->join('putaway_items as i', 't.putaway_id', '=', 'i.putaway_id')
->whereIn("t.putaway_id",explode(',',$putaway_ids))
->groupBy('t.putaway_id')
->get();
if (!$putawayInfo){
return false;
}else{
return $putawayInfo->toArray();
}
}else{ //部分开票
$putawayInfo = $this
->from("putaway as t")
->join('putaway_items as i', 't.putaway_id', '=', 'i.putaway_id')
->join('purchase as p', 'p.picking_id', '=', 'i.picking_id')
->whereIn("t.putaway_id",explode(',',$putaway_ids))
->get();
if (!$putawayInfo){
return false;
}else{
$res = $putawayInfo->toArray();
//取出包装方式
$PackingModel = new PackingModel();
$PackList = $PackingModel->PackingList();
$PurchaseInvoiceModel = new PurchaseInvoiceModel();
foreach ($res as $k=>&$v){
$v['picking_price'] = $v['picking_price']*$v['exchange_rate'];
$v['packing_name']= @$PackList[$v['packing_id']];
$v['use_number'] = $v['putaway_number']-$PurchaseInvoiceModel->getTotalInvoiceNumber($v['putaway_id'],$v['putaway_items_id'],2);
$v['total_number'] = $v['putaway_number'] ;
$v['total_price'] = $v['picking_price']*$v['putaway_number'];
}
return $res;
}
}
}
/*
* 获取入库单详情
* 序 入库单号 采购单号 入库单数量 入库单金额 本次开票数量 本次开票金额
*/
public function getDetail($input){
$invoiceId = $input['invoice_id'];
$invoiceRes = (new PurchaseInvoiceModel())->where("invoice_id",$invoiceId)->first();
if($invoiceRes['invoice_type'] == 1){ //如果是完全开票
$putawayInfo = $this
->from("purchase_invoice_putaway as t")
->select(DB::Raw("
lie_t.picking_sn,
lie_t.putaway_sn,
lie_a.putaway_number,
sum(
lie_i.picking_price * lie_i.putaway_number * lie_i.exchange_rate
) as total_price,
lie_a.putaway_number as applying_number
"))
->join('putaway_items as i', 't.putaway_id', '=', 'i.putaway_id')
->join('putaway as a', 'a.putaway_id', '=', 't.putaway_id')
->where("t.invoice_id",$input['invoice_id'])
->groupBy('a.putaway_id')
->paginate($input['limit'], ['*'], 'p', $input['p'])
->toArray();
}else{ //部分开票
$putawayInfo = $this
->from("purchase_invoice_putaway as t")
->select(DB::Raw("
lie_t.picking_sn,
lie_t.putaway_sn,
lie_a.putaway_number,
(
lie_i.picking_price * lie_a.putaway_number * lie_i.exchange_rate
) as total_price,
sum(lie_t.applying_number) as applying_number,
SUM(
lie_i.picking_price * lie_t.applying_number * lie_i.exchange_rate
) as applying_price
"))
->join('putaway_items as i', 't.putaway_items_id', '=', 'i.putaway_items_id')
->join('putaway as a', 'a.putaway_id', '=', 't.putaway_id')
->where("t.invoice_id",$input['invoice_id'])
->groupBy('t.putaway_id')
->paginate($input['limit'], ['*'], 'p', $input['p'])
->toArray();
}
foreach ($putawayInfo['data'] as $k=>&$v){
$v['k'] = $k+1;
$v['applying_price'] = $invoiceRes['invoice_type'] == 1 ? $v['total_price'] : $v['applying_price'];
}
return $putawayInfo;
}
}
<?php
namespace App\Model;
use Illuminate\Database\Eloquent\Model;
class PurchasingAgentModel extends Model
{
protected $connection='web';
protected $table='purchasing_agent';
public $timestamps = false;
public function PurchasingAgentList($status='',$map=[]){
empty($status) || $map['status']=$status;
$list=$this->where($map)->get();
return $list->toArray();
}
public function PurchasingAgentInfo($agent_id=''){
if(empty($agent_id)) return false;
$result=$this->where('agent_id','=',$agent_id)->first();
if(!$result) return false;
return $result->toArray();
}
}
<?php
namespace App\Model;
use Illuminate\Database\Eloquent\Model;
use Request;
use DB;
class PutawayItemsModel extends Model
{
protected $connection='web';
protected $table='putaway_items';
public $timestamps = false;
//获取入库详情
public function getPutawayItemsDetail()
{
$collert=Request::only('picking_id','p','limit');
$limit=!empty($collert['limit'])?$collert['limit']:10;
$p=!empty($collert['p'])?$collert['p']:1;
$collert=TrimX($collert,true,['picking_id']);
if(empty($collert['picking_id'])) return [10001,'请添加picking_id','',''];
//查数据
$PutawayModel = new PutawayModel();
$list = $PutawayModel->getPutawayDetails($collert['picking_id']);
return [0,'成功',$list['2'],$list['3']];
}
public function HoldPutawayItems($data){
return $this->insert($data);
}
}
\ No newline at end of file
<?php
namespace App\Model;
use Illuminate\Database\Eloquent\Model;
use Request;
use App\Jobs\Queue;
use PhpAmqpLib\Connection\AMQPStreamConnection;
use PhpAmqpLib\Message\AMQPMessage;
class QueuedModel extends Model
{
public function __construct()
{
parent::__construct();
$this->connection=new AMQPStreamConnection(env('RABBITMQ_HOST'), env('RABBITMQ_PORT'), env('RABBITMQ_LOGIN'), env('RABBITMQ_PASSWORD'), env('RABBITMQ_VHOST')); // 创建连接;
$this->queue_name = env('RABBITMQ_QUEUE');
}
public function pushAmq($content='')
{
$connection = $this->connection;
$channel = $connection->channel();
$channel->queue_declare($this->queue_name, true, true, false, false);
$message = new AMQPMessage($content);
$result=$channel->basic_publish($message, '', $this->queue_name); // 推送消息
$channel->close();
$connection->close();
return true;
}
public function pullAmq($queue_name='')
{
// $queue_name = 'test';
$connection = $this->connection;
$channel = $connection->channel();
$message = $channel->basic_get($queue_name); // 取出消息
echo '<pre>';
print_r($message);
$channel->basic_ack($message->delivery_info['delivery_tag']); // 确认取出消息后会发送一个ack来确认取出来了,然后会从rabbitmq中将这个消息移除,如果删掉这段代码,会发现rabbitmq中的消息还是没有减少
$channel->close();
$connection->close();
}
}
\ No newline at end of file
<?php
namespace App\Model\Report;
use App\Model\PackingModel;
use App\Model\PurchaseModel;
use Request;
use DB;
class ReportPriceTrendModel
{
protected $connection='web';
/*
* 商品价格走势
*/
public function skuReport(){
$arr = ['create_time1','create_time2','supplier_name','supplier_code','sku_id'];
$input = Request::only($arr);
$input=TrimX($input,true,$arr);
if (empty($input['sku_id'])){
return [10001,'sku_id不得为空'];
}
$where = " And i.sku_id = ".$input['sku_id']." ";
if (!empty($input['create_time1']) && !empty($input['create_time2'])){
$where .= " AND p.create_time >= ".strtotime($input['create_time1'])." AND p.create_time <= ".strtotime($input['create_time2'])." ";
}
if (!empty($input['supplier_name'])){
$where .= " and p.supplier_name like '".$input['supplier_name']."%'";
}
if (!empty($input['supplier_code'])){
$where .= " and p.supplier_code in (".$input['supplier_code'].")";
}
$sql = "SELECT
i.sku_id,
i.picking_price,
p.exchange_rate,
i.picking_price*p.exchange_rate as picking_price,
p.create_time
FROM
lie_purchase p,
lie_purchase_items i
WHERE
p.picking_id = i.picking_id
AND p.status not in (-10,-1,-2)
AND i.status =1
$where
ORDER BY p.create_time;";
// echo $sql;
// die();
$list=DB::connection($this->connection)->select($sql);
if(!count($list)) return [10002,'没有数据'];
foreach ($list as $k=>$v){
$list[$k]['create_time']=date('y/m/d',$v['create_time']);
}
$data['list'] = $list;
//$data['list'] = remove_duplicate($list,'create_time'); //去重
return [0,'成功',$data];
}
/*
* 供应商价格走势
*/
public function supplierReport(){
$arr = ['create_time1','create_time2','supplier_name','supplier_code'];
$input = Request::only($arr);
$input=TrimX($input,true,$arr);
if (empty($input['supplier_name']) && empty($input['supplier_code'])){
return [10001,'供应商名称或供应商编码不得为空'];
}
if (!empty($input['create_time1']) && !empty($input['create_time2'])){
$where = " AND p.create_time >= ".strtotime($input['create_time1'])." AND p.create_time <= ".strtotime($input['create_time2'])." ";
}
if (!empty($input['supplier_name'])){
$where .= " and p.supplier_name like '".$input['supplier_name']."%'";
}
if (!empty($input['supplier_code'])){
$where .= " and FIND_IN_SET(p.supplier_code,'".trim($input['supplier_code'],',')."') > 0 ";
}
//数据列表
$sql1 = "SELECT
sum(i.picking_price*p.exchange_rate*i.picking_number) as sum_picking_price,
sum(i.picking_number) as sum_picking_number,
FROM_UNIXTIME(p.create_time,'%Y-%m-%d') as create_time
FROM
lie_purchase p,
lie_purchase_items i
WHERE
p.picking_id = i.picking_id
AND p.status not in (-10,-1,-2)
AND i.status =1
$where
GROUP BY p.supplier_code,FROM_UNIXTIME(p.create_time,'%Y-%m-%d')
ORDER BY p.create_time;";
$list=DB::connection($this->connection)->select($sql1);
if(!count($list)) return [10002,'没有数据'];
foreach ($list as $k=>&$v){
$v['use_price']=round($v['sum_picking_price']/$v['sum_picking_number'],6);
}
$data['list'] = $list;
return [0,'成功',$data];
}
}
\ No newline at end of file
<?php
namespace App\Model\Report;
use App\Model\PackingModel;
use App\Model\PurchaseModel;
use Request;
use DB;
class ReportSkuModel
{
protected $connection='web';
/*统计数据,按skuid分组计算
*
skuid
分类
型号
品牌
包装/方式
封装
MPQ
采购次数
采购最低价
采购最高价
采购均价(加权平均价就是:sum(单次采购金额*数量)/总采购数量)
采购数量
采购总价
采购在途数量 * 采购在途(下单数量-入库数量-已审核异常的不补发数量)
采购在途金额
送货在途数量 * 送货在途(发货数量-入库数量-已审核异常的不补发数量-已审核异常的补发数量)
送货在途金额
入库数量
入库金额
*/
public function main($type = 1)
{
$arr = ['p','limit','sku_id','supplier_code','supplier_name'];
$input=TrimX(Request::all(),true,$arr);
$PurchaseModel = new PurchaseModel();
//查询数据
$list = $PurchaseModel
->select(DB::Raw("lie_i.sku_id,
lie_i.goods_name, -- 型号
lie_i.brand_id, -- 品牌id
lie_i.brand_name, -- 品牌名
lie_i.encap, -- 封装/规格
lie_i.mpq, -- mpq
lie_i.packing_id, -- 包装
count(1) as sum_pur_number , -- 采购次数
SUM(lie_i.picking_number) as sum_picking_number, -- 采购数量总数
MAX(lie_i.picking_price) as max_picking_price , -- 最高采购价格
MIN(lie_i.picking_price) as min_picking_price, -- 最低采购价格
SUM(lie_i.picking_price*lie_p.exchange_rate*lie_i.picking_number) as sum_pur_price, -- 采购总价
SUM(lie_i.shipping_number) as sum_shipping_number, -- 发货总数量
SUM(lie_i.putaway_number) as sum_putaway_number, -- 入库总数量
SUM(lie_i.picking_price*lie_p.exchange_rate*lie_i.putaway_number) as sum_putaway_price, -- 入库金额
SUM(lie_i.picking_number) as sum_picking_number,
SUM(lie_i.putaway_number) as sum_putaway_number,
SUM(lie_i.noshipping_number) as sum_noshipping_number,
SUM(lie_i.reshipping_number) as sum_reshipping_number,
SUM(lie_i.picking_price*lie_p.exchange_rate*lie_i.picking_number) as price_picking_number,
SUM(lie_i.picking_price*lie_p.exchange_rate*lie_i.putaway_number) as price_putaway_number,
SUM(lie_i.picking_price*lie_p.exchange_rate*lie_i.noshipping_number) as price_noshipping_number,
SUM(lie_i.picking_price*lie_p.exchange_rate*lie_i.reshipping_number) as price_reshipping_number
"))
->from("purchase as p")
->join('purchase_items as i', 'p.picking_id', '=', 'i.picking_id')
->whereNotIn("p.status",[-10,-2,-1])
->where("i.status",1)
->where(function ($query) use ($input) {
foreach ($input as $k => $v){
$v = trim($v);
if (empty($v)){
continue;
}
switch ($k){
case "p":
case "limit":
continue;
break;
case 'supplier_name':
$query->where('p.supplier_name','like',$v);
break;
case "supplier_code":
$query->whereIn('p.supplier_code',explode(',',$v));
break;
case "sku_id":
$query->where('i.sku_id','like',$v);
break;
}
}
})
->groupBy("sku_id")
->orderBy('i.picking_items_id','asc');
if ($type == 1){
$list = $list->paginate($input['limit'], ['*'], 'p', $input['p'])->toArray();
if (!$list) return [20001, '没有数据'];
return [0, '成功', $this->clearData($list['data']), $list['total']];
}else{
$list = $list->get();
if (!$list) return false;
return $this->clearData($list->toArray());
}
}
//清理数据
private function clearData($data){
$packingInfo = (new PackingModel())->PackingList();
foreach ($data as $k=>&$v){
$v['packing_name'] = @$packingInfo[$v['packing_id']];
$running_number = $v['sum_picking_number']-$v['sum_putaway_number']-$v['sum_noshipping_number']; //采购在途数量
$sum_running_price = $v['price_picking_number']-$v['price_putaway_number']-$v['price_noshipping_number'];//采购在途金额
$send_number = $v['sum_picking_number']-$v['sum_putaway_number']-$v['sum_noshipping_number']-$v['sum_noshipping_number']; //送货在途数量
$sum_send_price = $v['price_picking_number']-$v['price_putaway_number']-$v['price_noshipping_number']-$v['price_noshipping_number'];//送货在途金额
$v['running_number'] = $running_number > 0 ? $running_number : 0;
$v['sum_running_price'] = $sum_running_price > 0 ? $sum_running_price : 0;
$v['send_number'] = $send_number > 0 ? $send_number : 0;
$v['sum_send_price'] = $sum_send_price > 0 ? $sum_send_price : 0;
}
return $data;
}
// 导出
public function export()
{
$result = $this->main(2);
if (!$result) return ['errcode' => 20001, 'errmsg' => '没有数据'];
$column = array('sku_id','型号','品牌id','品牌名','封装','mpq','包装','采购次数','采购数量总数','最高采购价格','最低采购价格','采购总价','发货总数量','入库总数量','入库总金额','采购在途数量','采购在途金额','送货在途数量','送货在途金额'); // 表头
$temp = [];
foreach ($result as $k=>$v){
array_push($temp,[
'sku_id'=>$v['sku_id'],
'goods_name'=>$v['goods_name'],
'brand_id'=>$v['brand_id'],
'brand_name'=>$v['brand_name'],
'encap'=>$v['encap'],
'mpq'=>$v['mpq'],
'packing_name'=>$v['packing_name'],
'sum_pur_number'=>$v['sum_pur_number'],
'sum_picking_number'=>$v['sum_picking_number'],
'max_picking_price'=>$v['max_picking_price'],
'min_picking_price'=>$v['min_picking_price'],
'sum_pur_price'=>$v['sum_pur_price'],
'sum_shipping_number'=>$v['sum_shipping_number'],
'sum_putaway_number'=>$v['sum_putaway_number'],
'sum_putaway_price'=>$v['sum_putaway_price'],
'running_number'=>$v['running_number'],
'sum_running_price'=>$v['sum_running_price'],
'send_number'=>$v['send_number'],
'sum_send_price'=>$v['sum_send_price'],
]) ;
}
$fileName = '采购汇总-按商品'.date('YmdHis', time()).'.csv';
export_csv($temp, $column, $fileName);
}
}
\ No newline at end of file
<?php
namespace App\Model\Report;
use App\Model\PackingModel;
use App\Model\PurchaseModel;
use Request;
use DB;
class ReportSupplierModel
{
protected $connection='web';
/*统计数据,按供应商分组计算
*
供应商名称
供应商编码
采购次数 -- 非草稿、作废的采购单数量
采购金额
采购占比 --当前供应商采购金额/总非草稿、作废的采购总额
采购在途数量 --汇总供应商对应采购单下采购在途数量 (下单数量-入库数量-已审核异常的不补发数量)
采购在途金额 --汇总供应商对应采购单下采购在途数量*单价
送货在途数量 --汇总供应商对应采购单下送货在途数量 (发货数量-入库数量-已审核异常的不补发数量-已审核异常的补发数量)
送货在途金额 --汇总供应商对应采购单下采购送货在途数量*单价
入库数量
入库金额
入库占比 -- 当前供应商采购入库金额/总入库总额
*/
public function main($type = 1)
{
$arr = ['p','limit','sku_id','supplier_code','supplier_name'];
$input=TrimX(Request::all(),true,$arr);
$PurchaseModel = new PurchaseModel();
//查询数据
$list = $PurchaseModel
->select(DB::Raw("lie_p.supplier_name, -- 供应商名称
lie_p.supplier_code, -- 供应商型号
count(1) as sum_pur_number , -- 采购次数
SUM(lie_i.picking_number) as sum_picking_number,
SUM(lie_i.putaway_number) as sum_putaway_number,
SUM(lie_i.noshipping_number) as sum_noshipping_number,
SUM(lie_i.reshipping_number) as sum_reshipping_number,
SUM(lie_i.picking_price*lie_p.exchange_rate*lie_i.picking_number) as price_picking_number,
SUM(lie_i.picking_price*lie_p.exchange_rate*lie_i.putaway_number) as price_putaway_number,
SUM(lie_i.picking_price*lie_p.exchange_rate*lie_i.noshipping_number) as price_noshipping_number,
SUM(lie_i.picking_price*lie_p.exchange_rate*lie_i.reshipping_number) as price_reshipping_number,
SUM(lie_i.picking_price*lie_p.exchange_rate*lie_i.picking_number) as sum_pur_price, -- 采购金额
SUM(lie_i.putaway_number) as sum_putaway_number, -- 入库总数量
SUM(lie_i.picking_price*lie_p.exchange_rate*lie_i.putaway_number) as sum_putaway_price -- 入库金额
"))
->from("purchase as p")
->join('purchase_items as i', 'p.picking_id', '=', 'i.picking_id')
->whereNotIn("p.status",[-10,-2,-1])
->where("i.status",1)
->where(function ($query) use ($input) {
foreach ($input as $k => $v){
$v = trim($v);
if (empty($v)){
continue;
}
switch ($k){
case "p":
case "limit":
continue;
break;
case 'supplier_name':
$query->where('p.supplier_name','like',$v);
break;
case "supplier_code":
$query->whereIn('p.supplier_code',explode(',',$v));
break;
}
}
})
->groupBy("supplier_code")
->orderBy('i.picking_items_id','asc');
$packingInfo = (new PackingModel())->PackingList();
if ($type == 1){
$list = $list->paginate($input['limit'], ['*'], 'p', $input['p'])->toArray();
if (!$list) return [20001, '没有数据'];
foreach ($list['data'] as $k=>&$v){
$v['packing_name'] = @$packingInfo[$v['packing_id']];
}
return [0, '成功', $this->clearData($list['data']), $list['total']];
}else{
$list = $list->get();
if (!$list) return false;
$data = $list->toArray();
foreach ($data as $k=>&$v){
$v['packing_name'] = @$packingInfo[$v['packing_id']];
}
return $this->clearData($data);
}
}
//清理数据
public function clearData($data){
$PurchaseModel = new PurchaseModel();
$all = $PurchaseModel
->select(DB::Raw("
SUM(lie_i.picking_price*lie_p.exchange_rate*lie_i.picking_number) as sum_pur_price, -- 采购总金额
SUM(lie_i.picking_price*lie_p.exchange_rate*lie_i.putaway_number) as sum_putaway_price -- 入库总金额
"))
->from("purchase as p")
->join('purchase_items as i', 'p.picking_id', '=', 'i.picking_id')
->whereNotIn("p.status",[-10,-2,-1])
->where("i.status",1)->first() ;
foreach ($data as $k=>&$v){
$running_number = $v['sum_picking_number']-$v['sum_putaway_number']-$v['sum_noshipping_number']; //采购在途数量
$sum_running_price = $v['price_picking_number']-$v['price_putaway_number']-$v['price_noshipping_number'];//采购在途金额
$send_number = $v['sum_picking_number']-$v['sum_putaway_number']-$v['sum_noshipping_number']-$v['sum_noshipping_number']; //送货在途数量
$sum_send_price = $v['price_picking_number']-$v['price_putaway_number']-$v['price_noshipping_number']-$v['price_noshipping_number'];//送货在途金额
$v['running_number'] = $running_number > 0 ? $running_number : 0;
$v['sum_running_price'] = $sum_running_price > 0 ? $sum_running_price : 0;
$v['send_number'] = $send_number > 0 ? $send_number : 0;
$v['sum_send_price'] = $sum_send_price > 0 ? $sum_send_price : 0;
$v['percent_pur_price'] = (round($v['sum_pur_price']/$all['sum_pur_price'],4)*100).'%'; //采购占比
$v['percent_putaway_price'] = (round($v['sum_putaway_price']/$all['sum_putaway_price'],4)*100).'%'; //入库占比
}
return $data;
}
// 导出
public function export()
{
$result = $this->main(2);
if (!$result) return ['errcode' => 20001, 'errmsg' => '没有数据'];
$column = array('供应商名称','供应商编号','采购次数','采购金额','采购在途数量','采购在途金额','送货在途数量','送货在途金额','入库总数量','入库金额','采购占比','入库占比'); // 表头
$temp = [];
foreach ($result as $k=>$v){
array_push($temp,[
'supplier_name'=>$v['supplier_name'],
'supplier_code'=>$v['supplier_code'],
'sum_pur_number'=>$v['sum_pur_number'],
'sum_pur_price'=>$v['sum_pur_price'],
'running_number'=>$v['running_number'],
'sum_running_price'=>$v['sum_running_price'],
'send_number'=>$v['send_number'],
'sum_send_price'=>$v['sum_send_price'],
'sum_putaway_number'=>$v['sum_putaway_number'],
'sum_putaway_price'=>$v['sum_putaway_price'],
'percent_pur_price'=>$v['percent_pur_price'],
'percent_putaway_price'=>$v['percent_putaway_price'],
]) ;
}
$fileName = '采购汇总-按供应商'.date('YmdHis', time()).'.csv';
export_csv($temp, $column, $fileName);
}
}
\ No newline at end of file
<?php
namespace App\Model;
use Illuminate\Database\Eloquent\Model;
use Request;
use DB;
class SafeStockModel extends Model
{
protected $connection='web';
protected $table='safe_stock';
protected $primaryKey='safe_id';
public $timestamps = false;
// 安全库存警报
public function getSafeStockList($export=array())
{
$arr = ['p', 'limit','sku_id','goods_status','goods_type', 'stock', 'goods_name', 'brand_name', 'where','num','mpq'];
$input = Request::only($arr);
$input=TrimX($input,true,$arr);
//查询数据
$list = $this->where(function ($query) use ($input) {
foreach ($input as $k => $v){
if ($k == 'p' || $k == 'limit') {
continue;
} else if($k == 'goods_name' || $k=='brand_name') {
$query->where($k, 'like', $v.'%');
} else if($k == 'goods_type') {
$query->where($k, '=', $v);
}else if($k=='goods_status' || $k=='sku_id'){
$query->whereIn($k, explode(',',trim($v,',')));
}else if ($k == 'stock') {
if(empty($input['where']) || empty($input['mpq'])) continue;
if(empty($input['num'])) $input['num']=0;
$num = $input['mpq'] == '2' ? $input['num']."*mpq" : $input['num'];
if ($v == 1) {
$query-> whereRaw('(stock-lock_stock)'.$input['where'].$num);
} else if ($v == 2) {
$query-> whereRaw('(stock+wait_stock)'.$input['where'].$num);
}else if ($v == 3) {
$query-> whereRaw('(stock+wait_stock+in_num)'.$input['where'].$num);
}else if ($v == 4) {
$query-> whereRaw('(stock+wait_stock+purchase_num)'.$input['where'].$num);
}
}
}
});
if (array_key_exists('limit',$input) !== false){
$list = $list->paginate($input['limit'], ['*'], 'p', $input['p'])->toArray();
}else{
$list = $list->get()->toArray();
}
if (!$list) return [20001, '没有数据'];
$PackingModel=new PackingModel();
$PackingList=$PackingModel->PackingList();
$StatusList=Config('fixed.SELFSTATUS');
$TypeList=Config('fixed.TYPEID');
if (array_key_exists('limit',$input) === false){
$list['data'] = $list;
$list['total'] = count($list);
}
foreach ($list['data'] as $k=>$v){
$list['data'][$k]['packing_id']=!empty($PackingList[$v['packing_id']])?$PackingList[$v['packing_id']]:'--';
$list['data'][$k]['status_name']=!empty($StatusList[$v['goods_status']])?$StatusList[$v['goods_status']]:'--';
$list['data'][$k]['goods_type_name']=!empty($TypeList[$v['goods_type']])?$TypeList[$v['goods_type']]:'--';
$list['data'][$k]['use_stock']=$v['stock']-$v['lock_stock'];
$list['data'][$k]['stock'] +=$v['wait_stock'];
}
return [0, '成功', $list['data'], $list['total']];
}
// 导出
public function export()
{
$arr = ['p', 'limit', 'sku_status', 'safe_stock_status', 'goods_name', 'brand_name', 'sku_id'];
$input = Request::only($arr);
$data = $this->getSafeStockList($input);
if ($data[0] != 0) {
return $data[1]; die;
}
$exData = [];
foreach ($data[2] as $k=>$v){
$exData[$k]['sku_id']=$v['sku_id'];
$exData[$k]['goods_name']=$v['goods_name'];
$exData[$k]['class_name']=$v['class_name'];
$exData[$k]['brand_name']=$v['brand_name'];
$exData[$k]['packing_id']=$v['packing_id'];
$exData[$k]['encap']=$v['encap'];
$exData[$k]['mpq']=$v['mpq'];
$exData[$k]['status_name']=$v['status_name'];
$exData[$k]['goods_type_name']=$v['goods_type_name'];
$exData[$k]['purchase_num']=$v['purchase_num'];
$exData[$k]['in_num']=$v['in_num'];
$exData[$k]['lock_stock']=$v['lock_stock'];
$exData[$k]['wait_stock']=$v['wait_stock'];
$exData[$k]['use_stock']=$v['use_stock'];
$exData[$k]['stock']=$v['stock'];
}
$column = array('商品ID', '商品型号','类别', '制造商', '包装方式', '封装', 'MPQ', '状态', '类型','采购在途','送货在途','锁定库存','待入库','可用库存','实际库存'); // 表头
$fileName = '采购参数维护'.date('YmdHis', time()).'.csv';
export_csv($exData, $column, $fileName);
}
// 编辑
public function safeStockEdit()
{
$safe_id = Request::input('safe_id');
$safe_stock = Request::input('safe_stock');
return $this->where('safe_id', $safe_id)->update(['safe_stock'=>$safe_stock]);
}
}
\ No newline at end of file
<?php
namespace App\Model;
use Illuminate\Database\Eloquent\Model;
use DB;
class SnModel extends Model
{
protected $connection='web';
protected $table='numbering_rules';
public $timestamps = false;
/**
* 查询单号
*/
public function Sn($rule_code){
DB::connection($this->connection)->beginTransaction();
//$data = $this->where('rule_code', $rule_code)->lockForUpdate()->first();
$data = $this->where('rule_code', $rule_code)->first();
if (!empty($data)) {
$data = $data->toArray();
}
$str = $data['rule_prefix'];
$str_middle = '';
$number = $data['rule_suffix_number'] + 1;
if (!empty($data['rule_mask'])) {
$str_middle = date($data['rule_mask']);
}
$str .= $str_middle;
if ($str_middle != $data['rule_mask_str']) {//重置
$number = 1;
$save['rule_mask_str'] = $str_middle;
}
if ($data['rule_suffix_len'] > 0) {
$str .= $this->fillNum($data['rule_suffix_len'], $number);
if ($number != $data['rule_suffix_number']) {
$save['rule_suffix_number'] = $number;
}
if (isset($save)) {
$this->where('rule_id', $data['rule_id'])->update($save);
}
}
$str .= $data['rule_suffix'];
DB::connection($this->connection)->commit();
return $str;
}
/**
* 补充0
* @param [type] $len [description]
* @param [type] $num [description]
* @return [type] [description]
*/
private function fillNum($len, $num)
{
$str = '';
if ($len > 0) {
$str = str_pad($num, $len, '0', 0);
}
return $str;
}
}
<?php
namespace App\Model;
use Illuminate\Database\Eloquent\Model;
use SoapWrapper;
class SoapWrapperModel extends Model
{
public function webserver($currency,$time=''){
if(empty($currency)) return false;
if(empty($time)){
$time=date('Y-m-d',time());
}else{
$time=date('Y-m-d',$time);
}
$Arr=['CURRENCY'=>$currency,'BIZDATE'=>$time];
SoapWrapper::add(function($login){
$login->name('login')->wsdl(Config('website.HL_LOGIN_URL'));
});
SoapWrapper::service('login', function ($login) use ($Arr) {
$result=$login->call('login',Config('website.HL_CONFIG'));
if(empty($result->sessionId)) return false;
});
SoapWrapper::add(function($hl){
$hl->name('hl')->wsdl(Config('website.HL_URL'));
});
SoapWrapper::service('hl', function ($hl) use ($Arr,&$currency) {
$currency=$hl->call('getExchangeRate',[json_encode($Arr)]);
});
return $currency;
}
}
<?php
namespace App\Model;
use ClassPreloader\Config;
use Illuminate\Database\Eloquent\Model;
use League\Flysystem\Exception;
use Request;
use DB;
use Illuminate\Support\Facades\Redis;
class SupplierAccountModel extends Model
{
protected $connection='yunxin';
protected $table='supplier_account';
protected $primaryKey='id';
public $timestamps = false;
/*
* 供应商登录
* @param int $account_id 账号id
*/
public function Login(){
session_start();
$mobile = Request::input('mobile');
$password = Request::input('password');
$code= Request::input('code');//验证码
if ($_SESSION['yunxin_captcha'] != $code) {
return [1001,'验证码不正确'];
}
$account = $this->where("mobile",$mobile)->first();
if (!$account){
return [1002,'不存在此账号'];
}
if ($account['password'] != createPassword($password)){
return [1003,'密码错误'];
}
//用户详情
$supplierInfo = DB::connetion("web")->table("supplier_channel")->where("supplier_id",$account['supplier_id'])->first();
//用户角色
$roleInfo = DB::connetion("yunxin")->table("auth_role_access")->where("account_id",$account['id'])->first();
$info = [
'supplier_id'=>$account['supplier_id'],
'supplier_name'=>$supplierInfo['supplier_name'],
'account_id'=>$account['account_id'],
'role_id'=>$roleInfo['role_id'],
];
try{
$con = DB::connection('web');
$con->beginTransaction();
#登录信息写入缓存
$key = md5('supplier_login_'.md5($mobile.$code.time()));
$expire = 7200;//过期两个小时
Redis::setex($key, $expire, self::encode($info));
$_COOKIE['yunxin_key'] = $key;
#记录登录日志
$log['account_id'] = $account['id'];
$log['action_ip'] = $mobile;
$log['create_time'] = time();
$log['remark'] = utf8JsonEncode($info);
$logid = $this->insertGetId($log);
if (!$logid){
throw new Exception('插入日志失败',1004);
}
$con->commit();
return ['0','登录成功,登录token:'.$key];
}catch (\Exception $e) {
$con->rollBack();
return [$e->getCode(),$e->getMessage()];
}
}
}
\ No newline at end of file
<?php
namespace App\Model;
use Illuminate\Database\Eloquent\Model;
use Request;
class SupplierAddressModel extends Model
{
protected $connection='web';
protected $table='supplier_address';
public $timestamps = false;
public function AddInfo($SupplierID='',$data='',$code=''){
if(empty($SupplierID) || empty($data) || !is_array($data)) return false;
$Add=$data[1];
$Add['supplier_id']=$SupplierID;
$Add['supplier_code']=$code;
$Add['address_type']=1;
$this->insert($Add);
$Add=$data[2];
$Add['supplier_id']=$SupplierID;
$Add['supplier_code']=$code;
$Add['address_type']=2;
$this->insert($Add);
}
public function SaveInfo($data=''){
if(!is_array($data) || empty($data[1]['info_id']) || empty($data[2]['info_id'])) return false;
$Save=$data[1];
$this->where('info_id','=',$data[1]['info_id'])->update($Save);
$Save=$data[2];
return $this->where('info_id','=',$data[2]['info_id'])->update($Save);
}
public function AddressInfo($SupplierID=''){
$collert=Request::only('supplier_id');
$collert=TrimX($collert,true,['supplier_id']);
empty($collert) && $collert['supplier_id']=$SupplierID;
if(empty($collert['supplier_id'])) return false;
$info=$this->where('supplier_id','=',$collert['supplier_id'])->get();
if(!$info) return false;
$info=$info->toArray();
$Arr=[];
foreach ($info as $k=>$v){
$Arr[$v['address_type']]=$v;
}
return $Arr;
}
}
<?php
namespace App\Model;
use App\map\SupplierReceiptMap;
use Illuminate\Database\Eloquent\Model;
use Request;
class SupplierReceiptModel extends Model
{
protected $connection='web';
protected $table='supplier_receipt';
public $timestamps = false;
//列表
public function getList($uid = "",$wmsData = "")
{
$input = $wmsData ? $wmsData : Request::all() ;
$list = $this->where(function ($query) use ($input) {
foreach ($input as $k => $v){
$v = trim($v);
if (empty($v)){
continue;
}
switch ($k){
case "p":
case "limit":
case "_url":
case "supplier_id":
case "create_uid":
continue;
break;
default:
$query->whereRaw("FIND_IN_SET($k,'".trim($v,',')."') > 0");
break;
}
}
})->orderBy('status','asc');
if ($input['supplier_id'] >0){
$list = $list->where("supplier_id",$input['supplier_id']);
}else{
$list = $list->where("create_uid",$uid)->where("supplier_id",0);
}
$list = $list->paginate($input['limit'], ['*'], 'p', $input['p'])->toArray();
if (!$list) return [20001, '没有数据'];
$UserModel = new UserModel();
foreach ($list['data'] as $k=>&$v){
$v['k'] = $k+1;
$v['create_uid_username'] = $UserModel->FinduserInfoName($v['create_uid']); //创建用户名
$v['create_time'] = date("Y-m-d H:i:s",$v['create_time']); //格式时间
$v['receipt_type'] = SupplierReceiptMap::$receipt_type[$v['receipt_type']]; //格式时间
$v['status_name'] = SupplierReceiptMap::$status[$v['status']]; //格式时间
}
return [0, '成功', $list['data'], $list['total']];
}
//插入1
public function AddInfo($SupplierID='',$data=''){
if(empty($data) || !is_array($data)) return false;
$data['supplier_id']=$SupplierID;
$result=$this->insert($data);
return $result;
}
//插入2
public function AddInfo2($uid = ""){
$indata = Request::all();
if ($indata['receipt']['receipt_type'] == 1){
$checkPerm = ['currency','bank_name','bank_adderss','account_no','account_name','certificate'];
}else{
$checkPerm = ['currency','bank_name','bank_adderss','account_no','account_name','certificate','swift_code'];
}
if(!checkRequire2($indata["receipt"],$checkPerm)){
return [20001, '请填写:'.checkRequire2($indata["receipt"],$checkPerm,2)];
}
if ($indata['receipt_id'] > 0){ //修改
$indata['receipt']['update_time'] =time();
unset($indata['receipt']['supplier_id']);
$indata['receipt']['status'] = 2; //重置状态为待审核
$result = $this->where("receipt_id",$indata['receipt_id'])->update($indata['receipt']);
}else{ //新增
$indata['receipt']['supplier_id'] = $indata['supplier_id'];
$indata['receipt']['create_uid'] =$uid;
$indata['receipt']['status'] =2;
$indata['receipt']['create_time'] =time();
$indata['receipt']['update_time'] =time();
$result=$this->insert($indata['receipt']);
}
return $result ? [0, '成功'] : [20002,'失败'];
}
public function SaveInfo($data=''){
if(!is_array($data) || empty($data['receipt_id'])) return false;
return $this->where('receipt_id','=',$data['receipt_id'])->update($data);
}
public function ReceiptInfo($SupplierID=''){
$collert=Request::only('supplier_id');
$collert=TrimX($collert,true,['supplier_id']);
empty($collert) && $collert['supplier_id']=$SupplierID;
if(empty($collert['supplier_id'])) return false;
$info=$this->where('supplier_id','=',$collert['supplier_id'])->first();
if(!$info) return false;
return $info->toArray();
}
public function ReceiptInfo2($receiptID=''){
$info=$this->where('receipt_id','=',$receiptID)->first();
if(!$info) return false;
return $info->toArray();
}
//更新状态
public function updateStatus($receipt_id,$status){
$res = $this->where('receipt_id',$receipt_id)->update(['status'=>$status,'update_time'=>time()]);
if (!$res){
return [10001,'更新失败,请重试'];
}else{
return [0,'更新成功'];
}
}
}
<?php
namespace App\Model;
use Illuminate\Database\Eloquent\Model;
class UploadLog extends Model
{
protected $connection='web';
protected $table='upload_log';
public $timestamps = false;
//生成的文件上传到OSS
public function SaveDownFile($FileName=''){
if(empty($FileName)) return false;
$result=json_decode(UploadToOss(storage_path().DIRECTORY_SEPARATOR.'app'.DIRECTORY_SEPARATOR.'uploads'.DIRECTORY_SEPARATOR.$FileName),true);
if(empty($result['code']) || $result['code'] != 200 || empty($result['data'][0])) return false;
return $result['data'][0];
}
public function SaveLog($map,$data){
return $this->where('up_id','=',$map)->update($data);
}
public function ApiUploadItemFile($admin=''){
$file = Request::file('file');
$Arr=['picking_id'];
$collert=Request::only($Arr);
if ($file->isValid()) {
$ext = $file->getClientOriginalExtension();
$realPath = $file->getRealPath();
if($ext!='csv'){
$this->Export(10001,'上传格式错误');
}
// 上传文件
$filename = date('Y-m-d-H-i-s') . '-' . uniqid() . '.' . $ext;
$bool = Storage::disk('uploads')->put($filename, file_get_contents($realPath));
if(!$bool) return [10002,'文件处理失败'];
$filePath = storage_path().DIRECTORY_SEPARATOR.'app'.DIRECTORY_SEPARATOR.'uploads'.DIRECTORY_SEPARATOR.$filename;
$result=json_decode(UploadToOss($filePath),true);
Storage::disk('uploads')->delete($filename);
if(!empty($result['code']) && $result['code']==200 && !empty($result['data'][0])){
$data['id']=$collert['picking_id'];
$data['file_name']=json_encode([
'upload'=>$result['data'][0]
]);
$data['log']=json_encode([
date('Y-m-d H:i',time()). '建立任务'
]);
$data['create_time']=time();
$data['update_time']=time();
$data['type']=1;
$data['admin_id']=$admin;
DB::connection($this->connection)->beginTransaction();
$insert=$this->insertGetId($data);
if($insert){
$return=dispatch(new UploadItems($insert));
if($return){
DB::connection($this->connection)->commit();
return [0,'上传成功,请等待系统自动处理'];
}else{
return [10004,'上传失败'];
}
}else{
return [10003,'上传失败'];
}
}else{
return [10002,'上传失败'];
}
}else{
return [10005,'上传失败'];
}
}
}
<?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;
}
public function UserList(){
$data=$this->select('userId','name','email')->get()->toArray();
if($data && is_array($data)){
foreach ($data as $k=>$v){
if(empty($v['name'])){
$data[$k]['name']=$v['email'];
}
$arr[$v['userId']]=$v;
}
}
return $arr;
}
}
<?php
namespace App\map;
//预售订单数据
class PreSaleOrderMap{
//status 状态:-1已取消 1 处理中 2已处理 3已发货 4部分发货
const STATUS_CANCEL = -1;
const STATUS_DEALING = 1;
const STATUS_DEALT = 2;
const STATUS_ALL_DELIVERED = 3;
const STATUS_HALF_DELIVERED = 4;
static $status =[
self::STATUS_CANCEL => "已取消",
self::STATUS_DEALING => "处理中",
self::STATUS_DEALT => "已处理",
self::STATUS_ALL_DELIVERED => "已发货",
self::STATUS_HALF_DELIVERED => "部分发货",
];
//所有状态
static $statusAll = [self::STATUS_CANCEL,self::STATUS_DEALING,self::STATUS_DEALT,self::STATUS_ALL_DELIVERED,self::STATUS_HALF_DELIVERED];
}
<?php
namespace App\map;
class PurchaseMap{
// 付款状态:0未付款 1完全请款 2首款 3尾款 4:部分请款
const PAY_STATUS_NO = 0;
const PAY_STATUS_ALL = 1;
const PAY_STATUS_FRIST = 2;
const PAY_STATUS_END = 3;
const PAY_STATUS_HALF = 4;
static $pay_status =[ //原始状态
self::PAY_STATUS_NO => "未付款",
self::PAY_STATUS_ALL => "完全请款",
self::PAY_STATUS_FRIST => "首款",
self::PAY_STATUS_END => "尾款",
self::PAY_STATUS_HALF => "部分请款",
];
//转换状态
static $pay_status2 =[
self::PAY_STATUS_NO => "未付款",
self::PAY_STATUS_ALL => "完全请款",
self::PAY_STATUS_FRIST => "部分请款",
self::PAY_STATUS_END => "完全请款",
self::PAY_STATUS_HALF => "部分请款",
];
//完全付款
const pay_all = [self::PAY_STATUS_ALL,self::PAY_STATUS_END];
//部分付款
const pay_half = [self::PAY_STATUS_FRIST,self::PAY_STATUS_HALF];
}
<?php
namespace App\map;
//预售订单数据
class PurchaseNeedMap{
//status 状态:-1驳回 1 处理中 2已转采购单
const STATUS_CANCEL = -1;
const STATUS_DEALING = 1;
const STATUS_DEALT = 2;
static $status =[
self::STATUS_CANCEL => "驳回",
self::STATUS_DEALING => "未处理",
self::STATUS_DEALT => "已转采购单",
];
}
<?php
namespace App\map;
class SupplierReceiptMap{
// 状态:1 启动 2 待审核 3 审核驳回 4 禁用
const STATUS_RUNNING = 1;
const STATUS_AUDIT_WAIT= 2;
const STATUS_AUDIT_PASS = 3;
const STATUS_NO = 4;
static $status =[
self::STATUS_RUNNING => "启动",
self::STATUS_AUDIT_WAIT => "待审核",
self::STATUS_AUDIT_PASS => "审核驳回",
self::STATUS_NO => "禁用",
];
//receipt_type` tinyint(3) unsigned NOT NULL DEFAULT '1' COMMENT '收款账户所在地:1大陆,2香港及国外
CONST RECEIPT_TYPE_CHINA = 1;
CONST RECEIPT_TYPE_OTHER = 2;
static $receipt_type = [
self::RECEIPT_TYPE_CHINA => '大陆',
self::RECEIPT_TYPE_OTHER => '香港及国外',
];
}
......@@ -11,7 +11,8 @@
"predis/predis": "^1.1",
"maatwebsite/excel": "~2.0.0",
"vladimir-yuldashev/laravel-queue-rabbitmq": "5.2",
"artisaninweb/laravel-soap": "0.2.*"
"artisaninweb/laravel-soap": "0.2.*",
"gregwar/captcha": "^1.1"
},
"require-dev": {
......
<?php
return [
//密码加盐
'supplier_login_slat'=>'N<*^&9781UO0&*<>~,.laGTVC',
//网页不用验证授权方法
'NotAuth'=>array(
'ChoiceSupplierList','HoldItems','ObtainSkuList'
......@@ -22,242 +25,4 @@ return [
'WMSKEY'=>'j9q##VRhaXBEtznIEeDiR@1Hvy0sW3wp',//WMS加密密钥
'PurchaseType'=>array(
1 => '正常采购',
2 => '样品',
3 => '赠品'
),
'SupplierStockupType'=>array(
1 => '猎芯自采',
2 => '商家寄售',
3 => '猎芯自采+商家寄售'
),
//异常管理
'AbnormalType'=>array(
1 => '来料异常',
2 => '库内异常',
),
//异常明细类型
'AbnormalItemsType'=>array(
1 => '不良品',
2 => '缺货',
),
//异常管理处理类别1
'AbnormalItemsDealType1'=>array(
1 => '退货',
2 => '不退货',
),
//异常管理处理类别2 1收款 2补发 3不收款 4不补发
'AbnormalItemsDealType2'=>array(
1 => '收款',
2 => '补发',
3 => '不收款',
4 => '不补发',
),
'AbnormalStatus'=>array(
-10=>'已取消',
-1 => '未处理',
1 => '待审核',
2 => '审核通过',
3 => '审核驳回',
4 => '已完成',
),
'UploadLogType' => array(
'建立任务',
'处理中',
'处理成功',
'处理失败',
),
'SupplierCode'=>array(
1 => 'ZC',
2 => 'JS',
3 => 'ZJ'
),
'SupplierPayType'=>array(
1 => '账期-周期结算',
2 => '账期-定期结算',
3 => '全款',
4 => '定金'
),
'SupplierPayTypeAB'=>array(
1 => ['MonthLy ','th,st,nd,rd'],
2 => ['NET ',' Days'],
3 => 'T/T in advanced',
4 => ['DEposti ','%']
),
'SupplierStatus'=>array(
-2 => '禁用',
-1 => '草稿',
1 => '待审核',
2 => '启用'
),
'Currency'=>array(
1 => '人民币CNY',
2 => '美金USD',
3 => '港元HKD',
4 => '欧元EUR',
5 => '英镑GBP',
6 => '瑞士法郎CHF'
),
'WmsCurrency'=>array(
1 => 'CNY',
2 => 'USD',
3 => 'HKD',
4 => 'EUR',
5 => 'GBP',
6 => 'CHF'
),
'HLCurrency'=>array(
1 => '人民币',
2 => '美元',
3 => '港币',
4 => '欧元',
5 => '英镑',
6 => '瑞士法郎'
),
'CurrencySyb'=>array(
1 => '¥',
2 => '$',
3 => 'HK$',
4 => '€',
5 => '£',
6 => 'CHF'
),
'ReceiptType'=>array(
1 => '大陆',
2 => '港澳台和国外'
),
'PurchaseStatus'=>array(
-10 => '作废',
-2 => '创建中',
-1 => '草稿',
1 => '待审核',
4 => '待收货',
6 => '部分收货',
10 => '完全收货',
11 => '强制完成',
),
'PurchaseAuthStatus'=>array(
-1 => '草稿',
1 => '待审核',
),
'DeliveryUnit'=>array(
1=>'天',
2=>'工作日',
3=>'周',
4=>'月'
),
'DeliveryUnitAB'=>array(
1=>' days',
2=>' Working days',
3=>' weeks',
4=>' months'
),
'clause'=>array(
0=>'EXW',
1=>'FCA',
2=>'CPT',
3=>'CIP',
4=>'DAT',
5=>'DAP',
6=>'DDP',
7=>'FAS',
8=>'FOB',
9=>'CFR',
10=>'CIF'
),
'ExcelSet'=>array(
'values'=>[
'A'=>[
[24,'picking_info','address'],[25,'Requirement'],[5,'picking_sn']
],
'B'=>[
[8,'UserInfo','name'],[9,'picking_info','tel'],[10,'picking_info','fax']
],
'G'=>[
[7,'supplier_name'],[8,'supplier_info','channel','supplier_consignee'],[9,'supplier_info','channel','supplier_mobile'],[10,'supplier_info','channel','supplier_fax'],[11,'supplier_info','channel','supplier_address']
],
'C'=>[
[16,'picking_amount'],[17,'picking_amount_s']
],
],
'abvales'=>[
'B'=>[
[5,'data'],[8,'UserInfo','email'],[10,'supplier_name'],[11,'supplier_info','channel','supplier_mobile'],[12,'supplier_info','channel','supplier_fax'],
[13,'supplier_info','channel','supplier_email'],[14,'supplier_info','channel','supplier_consignee']
],
'H'=>[
[5,'picking_sn'],[6,'picking_info','clause'],[8,'Requirement']
],
'J'=>[
[17,'picking_amount']
]
]
),
'ProductStatus' => array(
'1' => '上架',
'3' => '下架',
'0' => '待入库',
),
'SafeStockStatus' => array(
'1' => '库存数量<安全库存',
'2' => '安全库存=库存数量',
'3' => '安全库存=0',
),
'SELFSTATUS'=>array(
0=>'待入库',
1=>'上架',
2=>'审核不通过',
3=>'下架',
4=>'删除'
),
'TYPEID'=>array(
0=>'自营',
1=>'联营',
2=>'专卖',
3=>'寄售',
),
'qk_pay_status'=>[
0=>'未请款',
1=>'完全请款',
2=>'已请首款',
3=>'已请尾款',
4=>'部分请款',
5=>'完全请款',
],
//入库单开票状态: 0 未开票 1 部分开票 2 全部开票
'putaway_purchase_invoice_status'=>[
0=>'未开票',
1=>'完全开票',
2=>'部分开票',
],
//进项发票状态:-10作废撤销 -1草稿,1待审核,2审核通过,3审核驳回
'purchase_invoice_status'=>[
-10 => '作废撤销',
-1 => '草稿',
1=> '待审核',
2=> '审核通过',
3=> '审核驳回',
],
'purchase_invoice_type'=>[
1=> '完全开票',
2=> '部分开票',
]
];
#云芯系统第一版开发文档
一:
数据库:liexin_wms
环境:正式+测试
执行sql:
ALTER TABLE `lie_supplier_channel`
ADD COLUMN `password` varchar(64) NOT NULL DEFAULT '' COMMENT '登录密码' AFTER `company_name`,
ADD COLUMN `slat` varchar(64) NOT NULL DEFAULT '' COMMENT '生成用户密码hash的随机数' AFTER `password`,
MODIFY COLUMN `stockup_type` smallint(5) UNSIGNED NOT NULL DEFAULT 1 COMMENT '备货方式:1猎芯自采,2商家寄售,3自采+寄售,4寄售+云仓,5自采+云仓,6寄售+云仓+自采' AFTER `slat`;
原因:云芯系统第一版
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;
}
\ 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.
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.
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
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.
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