Commit 8f915769 authored by hujun's avatar hujun

新增经纪人必填部门和门店

parent 2fcf7434
......@@ -125,6 +125,10 @@ class Agent extends Basic
return $this->response(101, '门店id为空!');
}
if (empty($this->params['district_id'])) {
return $this->response(101, '部门id为空!');
}
$num = 0; //判断重复手机号
//新增或者编辑数据
......@@ -157,9 +161,7 @@ class Agent extends Basic
return $this->response(101, '手机号重复');
}
$store = new AStore();
$data['district_id'] = $store->getStoreKeyById('district_id', ['id'=>$this->params['store_id']]);
$data['district_id'] = $this->params['district_id'];
$data['name'] = trim($this->params['name']);
$data['store_id'] = $this->params['store_id'];
$data['phone'] = trim($this->params['phone']);
......@@ -174,7 +176,7 @@ class Agent extends Basic
}
} else {
//查看
$info = $m_agent->verifyUser('id,name,phone,password,store_id,sex,admin_off,remarks', '', ['id'=>$id]);
$info = $m_agent->verifyUser('id,name,phone,password,district_id,store_id,sex,admin_off,remarks', '', ['id'=>$id]);
return $this->response(200, '查看', $info);
}
}
......
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 to comment