zhengkaixin hace 1 año
padre
commit
09e0f70918

+ 29 - 0
apis/pagejs/packages.js

@@ -117,3 +117,32 @@ export function joinRecruit(data) {
  		url: '/mobile/job/joinRecruit'
  	})
 }
+
+export function myEmployment(data) {
+ 	return request({
+ 		method: 'post',
+ 		data: data,
+ 		url: '/mobile/recruit/myEmployment'
+ 	})
+}
+export function myEmploymentDelete(data) {
+ 	return request({
+ 		method: 'post',
+ 		data: data,
+ 		url: '/mobile/recruit/myEmploymentDelete'
+ 	})
+}
+export function myEmploymentRefresh(data) {
+ 	return request({
+ 		method: 'post',
+ 		data: data,
+ 		url: '/mobile/recruit/myEmploymentRefresh'
+ 	})
+}
+export function myReceivedRegistration(data) {
+ 	return request({
+ 		method: 'post',
+ 		data: data,
+ 		url: '/mobile/recruit/myReceivedRegistration'
+ 	})
+}

+ 8 - 1
main.js

@@ -32,7 +32,14 @@ Vue.mixin({
 
 	},
 	methods: {
-		
+		getUnit(settlementMethod,item){
+			
+			if(item){
+				return ['', '日', '周', '月'][item.settlementMethod]
+			}else{
+				return  ['', '日', '周', '月'][settlementMethod];
+			}
+		},
 		gotoUrl(url,tab) {
 			uni.navigateTo({
 				url: "/" + url

+ 308 - 215
pages/packages/mine/employmentService/laborManagement/laborManagement.vue

@@ -1,220 +1,313 @@
-<template>
-	<view>
-		<u-navbar back-text="用工管理" back-icon-size="28" back-icon-color="#ffffff"
-			:background="{backgroundColor: '#2795FD',}" :back-text-style="{color: '#ffffff'}"></u-navbar>
-		<!-- 标签 -->
-		<view class="tabs">
-			<u-tabs :list="list" :is-scroll="false" :current="current" @change="change"></u-tabs>
-		</view>
-		<!-- 发布中 -->
-		<view class="my-registration" v-if="current==0">
-			<view class="card">
-				<view class="positon-salary">
-					<view class="positon">
-						摄影助理
-					</view>
-					<view class="salary">
-						200元/天
-					</view>
-				</view>
-				<view class="tags-date">
-					<view class="tags">
-						招聘1人
-					</view>
-					<view class="date">
-						报名时间:2023-06-01
-					</view>
-				</view>
-				<u-line color="#E6E6E6"></u-line>
-				<view class="buttons">
-					<view class="btn refresh">
-						刷新
-					</view>
-					<view class="btn amend">
-						修改
-					</view>
-					<view class="btn delete">
-						删除
-					</view>
-				</view>
-			</view>
-		</view>
-		
-	 <!-- 待审核 -->
-	 <view class="my-registration" v-if="current==1">
-	 	<view class="card">
-	 		<view class="positon-salary">
-	 			<view class="positon">
-	 				摄影助理
-	 			</view>
-	 			<view class="salary">
-	 				200元/天
-	 			</view>
-	 		</view>
-	 		<view class="tags-date">
-	 			<view class="tags">
-	 				招聘1人
-	 			</view>
-	 			<view class="date">
-	 				报名时间:2023-06-01
-	 			</view>
-	 		</view>
-	 		<u-line color="#E6E6E6"></u-line>
-	 		<view class="buttons">
-	 			
-	 			<view class="btn amend">
-	 				修改
-	 			</view>
-	 			<view class="btn delete">
-	 				删除
-	 			</view>
-	 		</view>
-	 	</view>
-	 </view>
-	 <!-- 未通过 -->
-	 <view class="my-registration" v-if="current==2">
-	 	<view class="card">
-	 		<view class="positon-salary">
-	 			<view class="positon">
-	 				摄影助理
-	 			</view>
-	 			<view class="salary">
-	 				200元/天
-	 			</view>
-	 		</view>
-	 		<view class="tags-date">
-	 			<view class="tags">
-	 				招聘1人
-	 			</view>
-	 			<view class="date">
-	 				报名时间:2023-06-01
-	 			</view>
-	 		</view>
-	 		<u-line color="#E6E6E6"></u-line>
-	 		<view class="buttons">
-	 			
-	 			<view class="btn amend">
-	 				修改
-	 			</view>
-	 			<view class="btn delete">
-	 				删除
-	 			</view>
-	 		</view>
-	 	</view>
-	 </view>
-	     
-		 <!-- 底部 -->
-		 <view class="bottom">
-		 	<button class="issue">发布用工需求
-</button>
-		 </view>
-	</view>
-</template>
-
-<script>
-	import * as API from '@/apis/pagejs/packages.js'
-	export default {
-		data() {
-			return {
-				list: [{
-					name: '发布中'
-				}, {
-					name: '待审核'
-				},{
-					name:'未通过'
-				}],
-				current: 0
-			}
+<template>
+	<view>
+		<u-navbar back-text="用工管理" back-icon-size="28" back-icon-color="#ffffff"
+			:background="{backgroundColor: '#2795FD',}" :back-text-style="{color: '#ffffff'}"></u-navbar>
+		<!-- 标签 -->
+		<view class="tabs">
+			<u-tabs :list="list" :is-scroll="false" :current="current" @change="change"></u-tabs>
+		</view>
+		<!-- 发布中 -->
+		<view class="my-registration" v-for="(item,i) in list[current].list"   :key="i">
+			<view class="card">
+				<view class="positon-salary">
+					<view class="positon">
+						{{item.positionName}}
+					</view>
+					<view class="salary">
+						{{item.salary}}元/{{getUnit(0,item)}}
+					</view>
+				</view>
+				<view class="tags-date">
+					<view class="tags">
+						招聘{{item.recruitingNumbers}}人
+					</view>
+					<view class="date">
+						刷新时间:{{item.updateTime?item.updateTime:item.createTime}}
+					</view>
+				</view>
+				<u-line color="#E6E6E6"></u-line>
+				<view class="buttons">
+					<view class="btn refresh" v-show="item.status=='1'" @click="refreshBtn(item)">
+						刷新
+					</view>
+					<view class="btn amend"  @click="amendBtn(item)">
+						修改
+					</view>
+					<view class="btn delete"  @click="deleteBtn(item)">
+						删除
+					</view>
+				</view>
+			</view>
+		</view>
+		<u-divider  v-if="list[current].recordsTotal==list[current].list.length"
+				 :isnone="list[current].recordsTotal==0" nonetext="没有找到相关内容" 
+				border-color="#CFD2D5">已经到底了</u-divider>
+		
+
+		<!-- 底部 -->
+		<view class="bottom">
+			<button class="issue" @click="addInfo">发布用工需求
+			</button>
+		</view>
+	</view>
+</template>
+
+<script>
+	import * as API from '@/apis/pagejs/packages.js'
+	export default {
+		data() {
+			return {
+				list: [{
+					name: '发布中',
+					pageIndex: 1,
+					pageSize: 20,
+					recordsTotal: 1,
+					status: "1",
+					list: []
+				}, {
+					name: '待审核',
+					pageIndex: 1,
+					pageSize: 20,
+					recordsTotal: 1,
+					status: "0",
+					list: []
+				}, {
+					name: '未通过',
+					pageIndex: 1,
+					pageSize: 20,
+					recordsTotal: 1,
+					status: "2",
+					list: []
+				}],
+				current: 0
+			}
 		},
+		onLoad() {
+			this.getList();
+		},
 		methods: {
-			change(index) {
+			getList() {
+			
+				uni.showLoading({
+					title: "加载中",
+					mask: true,
+				})
+				var list = this.list[this.current].list
+				var obj = this.list[this.current]
+				var listForm = {
+					...obj
+				}
+				delete listForm.list
+			
+				API.myEmployment(listForm).then((res) => {
+			
+					if (listForm.pageIndex == 1) {
+						list = res.data.data;
+					} else {
+						list = [
+							...list,
+							...res.data.data
+						];
+					}
+			
+					this.list[this.current].list = list
+			
+					this.list[this.current].recordsTotal = res.data.recordsTotal;
+					uni.hideLoading();
+				}).catch(error => {
+					uni.showToast({
+						title: error,
+						icon: "none"
+					})
+				})
+			
+			},
+			myLoadmore() {
+				this.list[this.current].pageIndex += 1;
+				this.getList();
+			},
+			init() {
+				this.current = 0
+				for(var i in this.list){
+					this.list[i].pageIndex = 1
+					this.list[i].list = []
+				}
+				this.getList()
+			},
+			amendBtn(item) {
+				var url = "/pages/packages/mine/employmentService/laborManagement/postMessage?id=" +item.id;
+				uni.navigateTo({
+					url: url,
+					events: {
+						refreshData: () => {
+							this.init()
+						}
+					}
+				})
+			},
+			addInfo() {
+				var url = "/pages/packages/mine/employmentService/laborManagement/postMessage";
+				uni.navigateTo({
+					url: url,
+					events: {
+						refreshData: () => {
+							this.init()
+						}
+					}
+				})
+			},
+			change(index) {
 				this.current = index;
-			}
-		}
-	}
-</script>
-<style>
-	page {
-		background: #F0F0F2;
-		padding-bottom: 150px;
-	}
-</style>
-<style scoped lang="scss">
-	.card{
-		margin: 24rpx 32rpx;
-		background-color: #fff;
-		padding: 24rpx;
-		border-radius: 12px;
-		.positon-salary{
-			display: flex;
-			justify-content: space-between;
-			align-items: center;
-			.positon{
-				color: rgba(16, 16, 16, 1);
-				font-size: 36rpx;
+				var list = this.list[this.current].list
+				if (list.length == 0) {
+					this.getList();
+				}
+			},
+			refreshBtn(item){
 				
-				font-family: 'PingFangSC-medium';
-			}
-			.salary{
-				color: rgba(255, 61, 0, 1);
-				font-size: 32rpx;
-				font-family: 'PingFangSC-medium';
-			}
-		}
-		.tags-date{
-			display: flex;
-			justify-content: space-between;
-			align-items: center;
-			margin-top: 16rpx;
-			margin-bottom: 24rpx;
-			.tags{
+				API.myEmploymentRefresh({
+					id:item.id
+				}).then((res) => {
+					item.updateTime=new Date().toLocaleString()
+					uni.showToast({
+						title: "刷新成功",
+						icon: "none"
+					})
+				}).catch(error => {
+					uni.showToast({
+							title: error,
+							icon: "none"
+					})
+				})
 				
-				color: rgba(102, 102, 102, 1);
-			}
-			
-			.date{
-				color: rgba(153, 153, 153, 1);
-				font-size: 24rpx;
-			}
-		}
-		// 按钮
-		.buttons{
-			display: flex;
-			justify-content: flex-end;
-			margin-top: 24rpx;
-			.btn{
-				width: 120rpx;
-				height: 56rpx;
-				line-height: 56rpx;
-				border-radius: 50px;
-				background-color: rgba(255, 255, 255, 1);
-				color: rgba(119, 119, 119, 1);
-				text-align: center;
-				font-family: Microsoft Yahei;
-				border: 1px solid rgba(207, 210, 213, 1);
-				margin-left: 24rpx;
-			}
-			.delete{
-				color: rgba(238, 49, 56, 1);
-			}
-		}
-	}
-
-   .bottom{
-	   position: fixed;
-	   left: 0;
-	   right: 0;
-	   bottom: 0;
-	   .issue{
-		   height: 96rpx;
-		   line-height: 96rpx;
-		   border-radius: 50px;
-		   background-color: rgba(34, 149, 255, 1);
-		   color: rgba(241, 241, 241, 1);
-		   font-size: 36rpx;
-		   text-align: center;
-		   box-shadow: 0px 0px 6px 0px rgba(0, 0, 0, 0.03);
-		   margin: 24rpx 32rpx;
-	   }
-   }
-</style>
+			},
+			deleteBtn(item){
+				var _this=this;
+				uni.showModal({
+					title: '提示',
+					content:"确认是否删除",
+					//content: '这是一个模态弹窗',
+					success: function(res) {
+						if (res.confirm) {
+							_this.deleteBtnMethod(item)
+						} else if (res.cancel) {
+							console.log('用户点击取消');
+						}
+					}
+				});
+			},
+			deleteBtnMethod(item){
+				uni.showLoading({
+					title: "加载中",
+					mask: true,
+				})
+				API.myEmploymentDelete({
+					id:item.id
+				}).then((res) => {
+					this.init()
+				}).catch(error => {
+					uni.showToast({
+							title: error,
+							icon: "none"
+					})
+				})
+				
+			},
+			
+		}
+	}
+</script>
+<style>
+	page {
+		background: #F0F0F2;
+		padding-bottom: 150px;
+	}
+</style>
+<style scoped lang="scss">
+	.card {
+		margin: 24rpx 32rpx;
+		background-color: #fff;
+		padding: 24rpx;
+		border-radius: 12px;
+
+		.positon-salary {
+			display: flex;
+			justify-content: space-between;
+			align-items: center;
+
+			.positon {
+				color: rgba(16, 16, 16, 1);
+				font-size: 36rpx;
+
+				font-family: 'PingFangSC-medium';
+			}
+
+			.salary {
+				color: rgba(255, 61, 0, 1);
+				font-size: 32rpx;
+				font-family: 'PingFangSC-medium';
+			}
+		}
+
+		.tags-date {
+			display: flex;
+			justify-content: space-between;
+			align-items: center;
+			margin-top: 16rpx;
+			margin-bottom: 24rpx;
+
+			.tags {
+
+				color: rgba(102, 102, 102, 1);
+			}
+
+			.date {
+				color: rgba(153, 153, 153, 1);
+				font-size: 24rpx;
+			}
+		}
+
+		// 按钮
+		.buttons {
+			display: flex;
+			justify-content: flex-end;
+			margin-top: 24rpx;
+
+			.btn {
+				width: 120rpx;
+				height: 56rpx;
+				line-height: 56rpx;
+				border-radius: 50px;
+				background-color: rgba(255, 255, 255, 1);
+				color: rgba(119, 119, 119, 1);
+				text-align: center;
+				font-family: Microsoft Yahei;
+				border: 1px solid rgba(207, 210, 213, 1);
+				margin-left: 24rpx;
+			}
+
+			.delete {
+				color: rgba(238, 49, 56, 1);
+			}
+		}
+	}
+
+	.bottom {
+		position: fixed;
+		left: 0;
+		right: 0;
+		bottom: 0;
+
+		.issue {
+			height: 96rpx;
+			line-height: 96rpx;
+			border-radius: 50px;
+			background-color: rgba(34, 149, 255, 1);
+			color: rgba(241, 241, 241, 1);
+			font-size: 36rpx;
+			text-align: center;
+			box-shadow: 0px 0px 6px 0px rgba(0, 0, 0, 0.03);
+			margin: 24rpx 32rpx;
+		}
+	}
+</style>

+ 34 - 2
pages/packages/mine/employmentService/laborManagement/postMessage.vue

@@ -184,14 +184,46 @@
 				workArea:"",
 				sqlList:[[],[],[],[],[],[],[]],
 				valueList:[-1,-1,-1,-1,-1,-1],
-				userInfo:{}
+				userInfo:{},
+				id:"",
 			}
 		},
-		onLoad(){
+		onLoad(op){
 			this.userInfo=this.carhelp.getPersonInfo()	
+			if(op.id){
+				this.id=op.id
+				this.getInfo()
+			}
 			//this.tel=this.userInfo.phone
 		},
 		methods: {
+			getInfo(){
+				uni.showLoading({
+					title: "加载中",
+					mask: true,
+				})
+				
+				API.recruitDetail({
+					recruitId:this.id
+				}).then((res) => {
+					uni.hideLoading()				
+					if(res.data.recruitInformationInfo){
+						this.formData = res.data.recruitInformationInfo;
+						var name=["salaryForm","settlementMethod","industry",]
+						for(var i in  name){
+							console.log(name[i]+'N')
+							this[name[i]]=this.formData[(name[i]+'N')]
+						}
+						this.workArea= this.formData.workArea
+					}
+					
+				}).catch(error => {
+					uni.showToast({
+						title: error,
+						icon: "none"
+					})
+				})
+			},
 			confirm(e) {
 				this.show = false;
 				var name=["salaryForm","settlementMethod",

+ 52 - 8
pages/tab/mine/mine.vue

@@ -101,9 +101,10 @@
 			</view>
 			 <u-grid :col="3" :border="false">
 			 		<u-grid-item @click="toAuthentication">
-						<img src="@/assets/img/riFill-error-warning-fill@1x.png" class="badge-icon"></img>
-						<img src="@/assets/img/riFill-checkbox-circle-fill@1x.png" class="checked">
-			 			<view class="icon">
+						<img v-if="userInfo.status==1||(userInfo.enterpriseInfo&&userInfo.enterpriseInfo.status==1)" src="@/assets/img/riFill-checkbox-circle-fill@1x.png" class="checked">
+			 			<img v-else src="@/assets/img/riFill-error-warning-fill@1x.png" class="badge-icon"></img>
+			 			
+						<view class="icon">
 			 				<img src="@/assets/img/riLine-shield-user-line@1x.png" alt="">
 			 			</view>
 			 			<view class="grid-text">实名认证</view>
@@ -123,12 +124,13 @@
 			 	</u-grid>
 		</view>
 		<!-- 登录弹窗 -->
-			<u-popup v-model="show" mode="center" :closeable="true">
+			<u-popup v-model="show" mode="center" :closeable="true" @close="close" >
 				<view class="title">
 					登录荆开零工驿站
 				</view>
 				<view >
-					<button class="login-btn"  open-type="getPhoneNumber" @getphonenumber="decryptPhoneNumber" >
+					<button class="login-btn"  @click="decryptPhoneNumberH5"
+					 open-type="getPhoneNumber" @getphonenumber="decryptPhoneNumber" >
 						<u-icon name="weixin-fill" size="46"></u-icon>	<text>微信用户一键登录</text>
 					</button>
 				
@@ -146,7 +148,7 @@
 			</u-popup>
 		 
 		<u-modal v-model="showPhone" @confirm="confirmPhone" :confirm-text="confirmText" confirm-color="#606266" :show-cancel-button="true" ref="uModal"
-			:asyncClose="true" :title="title" :content="content" :content-style="{fontSize: '24px',color: '#101010'}"></u-modal>
+			:asyncClose="true" title="客服电话" :content="content" :content-style="{fontSize: '24px',color: '#101010'}"></u-modal>
 			
 		<tabbar  :current="4"></tabbar>
 	</view>
@@ -232,9 +234,10 @@
 					 uni.hideLoading();
 					 this.show=false;
 				 }).catch(error => {
-					  this.show=true;
-					 this.userInfo=null;
+					 console.log("11111")
+					 this.userInfo={};
 					 uni.hideLoading();
+					  this.show=true;
 				 	// uni.showToast({
 				 	// 	title: error
 				 	// })
@@ -243,6 +246,47 @@
 				 })
 				
 			},
+			close(){
+				// #ifdef MP-WEIXIN
+				if(this.userInfo.id){
+					
+				}else{
+					uni.reLaunch({
+						url:"/"
+					})
+				}
+				// #endif
+			},
+			decryptPhoneNumberH5(){
+				// #ifdef H5
+				this.show=false
+					var _this=this
+					uni.showModal({
+						title: '输入手机号测试',
+						editable: true,
+						//content: '这是一个模态弹窗',
+						success: function(res) {
+							
+							if (res.confirm) {
+								API.createUser({
+									phone:res.content,
+									openId:_this.carhelp.getOpenId()
+								}).then((res2) => {
+									
+									_this.findByOpenId()
+									
+								}).catch(error2 => {	 
+									uni.showToast({
+										title: error2
+									})
+								})
+							} else if (res.cancel) {
+								console.log('用户点击取消');
+							}
+						}
+					});
+				// #endif
+			},
 			decryptPhoneNumber(e){
 				 console.log(e.detail.code)