lsw 11 bulan lalu
induk
melakukan
4d1291afa5

+ 5 - 2
app/components/job/job.vue

@@ -3,10 +3,13 @@
 		<view class="item_job" v-for="(item, index) in list" :key="index" @click="go('/pages/job/detail?id=' + item.id)">
 			<view class="top">
 				<view class="title omit">{{ item.title }}</view>
-				<view class="salary">{{ item.salary }}</view>
+				<view class="salary" v-if="item.type == 0">{{ item.salary }}</view>
+				<view class="salary" v-if="item.type == 1">{{ item.salary }}¥</view>
 			</view>
 			<view class="con">
-				<text class="desc">{{ item.experience == '不限' ? '经验不限' : item.experience + '经验' }}</text>
+				<text class="desc" v-if="item.type == 0">{{ item.experience == '不限' ? '经验不限' : item.experience + '经验' }}</text>
+				<text class="desc" v-if="item.type == 1">完工结算</text>
+				<text class="desc" v-if="item.type == 1">{{ item.startDate }}至{{ item.endDate }}</text>
 			</view>
 			<view class="bot">
 				<view class="address omit">

+ 27 - 48
app/pages.json

@@ -133,18 +133,6 @@
 			}
 		},
 		{
-			"path": "pages/job/position/manage/list",
-			"style": {
-				"navigationBarTitleText": "职位管理"
-			}
-		},
-		{
-			"path": "pages/job/position/manage/push",
-			"style": {
-				"navigationBarTitleText": "职位发布"
-			}
-		},
-		{
 			"path": "pages/news/index",
 			"style": {
 				"navigationBarTitleText": "资讯",
@@ -234,66 +222,57 @@
 			}
 		},
 		{
-			"path" : "pages/other/agreement",
-			"style" : 
-			{
-				"navigationBarTitleText" : "协议"
+			"path": "pages/other/agreement",
+			"style": {
+				"navigationBarTitleText": "协议"
 			}
 		},
 		{
-			"path" : "pages/notice/index",
-			"style" : 
-			{
-				"navigationBarTitleText" : "通知公告"
+			"path": "pages/notice/index",
+			"style": {
+				"navigationBarTitleText": "通知公告"
 			}
 		},
 		{
-			"path" : "pages/notice/detail",
-			"style" : 
-			{
-				"navigationBarTitleText" : "通知详情"
+			"path": "pages/notice/detail",
+			"style": {
+				"navigationBarTitleText": "通知详情"
 			}
 		},
 		{
-			"path" : "pages/user/money/index",
-			"style" : 
-			{
-				"navigationBarTitleText" : "资金管理"
+			"path": "pages/user/money/index",
+			"style": {
+				"navigationBarTitleText": "资金管理"
 			}
 		},
 		{
-			"path" : "pages/user/money/add",
-			"style" : 
-			{
-				"navigationBarTitleText" : "金额充值"
+			"path": "pages/user/money/add",
+			"style": {
+				"navigationBarTitleText": "金额充值"
 			}
 		},
 		{
-			"path" : "pages/job/position/manage/part_time",
-			"style" : 
-			{
-				"navigationBarTitleText" : "兼职管理"
+			"path": "pages/job/position/manage/part_time",
+			"style": {
+				"navigationBarTitleText": "兼职管理"
 			}
 		},
 		{
-			"path" : "pages/job/position/manage/part_time_push",
-			"style" : 
-			{
-				"navigationBarTitleText" : "发布兼职"
+			"path": "pages/job/position/manage/part_time_push",
+			"style": {
+				"navigationBarTitleText": "发布兼职"
 			}
 		},
 		{
-			"path" : "pages/job/position/manage/full_time",
-			"style" : 
-			{
-				"navigationBarTitleText" : "职位管理"
+			"path": "pages/job/position/manage/full_time",
+			"style": {
+				"navigationBarTitleText": "职位管理"
 			}
 		},
 		{
-			"path" : "pages/job/position/manage/full_time_push",
-			"style" : 
-			{
-				"navigationBarTitleText" : "发布职位"
+			"path": "pages/job/position/manage/full_time_push",
+			"style": {
+				"navigationBarTitleText": "发布职位"
 			}
 		}
 	],

+ 17 - 3
app/pages/job/detail.vue

@@ -3,8 +3,11 @@
 		<view class="main">
 			<view class="title">{{ item.title || '' }}</view>
 			<view class="price" v-if="item.type == 0">{{ item.salary == '面议' ? item.salary : item.salary + '/月' }}</view>
+			<view class="price" v-if="item.type == 1">{{ item.salary }}¥</view>
 			<view class="desc" v-if="item.title">
-				<text>{{ item.experience == '不限' ? '经验不限' : item.experience + '经验' }} · {{ item.positionName || '' }} · {{ item.type == 0 ? '全职' : '兼职' }}</text>
+				<text v-if="item.type == 0">{{ item.experience == '不限' ? '经验不限' : item.experience + '经验' }}</text>
+				<text>{{ item.positionName || '' }}</text>
+				<text>{{ item.type == 0 ? '全职' : '兼职' }}</text>
 				<view class="audit">
 					<text class="icon">&#xe64f;</text>
 					<text>已审核</text>
@@ -13,8 +16,15 @@
 		</view>
 		<view class="bos">
 			<view class="ms" style="margin-top: 0px">
-				<view class="mtitle">职位描述</view>
+				<view v-if="item.type == 1">
+					<view class="mtitle">兼职时间</view>
+					<view class="desc" style="margin-bottom: 15px">{{ item.startDate }}至{{ item.endDate }},共计:{{ item.days }}天</view>
+					<view class="mtitle">结算方式</view>
+					<view class="desc" style="margin-bottom: 15px">在规定时间内完工结算</view>
+				</view>
+				<view class="mtitle">{{ item.type == 0 ? '职位描述' : '兼职描述' }}</view>
 				<u-parse :content="item.contents" class="item"></u-parse>
+				<map :latitude="item.latitude" :longitude="item.longitude" :markers="covers" v-if="item.latitude"></map>
 			</view>
 			<!--企业信息-->
 			<view v-if="item.type == 0">
@@ -49,7 +59,7 @@
 				</view>
 				<button class="btn" @click="send()">
 					<text class="icon">&#xe652;</text>
-					<text>投递简历</text>
+					<text>{{ item.type == 0 ? '投递简历' : '立即报名' }}</text>
 				</button>
 			</view>
 		</view>
@@ -73,6 +83,7 @@ export default {
 				this.item = res.data.data.position;
 				this.enterprise = res.data.data.enterprise;
 				this.covers.push({ latitude: this.item.latitude, longitude: this.item.longitude });
+				this.item.days = this.util.days(this.item.startDate, this.item.endDate);
 			}
 		});
 	},
@@ -155,6 +166,9 @@ export default {
 .desc {
 	padding-top: 5px;
 	font-size: 14px;
+	text {
+		padding-right: 10px;
+	}
 	.audit {
 		float: right;
 		color: $main-color;

+ 1 - 1
app/pages/job/list.vue

@@ -11,7 +11,7 @@
 		</view>
 		<view class="tab">
 			<u-tabs :list="tab" :inactiveStyle="{ fontSize: '16px' }" :lineHeight="5" :activeStyle="{ color: '#3c9cff', fontSize: '16px' }" :current="current" @click="tabClick"></u-tabs>
-			<view class="filters" @click="show = true">
+			<view class="filters" @click="show = true" v-if="param.type == 0">
 				<text class="icon">&#xe68c;</text>
 				<text>筛选</text>
 			</view>

+ 10 - 24
app/pages/job/position/manage/list.vue → app/pages/job/position/manage/full_time.vue

@@ -1,13 +1,10 @@
 <template>
 	<view>
-		<view class="tab">
-			<u-tabs :list="type" @click="click($event, 'type')"></u-tabs>
-		</view>
 		<view class="position">
 			<view class="audits">
-				<view class="audit" :class="{ active: current == index }" v-for="(item, index) in audit" :key="index" @click="click({ index: index }, 'audit')">{{ item.name }}</view>
+				<view class="audit" :class="{ active: current == index }" v-for="(item, index) in audit" :key="index" @click="click(index)">{{ item.name }}</view>
 			</view>
-			<view class="item" v-for="(item, index) in list" :key="index" @click="detail(item)">
+			<view class="item" v-for="(item, index) in list" :key="index" @click="go('/pages/job/position/manage/full_time_push?id=' + item.id)">
 				<view class="top">
 					<view class="title omit">
 						<text class="icon" :style="{ color: item.state == 0 ? '#4CAF50' : '#545555' }">&#xe614;</text>
@@ -40,9 +37,8 @@
 			<view class="loading" v-if="loadMore"><u-loadmore :status="loadMore ? 'loading' : 'nomore'" /></view>
 			<u-empty v-if="!loadMore && list.length == 0"></u-empty>
 		</view>
-		<u-action-sheet round="20" :actions="type" @select="selectClick" cancelText="取消" :show="show" @close="show = false"></u-action-sheet>
 		<view class="mfooter">
-			<button class="btn" @click="show = true">
+			<button class="btn" @click="go('/pages/job/position/manage/full_time_push')">
 				<text class="icon">&#xe7c4;</text>
 				<text>发布职位</text>
 			</button>
@@ -54,10 +50,6 @@
 export default {
 	data() {
 		return {
-			type: [
-				{ name: '全职', value: 0 },
-				{ name: '兼职', value: 1 }
-			],
 			audit: [
 				{ name: '全部', value: '' },
 				{ name: '待审核', value: 0 },
@@ -67,8 +59,7 @@ export default {
 			current: 0,
 			list: [],
 			param: { pageNum: 1, pageSize: 10, type: 0 },
-			loadMore: true,
-			show: false
+			loadMore: true
 		};
 	},
 	onLoad(e) {
@@ -92,18 +83,13 @@ export default {
 				}
 			});
 		},
-		click(e, tag) {
-			this.param[tag] = this[tag][e.index].value;
-			if (tag == 'audit') {
-				this.current = e.index;
-			}
+		click(index) {
+			this.param.audit = this.audit[index].value;
+			this.current = index;
 			this.refresh();
 		},
-		selectClick(e) {
-			uni.navigateTo({ url: '/pages/job/position/manage/push?type=' + e.value });
-		},
-		detail(item) {
-			uni.navigateTo({ url: '/pages/job/position/manage/push?id=' + item.id });
+		go(url) {
+			uni.navigateTo({ url: url });
 		},
 		manageState(item) {
 			uni.showModal({
@@ -113,7 +99,7 @@ export default {
 					if (res.confirm) {
 						this.http.request({
 							url: '/app/position/manage/state',
-							data: { id: item.id, state: item.state == 0 ? 1 : 0 },
+							data: { id: item.id, state: item.state == 0 ? 1 : 0, type: 0 },
 							method: 'POST',
 							success: (res) => {
 								uni.showToast({ title: '操作成功' });

+ 11 - 59
app/pages/job/position/manage/push.vue → app/pages/job/position/manage/full_time_push.vue

@@ -15,52 +15,21 @@
 			<view class="lable re">职位描述(要求)</view>
 			<leditor ref="editor" v-model="item.contents" placeholder="请输入职位描述"></leditor>
 		</view>
-		<view class="form_group" v-if="item.type == 0">
+		<view class="form_group">
 			<view class="lable re">经验要求</view>
 			<picker :range="dict.experience" @change="picker($event, 'experience')">
 				<input placeholder="请选择" v-model="item.experience" :disabled="true" />
 				<view class="icon more">&#xe8f2;</view>
 			</picker>
 		</view>
-		<view v-if="item.type == 0">
-			<view class="form_group">
-				<view class="lable re">薪资范围</view>
-				<multiSelector v-model="item.salary" :range="dict.salary" name="薪资" placeholder="请选择薪资范围"></multiSelector>
-			</view>
-		</view>
-		<view v-else>
-			<view class="form_group">
-				<view class="lable re">兼职金额(元)</view>
-				<input type="number" placeholder="请输入" v-model="item.salary" />
-			</view>
-			<view class="form_group">
-				<view class="lable re">结算类型</view>
-				<picker :range="dict.unit" @change="picker($event, 'unit')">
-					<input placeholder="请选择" v-model="item.unit" :disabled="true" />
-					<view class="icon more">&#xe8f2;</view>
-				</picker>
-			</view>
-			<view class="form_group">
-				<view class="lable re">兼职时间</view>
-			</view>
-			<view class="form_group" style="display: flex">
-				<view class="start">
-					<picker mode="date" :start="end" @change="picker($event, 'startDate')">
-						<input placeholder="开始时间" v-model="item.startDate" :disabled="true" />
-					</picker>
-				</view>
-				<view class="hor">至</view>
-				<view class="start">
-					<picker mode="date" :start="end" @change="picker($event, 'endDate')">
-						<input placeholder="结束时间" v-model="item.endDate" :disabled="true" />
-					</picker>
-				</view>
-			</view>
+		<view class="form_group">
+			<view class="lable re">薪资范围</view>
+			<multiSelector v-model="item.salary" :range="dict.salary" name="薪资" placeholder="请选择薪资范围"></multiSelector>
 		</view>
 		<view class="form_group">
-			<view class="lable" :class="item.type == 0 ? 're' : ''">{{ item.type == 0 ? '工作地点' : '兼职地点' }}</view>
+			<view class="lable re">工作地点</view>
 			<picker :disabled="true" @click="chooseLocation()">
-				<input :placeholder="item.type == 0 ? '请选择' : '留空不限工作地点'" v-model="item.location" :disabled="true" />
+				<input placeholder="请选择" v-model="item.location" :disabled="true" />
 				<view class="icon more">&#xe8f2;</view>
 			</picker>
 			<input placeholder="请输入楼层/单元室/门牌号" v-model="item.mph" v-if="item.address" />
@@ -73,35 +42,22 @@
 export default {
 	data() {
 		return {
-			lable: '职位',
-			user: this.getUser(),
-			item: {},
-			end: this.util.getDate('day'),
+			item: { type: 0 },
 			dict: {
 				positionName: this.util.getData('positionName'),
 				experience: this.util.getData('experience'),
-				salary: [['面议'], ['']],
-				location: this.util.getData('address'),
-				unit: this.util.getData('unit')
-			},
-			rule: []
+				salary: [['面议'], ['']]
+			}
 		};
 	},
 	onLoad(e) {
-		if (e.type) {
-			this.item.type = e.type;
-			setTimeout(() => {
-				uni.setNavigationBarTitle({ title: e.type == 0 ? '发布全职' : '发布兼职' });
-			}, 300);
-			this.$forceUpdate();
-		}
 		if (e.id) {
 			this.http.request({
 				url: '/app/position/manage/detail/' + e.id,
 				success: (res) => {
 					this.item = res.data.data;
 					this.$refs.editor.setContents();
-					uni.setNavigationBarTitle({ title: this.item.type == 0 ? '编辑全职' : '编辑兼职' });
+					uni.setNavigationBarTitle({ title: '编辑职位' });
 				}
 			});
 		}
@@ -113,11 +69,7 @@ export default {
 	},
 	methods: {
 		picker(e, tag) {
-			if (tag == 'startDate' || tag == 'endDate') {
-				this.item[tag] = e.detail.value;
-			} else {
-				this.item[tag] = this.dict[tag][e.detail.value];
-			}
+			this.item[tag] = this.dict[tag][e.detail.value];
 			this.$forceUpdate();
 		},
 		go(url) {

+ 11 - 0
ruoyi-admin/src/main/java/com/ruoyi/web/work/domain/vo/PositionListVo.java

@@ -1,9 +1,12 @@
 package com.ruoyi.web.work.domain.vo;
 
+import com.fasterxml.jackson.annotation.JsonFormat;
 import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
 import lombok.experimental.Accessors;
 
+import java.util.Date;
+
 /**
  * @author lsw
  * @date 2024-06-07
@@ -43,4 +46,12 @@ public class PositionListVo{
     @ApiModelProperty(value = "距离km")
     private String distance;
 
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    @ApiModelProperty(value = "开始时间")
+    private Date startDate;
+
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    @ApiModelProperty(value = "结束时间")
+    private Date endDate;
+
 }

+ 3 - 1
ruoyi-admin/src/main/resources/mapper/work/PositionMapper.xml

@@ -39,7 +39,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         region_name,
         location,
         latitude,
-        longitude
+        longitude,
+        start_date,
+        end_date
         <if test="longitude !=null and longitude !=null ">,ROUND( ST_Distance_Sphere ( POINT ( #{longitude}, #{latitude} ), POINT ( longitude, latitude ))/ 1000, 2 ) AS distance</if>
         FROM
         tb_position