v1.0

parent b619602f
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
namespace App\Http\Controllers; namespace App\Http\Controllers;
use App\Model\ExportModel; use App\Model\ExportModel;
use App\Model\GoodsAuditModel;
use App\Model\Server\ServerFinanceModel; use App\Model\Server\ServerFinanceModel;
use App\Model\Server\ServerPurModel; use App\Model\Server\ServerPurModel;
use App\Model\SupplierAccountModel; use App\Model\SupplierAccountModel;
...@@ -68,6 +69,10 @@ class ApiController extends Controller ...@@ -68,6 +69,10 @@ class ApiController extends Controller
private function ApiAccountCheckingListExport($request, $id){ private function ApiAccountCheckingListExport($request, $id){
ExportModel::ApiAccountCheckingListExport($request); ExportModel::ApiAccountCheckingListExport($request);
} }
//价格审核列表
private function ApiGoodsAuditList($request, $id){
(new GoodsAuditModel())->getList($request->input());
}
//获取对账单列表明细 //获取对账单列表明细
private function ApiAccountCheckingDetail($request, $id){ private function ApiAccountCheckingDetail($request, $id){
(new ServerFinanceModel($request->appid,$request->key))->accountCheckingDetail($request->input()); (new ServerFinanceModel($request->appid,$request->key))->accountCheckingDetail($request->input());
......
...@@ -21,6 +21,7 @@ class WebController extends Controller ...@@ -21,6 +21,7 @@ class WebController extends Controller
$data['URL_ICHUNT'] = config("website.URL_ICHUNT"); $data['URL_ICHUNT'] = config("website.URL_ICHUNT");
$data['_DOMAIN_'] = config("website.domain"); $data['_DOMAIN_'] = config("website.domain");
$data['mobile'] = $request->mobile; $data['mobile'] = $request->mobile;
$data['time']=time();
return $this->$id($request,$data,$id); return $this->$id($request,$data,$id);
} }
...@@ -45,61 +46,56 @@ class WebController extends Controller ...@@ -45,61 +46,56 @@ class WebController extends Controller
//修改登录密码 //修改登录密码
private function ResetPassword($request,$data,$id){ private function ResetPassword($request,$data,$id){
$data['title']='修改登录密码'; $data['title']='修改登录密码';
$data['time']=time();
return view('pc',$data); return view('pc',$data);
} }
//找回密码 //找回密码
private function ForgetPassword($request,$data,$id){ private function ForgetPassword($request,$data,$id){
$data['title']='忘记密码'; $data['title']='忘记密码';
$data['time']=time();
return view('pc.ForgetPassword',$data); return view('pc.ForgetPassword',$data);
} }
//商品列表 //商品列表
private function GoodsList($request,$data,$id){ private function GoodsList($request,$data,$id){
$data['title']='商品列表'; $data['title']='商品列表';
$data['time']=time();
return view('pc',$data); return view('pc',$data);
} }
//订单列表 //订单列表
private function OrderList($request,$data,$id){ private function OrderList($request,$data,$id){
$data['title']='订单列表'; $data['title']='订单列表';
$data['time']=time(); return view('pc',$data);
}
//价格审核列表
private function GoodsAuditList($request,$data,$id){
$data['title']='价格审核列表';
return view('pc',$data); return view('pc',$data);
} }
//订单详情 //订单详情
private function OrderDetail($request,$data,$id){ private function OrderDetail($request,$data,$id){
$data['title']='订单详情'; $data['title']='订单详情';
$data['time']=time();
return view('pc',$data); return view('pc',$data);
} }
//退货列表 //退货列表
private function AbnormalList($request,$data,$id){ private function AbnormalList($request,$data,$id){
$data['title']='退货列表'; $data['title']='退货列表';
$data['time']=time();
return view('pc',$data); return view('pc',$data);
} }
//退货详情 //退货详情
private function AbnormalDetail($request,$data,$id){ private function AbnormalDetail($request,$data,$id){
$data['title']='退货详情'; $data['title']='退货详情';
$data['time']=time();
return view('pc',$data); return view('pc',$data);
} }
//退货列表 //退货列表
private function StockRefundList($request,$data,$id){ private function StockRefundList($request,$data,$id){
$data['title']='欢迎使用云芯系统'; $data['title']='欢迎使用云芯系统';
$data['time']=time();
return view('pc',$data); return view('pc',$data);
} }
//财务对账列表 //财务对账列表
private function CheckingList($request,$data,$id){ private function CheckingList($request,$data,$id){
$data['title']='对账列表'; $data['title']='对账列表';
$data['time']=time();
return view('pc',$data); return view('pc',$data);
} }
//财务对账列表-明细 //财务对账列表-明细
private function CheckingDetail($request,$data,$id){ private function CheckingDetail($request,$data,$id){
$data['title']='对账详情'; $data['title']='对账详情';
$data['time']=time();
return view('pc',$data); return view('pc',$data);
} }
......
<?php
namespace App\Map;
class GoodsAuditMap{
//商品审核: -1审核驳回 0 未审核 1 审核通过
const STATUS_REJECT = -1;
const STATUS_NO = 0;
const STATUS_PASS = 1;
static $status =[
self::STATUS_REJECT => "审核驳回",
self::STATUS_NO => "未审核",
self::STATUS_PASS => "审核通过",
];
}
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
namespace App\Model; namespace App\Model;
use App\Map\GoodsAuditMap;
use ClassPreloader\Config; use ClassPreloader\Config;
use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\Model;
use League\Flysystem\Exception; use League\Flysystem\Exception;
...@@ -16,67 +17,48 @@ class GoodsAuditModel extends Model ...@@ -16,67 +17,48 @@ class GoodsAuditModel extends Model
protected $primaryKey='id'; protected $primaryKey='id';
public $timestamps = false; public $timestamps = false;
//列表 //列表
public function getList($input,$supplier_id = "") public function getList($input,$supplier_id)
{ {
$arr = ['p', 'limit','create_time1','create_time2']; if (empty($supplier_id)) return [1001,'供应商ID不得为空'];
$input=TrimX($input,true,$arr);
//查询数据 //查询数据
$list = $this->where(function ($query) use ($input,$supplier_id) { $list = $this->where(function ($query) use ($input,$supplier_id) {
$query->where('supplier_id', '=', $supplier_id); $query->where('supplier_id', '=', $supplier_id);
foreach ($input as $k => $v){ foreach ($input as $k => $v){
$v = trim($v); $v = trim($v);
if (!$v) continue;
switch ($k){ switch ($k){
case "p": case "goods_code":
case "limit": case "goods_name":
continue; case "status":
break; case "brand_name":
case "create_time1": $query->where($k,$v);
$query->where('create_time', '>=', strtotime($v));
break;
case "create_time2":
$query->where('create_time', '<=',strtotime($v));
break; break;
} }
} }
}); });
$list = $list->orderBy('create_time','desc')->paginate(@$input['limit'] ? @$input['limit'] : 10, ['*'], 'p', @$input['p'] ? @$input['p']:1 )->toArray(); $list = $list->orderBy('create_time','desc')->paginate(@$input['limit'] ? @$input['limit'] : 10, ['*'], 'p', @$input['p'] ? @$input['p']:1 )->toArray();
if (!$list) return [20001, '没有数据']; if (!$list) return [20001, '没有数据'];
$changeType = StockChangeItemsMap::$change_type; $status = GoodsAuditMap::$status;
$OutData = []; //返回数据
foreach ($list['data'] as $k=>&$v){ foreach ($list['data'] as $k=>&$v){
array_push($OutData,[ $v['status'] = $status[$v['status']];
'change_type'=>$changeType[$v['change_type']],
'create_time'=>timeToDate($v['create_time']),
'doc_sn'=>$v['change_type'] == 1 ? $v['picking_sn'] : $v['abnormal_sn'],
'change_number'=>$v['change_number']
]);
} }
return [0, '成功', $OutData, $list['total']]; return [0, '成功', $list['data'], $list['total']];
} }
/* /*
* 忘记密码 * 价格审核
* @param int $account_id 账号id * @param int $id 审核id
* @param int $status 状态:-1审核驳回 0 未审核 1:审核通过
*/ */
public function ForgetPassword($request){ public function exmine($id,$status){
if(!in_array($status,[-1,0,1])){
$account_name = $request->input('account_name'); return [1001,'状态不正确'];
$new_password = $request->input('new_password');
$mobile_code= Request::input('moblie_code');//手机验证码
$yunxin_mobile_code = Redis::get('yunxin_mobile_code_'.$account_name);
if ($yunxin_mobile_code != $mobile_code){
return [1001,'手机验证码不正确'];
} }
$info = $this->where("id",$id)->first();
$account = $this->where("id",$request->account_id)->first(); if (!$info){
if (!$account){
return [1002,'不存在此账号']; return [1002,'不存在此账号'];
} }
if (utf8_strlen($new_password) != 32 ) return [1001,'新密码长度不对']; $this->where("id",$id)->update(['status'=>$status]);
$password = createPassword($new_password); return [0,"审核成功"];
$this->where("id",$request->account_id)->update(['password'=>$password]);
Redis::del("yunxin_login_".$request->yunxin_token); //删除缓存
return [0,"成功,请登录"];
} }
} }
\ No newline at end of file
...@@ -70,7 +70,7 @@ body { overflow-x: hidden; } ...@@ -70,7 +70,7 @@ body { overflow-x: hidden; }
.lx-head .page-width .r .text .icn { background-position: -92px -4px; width: 16px; height: 16px; } .lx-head .page-width .r .text .icn { background-position: -92px -4px; width: 16px; height: 16px; }
.lx-head .page-width .r .text span { font-size: 14px; color: #353535; margin-left: 8px; } .lx-head .page-width .r .text span { font-size: 14px; color: #353535; margin-left: 8px; }
.lx-head .page-width .r .info-wrap { position: relative; width: 213px; height: 100%; background: url("../images/shang.png") no-repeat center; background-size: cover; } .lx-head .page-width .r .info-wrap { position: relative; width: 213px; height: 100%; background: url("../images/shang.png") no-repeat center; background-size: cover; }
.lx-head .page-width .r .info-wrap .no-login, .lx-head .page-width .r .info-wrap .login { padding: 24px 0 0 69px; display: block; } .lx-head .page-width .r .info-wrap .no-login, .lx-head .page-width .r .info-wrap .login { padding: 9px 0 0 69px; display: block; }
.lx-head .page-width .r .info-wrap .no-login .ico-1, .lx-head .page-width .r .info-wrap .login .ico-1 { background-position: -118px -2px; width: 40px; height: 40px; } .lx-head .page-width .r .info-wrap .no-login .ico-1, .lx-head .page-width .r .info-wrap .login .ico-1 { background-position: -118px -2px; width: 40px; height: 40px; }
.lx-head .page-width .r .info-wrap .no-login .ico-2, .lx-head .page-width .r .info-wrap .login .ico-2 { background-position: -169px -9px; width: 13px; height: 7px; } .lx-head .page-width .r .info-wrap .no-login .ico-2, .lx-head .page-width .r .info-wrap .login .ico-2 { background-position: -169px -9px; width: 13px; height: 7px; }
.lx-head .page-width .r .info-wrap .no-login span, .lx-head .page-width .r .info-wrap .login span { margin: 0 10px 0 9px; font-size: 14px; color: #ffffff; } .lx-head .page-width .r .info-wrap .no-login span, .lx-head .page-width .r .info-wrap .login span { margin: 0 10px 0 9px; font-size: 14px; color: #ffffff; }
......
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
"<td><span class=\"t1\">"+s.supplier_brand_name+"</span></td>" + "<td><span class=\"t1\">"+s.supplier_brand_name+"</span></td>" +
"<td><span class=\"t1\">"+s.encap+"</span></td>" + "<td><span class=\"t1\">"+s.encap+"</span></td>" +
"<td><span class=\"t1\">"+s.mpq+"</span></td>" + "<td><span class=\"t1\">"+s.mpq+"</span></td>" +
"<td><span class=\"t1\">"+s.putaway_number+"</span></td>" + "<td><span class=\"t1\">"+s.real_number+"</span></td>" +
"<td><span class=\"t1\">"+s.initial_price+"</span></td>" + "<td><span class=\"t1\">"+s.initial_price+"</span></td>" +
"</tr>" "</tr>"
} }
......
;!function () {
window.app = {
init: function () {
app.tableList(1);
//刷新搜索
$("#search").click(function () {
app.tableList(1)
})
},
tableList:function (page) {
var res = ajax_push(URL_YUNXIN + '/api/ApiGoodsAuditList',{'p':page,'abnormal_id':$("#abnormal_id").val()})
if (res.errcode == 0) {
var html;
for (i = 0; i < res.data.length; i++) {
var s = res.data[i];
html += "<tr class=\"you\"> " +
"<td><span class=\"t1\">"+s.supplier_goods_id+"</span></td>" +
"<td><span class=\"t1\">"+s.goods_name+"</span></td>" +
"<td><span class=\"t1\">"+s.supplier_brand_name+"</span></td>" +
"<td><span class=\"t1\">"+s.encap+"</span></td>" +
"<td><span class=\"t1\">"+s.mpq+"</span></td>" +
"<td><span class=\"t1\">"+s.real_number+"</span></td>" +
"<td><span class=\"t1\">"+s.initial_price+"</span></td>" +
"</tr>"
}
$("#shopListContent").html(html)
layui.laypage.render({
elem: 'pagination',
theme: '#1080d0',
count: res.count,
groups:10,
curr: page,
jump:function (obj, first) {
if(!first){
app.tableList(obj.curr)
}
}
});
} else {
alert_err(res.errmsg)
return false;
}
}
}, $(function () {
app.init();
})
}();
\ No newline at end of file
...@@ -79,18 +79,24 @@ ...@@ -79,18 +79,24 @@
</dd> </dd>
</dl> </dl>
</li> </li>
<li> <li class="<?php if( in_array($id,['GoodsAuditList','GoodsList','GoodsDetail']) !== false ) echo "curr" ?>">
<a href="javascript:;" class="bx"> <a href="javascript:;" class="bx">
<i class="iconfont icon-shangpinguanli- va-m"></i> <i class="iconfont icon-shangpinguanli- va-m"></i>
<span class="t1 lineBlock va-m">商品管理</span> <span class="t1 lineBlock va-m">商品管理</span>
<b class="iconfont icon-xiala-"></b> <b class="iconfont icon-xiala-"></b>
</a> </a>
<dl <?php if( in_array($id,['GoodsList','GoodsDetail']) !== false ) echo "style='display: block;'" ?>> <dl >
<dd class="curr"> <dd class="<?php if( in_array($id,['GoodsList','GoodsDetail']) !== false ) echo "curr" ?>">
<i class="line"></i> <i class="line"></i>
<a href="/web/GoodsList">商品列表</a> <a href="/web/GoodsList">商品列表</a>
</dd> </dd>
</dl> </dl>
<dl >
<dd class="<?php if( in_array($id,['GoodsAuditList']) !== false ) echo "curr" ?>">
<i class="line"></i>
<a href="/web/GoodsAuditList">价格审核列表</a>
</dd>
</dl>
</li> </li>
<li class="<?php if( in_array($id,['OrderList','OrderDetail','AbnormalList','AbnormalDetail']) !== false ) echo "curr" ?>"> <li class="<?php if( in_array($id,['OrderList','OrderDetail','AbnormalList','AbnormalDetail']) !== false ) echo "curr" ?>">
<a href="javascript:;" class="bx"> <a href="javascript:;" class="bx">
......
...@@ -40,7 +40,7 @@ ...@@ -40,7 +40,7 @@
<th>品牌<b></b></th> <th>品牌<b></b></th>
<th>封装</th> <th>封装</th>
<th>包装方式</th> <th>包装方式</th>
<th>入库数量</th> <th>数量</th>
<th>单价</th> <th>单价</th>
</tr> </tr>
<tbody id="shopListContent"> <tbody id="shopListContent">
......
<div class="lx-content-r fr">
<div class="tit-bar">
<a href="">库存管理</a>
<span>&gt;</span>
<a class="text" href="">订单列表</a>
</div>
<div class="con-section shop-list">
<p class="text">订单列表</p>
<form action="">
<div class="search-bar">
<div class="lineBlock input-inline va-m">
<label class="tag">商品编码:</label>
<input type="text" class="inp w180" name="order_sn" >
</div>
<div class="lineBlock input-inline va-m">
<label class="tag">型号:</label>
<input type="text" class="inp w180" name="goods_name">
</div>
<div class="lineBlock input-inline va-m">
<label class="tag">品牌:</label>
<input type="text" class="inp w180" name="goods_name">
</div>
<div class="lineBlock input-inline va-m" id="search">
<a href="javascript:;" class="search-btn">
<i class="iconfont icon-chaxun-"></i>
<span>查询</span>
</a>
</div>
</div>
</form>
<div class="table-list" id="shopList">
<table>
<tr>
<th>退货单号<b></b></th>
<th>创建时间<b></b></th>
<th>币种<b></b></th>
<th>金额<b></b></th>
<th>状态<b></b></th>
<th>操作</th>
</tr>
<tbody id="shopListContent">
</tbody>
</table>
</div>
<div class="pagination-with" id="pagination"></div>
</div>
</div>
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