Commit 07cd1ae9 by 胡悦

feat(residentManage): 新增门店岗位管理功能并优化查询时间限制

完善员工管理模块的岗位管理能力:新增员工列表岗位展示列、岗位搜索筛选条件,以及编辑/分配门店弹窗中的岗位选择组件。新增根据手机号查询员工最新业务类型的API接口。优化查询时间跨度限制逻辑,未选择门店或员工时最多支持7天数据,选择后放宽至31天。注释掉质量指数页面无用的APP接待结果表格列,统一部分代码的书写格式。
1 parent fe63646f
......@@ -68,6 +68,12 @@ export function getDictList(data) {
return request(data);
}
// 根据手机号查询员工最新业务类型
export function queryLatestBusinessType(data) {
data.method = "dj.staff.api.recruitment.demand.business.type.query";
return request(data);
}
// 修改字典项
export function updateDict(data) {
data.method = `dj.staff.api.dict.update`;
......@@ -124,4 +130,4 @@ export function getRecruitmentDemandSubSceneList(data) {
export function getPotentialCustomersList(data) {
data.method = `dj.api.smartcarlife.sale.potentialCustomers.page`;
return request(data);
}
\ No newline at end of file
}
......@@ -490,12 +490,12 @@ const TABLE_TYPE_2 = {
return cell.carModel || "-";
},
},
{
label: "APP接待结果",
width: "120px",
prop: "receptionStatus",
addHtml: "receptionStatus",
},
// {
// label: "APP接待结果",
// width: "120px",
// prop: "receptionStatus",
// addHtml: "receptionStatus",
// },
{
label: "关联订单成交",
width: "120px",
......
......@@ -528,9 +528,9 @@ export default {
}
},
computed: {
async searchTrackData () {
await this.beforeSearchFn(1)
return JSON.stringify(this.searchFormSearch)
async searchTrackData () {
await this.beforeSearchFn(1)
return JSON.stringify(this.searchFormSearch)
},
tableParams () {
const { viewType } = this
......@@ -669,7 +669,7 @@ export default {
return formattedTime
}
},
beforeSearchFn (type) {
beforeSearchFn (type) {
return new Promise((resolve, reject) => {
let flag = true
this.searchFormSearch = deepClone(this.searchForm)
......@@ -683,16 +683,17 @@ export default {
searchEndDate,
"YYYY-MM-DD"
)
const date1 = dayjs(searchStartDate),
date2 = dayjs(searchEndDate),
day = date2.diff(date1, "day") + 1,
maxDayNum = 7
if (day > maxDayNum) {
flag = false
reject(
`${type == 1 ? "查询" : "导出"
}的时间跨度最大为${maxDayNum}天,请重新选择日期范围`
)
const date1 = dayjs(searchStartDate),
date2 = dayjs(searchEndDate),
day = date2.diff(date1, "day") + 1,
maxDayNum = this.searchFormSearch.RecMerchantNo || this.searchFormSearch.employeeName ? 31 : 7
if (day > maxDayNum) {
flag = false
reject(
maxDayNum === 31
? `最多支持${type === 1 ? "查询" : "导出"} 31 天数据,请缩小日期范围`
: `未选择门店或员工时,最多支持${type === 1 ? "查询" : "导出"} 7 天数据,请缩小日期范围或选择门店/员工`
)
}
}
delete this.searchFormSearch.searchdate
......@@ -765,9 +766,9 @@ export default {
},
async getTableList (staticFlag = true) {
try {
this.loadComplete = true
let { viewType } = this,
flag = await this.beforeSearchFn(1)
this.loadComplete = true
let { viewType } = this,
flag = await this.beforeSearchFn(1)
if (flag && staticFlag) this.receptionStaffStatic()
let params = {
...this.page,
......@@ -929,7 +930,7 @@ export default {
async exportTable () {
try {
let { viewType } = this
await this.beforeSearchFn()
await this.beforeSearchFn(2)
const exportTableApi = viewType == 1 ? exportReclistList : exportReclistListV2
const res = await exportTableApi({
...this.searchFormSearch,
......
......@@ -208,6 +208,11 @@
{{ scope.row.merchantName || '-' }}
</template>
</el-table-column>
<el-table-column label="门店岗位" min-width="150" align="center">
<template slot-scope="scope">
{{ scope.row.positionTypeName || '-' }}
</template>
</el-table-column>
<el-table-column label="适配业务" min-width="150" align="center">
<template slot-scope="scope">
{{ scope.row.deletedFlag == 'N' ? scope.row.accountSceneStr || '-' : '-' }}
......@@ -712,11 +717,14 @@
@disableFailed="handleDisableFailed">
</disable-account-dialog>
<!-- 编辑门店权限弹窗 -->
<edit-store-permission-dialog v-if="editPermissionVisible" :visibleSync.sync="editPermissionVisible"
:detail="{ ...detail, staffId: queryData.id }" :currentRow="currentEditRow"
@refreshTable="closeEditPermissionDialog">
</edit-store-permission-dialog>
<!-- 编辑门店权限弹窗 -->
<edit-store-permission-dialog v-if="editPermissionVisible"
:account-rows="tableData"
:current-row="currentEditRow"
:detail="{ ...detail, staffId: queryData.id }"
:visible-sync.sync="editPermissionVisible"
@refreshTable="closeEditPermissionDialog">
</edit-store-permission-dialog>
</div>
</template>
......@@ -1316,7 +1324,7 @@ export default {
if (park.fourSShopList && park.fourSShopList.length > 0) {
park.fourSShopList.forEach(shop => {
let accountSceneStr = (shop.sceneList || []).map(s => s.name || s.sceneName).join(', ');
let accountSceneStr = (shop.sceneList || []).map(s => s.name || s.sceneName).join(',');
flatData.push({
staffPhone: park.staffPhone,
yqMerchantId: park.yqMerchantId,
......@@ -1328,6 +1336,7 @@ export default {
stationType: shop.stationType,
sceneList: shop.sceneList || [],
accountSceneStr: accountSceneStr,
positionTypeName: shop.positionTypeName,
createdDate: shop.createdDate,
createdBy: shop.createdBy,
deletedFlag: shop.deletedFlag
......
......@@ -96,6 +96,7 @@
</template>
<script>
import { getDictList } from "@api/recruitment";
import {
getCommissionListApi,
getLeaderList,
......@@ -145,6 +146,7 @@ export default {
baseSceneCode: "",
merchantName: "",
oIdJobPostId: "",
positionTypeList: "",
workingStatus: "",
createdSource: "",
directLeaderPhones: [],
......@@ -238,6 +240,16 @@ export default {
this.searchForm.staffPhone = value;
},
},
{
label: "门店岗位",
name: "positionTypeList",
type: "select",
isClear: true,
optionList: [],
optionId: "itemValue",
optionLabel: "itemName",
optionsName: "storePositionList",
},
],
getListApi: getResidentListApi,
tableParams: {
......@@ -259,6 +271,14 @@ export default {
width: "120px",
},
{
label: "门店岗位",
prop: "positionTypeList",
width: "120px",
formatter: (cellValue) => {
return cellValue.positionTypeList || "-";
},
},
{
label: "适配业务",
prop: "accountSceneStr",
width: "160px",
......@@ -362,6 +382,7 @@ export default {
{ confId: "2", confValue: "社会招聘" },
],
jobTypeList: [],
storePositionList: [],
workingStatusList: [
{ confId: "0", confValue: "在职" },
{ confId: "1", confValue: "离职" },
......@@ -461,14 +482,24 @@ export default {
getOptionsList();
},
async fetchAllApi() {
let [directLeaderList, commissionList, staffSceneLabelList, jobTypeList] = await Promise.all([
const [
directLeaderList,
commissionList,
staffSceneLabelList,
jobTypeList,
storePositionData,
] = await Promise.all([
getLeaderList(),
getCommissionListApi(),
this.fetchStaffSceneLabelList(),
beiSenJobPostPageApi({
pageNum: 1,
paseSize: 99999
})
paseSize: 99999,
}),
getDictList({
businessCode: "recruitment",
typeCode: "business_type",
}),
]);
console.log(jobTypeList, 'jobTypeList')
// 上级领导列表查询
......@@ -477,6 +508,7 @@ export default {
this.baseData.commissionList = [{ staffName: "全部", staffPhone: "all" }].concat(commissionList);
this.baseData.staffSceneLabelList = staffSceneLabelList;
this.baseData.jobTypeList = jobTypeList.list;
this.baseData.storePositionList = storePositionData.list || [];
getOptionsList(this, "showFormData", true);
getOptionsList(this, "showFormData", false, "directLeaderPhones");
getOptionsList(this, "showFormData", false, "commissionList");
......@@ -541,6 +573,7 @@ export default {
baseSceneCode: "",
merchantName: "",
oIdJobPostId: "",
positionTypeList: "",
workingStatus: "",
createdSource: "",
directLeaderPhones: [],
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!