|
@@ -81,7 +81,7 @@ class UserWallet extends Backend
|
|
|
$this->assign('comefrom',$data);
|
|
|
return $this->view->fetch();
|
|
|
}
|
|
|
- $field = ['nickname','mobile','car_number','address','comefrom','remark'];
|
|
|
+ $field = ['nickname','mobile','car_number','address','comefrom','remark','company_id','staff_id'];
|
|
|
$data = request_post_hub($field);
|
|
|
|
|
|
$user = Db::name('user')->field('id,nickname,mobile')->where('mobile',$data['mobile'])->find();
|
|
@@ -90,7 +90,7 @@ class UserWallet extends Backend
|
|
|
//已经是我公司的客户
|
|
|
$map = [
|
|
|
'w.user_id' => $user['id'],
|
|
|
- 'w.company_id' => $this->auth->company_id,
|
|
|
+ 'w.company_id' => $data['company_id'],
|
|
|
];
|
|
|
$check = Db::name('user_wallet')->alias('w')
|
|
|
->field('w.*,staff.truename')
|
|
@@ -105,8 +105,8 @@ class UserWallet extends Backend
|
|
|
//添加新客户
|
|
|
$new_data = [
|
|
|
'user_id' => $user['id'],
|
|
|
- 'company_id' => $this->auth->company_id,
|
|
|
- 'staff_id' => $this->auth->staff_id,
|
|
|
+ 'company_id' => $data['company_id'],
|
|
|
+ 'staff_id' => $data['staff_id'],
|
|
|
'money' => 0,
|
|
|
'address' => $data['address'],
|
|
|
'createtime' => time(),
|
|
@@ -151,7 +151,7 @@ class UserWallet extends Backend
|
|
|
'jointime' => time(),
|
|
|
'joinip' => request()->ip(),
|
|
|
'status' => 1,
|
|
|
- 'company_id'=> $this->auth->company_id,
|
|
|
+ 'company_id'=> $data['company_id'],
|
|
|
];
|
|
|
Db::startTrans();
|
|
|
$user_id = Db::name('user')->insertGetId($user_data);
|
|
@@ -166,8 +166,8 @@ class UserWallet extends Backend
|
|
|
//添加新客户
|
|
|
$new_data = [
|
|
|
'user_id' => $user_id,
|
|
|
- 'company_id' => $this->auth->company_id,
|
|
|
- 'staff_id' => $this->auth->staff_id,
|
|
|
+ 'company_id' => $data['company_id'],
|
|
|
+ 'staff_id' => $data['staff_id'],
|
|
|
'money' => 0,
|
|
|
'address' => $data['address'],
|
|
|
'createtime' => time(),
|