修复:
1、删除项目,列表数据不自动更新问题 2、新增项目提示项目名称已经存在问题修复
This commit is contained in:
parent
f513655448
commit
0a21a1b738
@ -5,22 +5,17 @@ use think\Validate;
|
|||||||
class ProjectCheck extends Validate
|
class ProjectCheck extends Validate
|
||||||
{
|
{
|
||||||
protected $rule = [
|
protected $rule = [
|
||||||
'name' => 'require|unique:project',
|
'name' => 'require',
|
||||||
'code' => 'alphaNum|length:5,10|unique:project',
|
|
||||||
'id' => 'require'
|
'id' => 'require'
|
||||||
];
|
];
|
||||||
|
|
||||||
protected $message = [
|
protected $message = [
|
||||||
'name.require' => '项目名称不能为空',
|
'name.require' => '项目名称不能为空',
|
||||||
'name.unique' => '同样的项目名称已经存在',
|
|
||||||
'code.alphaNum' => '项目代码只能为5至10为字母和数字',
|
|
||||||
'code.length' => '项目代码只能为5至10为字母和数字',
|
|
||||||
'code.unique' => '同样的项目代码已经存在',
|
|
||||||
'id.require' => '缺少更新条件',
|
'id.require' => '缺少更新条件',
|
||||||
];
|
];
|
||||||
|
|
||||||
protected $scene = [
|
protected $scene = [
|
||||||
'add' => ['name','code'],
|
'add' => ['name'],
|
||||||
'edit' => ['id']
|
'edit' => ['id']
|
||||||
];
|
];
|
||||||
}
|
}
|
@ -365,9 +365,7 @@ function overview(){
|
|||||||
layer.closeAll();
|
layer.closeAll();
|
||||||
layer.msg(e.msg);
|
layer.msg(e.msg);
|
||||||
if(e.code==0){
|
if(e.code==0){
|
||||||
setTimeout(function () {
|
tool.sideClose(1000);
|
||||||
location.href='/project/index/index';
|
|
||||||
}, 1000)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
let postData = { "id": project_id };
|
let postData = { "id": project_id };
|
||||||
|
Loading…
x
Reference in New Issue
Block a user