cyl/master-0822
wangxia 7 months ago
parent 952f4790fe
commit 7a9f23b7fa

@ -1,6 +1,6 @@
<template> <template>
<div class="g-components-item"> <div class="g-components-item">
<div class="m-set g_bg_f g_radius_8" :style="{ borderRadius: list[0] && list[0].radius == 'no_top' ? '0 0 8px 8px' : list[0] && list[0].radius == 'no_bottom' ? '8px 8px 0 0 ' : '' }"> <div class="m-set g_bg_f g_radius_8" :style="{ borderRadius: list[0] && list[0].radius == 'no_top' ? '0 0 8px 8px' : list[0] && list[0].radius == 'no_bottom' ? '8px 8px 0 0 ' : '' ,overflow: 'hidden'}">
<block v-for="(item, index) in list" :key="index"> <block v-for="(item, index) in list" :key="index">
<div <div
class="item g_flex_row_start" class="item g_flex_row_start"
@ -138,7 +138,7 @@
<!-- 地址选择输入框 --> <!-- 地址选择输入框 -->
<div class="" v-if="item.tip == 'slot-choose&input-address'"> <div class="" v-if="item.tip == 'slot-choose&input-address'">
<view v-if="item.uneditable" class="g_text_r"> <view v-if="item.uneditable" class="g_br_6 g_text_r g_pt_8 g_pb_8">
{{ item.value || '-' }} {{ item.value || '-' }}
</view> </view>
<view class="form-new-choose g_flex_rowRight_columnCenter" v-else> <view class="form-new-choose g_flex_rowRight_columnCenter" v-else>

