更新客户管理
This commit is contained in:
parent
02ac63b945
commit
ab10bbc59e
app/adminapi
controller
listener
lists/custom
logic/custom
@ -14,15 +14,15 @@ class CommonController extends BaseAdminController
|
||||
$data = Db::name('geo_province')->where(['switch' => 1])->select();
|
||||
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());
|
||||
}
|
||||
//**区域列表 */
|
||||
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());
|
||||
}
|
||||
}
|
||||
|
@ -20,7 +20,8 @@ class OperationLog
|
||||
public function handle($response)
|
||||
{
|
||||
$request = request();
|
||||
|
||||
return;
|
||||
|
||||
//需要登录的接口,无效访问时不记录
|
||||
if (!$request->controllerObject->isNotNeedLogin() && empty($request->adminInfo)) {
|
||||
return;
|
||||
|
@ -55,12 +55,18 @@ class CustomLists extends BaseAdminDataLists implements ListsSearchInterface
|
||||
public function lists(): array
|
||||
{
|
||||
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'])
|
||||
->with(['province_name'])
|
||||
->field(['*'])
|
||||
->limit($this->limitOffset, $this->limitLength)
|
||||
->order(['id' => 'desc'])
|
||||
->select()
|
||||
->toArray();
|
||||
->select()->each(function($item, $key){
|
||||
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'],
|
||||
'bank_name' => $params['bank_name'],
|
||||
'bank_account' => $params['bank_account'],
|
||||
'other_contacts' => json_encode($params['other_contacts']),
|
||||
'status' => $params['status']
|
||||
]);
|
||||
|
||||
@ -110,6 +111,7 @@ class CustomLogic extends BaseLogic
|
||||
'company_telephone' => $params['company_telephone'],
|
||||
'bank_name' => $params['bank_name'],
|
||||
'bank_account' => $params['bank_account'],
|
||||
'other_contacts' => json_encode($params['other_contacts']),
|
||||
'status' => $params['status']
|
||||
]);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user