Commit 1eb86af3 by 肖康

Merge branch 'feature/sl/20230823-打印客户标签优化' of…

Merge branch 'feature/sl/20230823-打印客户标签优化' of http://119.23.72.7/sunlong_v5/note-library into feature/sl/20230823-打印客户标签优化
parents 2e7bd371 5883d1d2
Showing with 6 additions and 1 deletions
......@@ -217,9 +217,14 @@ Class AjaxController extends Controller
$data['attribute'] = $attribute;
$id = $request->input("t_id",0);
$isAdmin = (new PermController)->getUserRole($request);
if(intval($id) > 0){
//----------------------------修改模板------------------------------------------------------------------
if($isAdmin == 1){
$count = TemplateListModel::where("id",intval($id))->count("id");
}else{
$count = TemplateListModel::where("id",intval($id))->where("create_userid",$request->user->userId)->count("id");
}
if($count <= 0){
return $this->ajaxReturn(-1,"没找到属于您的模板信息");
}
......@@ -229,7 +234,7 @@ Class AjaxController extends Controller
}
if($template_name != $templateInfo->template_name){
$count = TemplateListModel::where("create_userid",$request->user->userId)->where("template_name",$template_name)->count("id");
$count = TemplateListModel::where("create_userid",$templateInfo->create_userid)->where("template_name",$template_name)->count("id");
if($count > 0){
return $this->ajaxReturn(-1,"模板名称已经存在,请修改模板名称再提交!");
}
......
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