|
@@ -1,5 +1,5 @@
|
|
|
<template>
|
|
|
- <ion-page class="list-page">
|
|
|
+ <ion-page class="list-page">
|
|
|
<ion-header class="header-theme2">
|
|
|
<ion-toolbar>
|
|
|
<ion-buttons slot="start">
|
|
@@ -18,26 +18,27 @@
|
|
|
<ion-label>岗位名称<span class="danger">*</span></ion-label>
|
|
|
<div>
|
|
|
<ion-input placeholder="请输入岗位" label-placement="stacked" style="float: left;width:78%;"
|
|
|
- @click="onOpenPost" v-model="dataModel.professionName" class="custom" readonly >
|
|
|
+ @click="onOpenPost" v-model="dataModel.professionName" class="custom" readonly>
|
|
|
</ion-input>
|
|
|
<ion-item style="width:22%;float: right;padding:0px;margin: 0px;">
|
|
|
<post-selection-like ref="refPostSelectionLike" @resultInfo="onResultInfo"></post-selection-like>
|
|
|
</ion-item>
|
|
|
</div>
|
|
|
- <ion-note v-show="isCommit&&v$.dataModel.professionName.$error" class="danger" >请选择岗位</ion-note>
|
|
|
+ <ion-note v-show="isCommit&&v$.dataModel.professionName.$error" class="danger">请选择岗位</ion-note>
|
|
|
</div>
|
|
|
<div style="width: 100%;overflow: hidden;"></div>
|
|
|
<div class="form-input">
|
|
|
<ion-label>工种名称<span class="danger">*</span></ion-label>
|
|
|
<div>
|
|
|
<ion-input placeholder="请选择工种" label-placement="stacked" style="float: left;width:78%;"
|
|
|
- v-model="dataModel.workCategoryName" class="custom" readonly >
|
|
|
+ v-model="dataModel.workCategoryName" class="custom" readonly>
|
|
|
</ion-input>
|
|
|
<ion-item style="width:22%;float: right;padding:0px;margin: 0px;">
|
|
|
- <work-category-selection :WorkCategoryID="dataModel.workCode" @SetWorkCategoryID="onSetWorkCategoryID"></work-category-selection>
|
|
|
+ <work-category-selection :WorkCategoryID="dataModel.workCode"
|
|
|
+ @SetWorkCategoryID="onSetWorkCategoryID"></work-category-selection>
|
|
|
</ion-item>
|
|
|
</div>
|
|
|
- <ion-note v-show="isCommit&&v$.dataModel.workCategoryName.$error" class="danger" >请选择工种</ion-note>
|
|
|
+ <ion-note v-show="isCommit&&v$.dataModel.workCategoryName.$error" class="danger">请选择工种</ion-note>
|
|
|
</div>
|
|
|
<div style="width: 100%;overflow: hidden;"></div>
|
|
|
<div class="form-input">
|
|
@@ -45,24 +46,24 @@
|
|
|
<ion-input placeholder="请输入招聘数量" label-placement="stacked" :clear-input="true"
|
|
|
v-model="dataModel.recruitCount" class="custom" @ionBlur="recruitCountBlur">
|
|
|
</ion-input>
|
|
|
- <ion-note v-show="isCommit&&v$.dataModel.recruitCount.$error" class="danger" >请输入招聘数量</ion-note>
|
|
|
+ <ion-note v-show="isCommit&&v$.dataModel.recruitCount.$error" class="danger">请输入招聘数量</ion-note>
|
|
|
</div>
|
|
|
<div class="form-input">
|
|
|
- <ion-label>招聘日期<span class="danger">*</span></ion-label>
|
|
|
+ <ion-label>招聘日期<span class="danger">*</span></ion-label>
|
|
|
<div>
|
|
|
<ion-datetime-button datetime="startTime" style="float:left;"></ion-datetime-button>
|
|
|
<span style="float:left;padding-top: 5px;">至</span>
|
|
|
<ion-datetime-button datetime="endTime" style="float:left;"></ion-datetime-button>
|
|
|
<ion-modal :keep-contents-mounted="true">
|
|
|
<ion-datetime placeholder="招聘开始日期" id="startTime"
|
|
|
- v-model="dataModel.startTime" :prefer-wheel="true"
|
|
|
+ v-model="dataModel.startTime" :prefer-wheel="true"
|
|
|
dataformatas="YYYY-MM-DD" presentation="date" cancel-text="取消" done-text="确定"
|
|
|
:show-default-buttons="true" style="text-align: left;width: 100%;">
|
|
|
</ion-datetime>
|
|
|
</ion-modal>
|
|
|
<ion-modal :keep-contents-mounted="true">
|
|
|
<ion-datetime placeholder="招聘结束日期" id="endTime"
|
|
|
- v-model="dataModel.endTime" :prefer-wheel="true"
|
|
|
+ v-model="dataModel.endTime" :prefer-wheel="true"
|
|
|
dataformatas="YYYY-MM-DD" presentation="date" cancel-text="取消" done-text="确定"
|
|
|
:show-default-buttons="true" style="text-align: left;width: 100%;">
|
|
|
</ion-datetime>
|
|
@@ -73,23 +74,24 @@
|
|
|
<div class="form-input">
|
|
|
<ion-label>工作地点<span class="danger">*</span></ion-label>
|
|
|
<ion-textarea placeholder="请输入工作地点" :rows="3" label-placement="stacked" :clear-input="true"
|
|
|
- v-model="dataModel.jobPlace" class="custom" style="border-bottom: 1px solid #fff2e8;">
|
|
|
+ v-model="dataModel.jobPlace" class="custom" style="border-bottom: 1px solid #fff2e8;">
|
|
|
</ion-textarea>
|
|
|
- <ion-note v-show="isCommit&&v$.dataModel.jobPlace.$error" class="danger" >请输入工作地点</ion-note>
|
|
|
+ <ion-note v-show="isCommit&&v$.dataModel.jobPlace.$error" class="danger">请输入工作地点</ion-note>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="bw-vue-form">
|
|
|
- <div class="form-title" >
|
|
|
+ <div class="form-title">
|
|
|
其他信息
|
|
|
<div style="float: right;">
|
|
|
- <ion-label style="color: red;font-size: 14px;" @click="isShow=!isShow">{{isShow?"收起":"展开"}}</ion-label>
|
|
|
+ <ion-label style="color: red;font-size: 14px;" @click="isShow=!isShow">{{ isShow ? "收起" : "展开" }}
|
|
|
+ </ion-label>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <div v-show="isShow" >
|
|
|
+ <div v-show="isShow">
|
|
|
<div class="form-select">
|
|
|
<ion-label>工作性质</ion-label>
|
|
|
<ion-select interface="action-sheet" placeholder="请选择工作性质" cancel-text="取消" name="workNatureID"
|
|
|
- id="workNatureID" v-model="dataModel.workNatureID" style="width: 100%;text-align: left;" >
|
|
|
+ id="workNatureID" v-model="dataModel.workNatureID" style="width: 100%;text-align: left;">
|
|
|
<ion-select-option v-for="(record,key) in workNatureList" :key="key"
|
|
|
v-model:value="record.value">
|
|
|
{{ record.name }}
|
|
@@ -112,7 +114,8 @@
|
|
|
<div class="form-select">
|
|
|
<ion-label>是否有试用期</ion-label>
|
|
|
<ion-select interface="action-sheet" placeholder="请选择是否有试用期" cancel-text="取消"
|
|
|
- id="isTrail" v-model="dataModel.isTrail" style="width: 100%;text-align: left;" @ionChange="onIsTrailChange">
|
|
|
+ id="isTrail" v-model="dataModel.isTrail" style="width: 100%;text-align: left;"
|
|
|
+ @ionChange="onIsTrailChange">
|
|
|
<ion-select-option v-for="(record,key) in isTrailList" :key="key"
|
|
|
v-model:value="record.value">
|
|
|
{{ record.name }}
|
|
@@ -188,13 +191,27 @@
|
|
|
v-model="dataModel.contactEmail" class="custom">
|
|
|
</ion-input>
|
|
|
</div>
|
|
|
+ <div class="form-input">
|
|
|
+ <ion-label>标签</ion-label>
|
|
|
+ <ion-row>
|
|
|
+ <ion-col size="auto" v-for="(itemLabel,keyLabel) in dataModel.listLabel" :key="keyLabel">
|
|
|
+ <ion-button color="primary" size="small">{{ itemLabel.labelName }}</ion-button>
|
|
|
+ </ion-col>
|
|
|
+ <ion-col>
|
|
|
+ <ion-item style="float: right;padding:0px;margin: 0px;">
|
|
|
+ <label-selection :big-type="3" :list-label="dataModel.listLabel" :title="'岗位标签'"
|
|
|
+ @resultBack="onResultBackLabels"></label-selection>
|
|
|
+ </ion-item>
|
|
|
+ </ion-col>
|
|
|
+ </ion-row>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</form>
|
|
|
</ion-content>
|
|
|
<ion-footer>
|
|
|
<ion-toolbar>
|
|
|
- <ion-button style="width: 100%;" @click="onSave">提交</ion-button>
|
|
|
+ <ion-button style="width: 100%;" @click="onSave">提交</ion-button>
|
|
|
</ion-toolbar>
|
|
|
</ion-footer>
|
|
|
</ion-page>
|
|
@@ -205,7 +222,7 @@ import {arrowBackOutline} from 'ionicons/icons';
|
|
|
import {useRoute, useRouter} from "vue-router";
|
|
|
import {alertController, onIonViewDidEnter} from "@ionic/vue";
|
|
|
import {useVuelidate} from "@vuelidate/core";
|
|
|
-import {getPostByID,savePost} from "@/api/post";
|
|
|
+import {getPostByID, savePost} from "@/api/post";
|
|
|
import {getCompanyById} from "@/api/company";
|
|
|
import {required} from "@vuelidate/validators";
|
|
|
import {getSysDictionaryList} from "@/api/system/dictionary";
|
|
@@ -213,6 +230,7 @@ import dayjs from "dayjs";
|
|
|
import PostSelectionLike from "@/components/postSelectionLike.vue";
|
|
|
import WorkCategorySelection from "@/components/workCategorySelection.vue";
|
|
|
import {useUserStore} from "@/store/modules/user";
|
|
|
+import LabelSelection from "@/components/labelSelection.vue";
|
|
|
|
|
|
interface postModel {
|
|
|
dataModel: any;
|
|
@@ -220,7 +238,7 @@ interface postModel {
|
|
|
|
|
|
export default defineComponent({
|
|
|
name: 'PostEdit',
|
|
|
- components:{PostSelectionLike,WorkCategorySelection},
|
|
|
+ components: {PostSelectionLike, WorkCategorySelection, LabelSelection},
|
|
|
setup() {
|
|
|
const router = useRouter();
|
|
|
const route = useRoute();
|
|
@@ -230,34 +248,36 @@ export default defineComponent({
|
|
|
const isCommit = ref<any>(false);
|
|
|
const formState = reactive<postModel>({
|
|
|
dataModel: {
|
|
|
- companyID:null,
|
|
|
- loginUserID:'',
|
|
|
- professionName:null,
|
|
|
- professionID:null,
|
|
|
- postName:null,
|
|
|
- workCategoryName:null,
|
|
|
- workCode:null,
|
|
|
- workName:null,
|
|
|
- recruitCount:null,
|
|
|
- startTime:dayjs().format("YYYY-MM-DD"),
|
|
|
- endTime:dayjs().format("YYYY-MM-DD"),
|
|
|
- jobPlace:null,
|
|
|
- minSalary:null,
|
|
|
- maxSalary:null,
|
|
|
- isTrail:null,
|
|
|
- trailMonths:0,
|
|
|
- trailMinSalary:null,
|
|
|
- trailMaxSalary:null,
|
|
|
- workYear:null,
|
|
|
- cultureRank:null,
|
|
|
- welfare:null,
|
|
|
- postDesc:null,
|
|
|
- workNatureID:null,
|
|
|
- contactName:null,
|
|
|
- contactMobile:null,
|
|
|
- contactEmail:null,
|
|
|
- bonus:null
|
|
|
- }});
|
|
|
+ companyID: null,
|
|
|
+ loginUserID: '',
|
|
|
+ professionName: null,
|
|
|
+ professionID: null,
|
|
|
+ postName: null,
|
|
|
+ workCategoryName: null,
|
|
|
+ workCode: null,
|
|
|
+ workName: null,
|
|
|
+ recruitCount: null,
|
|
|
+ startTime: dayjs().format("YYYY-MM-DD"),
|
|
|
+ endTime: dayjs().format("YYYY-MM-DD"),
|
|
|
+ jobPlace: null,
|
|
|
+ minSalary: null,
|
|
|
+ maxSalary: null,
|
|
|
+ isTrail: null,
|
|
|
+ trailMonths: 0,
|
|
|
+ trailMinSalary: null,
|
|
|
+ trailMaxSalary: null,
|
|
|
+ workYear: null,
|
|
|
+ cultureRank: null,
|
|
|
+ welfare: null,
|
|
|
+ postDesc: null,
|
|
|
+ workNatureID: null,
|
|
|
+ contactName: null,
|
|
|
+ contactMobile: null,
|
|
|
+ contactEmail: null,
|
|
|
+ bonus: null,
|
|
|
+ listLabel: null
|
|
|
+ }
|
|
|
+ });
|
|
|
const rules = computed(() => {
|
|
|
return {
|
|
|
dataModel: {
|
|
@@ -266,7 +286,7 @@ export default defineComponent({
|
|
|
recruitCount: {required},
|
|
|
startTime: {required},
|
|
|
endTime: {required},
|
|
|
- jobPlace:{required}
|
|
|
+ jobPlace: {required}
|
|
|
}
|
|
|
}
|
|
|
});
|
|
@@ -291,31 +311,35 @@ export default defineComponent({
|
|
|
await alert.present();
|
|
|
}
|
|
|
|
|
|
- const onSetWorkCategoryID = (data: any)=>{
|
|
|
+ const onSetWorkCategoryID = (data: any) => {
|
|
|
formState.dataModel.workCode = data.value;
|
|
|
formState.dataModel.workCategoryName = data.text;
|
|
|
}
|
|
|
|
|
|
|
|
|
- const onSave = async function (){
|
|
|
+ const onSave = async function () {
|
|
|
isCommit.value = true;
|
|
|
const isFormCorrect = await v$.value.$validate();
|
|
|
- console.log("当前岗位信息",formState.dataModel);
|
|
|
+ console.log("当前岗位信息", formState.dataModel);
|
|
|
if (!isFormCorrect) {
|
|
|
await presentAlert('请输入完整信息!');
|
|
|
return null;
|
|
|
}
|
|
|
ifInputAllValid();
|
|
|
- if(isCommit.value&&inputValid.value){
|
|
|
- savePost(formState.dataModel).then(result=>{
|
|
|
- if(result){
|
|
|
- router.push({path: "./postList", query: {reload:1,id:formState.dataModel.companyID,status: 3}});
|
|
|
+ if (isCommit.value && inputValid.value) {
|
|
|
+ savePost(formState.dataModel).then(result => {
|
|
|
+ if (result) {
|
|
|
+ router.push({path: "./postList", query: {reload: 1, id: formState.dataModel.companyID, status: 3}});
|
|
|
}
|
|
|
})
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- const onResultInfo = (data: any)=>{
|
|
|
+ const onResultBackLabels = (data: any) => {
|
|
|
+ formState.dataModel.listLabel = data;
|
|
|
+ }
|
|
|
+
|
|
|
+ const onResultInfo = (data: any) => {
|
|
|
formState.dataModel.professionID = data.value;
|
|
|
formState.dataModel.professionName = data.text;
|
|
|
}
|
|
@@ -325,25 +349,28 @@ export default defineComponent({
|
|
|
}
|
|
|
|
|
|
const back = () => {
|
|
|
- router.push({path: "./postList", query: {reload:1,id:formState.dataModel.companyID,status: 3,isEdit:isEditCompany.value}});
|
|
|
+ router.push({
|
|
|
+ path: "./postList",
|
|
|
+ query: {reload: 1, id: formState.dataModel.companyID, status: 3, isEdit: isEditCompany.value}
|
|
|
+ });
|
|
|
}
|
|
|
|
|
|
- const getWorkYearList = async function(){
|
|
|
- const data :any = await getSysDictionaryList("WorkYearType");
|
|
|
+ const getWorkYearList = async function () {
|
|
|
+ const data: any = await getSysDictionaryList("WorkYearType");
|
|
|
workYearList.value = data;
|
|
|
}
|
|
|
- const getCultureRankList = async function(){
|
|
|
- const data:any = await getSysDictionaryList("CultureLevel");
|
|
|
+ const getCultureRankList = async function () {
|
|
|
+ const data: any = await getSysDictionaryList("CultureLevel");
|
|
|
cultureRankList.value = data;
|
|
|
}
|
|
|
|
|
|
- const getWorkNationList = async function(){
|
|
|
- const data:any = await getSysDictionaryList("WorkNature");
|
|
|
+ const getWorkNationList = async function () {
|
|
|
+ const data: any = await getSysDictionaryList("WorkNature");
|
|
|
workNatureList.value = data;
|
|
|
}
|
|
|
|
|
|
- const loadData = async (postID: any,companyID:any,isEdit:any) => {
|
|
|
- isCommit.value =false;
|
|
|
+ const loadData = async (postID: any, companyID: any, isEdit: any) => {
|
|
|
+ isCommit.value = false;
|
|
|
await getWorkYearList();
|
|
|
await getCultureRankList();
|
|
|
await getWorkNationList();
|
|
@@ -352,16 +379,16 @@ export default defineComponent({
|
|
|
const reqData = await getPostByID(postID);
|
|
|
formState.dataModel = reqData;
|
|
|
formState.dataModel.companyID = companyID;
|
|
|
- formState.dataModel.loginUserID = loginUserInfo.userID == undefined?"":loginUserInfo.userID;
|
|
|
- if(postID==null){
|
|
|
- const curPostCompany :any = await getCompanyById(companyID,formState.dataModel.loginUserID);
|
|
|
- formState.dataModel.welfare = curPostCompany.bonus;
|
|
|
+ formState.dataModel.loginUserID = loginUserInfo.userID == undefined ? "" : loginUserInfo.userID;
|
|
|
+ if (postID == null) {
|
|
|
+ const curPostCompany: any = await getCompanyById(companyID, formState.dataModel.loginUserID);
|
|
|
+ formState.dataModel.welfare = curPostCompany.bonus;
|
|
|
}
|
|
|
- console.log("初始化岗位信息",formState.dataModel);
|
|
|
+ console.log("初始化岗位信息", formState.dataModel);
|
|
|
};
|
|
|
|
|
|
- const onIsTrailChange = ()=>{
|
|
|
- if(!formState.dataModel.isTrail){
|
|
|
+ const onIsTrailChange = () => {
|
|
|
+ if (!formState.dataModel.isTrail) {
|
|
|
formState.dataModel.trailMonths = 0;
|
|
|
}
|
|
|
}
|
|
@@ -373,10 +400,11 @@ export default defineComponent({
|
|
|
}
|
|
|
|
|
|
const inputValid = ref(true);
|
|
|
+
|
|
|
function recruitCountBlur() {
|
|
|
inputValid.value = true;
|
|
|
if (formState.dataModel.recruitCount != null) {
|
|
|
- if(!isStringInteger(formState.dataModel.recruitCount)||formState.dataModel.recruitCount<1){
|
|
|
+ if (!isStringInteger(formState.dataModel.recruitCount) || formState.dataModel.recruitCount < 1) {
|
|
|
presentAlert("招聘数量必须为一个正整数!");
|
|
|
inputValid.value = false;
|
|
|
}
|
|
@@ -384,100 +412,102 @@ export default defineComponent({
|
|
|
}
|
|
|
|
|
|
function trailMonthsBlur() {
|
|
|
- if (formState.dataModel.trailMonths!= null) {
|
|
|
- if(!isStringInteger(formState.dataModel.trailMonths)){
|
|
|
+ if (formState.dataModel.trailMonths != null) {
|
|
|
+ if (!isStringInteger(formState.dataModel.trailMonths)) {
|
|
|
formState.dataModel.trailMonths = Math.floor(formState.dataModel.trailMonths);
|
|
|
- if(parseInt(formState.dataModel.trailMonths)<0){
|
|
|
+ if (parseInt(formState.dataModel.trailMonths) < 0) {
|
|
|
formState.dataModel.trailMonths = 0;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- const ifInputAllValid = ()=>{
|
|
|
+ const ifInputAllValid = () => {
|
|
|
let errorMessage = "";
|
|
|
let hasMinSalary = false;
|
|
|
let hasTrailMinSalary = false;
|
|
|
let curMinSalary = 0.0;
|
|
|
let curTrailMinSalary = 0.0;
|
|
|
- if(dayjs(formState.dataModel.startTime).isAfter(dayjs(formState.dataModel.endTime))){
|
|
|
- errorMessage +="招聘结束日期不能早于开始日期!";
|
|
|
+ if (dayjs(formState.dataModel.startTime).isAfter(dayjs(formState.dataModel.endTime))) {
|
|
|
+ errorMessage += "招聘结束日期不能早于开始日期!";
|
|
|
isCommit.value = false;
|
|
|
}
|
|
|
- if (formState.dataModel.minSalary!=null) {
|
|
|
+ if (formState.dataModel.minSalary != null) {
|
|
|
hasMinSalary = true;
|
|
|
curMinSalary = parseFloat(formState.dataModel.minSalary);
|
|
|
- if(formState.dataModel.minSalary<0){
|
|
|
- errorMessage +="岗位最低月薪不能小于0!";
|
|
|
+ if (formState.dataModel.minSalary < 0) {
|
|
|
+ errorMessage += "岗位最低月薪不能小于0!";
|
|
|
isCommit.value = false;
|
|
|
}
|
|
|
}
|
|
|
- if (formState.dataModel.trailMinSalary!=null) {
|
|
|
+ if (formState.dataModel.trailMinSalary != null) {
|
|
|
hasTrailMinSalary = true;
|
|
|
curTrailMinSalary = parseFloat(formState.dataModel.trailMinSalary);
|
|
|
- if(formState.dataModel.trailMinSalary<0){
|
|
|
- errorMessage +="试用期最低月薪不能小于0!";
|
|
|
+ if (formState.dataModel.trailMinSalary < 0) {
|
|
|
+ errorMessage += "试用期最低月薪不能小于0!";
|
|
|
isCommit.value = false;
|
|
|
}
|
|
|
}
|
|
|
- if (formState.dataModel.maxSalary!=null) {
|
|
|
- if(formState.dataModel.maxSalary<0){
|
|
|
- errorMessage +="岗位最高月薪不能小于0!";
|
|
|
+ if (formState.dataModel.maxSalary != null) {
|
|
|
+ if (formState.dataModel.maxSalary < 0) {
|
|
|
+ errorMessage += "岗位最高月薪不能小于0!";
|
|
|
isCommit.value = false;
|
|
|
}
|
|
|
- if(hasMinSalary){
|
|
|
- if(parseFloat(formState.dataModel.maxSalary) < curMinSalary){
|
|
|
- errorMessage +="岗位最高月薪不能小于岗位最低月薪!";
|
|
|
+ if (hasMinSalary) {
|
|
|
+ if (parseFloat(formState.dataModel.maxSalary) < curMinSalary) {
|
|
|
+ errorMessage += "岗位最高月薪不能小于岗位最低月薪!";
|
|
|
isCommit.value = false;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- if (formState.dataModel.trailMaxSalary!=null) {
|
|
|
- if(formState.dataModel.trailMaxSalary<0){
|
|
|
- errorMessage +="试用期最高月薪不能小于0!";
|
|
|
+ if (formState.dataModel.trailMaxSalary != null) {
|
|
|
+ if (formState.dataModel.trailMaxSalary < 0) {
|
|
|
+ errorMessage += "试用期最高月薪不能小于0!";
|
|
|
isCommit.value = false;
|
|
|
}
|
|
|
- if(hasTrailMinSalary){
|
|
|
- if(parseFloat(formState.dataModel.trailMaxSalary) < curTrailMinSalary){
|
|
|
- errorMessage +="试用期最高月薪不能小于试用期最低月薪!";
|
|
|
+ if (hasTrailMinSalary) {
|
|
|
+ if (parseFloat(formState.dataModel.trailMaxSalary) < curTrailMinSalary) {
|
|
|
+ errorMessage += "试用期最高月薪不能小于试用期最低月薪!";
|
|
|
isCommit.value = false;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- if (formState.dataModel.trailMonths!=null) {
|
|
|
- if(formState.dataModel.isTrail&&formState.dataModel.trailMonths<0){
|
|
|
- errorMessage +="试用月数不能小于0!";
|
|
|
+ if (formState.dataModel.trailMonths != null) {
|
|
|
+ if (formState.dataModel.isTrail && formState.dataModel.trailMonths < 0) {
|
|
|
+ errorMessage += "试用月数不能小于0!";
|
|
|
isCommit.value = false;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
const mobileReg = /^1[3|4|5|6|7|8|9]\d{9}$/;
|
|
|
const landlineReg = /[0-9-()()]{7,18}/;
|
|
|
- if(formState.dataModel.contactMobile != null){
|
|
|
- if(!mobileReg.test(formState.dataModel.contactMobile)&&!landlineReg.test(formState.dataModel.contactMobile)){
|
|
|
+ if (formState.dataModel.contactMobile != null) {
|
|
|
+ if (!mobileReg.test(formState.dataModel.contactMobile) && !landlineReg.test(formState.dataModel.contactMobile)) {
|
|
|
errorMessage += "输入的联系电话有误!";
|
|
|
isCommit.value = false;
|
|
|
}
|
|
|
}
|
|
|
const emailReg = /^[a-z0-9]+([._\\-]*[a-z0-9])*@([a-z0-9]+[-a-z0-9]*[a-z0-9]+.){1,63}[a-z0-9]+$/;
|
|
|
- if(formState.dataModel.contactEmail!=""&&formState.dataModel.contactEmail!=null){
|
|
|
- if(!emailReg.test(formState.dataModel.contactEmail)){
|
|
|
+ if (formState.dataModel.contactEmail != "" && formState.dataModel.contactEmail != null) {
|
|
|
+ if (!emailReg.test(formState.dataModel.contactEmail)) {
|
|
|
errorMessage += "输入的邮箱有误!";
|
|
|
isCommit.value = false;
|
|
|
}
|
|
|
}
|
|
|
- if(!isCommit.value){presentAlert(errorMessage);}
|
|
|
+ if (!isCommit.value) {
|
|
|
+ presentAlert(errorMessage);
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
|
|
|
- const reload = (postID: any,companyID:any,isEdit:any) => {
|
|
|
+ const reload = (postID: any, companyID: any, isEdit: any) => {
|
|
|
formState.dataModel.recruitCount = null;
|
|
|
- loadData(postID,companyID,isEdit);
|
|
|
+ loadData(postID, companyID, isEdit);
|
|
|
}
|
|
|
|
|
|
onIonViewDidEnter(() => {
|
|
|
if (route.query.reload)
|
|
|
- reload(route.query.id,route.query.companyID,route.query.isEdit);
|
|
|
+ reload(route.query.id, route.query.companyID, route.query.isEdit);
|
|
|
});
|
|
|
|
|
|
return {
|
|
@@ -493,6 +523,7 @@ export default defineComponent({
|
|
|
workNatureList,
|
|
|
cultureRankList,
|
|
|
v$,
|
|
|
+ onResultBackLabels,
|
|
|
refPostSelectionLike,
|
|
|
onOpenPost,
|
|
|
onResultInfo,
|