Commit b7ed8dd7 by 杨树贤

去掉与项目无关的代码

parent f1307c7c
APP_NAME=Laravel
APP_ENV=local
APP_KEY=
APP_DEBUG=true
APP_KEY=base64:nOavyGKkyw4fi+Xv2hK7PrfYw9bapQzqlqMXDIobp9I=
APP_DEBUG=false
APP_LOG_LEVEL=debug
APP_URL=http://localhost
domain=icsales.cc
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_HOST=
DB_PORT=3306
DB_DATABASE=homestead
DB_USERNAME=homestead
DB_PASSWORD=secret
DB_DATABASE=ic_data
DB_USERNAME=ic_data
DB_PASSWORD=ic_data#zsyM
DB_PREFIX=ic_
BROADCAST_DRIVER=log
CACHE_DRIVER=file
......@@ -18,10 +20,14 @@ SESSION_DRIVER=file
SESSION_LIFETIME=120
QUEUE_DRIVER=sync
REDIS_HOST=127.0.0.1
REDIS_PASSWORD=null
REDIS_HOST=
REDIS_PASSWORD=
REDIS_PORT=6379
REDIS_READ_HOST=
REDIS_READ_PASSWORD=
REDIS_READ_PORT=6379
MAIL_DRIVER=smtp
MAIL_HOST=smtp.mailtrap.io
MAIL_PORT=2525
......@@ -33,3 +39,16 @@ PUSHER_APP_ID=
PUSHER_APP_KEY=
PUSHER_APP_SECRET=
PUSHER_APP_CLUSTER=mt1
PERM_URL=http://perm.icsales.cc/api/check
PERM_ID=7
PERM_GOURL=http://perm.icsales.cc
ADMIN_GROUP=10000,20000
NOT_AUTH=ApiGoodsList,ApiInquiryIndex,ApiVisitTrend,ApiIndexOne,ApiIndextwo,ApiViolationGoodsList,ApiInquiryList,userIntegralListApi,batchUpdateStatusApi
MENU_ID=7
MENU_URL=http://data.icsales.cc/api/config/
MENU_SIGN=/web/
LOGIN_DOMAIN=user.icsales.cc
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
class ApiController extends Controller
{
public function Entrance(Request $request, $id ){
return $this->$id($request, $id);
}
//访问时长趋势接口
private function ApiVisitTrend($request){
$collert=TrimX(['info']);
if(empty($collert['info']) || $collert['info']=='今日'){
$today=strtotime(date('Y-m-d'));
$field=[
'0:00-09:00'=>[$today,$today+(60*60*7)],
'09:00-11:00'=>[$today+(60*60*7),$today+(60*60*9)],
'11:00-13:00'=>[$today+(60*60*9),$today+(60*60*11)],
'13:00-15:00'=>[$today+(60*60*11),$today+(60*60*13)],
'15:00-17:00'=>[$today+(60*60*13),$today+(60*60*15)],
'17:00-19:00'=>[$today+(60*60*15),$today+(60*60*17)],
'19:00-22:00'=>[$today+(60*60*17),$today+(60*60*19)],
'22:00-24:00'=>[$today+(60*60*19),$today+(60*60*21)],
];
foreach ($field as $k=>$v){
$data['y']['a'][]=rand(0,30);
$data['y']['b'][]=rand(0,30);
$data['y']['c'][]=rand(0,30);
$data['x'][]=$k;
}
}elseif ($collert['info']=='本周'){
$today=strtotime(date('Y-m-d', strtotime('this week')));
$field=[
'周一'=>[$today,$today+(60*60*24)],
'周二'=>[$today+(60*60*24),$today+(60*60*48)],
'周三'=>[$today+(60*60*48),$today+(60*60*72)],
'周四'=>[$today+(60*60*72),$today+(60*60*96)],
'周五'=>[$today+(60*60*96),$today+(60*60*120)],
'周六'=>[$today+(60*60*120),$today+(60*60*144)],
'周日'=>[$today+(60*60*144),$today+(60*60*168)]
];
foreach ($field as $k=>$v){
$data['y']['a'][]=rand(0,30);
$data['y']['b'][]=rand(0,30);
$data['y']['c'][]=rand(0,30);
$data['x'][]=$k;
}
}elseif ($collert['info']=='本月'){
$today=strtotime(date('Y-m-d', strtotime('this month')));
$field=[
'第一周'=>[$today,$today+(60*60*24)],
'第二周'=>[$today+(60*60*24),$today+(60*60*48)],
'第三周'=>[$today+(60*60*48),$today+(60*60*72)],
'第四周'=>[$today+(60*60*72),$today+(60*60*96)]
];
foreach ($field as $k=>$v){
$data['y']['a'][]=rand(0,30);
$data['y']['b'][]=rand(0,30);
$data['y']['c'][]=rand(0,30);
$data['x'][]=$k;
}
}
return $this->apiReturn(0,'ok',['data'=>$data]);
}
//询价指标
private function ApiInquiryIndex(){
$today=strtotime(date('Y-m-d'));
$field=[
'0:00-07:00'=>[$today,$today+(60*60*7)],
'07:00-09:00'=>[$today+(60*60*7),$today+(60*60*9)],
'09:00-10:00'=>[$today+(60*60*9),$today+(60*60*11)],
'10:00-11:00'=>[$today+(60*60*11),$today+(60*60*13)],
'11:00-12:00'=>[$today+(60*60*13),$today+(60*60*15)],
'12:00-14:00'=>[$today+(60*60*15),$today+(60*60*17)],
'14:00-15:00'=>[$today+(60*60*15),$today+(60*60*17)],
'15:00-16:00'=>[$today+(60*60*15),$today+(60*60*17)],
'16:00-17:00'=>[$today+(60*60*15),$today+(60*60*17)],
'17:00-18:00'=>[$today+(60*60*15),$today+(60*60*17)],
'18:00-20:00'=>[$today+(60*60*15),$today+(60*60*17)],
'20:00-24:00'=>[$today+(60*60*15),$today+(60*60*17)],
];
foreach ($field as $k=>$v){
$data['y'][]=rand(0,30);
$data['x'][]=$k;
}
return $this->apiReturn(0,'ok',['data'=>$data]);
}
//首页相关数据统计
private function ApiIndexOne(){
//今日询价单
$data=[
'today'=>568,
'yesterday'=>129,
'today_offer'=>608,
'yesterday_offer'=>1210,
'reg_count'=>2321,
'yesterday_reg'=>88
];
return $this->apiReturn(0,'ok',['data'=>$data]);
}
//首页相关数据统计
private function ApiIndextwo(){
//今日询价单
$data=[
'wait_auth'=>1,
'goods_auth'=>129,
'inquiry_auth'=>5,
'offer_auth'=>1210,
'integral_extract'=>2321
];
return $this->apiReturn(0,'ok',['data'=>$data]);
}
}
<?php
namespace App\Http\Controllers;
use App\Model\GoodsModel;
use App\Model\RedisModel;
use App\Model\SkuViolation;
use Illuminate\Http\Request;
use PHPUnit\Framework\MockObject\Stub\Exception;
class GoodsApiController extends Controller
{
public function Entrance(Request $request, $id )
{
return $this->$id($request, $id);
}
private function ApiGoodsList($request)
{
$Redis = new RedisModel();
$Field = ['mobile','source/eq','start_time','end_time','status/eq','p','limit','goods_name/like'];
$collert = TrimX($Field);
if(!empty($collert['mobile'])){
$UserId = $Redis->hget('ic_user_mobile',$collert['mobile']);
if(!$UserId) return $this->apiReturn(10001,'没有数据');
$collert['user_id/eq'] = $UserId;
unset($collert['mobile']);
}
if(!empty($collert['start_time'])){
$collert['start_time'] = strtotime($collert['start_time']);
$collert['update_time/gt'] = $collert['start_time'];
unset($collert['start_time']);
}
if(!empty($collert['end_time'])){
$collert['end_time'] = strtotime($collert['end_time']);
$collert['update_time/lt'] = $collert['end_time'];
unset($collert['end_time']);
}
$GoodsModel = new GoodsModel();
$data = $GoodsModel->GoodsList($collert);
if(!$data) return $this->apiReturn(20001,'没有数据');
return $this->apiReturn(0,'ok',$data);
}
private function ApiLowerGoods($request)
{
$collert = TrimX(['goods_id']);
if(empty($collert['goods_id']))
return $this->apiReturn(10001,' 请选择要下架的商品');
$Url = config('website.GoodsInfoServer').'/goods/SaveGoods';
foreach ($collert['goods_id'] as $k=>$v){
}
$result = json_decode(curl($Url,$collert,true),true);
if(!$result || !isset($result['errcode']))
return $this->apiReturn(10001,'网络异常,请稍后重试');
if($result['errcode'] !==0 )
return $this->apiReturn(10002,'没有数据');
return $this->apiReturn(0,'ok',$result['data']);
}
private function ApiProhibitGoods($request){
$collert = TrimX(['goods_id','prohibit_remark']);
if(empty($collert['goods_id']))
return $this->apiReturn(10001,'缺少参数GoodsID');
if(empty($collert['prohibit_remark']))
return $this->apiReturn(10002,'未选择禁用原因');
$Url = config('website.GoodsInfoServer').'/goods/audit/prohibit/status';
$collert['audit_status'] = 2;
$collert['admin_id'] = $request->user->userId;
$collert['admin_name'] = $request->user->email;
$result = curl($Url,http_build_query($collert),true);
$result = json_decode($result,true);
if(isset($result['errcode']) && $result['errcode'] === 0)
return $this->apiReturn(0,'禁用成功');
return $this->apiReturn(10003,'禁用失败');
}
private function ApiViolationGoodsList(Request $request)
{
$Field = ['mobile','start_time','end_time','audit_status','limit'];
$collert = TrimX($Field);
if(!empty($collert['mobile'])){
$Redis = new RedisModel();
$UserId = $Redis->hget('ic_mobile',$collert['mobile']);
if(!$UserId) return $this->apiReturn(10001,'没有数据');
$collert['user_id/eq'] = $UserId;
unset($collert['mobile']);
}
$map = [];
if(!empty($collert['audit_status']))
$map[] = ['audit_status','=',$collert['audit_status']];
if(!empty($collert['start_time'])){
$collert['start_time'] = strtotime($collert['start_time']);
$map[] = ['update_time','>=',$collert['start_time']];
}
if(!empty($collert['end_time'])){
$collert['end_time'] = strtotime($collert['end_time']);
$map[] = ['update_time','<=',$collert['end_time']];
}
if(empty($collert['limit']))
$collert['limit'] = 10;
$Model = new SkuViolation();
$result= $Model->SkuViolationList($map,$collert['limit']);
return $this->apiReturn(0,'ok',$result);
}
private function ApiEnableGoods($request){
$collert = TrimX(['id','enable_remark']);
if(empty($collert['id']))
return $this->apiReturn(10001,'没有可以操作的记录');
if(empty($collert['id']))
return $this->apiReturn(10002,'没有可以恢复的商品');
$collert['id'] = array_unique($collert['id']);
foreach ($collert['id'] as $k=>$v){
if(!empty($v))
$map['id'][] = $k;
}
$map['enable_remark'] = '默认';
$Url = config('website.GoodsInfoServer').'/goods/audit/enable/status';
$collert['audit_status'] = 1;
$result = curl($Url,http_build_query($map),true);
$result = json_decode($result,true);
if(isset($result['errcode']) && $result['errcode'] === 0)
return $this->apiReturn(0,'恢复成功');
return $this->apiReturn(10003,'恢复失败');
}
}
<?php
namespace App\Http\Controllers;
use App\Model\GoodsModel;
use App\Model\UUIDModel;
use Illuminate\Http\Request;
class GoodsWebController extends Controller
{
public function Entrance(Request $request,$id='index')
{
if($request->path() == '/') $path = 'web/index';
else $path = $request->path();
$this->data = [
'menus' => $request->menus,
'header' => $request->user->header,
'username' => $request->user->email,
'useremail' => $request->user->email,
'uri' => '/' . $path,
'id' => $id
];
return $this->$id($request);
}
public function __call($method, $parameters)
{
return $this->errhtml('NotFind','没有这个页面');
}
public function index($request)
{
$this->data['title']='首页';
return $this->view();
}
public function GoodsList()
{
$this->data['title']='商品列表';
return $this->view();
}
private function GoodsDetails()
{
$this->data['title'] = '商品详情';
$collert = TrimX(['goods_id']);
if(empty($collert['goods_id'])) return back();
$GoodsModel = new GoodsModel();
$GoodsInfo = $GoodsModel->HDGoodsInfo($collert['goods_id']);
if(empty($GoodsInfo)) return back();
$UserInfo = $GoodsModel -> HDGoodsUser($GoodsInfo['user_id']);
$this->data['GoodsProhibit'] = config('config.goods_prohibit');
$this->data['info'] = $UserInfo;
$this->data['GoodsInfo'] = $GoodsInfo;
return $this->view();
}
public function ViolationGoodsList(){
$this->data['title']='违规商品列表';
$this->data['audit_status'] = config('config.audit_status');
return $this->view();
}
}
<?php
namespace App\Http\Controllers;
use App\Model\RedisModel;
use App\Model\SkuViolation;
use Illuminate\Http\Request;
class InquiryApiController extends Controller
{
public function Entrance(Request $request, $id )
{
return $this->$id($request, $id);
}
private function ApiInquiryList($request)
{
$Redis = new RedisModel();
$Field = ['mobile','source/eq','start_time','end_time','status/eq','p','limit','goods_name/like','audit_status/eq'];
$collert = TrimX($Field);
if(!empty($collert['mobile'])){
$UserId = $Redis->hget('ic_user_mobile',$collert['mobile']);
if(!$UserId) return $this->apiReturn(10001,'没有数据');
$collert['user_id/eq'] = $UserId;
unset($collert['mobile']);
}
if(!empty($collert['start_time'])){
$collert['start_time'] = strtotime($collert['start_time']);
$collert['add_time/gt'] = $collert['start_time'];
unset($collert['start_time']);
}
if(!empty($collert['end_time'])){
$collert['end_time'] = strtotime($collert['end_time']);
$collert['add_time/lt'] = $collert['end_time'];
unset($collert['end_time']);
}
$collert['update_time/order'] = 'desc';
$ESUrl = config('website.ES_URL').'/search/get_inquiry';
$result = curl($ESUrl,$collert,true);
$result = json_decode($result,true);
if(!isset($result['errcode']) || $result['errcode'] !==0 || empty($result['data']))
return $this->apiReturn(20001,'没有数据');
$total = $result['data']['total'];
$OfferUrl = config('website.OfferServer').'/inquiry/info';
$OfferMap = ['inquiry_items_id'=>$result['data']['inquiry_items_id']];
$result = curl($OfferUrl,http_build_query($OfferMap),true);
$result = json_decode($result,true);
if(!isset($result['errcode']) || $result['errcode'] !==0 || empty($result['data']))
return $this->apiReturn(20001,'没有数据');
$Redis = new RedisModel();
foreach ($result['data'] as $k=>&$v){
$UserInfo = json_decode($Redis->hget('ic_user',$v['user_id']),true);
$v['company_name'] = !empty($UserInfo['company_name']) ? $UserInfo['company_name'] : '';
$v['mobile'] = !empty($UserInfo['mobile']) ? $UserInfo['mobile'] : '';
$v = $this->DataMachining($v);
}
$result['data'] = array_values($result['data']);
return $this->apiReturn(0,'ok',['data'=>$result['data'],'count'=>(int)$total]);
}
private function ApiLowerGoods($request)
{
$collert = TrimX(['goods_id']);
if(empty($collert['goods_id']))
return $this->apiReturn(10001,' 请选择要下架的商品');
$Url = config('website.GoodsInfoServer').'/goods/SaveGoods';
foreach ($collert['goods_id'] as $k=>$v){
}
$result = json_decode(curl($Url,$collert,true),true);
if(!$result || !isset($result['errcode']))
return $this->apiReturn(10001,'网络异常,请稍后重试');
if($result['errcode'] !==0 )
return $this->apiReturn(10002,'没有数据');
return $this->apiReturn(0,'ok',$result['data']);
}
private function ApiProhibitInquiry($request){
$collert = TrimX(['inquiry_items_id','audit_remark']);
if(empty($collert['inquiry_items_id']))
return $this->apiReturn(10001,'缺少参数inquiry_items_id');
if(empty($collert['audit_remark']))
return $this->apiReturn(10002,'未填写禁用原因');
$Url = config('website.OfferServer').'/inquiry/prohibit';
$collert['audit_status'] = 2;
$collert['admin_id'] = $request->user->userId;
$collert['admin_name'] = $request->user->email;
$result = curl($Url,http_build_query($collert),true);
$result = json_decode($result,true);
if(isset($result['errcode']) && $result['errcode'] === 0)
return $this->apiReturn(0,'禁用成功');
return $this->apiReturn(10003,'禁用失败');
}
private function ApiViolationGoodsList(Request $request)
{
$Field = ['mobile','start_time','end_time','audit_status','limit'];
$collert = TrimX($Field);
if(!empty($collert['mobile'])){
$Redis = new RedisModel();
$UserId = $Redis->hget('ic_mobile',$collert['mobile']);
if(!$UserId) return $this->apiReturn(10001,'没有数据');
$collert['user_id/eq'] = $UserId;
unset($collert['mobile']);
}
$map = [];
if(!empty($collert['audit_status']))
$map[] = ['audit_status','=',$collert['audit_status']];
if(!empty($collert['start_time'])){
$collert['start_time'] = strtotime($collert['start_time']);
$map[] = ['update_time','>=',$collert['start_time']];
}
if(!empty($collert['end_time'])){
$collert['end_time'] = strtotime($collert['end_time']);
$map[] = ['update_time','<=',$collert['end_time']];
}
if(empty($collert['limit']))
$collert['limit'] = 10;
$Model = new SkuViolation();
$result= $Model->SkuViolationList($map,$collert['limit']);
return $this->apiReturn(0,'ok',$result);
}
private function ApiEnableGoods($request){
$collert = TrimX(['id','enable_remark']);
if(empty($collert['id']))
return $this->apiReturn(10001,'没有可以操作的记录');
if(empty($collert['id']))
return $this->apiReturn(10002,'没有可以恢复的商品');
$collert['id'] = array_unique($collert['id']);
foreach ($collert['id'] as $k=>$v){
if(!empty($v))
$map['id'][] = $k;
}
$map['enable_remark'] = '默认';
$Url = config('website.GoodsInfoServer').'/goods/audit/enable/status';
$collert['audit_status'] = 1;
$result = curl($Url,http_build_query($map),true);
$result = json_decode($result,true);
if(isset($result['errcode']) && $result['errcode'] === 0)
return $this->apiReturn(0,'恢复成功');
return $this->apiReturn(10003,'恢复失败');
}
}
<?php
namespace App\Http\Controllers;
use App\Model\RedisModel;
use Illuminate\Http\Request;
class InquiryWebController extends Controller
{
public function Entrance(Request $request,$id='index')
{
if($request->path() == '/') $path = 'web/index';
else $path = $request->path();
$this->data = [
'menus' => $request->menus,
'header' => $request->user->header,
'username' => $request->user->email,
'useremail' => $request->user->email,
'uri' => '/' . $path,
'id' => $id
];
return $this->$id($request);
}
public function __call($method, $parameters)
{
return $this->errhtml('NotFind','没有这个页面');
}
private function inquiryList()
{
$this->data['title'] = '询价列表';
$this->data['Source'] = config('config.source');
$this->data['Status'] = config('config.goods_status');
$this->data['audit_status'] = config('config.audit_status');
return $this->view();
}
private function inquiryDetails(Request $request){
$this->data['title']='询价详情';
$inquiry_id = $request->input('inquiry_items_id');
if(empty($inquiry_id)) return back();
$Url = config('website.OfferServer').'/inquiry/info';
$result = curl($Url,['inquiry_items_id'=>$inquiry_id],true);
$result = json_decode($result,true);
if(!isset($result['errcode']) || $result['errcode'] !== 0 || empty($result['data'][$inquiry_id]))
return back();
$Redis = new RedisModel();
$this->data['info'] = json_decode($Redis->hget('ic_user',$result['data'][$inquiry_id]['user_id']),true);
$this->data['inquiry_info'] = $this->DataMachining($result['data'][$inquiry_id]);
return $this->view();
}
}
<?php
namespace App\Http\Controllers;
use App\Model\RedisModel;
use Illuminate\Http\Request;
class OfferApiController extends Controller
{
public function Entrance(Request $request, $id )
{
return $this->$id($request, $id);
}
private function ApiOfferList($request){
$Redis = new RedisModel();
$Field = ['mobile','source/eq','start_time','end_time','status/eq','p','limit','goods_name/like', 'inquiry_items_id/eq'];
$collert = TrimX($Field);
if(!empty($collert['mobile'])){
$UserId = $Redis->hget('ic_user_mobile',$collert['mobile']);
if(!$UserId) return $this->apiReturn(10001,'没有数据');
$collert['user_id/eq'] = $UserId;
unset($collert['mobile']);
}
if(!empty($collert['start_time'])){
$collert['start_time'] = strtotime($collert['start_time']);
$collert['add_time/gt'] = $collert['start_time'];
unset($collert['start_time']);
}
if(!empty($collert['end_time'])){
$collert['end_time'] = strtotime($collert['end_time']);
$collert['add_time/lt'] = $collert['end_time'];
unset($collert['end_time']);
}
$collert['add_time/order'] = 'desc';
$ESUrl = config('website.ES_URL').'/search/get_offer';
$result = json_decode(curl($ESUrl,$collert,true),true);
if(!isset($result['errcode']) || $result['errcode'] !==0 || empty($result['data']))
return $this->apiReturn(20001,'没有数据');
$total = $result['data']['total'];
$OfferUrl = config('website.OfferServer').'/offer/info';
$OfferMap = ['offer_id'=>$result['data']['offer_id']];
$result = json_decode(curl($OfferUrl,http_build_query($OfferMap),true),true);
if(!isset($result['errcode']) || $result['errcode'] !==0 || empty($result['data']))
return $this->apiReturn(20001,'没有数据');
$Redis = new RedisModel();
foreach ($result['data'] as $k=>&$v){
$UserInfo = json_decode($Redis->hget('ic_user',$v['user_id']),true);
$v['company_name'] = !empty($UserInfo['company_name']) ? $UserInfo['company_name'] : '';
$v['mobile'] = !empty($UserInfo['mobile']) ? $UserInfo['mobile'] : '';
//查找详情
unset($v['goods_name']);
$v['items_num'] = '未报价';
if(!empty($v['items'])){
$Items = end($v['items']);
$v = array_merge($v,$Items);
if($v['price'] >0 ) $v['items_num'] = count($v['items']);
}
$v = $this->DataMachining($v);
}
$result['data'] = array_values($result['data']);
return $this->apiReturn(0,'ok',['data'=>$result['data'],'count'=>(int)$total]);
}
}
<?php
namespace App\Http\Controllers;
use App\Model\RedisModel;
use Illuminate\Http\Request;
class OfferWebController extends Controller
{
public function Entrance(Request $request,$id='index')
{
if($request->path() == '/') $path = 'web/index';
else $path = $request->path();
$this->data = [
'menus' => $request->menus,
'header' => $request->user->header,
'username' => $request->user->email,
'useremail' => $request->user->email,
'uri' => '/' . $path,
'id' => $id
];
return $this->$id($request);
}
public function __call($method, $parameters)
{
return $this->errhtml('NotFind','没有这个页面');
}
public function OfferList($request){
$this->data['title'] = '报价列表';
return $this->view();
}
public function OfferDetails($request){
$this->data['title'] = '报价详情';
$offer_id = $request->input('offer_id');
if(empty($offer_id)) return back();
$Url = config('website.OfferServer').'/offer/info';
$result = curl($Url,['offer_id'=>$offer_id],true);
$result = json_decode($result,true);
if(!isset($result['errcode']) || $result['errcode'] !== 0 || empty($result['data'][$offer_id]))
return back();
$Redis = new RedisModel();
$this->data['info'] = json_decode($Redis->hget('ic_user',$result['data'][$offer_id]['user_id']),true);
$this->data['offer_info'] = $this->DataMachining($result['data'][$offer_id]);
$this->data['offer_info'] = $this->DataMachining($this->data['offer_info']);
if(!empty($this->data['offer_info']['items']))
$this->data['offer_info']['items'] = array_values($this->data['offer_info']['items']);
$Url = config('website.OfferServer').'/inquiry/info';
$result = curl($Url,['inquiry_items_id'=>$this->data['offer_info']['inquiry_items_id']],true);
$result = json_decode($result,true);
$this->data['inquiry_info'] = [];
if(!empty($result['data'][$this->data['offer_info']['inquiry_items_id']]))
$this->data['inquiry_info'] = $result['data'][$this->data['offer_info']['inquiry_items_id']];
$this->data['inquiry_info'] = $this->DataMachining($this->data['inquiry_info']);
return $this->view();
}
}
<?php
namespace App\Model;
use App\User;
use Illuminate\Database\Eloquent\Model;
class GoodsModel extends Model
{
protected $connection=false;
protected $table=false;
public $timestamps = false;
//生成数据库连接(要根据规则修改)
private function ConnectDB($SkuId){
$dt = resolve($SkuId);
$this->connection = $dt['db'];
$this->table = $dt['table'];
$this->id = $dt['id'];
return true;
}
public function GoodsList($map=''){
$Url = config('website.ES_URL').'/search/get_data';
$result = curl($Url,$map,true);
$result = json_decode($result,true);
if(!$result || !isset($result['errcode']) || $result['errcode']!==0 || empty($result['data']['goods_id'])) return false;
$data['count'] = (int)$result['data']['total'];
$Url = config('website.GoodsInfoServer').'/goods/info';
$map['goods_id'] = $result['data']['goods_id'];
$map['update_time/order'] = 'desc';
$result = curl($Url,http_build_query($map),true);
$result = json_decode($result,true);
if(!$result || !isset($result['errcode']) || $result['errcode'] !==0 || empty($result['goods_list']))
return false;
$UserModel = new UserModel();
foreach ($result['goods_list'] as $k=>&$v){
if(empty($v)){
unset($result['goods_list'][$k]);
$data['count']--;
}
if(!empty($v['user_id'])){
$UserInfo = $UserModel->getUserInfo($v['user_id']);
$v = array_merge($UserInfo,$v);
}
}
$result['goods_list'] = array_values($result['goods_list']);
$data['data'] = $result['goods_list'];
return $data;
}
public function HDGoodsInfo($SkuID){
$Url = config('website.GoodsInfoServer').'/goods/info';
$map['goods_id'] = $SkuID;
$result = curl($Url,http_build_query($map),true);
$result = json_decode($result,true);
if(empty($result['goods_list'][$SkuID]))
return false;
$info = $result['goods_list'][$SkuID];
$Source = config('config.source');
$info['source_name'] = $Source[$info['source']];
$info['update_time_s'] = date('Y-m-d H:i',$info['update_time']);
return $info;
}
public function HDGoodsUser($UserID){
$Redis = new RedisModel();
return json_decode($Redis->hget('ic_user',$UserID),true);
}
}
<?php
namespace App\Model;
use Illuminate\Database\Eloquent\Model;
class SkuViolation extends Model
{
protected $table='sku_violation';
public $timestamps = false;
public function HdSkuViolation(){
}
public function SkuViolationList($map,$limit=10){
$list = $this->where($map)->orderBy('add_time','desc')->paginate($limit)->toArray();
if(!$list || empty($list['data'])) return false;
//提取SkuID
foreach ($list['data'] as $k=>$v)
$SkuIDArr[] = $v['goods_id'];
$Url = config('website.GoodsInfoServer').'/goods/info';
$map['goods_id'] = $SkuIDArr;
$result = curl($Url,http_build_query($map),true);
$result = json_decode($result,true);
if(empty($result['goods_list']))
return false;
$UserModel = new UserModel();
foreach ($list['data'] as $k=>&$v){
if(empty($result['goods_list'][$v['goods_id']]))
continue;
$v = array_merge($result['goods_list'][$v['goods_id']],$v);
if(!empty($v['user_id'])){
$UserInfo = $UserModel->getUserInfo($v['user_id']);
$v = array_merge($UserInfo,$v);
}
}
return $list;
}
}
<?php
namespace App\Model;
use Illuminate\Database\Eloquent\Model;
class UUIDModel extends Model
{
const EPOCH = 1479533469598;
const max12bit = 4095;
const max41bit = 1099511627775;
static $machineId = null;
protected $connection=false;
protected $table=false;
public $timestamps = false;
/*
* $type str ic_goods=商品 ic_offer=报价 ic_inquiry=询价
*/
public function generateParticle($type='ic_goods')
{
/*
* Time - 42 bits
*/
$time = floor(microtime(true) * 1000);
/*
* Substract custom epoch from current time
*/
$time -= self::EPOCH;
/*
* Create a base and add time to it
*/
return self::max41bit + $time;
$base = decbin(self::max41bit + $time);
/*
* Configured machine id - 10 bits - up to 1024 machines
*/
if(!self::$machineId) {
$machineid = self::$machineId;
} else {
$machineid = str_pad(decbin(self::$machineId), 10, "0", STR_PAD_LEFT);
}
/*
* sequence number - 12 bits - up to 4096 random numbers per machine
*/
$random = str_pad(decbin(mt_rand(0, self::max12bit)), 12, "0", STR_PAD_LEFT);
/*
* Pack
*/
return $base;
$base = $base.$machineid.$random;
return $base;
/*
* Return unique time id no
*/
$UUID = (string)bindec($base);
return $this->Occupy($type,$UUID);
}
private function Occupy($type,$UUID)
{
$Redis = new RedisModel();
if($Redis->hsetnx($type,$UUID,1))
return $UUID;
return $this->generateParticle($type);
}
}
<?php
namespace App\model;
use Illuminate\Database\Eloquent\Model;
class UserModel extends Model
{
protected $connection=false;
protected $table=false;
public $timestamps = false;
private $pre='ic_user';
public function getUserInfo($UserId){
if(empty($UserId)) return false;
$Redis = new RedisModel();
$Cache = json_decode($Redis->hget($this->pre,$UserId),true);
if(!$Cache) return false;
return $Cache;
}
}
/**
* Created by ICHUNT on 2019-06-21.
*/
layui.use(['form'], function() {
var form = layui.form;
form.on('submit(status)', function(data){
var data = data.field;
$.ajax({
url:'/goods/api/ApiProhibitGoods',
type:'post',
data:data,
dataType:'json',
timeout:10000,
success:function (res) {
if(!res) return layer.msg('网络错误,请重试',{icon:5});
layer.msg(res.errmsg,{icon:6});
if(res.errcode==0){
window.location.reload();
}
},
error:function(){
return layer.msg('网络错误,请重试',{icon:5});
}
})
return false; //阻止表单跳转。如果需要表单跳转,去掉这段即可。
});
});
layui.use(['table','form','laydate','layer'], function() {
var table = layui.table;
var laydate = layui.laydate;
var form = layui.form;
//自定义格式
laydate.render({
elem: 'input[name=start_time]'
, type: 'datetime'
, format: 'yyyy-MM-dd HH:mm'
});
laydate.render({
elem: 'input[name=end_time]'
, type: 'datetime'
, format: 'yyyy-MM-dd HH:mm'
});
table.render({
elem: '#list'
, url: '/goods/api/ApiGoodsList'
, method: 'post'
, request: {
pageName: 'p' //页码的参数名称,默认:page
, limitName: 'offset' //每页数据量的参数名,默认:limit
}
,toolbar: true
,defaultToolbar:['filter','exports']
, loading: true
, cols: [[
{type: 'checkbox'}
,{field: 'goods_id', title: '商品ID'}
,{field: 'company_name', title: '个人/公司名'}
, {field: 'goods_name', title: '商品型号'}
, {field: 'source', title: '上传类型', templet: '#title'}
, {field: 'status', title: '商品状态',templet:'#status'}
, {field: 'goods_images', title: '商品图片',templet:'#images'}
, {field: 'update_time', title: '更新时间',templet:'#update_time'}
, {field: 'experience', title: '操作', templet: '#cz', fixed: 'right'}
]]
, id: 'Reload'
, page: {
// layout: ['prev', 'page', 'next', 'count', 'skip'] //自定义分页布局
}
});
form.on('submit(load)', function (data) {
//执行重载
table.reload('Reload', {
page: {
curr: 1 //重新从第 1 页开始
}
, where: data.field
});
return false;
});
//实现额外的全选 --start
form.on('checkbox(qx)', function(data){
var checkStatus = table.checkStatus('Reload');
if(data.elem.checked){//选中
if(checkStatus.isAll==true){//已经全选
return false;
}
}else{
if(checkStatus.isAll==false){//已经全选
return false;
}
}
$('.layui-table-header thead tr th .laytable-cell-checkbox .layui-form-checkbox').trigger('click');
});
table.on('checkbox(Reload)', function(obj){
var checkStatus = table.checkStatus('Reload');
if(checkStatus.isAll==true){
$('input[name=qx]').prop("checked", true);
}else{
$('input[name=qx]').removeAttr("checked");
}
form.render(); //更新渲染
});
// 实现额外的全选 --end
$('#down').click(function(){
var checkStatus = table.checkStatus('Reload')
,data = checkStatus.data;
ids=[];
for (var i in data){
if(data[i].audit_status == 1 && data[i].goods_id>0){
ids[i] = data[i].goods_id;
}
}
if(!ids || ids.length<1) return layer.msg('没有可以操作的数据',{offset:200,icon:6});
layer.prompt(function(val, index){
if(!val) return layer.msg('请输入禁用原因',{icon:6});
layer.msg('处理中', {icon: 16,time:10000});
var data = {
goods_id:ids,
prohibit_remark:val
};
$.ajax({
url:'/goods/api/ApiProhibitGoods',
type:'post',
data:data,
dataType:'json',
timeout:10000,
success:function (res) {
if(!res) return layer.msg('网络错误,请重试',{icon:5});
layer.msg(res.errmsg,{icon:6});
if(res.errcode==0){
window.location.reload();
}
},
error:function(){
return layer.msg('网络错误,请重试',{icon:5});
}
})
});
})
});
\ No newline at end of file
layui.use(['table','form','layer','element'], function() {
var table = layui.table;
var form = layui.form;
});
\ No newline at end of file
layui.use(['table','form','laydate','layer'], function() {
var table = layui.table;
var laydate = layui.laydate;
var form = layui.form;
//自定义格式
laydate.render({
elem: 'input[name=start_time]'
, type: 'datetime'
, format: 'yyyy-MM-dd HH:mm'
});
laydate.render({
elem: 'input[name=end_time]'
, type: 'datetime'
, format: 'yyyy-MM-dd HH:mm'
});
table.render({
elem: '#list'
, url: '/offer/api/ApiOfferList'
, method: 'post'
, request: {
pageName: 'p' //页码的参数名称,默认:page
,limitName: 'limit' //每页数据量的参数名,默认:limit
}
,toolbar: true
,defaultToolbar:['filter','exports']
, loading: true
, first: true //不显示首页
, last: false //不显示尾页
, cols: [[
{field: 'inquiry_items_id', title: '询价单ID',hide:true}
,{field: 'offer_id', title: '报价单ID',hide:true}
,{field: 'company_name', title: '个人/公司名'}
,{field: 'mobile', title: '用户手机',hide:true}
, {field: 'goods_name', title: '商品型号'}
, {field: 'brand_name', title: '品牌',hide:true}
, {field: 'encap', title: '封装',hide:true}
, {field: 'price_s', title: '报价金额'}
, {field: 'number', title: '报价数量',hide:true}
, {field: 'items_num', title: '报价次数'}
, {field: 'source_s', title: '平台', templet: '#title'}
// , {field: 'status', title: '发布状态',templet:'#status'}
, {field: 'add_time_s', title: '发布时间'}
, {field: 'remark', title: '备注',hide:true}
// , {field: 'admin_name', title: '禁用管理员',hide:true}
, {field: 'experience', title: '操作', templet: '#cz', fixed: 'right'}
]]
, page: {
// layout: ['prev', 'page', 'next', 'count', 'skip'] //自定义分页布局
}
, id: 'Reload'
});
form.on('submit(load)', function (data) {
//执行重载
table.reload('Reload', {
page: {
curr: 1 //重新从第 1 页开始
}
, where: data.field
});
return false;
});
//实现额外的全选 --start
form.on('checkbox(qx)', function(data){
var checkStatus = table.checkStatus('Reload');
if(data.elem.checked){//选中
if(checkStatus.isAll==true){//已经全选
return false;
}
}else{
if(checkStatus.isAll==false){//已经全选
return false;
}
}
$('.layui-table-header thead tr th .laytable-cell-checkbox .layui-form-checkbox').trigger('click');
});
table.on('checkbox(Reload)', function(obj){
var checkStatus = table.checkStatus('Reload');
if(checkStatus.isAll==true){
$('input[name=qx]').prop("checked", true);
}else{
$('input[name=qx]').removeAttr("checked");
}
form.render(); //更新渲染
});
//实现额外的全选 --end
$('#down').click(function(){
var checkStatus = table.checkStatus('Reload')
,data = checkStatus.data;
ids=[];
for (var i in data){
if(data[i].audit_status == 1 && data[i].inquiry_items_id>0){
ids[i] = data[i].inquiry_items_id;
}
}
if(!ids || ids.length<1) return layer.msg('没有可以操作的数据',{offset:200,icon:6});
layer.prompt({title:'请输入禁用原因'},function(val, index){
if(!val) return layer.msg('请输入禁用原因',{icon:6});
layer.msg('处理中', {icon: 16,time:10000});
var data = {
inquiry_items_id:ids,
audit_remark:val
};
$.ajax({
url:'/inquiry/api/ApiProhibitInquiry',
type:'post',
data:data,
dataType:'json',
timeout:10000,
success:function (res) {
if(!res) return layer.msg('网络错误,请重试',{icon:5});
layer.msg(res.errmsg,{icon:6});
if(res.errcode==0){
window.location.reload();
}
},
error:function(){
return layer.msg('网络错误,请重试',{icon:5});
}
})
});
})
});
\ No newline at end of file
/**
* Created by ICHUNT on 2019-06-24.
*/
layui.use(['table','form','laydate','layer'], function() {
var table = layui.table;
var laydate = layui.laydate;
var form = layui.form;
//自定义格式
laydate.render({
elem: 'input[name=start_time]'
, type: 'datetime'
, format: 'yyyy-MM-dd HH:mm'
});
laydate.render({
elem: 'input[name=end_time]'
, type: 'datetime'
, format: 'yyyy-MM-dd HH:mm'
});
table.render({
elem: '#list'
, url: '/goods/api/ApiViolationGoodsList'
, method: 'post'
, request: {
pageName: 'page' //页码的参数名称,默认:page
, limitName: 'offset' //每页数据量的参数名,默认:limit
}
,toolbar: true
,defaultToolbar:['filter','exports']
, loading: true
, cols: [[
{type: 'checkbox'}
,{field: 'goods_id', title: '商品ID'}
,{field: 'company_name', title: '个人/公司名'}
, {field: 'goods_name', title: '商品型号'}
, {field: 'audit_status', title: '审核状态',templet:'#audit_status'}
, {field: 'prohibit_remark', title: '审核原因'}
, {field: 'update_time', title: '操作时间',templet:'#update_time'}
, {field: 'experience', title: '操作', templet: '#cz', fixed: 'right'}
]]
, id: 'Reload'
, page: {
// layout: ['prev', 'page', 'next', 'count', 'skip'] //自定义分页布局
}
});
form.on('submit(load)', function (data) {
//执行重载
table.reload('Reload', {
page: {
curr: 1 //重新从第 1 页开始
}
, where: data.field
});
return false;
});
//实现额外的全选 --start
form.on('checkbox(qx)', function(data){
var checkStatus = table.checkStatus('Reload');
if(data.elem.checked){//选中
if(checkStatus.isAll==true){//已经全选
return false;
}
}else{
if(checkStatus.isAll==false){//已经全选
return false;
}
}
$('.layui-table-header thead tr th .laytable-cell-checkbox .layui-form-checkbox').trigger('click');
});
table.on('checkbox(Reload)', function(obj){
var checkStatus = table.checkStatus('Reload');
if(checkStatus.isAll==true){
$('input[name=qx]').prop("checked", true);
}else{
$('input[name=qx]').removeAttr("checked");
}
form.render(); //更新渲染
});
// 实现额外的全选 --end
$('#up').click(function(){
var checkStatus = table.checkStatus('Reload')
,data = checkStatus.data;
ids=[];
for (var i in data){
if(data[i].audit_status == 2 && data[i].id>0 && data[i].goods_id>0){
ids[data[i].id] = data[i].id;
}
}
console.log(ids);
if(!ids || ids.length<1) return layer.msg('没有可以操作的数据',{offset:200,icon:6});
layer.confirm('确定批量恢复上架商品?', {
btn: ['确定','取消'] //按钮
}, function(){
layer.msg('处理中', {icon: 16,time:10000});
var data = {
id:ids
};
$.ajax({
url:'/goods/api/ApiEnableGoods',
type:'post',
data:data,
dataType:'json',
timeout:10000,
success:function (res) {
if(!res) return layer.msg('网络错误,请重试',{icon:5});
layer.msg(res.errmsg,{icon:6});
if(res.errcode==0){
window.location.reload();
}
},
error:function(){
return layer.msg('网络错误,请重试',{icon:5});
}
})
}, function(){
layer.closeAll();
return false;
});
})
});
\ No newline at end of file
var myChartiq = echarts.init(document.getElementById('inquiry'));
myChartiq.showLoading();
ajaxInquiry();
function ajaxInquiry(info){
$.ajax({
url:'/api/ApiInquiryIndex',
type:'post',
dataType:'json',
timeout:10000,
success:function (resp) {
if(!resp)return false;
ApiInquiryIndex(resp.data);
}
});
}
function ApiInquiryIndex(data){
var optioniq = {
tooltip: {
trigger: 'axis',
axisPointer: {
type: 'cross',
crossStyle: {
color: '#999'
}
}
},
xAxis: {
type: 'category',
name: '时间',
data:data.x
},
yAxis: {
type: 'value',
name: '数量'
},
series: [{
name:'询价数量',
data:data.y,
type: 'scatter'
}]
};
myChartiq.hideLoading();
myChartiq.setOption(optioniq);
}
var myChart = echarts.init(document.getElementById('main'));
myChart.showLoading();
layui.use('element', function() {
var element = layui.element;
element.on('tab(tab)', function(data){//监听tab
myChart.showLoading();
ajaxVisit($(this).html());
});
});
ajaxVisit('今日');
function ajaxVisit(info){
$.ajax({
url:'/api/ApiVisitTrend',
type:'post',
data:{
info:info
},
dataType:'json',
timeout:10000,
success:function (resp) {
if(!resp)return false;
ApiVisitTrend(resp.data);
}
});
}
function ApiVisitTrend(data){
// 指定图表的配置项和数据
var option = {
tooltip: {
trigger: 'axis',
axisPointer: {
type: 'cross',
crossStyle: {
color: '#999'
}
}
},
legend: {
data:['<5S','5-30S','>30S']
},
xAxis: [
{
type: 'category',
data: data.x
}
],
yAxis: [
{
type: 'value',
name: '访问时长',
axisLabel: {
formatter: '{value} S'
}
}
],
series: [
{
name:'<5S',
type:'bar',
data:data.y.a,
color:'#393D49'
},{
name:'5-30S',
type:'bar',
data:data.y.b,
color:'#1E9FFF'
},{
name:'>30S',
type:'bar',
data:data.y.c,
color:'#5FB878'
}
]
};
myChart.hideLoading();
myChart.setOption(option);
}
\ No newline at end of file
layui.use(['table','form','layer','element'], function() {
var table = layui.table;
var form = layui.form;
table.render({
elem: '#list'
, url: '/offer/api/ApiOfferList'
, method: 'post'
, request: {
pageName: 'p' //页码的参数名称,默认:page
,limitName: 'limit' //每页数据量的参数名,默认:limit
}
,where:{
'inquiry_items_id/eq':$('input[name=inquiry_items_id]').val()
}
,toolbar: true
,defaultToolbar:['filter','exports']
, loading: true
, first: true //不显示首页
, last: false //不显示尾页
, cols: [[
{field: 'add_time_s', title: '时间'}
,{field: 'company_name', title: '个人/公司名'}
, {field: 'goods_name', title: '商品型号'}
, {field: 'brand_name', title: '品牌'}
, {field: 'encap', title: '封装'}
, {field: 'number', title: '数量(PCS)'}
, {field: 'price_s', title: '报价'}
, {field: 'source_s', title: '平台',hide:true}
, {field: 'remark', title: '备注',hide:true}
]]
, page: {
// layout: ['prev', 'page', 'next', 'count', 'skip'] //自定义分页布局
}
, id: 'Reload'
});
});
\ No newline at end of file
layui.use(['table','form','laydate','layer'], function() {
var table = layui.table;
var laydate = layui.laydate;
var form = layui.form;
//自定义格式
laydate.render({
elem: 'input[name=start_time]'
, type: 'datetime'
, format: 'yyyy-MM-dd HH:mm'
});
laydate.render({
elem: 'input[name=end_time]'
, type: 'datetime'
, format: 'yyyy-MM-dd HH:mm'
});
table.render({
elem: '#list'
, url: '/inquiry/api/ApiInquiryList'
, method: 'post'
, request: {
pageName: 'p' //页码的参数名称,默认:page
,limitName: 'limit' //每页数据量的参数名,默认:limit
}
,toolbar: true
,defaultToolbar:['filter','exports']
, loading: true
, first: true //不显示首页
, last: false //不显示尾页
, cols: [[
{type: 'checkbox', title: '全选'}
,{field: 'inquiry_items_id', title: '询价单ID'}
,{field: 'company_name', title: '个人/公司名'}
,{field: 'mobile', title: '用户手机',hide:true}
, {field: 'goods_name', title: '商品型号'}
, {field: 'brand_name', title: '品牌',hide:true}
, {field: 'encap', title: '封装',hide:true}
, {field: 'price_s', title: '接受价',hide:true}
, {field: 'number', title: '需求数量',hide:true}
, {field: 'offer_num', title: '回复报价数'}
, {field: 'source_s', title: '平台', templet: '#title'}
, {field: 'status', title: '发布状态',templet:'#status'}
, {field: 'add_time_s', title: '发布时间'}
, {field: 'remark', title: '备注',hide:true}
, {field: 'admin_name', title: '禁用管理员',hide:true}
, {field: 'experience', title: '操作', templet: '#cz', fixed: 'right'}
]]
, page: {
// layout: ['prev', 'page', 'next', 'count', 'skip'] //自定义分页布局
}
, id: 'Reload'
});
form.on('submit(load)', function (data) {
//执行重载
table.reload('Reload', {
page: {
curr: 1 //重新从第 1 页开始
}
, where: data.field
});
return false;
});
//实现额外的全选 --start
form.on('checkbox(qx)', function(data){
var checkStatus = table.checkStatus('Reload');
if(data.elem.checked){//选中
if(checkStatus.isAll==true){//已经全选
return false;
}
}else{
if(checkStatus.isAll==false){//已经全选
return false;
}
}
$('.layui-table-header thead tr th .laytable-cell-checkbox .layui-form-checkbox').trigger('click');
});
table.on('checkbox(Reload)', function(obj){
var checkStatus = table.checkStatus('Reload');
if(checkStatus.isAll==true){
$('input[name=qx]').prop("checked", true);
}else{
$('input[name=qx]').removeAttr("checked");
}
form.render(); //更新渲染
});
//实现额外的全选 --end
$('#down').click(function(){
var checkStatus = table.checkStatus('Reload')
,data = checkStatus.data;
ids=[];
for (var i in data){
if(data[i].audit_status == 1 && data[i].inquiry_items_id>0){
ids[i] = data[i].inquiry_items_id;
}
}
if(!ids || ids.length<1) return layer.msg('没有可以操作的数据',{offset:200,icon:6});
layer.prompt({title:'请输入禁用原因'},function(val, index){
if(!val) return layer.msg('请输入禁用原因',{icon:6});
layer.msg('处理中', {icon: 16,time:10000});
var data = {
inquiry_items_id:ids,
audit_remark:val
};
$.ajax({
url:'/inquiry/api/ApiProhibitInquiry',
type:'post',
data:data,
dataType:'json',
timeout:10000,
success:function (res) {
if(!res) return layer.msg('网络错误,请重试',{icon:5});
layer.msg(res.errmsg,{icon:6});
if(res.errcode==0){
window.location.reload();
}
},
error:function(){
return layer.msg('网络错误,请重试',{icon:5});
}
})
});
})
});
\ No newline at end of file
......@@ -64,13 +64,16 @@ layui.use(['table', 'form', 'laydate', 'layer'], function () {
, {field: 'mobile', title: '注册手机号'}
, {field: 'exchanged_amount', title: '兑换金额'}
, {field: 'exchanged_amount', title: '已兑换'}
, {field: 'type', title: '兑换类型',templet: '#type'}
, {field: 'type', title: '兑换类型', templet: '#type'}
, {field: 'certification_status', title: '认证状态'}
, {field: 'status', title: '兑换状态', templet: '#status'}
, {field: 'experience', title: '操作', templet: '#operate', fixed: 'right'}
]]
, id: 'UserExchange'
, page: {}
, done: function (res, curr, count) {
}
});
......
<style>
label{
box-sizing:content-box;
}
legend{
width:auto;
border-bottom:none;
margin-bottom:auto
}
.bor0{
border: 0px;
}
</style>
<div class="layui-card">
<div class="layui-card-body" style="padding-top: 20px">
<fieldset class="layui-elem-field layui-field-title">
<legend>用户详情</legend>
<div class="layui-field-box">
<form class="layui-form" action="">
<div class="layui-form-item">
<label class="layui-form-label">个人/公司名:</label>
<div class="layui-input-inline">
<input type="text" value="{{$info['company_name'] or ''}}" class="layui-input bor0">
</div>
<label class="layui-form-label">注册账号:</label>
<div class="layui-input-inline">
<input value="{{$info['mobile'] or ''}}" class="layui-input bor0">
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">上传类型:</label>
<div class="layui-input-inline">
<input value="{{$GoodsInfo['source_name'] or ''}}" class="layui-input bor0">
</div>
<label class="layui-form-label">上传时间:</label>
<div class="layui-input-inline">
<input value="{{$GoodsInfo['update_time_s'] or ''}}" class="layui-input bor0">
</div>
</div>
</form>
</div>
</fieldset>
<fieldset class="layui-elem-field layui-field-title">
<legend>商品明细</legend>
<div class="layui-field-box">
<form class="layui-form" action="">
<div class="layui-form-item">
<label class="layui-form-label">商品型号:</label>
<div class="layui-input-inline">
<input value="{{$GoodsInfo['goods_name'] or ''}}" class="layui-input bor0">
</div>
<label class="layui-form-label">封装:</label>
<div class="layui-input-inline">
<input value="{{$GoodsInfo['encap'] or ''}}" class="layui-input bor0">
</div>
<label class="layui-form-label">单价:</label>
<div class="layui-input-inline">
<input value="{{$GoodsInfo['price'] or ''}}" class="layui-input bor0">
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">库存:</label>
<div class="layui-input-inline">
<input value="{{$GoodsInfo['stock'] or ''}}" class="layui-input bor0">
</div>
<label class="layui-form-label">货期:</label>
<div class="layui-input-inline">
<input value="{{$GoodsInfo['delivery_time'] or ''}}" class="layui-input bor0">
</div>
<label class="layui-form-label">商品图片:</label>
<div class="layui-input-block">
<img src="{{$GoodsInfo['goods_images'] or ''}}" width="150px">
</div>
</div>
</form>
</div>
</fieldset>
@if($GoodsInfo['audit_status']==1 && $GoodsInfo['status'] ==1 )
<fieldset class="layui-elem-field layui-field-title">
<legend>商品操作(当前状态上架)</legend>
<div class="layui-field-box">
<form class="layui-form" action="">
<input type="hidden" name="goods_id[]" value="{{$GoodsInfo['goods_id'] or ''}}">
<div class="layui-form-item">
<label class="layui-form-label">商品状态:</label>
<div class="layui-input-inline">
<select name="audit_status" lay-verify="required">
<option value="2">禁用</option>
</select>
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">下架原因:</label>
<div class="layui-input-inline">
<input name="prohibit_remark" lay-verify="required" class="layui-input" placeholder="请输入禁用原因">
{{--<select name="prohibit_remark" lay-verify="required">--}}
{{--<option value="请选择原因">禁用</option>--}}
{{--@foreach($GoodsProhibit as $k=>$v)--}}
{{--<option value="{{$v}}">{{$v}}</option>--}}
{{--@endforeach--}}
{{--</select>--}}
</div>
</div>
<div class="layui-form-item">
<div class="layui-input-block">
<button class="layui-btn" lay-submit lay-filter="status">立即提交</button>
<button type="reset" class="layui-btn layui-btn-primary">重置</button>
</div>
</div>
</form>
</div>
</fieldset>
@else
<fieldset class="layui-elem-field layui-field-title">
<legend>商品状态</legend>
<div class="layui-field-box">
<div class="layui-form" action="">
<div class="layui-form-item">
<label class="layui-form-label">商品状态:</label>
<div class="layui-input-inline">
<select name="audit_status" disabled>
@if($GoodsInfo['audit_status'] ==2)
<option value="">禁用</option>
@elseif($GoodsInfo['status'] == 2)
<option value="">下架</option>
@elseif($GoodsInfo['status'] == 3)
<option value="">删除</option>
@endif
</select>
</div>
</div>
</div>
</div>
</fieldset>
@endif
</div>
</div>
\ No newline at end of file
<div class="layui-card">
<div class="layui-card-body" style="padding-top: 20px">
<form class="layui-form" action="">
<div class="layui-form-item">
<div class="layui-inline">
<label class="layui-form-label">商品型号</label>
<div class="layui-input-inline">
<input type="text" name="goods_name/like" placeholder="请输入商品型号" autocomplete="off" class="layui-input">
</div>
</div>
<div class="layui-inline">
<label class="layui-form-label">会员手机号</label>
<div class="layui-input-inline">
<input type="number" name="mobile" placeholder="请输入会员手机号" autocomplete="off" class="layui-input">
</div>
</div>
<div class="layui-inline">
<label class="layui-form-label">上传类型</label>
<div class="layui-input-inline">
<select name="source" lay-search>
<option value="">全部</option>
@if(!empty($Source) && is_array($Source))
@foreach($Source as $k=>$v)
<option value="{{$k or ''}}">{{$v or ''}}</option>
@endforeach
@endif
</select>
</div>
</div>
<div class="layui-inline">
<label class="layui-form-label">更新时间</label>
<div class="layui-input-inline">
<input type="text" name="start_time" autocomplete="off" class="layui-input">
</div>
<div class="layui-form-mid">-</div>
<div class="layui-input-inline">
<input type="text" name="end_time" autocomplete="off" class="layui-input">
</div>
</div>
<div class="layui-inline">
<label class="layui-form-label">商品状态</label>
<div class="layui-input-inline">
<select name="status" lay-search>
<option value="">全部</option>
@if(!empty($GoodsStatus) && is_array($GoodsStatus))
@foreach($GoodsStatus as $k=>$v)
<option value="{{$k or ''}}">{{$v or ''}}</option>
@endforeach
@endif
</select>
</div>
</div>
<div class="layui-inline">
<button type="button" class="layui-btn layuiadmin-btn-useradmin" lay-submit="" lay-filter="load">
<i class="layui-icon layui-icon-search layuiadmin-button-btn"></i>
</button>
</div>
</div>
</form>
<table class="layui-table" id="list" lay-filter="Reload"></table>
<div class="layui-form" style="margin-top: 10px">
<input type="checkbox" lay-filter="qx" title="全选" lay-skin="primary" name="qx">
<button class="layui-btn" id="down">批量禁用</button>
</div>
</div>
</div>
<script type="text/html" id="cz">
<a href="/goods/GoodsDetails?goods_id=@{{ d.goods_id }}" class="btn btn-xs btn-outline btn-primary">
<strong>查看</strong>
</a>
@{{# if(d.auth_status==1){ }}
@{{# if(d.status==1){ }}
<a class="btn btn-xs btn-outline btn-success">
<strong>下架</strong>
</a>
@{{# } }}
@{{# } }}
</script>
<script type="text/html" id="status" style="pointer-events: none;">
@{{# if(d.audit_status==2){ }}
<a class="btn btn-xs btn-outline btn-danger"><strong>禁用</strong></a>
@{{# }else{ }}
@{{# if(d.status==1){ }}
<a class="btn btn-xs btn-outline btn-primary"><strong>上架</strong></a>
@{{# }else if(d.status==2){ }}
<a class="btn btn-xs btn-outline btn-warning"><strong>下架</strong></a>
@{{# }else if(d.status==3){ }}
<a class="btn btn-xs btn-outline btn-danger"><strong>删除</strong></a>
@{{# } }}
@{{# } }}
</script>
<script type="text/html" id="images">
<a class="btn btn-xs btn-outline btn-primary preview" data-url="@{{ d.goods_images }}" >
<strong>预览</strong>
</a>
</script>
<script type="text/html" id="update_time">
@{{ date('Y-m-d H:i',d.update_time) }}
</script>
\ No newline at end of file
<style>
legend{
width:auto;
border-bottom:none;
margin-bottom:auto
}
.layui-input{
border: none;
}
</style>
<div class="layui-card">
<div class="layui-card-body" style="padding-top: 20px">
<div class="layui-tab layui-tab-brief" lay-filter="docDemoTabBrief">
<ul class="layui-tab-title">
<li class="layui-this">报价信息</li>
<li>询价信息</li>
</ul>
<div class="layui-tab-content" >
<div class="layui-tab-item layui-show">
<fieldset class="layui-elem-field layui-field-title">
<legend>报价用户详情</legend>
<div class="layui-field-box">
<form class="layui-form" action="">
<div class="layui-form-item">
<label class="layui-form-label">个人/公司名:</label>
<div class="layui-input-block">
<input type="text" value="{{$info['company_name'] or ''}}" class="layui-input">
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">注册账号:</label>
<div class="layui-input-block">
<input type="text" value="{{$info['mobile'] or ''}}" class="layui-input">
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">发布时间:</label>
<div class="layui-input-block">
<input value="{{$offer_info['add_time_s'] or ''}}" class="layui-input bor0">
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">来源:</label>
<div class="layui-input-block">
<input value="{{$offer_info['source_s'] or '未知'}}" class="layui-input">
</div>
</div>
</form>
</div>
</fieldset>
<fieldset class="layui-elem-field layui-field-title">
<legend>报价详情</legend>
<div class="layui-field-box">
<input type="hidden" name="offer_items_info" value="{{json_encode($offer_info['items'])}}">
<table class="layui-table">
<thead>
<tr>
<th>报价时间</th>
<th>型号</th>
<th>品牌</th>
<th>封装</th>
<th>报价数量</th>
<th>货期</th>
<th>报价</th>
<th>备注</th>
</tr>
</thead>
<tbody>
@if(!empty($offer_info['items']))
@foreach($offer_info['items'] as $k=>$v)
<tr>
<td>{{$v['add_time_s'] or ''}}</td>
<td>{{$v['goods_name'] or ''}}</td>
<td>{{$v['brand_name'] or ''}}</td>
<td>{{$v['encap'] or ''}}</td>
<td>{{$v['number'] or ''}}</td>
<td>{{$v['delivery_time'] or ''}}</td>
<td>{{$v['price_s'] or ''}}</td>
<td>{{$v['remark'] or ''}}</td>
</tr>
@endforeach
@endif
</tbody>
</table>
</div>
</fieldset>
</div>
<div class="layui-tab-item">
<fieldset class="layui-elem-field layui-field-title">
<legend>询价商品明细</legend>
<div class="layui-field-box">
<form class="layui-form" action="">
<div class="layui-form-item">
<label class="layui-form-label">商品型号:</label>
<div class="layui-input-block">
<input value="{{$inquiry_info['goods_name'] or ''}}" class="layui-input">
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">品牌:</label>
<div class="layui-input-block">
<input value="{{$inquiry_info['brand_name'] or '未填写'}}" class="layui-input">
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">封装:</label>
<div class="layui-input-block">
<input value="{{$inquiry_info['encap'] or '未填写'}}" class="layui-input">
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">接受价:</label>
<div class="layui-input-block">
<input value="{{$inquiry_info['currency_s'] or ''}} {{$inquiry_info['price'] or ''}}" class="layui-input">
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">需求数量:</label>
<div class="layui-input-block">
<input value="{{$inquiry_info['number'] or ''}}" class="layui-input">
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">货期:</label>
<div class="layui-input-block">
<input value="{{$inquiry_info['delivery_time'] or ''}}" class="layui-input">
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">备注:</label>
<div class="layui-input-block">
<input value="{{$inquiry_info['remark'] or ''}}" class="layui-input">
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">商品图片:</label>
<div class="layui-input-block">
<img src="{{$inquiry_info['goods_images'] or ''}}" width="150px">
</div>
</div>
</form>
</div>
</fieldset>
</div>
</div>
</div>
</div>
</div>
\ No newline at end of file
<div class="layui-card">
<div class="layui-card-body" style="padding-top: 20px">
<form class="layui-form" action="">
<div class="layui-form-item">
<div class="layui-inline">
<label class="layui-form-label">发布人</label>
<div class="layui-input-inline">
<input type="text" name="mobile" placeholder="请输入手机号" autocomplete="off" class="layui-input">
</div>
</div>
<div class="layui-inline">
<label class="layui-form-label">报价型号</label>
<div class="layui-input-inline">
<input type="text" name="goods_name/like" placeholder="请输入询价型号" autocomplete="off" class="layui-input">
</div>
</div>
<div class="layui-inline">
<label class="layui-form-label">平台选择</label>
<div class="layui-input-inline">
<select name="source/eq" lay-search>
<option value="">全部</option>
@if(!empty($Source) && is_array($Source))
@foreach($Source as $k=>$v)
<option value="{{$k or ''}}">{{$v or ''}}</option>
@endforeach
@endif
</select>
</div>
</div>
<div class="layui-inline">
<label class="layui-form-label">发布时间</label>
<div class="layui-input-inline">
<input type="text" name="start_time" autocomplete="off" class="layui-input">
</div>
<div class="layui-form-mid">-</div>
<div class="layui-input-inline">
<input type="text" name="end_time" autocomplete="off" class="layui-input">
</div>
</div>
<div class="layui-inline">
<button type="button" class="layui-btn layuiadmin-btn-useradmin" lay-submit="" lay-filter="load">
<i class="layui-icon layui-icon-search layuiadmin-button-btn"></i>
</button>
</div>
</div>
</form>
<table class="layui-table" id="list" lay-filter="Reload"></table>
</div>
</div>
<script type="text/html" id="cz">
<a href="/offer/OfferDetails?offer_id=@{{ d.offer_id }}" class="btn btn-xs btn-outline btn-primary">
<strong>查看</strong>
</a>
</script>
<script type="text/html" id="status" style="pointer-events: none;">
@{{# if(d.audit_status==2){ }}
<a class="btn btn-xs btn-outline btn-danger"><strong>禁用</strong></a>
@{{# }else{ }}
@{{# if(d.status==1){ }}
<a class="btn btn-xs btn-outline btn-primary"><strong>上架</strong></a>
@{{# }else if(d.status==2){ }}
<a class="btn btn-xs btn-outline btn-warning"><strong>下架</strong></a>
@{{# }else if(d.status==3){ }}
<a class="btn btn-xs btn-outline btn-danger"><strong>删除</strong></a>
@{{# } }}
@{{# } }}
</script>
<script type="text/html" id="images">
<a class="btn btn-xs btn-outline btn-primary preview" data-url="@{{ d.goods_images }}" >
<strong>预览</strong>
</a>
</script>
\ No newline at end of file
<div class="layui-card">
<div class="layui-card-body" style="padding-top: 20px">
<form class="layui-form" action="">
<div class="layui-form-item">
<div class="layui-inline">
<label class="layui-form-label">会员手机号</label>
<div class="layui-input-inline">
<input type="number" name="mobile" placeholder="请输入会员手机号" autocomplete="off" class="layui-input">
</div>
</div>
<div class="layui-inline">
<label class="layui-form-label">操作时间</label>
<div class="layui-input-inline">
<input type="text" name="start_time" autocomplete="off" class="layui-input">
</div>
<div class="layui-form-mid">-</div>
<div class="layui-input-inline">
<input type="text" name="end_time" autocomplete="off" class="layui-input">
</div>
</div>
<div class="layui-inline">
<label class="layui-form-label">审核状态</label>
<div class="layui-input-inline">
<select name="audit_status" lay-search>
<option value="">全部</option>
@if(!empty($audit_status) && is_array($audit_status))
@foreach($audit_status as $k=>$v)
<option value="{{$k or ''}}">{{$v or ''}}</option>
@endforeach
@endif
</select>
</div>
</div>
<div class="layui-inline">
<button type="button" class="layui-btn layuiadmin-btn-useradmin" lay-submit="" lay-filter="load">
<i class="layui-icon layui-icon-search layuiadmin-button-btn"></i>
</button>
</div>
</div>
</form>
<table class="layui-table" id="list" lay-filter="Reload"></table>
<div class="layui-form">
<input type="checkbox" lay-filter="qx" title="全选" lay-skin="primary" name="qx">
<button class="layui-btn" id="up" style="margin-top: 5px">批量恢复</button>
</div>
</div>
</div>
<script type="text/html" id="cz">
<a href="/goods/GoodsDetails?goods_id=@{{ d.goods_id }}" class="btn btn-xs btn-outline btn-primary">
<strong>查看</strong>
</a>
</script>
<script type="text/html" id="audit_status" style="pointer-events: none;">
@{{# if(d.audit_status==2){ }}
<a class="btn btn-xs btn-outline btn-danger"><strong>禁用中</strong></a>
@{{# }else{ }}
<a class="btn btn-xs btn-outline btn-primary"><strong>已恢复</strong></a>
@{{# } }}
</script>
<script type="text/html" id="images">
<a class="btn btn-xs btn-outline btn-primary preview" data-url="@{{ d.goods_images }}" >
<strong>预览</strong>
</a>
</script>
<script type="text/html" id="update_time">
@{{ date('Y-m-d H:i',d.update_time) }}
</script>
\ No newline at end of file
<script src="/js/echarts.min.js"></script>
@include('web.index.one')
@include('web.index.two')
@include('web.index.three')
@include('web.index.four')
\ No newline at end of file
<div class="layui-col-sm5">
<div class="layui-card">
<div class="layui-card-header">
询价数量指标
</div>
<div class="layui-card-body">
<div class="layui-row">
<div class="layui-col-sm12">
<div class="layui-carousel layadmin-carousel layadmin-dataview" data-anim="fade" lay-filter="LAY-index-pagetwo" lay-anim="fade" style="width: 100%; height: 280px;">
<div carousel-item="" id="LAY-index-pagetwo">
<div class="layui-this" id="inquiry"></div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
\ No newline at end of file
<div class="layui-col-sm6 layui-col-md4">
<div class="layui-card">
<div class="layui-card-header">
今日询价单(条)
<span class="layui-badge layui-bg-blue layuiadmin-badge"></span>
</div>
<div class="layui-card-body layuiadmin-card-list">
<p class="layuiadmin-big-font today">0</p>
<p>
昨日询价:
<span class="yesterday">0</span>
</p>
</div>
</div>
</div>
<div class="layui-col-sm6 layui-col-md4">
<div class="layui-card">
<div class="layui-card-header">
今回复报价(条)
<span class="layui-badge layui-bg-blue layuiadmin-badge"></span>
</div>
<div class="layui-card-body layuiadmin-card-list">
<p class="layuiadmin-big-font today_offer">0</p>
<p>
昨日回复报价:
<span class="yesterday_offer">0</span>
</p>
</div>
</div>
</div>
<div class="layui-col-sm6 layui-col-md4">
<div class="layui-card">
<div class="layui-card-header">
总注册人数(人)
<span class="layui-badge layui-bg-blue layuiadmin-badge"></span>
</div>
<div class="layui-card-body layuiadmin-card-list">
<p class="layuiadmin-big-font reg_count">0</p>
<p>
昨日注册:
<span class="yesterday_reg">0</span>
</p>
</div>
</div>
</div>
<script>
one();
function one() {
$.ajax({
url:'/api/ApiIndexOne',
type:'post',
dataType:'json',
timeout:10000,
success:function (resp) {
if(!resp)return false;
if(resp.errcode==0){
$.each(resp.data,function(k,v){
$('.'+k).html(v)
})
}
}
});
}
</script>
\ No newline at end of file
<div class="layui-col-sm7">
<div class="layui-card">
<div class="layui-card-header">
访问时长趋势
<div class="layui-btn-group layuiadmin-btn-group">
<div class="layui-tab layui-tab-brief" lay-filter="tab">
<ul class="layui-tab-title">
<li class="layui-this">今日</li>
<li>本周</li>
<li>本月</li>
<li>全年</li>
</ul>
<div class="layui-tab-content"></div>
</div>
</div>
</div>
<div class="layui-card-body">
<div class="layui-row">
<div class="layui-col-sm12">
<div class="layui-carousel layadmin-carousel layadmin-dataview" data-anim="fade" lay-filter="LAY-index-pagetwo" lay-anim="fade" style="width: 100%; height: 280px;">
<div carousel-item="" id="LAY-index-pagetwo">
<div class="layui-this" id="main"></div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="layui-col-md12">
<div class="layui-card">
<div class="layui-card-header">待办事项</div>
<div class="layui-card-body">
<div class="layui-carousel layadmin-carousel layadmin-backlog" style="width: 100%; height:115px !important;">
<div carousel-item="">
<ul class="layui-row layui-col-space10 layui-this">
<li class="layui-col-xs2">
<a lay-href="app/content/comment" class="layadmin-backlog-body">
<h3>新用户认证待审</h3>
<p><cite class="wait_auth">0</cite></p>
</a>
</li>
<li class="layui-col-xs2">
<a lay-href="app/forum/list" class="layadmin-backlog-body">
<h3>新上传商品待审</h3>
<p><cite class="goods_auth">0</cite></p>
</a>
</li>
<li class="layui-col-xs2">
<a lay-href="template/goodslist" class="layadmin-backlog-body">
<h3>新询价待审</h3>
<p><cite class="inquiry_auth">0</cite></p>
</a>
</li>
<li class="layui-col-xs2">
<a href="javascript:;" onclick="layer.tips('不跳转', this, {tips: 3});" class="layadmin-backlog-body">
<h3>新回复待审</h3>
<p><cite class="offer_auth">0</cite></p>
</a>
</li>
<li class="layui-col-xs2">
<a href="javascript:;" onclick="layer.tips('不跳转', this, {tips: 3});" class="layadmin-backlog-body">
<h3>新积分提现</h3>
<p><cite class="integral_extract">0</cite></p>
</a>
</li>
</ul>
</div>
</div>
</div>
</div>
</div>
<script>
one();
function one() {
$.ajax({
url:'/api/ApiIndextwo',
type:'post',
dataType:'json',
timeout:10000,
success:function (resp) {
if(!resp)return false;
if(resp.errcode==0){
$.each(resp.data,function(k,v){
$('.'+k).html(v)
})
}
}
});
}
</script>
\ No newline at end of file
<style>
legend{
width:auto;
border-bottom:none;
margin-bottom:auto
}
.layui-input{
border: none;
}
</style>
<div class="layui-card">
<div class="layui-card-body" style="padding-top: 20px">
<div class="layui-tab layui-tab-brief" lay-filter="docDemoTabBrief">
<ul class="layui-tab-title">
<li class="layui-this">询价信息</li>
<li>报价详情</li>
</ul>
<div class="layui-tab-content" >
<div class="layui-tab-item layui-show">
<fieldset class="layui-elem-field layui-field-title">
<legend>用户详情</legend>
<div class="layui-field-box">
<form class="layui-form" action="">
<div class="layui-form-item">
<label class="layui-form-label">个人/公司名:</label>
<div class="layui-input-block">
<input type="text" value="{{$info['company_name'] or ''}}" class="layui-input">
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">注册账号:</label>
<div class="layui-input-block">
<input type="text" value="{{$info['mobile'] or ''}}" class="layui-input">
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">发布时间:</label>
<div class="layui-input-block">
<input value="{{$inquiry_info['add_time_s'] or ''}}" class="layui-input bor0">
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">来源:</label>
<div class="layui-input-block">
<input value="{{$inquiry_info['source_s'] or '未知'}}" class="layui-input">
</div>
</div>
</form>
</div>
</fieldset>
<fieldset class="layui-elem-field layui-field-title">
<legend>询价商品明细</legend>
<div class="layui-field-box">
<form class="layui-form" action="">
<div class="layui-form-item">
<label class="layui-form-label">商品型号:</label>
<div class="layui-input-block">
<input value="{{$inquiry_info['goods_name'] or ''}}" class="layui-input">
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">品牌:</label>
<div class="layui-input-block">
<input value="{{$inquiry_info['brand_name'] or '未填写'}}" class="layui-input">
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">封装:</label>
<div class="layui-input-block">
<input value="{{$inquiry_info['encap'] or '未填写'}}" class="layui-input">
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">接受价:</label>
<div class="layui-input-block">
<input value="{{$inquiry_info['currency_s'] or ''}} {{$inquiry_info['price'] or ''}}" class="layui-input">
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">需求数量:</label>
<div class="layui-input-block">
<input value="{{$inquiry_info['number'] or ''}}" class="layui-input">
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">货期:</label>
<div class="layui-input-block">
<input value="{{$inquiry_info['delivery_time'] or ''}}" class="layui-input">
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">备注:</label>
<div class="layui-input-block">
<input value="{{$inquiry_info['remark'] or ''}}" class="layui-input">
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">商品图片:</label>
<div class="layui-input-block">
<img src="{{$inquiry_info['goods_images'] or ''}}" width="150px">
</div>
</div>
</form>
</div>
</fieldset>
</div>
<div class="layui-tab-item">
<input type="hidden" name="inquiry_items_id" value="{{(string)$inquiry_info['inquiry_items_id']}}">
<table class="layui-table" id="list" lay-filter="Reload"></table>
</div>
</div>
</div>
</div>
</div>
\ No newline at end of file
<div class="layui-card">
<div class="layui-card-body" style="padding-top: 20px">
<form class="layui-form" action="">
<div class="layui-form-item">
<div class="layui-inline">
<label class="layui-form-label">发布人</label>
<div class="layui-input-inline">
<input type="text" name="mobile" placeholder="请输入手机号" autocomplete="off" class="layui-input">
</div>
</div>
<div class="layui-inline">
<label class="layui-form-label">询价型号</label>
<div class="layui-input-inline">
<input type="text" name="goods_name/like" placeholder="请输入询价型号" autocomplete="off" class="layui-input">
</div>
</div>
<div class="layui-inline">
<label class="layui-form-label">平台选择</label>
<div class="layui-input-inline">
<select name="source/eq" lay-search>
<option value="">全部</option>
@if(!empty($Source) && is_array($Source))
@foreach($Source as $k=>$v)
<option value="{{$k or ''}}">{{$v or ''}}</option>
@endforeach
@endif
</select>
</div>
</div>
<div class="layui-inline">
<label class="layui-form-label">发布状态</label>
<div class="layui-input-inline">
<select name="status/eq" lay-search>
<option value="">全部</option>
@if(!empty($Status) && is_array($Status))
@foreach($Status as $k=>$v)
<option value="{{$k or ''}}">{{$v or ''}}</option>
@endforeach
@endif
</select>
</div>
</div>
<div class="layui-inline">
<label class="layui-form-label">审核状态</label>
<div class="layui-input-inline">
<select name="audit_status/eq" lay-search>
<option value="">全部</option>
@if(!empty($audit_status) && is_array($audit_status))
@foreach($audit_status as $k=>$v)
<option value="{{$k or ''}}">{{$v or ''}}</option>
@endforeach
@endif
</select>
</div>
</div>
<div class="layui-inline">
<label class="layui-form-label">发布时间</label>
<div class="layui-input-inline">
<input type="text" name="start_time" autocomplete="off" class="layui-input">
</div>
<div class="layui-form-mid">-</div>
<div class="layui-input-inline">
<input type="text" name="end_time" autocomplete="off" class="layui-input">
</div>
</div>
<div class="layui-inline">
<button type="button" class="layui-btn layuiadmin-btn-useradmin" lay-submit="" lay-filter="load">
<i class="layui-icon layui-icon-search layuiadmin-button-btn"></i>
</button>
</div>
</div>
</form>
<table class="layui-table" id="list" lay-filter="Reload"></table>
<div class="layui-form">
<input type="checkbox" lay-filter="qx" title="全选" lay-skin="primary" name="qx">
<button class="layui-btn" id="down" style="margin-top: 5px">批量下架</button>
</div>
</div>
</div>
<script type="text/html" id="cz">
<a href="/inquiry/inquiryDetails?inquiry_items_id=@{{ d.inquiry_items_id }}" class="btn btn-xs btn-outline btn-primary">
<strong>查看</strong>
</a>
</script>
<script type="text/html" id="status" style="pointer-events: none;">
@{{# if(d.audit_status==2){ }}
<a class="btn btn-xs btn-outline btn-danger"><strong>禁用</strong></a>
@{{# }else{ }}
@{{# if(d.status==1){ }}
<a class="btn btn-xs btn-outline btn-primary"><strong>上架</strong></a>
@{{# }else if(d.status==2){ }}
<a class="btn btn-xs btn-outline btn-warning"><strong>下架</strong></a>
@{{# }else if(d.status==3){ }}
<a class="btn btn-xs btn-outline btn-danger"><strong>删除</strong></a>
@{{# } }}
@{{# } }}
</script>
<script type="text/html" id="images">
<a class="btn btn-xs btn-outline btn-primary preview" data-url="@{{ d.goods_images }}" >
<strong>预览</strong>
</a>
</script>
\ No newline at end of file
......@@ -13,15 +13,6 @@
Route::group(['middleware' => 'web'], function () {
Route::get('/', 'WebController@Entrance');
Route::get('/xxx', 'WebController@Entrance');
Route::get('/web/index', 'WebController@Entrance');
Route::match(['get', 'post'], '/goods/{key}', 'GoodsWebController@Entrance');
Route::match(['get', 'post'], '/goods/api/{key}', 'GoodsApiController@Entrance');
Route::match(['get', 'post'], '/api/{key}', 'ApiController@Entrance');
Route::match(['get', 'post'], '/inquiry/{key}', 'InquiryWebController@Entrance');
Route::match(['get', 'post'], '/inquiry/api/{key}', 'InquiryApiController@Entrance');
Route::match(['get', 'post'], '/offer/{key}', 'OfferWebController@Entrance');
Route::match(['get', 'post'], '/offer/api/{key}', 'OfferApiController@Entrance');
Route::match(['get', 'post'], '/integrals/{key}', 'IntegralsController@Entrance');
Route::match(['get', 'post'], '/user_integrals/{key}', 'UserIntegralsController@Entrance');
......
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