更新审核机制
This commit is contained in:
parent
4319b70ede
commit
5bf3d2ca1e
|
@ -13,7 +13,6 @@ class PositionCheck extends Validate
|
||||||
{
|
{
|
||||||
protected $rule = [
|
protected $rule = [
|
||||||
'title' => 'require|unique:position',
|
'title' => 'require|unique:position',
|
||||||
'work_price' => 'require|number',
|
|
||||||
'group_id' => 'require',
|
'group_id' => 'require',
|
||||||
'id' => 'require'
|
'id' => 'require'
|
||||||
];
|
];
|
||||||
|
@ -21,14 +20,12 @@ class PositionCheck extends Validate
|
||||||
protected $message = [
|
protected $message = [
|
||||||
'title.require' => '岗位名称不能为空',
|
'title.require' => '岗位名称不能为空',
|
||||||
'title.unique' => '同样的岗位名称已经存在',
|
'title.unique' => '同样的岗位名称已经存在',
|
||||||
'work_price.require' => '岗位工时单价不能为空',
|
|
||||||
'work_price.number' => '岗位工时单价只能是整数',
|
|
||||||
'group_id.require' => '至少要选择一个角色权限',
|
'group_id.require' => '至少要选择一个角色权限',
|
||||||
'id.require' => '缺少更新条件',
|
'id.require' => '缺少更新条件',
|
||||||
];
|
];
|
||||||
|
|
||||||
protected $scene = [
|
protected $scene = [
|
||||||
'add' => ['title', 'work_price', 'group_id'],
|
'add' => ['title', 'group_id'],
|
||||||
'edit' => ['title', 'work_price', 'group_id', 'id'],
|
'edit' => ['title', 'group_id', 'id'],
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,9 +10,9 @@
|
||||||
<td>
|
<td>
|
||||||
<input type="text" name="title" lay-verify="required" autocomplete="off" placeholder="请输入岗位名称" lay-reqText="请输入岗位名称" class="layui-input">
|
<input type="text" name="title" lay-verify="required" autocomplete="off" placeholder="请输入岗位名称" lay-reqText="请输入岗位名称" class="layui-input">
|
||||||
</td>
|
</td>
|
||||||
<td class="layui-td-gray-3">岗位工时单价(元)<font>*</font></td>
|
<td class="layui-td-gray-3">岗位工时单价(元)</td>
|
||||||
<td>
|
<td>
|
||||||
<input type="text" name="work_price" lay-verify="required|number" placeholder="请输入岗位工时单价" lay-reqText="请输入岗位工时单价" autocomplete="off" class="layui-input">
|
<input type="text" name="work_price" lay-verify="number" placeholder="请输入岗位工时单价" lay-reqText="请输入岗位工时单价" autocomplete="off" class="layui-input">
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
|
@ -44,9 +44,9 @@
|
||||||
<td>
|
<td>
|
||||||
<input type="text" name="title" value="{$detail.title}" lay-verify="required" autocomplete="off" placeholder="请输入岗位名称" lay-reqText="请输入岗位名称" class="layui-input">
|
<input type="text" name="title" value="{$detail.title}" lay-verify="required" autocomplete="off" placeholder="请输入岗位名称" lay-reqText="请输入岗位名称" class="layui-input">
|
||||||
</td>
|
</td>
|
||||||
<td class="layui-td-gray-3">岗位工时单价(元)<font>*</font></td>
|
<td class="layui-td-gray-3">岗位工时单价(元)</td>
|
||||||
<td>
|
<td>
|
||||||
<input type="text" name="work_price" value="{$detail.work_price}" lay-verify="required|number" placeholder="请输入岗位工时单价" lay-reqText="请输入岗位工时单价" autocomplete="off" class="layui-input">
|
<input type="text" name="work_price" value="{$detail.work_price}" lay-verify="number" placeholder="请输入岗位工时单价" lay-reqText="请输入岗位工时单价" autocomplete="off" class="layui-input">
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
|
|
Loading…
Reference in New Issue