Commit 07cd1ae9 by 胡悦

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

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