linwu пре 2 година
родитељ
комит
792de1e63f

+ 1 - 0
app/admin/controller/Demand.php

@@ -152,6 +152,7 @@ class Demand extends BaseController
         $data    = [
             'workerid'    => input('workerid/d', 0),
             'title'       => input('title/s', ""),
+            'num'         => input('num/d', 1),
             'cateid'      => input('cateid/d', 0),
             'province'    => input('province/s', ""),
             'city'        => input('city/s', ""),

+ 7 - 0
app/admin/view/demand/demandform.html

@@ -25,6 +25,13 @@
 								 autocomplete="off" class="layui-input">
 							</div>
 						</div>
+						<div class="layui-form-item">
+							<label class="layui-form-label"><span style="color:#f90c05;">*</span>招聘人数</label>
+							<div class="layui-input-block">
+								<input type="text" name="num" value="{$demand.num|default=1}" lay-verify="number" placeholder="请输入..."
+									   autocomplete="off" class="layui-input">
+							</div>
+						</div>
 						<div class="layui-form-item" id="video-box">
 							<input type="hidden" id="old_video" value="{$demand.video}" name="old_video"/>
 							<input type="hidden" id="new_video" value="" name="new_video"/>

+ 1 - 0
app/admin/view/demand/demandlist.html

@@ -136,6 +136,7 @@
 					{ field: 'id', width: 80, title: '表ID', sort: true },
 					{ field: 'priority', width: 100, title: '排序ID', sort: true, edit: 'text' }, 
 					{ field: 'title', title: '岗位标题', minWidth: 300, edit: 'text' },
+					{ field: 'num', title: '招聘人数', width: 100 },
 					{ field: 'workerid', title: '劳务公司', minWidth: 240, toolbar: '<div>{{d.worker.title}}</div>' },
 					{ field: 'cateid', title: '岗位类型', width: 120, toolbar: '<div>{{d.demandCate.title}}</div>' },
 					{ field: 'province', title: '省', width: 100 },

+ 1 - 0
app/common/model/Demand.php

@@ -16,6 +16,7 @@ class Demand extends Model
         'workerid' => 'int',
         'type'     => 'int',
         'title'    => 'string',
+        'num'      => 'int',
         'video'    => 'string',
         'cateid'   => 'int',
 

+ 20 - 18
app/common/validate/Demand.php

@@ -7,25 +7,27 @@ use think\Validate;
 class Demand extends Validate
 {
     protected $rule = [
-        'title'			=>  'require',
-		'cateid'		=>  'require',
-		'province'		=>  'require',
-		'city'			=>  'require',
-		'district'		=>  'require',
-		'agegroup'		=>  'require',
-		'tags'			=>  'require',
-		'enddate'		=>  'require'
+        'title'    => 'require',
+        'num'      => 'require',
+        'cateid'   => 'require',
+        'province' => 'require',
+        'city'     => 'require',
+        'district' => 'require',
+        'agegroup' => 'require',
+        'tags'     => 'require',
+        'enddate'  => 'require',
     ];
-	
-	protected $message  =   [
-		'title.require'			=> "订单标题不能为空",
-		'cateid.require'		=> "岗位类型不能为空",
-		'province.require'		=> "工作地点不能为空",
-		'city.require'			=> "工作地点不能为空",
-		'district.require'		=> "工作地点不能为空",
-		'agegroup.require'		=> "招工年龄不能为空",
-		'tags.require'			=> "招聘标签不能为空",
-		'enddate.require'		=> "截止日期不能为空"
+
+    protected $message = [
+        'title.require'    => "订单标题不能为空",
+        'num.require'      => "招聘人数不能为空",
+        'cateid.require'   => "岗位类型不能为空",
+        'province.require' => "工作地点不能为空",
+        'city.require'     => "工作地点不能为空",
+        'district.require' => "工作地点不能为空",
+        'agegroup.require' => "招工年龄不能为空",
+        'tags.require'     => "招聘标签不能为空",
+        'enddate.require'  => "截止日期不能为空",
     ];
 
 }

+ 1 - 1
app/mainapp/controller/Demand.php

@@ -82,7 +82,7 @@ class Demand extends BaseController
         $psize     = input('psize/d', 20);
         $map       = [];
         $map[]     = ['createtime', '<=', time()];
-        $map[]     = ['status', 'in', '3,4'];
+        $map[]     = ['status', '=', '3'];
         $searchval = input('searchval/s', "");
         if (!empty($searchval)) {
             $map[] = ['title', 'like', '%' . $searchval . '%'];

+ 1 - 0
app/mainapp/controller/Wdemand.php

@@ -246,6 +246,7 @@ class Wdemand extends BaseController
 		$data = [
 			'workerid'			=> input('workerid/d', 0),
 			'title'				=> input('title/s', ""),
+			'num'				=> input('num/d', ""),
 			'cateid'			=> input('cateid/d', 0),
 			'province'			=> input('province/s', ""),
 			'city'				=> input('city/s', ""),

+ 1 - 0
app/worker/controller/Demand.php

@@ -316,6 +316,7 @@ class Demand extends BaseController
         $data    = [
             'workerid'    => $workerid,
             'title'       => input('title/s', ""),
+            'num'         => input('num/d', 1),
             'cateid'      => input('cateid/d', 0),
             'province'    => input('province/s', ""),
             'city'        => input('city/s', ""),

+ 7 - 1
app/worker/view/demand/demandform.html

@@ -22,7 +22,13 @@
 								 autocomplete="off" class="layui-input">
 							</div>
 						</div>
-
+						<div class="layui-form-item">
+							<label class="layui-form-label"><span style="color:#f90c05;">*</span>招聘人数</label>
+							<div class="layui-input-block">
+								<input type="text" name="num" value="{$demand.num|default=1}" lay-verify="number" placeholder="请输入..."
+									   autocomplete="off" class="layui-input">
+							</div>
+						</div>
 						<div class="layui-form-item" id="video-box">
 							<input type="hidden" id="old_video" value="" name="old_video"/>
 							<input type="hidden" id="new_video" value="" name="new_video"/>

+ 2 - 5
app/worker/view/demand/demandlist.html

@@ -78,11 +78,7 @@
 		<div class="layui-card-body">
 			<div style="padding-bottom: 10px;">
 				<button class="layui-btn layuiadmin-btn" data-type="batchdel">删除</button>
-				<button class="layui-btn layuiadmin-btn" data-type="add">发布普通订单</button>
-
-				<?php if($wtype ==2):?>
-					<button class="layui-btn layuiadmin-btn" data-type="add_wyd">发布悬赏单</button>
-				<?php endif;?>
+				<button class="layui-btn layuiadmin-btn" data-type="add">发布派遣订单</button>
 			</div>
 
 			<table id="LAY-demand-demandlist-table" lay-filter="LAY-demand-demandlist-table"></table>
@@ -123,6 +119,7 @@
 					{ field: 'id', width: 80, title: '表ID', sort: true },
 					{ field: 'priority', width: 100, title: '排序ID', sort: true},
 					{ field: 'title', title: '岗位标题', minWidth: 300},
+					{ field: 'num', title: '招聘人数', width: 100 },
 					{ field: 'cateid', title: '岗位类型', width: 120, toolbar: '<div>{{d.demandCate.title}}</div>' },
 					{ field: 'province', title: '省', width: 100 },
 					{ field: 'city', title: '市', width: 100 },