v1

parent dc12a435
......@@ -74,6 +74,10 @@ class ApiController extends Controller
private function ApiGoodsAuditList($request, $id){
ExportLayui((new GoodsAuditModel())->getList($request->input(),$request->supplier_id));
}
//批量修改价格日志
private function ApiUploadLogList($request, $id){
ExportLayui((new UploadLogModel())->getList($request->input(),$request->account_id));
}
//价格审核操作
private function ApiGoodsAuditExmine($request, $id){
Export((new GoodsAuditModel())->exmine($request->input('id'),$request->input('status'),$request->supplier_id));
......
......@@ -73,6 +73,11 @@ class WebController extends Controller
$data['title']='订单详情';
return view('pc',$data);
}
//批量修改价格日志
private function UploadLogList($request,$data,$id){
$data['title']='批量修改价格日志列表';
return view('pc',$data);
}
//退货列表
private function AbnormalList($request,$data,$id){
$data['title']='退货列表';
......
<?php
namespace App\Map;
class UploadLogMap{
// 操作类型:0:建立任务 1:处理中 2:处理成功 3:处理失败
const STATUS_BUILT = 1;
const STATUS_DEAL = 1;
const STATUS_SUCCESS = 1;
const STATUS_ERROR = 1;
static $status =[
self::STATUS_BUILT => "建立任务",
self::STATUS_DEAL => "处理中",
self::STATUS_SUCCESS => "处理成功",
self::STATUS_ERROR => "处理失败",
];
//类型:1 批量修改价格
const TYPE_CHANGE_PRICE = 1;
static $type = [
self::TYPE_CHANGE_PRICE =>'批量修改价格'
];
}
......@@ -17,7 +17,8 @@ class UploadLogModel extends Model
protected $primaryKey='id';
public $timestamps = false;
public function getList($type){
public function getList($type,$create_uid){
$collert=Request::only('p','limit','type');
$collert=TrimX($collert,true,['p','limit','type']);
$limit=!empty($collert['limit'])?$collert['limit']:10;
......@@ -26,13 +27,11 @@ class UploadLogModel extends Model
//查数据
$UploadLogType = UploadLogMap::$type;
$UploadLogStatus = UploadLogMap::$status;
$list=$this->whereIn('type',$type)->orderBy('id','desc')->paginate($limit,['*'],'p',$p)->toArray();
$UserModel = new UserModel();
$list=$this->whereIn('type',$type)->where("create_uid",$create_uid)->orderBy('id','desc')->paginate($limit,['*'],'p',$p)->toArray();
foreach ($list['data'] as $key => &$v) {
$v['create_time'] = date('Y/m/d H:i',$v['create_time']);
$v['create_time'] =timeToDate($v['create_time']);
$v['status'] = @$UploadLogStatus[$v['status']];
$v['type'] = @$UploadLogType[$v['type']];
$v['create_name'] = $UserModel->FinduserInfoName($v['create_id']);
}
return [0,'成功',$list['data'],$list['total']];
}
......
......@@ -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 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 .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: 5px 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-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; }
......
$(function () {
$("#code").on('click', function () {
$(this).find('img').attr('src', '/helper/captcha?' + new Date().getTime())
});
})
/**
* Created by hcy on 2019/2/19.
* Created by hcy on 2019/3/15.
*/
function ResetPassword() {
$.ajax({
url:_URL_+'/api/ApiRestPassword',
type:'post',
data:{
'mobile':$("#mobile").val(),
'password':$.md5($("#password").val()),
'code': $("#code").val()
},
async: false,
dataType:'json',
timeout:10000,
success:function (resp) {
// if(resp.code > 0 ){
// alert(resp.msg)
// }else{
// // setCookie('yunxin_token',resp.data)
// // window.location.href = "/web/orderList"
// }
}
var old_password= $("input[name='old_password']").val();
var new_password= $("input[name='new_password']").val();
var new_passwords= $("input[name='new_passwords']").val();
var code= $("input[name='code']").val();
if(old_password == ""){alert_err("旧密码不得为空"); return false}
if(new_password == "") {alert_err("新密码不得为空"); return false}
if(new_password.length <8 ){alert_err("新密码必须大于等于8位"); return false}
if(new_passwords !== new_password){alert_err("再次输入新密码不等于新密码"); return false}
if(code == "") {alert_err("验证码不得为空"); return false}
var res = ajax_push('/api/ApiRestPassword',{
'old_password':$.md5(old_password),
'new_password':$.md5(new_password),
'code':code,
})
res.code >0 ? alert_err(res.msg) : alert_succ(res.msg,function () {
window.location.reload()
})
return false;
}
;!function () {
var ids = []; //选择的ids
var table_data = [];
window.app = {
init: function () {
app.tableList();
//刷新列表
$("#search").click(function () {
app.tableList()
})
},
tableList:function () {
layui.table.render({
elem: '#list'
,url:'/api/ApiUploadLogList'
,method:'post'
// ,cellMinWidth: 100 //全局定义常规单元格的最小宽度
,request: {
pageName: 'p' //页码的参数名称,默认:page
,limitName: 'limit' //每页数据量的参数名,默认:limit
}
,where: {} //formJson('form1')
,loading:true
,first: true //不显示首页
,last: false //不显示尾页
,cols: [[ //
{field:'id', title: 'ID',widht:"10px",align:'center'}
,{field:'batch_sn', title: '批次号',align:'center'}
,{field:'create_name', title: '上传人',align:'center'}
,{field:'status', title: '状态',align:'center'}
,{field:'log', title: '日志',align:'center'}
,{field:'create_time', title: '上传时间',align:'center'}
,{field:'', title: '操作',align:'center',templet: function(d){
if(d.file_path != ""){
return '<a style="cursor:pointer;font-size: 14px; color:blue" href="'+d.file_path+'">下载</a>'
}else{
return ""
}
}}
]]
,id:'Abnormal'
,page:{ }
,done: function(res, curr, count) {
// 若无数据,则禁用导出按钮
if (!count) {
$('.export').addClass('layui-disabled');
} else {
$('.export').removeClass('layui-disabled');
}
$("td[data-field='log']").each(function(){
$(this).find(".layui-table-cell").removeClass('layui-table-cell');
});
//设置全部数据到全局变量
table_data=res.data;
}
});
}
}, $(function () {
app.init();
})
}();
\ No newline at end of file
......@@ -79,7 +79,7 @@
</dd>
</dl>
</li>
<li class="<?php if( in_array($id,['GoodsAuditList','GoodsList','GoodsDetail']) !== false ) echo "curr" ?>">
<li class="<?php if( in_array($id,['GoodsAuditList','GoodsList','GoodsDetail','UploadLogList']) !== false ) echo "curr" ?>">
<a href="javascript:;" class="bx">
<i class="iconfont icon-shangpinguanli- va-m"></i>
<span class="t1 lineBlock va-m">商品管理</span>
......@@ -94,6 +94,10 @@
<i class="line"></i>
<a href="/web/GoodsAuditList">价格审核列表</a>
</dd>
<dd class="<?php if( in_array($id,['UploadLogList']) !== false ) echo "curr" ?>">
<i class="line"></i>
<a href="/web/UploadLogList">价格导入日志</a>
</dd>
</dl>
</li>
<li class="<?php if( in_array($id,['OrderList','OrderDetail','AbnormalList','AbnormalDetail']) !== false ) echo "curr" ?>">
......
......@@ -6,35 +6,31 @@
</div>
<div class="con-section">
<p class="text">修改登录密码</p>
<div class="form-action">
<form class="form-action" id="form1">
<div class="inp-wrap">
<label class="tag lineBlock va-m"><em>*</em>原始密码:</label>
<input type="password" placeholder="请输入原始密码" class="inp va-m w338">
<em class="error">原始密码不正确</em>
<input type="password" placeholder="请输入原始密码" name="old_password" class="inp va-m w338">
</div>
<div class="inp-wrap">
<label class="tag lineBlock va-m"><em>*</em>新的登录密码:</label>
<input type="password" placeholder="请输入新的密码" class="inp va-m w338">
<em class="error">密码必须大于8位</em>
<input type="password" placeholder="请输入新的密码" name="new_password" class="inp va-m w338">
</div>
<div class="inp-wrap">
<label class="tag lineBlock va-m"><em>*</em>请再次输入新密码:</label>
<input type="password" placeholder="请再次输入新的密码" class="inp va-m w338">
<em class="error">两次输入的密码不一致</em>
<input type="password" placeholder="请再次输入新的密码" name="new_passwords" class="inp va-m w338">
</div>
<div class="inp-wrap">
<label class="tag lineBlock va-m"><em>*</em>验证码:</label>
<input type="text" placeholder="请输入验证码" class="inp va-m w158">
<input type="text" placeholder="请输入验证码" name="code" class="inp va-m w158">
<div class="lineBlock va-m code">
<div class="pic lineBlock va-m"><img src="./images/verify.png" alt=""></div>
<div class="pic lineBlock va-m"><img src="/helper/captcha" alt=""></div>
<a href="javascript:;" class="va-m">换一张</a>
</div>
<em class="error">验证码错误</em>
</div>
<div class="bnt-wrap mt1">
<a href="javascript:;" class="cancel btn lineBlock">取消</a>
<a href="javascript:;" class="ok btn lineBlock" onclick="ResetPassword()">确定</a>
</div>
</div>
</form>
</div>
</div>
\ No newline at end of file
<div class="lx-content-r fr">
<div class="tit-bar">
<a href="">商品管理</a>
<span>&gt;</span>
<a class="text" href="">{{ $title }}</a>
</div>
<div class="con-section shop-list">
<p class="text">{{ $title }}</p>
<div class="table-list" id="shopList">
<table class="layui-table" lay-filter="test" id="list"></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