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",

@ -1,235 +1,243 @@
<template> <template>
<view class="p-bill-index g_w_all g_h_all g_bg_f_5 g_kuaishou"> <view class="p-bill-index g_w_all g_h_all g_bg_f_5 g_kuaishou">
<view class="m-search g_flex_row_between flex_center g_bg_f g_pl_10 g_pr_10 g_pb_8 g_pt_6 g_mb_10"> <view class="m-search g_flex_row_between flex_center g_bg_f g_pl_10 g_pr_10 g_pb_8 g_pt_6 g_mb_10">
<u-search class="g_flex_1" :focus="true" @btnSearch="getSearch" height="80" v-model="keyword" :placeholder="placeholder" bg-color="#ededed" :show-action="false" @change="getSearch" @clear="getSearch" @custom="getSearch" @search="getSearch" search-icon-color="#999999" :maxlength="20"></u-search> <u-search class="g_flex_1" :focus="true" @btnSearch="getSearch" height="80" v-model="keyword" :placeholder="placeholder" bg-color="#ededed" :show-action="false" @change="getSearch" @clear="getSearch" @custom="getSearch" @search="getSearch" search-icon-color="#999999" :maxlength="20"></u-search>
<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'"> <g-list-job @uploadList="getList" :list="jobQuery.list" v-if="keyword" :loading="loading" :speed="speed" :query="jobQuery" emptyText="暂无搜索结果" emptySubText=" " />
<g-list-job @uploadList="getList" :list="jobQuery.list" v-if="keyword" :loading="loading" :speed="speed" :query="jobQuery" emptyText="暂无搜索结果" emptySubText=" " /> </view>
</view> <view v-if="whichPage == 'apply'">
<view v-if="whichPage == 'apply'"> <g-list-apply @uploadList="getApplyList('concat')" :list="jobQuery.list" v-if="keyword" :tabActive="applyType" from="home" bg class="g_bg_f" @shareJob="shareJob" :loading="loading" :speed="speed" :isLogin="true" :query.sync="jobQuery" :navInfo="navInfo" />
<g-list-apply @uploadList="getApplyList('concat')" :list="jobQuery.list" v-if="keyword" :tabActive="applyType" from="home" bg class="g_bg_f" @shareJob="shareJob" :loading="loading" :speed="speed" :isLogin="true" :query.sync="jobQuery" :navInfo="navInfo" /> </view>
</view> </view>
</view>
</template> </template>
<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: {},
// //
props: {}, props: {},
// //
data() { data() {
return { return {
whichPage: '', whichPage: "",
keyword: '', keyword: "",
loading: true, loading: true,
speed: -1, speed: -1,
applyType: 0, applyType: 0,
jobQuery: { jobQuery: {
page: 1, page: 1,
size: 50, size: 50,
list: [], list: [],
isFinish: -1, isFinish: -1,
}, },
placeholder: '搜索职位名称', placeholder: "搜索职位名称",
navInfo: {}, navInfo: {},
} };
}, },
// //
computed: {}, computed: {},
// //
watch: {}, watch: {},
created() {}, created() {},
mounted() {}, mounted() {},
onShow() { onShow() {
let that = this let that = this;
that.navInfo = that.G.getNavInfo() that.navInfo = that.G.getNavInfo();
}, },
// onReachBottom() {
methods: { let that = this;
getSearch(e) { that.jobQuery.page++;
console.log(e) if (this.whichPage == "home" || this.whichPage == "record") {
this.speed = -1 this.getList("concat");
this.keyword = e } else if (this.whichPage == "apply") {
this.jobQuery.page = 1 this.getApplyList("concat");
console.log(this.whichPage) }
if (this.whichPage == 'home' || this.whichPage == 'record') { },
this.getList() //
} else if (this.whichPage == 'apply') { methods: {
this.getApplyList() getSearch(e) {
} console.log(e);
}, this.speed = -1;
backPrev() { this.keyword = e;
console.log('backPrev') this.jobQuery.page = 1;
uni.navigateBack({ console.log(this.whichPage);
delta: 1, if (this.whichPage == "home" || this.whichPage == "record") {
}) this.getList();
}, } else if (this.whichPage == "apply") {
getList($type = 'init') { this.getApplyList();
let that = this }
let jobConfig = { },
pageNum: that.jobQuery.page, backPrev() {
pageSize: that.jobQuery.size, console.log("backPrev");
agencyId: that.whichPage == 'home' || that.whichPage == 'record' ? '' : uni.getStorageSync('apply-agencyId'), uni.navigateBack({
classify: 2, delta: 1,
keys: that.keyword, });
recruitment: 1, },
} 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"),
classify: 2,
keys: that.keyword,
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),
recruitmentSwitch: item.recruitment == 1 ? true : false, recruitmentSwitch: item.recruitment == 1 ? true : false,
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(
res.recordList.map((item, index) => { res.recordList.map((item, index) => {
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),
recruitmentSwitch: item.recruitment == 1 ? true : false, recruitmentSwitch: item.recruitment == 1 ? true : false,
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,
{ {
pageNum: that.jobQuery.page, pageNum: that.jobQuery.page,
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