添加:省公司添加省公司名称

This commit is contained in:
wuhui_zzw 2024-02-22 10:30:22 +08:00
parent 4239e59069
commit 81c2e9dea7
2 changed files with 10 additions and 3 deletions

View File

@ -173,7 +173,8 @@ class AgentRepository extends BaseRepository{
"address", "address",
"lat", "lat",
"lng", "lng",
"mer_id" "mer_id",
'province_corporate_name'
]); ]);
$updateInfo = array_intersect_key($data, $keys); $updateInfo = array_intersect_key($data, $keys);
Agent::update($updateInfo,['id'=>$agentId]); Agent::update($updateInfo,['id'=>$agentId]);
@ -213,7 +214,8 @@ class AgentRepository extends BaseRepository{
"address", "address",
"lat", "lat",
"lng", "lng",
"mer_id" "mer_id",
'province_corporate_name'
]); ]);
$eightUpdateIds = []; $eightUpdateIds = [];
// 循环:区分对应的操作 // 循环:区分对应的操作

View File

@ -63,7 +63,8 @@ class Agent extends BaseController{
'lat', 'lat',
'lng', 'lng',
['mer_id', 0], ['mer_id', 0],
['mer_id_list', []] ['mer_id_list', []],
['province_corporate_name','']
]); ]);
$agentId = (int)$this->request->param('id'); $agentId = (int)$this->request->param('id');
$childrenList = $this->request->param('children_list'); $childrenList = $this->request->param('children_list');
@ -86,6 +87,8 @@ class Agent extends BaseController{
// if((float)$childrenItem['agent_stock'] <= 0) throw new ValidateException('发起人的股份必须大于0'); // if((float)$childrenItem['agent_stock'] <= 0) throw new ValidateException('发起人的股份必须大于0');
break; break;
case 2: case 2:
if(empty($childrenItem['province_corporate_name'])) throw new ValidateException('请输入省公司名称!');
break;
case 3: case 3:
case 4: case 4:
// if((float)$childrenItem['province_id'] <= 0) throw new ValidateException('请完善地区信息!'); // if((float)$childrenItem['province_id'] <= 0) throw new ValidateException('请完善地区信息!');
@ -210,6 +213,8 @@ class Agent extends BaseController{
// 判断:根据当前角色判断 数据 // 判断:根据当前角色判断 数据
switch((int)$data['agent_type']){ switch((int)$data['agent_type']){
case 2: case 2:
if(empty($data['province_corporate_name'])) throw new ValidateException('请输入省公司名称!');
break;
case 3: case 3:
case 4: case 4:
// if((float)$data['province_id'] <= 0) throw new ValidateException('请完善地区信息!'); // if((float)$data['province_id'] <= 0) throw new ValidateException('请完善地区信息!');