瀏覽代碼

工作发布

zhengkaixin 1 年之前
父節點
當前提交
76d557c830
共有 1 個文件被更改,包括 218 次插入38 次删除
  1. 218 38
      pages/packages/mine/employmentService/laborManagement/postMessage.vue

+ 218 - 38
pages/packages/mine/employmentService/laborManagement/postMessage.vue

@@ -13,7 +13,9 @@
 					<text>*</text>职位名称
 				</view>
 				<view class="input">
-					<input type="text" placeholder="请填写职位名称">
+					<u-input type="text"  v-model="formData.positionName"
+					placeholder="请填写职位名称"></u-input>
+					
 				</view>
 			</view>
 			<!-- *薪资待遇 -->
@@ -21,13 +23,15 @@
 				<view class="title">
 					<text>*</text>薪资待遇
 				</view>
-				<view class="input">
-					<input type="text" placeholder="请填写薪资待遇">
+				<view class="input2">
+					<u-input type="text"  v-model="formData.salary"
+					placeholder="请填写薪资待遇"></u-input>
+					
 				</view>
-				<view class="unit">
-					计件
+				<view class="unit" @click="showselect(0)">
+					{{salaryForm}}
 				</view>
-				<view class="icon">
+				<view class="icon" @click="showselect(0)">
 					<u-icon name="arrow-right" color="#999999"></u-icon>
 				</view>
 
@@ -38,11 +42,12 @@
 					<text>*</text>结算形式
 				</view>
 				<view class="input">
-					<input type="text" placeholder="请选择结算形式">
-				</view>
-				<view class="icon">
-					<u-icon name="arrow-right" color="#999999"></u-icon>
+					
+					<u-input type="select"  v-model="settlementMethod"
+					 @click="showselect(1)" placeholder="请选择结算形式"></u-input>
+					
 				</view>
+				
 			</view>
 			<!-- 行业 -->
 			<view class="item">
@@ -50,11 +55,12 @@
 					<text>*</text>行业
 				</view>
 				<view class="input">
-					<input type="text" placeholder="请选择行业">
-				</view>
-				<view class="icon">
-					<u-icon name="arrow-right" color="#999999"></u-icon>
+					
+					<u-input type="select"  v-model="industry"
+					 @click="showselect(2)" placeholder="请选择行业"></u-input>
+					
 				</view>
+				
 			</view>
 			<!-- 招聘人数 -->
 			<view class="item">
@@ -62,7 +68,9 @@
 					<text>*</text>招聘人数
 				</view>
 				<view class="input">
-					<input type="text" placeholder="请填写招聘人数">
+					
+					<u-input type="number"  v-model="formData.recruitingNumbers"
+					placeholder="请填写招聘人数"></u-input>
 				</view>
 
 			</view>
@@ -76,7 +84,8 @@
 			<view class="title">
 				<text>*</text>工作描述
 			</view>
-			<textarea class="textarea" placeholder="请简单描述工作内容及职位要求"></textarea>
+			<textarea class="textarea" v-model="formData.desc"
+			 placeholder="请简单描述工作内容及职位要求"></textarea>
 		</view>
 		<!-- 个人信息 -->
 		<view class="information-group">
@@ -89,7 +98,10 @@
 							<text>*</text>联系人
 						</view>
 						<view class="input">
-							<input  type="text" placeholder="李">
+							
+							<u-input type="text"  v-model="formData.contacts"
+							placeholder="请填写联系人"></u-input>
+													
 						</view>
 					</view>
 					<!-- 联系电话 -->
@@ -98,7 +110,9 @@
 							<text>*</text>联系电话
 						</view>
 						<view class="input">
-							<input type="text" placeholder="15500001111">
+							<u-input type="text"  v-model="formData.contactsPhone"
+							placeholder="请填写联系电话"></u-input>
+						
 						</view>
 						
 						
@@ -110,11 +124,12 @@
 							<text>*</text>工作地区
 						</view>
 						<view class="input">
-							<input type="text" placeholder="开发区">
-						</view>
-						<view class="icon">
-							<u-icon name="arrow-right" color="#999999"></u-icon>
+							
+							<u-input type="select"  v-model="workArea"
+							 @click="showselect(3)" placeholder="请选择工作地区"></u-input>
+							
 						</view>
+						
 					</view>
 					<!-- 详细地址 -->
 					
@@ -123,36 +138,194 @@
 							<text>*</text>详细地址
 						</view>
 						<view class="input">
-							<input type="text" placeholder="请填写详细的工作地址">
-						</view>
-						<view class="icon">
-							<u-icon name="arrow-right" color="#999999"></u-icon>
+							<u-input type="text"  v-model="formData.address"
+							placeholder="请填写详细的工作地址"></u-input>
+							
 						</view>
+						
 					</view>
 					
 					
-					
-					
-					
-					
 				</view>
-		<button class="issue" type="default">发布</button>
+				<u-select v-model="show" value-name="value" label-name="name"
+				 :list="list" @confirm="confirm"></u-select>
+				
+		<button class="issue"   @click="submit()"
+		
+		type="default">发布</button>
 	</view>
 </template>
 
 <script>
