Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas_plus
/
dj-car-life-system
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit f76fbad0
authored
Jun 23, 2026
by
wangzhihui
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
fixed
1 parent
1dcdcf2e
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
593 additions
and
36 deletions
src/api/recruitment.js
src/common/constants.js
src/views/residentManage/recruitmentManagement/addRecruitment.vue
src/views/residentManage/recruitmentManagement/components/baseInfo.vue
src/views/residentManage/recruitmentManagement/components/trialOnboard.vue
src/views/residentManage/recruitmentManagement/disposeRecruitment.vue
src/views/residentManage/recruitmentManagement/index.vue
src/api/recruitment.js
View file @
f76fbad
...
...
@@ -100,4 +100,22 @@ export function findMerchantStaffList(data) {
export
function
linkMerchant
(
data
)
{
data
.
method
=
`dj.staff.api.recruitment.demand.link.merchant`
;
return
request
(
data
);
}
// 试岗计划审批(通过/驳回)
export
function
trialOnboardingApproval
(
data
)
{
data
.
method
=
`dj.staff.api.recruitment.trial.onboarding.approval`
;
return
request
(
data
);
}
// 试岗门店列表
export
function
getTrialOnboardingStoreList
(
data
)
{
data
.
method
=
`dj.staff.api.recruitment.demand.store.list`
;
return
request
(
data
);
}
// 招聘需求业务场景列表
export
function
getRecruitmentDemandSubSceneList
(
data
)
{
data
.
method
=
`dj.staff.api.recruitment.demand.sub.scene.list`
;
return
request
(
data
);
}
\ No newline at end of file
src/common/constants.js
View file @
f76fbad
...
...
@@ -2083,6 +2083,16 @@ export const trialStatusOpt = [
confValue
:
"无试岗"
,
},
];
export
const
approvalStatusOpt
=
[
{
confId
:
0
,
confValue
:
"待审批"
,
},
{
confId
:
1
,
confValue
:
"已审批"
,
},
]
export
const
connectionFlagOptMap
=
{
true
:
"#2CCA74"
,
false
:
"#EB4E4E"
,
...
...
src/views/residentManage/recruitmentManagement/addRecruitment.vue
View file @
f76fbad
...
...
@@ -109,6 +109,7 @@ export default {
salesVolume
:
""
,
brand
:
[],
merchantAddress
:
""
,
merchantAddressDetail
:
""
,
provinceCityCode
:
""
,
province
:
""
,
...
...
@@ -145,12 +146,21 @@ export default {
isHide
:
true
,
},
{
label
:
"
门店地址
"
,
label
:
"
所属省市
"
,
name
:
"merchantAddress"
,
addHtml
:
"merchantAddressHtml"
,
isHide
:
true
,
},
{
label
:
"详细地址"
,
name
:
"merchantAddressDetail"
,
type
:
"input"
,
isClear
:
true
,
maxlength
:
60
,
showLimit
:
true
,
isHide
:
true
,
},
{
label
:
"业务类型"
,
name
:
"businessType"
,
type
:
"select"
,
...
...
@@ -278,7 +288,24 @@ export default {
validator
:
(
rule
,
value
,
callback
)
=>
{
if
(
this
.
addForm
.
bySystemMerchant
)
{
if
(
!
this
.
addForm
.
provinceCode
||
!
this
.
addForm
.
provinceCityCode
)
{
callback
(
new
Error
(
"请选择门店地址"
));
callback
(
new
Error
(
"请选择省市"
));
}
else
{
callback
();
}
}
else
{
callback
();
}
},
trigger
:
[
"change"
,
"blur"
],
},
],
merchantAddressDetail
:
[
{
required
:
true
,
validator
:
(
rule
,
value
,
callback
)
=>
{
if
(
this
.
addForm
.
bySystemMerchant
)
{
if
(
!
value
||
!
value
.
trim
())
{
callback
(
new
Error
(
"请输入详细地址"
));
}
else
{
callback
();
}
...
...
@@ -460,7 +487,7 @@ export default {
})
},
handleIsNewMerchantChange
(
val
)
{
const
fieldsToToggle
=
[
"salesVolume"
,
"brand"
,
"merchantAddress"
];
const
fieldsToToggle
=
[
"salesVolume"
,
"brand"
,
"merchantAddress"
,
"merchantAddressDetail"
];
fieldsToToggle
.
forEach
((
name
)
=>
{
const
index
=
this
.
editFormData
.
findIndex
(
k
=>
k
.
name
===
name
);
if
(
index
>
-
1
)
{
...
...
@@ -478,6 +505,7 @@ export default {
this
.
addForm
.
cityCode
=
""
;
this
.
addForm
.
cityName
=
""
;
this
.
addForm
.
merchantAddress
=
""
;
this
.
addForm
.
merchantAddressDetail
=
""
;
if
(
this
.
$refs
.
provinceCityRef
)
{
this
.
$refs
.
provinceCityRef
.
init
(
""
,
""
,
""
);
}
...
...
@@ -538,6 +566,7 @@ export default {
params
.
salesVolume
=
this
.
addForm
.
salesVolume
;
params
.
brand
=
brands
.
join
(
"/"
);
params
.
merchantAddress
=
this
.
addForm
.
merchantAddress
;
params
.
merchantAddressDetail
=
this
.
addForm
.
merchantAddressDetail
;
params
.
province
=
this
.
addForm
.
province
;
params
.
provinceCityCode
=
this
.
addForm
.
provinceCityCode
;
}
...
...
src/views/residentManage/recruitmentManagement/components/baseInfo.vue
View file @
f76fbad
...
...
@@ -54,12 +54,18 @@ export default {
hasTooltip
:
true
,
},
{
title
:
"
门店地址
"
,
title
:
"
所属省市
"
,
key
:
"merchantAddress"
,
style
:
contentStyle
,
hasTooltip
:
true
,
},
{
title
:
"详细地址"
,
key
:
"merchantAddressDetail"
,
style
:
contentStyle
,
hasTooltip
:
true
,
},
{
title
:
"业务类型"
,
key
:
"businessTypeName"
,
},
...
...
src/views/residentManage/recruitmentManagement/components/trialOnboard.vue
View file @
f76fbad
...
...
@@ -34,15 +34,37 @@
</div>
</div>
<div
v-if=
"isBtn"
class=
"btns"
>
<el-button
v-if=
"isPendingTrial(item)"
type=
"text"
@
click=
"handleEdit(item, index)"
>
<el-button
v-if=
"isPendingApproval(item)"
type=
"text"
@
click=
"handleApprove(item, index)"
>
通过
</el-button>
<el-button
v-if=
"isPendingApproval(item)"
type=
"text"
@
click=
"handleReject(item, index)"
>
驳回
</el-button>
<el-button
v-if=
"isPendingTrial(item)"
type=
"text"
:disabled=
"!canOperateTrial(item)"
@
click=
"handleEdit(item, index)"
>
编辑
</el-button>
<el-button
v-if=
"isPendingTrial(item)"
type=
"text"
@
click=
"handleResolve(item, index)"
>
<el-button
v-if=
"isPendingTrial(item)"
type=
"text"
:disabled=
"!canOperateTrial(item)"
@
click=
"handleResolve(item, index)"
>
处理
</el-button>
<el-button
v-if=
"isPendingTrial(item)"
type=
"text"
@
click=
"handleDelete(index)"
>
<el-button
v-if=
"isPendingTrial(item)"
type=
"text"
:disabled=
"!canOperateTrial(item)"
@
click=
"handleDelete(index)"
>
删除
</el-button>
<el-button
v-if=
"isProcessedTrial(item)"
type=
"text"
@
click=
"handleWorking(item)"
>
转入职
</el-button>
...
...
@@ -50,11 +72,11 @@
查看结果
</el-button>
</div>
<div
else
class=
"btns"
>
<div
v-
else
class=
"btns"
>
<el-button
v-if=
"isProcessedTrial(item)"
type=
"text"
@
click=
"handleViewResult(item)"
>
查看结果
</el-button>
</div>
</div>
</div>
</div>
</
template
>
...
...
@@ -65,18 +87,33 @@
</div>
</div>
<!-- 新增试岗 -->
<glsk-form-dialog
v-if=
"isAddVisible"
ref=
"addResumeDialog"
:base-data=
"baseData"
default-width=
"406px"
:dialog-config=
"isAddDialogConfig"
:edit-data=
"isAddForm"
:edit-form-data=
"isAddFormData"
:form-rules=
"isAddRules"
label-width=
"150px"
:select-visible=
"isAddVisible"
:slot-arr=
"slotArr"
@
handleAddSelectTypeConfirm=
"handleAddSelectTypeConfirm"
@
handleClose=
"isAddDialogVisible"
@
handleConfirm=
"handleAddConfirm"
@
handleEditSelectTypeConfirm=
"handleEditSelectTypeConfirm"
>
<glsk-form-dialog
v-if=
"isAddVisible"
:key=
"addDialogKey"
ref=
"addResumeDialog"
:base-data=
"baseData"
default-width=
"406px"
:dialog-config=
"isAddDialogConfig"
:edit-data=
"isAddForm"
:edit-form-data=
"isAddFormData"
:form-rules=
"isAddRules"
label-width=
"150px"
:select-visible=
"isAddVisible"
:slot-arr=
"slotArr"
@
handleAddSelectTypeConfirm=
"handleAddSelectTypeConfirm"
@
handleClose=
"isAddDialogVisible"
@
handleConfirm=
"handleAddConfirm"
@
handleEditSelectTypeConfirm=
"handleEditSelectTypeConfirm"
>
</glsk-form-dialog>
<!-- 试岗处理 -->
<glsk-form-dialog
v-if=
"isResolveVisible"
:base-data=
"baseData"
default-width=
"406px"
:dialog-config=
"isResolveDialogConfig"
:edit-data=
"isResolveForm"
:edit-form-data=
"isResolveFormData"
:form-rules=
"isResolveRules"
label-width=
"150px"
:select-visible=
"isResolveVisible"
@
handleClose=
"isResolveDialogVisible"
@
handleConfirm=
"handleResolveConfirm"
>
</glsk-form-dialog>
<!-- 试岗审批驳回 -->
<glsk-form-dialog
v-if=
"isRejectVisible"
:base-data=
"baseData"
default-width=
"406px"
:dialog-config=
"isRejectDialogConfig"
:edit-data=
"isRejectForm"
:edit-form-data=
"isRejectFormData"
:form-rules=
"isRejectRules"
label-width=
"150px"
:select-visible=
"isRejectVisible"
@
handleClose=
"handleRejectClose"
@
handleConfirm=
"handleRejectConfirm"
>
</glsk-form-dialog>
</div>
</template>
<
script
>
import
GlOssApi
from
"glsk-oss-jssdk"
;
import
{
mapMutations
}
from
"vuex"
;
import
{
addDict
,
deleteDict
,
getDictList
,
updateDict
}
from
"@/api/recruitment"
;
import
{
addDict
,
deleteDict
,
getDictList
,
getRecruitmentDemandSubSceneList
,
getTrialOnboardingStoreList
,
trialOnboardingApproval
,
updateDict
}
from
"@/api/recruitment"
;
import
{
deepClone
,
Util
}
from
"@/common/util"
;
import
{
baseConfig
}
from
"@/main"
;
...
...
@@ -91,6 +128,14 @@ export default {
type
:
Boolean
,
default
:
false
,
},
demandId
:
{
type
:
[
Number
,
String
],
default
:
""
,
},
businessType
:{
type
:
[
Number
,
String
],
default
:
""
,
}
},
data
()
{
return
{
...
...
@@ -101,7 +146,48 @@ export default {
imgList
:
[],
detailVisible
:
false
,
isAddVisible
:
false
,
addDialogKey
:
0
,
isResolveVisible
:
false
,
isRejectVisible
:
false
,
approvalIndex
:
null
,
approvalRecord
:
{},
isRejectDialogConfig
:
{
title
:
"驳回"
,
okText
:
"确认"
,
},
isRejectRules
:
{
approvalRemark
:
[
{
required
:
true
,
message
:
"请输入驳回原因"
,
trigger
:
"blur"
},
],
},
isRejectForm
:
{
approvalRemark
:
""
,
txt
:
"驳回后,无法再进行试岗相关事项"
,
},
isRejectFormData
:
[
{
label
:
"驳回原因"
,
name
:
"approvalRemark"
,
type
:
"textarea"
,
isClear
:
true
,
maxlength
:
200
,
showLimit
:
true
,
rows
:
4
,
placeholder
:
"请输入驳回原因"
,
},
{
label
:
""
,
name
:
"txt"
,
type
:
"showTxt"
,
txtStyle
:
{
color
:
"#999999"
,
fontSize
:
"14px"
,
marginLeft
:
"150px"
,
display
:
"block"
,
marginTop
:
"-15px"
,
},
},
],
slotArr
:
[],
trialOnboardingsData
:
[],
paramsObj
:
{},
...
...
@@ -138,6 +224,21 @@ export default {
trialTime
:
[
{
required
:
true
,
message
:
"请选择试岗时间"
,
trigger
:
"change"
},
],
storeNo
:
[
{
required
:
true
,
message
:
"请选择试岗门店"
,
trigger
:
"change"
},
],
bizSceneCodes
:
[
{
type
:
"array"
,
required
:
true
,
min
:
1
,
message
:
"请选择业务类型"
,
trigger
:
"change"
,
},
],
residentType
:
[
{
required
:
true
,
message
:
"请选择驻店类型"
,
trigger
:
"change"
},
],
},
isResolveRules
:
{
processResult
:
[
...
...
@@ -147,10 +248,16 @@ export default {
isAddForm
:
{
personName
:
""
,
phoneNumber
:
""
,
trialTime
:
""
,
// 试岗时间
trialTime
:
""
,
resumeFileName
:
""
,
channelType
:
""
,
// 招聘渠道
channelType
:
""
,
channelName
:
""
,
storeNo
:
""
,
storeName
:
""
,
bizSceneCodes
:
[],
bizSceneInfo
:
[],
residentType
:
""
,
residentTypeName
:
""
,
},
isAddFormData
:
[
{
...
...
@@ -189,12 +296,77 @@ export default {
);
},
},
{
{
label
:
"试岗时间"
,
name
:
"trialTime"
,
type
:
"datePicker"
,
dateType
:
"date"
,
},
{
label
:
"试岗门店"
,
name
:
"storeNo"
,
type
:
"select"
,
isClear
:
true
,
noFilter
:
false
,
optionId
:
"merchantId"
,
optionLabel
:
"merchantName"
,
optionsName
:
"trialStoreData"
,
changeAttr
:
async
(
value
,
targetItem
)
=>
{
console
.
log
(
value
,
'value'
)
this
.
isAddForm
.
storeName
=
this
.
filterAttribute
(
targetItem
.
optionsName
,
targetItem
.
optionId
,
targetItem
.
optionLabel
,
value
,
);
await
this
.
fetchBizSceneList
(
value
);
},
},
{
label
:
"业务类型"
,
name
:
"bizSceneCodes"
,
labelRequired
:
true
,
type
:
"select"
,
isClear
:
true
,
multiple
:
true
,
collapseTags
:
true
,
noFilter
:
false
,
noDataText
:
"请先选择试岗门店"
,
optionId
:
"sceneCode"
,
optionLabel
:
"sceneName"
,
optionsName
:
"bizSceneData"
,
changeAttr
:
(
value
)
=>
{
this
.
$set
(
this
.
isAddForm
,
"bizSceneInfo"
,
this
.
buildBizSceneInfo
(
value
),
);
if
(
value
&&
value
.
length
)
{
this
.
$nextTick
(()
=>
{
this
.
clearAddFormValidate
([
"bizSceneCodes"
]);
});
}
},
},
{
label
:
"驻店类型"
,
name
:
"residentType"
,
type
:
"select"
,
isClear
:
true
,
noFilter
:
false
,
optionId
:
"itemValue"
,
optionLabel
:
"itemName"
,
optionsName
:
"residentTypeData"
,
changeAttr
:
(
value
,
targetItem
)
=>
{
this
.
isAddForm
.
residentTypeName
=
this
.
filterAttribute
(
targetItem
.
optionsName
,
targetItem
.
optionId
,
targetItem
.
optionLabel
,
value
,
);
},
},
],
isResolveForm
:
{
processResult
:
""
,
...
...
@@ -226,6 +398,9 @@ export default {
{
confId
:
0
,
confValue
:
"不通过"
},
],
channelData
:
[],
trialStoreData
:
[],
bizSceneData
:
[],
residentTypeData
:
[],
},
};
},
...
...
@@ -247,18 +422,199 @@ export default {
async
fetchOnboardingPlans
()
{
try
{
// 并行请求4个不同类型的数据
const
[
channelData
]
=
await
Promise
.
all
([
const
[
channelData
,
trialStoreData
,
residentTypeData
]
=
await
Promise
.
all
([
getDictList
({
businessCode
:
"recruitment"
,
typeCode
:
"recruitment_channel"
,
}),
getTrialOnboardingStoreList
({
demandId
:
this
.
demandId
,
}),
getDictList
({
businessCode
:
"recruitment"
,
typeCode
:
"store_staff_type"
,
}),
]);
// 处理返回的数据
this
.
baseData
.
channelData
=
channelData
.
list
;
this
.
baseData
.
channelData
=
channelData
.
list
||
[];
this
.
baseData
.
trialStoreData
=
this
.
normalizeListResponse
(
trialStoreData
);
this
.
baseData
.
residentTypeData
=
residentTypeData
.
list
||
[];
this
.
getOptionsList
(
this
,
"isAddFormData"
,
false
);
}
catch
(
error
)
{
console
.
error
(
"获取入职计划数据失败:"
,
error
);
console
.
error
(
"获取失败:"
,
error
);
}
},
formatBizSceneList
(
list
)
{
return
(
list
||
[]).
map
(
item
=>
({
...
item
,
sceneCode
:
item
.
sceneCode
==
null
||
item
.
sceneCode
===
""
?
item
.
sceneCode
:
String
(
item
.
sceneCode
),
}));
},
matchSceneCode
(
code
,
sceneCode
)
{
return
String
(
code
)
===
String
(
sceneCode
);
},
normalizeBizSceneCodes
(
codes
,
list
=
this
.
baseData
.
bizSceneData
)
{
if
(
!
Array
.
isArray
(
codes
)
||
!
list
?.
length
)
return
[];
return
codes
.
map
((
code
)
=>
{
const
matched
=
list
.
find
(
item
=>
this
.
matchSceneCode
(
code
,
item
.
sceneCode
));
return
matched
?
matched
.
sceneCode
:
null
;
})
.
filter
(
Boolean
);
},
setBizSceneCodes
(
codes
,
form
=
this
.
isAddForm
)
{
const
normalizedCodes
=
this
.
normalizeBizSceneCodes
(
codes
,
this
.
baseData
.
bizSceneData
);
const
finalCodes
=
normalizedCodes
.
length
?
[...
normalizedCodes
]
:
(
Array
.
isArray
(
codes
)
?
codes
.
map
(
code
=>
String
(
code
))
:
[]);
this
.
$set
(
form
,
"bizSceneCodes"
,
finalCodes
);
this
.
$set
(
form
,
"bizSceneInfo"
,
this
.
buildBizSceneInfo
(
finalCodes
));
},
clearAddFormValidate
(
fields
=
[])
{
this
.
$nextTick
(()
=>
{
const
form
=
this
.
$refs
.
addResumeDialog
?.
$refs
?.
editFormRef
?.
$refs
?.
editChildRef
;
if
(
!
form
)
return
;
if
(
fields
.
length
)
{
fields
.
forEach
(
field
=>
form
.
clearValidate
(
field
));
}
else
{
form
.
clearValidate
();
}
});
},
openAddDialog
()
{
this
.
addDialogKey
+=
1
;
this
.
isAddVisible
=
true
;
this
.
clearAddFormValidate
();
},
normalizeListResponse
(
res
)
{
if
(
Array
.
isArray
(
res
))
return
res
;
if
(
Array
.
isArray
(
res
?.
data
))
return
res
.
data
;
if
(
Array
.
isArray
(
res
?.
list
))
return
res
.
list
;
return
[];
},
async
fetchBizSceneList
(
storeNo
,
preserveSelected
=
false
,
form
=
this
.
isAddForm
)
{
if
(
!
storeNo
)
{
this
.
baseData
.
bizSceneData
=
[];
this
.
getOptionsList
(
this
,
"isAddFormData"
,
false
,
"bizSceneCodes"
);
if
(
!
preserveSelected
)
{
this
.
setBizSceneCodes
([],
form
);
}
return
;
}
try
{
const
res
=
await
getRecruitmentDemandSubSceneList
({
merchantId
:
storeNo
,
businessType
:
this
.
businessType
,
});
const
list
=
this
.
formatBizSceneList
(
this
.
normalizeListResponse
(
res
));
this
.
baseData
.
bizSceneData
=
list
;
this
.
getOptionsList
(
this
,
"isAddFormData"
,
false
,
"bizSceneCodes"
);
if
(
preserveSelected
)
{
const
normalizedSelected
=
this
.
normalizeBizSceneCodes
(
form
.
bizSceneCodes
,
list
,
);
this
.
setBizSceneCodes
(
normalizedSelected
.
length
?
normalizedSelected
:
list
.
map
(
item
=>
item
.
sceneCode
),
form
,
);
}
else
{
this
.
setBizSceneCodes
(
list
.
map
(
item
=>
item
.
sceneCode
),
form
);
}
}
catch
(
error
)
{
console
.
error
(
"获取业务类型失败:"
,
error
);
this
.
baseData
.
bizSceneData
=
[];
this
.
getOptionsList
(
this
,
"isAddFormData"
,
false
,
"bizSceneCodes"
);
if
(
!
preserveSelected
)
{
this
.
setBizSceneCodes
([],
form
);
}
}
},
buildBizSceneInfo
(
sceneCodes
)
{
if
(
!
Array
.
isArray
(
sceneCodes
)
||
!
sceneCodes
.
length
)
return
[];
return
this
.
baseData
.
bizSceneData
.
filter
(
item
=>
sceneCodes
.
some
(
code
=>
this
.
matchSceneCode
(
code
,
item
.
sceneCode
)))
.
map
(({
sceneCode
,
sceneName
})
=>
({
sceneCode
,
sceneName
,
}));
},
resetAddForm
()
{
this
.
isAddForm
=
{
personName
:
""
,
phoneNumber
:
""
,
trialTime
:
""
,
resumeFileName
:
""
,
channelType
:
""
,
channelName
:
""
,
storeNo
:
""
,
storeName
:
""
,
bizSceneCodes
:
[],
bizSceneInfo
:
[],
residentType
:
""
,
residentTypeName
:
""
,
};
this
.
baseData
.
bizSceneData
=
[];
this
.
getOptionsList
(
this
,
"isAddFormData"
,
false
,
"bizSceneCodes"
);
},
parseBizSceneInfo
(
data
)
{
if
(
!
data
)
return
[];
if
(
typeof
data
.
bizSceneInfo
===
"string"
)
{
try
{
data
.
bizSceneInfo
=
JSON
.
parse
(
data
.
bizSceneInfo
);
}
catch
(
error
)
{
data
.
bizSceneInfo
=
[];
}
}
if
(
!
Array
.
isArray
(
data
.
bizSceneInfo
))
{
data
.
bizSceneInfo
=
data
.
bizSceneInfo
?
[
data
.
bizSceneInfo
]
:
[];
}
return
data
.
bizSceneInfo
;
},
ensureTrialStoreOption
(
data
)
{
if
(
!
data
?.
storeNo
)
return
;
const
storeId
=
data
.
storeNo
;
const
exists
=
this
.
baseData
.
trialStoreData
.
some
(
item
=>
String
(
item
.
merchantId
)
===
String
(
storeId
),
);
if
(
!
exists
)
{
this
.
baseData
.
trialStoreData
=
[
...
this
.
baseData
.
trialStoreData
,
{
merchantId
:
storeId
,
merchantName
:
data
.
storeName
||
String
(
storeId
),
},
];
this
.
getOptionsList
(
this
,
"isAddFormData"
,
false
,
"storeNo"
);
}
const
matchedStore
=
this
.
baseData
.
trialStoreData
.
find
(
item
=>
String
(
item
.
merchantId
)
===
String
(
storeId
),
);
if
(
matchedStore
)
{
data
.
storeNo
=
matchedStore
.
merchantId
;
data
.
storeName
=
data
.
storeName
||
matchedStore
.
merchantName
;
}
},
async
prepareEditForm
(
data
)
{
this
.
parseBizSceneInfo
(
data
);
this
.
$set
(
data
,
"bizSceneCodes"
,
(
data
.
bizSceneInfo
||
[])
.
map
(
item
=>
item
.
sceneCode
)
.
filter
(
code
=>
code
!=
null
&&
code
!==
""
),
);
this
.
ensureTrialStoreOption
(
data
);
if
(
data
.
storeNo
)
{
await
this
.
fetchBizSceneList
(
data
.
storeNo
,
true
,
data
);
}
else
{
this
.
baseData
.
bizSceneData
=
[];
this
.
getOptionsList
(
this
,
"isAddFormData"
,
false
,
"bizSceneCodes"
);
this
.
$set
(
data
,
"bizSceneCodes"
,
[]);
this
.
$set
(
data
,
"bizSceneInfo"
,
[]);
}
},
getOptionsList
(
that
,
formName
,
hasAll
=
true
,
refreshSigle
)
{
...
...
@@ -311,7 +667,7 @@ export default {
},
isAddDialogVisible
()
{
this
.
isAddForm
=
{}
;
this
.
resetAddForm
()
;
this
.
uploadFileList
=
[];
this
.
isAddVisible
=
!
this
.
isAddVisible
;
},
...
...
@@ -335,7 +691,12 @@ export default {
data
.
trialTime
?
(
data
.
trialTime
=
Util
.
dateFormate
(
data
.
trialTime
,
"YYYY-MM-DD"
))
:
""
;
data
.
processResult
=
null
;
data
.
processResult
=
null
;
data
.
bizSceneInfo
=
JSON
.
stringify
(
this
.
buildBizSceneInfo
(
data
.
bizSceneCodes
));
delete
data
.
bizSceneCodes
;
if
(
this
.
isAdd
)
{
data
.
approvalResult
=
1
;
}
this
.
$emit
(
"handleAddConfirm"
,
data
,
this
.
isAdd
,
this
.
index
);
this
.
isAddDialogVisible
();
},
...
...
@@ -351,23 +712,26 @@ export default {
}
this
.
isAdd
=
true
;
this
.
isAddDialogConfig
.
title
=
"新增试岗"
;
this
.
resetAddForm
();
await
this
.
fetchOnboardingPlans
();
this
.
isAddVisible
=
!
this
.
isAddVisible
;
if
(
data
)
{
this
.
isAddForm
=
deepClone
(
data
);
Object
.
assign
(
this
.
isAddForm
,
deepClone
(
data
));
await
this
.
prepareEditForm
(
this
.
isAddForm
);
this
.
checkParams
(
this
.
isAddForm
);
this
.
updateParams
(
this
.
isAddForm
);
}
this
.
openAddDialog
();
},
async
handleEdit
(
data
,
index
)
{
this
.
isAdd
=
false
;
this
.
index
=
index
;
this
.
isAddDialogConfig
.
title
=
"编辑试岗"
;
await
this
.
fetchOnboardingPlans
();
this
.
isAddVisible
=
!
this
.
isAddVisible
;
this
.
isAddForm
=
deepClone
(
data
);
await
this
.
prepareEditForm
(
this
.
isAddForm
);
this
.
checkParams
(
this
.
isAddForm
);
this
.
updateParams
(
this
.
isAddForm
);
this
.
openAddDialog
();
},
handleResolve
(
data
,
index
)
{
this
.
index
=
index
;
...
...
@@ -394,35 +758,61 @@ export default {
if
(
!
data
)
return
;
const
fields
=
[{
typeKey
:
"channelType"
,
dataKey
:
"channelData"
}];
const
fields
=
[
{
typeKey
:
"channelType"
,
dataKey
:
"channelData"
},
{
typeKey
:
"storeNo"
,
dataKey
:
"trialStoreData"
,
optionId
:
"merchantId"
,
optionLabel
:
"merchantName"
},
{
typeKey
:
"residentType"
,
dataKey
:
"residentTypeData"
},
];
fields
.
forEach
((
field
)
=>
{
const
{
typeKey
,
dataKey
}
=
field
;
const
optionId
=
field
.
optionId
||
"itemValue"
;
const
optionLabel
=
field
.
optionLabel
||
"itemName"
;
const
value
=
data
[
typeKey
];
if
(
typeKey
===
"storeNo"
&&
value
)
{
this
.
ensureTrialStoreOption
(
data
);
const
exists
=
(
this
.
baseData
[
dataKey
]
||
[]).
some
(
item
=>
String
(
item
[
optionId
])
===
String
(
value
),
);
if
(
!
exists
)
{
data
[
typeKey
]
=
""
;
}
return
;
}
const
isValid
=
this
.
filterAttribute
(
dataKey
,
"itemValue"
,
"itemName"
,
optionId
,
optionLabel
,
value
,
);
data
[
typeKey
]
=
isValid
?
value
:
""
;
});
if
(
Array
.
isArray
(
data
.
bizSceneCodes
))
{
this
.
$set
(
data
,
"bizSceneCodes"
,
this
.
normalizeBizSceneCodes
(
data
.
bizSceneCodes
,
this
.
baseData
.
bizSceneData
),
);
}
},
updateParams
(
data
)
{
if
(
!
data
)
return
;
const
fieldMap
=
{
channelType
:
"channelName"
,
channelType
:
{
nameKey
:
"channelName"
,
optionId
:
"itemValue"
,
optionLabel
:
"itemName"
},
storeNo
:
{
nameKey
:
"storeName"
,
optionId
:
"merchantId"
,
optionLabel
:
"merchantName"
},
residentType
:
{
nameKey
:
"residentTypeName"
,
optionId
:
"itemValue"
,
optionLabel
:
"itemName"
},
};
Object
.
keys
(
fieldMap
).
forEach
((
typeKey
)
=>
{
const
nameKey
=
fieldMap
[
typeKey
];
const
{
nameKey
,
optionId
,
optionLabel
}
=
fieldMap
[
typeKey
];
if
(
data
[
typeKey
])
{
const
result
=
this
.
filterAttribute
(
this
.
getDataKeyByType
(
typeKey
),
"itemValue"
,
"itemName"
,
optionId
,
optionLabel
,
data
[
typeKey
],
);
data
[
nameKey
]
=
result
||
data
[
nameKey
];
...
...
@@ -433,11 +823,14 @@ export default {
getDataKeyByType
(
typeKey
)
{
const
mapping
=
{
channelType
:
"channelData"
,
storeNo
:
"trialStoreData"
,
residentType
:
"residentTypeData"
,
};
return
mapping
[
typeKey
]
||
""
;
},
filterAttribute
(
optionsName
,
optionId
,
optionLabel
,
value
)
{
let
item
=
this
.
baseData
[
optionsName
].
find
((
item
)
=>
{
const
options
=
this
.
baseData
[
optionsName
]
||
[];
let
item
=
options
.
find
((
item
)
=>
{
return
item
[
optionId
]
==
value
;
});
return
item
?
item
[
optionLabel
]
:
""
;
...
...
@@ -510,10 +903,73 @@ export default {
this
.
$emit
(
"handleViewResult"
,
data
);
},
isPendingTrial
(
item
)
{
return
item
?.
processResult
===
null
return
item
?.
processResult
===
null
;
},
isProcessedTrial
(
item
)
{
return
!
this
.
isPendingTrial
(
item
)
return
!
this
.
isPendingTrial
(
item
);
},
isPendingApproval
(
item
)
{
return
item
?.
approvalResult
===
null
;
},
isTrialApproved
(
item
)
{
return
item
?.
approvalResult
===
1
||
item
?.
approvalResult
===
undefined
;
},
canOperateTrial
(
item
)
{
return
this
.
isTrialApproved
(
item
);
},
handleApprove
(
item
,
index
)
{
this
.
$confirm
(
"通过后当前试岗计划自动开通D+系统账号。确定是否确认?"
,
"提示"
,
{
confirmButtonText
:
"通过"
,
cancelButtonText
:
"取消"
,
type
:
"warning"
,
},
).
then
(()
=>
{
trialOnboardingApproval
({
id
:
item
.
id
,
demandId
:
this
.
demandId
,
approvalResult
:
1
,
}).
then
((
res
)
=>
{
if
(
res
)
{
this
.
$message
.
success
(
"操作成功"
);
this
.
$emit
(
"handleApprovalSuccess"
,
{
index
,
data
:
res
,
});
}
});
}).
catch
(()
=>
{});
},
handleReject
(
item
,
index
)
{
this
.
approvalIndex
=
index
;
this
.
approvalRecord
=
deepClone
(
item
);
this
.
isRejectForm
.
approvalRemark
=
""
;
this
.
isRejectVisible
=
true
;
},
handleRejectClose
()
{
this
.
isRejectVisible
=
false
;
this
.
isRejectForm
.
approvalRemark
=
""
;
this
.
approvalIndex
=
null
;
this
.
approvalRecord
=
{};
},
handleRejectConfirm
(
data
)
{
trialOnboardingApproval
({
id
:
this
.
approvalRecord
.
id
,
demandId
:
this
.
demandId
,
approvalResult
:
0
,
approvalRemark
:
data
.
approvalRemark
,
}).
then
((
res
)
=>
{
if
(
res
)
{
this
.
$message
.
success
(
"操作成功"
);
this
.
$emit
(
"handleApprovalSuccess"
,
{
index
:
this
.
approvalIndex
,
data
:
res
,
});
this
.
handleRejectClose
();
}
});
},
handleDetailClose
()
{
this
.
detailVisible
=
!
this
.
detailVisible
;
...
...
src/views/residentManage/recruitmentManagement/disposeRecruitment.vue
View file @
f76fbad
...
...
@@ -15,9 +15,12 @@
<trialOnboard
ref=
"trialOnboard"
:trialOnboardings=
"detailInfo.trialOnboardings"
:demand-id=
"id"
:businessType=
"detailInfo.businessType"
@
handleAddConfirm=
"handleTrialConfirm"
@
handleWorking=
"handleWorking"
@
handleViewResult=
"handleViewResult"
@
handleViewResult=
"handleViewResult"
@
handleApprovalSuccess=
"handleApprovalSuccess"
:isBtn=
"isBtn"
></trialOnboard>
<!-- 入职计划 -->
...
...
@@ -241,6 +244,10 @@ export default {
this
.
detailInfo
.
trialOnboardings
.
splice
(
index
,
1
)
}
}
},
handleApprovalSuccess
({
index
,
data
})
{
if
(
!
data
||
this
.
detailInfo
.
trialOnboardings
[
index
]
===
undefined
)
return
this
.
$set
(
this
.
detailInfo
.
trialOnboardings
,
index
,
data
)
}
}
}
...
...
src/views/residentManage/recruitmentManagement/index.vue
View file @
f76fbad
...
...
@@ -177,7 +177,7 @@ import {
}
from
"@api/recruitment"
;
import
{
mapActions
,
mapState
}
from
"vuex"
;
import
{
changeTypeOpt
,
connectionFlagOpt
,
connectionFlagOptMap
,
inviteStatusOpt
,
inviteStatusOptMap
,
trialStatusOpt
}
from
"@/common/constants.js"
;
import
{
changeTypeOpt
,
connectionFlagOpt
,
connectionFlagOptMap
,
inviteStatusOpt
,
inviteStatusOptMap
,
trialStatusOpt
,
approvalStatusOpt
}
from
"@/common/constants.js"
;
import
{
deepClone
,
Util
}
from
"@/common/util"
;
import
reportTrackPageMixin
from
"@/mixins/reportTrackPageMixin"
;
...
...
@@ -347,12 +347,19 @@ export default {
prop
:
"technicalSupervisorName"
,
width
:
160
,
},
{
label
:
"所属省市"
,
prop
:
"provinceCity"
,
width
:
160
,
},
{
label
:
"详细地址"
,
prop
:
"merchantAddressDetail"
,
width
:
160
,
},
{
label
:
"主营品牌"
,
prop
:
"brand"
,
width
:
160
,
...
...
@@ -408,6 +415,18 @@ export default {
addHtml
:
"statusHtml"
,
},
{
label
:
"审批状态"
,
prop
:
"approvalStatus"
,
width
:
120
,
formatter
:
(
cellValue
)
=>
{
const
approvalStatusMap
=
{
0
:
"待审批"
,
2
:
"已审批"
,
};
return
approvalStatusMap
[
cellValue
.
approvalStatus
]
||
"-"
;
},
},
{
label
:
"试岗状态"
,
prop
:
"trialStatus"
,
width
:
120
,
...
...
@@ -448,6 +467,7 @@ export default {
technicalSupervisorName
:
""
,
brand
:
""
,
connectionFlag
:
""
,
approvalStatus
:
""
},
showFormData
:
[
{
...
...
@@ -566,6 +586,16 @@ export default {
optionLabel
:
"confValue"
,
optionsName
:
"trialStatusOpt"
,
},
{
label
:
"审批状态"
,
name
:
"approvalStatus"
,
type
:
"select"
,
isClear
:
true
,
optionList
:
[],
optionId
:
"confId"
,
optionLabel
:
"confValue"
,
optionsName
:
"approvalStatusOpt"
,
},
],
baseData
:
{
...
...
@@ -585,6 +615,7 @@ export default {
changeTypeOpt
:
deepClone
(
changeTypeOpt
),
receiverOpt
:
[],
relateMerchantOpt
:
[],
approvalStatusOpt
:
deepClone
(
approvalStatusOpt
)
},
isRejectDialogConfig
:
{
title
:
"驳回"
,
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment