更新客户管理
This commit is contained in:
parent
02ac63b945
commit
ab10bbc59e
@ -14,15 +14,15 @@ class CommonController extends BaseAdminController
|
|||||||
$data = Db::name('geo_province')->where(['switch' => 1])->select();
|
$data = Db::name('geo_province')->where(['switch' => 1])->select();
|
||||||
return $this->data($data->toArray());
|
return $this->data($data->toArray());
|
||||||
} //**市列表 */
|
} //**市列表 */
|
||||||
public function city($city)
|
public function city($province_code)
|
||||||
{
|
{
|
||||||
$data = Db::name('geo_city')->where(['province_code' => $city])->select();
|
$data = Db::name('geo_city')->where(['province_code' => $province_code])->select();
|
||||||
return $this->data($data->toArray());
|
return $this->data($data->toArray());
|
||||||
}
|
}
|
||||||
//**区域列表 */
|
//**区域列表 */
|
||||||
public function area($area)
|
public function area($city_code)
|
||||||
{
|
{
|
||||||
$data = Db::name('geo_area')->where(['city_code' => $area])->select();
|
$data = Db::name('geo_area')->where(['city_code' => $city_code])->select();
|
||||||
return $this->data($data->toArray());
|
return $this->data($data->toArray());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -20,6 +20,7 @@ class OperationLog
|
|||||||
public function handle($response)
|
public function handle($response)
|
||||||
{
|
{
|
||||||
$request = request();
|
$request = request();
|
||||||
|
return;
|
||||||
|
|
||||||
//需要登录的接口,无效访问时不记录
|
//需要登录的接口,无效访问时不记录
|
||||||
if (!$request->controllerObject->isNotNeedLogin() && empty($request->adminInfo)) {
|
if (!$request->controllerObject->isNotNeedLogin() && empty($request->adminInfo)) {
|
||||||
|
@ -55,12 +55,18 @@ class CustomLists extends BaseAdminDataLists implements ListsSearchInterface
|
|||||||
public function lists(): array
|
public function lists(): array
|
||||||
{
|
{
|
||||||
return Custom::where($this->searchWhere)
|
return Custom::where($this->searchWhere)
|
||||||
->field(['id', 'name', 'custom_type', 'parent_company', 'phone', 'credit_rating', 'province', 'master_name', 'master_position', 'master_phone','create_time','status'])
|
->field(['*'])
|
||||||
->with(['province_name'])
|
|
||||||
->limit($this->limitOffset, $this->limitLength)
|
->limit($this->limitOffset, $this->limitLength)
|
||||||
->order(['id' => 'desc'])
|
->order(['id' => 'desc'])
|
||||||
->select()
|
->select()->each(function($item, $key){
|
||||||
->toArray();
|
if (!empty($item['other_contacts'])) {
|
||||||
|
$otherContactsArray = json_decode($item['other_contacts'], true);
|
||||||
|
if (is_array($otherContactsArray)) {
|
||||||
|
$item['other_contacts'] = $otherContactsArray;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return $item;
|
||||||
|
})->toArray();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -63,6 +63,7 @@ class CustomLogic extends BaseLogic
|
|||||||
'company_telephone' => $params['company_telephone'],
|
'company_telephone' => $params['company_telephone'],
|
||||||
'bank_name' => $params['bank_name'],
|
'bank_name' => $params['bank_name'],
|
||||||
'bank_account' => $params['bank_account'],
|
'bank_account' => $params['bank_account'],
|
||||||
|
'other_contacts' => json_encode($params['other_contacts']),
|
||||||
'status' => $params['status']
|
'status' => $params['status']
|
||||||
]);
|
]);
|
||||||
|
|
||||||
@ -110,6 +111,7 @@ class CustomLogic extends BaseLogic
|
|||||||
'company_telephone' => $params['company_telephone'],
|
'company_telephone' => $params['company_telephone'],
|
||||||
'bank_name' => $params['bank_name'],
|
'bank_name' => $params['bank_name'],
|
||||||
'bank_account' => $params['bank_account'],
|
'bank_account' => $params['bank_account'],
|
||||||
|
'other_contacts' => json_encode($params['other_contacts']),
|
||||||
'status' => $params['status']
|
'status' => $params['status']
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user