+	import * as API_weixin from '@/apis/weixin.js'
 	import * as API from '@/apis/pagejs/packages.js'
 	export default {
 		data() {
 			return {
-
-
+				selectIndex:0,
+				show: false,
+				list: [],
+				formData:{
+					positionName:"",
+					salary:"",
+					settlementMethod:"",
+					industry:"",
+					recruitingNumbers:"",
+					desc:"",
+					contacts:"",
+					contactsPhone:"",
+					workArea:"",
+					address:"",
+					salaryForm:"1",
+				},
+				settlementMethod:"",
+				salaryForm:"计件",
+				industry:"",
+				workArea:"",
+				sqlList:[[],[],[],[],[],[],[]],
+				valueList:[-1,-1,-1,-1,-1,-1],
+				userInfo:{}
 			}
 		},
+		onLoad(){
+			this.userInfo=this.carhelp.getPersonInfo()	
+			//this.tel=this.userInfo.phone
+		},
 		methods: {
+			confirm(e) {
+				this.show = false;
+				var name=["salaryForm","settlementMethod",
+				
+				"industry",
+				"workArea",]
+				this[name[this.selectIndex]]=e[0].label
+				this.formData[name[this.selectIndex]]=e[0].value
+				console.log(e)
+			},
+			showselect(k){
+				this.selectIndex=k;
+				if(this.sqlList[k].length==0){
+					var name=['薪资形式','结算方式','意向行业','工作地区']
+					uni.showLoading({
+						title: "加载中",
+						mask: true,
+					})
+					API_weixin.findListByCatalogName({
+						name:name[k],
+						
+					}).then((res) => {
+						uni.hideLoading();
+						this.sqlList[k]=res.data.dictionaryList
+						this.list=this.sqlList[k];
+						this.show= true
+						
+					}).catch(error => {
+					
+						uni.showToast({
+							title: error
+						})
+						//this.getPhone()
+						
+					})
+				}else{
+					this.list=this.sqlList[k];
+					this.show= true
+				}
+			},
 			submit(){
-				const eventChannel = this.getOpenerEventChannel();
-				eventChannel.emit('refreshData');
+				if(!this.formData.positionName){
+					uni.showToast({
+						title: "请填写职位名称"
+					})
+					return
+				}
+				if(!this.formData.salary){
+					uni.showToast({
+						title: "请填写薪资待遇"
+					})
+					return
+				}
+				if(!this.formData.settlementMethod){
+					uni.showToast({
+						title: "请选择结算形式"
+					})
+					return
+				}
+				if(!this.formData.industry){
+					uni.showToast({
+						title: "请选择行业"
+					})
+					return
+				}
+				if(!this.formData.recruitingNumbers){
+					uni.showToast({
+						title: "请填写招聘人数"
+					})
+					return
+				}
+				if(!this.formData.desc){
+					uni.showToast({
+						title: "请简单描述工作内容及职位要求"
+					})
+					return
+				}
+				if(!this.formData.contacts){
+					uni.showToast({
+						title: "请填写联系人"
+					})
+					return
+				}
+				if(!this.formData.contactsPhone){
+					uni.showToast({
+						title: "请填写联系电话"
+					})
+					return
+				}
+				if(!this.formData.workArea){
+					uni.showToast({
+						title: "请选择工作地区"
+					})
+					return
+				}
+				if(!this.formData.address){
+					uni.showToast({
+						title: "请填写详细的工作地址"
+					})
+					return
+				}
+				
+				uni.showLoading({
+					title: "加载中",
+					mask: true,
+				})
+				API.createJobHunt(this.formData).then((res) => {
+					uni.hideLoading();
+					
+					const eventChannel = this.getOpenerEventChannel();
+					eventChannel.emit('refreshData');
+					
+					uni.showModal({
+						title: '提示',
+						content: '发布成功,等待审核!',
+						showCancel:false,
+						success: function (res) {
+							if (res.confirm) {
+								
+								uni.navigateBack()
+							} else if (res.cancel) {
+								console.log('用户点击取消');
+							}
+						}
+					});
+					
+				}).catch(error => {
+				
+					uni.showToast({
+						title: error
+					})
+					//this.getPhone()
+					
+				})
 			}
 		}
 	}
@@ -181,7 +354,7 @@
 		.item {
 			display: flex;
 			align-items: center;
-			padding: 24rpx 0;
+			padding: 12rpx 0;
 			border-bottom: 1px solid #f1f1f1;
 
 			.title {
@@ -193,8 +366,15 @@
 					color: #EE3138
 				}
 			}
-
-			.input {
+			.input {
+					width: 450rpx;
+					margin-left: 24rpx;
+
+					/deep/.uni-input-input {
+						color: rgba(51, 51, 51, 1);
+					}
+				}
+			.input2 {
 				width: 350rpx;
 				margin-left: 24rpx;