flat: 金额校验
This commit is contained in:
@@ -1,4 +1,6 @@
|
|||||||
import {request} from '@/untils/AxiosUtils.js';
|
import {
|
||||||
|
request
|
||||||
|
} from '@/untils/AxiosUtils.js';
|
||||||
/*逆地址解析*/
|
/*逆地址解析*/
|
||||||
export const getcoder = (location, key, get_poi) => {
|
export const getcoder = (location, key, get_poi) => {
|
||||||
return request({
|
return request({
|
||||||
|
|||||||
@@ -100,3 +100,11 @@ export const addInviteCompanyAuth = (params) => {
|
|||||||
params
|
params
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export const getDictionary = (params) => {
|
||||||
|
return request({
|
||||||
|
url: '/api/jobslink-api/system/dict-biz/dictionary',
|
||||||
|
method: 'get',
|
||||||
|
params
|
||||||
|
})
|
||||||
|
}
|
||||||
@@ -59,7 +59,7 @@
|
|||||||
})
|
})
|
||||||
uni.hideLoading()
|
uni.hideLoading()
|
||||||
if (resData.data.code === 200) {
|
if (resData.data.code === 200) {
|
||||||
if (false && resData.data.data) {
|
if (resData.data.data) {
|
||||||
resolve()
|
resolve()
|
||||||
} else {
|
} else {
|
||||||
// this.$api.msg('您未申请开通该功能,请联系工作人员')
|
// this.$api.msg('您未申请开通该功能,请联系工作人员')
|
||||||
|
|||||||
@@ -22,20 +22,17 @@
|
|||||||
</u-form-item>
|
</u-form-item>
|
||||||
<view style="font-size: 30rpx;font-weight: bold;padding: 20rpx 0 0;">任务要求</view>
|
<view style="font-size: 30rpx;font-weight: bold;padding: 20rpx 0 0;">任务要求</view>
|
||||||
<u-form-item label="招聘人数" prop="peopleNum" borderBottom labelWidth="80" ref="item3">
|
<u-form-item label="招聘人数" prop="peopleNum" borderBottom labelWidth="80" ref="item3">
|
||||||
<u--input type="number" v-model="info.peopleNum" border="none" placeholder="请输入招聘人数">
|
<u--input type="number" v-model="info.peopleNum" maxlength="7" border="none" placeholder="请输入招聘人数">
|
||||||
</u--input>
|
</u--input>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
<u-form-item label="参考工资" prop="wage" borderBottom labelWidth="80" ref="item1">
|
<u-form-item label="参考工资" prop="wage" borderBottom labelWidth="80" ref="item1">
|
||||||
<u--input v-model="info.wage" border="none" placeholder="请输入参考工资">
|
<u--input v-model="info.wage" type="number" maxlength="7" @blur="onBlurWage" border="none"
|
||||||
|
placeholder="请输入参考工资">
|
||||||
<template slot="suffix">
|
<template slot="suffix">
|
||||||
<u-form-item class="wageunitLeft" prop="wageUnitCategory" labelWidth="0" border="surround"
|
<u-form-item class="wageunitLeft" prop="wageUnitCategory" labelWidth="0" border="surround"
|
||||||
@click="showWage = true; hideKeyboard()" ref="item4">
|
@click="showWage = true; hideKeyboard()" ref="item4">
|
||||||
<u--input
|
<u--input v-model="info.wageUnitCategoryName" disabledColor="#ffffff"
|
||||||
v-model="info.wageUnitCategoryName"
|
placeholder="请选择单位" style="width: 80px;" border="none"></u--input>
|
||||||
disabledColor="#ffffff"
|
|
||||||
placeholder="请选择单位"
|
|
||||||
style="width: 80px;"
|
|
||||||
border="none"></u--input>
|
|
||||||
<u-icon slot="right" name="arrow-right"></u-icon>
|
<u-icon slot="right" name="arrow-right"></u-icon>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
</template>
|
</template>
|
||||||
@@ -104,7 +101,7 @@
|
|||||||
<u-form-item label="企业性质" prop="jobCompanyNature" borderBottom labelWidth="80" ref="item1">
|
<u-form-item label="企业性质" prop="jobCompanyNature" borderBottom labelWidth="80" ref="item1">
|
||||||
<u--input v-model="info.jobCompanyNature" border="none" placeholder="请输入企业性质"></u--input>
|
<u--input v-model="info.jobCompanyNature" border="none" placeholder="请输入企业性质"></u--input>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
<u-form-item label="企业介绍"labelWidth="80" ref="item1"></u-form-item>
|
<u-form-item label="企业介绍" labelWidth="80" ref="item1"></u-form-item>
|
||||||
<view>
|
<view>
|
||||||
<u--textarea v-model="info.jobCompanyDescription" placeholder="请输入企业介绍" count height="100"
|
<u--textarea v-model="info.jobCompanyDescription" placeholder="请输入企业介绍" count height="100"
|
||||||
maxlength="200"></u--textarea>
|
maxlength="200"></u--textarea>
|
||||||
@@ -156,9 +153,14 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import dic from '@/common/dic.js'
|
import dic from '@/common/dic.js'
|
||||||
import { submitInfo, getWorktypesBaseList, findTradeList } from '@/api/userrecruit.js'
|
import {
|
||||||
export default {
|
submitInfo,
|
||||||
|
getWorktypesBaseList,
|
||||||
|
findTradeList,
|
||||||
|
getDictionary
|
||||||
|
} from '@/api/userrecruit.js'
|
||||||
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
latitude: 31.05, //中心点
|
latitude: 31.05, //中心点
|
||||||
@@ -234,6 +236,7 @@ export default {
|
|||||||
ageColumns: dic.ageArr,
|
ageColumns: dic.ageArr,
|
||||||
eduColumns: dic.eduArr,
|
eduColumns: dic.eduArr,
|
||||||
expeColumns: dic.expeArr,
|
expeColumns: dic.expeArr,
|
||||||
|
wallMaxAndMin: [],
|
||||||
rules: {
|
rules: {
|
||||||
jobName: {
|
jobName: {
|
||||||
type: 'string',
|
type: 'string',
|
||||||
@@ -284,19 +287,19 @@ export default {
|
|||||||
message: '请输入任务描述,最少20个字符',
|
message: '请输入任务描述,最少20个字符',
|
||||||
trigger: ['change']
|
trigger: ['change']
|
||||||
},
|
},
|
||||||
ageDesc:{
|
ageDesc: {
|
||||||
type: 'string',
|
type: 'string',
|
||||||
required: true,
|
required: true,
|
||||||
message: '请选择年龄',
|
message: '请选择年龄',
|
||||||
trigger: ['change']
|
trigger: ['change']
|
||||||
},
|
},
|
||||||
educationLabel:{
|
educationLabel: {
|
||||||
type: 'string',
|
type: 'string',
|
||||||
required: true,
|
required: true,
|
||||||
message: '请选择学历',
|
message: '请选择学历',
|
||||||
trigger: ['change']
|
trigger: ['change']
|
||||||
},
|
},
|
||||||
experienceDesc:{
|
experienceDesc: {
|
||||||
type: 'string',
|
type: 'string',
|
||||||
required: true,
|
required: true,
|
||||||
message: '请选择经验要求',
|
message: '请选择经验要求',
|
||||||
@@ -359,11 +362,17 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
console.log('wageColumns', this.wageColumns)
|
const {
|
||||||
|
id: staId,
|
||||||
|
label: staLabel
|
||||||
|
} = dic.wageUnitCategoryState[0].filter(item => item.id == 3)[0]
|
||||||
|
this.info.wageUnitCategory = staId
|
||||||
|
this.info.wageUnitCategoryName = staLabel
|
||||||
if (this.company) {
|
if (this.company) {
|
||||||
this.backfill(this.company)
|
this.backfill(this.company)
|
||||||
}
|
}
|
||||||
this.getWorkTypes()
|
this.getWorkTypes()
|
||||||
|
this.dictionary()
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
company(val) {
|
company(val) {
|
||||||
@@ -373,8 +382,41 @@ export default {
|
|||||||
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
onBlurWage(value) {
|
||||||
|
const val = this.wallMaxAndMin
|
||||||
|
if (!val.length) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
switch (true) {
|
||||||
|
case value < Math.min(...val):
|
||||||
|
this.info.wage = String(Math.min(...val))
|
||||||
|
return
|
||||||
|
case value > Math.max(...val):
|
||||||
|
this.info.wage = String(Math.max(...val))
|
||||||
|
return
|
||||||
|
}
|
||||||
|
},
|
||||||
|
async dictionary() {
|
||||||
|
let params = {
|
||||||
|
code: `wages_limit_${this.info.wageUnitCategory}`
|
||||||
|
}
|
||||||
|
this.info.wage = ''
|
||||||
|
let resData = await getDictionary(params)
|
||||||
|
if (resData.data.code === 200) {
|
||||||
|
const arr = resData.data.data.map((item) => Number(item.dictKey))
|
||||||
|
this.wallMaxAndMin = arr
|
||||||
|
}
|
||||||
|
},
|
||||||
async backfill(info) {
|
async backfill(info) {
|
||||||
const { manager, companyTid, comname, companyDesc, telphone, tradeId, nature } = info
|
const {
|
||||||
|
manager,
|
||||||
|
companyTid,
|
||||||
|
comname,
|
||||||
|
companyDesc,
|
||||||
|
telphone,
|
||||||
|
tradeId,
|
||||||
|
nature
|
||||||
|
} = info
|
||||||
this.info.jobCompanyScale = companyTid
|
this.info.jobCompanyScale = companyTid
|
||||||
this.info.jobCompanyName = comname
|
this.info.jobCompanyName = comname
|
||||||
this.info.callName = manager
|
this.info.callName = manager
|
||||||
@@ -400,15 +442,21 @@ export default {
|
|||||||
this.info.wageUnitCategoryName = value[0].label
|
this.info.wageUnitCategoryName = value[0].label
|
||||||
this.info.wageUnitCategory = value[0].id
|
this.info.wageUnitCategory = value[0].id
|
||||||
this.showWage = false
|
this.showWage = false
|
||||||
|
this.dictionary()
|
||||||
},
|
},
|
||||||
tradeConfirm(e) {
|
tradeConfirm(e) {
|
||||||
const { value } = e
|
const {
|
||||||
|
value
|
||||||
|
} = e
|
||||||
this.info.tradeId = value[0].id
|
this.info.tradeId = value[0].id
|
||||||
this.info.tradeNames = value[0].name
|
this.info.tradeNames = value[0].name
|
||||||
this.showTrade = false
|
this.showTrade = false
|
||||||
},
|
},
|
||||||
skillConfirm(e) {
|
skillConfirm(e) {
|
||||||
const { value, indexs } = e
|
const {
|
||||||
|
value,
|
||||||
|
indexs
|
||||||
|
} = e
|
||||||
this.skillColumnsIndex = indexs
|
this.skillColumnsIndex = indexs
|
||||||
this.info.skillNames = this.getSkilDataNameWhereId(indexs).join('-')
|
this.info.skillNames = this.getSkilDataNameWhereId(indexs).join('-')
|
||||||
this.showSkills = false
|
this.showSkills = false
|
||||||
@@ -419,18 +467,24 @@ export default {
|
|||||||
// this.showNature = false
|
// this.showNature = false
|
||||||
// },
|
// },
|
||||||
ageConfirm(e) {
|
ageConfirm(e) {
|
||||||
const { value } = e
|
const {
|
||||||
|
value
|
||||||
|
} = e
|
||||||
this.info.ageDesc = value[0].label
|
this.info.ageDesc = value[0].label
|
||||||
this.showAge = false
|
this.showAge = false
|
||||||
},
|
},
|
||||||
eduConfirm(e) {
|
eduConfirm(e) {
|
||||||
const { value } = e
|
const {
|
||||||
|
value
|
||||||
|
} = e
|
||||||
this.info.education = value[0].value
|
this.info.education = value[0].value
|
||||||
this.info.educationLabel = value[0].label
|
this.info.educationLabel = value[0].label
|
||||||
this.showEdu = false
|
this.showEdu = false
|
||||||
},
|
},
|
||||||
expeConfirm(e) {
|
expeConfirm(e) {
|
||||||
const { value } = e
|
const {
|
||||||
|
value
|
||||||
|
} = e
|
||||||
this.info.experienceDesc = value[0].label
|
this.info.experienceDesc = value[0].label
|
||||||
this.showExpe = false
|
this.showExpe = false
|
||||||
},
|
},
|
||||||
@@ -539,7 +593,9 @@ export default {
|
|||||||
}
|
}
|
||||||
let that = this
|
let that = this
|
||||||
this.$refs.form1.validate().then(res => {
|
this.$refs.form1.validate().then(res => {
|
||||||
if(!this.info.wageUnitCategory) {return this.$api.msg('请选择参考工资单位')}
|
if (!this.info.wageUnitCategory) {
|
||||||
|
return this.$api.msg('请选择参考工资单位')
|
||||||
|
}
|
||||||
submitInfo(params).then(res => {
|
submitInfo(params).then(res => {
|
||||||
if (res.data.code == 200) {
|
if (res.data.code == 200) {
|
||||||
that.reset()
|
that.reset()
|
||||||
@@ -595,7 +651,11 @@ export default {
|
|||||||
uni.hideKeyboard()
|
uni.hideKeyboard()
|
||||||
},
|
},
|
||||||
skillsChange(e) {
|
skillsChange(e) {
|
||||||
const { columnIndex, index, picker = this.$refs.uPicker } = e
|
const {
|
||||||
|
columnIndex,
|
||||||
|
index,
|
||||||
|
picker = this.$refs.uPicker
|
||||||
|
} = e
|
||||||
let [index1, index2] = this.skillColumnsIndex
|
let [index1, index2] = this.skillColumnsIndex
|
||||||
switch (columnIndex) {
|
switch (columnIndex) {
|
||||||
case 0:
|
case 0:
|
||||||
@@ -611,7 +671,9 @@ export default {
|
|||||||
this.skillColumnsIndex = Indexs
|
this.skillColumnsIndex = Indexs
|
||||||
},
|
},
|
||||||
getSkilDataNameWhereId(Indexs, type = true) {
|
getSkilDataNameWhereId(Indexs, type = true) {
|
||||||
if (!this.skillData) { return }
|
if (!this.skillData) {
|
||||||
|
return
|
||||||
|
}
|
||||||
const [index1, index2] = Indexs
|
const [index1, index2] = Indexs
|
||||||
const work1 = this.skillData[index1]
|
const work1 = this.skillData[index1]
|
||||||
const work2 = work1.child[index2]
|
const work2 = work1.child[index2]
|
||||||
@@ -622,9 +684,13 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
async getWorkTypes() {
|
async getWorkTypes() {
|
||||||
let resData = await getWorktypesBaseList({ type: 1 })
|
let resData = await getWorktypesBaseList({
|
||||||
|
type: 1
|
||||||
|
})
|
||||||
if (resData.data.code === 200) {
|
if (resData.data.code === 200) {
|
||||||
const { data } = resData.data
|
const {
|
||||||
|
data
|
||||||
|
} = resData.data
|
||||||
const arr = []
|
const arr = []
|
||||||
// 1、 空间换时间策略/user/userrecruit/saveApp
|
// 1、 空间换时间策略/user/userrecruit/saveApp
|
||||||
arr.push(data.map((item) => item.name));
|
arr.push(data.map((item) => item.name));
|
||||||
@@ -636,21 +702,23 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
.map {
|
.map {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 350rpx;
|
height: 350rpx;
|
||||||
margin-top: 30rpx;
|
margin-top: 30rpx;
|
||||||
}
|
}
|
||||||
.wageunitLeft{
|
|
||||||
|
.wageunitLeft {
|
||||||
border-left: 3rpx solid rgb(192, 196, 204, 0.6);
|
border-left: 3rpx solid rgb(192, 196, 204, 0.6);
|
||||||
padding-left: 20rpx;
|
padding-left: 20rpx;
|
||||||
|
|
||||||
}
|
}
|
||||||
/deep/.wageunitLeft .u-form-item__body{
|
|
||||||
|
/deep/.wageunitLeft .u-form-item__body {
|
||||||
padding: 0;
|
padding: 0;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
@@ -22,7 +22,8 @@
|
|||||||
</u-form-item>
|
</u-form-item>
|
||||||
<view style="font-size: 30rpx;font-weight: bold;padding: 20rpx 0 0;">岗位要求</view>
|
<view style="font-size: 30rpx;font-weight: bold;padding: 20rpx 0 0;">岗位要求</view>
|
||||||
<u-form-item label="招聘人数" prop="peopleNum" borderBottom labelWidth="80" ref="item3">
|
<u-form-item label="招聘人数" prop="peopleNum" borderBottom labelWidth="80" ref="item3">
|
||||||
<u--input type="number" v-model="info.peopleNum" border="none" placeholder="请输入招聘人数"></u--input>
|
<u--input type="number" v-model="info.peopleNum" border="none" maxlength="7"
|
||||||
|
placeholder="请输入招聘人数"></u--input>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
<!-- <u-form-item label="参考工资" prop="wage" labelWidth="80" borderBottom
|
<!-- <u-form-item label="参考工资" prop="wage" labelWidth="80" borderBottom
|
||||||
@click="showWage = true; hideKeyboard()" ref="item4">
|
@click="showWage = true; hideKeyboard()" ref="item4">
|
||||||
@@ -31,7 +32,8 @@
|
|||||||
<u-icon slot="right" name="arrow-right"></u-icon>
|
<u-icon slot="right" name="arrow-right"></u-icon>
|
||||||
</u-form-item> -->
|
</u-form-item> -->
|
||||||
<u-form-item label="参考工资" prop="wage" borderBottom labelWidth="80" ref="item1">
|
<u-form-item label="参考工资" prop="wage" borderBottom labelWidth="80" ref="item1">
|
||||||
<u--input v-model="info.wage" border="none" placeholder="请输入参考工资">
|
<u--input v-model="info.wage" border="none" type="number" maxlength="7" @blur="onBlurWage"
|
||||||
|
placeholder="请输入参考工资">
|
||||||
<template slot="suffix">
|
<template slot="suffix">
|
||||||
<u-form-item class="wageunitLeft" prop="wageUnitCategory" labelWidth="0" border="surround"
|
<u-form-item class="wageunitLeft" prop="wageUnitCategory" labelWidth="0" border="surround"
|
||||||
@click="showWage = true; hideKeyboard()" ref="item4">
|
@click="showWage = true; hideKeyboard()" ref="item4">
|
||||||
@@ -159,7 +161,8 @@
|
|||||||
import {
|
import {
|
||||||
submitInfo,
|
submitInfo,
|
||||||
getWorktypesBaseList,
|
getWorktypesBaseList,
|
||||||
findTradeList
|
findTradeList,
|
||||||
|
getDictionary
|
||||||
} from '@/api/userrecruit.js'
|
} from '@/api/userrecruit.js'
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
@@ -237,6 +240,7 @@
|
|||||||
ageColumns: dic.ageArr,
|
ageColumns: dic.ageArr,
|
||||||
eduColumns: dic.eduArr,
|
eduColumns: dic.eduArr,
|
||||||
expeColumns: dic.expeArr,
|
expeColumns: dic.expeArr,
|
||||||
|
wallMaxAndMin: [],
|
||||||
rules: {
|
rules: {
|
||||||
jobName: {
|
jobName: {
|
||||||
type: 'string',
|
type: 'string',
|
||||||
@@ -362,12 +366,44 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
|
const {
|
||||||
|
id: staId,
|
||||||
|
label: staLabel
|
||||||
|
} = dic.wageUnitCategoryState[0].filter(item => item.id == 3)[0]
|
||||||
|
this.info.wageUnitCategory = staId
|
||||||
|
this.info.wageUnitCategoryName = staLabel
|
||||||
this.getWorkTypes()
|
this.getWorkTypes()
|
||||||
|
this.dictionary()
|
||||||
if (this.company) {
|
if (this.company) {
|
||||||
this.getDataInit()
|
this.getDataInit()
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
onBlurWage(value) {
|
||||||
|
const val = this.wallMaxAndMin
|
||||||
|
if (!val.length) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
switch (true) {
|
||||||
|
case value < Math.min(...val):
|
||||||
|
this.info.wage = String(Math.min(...val))
|
||||||
|
return
|
||||||
|
case value > Math.max(...val):
|
||||||
|
this.info.wage = String(Math.max(...val))
|
||||||
|
return
|
||||||
|
}
|
||||||
|
},
|
||||||
|
async dictionary() {
|
||||||
|
let params = {
|
||||||
|
code: `wages_limit_${this.info.wageUnitCategory}`
|
||||||
|
}
|
||||||
|
this.info.wage = ''
|
||||||
|
let resData = await getDictionary(params)
|
||||||
|
if (resData.data.code === 200) {
|
||||||
|
const arr = resData.data.data.map((item) => Number(item.dictKey))
|
||||||
|
this.wallMaxAndMin = arr
|
||||||
|
}
|
||||||
|
},
|
||||||
async getDataInit() {
|
async getDataInit() {
|
||||||
const {
|
const {
|
||||||
companyTid,
|
companyTid,
|
||||||
@@ -404,6 +440,7 @@
|
|||||||
this.info.wageUnitCategoryName = value[0].label
|
this.info.wageUnitCategoryName = value[0].label
|
||||||
this.info.wageUnitCategory = value[0].id
|
this.info.wageUnitCategory = value[0].id
|
||||||
this.showWage = false
|
this.showWage = false
|
||||||
|
this.dictionary()
|
||||||
},
|
},
|
||||||
tradeConfirm(e) {
|
tradeConfirm(e) {
|
||||||
const {
|
const {
|
||||||
|
|||||||
Reference in New Issue
Block a user