Browse Source

晋邻里广告

linwu 2 years ago
parent
commit
bdc6b367e3

+ 11 - 11
app/admin/controller/Comjobs.php

@@ -17,7 +17,6 @@ use app\common\model\WorkerThird;
 use app\common\service\RensheService;
 use app\common\service\RensheService;
 use app\common\validate\Comjobs as ComjobsValidate;
 use app\common\validate\Comjobs as ComjobsValidate;
 use think\exception\ValidateException;
 use think\exception\ValidateException;
-use think\facade\Db;
 
 
 class Comjobs extends BaseController
 class Comjobs extends BaseController
 {
 {
@@ -265,7 +264,7 @@ class Comjobs extends BaseController
         ComjobsLogModel::whereIn('comjobsid', $idarr)->delete();
         ComjobsLogModel::whereIn('comjobsid', $idarr)->delete();
         ComjobsStarModel::whereIn('comjobsid', $idarr)->delete();
         ComjobsStarModel::whereIn('comjobsid', $idarr)->delete();
         ComjobsReportModel::whereIn('comjobsid', $idarr)->delete();
         ComjobsReportModel::whereIn('comjobsid', $idarr)->delete();
-        $result = ComjobsModel::destroy($idarr,true);
+        $result = ComjobsModel::destroy($idarr, true);
 
 
         if ($result) {
         if ($result) {
             exit(json_encode([
             exit(json_encode([
@@ -343,10 +342,12 @@ class Comjobs extends BaseController
 
 
     public function cateForm()
     public function cateForm()
     {
     {
-        $id   = input('id/d', 0);
-        $cate = ComjobsCateModel::findOrEmpty($id);
+        $id       = input('id/d', 0);
+        $cate     = ComjobsCateModel::findOrEmpty($id);
+        $catelist = ComjobsCateModel::where('pid', 0)->select();
         return view('comjobs/cateform', [
         return view('comjobs/cateform', [
-            'cate' => $cate,
+            'cate'     => $cate,
+            'catelist' => $catelist,
         ]);
         ]);
     }
     }
 
 
@@ -354,7 +355,7 @@ class Comjobs extends BaseController
     {
     {
         $limit = input('limit');
         $limit = input('limit');
         $page  = input('page');
         $page  = input('page');
-        $list  = ComjobsCateModel::order(['priority' => 'desc', 'id' => 'desc'])->limit($limit)->page($page)->select();
+        $list  = ComjobsCateModel::with('pcate')->order(['pid' => 'asc', 'priority' => 'desc'])->limit($limit)->page($page)->select();
         $count = ComjobsCateModel::count();
         $count = ComjobsCateModel::count();
         if ($count == 0) {
         if ($count == 0) {
             exit(json_encode([
             exit(json_encode([
@@ -388,12 +389,14 @@ class Comjobs extends BaseController
         if (empty($id)) {
         if (empty($id)) {
             $cate = ComjobsCateModel::create([
             $cate = ComjobsCateModel::create([
                 'title'    => input('title/s', ""),
                 'title'    => input('title/s', ""),
+                'pid'      => input('pid/d', 0),
                 'priority' => input('priority/d', 0),
                 'priority' => input('priority/d', 0),
             ]);
             ]);
         } else {
         } else {
             $cate = ComjobsCateModel::find($id);
             $cate = ComjobsCateModel::find($id);
             $cate->save([
             $cate->save([
                 'title'    => input('title/s', ""),
                 'title'    => input('title/s', ""),
+                'pid'      => input('pid/d', 0),
                 'priority' => input('priority/d', 0),
                 'priority' => input('priority/d', 0),
             ]);
             ]);
         }
         }
@@ -544,13 +547,10 @@ class Comjobs extends BaseController
             if (empty($v['cate'])) {
             if (empty($v['cate'])) {
                 continue;
                 continue;
             }
             }
-            $item = [];
-            if (empty($cateList[$v['cate']])) {
-                halt($cateList, $v);
-            }
+            $item             = [];
             $third            = WorkerThird::create(['name' => $v['worker'], 'contact' => $v['name']]);
             $third            = WorkerThird::create(['name' => $v['worker'], 'contact' => $v['name']]);
             $item['third_id'] = $third['id'];
             $item['third_id'] = $third['id'];
-            $item['cateid']   = $cateList[$v['cate']];
+            $item['cateid']   = empty($cateList[$v['cate']]) ? '' : $cateList[$v['cate']];
             $item['title']    = $v['title'];
             $item['title']    = $v['title'];
             $item['wtype']    = $wtype[$v['type']];
             $item['wtype']    = $wtype[$v['type']];
             $item['zwagall']  = $item['bwagall'] = $v['zwagall'];
             $item['zwagall']  = $item['bwagall'] = $v['zwagall'];

+ 103 - 0
app/admin/controller/Test.php

@@ -4,6 +4,7 @@ namespace app\admin\controller;
 use app\admin\BaseController;
 use app\admin\BaseController;
 use app\common\model\UserPart;
 use app\common\model\UserPart;
 use app\common\service\IntegralService;
 use app\common\service\IntegralService;
+use think\facade\Db;
 
 
 class Test extends BaseController
 class Test extends BaseController
 {
 {
@@ -11,5 +12,107 @@ class Test extends BaseController
         $integralService = new IntegralService();
         $integralService = new IntegralService();
         $integralService->add(6,IntegralService::REGISTER);
         $integralService->add(6,IntegralService::REGISTER);
     }
     }
+/*
+    public function t2()
+    {
+        $xlsData = Db::table('un_person')->select();
+        $xlsCell = [
+            ['id', '主键(必填)'],
+            ['uid', '微信uid'],
+            ['username', '登陆用户名(必填)'],
+            ['name', '姓名(必填)'],
+            ['sex', '性别(必填)'],
+            ['idCard', '证件号码(必填)'],
+            ['phone', '电话号码(必填)'],
+            ['address', '联系地址(必填)'],
+            ['email', '邮箱(必填)'],
+        ];
+        export_excel("人员信息", $xlsCell, $xlsData);
+    }
+
+    public function t3()
+    {
+        $xlsData = Db::table('un_enterprise')->select();
+        $xlsCell = [
+            ['id', '主键(必填)'],
+            ['uid', '微信uid'],
+            ['name', '单位名称(必填)'],
+            ['idCard', '社会信用代码(必填)'],
+            ['street', '所属街道(必填)'],
+            ['address', '单位地址(必填)'],
+            ['legal', '法人代表(必填)'],
+            ['ephone', '单位电话(必填)'],
+            ['agentName', '经办人(必填)'],
+            ['agentPhone', '经办人电话(必填)'],
+            ['agentEmail', '经办人邮箱(必填)'],
+            ['imgurl', '证件链接(必填)'],
+        ];
+        export_excel("企业信息", $xlsCell, $xlsData);
+    }
 
 
+    public function t4()
+    {
+        set_time_limit(0);
+        ini_set('memory_limit',-1);
+        $xlsData = Db::table('un_talent_info')->select();
+        $xlsCell = [
+            ['id', '主键(必填)'],
+            ['enterpriseId', '企业Id'],
+            ['year', '申报年度'],
+            ['type', '人才类型'],
+            ['source', '来源'],
+            ['ourCitySource', '是否我市'],
+            ['talentType', '申报人才类型'],
+            ['cardType', '证件类型'],
+            ['idCard', '证件号码'],
+            ['name', '姓名'],
+            ['photo', '头像'],
+            ['sex', '性别'],
+            ['nation', '民族'],
+            ['nationality', '国籍'],
+            ['provinceName', '籍贯省名称'],
+            ['cityName', '籍贯市名称'],
+            ['countyName', '籍贯县名称'],
+            ['birthday', '出生日期'],
+            ['address', '现居地址'],
+            ['politics', '政治面貌'],
+            ['highEducation', '最高学历'],
+            ['graduateSchool', '毕业学校'],
+            ['major', '专业'],
+            ['post', '职务'],
+            ['phone', '手机号码'],
+            ['email', '电子邮箱'],
+            ['bank', '开户银行'],
+            ['bankNetwork', '开户银行网点'],
+            ['bankAccount', '银行账号'],
+            ['bankNumber', '银行行号'],
+            ['entryTime', '入职时间'],
+            ['startTime', '工作合同开始时间'],
+            ['endTime', '工作合同结束时间'],
+            ['talentArrange', '人才层次'],
+            ['identifyCondition', '认定条件'],
+            ['identifyGetTime', '认定条件获得时间'],
+            ['identifyConditionName', '认定条件名称'],
+            ['identifyMonth', '认定月份'],
+            ['certificateNO', '证书编号'],
+            ['letterTime', '行政介绍信时间'],
+            ['gygb', '是否为我市本级国有股比超过50%'],
+            ['certificateStartTime', '人才证书开始时间'],
+            ['qzgccrcActiveTime', '人才证书的有效期'],
+            ['mainHonours', '主要业绩及取得的荣誉'],
+            ['educationAndResume', '教育背景及工作简历'],
+            ['firstInJJTime', '首次来晋工作时间'],
+            ['isIntroduction', '是否引进'],
+            ['introductionMode', '引进方式'],
+            ['industryField', '行业领域'],
+            ['title', '职称'],
+            ['professionalQualifications', '国家职业资格'],
+            ['studyAbroad', '是否有留学经历'],
+            ['studyAbroadCountry', '留学国家'],
+            ['fromCity', '来源县市'],
+            ['qzBatch', '入选泉州高层次人才批次'],
+            ['breakFaith', '曾被相关部门列为失信人员'],
+        ];
+        export_excel("人才信息", $xlsCell, $xlsData);
+    }*/
 }
 }

+ 11 - 0
app/admin/view/comjobs/cateform.html

@@ -14,6 +14,17 @@
 								 class="layui-input">
 								 class="layui-input">
 							</div>
 							</div>
 						</div>
 						</div>
+						<div class="layui-form-item">
+							<label class="layui-form-label"><span style="color:#f90c05;">*</span>上级</label>
+							<div class="layui-input-block">
+								<select name="pid" lay-search lay-verify="required">
+									<option value="0" {$cate.pid==0 ? 'selected' : '' }>顶级</option>
+									{volist name="catelist" id="vo"}
+									<option value="{$vo.id}" {$cate.pid==$vo.id ? 'selected' : '' }>{$vo.title}</option>
+									{/volist}
+								</select>
+							</div>
+						</div>
 						<div class="layui-form-item">
 						<div class="layui-form-item">
 							<label class="layui-form-label"><span style="color:#f90c05;">*</span>排序</label>
 							<label class="layui-form-label"><span style="color:#f90c05;">*</span>排序</label>
 							<div class="layui-input-block">
 							<div class="layui-input-block">

+ 4 - 0
app/admin/view/comjobs/catelist.html

@@ -5,6 +5,9 @@
 		</div>
 		</div>
 		<div class="layui-card-body">
 		<div class="layui-card-body">
 			<table id="LAY-comjobs-catelist-table" lay-filter="LAY-comjobs-catelist-table"></table>
 			<table id="LAY-comjobs-catelist-table" lay-filter="LAY-comjobs-catelist-table"></table>
+			<script type="text/html" id="pidTpl">
+				{{d.pid == 0 ? '顶级' : d.pcate.title}}
+			</script>
 			<script type="text/html" id="setTpl">
 			<script type="text/html" id="setTpl">
 				<a class="layui-btn layui-btn-normal layui-btn-xs" lay-event="edit"><i class="layui-icon layui-icon-edit"></i>编辑</a>
 				<a class="layui-btn layui-btn-normal layui-btn-xs" lay-event="edit"><i class="layui-icon layui-icon-edit"></i>编辑</a>
 				<a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del"><i class="layui-icon layui-icon-delete"></i>删除</a>
 				<a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del"><i class="layui-icon layui-icon-delete"></i>删除</a>
@@ -32,6 +35,7 @@
 			cols: [
 			cols: [
 				[
 				[
 					{ field: 'id', width: 120, title: '表ID', sort: true },
 					{ field: 'id', width: 120, title: '表ID', sort: true },
+					{ field: 'pid', title: '上级名称', toolbar: '#pidTpl'},
 					{ field: 'priority', width: 120, title: '排序', sort: true, edit: 'text' },
 					{ field: 'priority', width: 120, title: '排序', sort: true, edit: 'text' },
 					{ field: 'title', title: '分类名称', edit: 'text' },
 					{ field: 'title', title: '分类名称', edit: 'text' },
 					{ title: '操作', width: 150, align: 'center', fixed: 'right', toolbar: '#setTpl' }
 					{ title: '操作', width: 150, align: 'center', fixed: 'right', toolbar: '#setTpl' }

+ 1 - 1
app/common.php

@@ -109,7 +109,7 @@ function export_excel($expTitle, $expCellName, $expTableData)
     $objPHPExcel = new PHPExcel();//方法一
     $objPHPExcel = new PHPExcel();//方法一
     $cellName    = ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', 'AA',
     $cellName    = ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', 'AA',
                     'AB', 'AC', 'AD', 'AE', 'AF', 'AG', 'AH', 'AI', 'AJ', 'AK', 'AL', 'AM', 'AN', 'AO', 'AP', 'AQ', 'AR', 'AS', 'AT', 'AU', 'AV', 'AW', 'AX',
                     'AB', 'AC', 'AD', 'AE', 'AF', 'AG', 'AH', 'AI', 'AJ', 'AK', 'AL', 'AM', 'AN', 'AO', 'AP', 'AQ', 'AR', 'AS', 'AT', 'AU', 'AV', 'AW', 'AX',
-                    'AY', 'AZ'];
+                    'AY', 'AZ', 'BA', 'BB', 'BC', 'BD', 'BE', 'BF', 'BG', 'BH', 'BI', 'BJ', 'BK', 'BL', 'BM', 'BN'];
     //设置头部导出时间备注
     //设置头部导出时间备注
     $objPHPExcel->getActiveSheet(0)->mergeCells('A1:' . $cellName[$cellNum - 1] . '1');//合并单元格
     $objPHPExcel->getActiveSheet(0)->mergeCells('A1:' . $cellName[$cellNum - 1] . '1');//合并单元格
     $objPHPExcel->setActiveSheetIndex(0)->setCellValue('A1', $expTitle . ' 导出时间:' . date('Y-m-d H:i:s'));
     $objPHPExcel->setActiveSheetIndex(0)->setCellValue('A1', $expTitle . ' 导出时间:' . date('Y-m-d H:i:s'));

+ 5 - 1
app/common/model/ComjobsCate.php

@@ -8,9 +8,13 @@ class ComjobsCate extends Model
 	// 设置字段信息
 	// 设置字段信息
     protected $schema = [
     protected $schema = [
         'id'			=> 'int',
         'id'			=> 'int',
+        'pid'			=> 'int',
 		'title'			=> 'string',
 		'title'			=> 'string',
         'priority'		=> 'int'
         'priority'		=> 'int'
     ];
     ];
 
 
-	
+	public function pcate()
+    {
+        return $this->hasOne(ComjobsCate::class,'id','pid');
+    }
 }
 }

BIN
public/static/images/applet/qrcode_jinlinli.jpg