更新:业绩管理校验规则完善
parent
6ad59ac28f
commit
0bf33e8130
|
@ -270,10 +270,10 @@ class Achievement extends Base
|
|||
return $this->json(3, '该业绩项目信息不存在');
|
||||
}
|
||||
if($sort == 'up'){
|
||||
$where = "history_id='{$item['history_id']}' and sort > {$item['sort']}";
|
||||
$where = "achievement_id='{$item['achievement_id']}' and sort > {$item['sort']}";
|
||||
$order = "sort asc";
|
||||
}else{
|
||||
$where = "history_id='{$item['history_id']}' and sort < {$item['sort']}";
|
||||
$where = "achievement_id='{$item['achievement_id']}' and sort < {$item['sort']}";
|
||||
$order = "sort desc";
|
||||
}
|
||||
$forSortItems = AchievementInfo::getListByWhereAndOrder($where, $order, $num);
|
||||
|
|
|
@ -10,10 +10,10 @@ class Achievement extends Validate
|
|||
'visible' => 'require|in:0,1',
|
||||
];
|
||||
protected $achievementMessage = [
|
||||
'title.require' => '标题不能为空',
|
||||
'name.length' => '标题长度限制为60个字符以内',
|
||||
'visible.require' => '历程状态必须设置',
|
||||
'visible.in' => '状态参数错误',
|
||||
'title.require' => '业绩标题不能为空',
|
||||
'name.length' => '业绩标题长度限制为60个字符以内',
|
||||
'visible.require' => '业绩状态必须设置',
|
||||
'visible.in' => '业绩状态参数错误',
|
||||
];
|
||||
|
||||
protected $achievementInfoRule = [
|
||||
|
@ -24,10 +24,16 @@ class Achievement extends Validate
|
|||
'visible' => 'require|in:0,1',
|
||||
];
|
||||
protected $achievementInfoMessage = [
|
||||
'title.require' => '标题不能为空',
|
||||
'name.length' => '标题长度限制为60个字符以内',
|
||||
'visible.require' => '历程状态必须设置',
|
||||
'visible.in' => '状态参数错误',
|
||||
'title.require' => '业绩项目名称不能为空',
|
||||
'name.length' => '业绩项目名称长度限制为60个字符以内',
|
||||
'order_company.require' => '订货单位不能为空',
|
||||
'order_company.length' => '订货单位长度限制为100个字符以内',
|
||||
'goods_model.require' => '货物名称及型号规格不能为空',
|
||||
'goods_model.length' => '货物名称及型号规格长度限制为300个字符以内',
|
||||
'goods_amount.require' => '订货数量不能为空',
|
||||
'goods_amount.length' => '订货数量长度限制为500个字符以内',
|
||||
'visible.require' => '业绩项目状态必须设置',
|
||||
'visible.in' => '业绩项目状态参数错误',
|
||||
];
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue