作者 何书鹏
1 个管道 的构建 通过 耗费 2 秒

bug修改

... ... @@ -66,7 +66,7 @@ class Company extends Backend
foreach ($list as $row) {
$row->visible(['id','user_id','name','address','license','legal_person','invite_code','status']);
$row->visible(['user']);
$row->getRelation('user')->visible(['group_id','nickname']);
$row->getRelation('user')->visible(['group_id','nickname','mobile']);
}
$list = collection($list)->toArray();
$result = array("total" => $total, "rows" => $list);
... ...
... ... @@ -65,7 +65,7 @@ class CompanyJob extends Backend
->select();
foreach ($list as $row) {
$row->visible(['id','name','type','start_time','end_time','salary','address','house_number','mobile','description','other_desc','status','weigh']);
$row->visible(['id','name','type','start_time','end_time','salary','address','house_number','phone','description','other_desc','status','weigh']);
$row->visible(['company']);
$row->getRelation('company')->visible(['name']);
}
... ...
... ... @@ -65,7 +65,7 @@ class CompanyUserLog extends Backend
->select();
foreach ($list as $row) {
$row->visible(['id','name','mobile','type','createtime']);
$row->visible(['id','name','phone','type','createtime']);
$row->visible(['user']);
$row->getRelation('user')->visible(['nickname']);
}
... ...
... ... @@ -66,7 +66,7 @@ class UserJob extends Backend
->select();
foreach ($list as $row) {
$row->visible(['id','name','type','mobile','start_time','end_time','salary','address','qualification','resume','resume_name','status','is_download','weigh']);
$row->visible(['id','name','type','phone','start_time','end_time','salary','address','qualification','resume','resume_name','status','is_download','weigh']);
$row->visible(['user']);
}
$list = collection($list)->toArray();
... ...
... ... @@ -16,7 +16,7 @@ return [
'Lat' => '纬度',
'Address' => '工作地点',
'House_number' => '详细地址',
'Mobile' => '联系电话',
'Phone' => '联系电话',
'Description' => '岗位职责与要求',
'Other_desc' => '其他说明',
'Status' => '发布状态',
... ...
... ... @@ -5,7 +5,7 @@ return [
'Company_id' => '企业ID',
'User_id' => '用户ID',
'Name' => '名称',
'Mobile' => '手机号',
'Phone' => '联系方式',
'Status' => '加入状态',
'Status 0' => '申请中',
'Status 1' => '成功',
... ...
... ... @@ -5,7 +5,7 @@ return [
'Company_id' => '企业ID',
'User_id' => '用户ID',
'Name' => '名称',
'Mobile' => '手机号',
'Phone' => '联系方式',
'Type' => '记录类型',
'Type 1' => '新增',
'Type 2' => '删除',
... ...
... ... @@ -8,7 +8,7 @@ return [
'Type 1' => '全职',
'Type 2' => '兼职',
'Type 3' => '其他',
'Mobile' => '联系方式',
'Phone' => '联系方式',
'Start_time' => '开始工作日期',
'End_time' => '结束工作日期',
'Salary' => '薪资待遇',
... ...
... ... @@ -190,7 +190,8 @@ class Company extends Api
->paginate($page_num,false,['page'=>$page])
->each(function($v){
$v['createtime'] = date('Y.m.d',$v['createtime']);
$v->visible(['id','name','mobile','createtime']);
$v['mobile'] = $v['phone'];
$v->visible(['id','name','createtime'])->append(['mobile']);
})->toArray();
$this->success('成功',['total'=>$data['total'],'list'=>$data['data']]);
}
... ... @@ -232,7 +233,7 @@ class Company extends Api
'company_id' => $info['company_id'],
'user_id' => $info['user_id'],
'name' => $info['name'],
'mobile' => $info['mobile'],
'phone' => $info['phone'],
'type' => '1'
]);
Db::commit();
... ... @@ -316,7 +317,7 @@ class Company extends Api
'company_id' => $info['company_id'],
'user_id' => $info['user_id'],
'name' => $info['name'],
'mobile' => $info['mobile'],
'phone' => $info['phone'],
'type' => '2'
]);
$info->delete();
... ... @@ -955,6 +956,8 @@ class Company extends Api
empty($company_job_id) && $this->error('缺少必需参数');
$info = CompanyJob::get($company_job_id);
empty($info) && $this->error('招聘信息不存在');
$info['mobile'] = $info['phone'];
$info->append(['mobile']);
$this->success('成功', $info);
}
... ...
... ... @@ -100,7 +100,7 @@ class CompanyJob extends Api
}
};
$data = UserJob::where($where)
->field('id,name,type,salary,start_time,end_time,mobile,address,resume_name,qualification')
->field('id,name,type,salary,start_time,end_time,phone mobile,address,resume_name,qualification')
->order('createtime desc')
->paginate($page_num,false,['page'=>$page])
->each(function($v){
... ... @@ -209,7 +209,8 @@ class CompanyJob extends Api
empty($post['description']) && $this->error('请填写岗位职责及要求');
$this->model->allowField(true)->save(array_merge([
'user_id' => $this->auth->id,
'company_id' => $this->company_id
'company_id' => $this->company_id,
'phone' => $post['mobile'],
],$post));
$this->success('发布招聘成功');
}
... ...
... ... @@ -236,7 +236,8 @@ class UserJob extends Api
empty($post['resume']) && $this->error('请选择简历');
empty($post['resume_name']) && $this->error('请传入简历原始名称');
$this->model->allowField(true)->save(array_merge([
'user_id' => $this->auth->id
'user_id' => $this->auth->id,
'phone' => $post['mobile'],
],$post));
$this->success('发布求职成功');
}
... ...
... ... @@ -27,7 +27,7 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
[
{checkbox: true},
{field: 'id', title: __('Id')},
{field: 'user.nickname', title: __('用户名')},
{field: 'user.mobile', title: __('账号')},
{field: 'name', title: __('Name')},
{field: 'address', title: __('Address')},
{field: 'license', title: __('License'), events: Table.api.events.image, formatter: Table.api.formatter.images, searchable: false},
... ... @@ -80,7 +80,7 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
title: '员工名单',
classname: 'btn btn-xs btn-primary btn-dialog',
icon: '',
url: 'mobile/company_user/?company_id={id}',
url: 'mobile/company_user?company_id={id}',
visible:function (row) {
if(row.status == '1'){
return true;
... ... @@ -93,7 +93,7 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
title: '员工记录',
classname: 'btn btn-xs btn-primary btn-dialog',
icon: '',
url: 'mobile/company_user_log/?company_id={id}',
url: 'mobile/company_user_log?company_id={id}',
visible:function (row) {
if(row.status == '1'){
return true;
... ... @@ -117,23 +117,23 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
table.bootstrapTable('refresh');
}
},
{
name: 'setuser',
text: '设为企业管理员',
title: '设为企业管理员',
classname: 'btn btn-xs btn-primary btn-ajax',
icon: '',
url: 'mobile/company/setgroup?group_id=1',
confirm: '是否确认拒绝审核?',
visible:function (row) {
if(row.user.group_id == 0){
return true;
}
},
success: function (data) {
table.bootstrapTable('refresh');
}
}
// {
// name: 'setuser',
// text: '设为企业管理员',
// title: '设为企业管理员',
// classname: 'btn btn-xs btn-primary btn-ajax',
// icon: '',
// url: 'mobile/company/setgroup?group_id=1',
// confirm: '是否确认拒绝审核?',
// visible:function (row) {
// if(row.user.group_id == 0){
// return true;
// }
// },
// success: function (data) {
// table.bootstrapTable('refresh');
// }
// }
], formatter: Table.api.formatter.operate,
}
]
... ...
... ... @@ -27,7 +27,7 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
{field: 'id', title: __('Id')},
{field: 'user.nickname', title: __('用户名')},
{field: 'name', title: __('Name')},
{field: 'mobile', title: __('Mobile')},
{field: 'phone', title: __('Phone')},
{field: 'status', title: __('Status'), searchList: {"0":__('Status 0'),"1":__('Status 1'),"2":__('Status 2')}, formatter: Table.api.formatter.status},
{field: 'createtime', title: __('Createtime'), operate:'RANGE', addclass:'datetimerange', formatter: Table.api.formatter.datetime},
// {field: 'operate', title: __('Operate'), table: table, events: Table.api.events.operate, formatter: Table.api.formatter.operate}
... ...
... ... @@ -27,7 +27,7 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
{field: 'id', title: __('Id')},
{field: 'user.nickname', title: __('用户名')},
{field: 'name', title: __('Name')},
{field: 'mobile', title: __('Mobile')},
{field: 'phone', title: __('Phone')},
{field: 'type', title: __('Type'), searchList: {"1":__('Type 1'),"2":__('Type 2')}, formatter: Table.api.formatter.normal},
{field: 'createtime', title: __('Createtime'), operate:'RANGE', addclass:'datetimerange', formatter: Table.api.formatter.datetime},
// {field: 'operate', title: __('Operate'), table: table, events: Table.api.events.operate, formatter: Table.api.formatter.operate}
... ...
... ... @@ -29,7 +29,7 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
{field: 'user.mobile', title: __('发布用户')},
{field: 'name', title: __('Name')},
{field: 'type', title: __('Type'), searchList: {"1":__('Type 1'),"2":__('Type 2'),"3":__('Type 3')}, formatter: Table.api.formatter.normal},
{field: 'mobile', title: __('Mobile'), searchable: false},
{field: 'phone', title: __('Phone')},
{field: 'start_time', title: __('Start_time'), operate:'RANGE', addclass:'datetimerange', formatter: Table.api.formatter.datetime},
{field: 'end_time', title: __('End_time'), operate:'RANGE', addclass:'datetimerange', formatter: Table.api.formatter.datetime},
{field: 'salary', title: __('Salary')},
... ...