|
|
|
|
@ -5,7 +5,6 @@
|
|
|
|
|
<view class="g_ml_8 g_fs_16" style="color: #576b95" hover-class="thover" @click="backPrev">取消</view>
|
|
|
|
|
</view>
|
|
|
|
|
<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=" " />
|
|
|
|
|
</view>
|
|
|
|
|
<view v-if="whichPage == 'bill'">
|
|
|
|
|
@ -20,32 +19,32 @@
|
|
|
|
|
<script>
|
|
|
|
|
export default {
|
|
|
|
|
onReady() {
|
|
|
|
|
this.G.setNavStyle()
|
|
|
|
|
this.G.setNavStyle();
|
|
|
|
|
},
|
|
|
|
|
onShareAppMessage() {
|
|
|
|
|
return this.G.shareFun()
|
|
|
|
|
return this.G.shareFun();
|
|
|
|
|
},
|
|
|
|
|
onLoad(options) {
|
|
|
|
|
console.log(options)
|
|
|
|
|
this.whichPage = options.from
|
|
|
|
|
if (this.whichPage == 'record' || this.whichPage == 'home') {
|
|
|
|
|
this.placeholder = '搜索职位名称'
|
|
|
|
|
console.log(options);
|
|
|
|
|
this.whichPage = options.from;
|
|
|
|
|
if (this.whichPage == "record" || this.whichPage == "home") {
|
|
|
|
|
this.placeholder = "搜索职位名称";
|
|
|
|
|
uni.setNavigationBarTitle({
|
|
|
|
|
title: '搜索职位',
|
|
|
|
|
})
|
|
|
|
|
this.getList()
|
|
|
|
|
} else if (this.whichPage == 'apply') {
|
|
|
|
|
title: "搜索职位",
|
|
|
|
|
});
|
|
|
|
|
this.getList();
|
|
|
|
|
} else if (this.whichPage == "apply") {
|
|
|
|
|
// 工单的类型 0 我报的 1 报给我的
|
|
|
|
|
this.applyType = options.active
|
|
|
|
|
this.placeholder = '搜索姓名/职位/手机号'
|
|
|
|
|
this.applyType = options.active;
|
|
|
|
|
this.placeholder = "搜索姓名/职位/手机号";
|
|
|
|
|
uni.setNavigationBarTitle({
|
|
|
|
|
title: '搜索工单',
|
|
|
|
|
})
|
|
|
|
|
this.getApplyList()
|
|
|
|
|
title: "搜索工单",
|
|
|
|
|
});
|
|
|
|
|
this.getApplyList();
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
// 组件名称
|
|
|
|
|
name: '',
|
|
|
|
|
name: "",
|
|
|
|
|
// 局部注册的组件
|
|
|
|
|
components: {},
|
|
|
|
|
// 组件参数 接收来自父组件的数据
|
|
|
|
|
@ -53,8 +52,8 @@ export default {
|
|
|
|
|
// 组件状态值
|
|
|
|
|
data() {
|
|
|
|
|
return {
|
|
|
|
|
whichPage: '',
|
|
|
|
|
keyword: '',
|
|
|
|
|
whichPage: "",
|
|
|
|
|
keyword: "",
|
|
|
|
|
loading: true,
|
|
|
|
|
speed: -1,
|
|
|
|
|
applyType: 0,
|
|
|
|
|
@ -64,9 +63,9 @@ export default {
|
|
|
|
|
list: [],
|
|
|
|
|
isFinish: -1,
|
|
|
|
|
},
|
|
|
|
|
placeholder: '搜索职位名称',
|
|
|
|
|
placeholder: "搜索职位名称",
|
|
|
|
|
navInfo: {},
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
},
|
|
|
|
|
// 计算属性
|
|
|
|
|
computed: {},
|
|
|
|
|
@ -75,67 +74,76 @@ export default {
|
|
|
|
|
created() {},
|
|
|
|
|
mounted() {},
|
|
|
|
|
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: {
|
|
|
|
|
getSearch(e) {
|
|
|
|
|
console.log(e)
|
|
|
|
|
this.speed = -1
|
|
|
|
|
this.keyword = e
|
|
|
|
|
this.jobQuery.page = 1
|
|
|
|
|
console.log(this.whichPage)
|
|
|
|
|
if (this.whichPage == 'home' || this.whichPage == 'record') {
|
|
|
|
|
this.getList()
|
|
|
|
|
} else if (this.whichPage == 'apply') {
|
|
|
|
|
this.getApplyList()
|
|
|
|
|
console.log(e);
|
|
|
|
|
this.speed = -1;
|
|
|
|
|
this.keyword = e;
|
|
|
|
|
this.jobQuery.page = 1;
|
|
|
|
|
console.log(this.whichPage);
|
|
|
|
|
if (this.whichPage == "home" || this.whichPage == "record") {
|
|
|
|
|
this.getList();
|
|
|
|
|
} else if (this.whichPage == "apply") {
|
|
|
|
|
this.getApplyList();
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
backPrev() {
|
|
|
|
|
console.log('backPrev')
|
|
|
|
|
console.log("backPrev");
|
|
|
|
|
uni.navigateBack({
|
|
|
|
|
delta: 1,
|
|
|
|
|
})
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
getList($type = 'init') {
|
|
|
|
|
let that = this
|
|
|
|
|
getList($type = "init") {
|
|
|
|
|
let that = this;
|
|
|
|
|
let jobConfig = {
|
|
|
|
|
pageNum: that.jobQuery.page,
|
|
|
|
|
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,
|
|
|
|
|
keys: that.keyword,
|
|
|
|
|
recruitment: 1,
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
that.G.Post(that.api.job_list, jobConfig, (res) => {
|
|
|
|
|
console.log('res', res)
|
|
|
|
|
console.log("res", res);
|
|
|
|
|
if (res.recordCount == 0) {
|
|
|
|
|
that.loading = false
|
|
|
|
|
that.loading = false;
|
|
|
|
|
} else {
|
|
|
|
|
that.loading = true
|
|
|
|
|
that.loading = true;
|
|
|
|
|
}
|
|
|
|
|
that.speed = res.recordCount
|
|
|
|
|
that.jobQuery.isFinish = res.recordList.length
|
|
|
|
|
res.recordList = that.G.toGetAddressv3(res.recordList)
|
|
|
|
|
res.recordList = that.G.toGetAge(res.recordList)
|
|
|
|
|
res.recordList = that.G.yijobCopy(res.recordList)
|
|
|
|
|
if ($type == 'init') {
|
|
|
|
|
that.jobQuery.list = []
|
|
|
|
|
that.speed = res.recordCount;
|
|
|
|
|
that.jobQuery.isFinish = res.recordList.length;
|
|
|
|
|
res.recordList = that.G.toGetAddressv3(res.recordList);
|
|
|
|
|
res.recordList = that.G.toGetAge(res.recordList);
|
|
|
|
|
res.recordList = that.G.yijobCopy(res.recordList);
|
|
|
|
|
if ($type == "init") {
|
|
|
|
|
that.jobQuery.list = [];
|
|
|
|
|
if (res.recordList.length > 0) {
|
|
|
|
|
that.jobQuery.list = res.recordList.map((item, index) => {
|
|
|
|
|
// console.log(item)
|
|
|
|
|
return {
|
|
|
|
|
...item,
|
|
|
|
|
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),
|
|
|
|
|
logo: item.agencyLogo,
|
|
|
|
|
fuWuFei: that.G.setReturnFee(item.returnFee, item.returnFeeType),
|
|
|
|
|
gender: that.G.getGenderByMinAge(item),
|
|
|
|
|
time: that.G.setDeadLine(item.updateTime, 'jiaofu'),
|
|
|
|
|
time: that.G.setDeadLine(item.updateTime, "jiaofu"),
|
|
|
|
|
leafCateId: item.id,
|
|
|
|
|
// serverPrice: that.G.setReturnFee(item.returnFee, item.returnFeeType),
|
|
|
|
|
serverPrice: that.G.setReturnFee(item.agencyReturnFee, item.agencyReturnFeeType),
|
|
|
|
|
@ -143,8 +151,8 @@ export default {
|
|
|
|
|
recruitmentImage: item.recruitment,
|
|
|
|
|
isToday: item.today == 0 ? false : true,
|
|
|
|
|
active: 0,
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
};
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
that.jobQuery.list = that.jobQuery.list.concat(
|
|
|
|
|
@ -152,12 +160,12 @@ export default {
|
|
|
|
|
return {
|
|
|
|
|
...item,
|
|
|
|
|
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),
|
|
|
|
|
logo: item.agencyLogo,
|
|
|
|
|
fuWuFei: that.G.setReturnFee(item.returnFee, item.returnFeeType),
|
|
|
|
|
gender: that.G.getGenderByMinAge(item),
|
|
|
|
|
time: that.G.setDeadLine(item.updateTime, 'jiaofu'),
|
|
|
|
|
time: that.G.setDeadLine(item.updateTime, "jiaofu"),
|
|
|
|
|
leafCateId: item.id,
|
|
|
|
|
// serverPrice: that.G.setReturnFee(item.returnFee, item.returnFeeType),
|
|
|
|
|
serverPrice: that.G.setReturnFee(item.agencyReturnFee, item.agencyReturnFeeType),
|
|
|
|
|
@ -165,26 +173,26 @@ export default {
|
|
|
|
|
recruitmentImage: item.recruitment,
|
|
|
|
|
isToday: item.today == 0 ? false : true,
|
|
|
|
|
active: 0,
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
})
|
|
|
|
|
)
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
if (that.whichPage == 'record') {
|
|
|
|
|
if (that.whichPage == "record") {
|
|
|
|
|
that.jobQuery.list = that.jobQuery.list.filter((item) => {
|
|
|
|
|
return item.recruitmentImage == 1
|
|
|
|
|
})
|
|
|
|
|
that.speed = that.jobQuery.list.length
|
|
|
|
|
return item.recruitmentImage == 1;
|
|
|
|
|
});
|
|
|
|
|
that.speed = that.jobQuery.list.length;
|
|
|
|
|
}
|
|
|
|
|
console.log('that.jobQuery.list', that.jobQuery.list)
|
|
|
|
|
console.log('speed', that.speed)
|
|
|
|
|
console.log("that.jobQuery.list", that.jobQuery.list);
|
|
|
|
|
console.log("speed", that.speed);
|
|
|
|
|
// that.loading = false;
|
|
|
|
|
})
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
/**
|
|
|
|
|
* 获取工单列表
|
|
|
|
|
*/
|
|
|
|
|
getApplyList($type = 'init') {
|
|
|
|
|
let that = this
|
|
|
|
|
getApplyList($type = "init") {
|
|
|
|
|
let that = this;
|
|
|
|
|
that.G.Post(
|
|
|
|
|
that.api.order_list_new,
|
|
|
|
|
{
|
|
|
|
|
@ -192,44 +200,44 @@ export default {
|
|
|
|
|
pageSize: that.jobQuery.size,
|
|
|
|
|
keys: that.keyword,
|
|
|
|
|
classify: that.applyType + 1,
|
|
|
|
|
status: '',
|
|
|
|
|
status: "",
|
|
|
|
|
},
|
|
|
|
|
(res) => {
|
|
|
|
|
if (res.recordCount == 0) {
|
|
|
|
|
that.loading = false
|
|
|
|
|
that.loading = false;
|
|
|
|
|
} else {
|
|
|
|
|
that.loading = true
|
|
|
|
|
that.loading = true;
|
|
|
|
|
}
|
|
|
|
|
that.$forceUpdate()
|
|
|
|
|
that.speed = res.recordCount
|
|
|
|
|
that.jobQuery.isFinish = res.recordList.length
|
|
|
|
|
that.$forceUpdate();
|
|
|
|
|
that.speed = res.recordCount;
|
|
|
|
|
that.jobQuery.isFinish = res.recordList.length;
|
|
|
|
|
if (that.speed > 0) {
|
|
|
|
|
// uni.setBackgroundColor({
|
|
|
|
|
// backgroundColorBottom: "#ffffff",
|
|
|
|
|
// });
|
|
|
|
|
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) => {
|
|
|
|
|
return itm.id == item.status
|
|
|
|
|
})[0].name
|
|
|
|
|
item.setTitle = that.G.titleToStr(item)
|
|
|
|
|
})
|
|
|
|
|
return itm.id == item.status;
|
|
|
|
|
})[0].name;
|
|
|
|
|
item.setTitle = that.G.titleToStr(item);
|
|
|
|
|
});
|
|
|
|
|
} else {
|
|
|
|
|
// uni.setBackgroundColor({
|
|
|
|
|
// backgroundColorBottom: "#ededed",
|
|
|
|
|
// });
|
|
|
|
|
}
|
|
|
|
|
if ($type == 'init') {
|
|
|
|
|
that.jobQuery.list = res.recordList
|
|
|
|
|
if ($type == "init") {
|
|
|
|
|
that.jobQuery.list = res.recordList;
|
|
|
|
|
// that.query.list = [...res.recordList, ...res.recordList, ...res.recordList, ...res.recordList, ...res.recordList];
|
|
|
|
|
} else {
|
|
|
|
|
that.jobQuery.list = that.jobQuery.list.concat(res.recordList)
|
|
|
|
|
that.jobQuery.list = that.jobQuery.list.concat(res.recordList);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
)
|
|
|
|
|
);
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<style scoped lang="less"></style>
|
|
|
|
|
|