修改职位薪资显示

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

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

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

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

@ -1501,3 +1501,27 @@ export function disposeJobListData(jobList) {
return 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