修改职位薪资显示

cyl/dev
ws 4 years ago
parent 66711a02ea
commit faa5b3d99f

@ -52,14 +52,20 @@
>
</div>
<div class="jobprice">
<template v-if="item.hourlyPay"
{{
getSalaryClassifyValue(
item.salaryClassify,
item.salaryClassifyValue
)
}}
<!-- <template v-if="item.hourlyPay"
><span>{{ item.hourlyPayTemp / 100 }}</span
>/小时</template
>
<template v-else-if="item.dayPay"
><span>{{ item.hourlyPayTemp / 100 }}</span
>/</template
>
> -->
</div>
</div>
</div>
@ -67,7 +73,10 @@
</template>
<script>
import { disposeJobListData } from "../../../utils/commonUtil";
import {
disposeJobListData,
getSalaryClassifyValue,
} from "../../../utils/commonUtil";
import {
JobListApi,
// getCityApi,
@ -141,6 +150,9 @@ export default {
document.documentElement.scrollTop = 0;
}, 1000);
},
getSalaryClassifyValue(salaryClassify, salaryClassifyValue) {
return getSalaryClassifyValue(salaryClassify, salaryClassifyValue);
},
},
};
</script>

@ -194,14 +194,20 @@
</div>
<div style="display: flex">
<div class="jobpricehour">
<template v-if="jobDetail.hourlyPay"
<!-- <template v-if="jobDetail.hourlyPay"
><span>{{ jobDetail.hourlyPay }}</span
>/小时</template
>
<template v-else-if="jobDetail.dayPay"
><span>{{ jobDetail.dayPay }}</span
>/</template
>
> -->
{{
getSalaryClassifyValue(
jobDetail.salaryClassify,
jobDetail.salaryClassifyValue
)
}}
</div>
<div class="jobpricemonth">
@ -649,7 +655,10 @@
<script>
import { getJobDetailApi } from "../../api/job";
import { disposeJobListData } from "../../utils/commonUtil";
import {
disposeJobListData,
getSalaryClassifyValue,
} from "../../utils/commonUtil";
import recommend from "../../components/FirstJob/components/recommend.vue";
import { nationlist } from "../../utils/datalist";
// import recordbill from "@/components/FirstJob/components/recordbill.vue";
@ -836,6 +845,9 @@ export default {
this.$router.push({ name: "recordbill", params: this.storeInfo });
sessionStorage.setItem("CURRENT_FIRM", JSON.stringify(this.storeInfo));
},
getSalaryClassifyValue(salaryClassify, salaryClassifyValue) {
return getSalaryClassifyValue(salaryClassify, salaryClassifyValue);
},
},
};
</script>

@ -233,14 +233,21 @@
>/
</div>
<div class="jobpricehour">
<template v-if="item.hourlyPay"
{{
getSalaryClassifyValue(
item.salaryClassify,
item.salaryClassifyValue
)
}}
<!-- <template v-if="item.hourlyPay"
><span>{{ item.hourlyPay }}</span
>/小时</template
>
<template v-else-if="item.dayPay"
><span>{{ item.dayPay }}</span
>/</template
>
> -->
</div>
</div>
</div>
@ -335,7 +342,7 @@ import {
getProvinceApi,
// getCityApi,
} from "../../api/job";
import { moneyToFixed } from "../../utils/commonUtil";
import { moneyToFixed, getSalaryClassifyValue } from "../../utils/commonUtil";
import recommend from "@/components/FirstJob/components/recommend.vue";
import { nationlist } from "../../utils/datalist";
import recordbill from "@/components/FirstJob/components/recordbill.vue";
@ -820,6 +827,9 @@ export default {
this.$router.push({ name: "recordbill", params: item });
sessionStorage.setItem("CURRENT_FIRM", JSON.stringify(item));
},
getSalaryClassifyValue(salaryClassify, salaryClassifyValue) {
return getSalaryClassifyValue(salaryClassify, salaryClassifyValue);
},
// todetail(item) {
// const routeURL = this.$router.resolve({
// name: "Detail",

@ -1501,3 +1501,27 @@ export function disposeJobListData(jobList) {
return jobList;
}
/**
* 根据薪资类型和薪资值获取薪资展示
*/
export function getSalaryClassifyValue(salaryClassify, salaryClassifyValue) {
var hourlyPay = moneyToFixed(salaryClassifyValue);
if (salaryClassify == 0) {
return `${hourlyPay}元/小时`;
} else if (salaryClassify == 1) {
return `${hourlyPay}元/天`;
} else if (salaryClassify == 2) {
return `${hourlyPay}`;
} else if (salaryClassify == 3) {
return `${hourlyPay}`;
} else if (salaryClassify == 4) {
return "计件";
} else if (salaryClassify == 5) {
return `保底${hourlyPay}`;
} else if (salaryClassify == 6) {
return `面议`;
} else {
// return '请配置薪资';
return "-";
}
}

Loading…
Cancel
Save