@ -153,6 +153,7 @@ export default {
console.log("options.jobId", options.jobId); console.log("options.jobId", options.jobId);
let params = options.params ? JSON.parse(options.params) : {}; let params = options.params ? JSON.parse(options.params) : {};
if (params.jobId) { if (params.jobId) {
that.currentJobInfo = JSON.parse(JSON.stringify(params));
this.updateInfo.jobId = params.jobId; this.updateInfo.jobId = params.jobId;
this.updateInfo.jobName = params.jobName; this.updateInfo.jobName = params.jobName;
} }
@ -259,8 +260,7 @@ export default {
}, },
setFormList(policyStr) { setFormList(policyStr) {
let that = this; let that = this;
console.log("that.updateInfo", that.updateInfo); // console.log("that.updateInfo", that.updateInfo);
console.log('that.currentJobInfo.agencyId == uni.getStorageSync("apply-userinfo").agencyId',that.currentJobInfo.agencyId == uni.getStorageSync("apply-userinfo").agencyId);
if (that.isFans == 2) { if (that.isFans == 2) {
that.jobData = [ that.jobData = [
{ {
@ -299,7 +299,7 @@ export default {
longitude: that.updateInfo["interviewLng"], longitude: that.updateInfo["interviewLng"],
}, },
tip: "slot-choose&input-address", tip: "slot-choose&input-address",
// uneditable: (that.currentJobInfo.agencyId == uni.getStorageSync("apply-userinfo").agencyId) ? false : true, uneditable: that.currentJobInfo.agencyId == uni.getStorageSync("apply-userinfo").agencyId ? false : true,
placeholder: "请选择面试地址", placeholder: "请选择面试地址",
type: "slot", type: "slot",
fontSize: "16px", fontSize: "16px",

@ -5,7 +5,6 @@
<view class="g_ml_8 g_fs_16" style="color: #576b95" hover-class="thover" @click="backPrev"></view> <view class="g_ml_8 g_fs_16" style="color: #576b95" hover-class="thover" @click="backPrev"></view>
</view> </view>
<view v-if="whichPage == 'home' || whichPage == 'record'"> <view v-if="whichPage == 'home' || whichPage == 'record'">
<g-list-job @uploadList="getList" :list="jobQuery.list" v-if="keyword || whichPage == 'record'" :from="whichPage" :loading="loading" :speed="speed" :query="jobQuery" emptyText="暂无搜索结果" emptySubText=" " /> <g-list-job @uploadList="getList" :list="jobQuery.list" v-if="keyword || whichPage == 'record'" :from="whichPage" :loading="loading" :speed="speed" :query="jobQuery" emptyText="暂无搜索结果" emptySubText=" " />
</view> </view>
<view v-if="whichPage == 'bill'"> <view v-if="whichPage == 'bill'">
@ -20,32 +19,32 @@
<script> <script>
export default { export default {
onReady() { onReady() {
this.G.setNavStyle() this.G.setNavStyle();
}, },
onShareAppMessage() { onShareAppMessage() {
return this.G.shareFun() return this.G.shareFun();
}, },
onLoad(options) { onLoad(options) {
console.log(options) console.log(options);
this.whichPage = options.from this.whichPage = options.from;
if (this.whichPage == 'record' || this.whichPage == 'home') { if (this.whichPage == "record" || this.whichPage == "home") {
this.placeholder = '搜索职位名称' this.placeholder = "搜索职位名称";
uni.setNavigationBarTitle({ uni.setNavigationBarTitle({
title: '搜索职位', title: "搜索职位",
}) });
this.getList() this.getList();
} else if (this.whichPage == 'apply') { } else if (this.whichPage == "apply") {
// 0 1 // 0 1
this.applyType = options.active this.applyType = options.active;
this.placeholder = '搜索姓名/职位/手机号' this.placeholder = "搜索姓名/职位/手机号";
uni.setNavigationBarTitle({ uni.setNavigationBarTitle({
title: '搜索工单', title: "搜索工单",
}) });
this.getApplyList() this.getApplyList();
} }
}, },
// //
name: '', name: "",
// //
components: {}, components: {},
// //
@ -53,8 +52,8 @@ export default {
// //
data() { data() {
return { return {
whichPage: '', whichPage: "",
keyword: '', keyword: "",
loading: true, loading: true,
speed: -1, speed: -1,
applyType: 0, applyType: 0,
@ -64,9 +63,9 @@ export default {
list: [], list: [],
isFinish: -1, isFinish: -1,
}, },
placeholder: '搜索职位名称', placeholder: "搜索职位名称",
navInfo: {}, navInfo: {},
} };
}, },
// //
computed: {}, computed: {},
@ -75,67 +74,76 @@ export default {
created() {}, created() {},
mounted() {}, mounted() {},
onShow() { onShow() {
let that = this let that = this;
that.navInfo = that.G.getNavInfo() that.navInfo = that.G.getNavInfo();
},
onReachBottom() {
let that = this;
that.jobQuery.page++;
if (this.whichPage == "home" || this.whichPage == "record") {
this.getList("concat");
} else if (this.whichPage == "apply") {
this.getApplyList("concat");
}
}, },
// //
methods: { methods: {
getSearch(e) { getSearch(e) {
console.log(e) console.log(e);
this.speed = -1 this.speed = -1;
this.keyword = e this.keyword = e;
this.jobQuery.page = 1 this.jobQuery.page = 1;
console.log(this.whichPage) console.log(this.whichPage);
if (this.whichPage == 'home' || this.whichPage == 'record') { if (this.whichPage == "home" || this.whichPage == "record") {
this.getList() this.getList();
} else if (this.whichPage == 'apply') { } else if (this.whichPage == "apply") {
this.getApplyList() this.getApplyList();
} }
}, },
backPrev() { backPrev() {
console.log('backPrev') console.log("backPrev");
uni.navigateBack({ uni.navigateBack({
delta: 1, delta: 1,
}) });
}, },
getList($type = 'init') { getList($type = "init") {
let that = this let that = this;
let jobConfig = { let jobConfig = {
pageNum: that.jobQuery.page, pageNum: that.jobQuery.page,
pageSize: that.jobQuery.size, pageSize: that.jobQuery.size,
agencyId: that.whichPage == 'home' || that.whichPage == 'record' ? '' : uni.getStorageSync('apply-agencyId'), agencyId: that.whichPage == "home" || that.whichPage == "record" ? "" : uni.getStorageSync("apply-agencyId"),
classify: 2, classify: 2,
keys: that.keyword, keys: that.keyword,
recruitment: 1, recruitment: 1,
} };
that.G.Post(that.api.job_list, jobConfig, (res) => { that.G.Post(that.api.job_list, jobConfig, (res) => {
console.log('res', res) console.log("res", res);
if (res.recordCount == 0) { if (res.recordCount == 0) {
that.loading = false that.loading = false;
} else { } else {
that.loading = true that.loading = true;
} }
that.speed = res.recordCount that.speed = res.recordCount;
that.jobQuery.isFinish = res.recordList.length that.jobQuery.isFinish = res.recordList.length;
res.recordList = that.G.toGetAddressv3(res.recordList) res.recordList = that.G.toGetAddressv3(res.recordList);
res.recordList = that.G.toGetAge(res.recordList) res.recordList = that.G.toGetAge(res.recordList);
res.recordList = that.G.yijobCopy(res.recordList) res.recordList = that.G.yijobCopy(res.recordList);
if ($type == 'init') { if ($type == "init") {
that.jobQuery.list = [] that.jobQuery.list = [];
if (res.recordList.length > 0) { if (res.recordList.length > 0) {
that.jobQuery.list = res.recordList.map((item, index) => { that.jobQuery.list = res.recordList.map((item, index) => {
// console.log(item) // console.log(item)
return { return {
...item, ...item,
title: item.jobName, title: item.jobName,
address: item.district + '丨' + item.age, address: item.district + "丨" + item.age,
price: item.salaryClassify != 7 ? that.G.getSalaryClassifyValue(item.salaryClassify, item.salaryClassifyValue) : that.G.getSalaryClassifyValue(item.salaryClassify, item.minMonthlyPay, item.maxMonthlyPay), price: item.salaryClassify != 7 ? that.G.getSalaryClassifyValue(item.salaryClassify, item.salaryClassifyValue) : that.G.getSalaryClassifyValue(item.salaryClassify, item.minMonthlyPay, item.maxMonthlyPay),
logo: item.agencyLogo, logo: item.agencyLogo,
fuWuFei: that.G.setReturnFee(item.returnFee, item.returnFeeType), fuWuFei: that.G.setReturnFee(item.returnFee, item.returnFeeType),
gender: that.G.getGenderByMinAge(item), gender: that.G.getGenderByMinAge(item),
time: that.G.setDeadLine(item.updateTime, 'jiaofu'), time: that.G.setDeadLine(item.updateTime, "jiaofu"),
leafCateId: item.id, leafCateId: item.id,
// serverPrice: that.G.setReturnFee(item.returnFee, item.returnFeeType), // serverPrice: that.G.setReturnFee(item.returnFee, item.returnFeeType),
serverPrice: that.G.setReturnFee(item.agencyReturnFee, item.agencyReturnFeeType), serverPrice: that.G.setReturnFee(item.agencyReturnFee, item.agencyReturnFeeType),
@ -143,8 +151,8 @@ export default {
recruitmentImage: item.recruitment, recruitmentImage: item.recruitment,
isToday: item.today == 0 ? false : true, isToday: item.today == 0 ? false : true,
active: 0, active: 0,
} };
}) });
} }
} else { } else {
that.jobQuery.list = that.jobQuery.list.concat( that.jobQuery.list = that.jobQuery.list.concat(
@ -152,12 +160,12 @@ export default {
return { return {
...item, ...item,
title: item.jobName, title: item.jobName,
address: item.district + '丨' + item.age, address: item.district + "丨" + item.age,
price: item.salaryClassify != 7 ? that.G.getSalaryClassifyValue(item.salaryClassify, item.salaryClassifyValue) : that.G.getSalaryClassifyValue(item.salaryClassify, item.minMonthlyPay, item.maxMonthlyPay), price: item.salaryClassify != 7 ? that.G.getSalaryClassifyValue(item.salaryClassify, item.salaryClassifyValue) : that.G.getSalaryClassifyValue(item.salaryClassify, item.minMonthlyPay, item.maxMonthlyPay),
logo: item.agencyLogo, logo: item.agencyLogo,
fuWuFei: that.G.setReturnFee(item.returnFee, item.returnFeeType), fuWuFei: that.G.setReturnFee(item.returnFee, item.returnFeeType),
gender: that.G.getGenderByMinAge(item), gender: that.G.getGenderByMinAge(item),
time: that.G.setDeadLine(item.updateTime, 'jiaofu'), time: that.G.setDeadLine(item.updateTime, "jiaofu"),
leafCateId: item.id, leafCateId: item.id,
// serverPrice: that.G.setReturnFee(item.returnFee, item.returnFeeType), // serverPrice: that.G.setReturnFee(item.returnFee, item.returnFeeType),
serverPrice: that.G.setReturnFee(item.agencyReturnFee, item.agencyReturnFeeType), serverPrice: that.G.setReturnFee(item.agencyReturnFee, item.agencyReturnFeeType),
@ -165,26 +173,26 @@ export default {
recruitmentImage: item.recruitment, recruitmentImage: item.recruitment,
isToday: item.today == 0 ? false : true, isToday: item.today == 0 ? false : true,
active: 0, active: 0,
} };
}) })
) );
} }
if (that.whichPage == 'record') { if (that.whichPage == "record") {
that.jobQuery.list = that.jobQuery.list.filter((item) => { that.jobQuery.list = that.jobQuery.list.filter((item) => {
return item.recruitmentImage == 1 return item.recruitmentImage == 1;
}) });
that.speed = that.jobQuery.list.length that.speed = that.jobQuery.list.length;
} }
console.log('that.jobQuery.list', that.jobQuery.list) console.log("that.jobQuery.list", that.jobQuery.list);
console.log('speed', that.speed) console.log("speed", that.speed);
// that.loading = false; // that.loading = false;
}) });
}, },
/** /**
* 获取工单列表 * 获取工单列表
*/ */
getApplyList($type = 'init') { getApplyList($type = "init") {
let that = this let that = this;
that.G.Post( that.G.Post(
that.api.order_list_new, that.api.order_list_new,
{ {
@ -192,44 +200,44 @@ export default {
pageSize: that.jobQuery.size, pageSize: that.jobQuery.size,
keys: that.keyword, keys: that.keyword,
classify: that.applyType + 1, classify: that.applyType + 1,
status: '', status: "",
}, },
(res) => { (res) => {
if (res.recordCount == 0) { if (res.recordCount == 0) {
that.loading = false that.loading = false;
} else { } else {
that.loading = true that.loading = true;
} }
that.$forceUpdate() that.$forceUpdate();
that.speed = res.recordCount that.speed = res.recordCount;
that.jobQuery.isFinish = res.recordList.length that.jobQuery.isFinish = res.recordList.length;
if (that.speed > 0) { if (that.speed > 0) {
// uni.setBackgroundColor({ // uni.setBackgroundColor({
// backgroundColorBottom: "#ffffff", // backgroundColorBottom: "#ffffff",
// }); // });
res.recordList.forEach((item, index) => { res.recordList.forEach((item, index) => {
item.time = that.G.getPointTime(item.updateTime, 'MM--DD HH:MM') item.time = that.G.getPointTime(item.updateTime, "MM--DD HH:MM");
item.status_text = that.G.getOrderStatus().filter((itm, inx) => { item.status_text = that.G.getOrderStatus().filter((itm, inx) => {
return itm.id == item.status return itm.id == item.status;
})[0].name })[0].name;
item.setTitle = that.G.titleToStr(item) item.setTitle = that.G.titleToStr(item);
}) });
} else { } else {
// uni.setBackgroundColor({ // uni.setBackgroundColor({
// backgroundColorBottom: "#ededed", // backgroundColorBottom: "#ededed",
// }); // });
} }
if ($type == 'init') { if ($type == "init") {
that.jobQuery.list = res.recordList that.jobQuery.list = res.recordList;
// that.query.list = [...res.recordList, ...res.recordList, ...res.recordList, ...res.recordList, ...res.recordList]; // that.query.list = [...res.recordList, ...res.recordList, ...res.recordList, ...res.recordList, ...res.recordList];
} else { } else {
that.jobQuery.list = that.jobQuery.list.concat(res.recordList) that.jobQuery.list = that.jobQuery.list.concat(res.recordList);
} }
} }
) );
}, },
}, },
} };
</script> </script>
<style scoped lang="less"></style> <style scoped lang="less"></style>

Loading…
Cancel
Save