...
|
...
|
@@ -155,16 +155,16 @@ class AdminCompanyController extends AdminBaseController |
|
|
}
|
|
|
}
|
|
|
|
|
|
//创建乙方登录普通管理员账号
|
|
|
$userModel = new UserModel();
|
|
|
$arr['user_login'] = $res->company_name;
|
|
|
$arr['user_pass'] = cmf_password('123456');
|
|
|
$arr['company_id'] = $res->id;
|
|
|
$res1 = $userModel->create($arr);
|
|
|
//role_user表
|
|
|
$role['role_id'] = 2;
|
|
|
$role['user_id'] = $res1->id;
|
|
|
Db::name('RoleUser')->insert($role);
|
|
|
// //创建乙方登录普通管理员账号
|
|
|
// $userModel = new UserModel();
|
|
|
// $arr['user_login'] = $res->company_name;
|
|
|
// $arr['user_pass'] = cmf_password('123456');
|
|
|
// $arr['company_id'] = $res->id;
|
|
|
// $res1 = $userModel->create($arr);
|
|
|
// //role_user表
|
|
|
// $role['role_id'] = 2;
|
|
|
// $role['user_id'] = $res1->id;
|
|
|
// Db::name('RoleUser')->insert($role);
|
|
|
$this->success("添加成功!", url("AdminCompany/index"));
|
|
|
}
|
|
|
|
...
|
...
|
@@ -248,7 +248,7 @@ class AdminCompanyController extends AdminBaseController |
|
|
$part_B['u_s_id'] = ','.implode(',',$data['u_s_id']).',';
|
|
|
//营业执照
|
|
|
$part_B['license'] = $data['license'];
|
|
|
$part_B['create_time'] = time();
|
|
|
$part_B['update_time'] = time();
|
|
|
//公司logo
|
|
|
$part_B['logo'] = $data['logo'];
|
|
|
$companyModel->where('id',$data['id'])->update($part_B);
|
...
|
...
|
@@ -272,13 +272,15 @@ class AdminCompanyController extends AdminBaseController |
|
|
$part_A['u_s_id'] = ','.implode(',',$data['u_s_id'.$value]).',';
|
|
|
//营业执照
|
|
|
$part_A['license'] = $data['license'.$value];
|
|
|
$part_A['create_time'] = time();
|
|
|
|
|
|
//公司logo
|
|
|
$part_A['logo'] = $data['logo'.$value];
|
|
|
if(isset($data['id'.$value])){
|
|
|
$id = $data['id'.$value];
|
|
|
$part_A['update_time'] = time();
|
|
|
$companyModel->where('id',$id)->update($part_A);
|
|
|
}else{
|
|
|
$part_A['create_time'] = time();
|
|
|
$companyModel->create($part_A);
|
|
|
}
|
|
|
}
|
...
|
...
|
|