cyl/dev
zsk 2 years ago
parent f150b0d132
commit 1ce7be3371

@ -86,6 +86,16 @@ export function recordBillApi(data) {
headers: { "Content-Type": "application/x-www-form-urlencoded" },
});
}
// 录单报名 稻田
export function recordBillApiDaotian(data) {
return request({
url: "/yishoudan/common/order/addBatch",
method: "post",
data:data,
headers: { "Content-Type": "application/x-www-form-urlencoded" },
});
}
// 职教报名
export function vocationalBillApi(data) {
return request({
@ -147,6 +157,14 @@ export function getPolicyByJobIdApi(data) {
url: `/yishoudan/store/job/getPolicyByStoreJobId?storeJobId=${data}`,
});
}
// 根据岗位id获取政策 稻田职位
export function getPolicyByJobIdApiDaotian(data) {
return request({
url: `/yishoudan/custom/job/getPolicyStr/${data}`,
});
}
// 根据岗位id获取政策列表
export function getPolicyListByJobIdApi(data) {
return request({

@ -1877,7 +1877,7 @@ export default {
//
// console.log(item);
// let userinfo = JSON.stringify(item);
sessionStorage.setItem("PAGE_TYPE", JSON.stringify({ id: item.id, pageNum: this.formvalue.pageNum, signType: this.signType }));
sessionStorage.setItem("PAGE_TYPE", JSON.stringify({ id: item.id, pageNum: this.formvalue.pageNum, signType: this.signType,jobClassify:item.jobClassify }));
if (this.signType == "") {
this.$router.push({ name: "recordbill", params: item });

@ -67,12 +67,12 @@
</div>
</a-form-model-item>
<recordBillTable :isModalVisible="isModalVisible"></recordBillTable>
<recordBillTable :isModalVisible.sync="isModalVisible" @getSelectedJobId="getSelectedJobId"></recordBillTable>
<a-form-model-item ref="username" label="报名企业" prop="username" :wrapperCol="{ span: 18 }" :labelCol="{ span: 4 }" style="height: 30px; margin-bottom: 18px">
<!-- <a-input :value="firminfo.aliasName" :disabled="true" /> -->
<div class="pzbox" style="width: 100%">
<span>{{ firminfo.aliasName || "-" }}</span>
<span>{{ storeName || "-" }}</span>
<!-- <span v-if="storeStatus === ''">{{ firminfo.aliasName }}</span>
<a-select v-if="storeStatus === 'store'" show-search auto-focus mode="combobox" placeholder="请选择企业" style="width: calc(100% - 200px)" :default-active-first-option="false" :show-arrow="false" :filter-option="false" :not-found-content="null" @search="storeSearch" @blur="storeStatus = ''">
<a-select-option v-for="i in storeList" :key="i.id + ''" @click="storeChange(i)">{{ i.aliasName }}</a-select-option>
@ -265,9 +265,9 @@
import { nationlist } from "../../utils/datalist";
// import recordbill from "@/components/FirstJob/components/recordbill.vue";
import moment from "moment";
import { isEmptyCheck, getAgeFromBirthday } from "../../utils/commonUtil";
import { isEmptyCheck, getAgeFromBirthday,disposeJobListData } from "../../utils/commonUtil";
import timepicker from "./components/timepicker.vue";
import { recordBillApi, getProxyInfoApi, getStoreAliasApi, getStoreJobApi, getPolicyByJobIdApi, getPolicyListByJobIdApi, getJobDetailApi } from "@/api/job";
import { recordBillApi,recordBillApiDaotian, getProxyInfoApi, getStoreAliasApi, getStoreJobApi, getPolicyByJobIdApi,getPolicyByJobIdApiDaotian, getPolicyListByJobIdApi, getJobDetailApi } from "@/api/job";
import request from "@/utils/request";
import qs from "qs";
// import axios from "axios";
@ -290,7 +290,8 @@ export default {
data() {
return {
isModalVisible:false,
selectedJobId:"",
storeName:"",
agencyName: "-",
jobClassify: "",
@ -475,6 +476,26 @@ export default {
this.isModalVisible = true;
//
},
getSelectedJobId(val){
console.log(val);
this.selectedJobId = val;
this.jobClassify = val.jobClassify;
this.firminfo.id = val.jobId;
this.getJobDetail(val.jobId);
if(this.jobClassify == 1){
this.getPolicyByJobId(val.jobId).then(() => {
this.getJobDetail(val.jobId);
});
}else{
this.getPolicyByJobIdDaotian(val.jobId).then(() => {
this.getJobDetail(val.jobId);
});
}
},
async getJob(value) {
try {
const { data } = await getStoreJobApi(value.id);
@ -537,8 +558,13 @@ export default {
console.log(data);
if (data.status === 200) {
this.agencyName = data.data.agency.agencyName;
this.form.policyNum = data.data.storeJob.policyNum;
this.firminfo = disposeJobListData(data.data.record);
if (this.jobClassify == 1) {
this.storeName = data.data.store.aliasName;
}else{
this.storeName = data.data.record.storeName;
}
this.form.policyNum = data.data.record.policyNum;
console.log(this.form.policyNum);
if (this.form.policyNum == "" && this.form.policy != "") {
this.form.policyNum = 1;
@ -601,6 +627,14 @@ export default {
}
});
},
async getPolicyByJobIdDaotian(value) {
return getPolicyByJobIdApiDaotian(value).then(({ data }) => {
console.log(data);
if (data.status === 200) {
this.form.policy ="员工薪资:\n" + data.data.salaryDetail + '\n\n' + '代理政策:\n' + data.data.agencyReturnFeeDesp;
}
});
},
onClose() {
this.form = {
//
@ -654,18 +688,39 @@ export default {
this.confirmLoading = false;
return;
}
let dataObj = qs.stringify({
// console.log(dataObj);
// return;
let dataObj = {};
let data = {};
if(this.jobClassify == 2){
console.log(this.form);
this.form["interviewTimeStr"] = that.form.interviewTime;
this.form["receptionTimeStr"] = that.form.receptionTime;
this.form["jobId"] = this.firminfo.id
this.form["customJobId"] = this.firminfo.id
this.form["applyUserId"] = this.proxyinfo.id
this.form["agencyUserId"] =this.proxyinfo.id
dataObj = qs.stringify({
...this.form,
storeJobId: this.firminfo.id,
policyIdx: this.currentPolicy,
// policy: '',
});
// console.log(dataObj);
// return;
const { data } = await recordBillApi(dataObj);
data = await recordBillApiDaotian(dataObj);
}else{
dataObj = qs.stringify({
...this.form,
storeJobId: this.firminfo.id,
policyIdx: this.currentPolicy,
// policy: '',
});
data = await recordBillApi(dataObj);
}
if (data.status === 200) {
// console.log(data);
// this.$message.success("");
setTimeout(() => {
this.confirmLoading = false;
@ -1109,22 +1164,7 @@ export default {
// this.$message.warning("");
// }
},
storeJobChange(value) {
console.log(value);
// this.storeJobList = [];
// if(!isEmptyCheck(this.form.qiyeId)){
// this.getPolicyListByJobId(value.id)
this.getPolicyByJobId(value.id).then(() => {
this.getJobDetail(value.id);
});
this.form.storeJobId = value.id;
this.jobnameStatus = "";
this.firminfo.jobName = value.jobName;
console.log(this.form);
// } else {
// }
},
toList() {
this.$router.push({
path: `/list`,

@ -2,13 +2,25 @@
<div>
<a-modal title="职位选择" width="1200px" :visible="isModalVisible" @ok="confirmModal" @cancel="cancelModal" :footer="null">
<a-table :columns="tableColumns" :loading="isspinning" :data-source="tableData" size="small">
<div class="f40">
<a-input-search placeholder="搜索职位" enter-button="" allow-clear @search="onSearch" style="width:300px;margin-bottom: 20px;"/>
<!-- @search="onSearch" -->
</div>
<a-table :columns="tableColumns" :loading="isspinning" :pagination="false" :data-source="tableData" size="small">
<span slot="cz" slot-scope="text, record">
<a href="javascript:;">选择</a>
<a href="javascript:;" style="color: #ff4400;" @click="selectedJob(record)"></a>
</span>
</a-table>
<div class="pagecontainer f40" style="justify-content: start;">
<a-pagination :current="+formvalue.pageNum" :default-current="1" :defaultPageSize="8" :total="formvalue.total" @change="pageChange" />
<div class="ant-pagination-options-quick-jumper">
跳至
<input ref="pageinput" type="text" @keyup.enter="inputpageChange" @blur="inputpageChange" />
</div>
</div>
</a-modal>
</div>
</template>
@ -16,18 +28,28 @@
<script>
import { JobListApi, JobListApiYicai, getJobSpecialApi, getProvinceApi, getHotCityApi, getCityWhichHasJobApi, getHotStoreApi, getClassifyListApi } from "../../api/job";
import $ from "jquery";
import { moneyToFixed, getSalaryClassifyValue, isNotEmptyCheck, disposeJobListData, setReturnFee,xinZiXianShi } from "../../utils/commonUtil";
import { moneyToFixed, getSalaryClassifyValue, isNotEmptyCheck, disposeJobListData, setReturnFee,getSalaryClassifyValueText } from "../../utils/commonUtil";
export default {
props:['isModalVisible'],
data() {
return {
isspinning: false,
formvalue: {},
formvalue:{
district: "",
monthlyPayStr: "",
ageStr: "",
jobSpecialLabelIds: "",
aliasName: "",
pageNum: 1,
pageSize: 8,
total: null, //
},
tableColumns: [
{
title: "序号",
dataIndex: "sort",
key: "1",
width:60,
},
{
title: "职位名称",
@ -55,7 +77,10 @@ export default {
ellipsis: true,
width:180,
customRender: (text, row, index) => {
console.log(this.xinZiXianShi(row));
// console.log(row);
// console.log(row.salaryClassify);
// console.log(getSalaryClassifyValueText(row.salaryClassify, row.salaryClassifyValue));
return getSalaryClassifyValueText(row.salaryClassify, row.salaryClassifyValue);
// return xinZiXianShi(row)
},
@ -112,6 +137,12 @@ export default {
this.getJobList();
},
methods: {
selectedJob(record){
console.log(record);
this.$emit('getSelectedJobId', { "jobId": record.id,"jobClassify":record.jobClassify});
this.$emit('update:isModalVisible', false);
// this.isModalVisible = false;
},
openModal() {
this.isModalVisible = true;
//
@ -124,39 +155,13 @@ export default {
this.isModalVisible = false;
//
},
xinZiXianShi(record){
console.log(record);
console.log("=================");
return xinZiXianShi(record)
},
//
async getJobList() {
this.isspinning = true;
console.log("this.formvalue", this.formvalue);
try {
let newdata = {
district: "",
monthlyPayStr: "",
ageStr: "",
jobSpecialLabelIds: "",
aliasName: "",
pageNum: 1,
pageSize: 8,
total: null, //
};
// for (var k in this.formvalue) {
// // console.log(this.formvalue[k]);
// if (Array.isArray(this.formvalue[k])) {
// newdata[k] = this.formvalue[k].length > 0 ? this.formvalue[k].join() : "";
// } else {
// newdata[k] = this.formvalue[k];
// }
// }
// console.log(newdata);
// debugger;
// console.log(this.isLogin);
// if (this.isLogin) {
const { data } = await JobListApi(newdata);
const { data } = await JobListApi(this.formvalue);
console.log("data", data);
if (data.status === 200) {
this.tableData = disposeJobListData(data.data.pageBean.recordList);
@ -164,17 +169,50 @@ export default {
} else {
this.$message.info("数据获取失败");
}
// }
// this.totop();
// = data.data.recordList;
// console.log(this.formvalue);
} catch (error) {
console.log(error);
}
this.isspinning = false;
},
onSearch(value) {
this.formvalue.pageNum = 1;
this.formvalue.keys = value;
this.getJobList();
},
pageChange(e) {
console.log(e);
this.formvalue.pageNum = e;
this.$refs.pageinput.value = "";
this.getJobList();
},
inputpageChange(e) {
const pagenumcount = this.formvalue.total / this.formvalue.pageSize;
// console.log(pagenumcount);
if (e.target.value) {
if (e.target.value > pagenumcount) {
this.formvalue.pageNum = Math.ceil(pagenumcount);
} else {
this.formvalue.pageNum = e.target.value;
}
} else {
this.formvalue.pageNum = 1;
}
this.getJobList();
// console.log(e);
},
},
};
</script>
<style></style>
<style scoped>
/deep/ .f40 .ant-btn-primary{
color: #fff; background-color: #ff4400; border-color: #ff4400
}
/deep/ .f40 .ant-btn-primary:hover{
background-color: #ff7c1f !important;
border-color: #ff7c1f !important;
}
</style>

@ -1174,9 +1174,9 @@ export function getUserApplyOrderStatusByIdToBill (id) {
export function disposeJobListData (jobList) {
if (jobList !== undefined) {
if (Array.isArray(jobList)) {
jobList.forEach((item) => {
jobList.forEach((item,index) => {
item["workType"] = getWorkTypeById(item.workTypeMulti);
item["sort"] = index + 1;
if (isNotEmptyCheck(item.distance)) {
item["distanceKm"] = getDistanceName(item.distance);
}
@ -1531,6 +1531,33 @@ export function getSalaryClassifyValue (salaryClassify, salaryClassifyValue) {
return "-";
}
}
/**
* 根据薪资类型和薪资值获取薪资展示
*/
export function getSalaryClassifyValueText (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 if (salaryClassify == 7) {
// return '请配置薪资';
return `月薪`;
} else {
return "-";
}
}
// 通过身份证获取信息
export function getAgeFromBirthday (bir) {

Loading…
Cancel
Save