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 49ecdfa3
authored
Apr 07, 2026
by
张立顺
Browse Files
Options
Browse Files
Tag
Download
Plain Diff
Merge branch 'SAAS+V5.7.1' of
http://192.168.3.233:8090/saas_plus/dj-car-life-sy…
…stem into SAAS+V5.7.1
2 parents
4d5977be
8708483d
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
576 additions
and
82 deletions
src/api/usedCarManagement.js
src/router/modules/920_usedCarManagement.js
src/views/residentManage/recruitmentManagement/addRecruitment.vue
src/views/residentManage/recruitmentManagement/index.vue
src/views/usedCarManagement/oneCustomerOneGroup/components/GroupChatDialog.vue
src/views/usedCarManagement/oneCustomerOneGroup/components/OneCustomerGroupTab.vue
src/views/usedCarManagement/oneCustomerOneGroup/components/StoreConfigTab.vue
src/views/usedCarManagement/oneCustomerOneGroup/components/WecomGroupTab.vue
src/views/usedCarManagement/oneCustomerOneGroup/createGroupCode.vue
src/views/usedCarManagement/oneCustomerOneGroup/index.vue
src/api/usedCarManagement.js
View file @
49ecdfa
...
...
@@ -472,8 +472,52 @@ export function updateLiveCode(data) {
});
}
/**
* 一客一群 - 活码配置删除
*/
export
function
deleteLiveCode
(
data
)
{
return
gscPost
(
"/liveCode/delete"
,
data
,
{
returnAll
:
true
,
});
}
/**
* 一客一群 - 活码配置详情
*/
export
function
getLiveCodeDetail
(
data
)
{
return
gscPost
(
"/liveCode/details"
,
data
);
}
/**
* 4S店配置分页
*/
export
function
getStoreConfigPage
(
data
)
{
return
gscPost
(
"/storeConfig/page"
,
data
);
}
/**
* 一客一群 - 总部定价师列表
*/
export
function
getPricingStaffList
(
data
)
{
return
gscPost
(
"/staff/pricingStaff/list"
,
data
);
}
/**
* 一客一群 - 4S店配置新增
*/
export
function
addStoreConfig
(
data
)
{
return
gscPost
(
"/storeConfig/create"
,
data
,
{
returnAll
:
true
,
});
}
/**
* 一客一群 - 4S店配置编辑
*/
export
function
updateStoreConfig
(
data
)
{
return
gscPost
(
"/storeConfig/edit"
,
data
,
{
returnAll
:
true
,
});
}
/**
* 一客一群 - 4S店配置删除
*/
export
function
deleteStoreConfig
(
data
)
{
return
gscPost
(
"/storeConfig/delete"
,
data
,
{
returnAll
:
true
,
});
}
src/router/modules/920_usedCarManagement.js
View file @
49ecdfa
...
...
@@ -538,6 +538,12 @@ export const routerName = {
type
:
"primary"
,
handle
:
"handleEditConfig"
,
},
{
authId
:
"9201008"
,
parentId
:
"92010"
,
label
:
"修改配置"
,
handle
:
"handleEditConfig"
,
}
],
component
:
_import
(
"usedCarManagement/oneCustomerOneGroup/index"
),
},
...
...
src/views/residentManage/recruitmentManagement/addRecruitment.vue
View file @
49ecdfa
...
...
@@ -441,15 +441,14 @@ export default {
this
.
$refs
[
this
.
editChildRef
]
&&
this
.
$refs
[
this
.
editChildRef
].
$refs
.
form
.
clearValidate
();
},
handleSelectProvince
(
val
)
{
this
.
addForm
.
provinceC
ityC
ode
=
val
.
provinceCode
;
this
.
addForm
.
provinceCode
=
val
.
provinceCode
;
this
.
addForm
.
province
=
val
.
provinceName
;
this
.
addForm
.
cityCode
=
""
;
this
.
addForm
.
cityName
=
""
;
this
.
addForm
.
merchantAddress
=
val
.
provinceName
;
},
handleSelectCity
(
val
)
{
this
.
addForm
.
provinceCityCode
=
`
${
this
.
addForm
.
provinceCityCode
}
/
${
val
.
cityCode
}
`
;
// this.addForm.cityName = val.cityName;
this
.
addForm
.
provinceCityCode
=
this
.
addForm
.
provinceCode
+
"/"
+
val
.
cityCode
;
this
.
addForm
.
merchantAddress
=
this
.
addForm
.
province
+
""
+
val
.
cityName
;
},
handleSave
()
{
...
...
src/views/residentManage/recruitmentManagement/index.vue
View file @
49ecdfa
...
...
@@ -196,6 +196,7 @@ export default {
optionId
:
"confId"
,
optionLabel
:
"confValue"
,
optionsName
:
"changeTypeOpt"
,
handleRadioChange
:
()
=>
{},
},
{
label
:
"接收人"
,
...
...
@@ -206,6 +207,7 @@ export default {
optionId
:
"receiverUuid"
,
optionLabel
:
"receiverName"
,
optionsName
:
"receiverOpt"
,
},
{
label
:
""
,
...
...
@@ -319,6 +321,11 @@ export default {
width
:
160
,
},
{
label
:
"主营品牌"
,
prop
:
"brand"
,
width
:
160
,
},
{
label
:
"投递简历数"
,
prop
:
"allOfResume"
,
width
:
160
,
...
...
@@ -656,6 +663,9 @@ export default {
receiverName
:
receiver
?
receiver
.
receiverName
:
""
,
ids
:
this
.
selectedRows
.
map
(
row
=>
row
.
id
),
};
if
(
data
.
changeType
!=
1
)
{
params
.
receiverPhone
=
receiver
?
receiver
.
receiverPhone
:
""
;
}
batchChangeRecruitment
(
params
).
then
((
res
)
=>
{
this
.
$message
.
success
(
"操作成功"
);
this
.
isBatchChangeVisible
=
false
;
...
...
@@ -769,7 +779,7 @@ export default {
return
{
receiverUuid
:
item
.
uuid
,
receiverName
:
item
.
staffName
,
receiverPhone
:
item
.
receiver
Phone
,
receiverPhone
:
item
.
staff
Phone
,
};
});
this
.
getOptionsList
(
this
,
"showFormData"
,
true
);
...
...
src/views/usedCarManagement/oneCustomerOneGroup/components/GroupChatDialog.vue
View file @
49ecdfa
...
...
@@ -27,6 +27,7 @@
:table-params=
"tableParams"
:has-page=
"false"
:has-num=
"false"
:selectable-fn=
"checkSelectable"
max-height=
"400px"
@
selectionTable=
"handleSelectionChange"
/>
...
...
@@ -90,11 +91,13 @@ export default {
},
created
()
{
this
.
searchFormSearch
=
{
...
this
.
searchForm
};
this
.
selectedGroups
=
[...
this
.
selectedData
];
this
.
fetchGroupList
();
},
methods
:
{
handleSearch
()
{
this
.
searchFormSearch
=
{
...
this
.
searchForm
};
this
.
selectedGroups
=
this
.
getMutiDate
();
this
.
fetchGroupList
();
},
fetchGroupList
()
{
...
...
@@ -106,40 +109,69 @@ export default {
getGroupChatList
(
params
)
.
then
((
res
)
=>
{
this
.
groupChatList
=
res
;
this
.
echoSelection
(
);
this
.
recoverySelection
(
res
);
})
.
finally
(()
=>
{
this
.
loading
=
false
;
});
},
echoSelection
()
{
if
(
!
this
.
selectedData
||
!
this
.
selectedData
.
length
)
return
;
this
.
selectedGroups
=
[...
this
.
selectedData
];
recoverySelection
(
list
)
{
this
.
$nextTick
(()
=>
{
const
exitIds
=
this
.
selectedData
.
map
((
item
)
=>
item
.
groupChatId
);
this
.
groupChatList
.
forEach
((
item
)
=>
{
if
(
exitIds
.
includes
(
item
.
groupChatId
))
{
this
.
$refs
.
groupTable
&&
if
(
this
.
selectedGroups
.
length
)
{
this
.
selectedGroups
.
forEach
((
row
)
=>
{
const
obj
=
this
.
groupChatList
.
find
(
(
item
)
=>
item
.
groupChatId
==
row
.
groupChatId
);
obj
&&
this
.
$refs
.
groupTable
.
$refs
[
this
.
tableParams
.
mutiSelectName
+
"MutiTable"
]
&&
this
.
$refs
.
groupTable
.
$refs
[
this
.
tableParams
.
mutiSelectName
+
"MutiTable"
].
toggleRowSelection
(
item
,
true
);
}
});
].
toggleRowSelection
(
obj
,
true
);
});
}
});
},
handleSelectionChange
(
val
)
{
this
.
selectedGroups
=
val
;
getMutiDate
()
{
let
selectedData
=
this
.
$refs
.
groupTable
.
mutiSelectArr
[
this
.
tableParams
.
mutiSelectName
]
||
[];
let
deleteIds
=
[];
this
.
selectedGroups
.
forEach
((
item
)
=>
{
if
(
!
this
.
groupChatList
.
map
((
k
)
=>
k
.
groupChatId
)
.
includes
(
item
.
groupChatId
)
&&
!
selectedData
.
map
((
k
)
=>
k
.
groupChatId
).
includes
(
item
.
groupChatId
)
)
{
selectedData
.
push
(
item
);
}
if
(
selectedData
?.
map
((
k
)
=>
k
.
groupChatId
).
includes
(
item
.
groupChatId
)
&&
!
selectedData
?.
map
((
k
)
=>
k
.
groupChatId
).
includes
(
item
.
groupChatId
)
)
{
deleteIds
.
push
(
item
.
groupChatId
);
}
});
deleteIds
.
forEach
((
item
)
=>
{
const
idx
=
selectedData
.
findIndex
((
k
)
=>
k
.
groupChatId
==
item
.
groupChatId
);
if
(
idx
!==
-
1
)
{
selectedData
.
splice
(
idx
,
1
);
}
});
return
selectedData
;
},
handleSelectionChange
(
val
)
{},
confirmGroupSelection
()
{
this
.
selectedGroups
=
this
.
getMutiDate
();
this
.
$emit
(
"confirm"
,
this
.
selectedGroups
);
this
.
$emit
(
"close"
);
},
handleDialogClose
()
{
this
.
$emit
(
"close"
);
},
checkSelectable
(
row
)
{
return
!
row
.
disabled
;
},
},
};
</
script
>
...
...
src/views/usedCarManagement/oneCustomerOneGroup/components/OneCustomerGroupTab.vue
View file @
49ecdfa
...
...
@@ -35,7 +35,8 @@
:table-params=
"tableParams"
:get-list-api=
"getListApi"
:before-search-fn=
"beforeSearchFn"
:selectable-fn=
"selectableFn"
@
selectionTable=
"handleSelectionTable"
@
setTableFinishFun=
"setTableFinishFun"
>
<
template
slot=
"remark"
slot-scope=
"scope"
>
<el-tooltip
...
...
@@ -66,7 +67,8 @@
</template>
<
script
>
import
{
getLiveCodePage
}
from
"@/api/usedCarManagement"
;
import
{
deepClone
}
from
"@/common/util"
;
import
{
getLiveCodePage
,
deleteLiveCode
}
from
"@/api/usedCarManagement"
;
export
default
{
name
:
"OneCustomerGroupTab"
,
data
()
{
...
...
@@ -100,11 +102,14 @@ export default {
maxLength
:
50
,
},
],
selectedList
:
[],
getListApi
:
getLiveCodePage
,
tableParams
:
{
btnId
:
new
Date
().
getTime
()
+
parseInt
(
Math
.
random
()
*
1000
),
listName
:
"records"
,
tableOption
:
true
,
mutiSelectUniqueKey
:
"id"
,
mutiSelectName
:
"recordsMutiTable"
,
tableColumns
:
[
{
label
:
"活码名称"
,
prop
:
"liveName"
,
minWidth
:
"150"
},
{
label
:
"备注"
,
prop
:
"remark"
,
minWidth
:
"120"
,
addHtml
:
"remark"
},
...
...
@@ -129,12 +134,36 @@ export default {
beforeSearchFn
()
{
return
new
Promise
((
resolve
)
=>
{
this
.
searchFormSearch
=
{
...
this
.
searchForm
};
let
selectedData
=
this
.
$refs
?.
recordTable
?.
mutiSelectArr
[
this
.
tableParams
.
mutiSelectName
]
||
[];
const
list
=
this
.
$refs
.
recordTable
.
data
||
[];
let
deleteIds
=
[];
this
.
selectedList
.
forEach
((
item
)
=>
{
if
(
!
list
?.
map
((
k
)
=>
k
.
id
).
includes
(
item
.
id
)
&&
!
selectedData
?.
map
((
k
)
=>
k
.
id
).
includes
(
item
.
id
)
)
{
selectedData
.
push
(
item
);
}
if
(
list
?.
map
((
k
)
=>
k
.
id
).
includes
(
item
.
id
)
&&
!
selectedData
?.
map
((
k
)
=>
k
.
id
).
includes
(
item
.
id
)
)
{
deleteIds
.
push
(
item
.
id
);
}
});
deleteIds
.
forEach
((
item
)
=>
{
const
idx
=
selectedData
.
findIndex
((
k
)
=>
k
.
id
==
item
);
if
(
idx
!==
-
1
)
{
selectedData
.
splice
(
idx
,
1
);
}
});
this
.
selectedList
=
deepClone
(
selectedData
);
resolve
();
});
},
selectableFn
(
row
)
{
return
true
;
},
handleReset
()
{
this
.
searchForm
=
{
liveName
:
""
,
...
...
@@ -142,6 +171,7 @@ export default {
createdBy
:
""
,
};
this
.
searchFormSearch
=
{
...
this
.
searchForm
};
this
.
clearMutiSelect
=
true
;
this
.
$refs
.
recordTable
.
refreshTable
(
true
,
true
);
},
handleEditGroupCode
(
row
)
{
...
...
@@ -156,11 +186,33 @@ export default {
query
,
});
},
handleBatchDelete
()
{
this
.
$message
.
info
(
"点击了批量删除"
);
handleSelectionTable
()
{},
setTableFinishFun
(
data
)
{
this
.
$nextTick
(()
=>
{
if
(
this
.
clearMutiSelect
)
{
this
.
selectedList
=
[];
this
.
clearMutiSelect
=
false
;
this
.
$refs
.
recordTable
.
$refs
[
this
.
tableParams
.
mutiSelectName
+
"MutiTable"
].
clearSelection
();
}
this
.
recoverySelection
(
data
);
});
},
handleSelectionChange
(
val
)
{
console
.
log
(
"selection"
,
val
);
recoverySelection
(
list
)
{
if
(
this
.
selectedList
.
length
)
{
this
.
selectedList
.
forEach
((
row
)
=>
{
const
obj
=
this
.
$refs
.
recordTable
.
data
.
find
(
(
item
)
=>
item
.
id
==
row
.
id
);
obj
&&
this
.
$refs
.
recordTable
.
$refs
[
this
.
tableParams
.
mutiSelectName
+
"MutiTable"
].
toggleRowSelection
(
obj
,
true
);
});
}
},
handleDownload
(
row
)
{
if
(
!
row
.
defaultQrCodeUrl
)
{
...
...
@@ -174,8 +226,83 @@ export default {
document
.
body
.
appendChild
(
a
);
a
.
click
();
},
getMutiDate
()
{
console
.
log
(
this
.
$refs
.
recordTable
);
let
selectedData
=
this
.
$refs
.
recordTable
.
mutiSelectArr
[
this
.
tableParams
.
mutiSelectName
]
||
[];
let
deleteIds
=
[];
this
.
selectedList
.
forEach
((
item
)
=>
{
if
(
!
this
.
$refs
.
recordTable
.
data
.
map
((
k
)
=>
k
.
id
).
includes
(
item
.
id
)
&&
!
selectedData
.
map
((
k
)
=>
k
.
id
).
includes
(
item
.
id
)
)
{
selectedData
.
push
(
item
);
}
if
(
selectedData
?.
map
((
k
)
=>
k
.
id
).
includes
(
item
.
id
)
&&
!
selectedData
?.
map
((
k
)
=>
k
.
id
).
includes
(
item
.
id
)
)
{
deleteIds
.
push
(
item
.
id
);
}
});
deleteIds
.
forEach
((
item
)
=>
{
const
idx
=
selectedData
.
findIndex
((
k
)
=>
k
.
id
==
item
);
if
(
idx
!==
-
1
)
{
selectedData
.
splice
(
idx
,
1
);
}
});
return
selectedData
;
},
executeDeleteAction
(
params
)
{
deleteLiveCode
(
params
).
then
((
res
)
=>
{
let
{
code
,
msg
}
=
res
.
data
;
code
==
0
?
this
.
$message
.
success
(
"操作成功"
)
:
this
.
$message
.
error
(
msg
||
"操作失败"
);
if
(
code
==
0
)
{
this
.
clearMutiSelect
=
true
;
this
.
$refs
.
recordTable
.
refreshTable
(
true
,
true
);
}
});
},
handleDelete
(
row
)
{
this
.
$message
.
info
(
"点击了删除: "
+
row
.
id
);
this
.
$confirm
(
"是否执行此次操作"
,
"删除提示"
,
{
confirmButtonText
:
"确定"
,
cancelButtonText
:
"取消"
,
type
:
"warning"
,
closeOnClickModal
:
false
,
})
.
then
(()
=>
{
this
.
executeDeleteAction
({
ids
:
[
row
.
id
]
});
})
.
catch
((
err
)
=>
{
console
.
log
(
err
);
});
},
handleBatchDelete
()
{
this
.
selectedList
=
this
.
getMutiDate
();
if
(
this
.
selectedList
.
length
==
0
)
{
this
.
$message
.
error
(
"请选择要删除的群"
);
return
;
}
console
.
log
(
this
.
selectedList
);
this
.
$confirm
(
"是否执行此次操作"
,
"批量删除提示"
,
{
confirmButtonText
:
"确定"
,
cancelButtonText
:
"取消"
,
type
:
"warning"
,
closeOnClickModal
:
false
,
})
.
then
(()
=>
{
this
.
executeDeleteAction
({
ids
:
this
.
selectedList
.
map
((
item
)
=>
item
.
id
),
});
})
.
catch
((
err
)
=>
{
console
.
log
(
err
);
});
},
},
};
...
...
src/views/usedCarManagement/oneCustomerOneGroup/components/StoreConfigTab.vue
View file @
49ecdfa
<
template
>
<div
class=
"store-config-tab"
>
<el-empty
description=
"4S店配置 - 开发中"
></el-empty>
</div>
<d2-container
class=
"container"
>
<template
#
header
>
<div
class=
"header"
>
<d2-search
ref=
"showSearch"
class=
"show-search"
:search-form=
"searchForm"
:form-data=
"showFormData"
label-width=
"100px"
/>
<div
class=
"up-btns"
>
<el-button
:id=
"tableParams.btnId"
size=
"small"
type=
"primary"
>
查询
</el-button>
<el-button
size=
"small"
@
click=
"handleReset"
>
重置
</el-button>
</div>
</div>
</
template
>
<div
class=
"d2-container-content"
>
<d2-table-header
:left-span=
"12"
>
<span
slot=
"left"
class=
"title"
>
群列表
</span>
<span
style=
"display: inline-block; margin-right: 10px"
>
<auth-button
category=
"Button"
:show-btn-ids=
"['9201007']"
/>
</span>
</d2-table-header>
<d2-table
ref=
"recordTable"
:search-form=
"{
t: searchFormSearch,
}"
:table-params=
"tableParams"
:get-list-api=
"getListApi"
:before-search-fn=
"beforeSearchFn"
>
<
template
#
auth-button=
"scope"
>
<div
width=
"400"
>
<span
style=
"margin-right: 10px"
>
<auth-button
:data=
"scope.scope"
:show-btn-ids=
"['9201008']"
/>
</span>
<span>
<auth-button
:data=
"scope.scope"
:show-btn-ids=
"['9201005']"
/>
</span>
</div>
</
template
>
</d2-table>
</div>
<glsk-form-dialog
v-if=
"dialogVisible"
:selectVisible=
"dialogVisible"
:dialogConfig=
"dialogConfig"
label-width=
"150px"
defaultWidth=
"400px"
:editData=
"editData"
:editFormData=
"editFormData"
:formRules=
"formRules"
:baseData=
"baseData"
:slotArr=
"slotArr"
@
handleClose=
"handleDialogClose"
@
handleConfirm=
"handleDialogConfirm"
>
<
template
slot=
"pricingSpecialistTips"
>
<div
style=
"font-size: 14px; color: #999; margin: -10px 0 10px 150px;"
>
此配置用于决定该4S店收取的线索默认分配给哪位总部定价师。
</div>
</
template
>
</glsk-form-dialog>
</d2-container>
</template>
<
script
>
import
{
getStoreConfigPage
,
getCarDealerList
,
getPricingStaffList
,
addStoreConfig
,
updateStoreConfig
,
deleteStoreConfig
}
from
"@/api/usedCarManagement"
;
export
default
{
name
:
"StoreConfigTab"
,
data
()
{
return
{
slotArr
:
[
"pricingSpecialistTips"
],
searchForm
:
{
storeName
:
""
,
pricingSpecialistName
:
""
,
},
searchFormSearch
:
{},
showFormData
:
[
{
label
:
"4S店名称"
,
name
:
"storeName"
,
type
:
"input"
,
placeholder
:
"请输入4S店名称"
,
maxLength
:
50
,
},
{
label
:
"定价师"
,
name
:
"pricingSpecialistName"
,
type
:
"input"
,
placeholder
:
"请输入定价师"
,
maxLength
:
50
,
},
],
getListApi
:
getStoreConfigPage
,
tableParams
:
{
btnId
:
new
Date
().
getTime
()
+
parseInt
(
Math
.
random
()
*
1000
),
listName
:
"records"
,
tableOption
:
true
,
tableColumns
:
[
{
label
:
"4S店名称"
,
prop
:
"storeName"
,
minWidth
:
"150"
},
{
label
:
"总部定价师"
,
prop
:
"pricingSpecialistName"
,
minWidth
:
"160"
,
},
{
label
:
"操作人"
,
prop
:
"updatedBy"
,
width
:
"160"
},
{
label
:
"操作时间"
,
prop
:
"updatedDate"
,
width
:
"168"
},
],
},
dialogVisible
:
false
,
dialogConfig
:
{
title
:
"新增配置"
,
okText
:
"确定"
,
cancelText
:
"取消"
,
},
formRules
:
{
storeId
:
[{
required
:
true
,
message
:
"请选择4S店名称"
,
trigger
:
"change"
}],
pricingSpecialistId
:
[{
required
:
true
,
message
:
"请选择关联总部定价师"
,
trigger
:
"change"
}],
},
editData
:
{
storeId
:
""
,
storeName
:
""
,
pricingSpecialistId
:
""
,
pricingSpecialistName
:
""
,
staffPhone
:
""
,
},
baseData
:
{
storeList
:
[],
staffList
:
[],
},
editFormData
:
[
{
label
:
"4S店名称"
,
name
:
"storeId"
,
type
:
"select"
,
placeholder
:
"请选择4S店名称"
,
filterable
:
true
,
optionsName
:
"storeList"
,
optionId
:
"mainMerchantId"
,
optionLabel
:
"mainMerchantName"
,
optionList
:
[],
changeAttr
:
(
val
,
targetItem
)
=>
{
const
target
=
this
.
baseData
.
storeList
.
find
((
item
)
=>
item
.
mainMerchantId
==
val
);
this
.
editData
.
storeName
=
target
?
target
.
mainMerchantName
:
""
;
},
},
{
label
:
"关联总部定价师"
,
name
:
"pricingSpecialistId"
,
type
:
"select"
,
placeholder
:
"请选择关联总部定价师"
,
filterable
:
true
,
optionsName
:
"staffList"
,
optionId
:
"uuid"
,
optionLabel
:
"staffName"
,
optionList
:
[],
changeAttr
:
(
val
,
targetItem
)
=>
{
const
target
=
this
.
baseData
.
staffList
.
find
((
item
)
=>
item
.
uuid
==
val
);
this
.
editData
.
pricingSpecialistName
=
target
?.
staffName
||
""
;
this
.
editData
.
staffPhone
=
target
?.
staffPhone
||
""
;
}
},
{
label
:
""
,
name
:
"pricingSpecialistTips"
,
addHtml
:
"pricingSpecialistTips"
}
],
};
},
methods
:
{
validateOption
(
val
,
list
,
keyField
,
clearFields
)
{
if
(
!
val
)
return
;
const
exists
=
list
.
some
(
item
=>
item
[
keyField
]
==
val
);
if
(
!
exists
)
{
clearFields
.
forEach
(
field
=>
{
this
.
editData
[
field
]
=
""
;
});
}
},
validateConfiguredOptions
()
{
if
(
!
this
.
editData
.
id
)
return
;
// 校验 4S店 是否存在于下拉列表中
this
.
validateOption
(
this
.
editData
.
storeId
,
this
.
baseData
.
storeList
,
"mainMerchantId"
,
[
"storeId"
,
"storeName"
]);
// 校验 总部定价师 是否存在于下拉列表中
this
.
validateOption
(
this
.
editData
.
pricingSpecialistId
,
this
.
baseData
.
staffList
,
"uuid"
,
[
"pricingSpecialistId"
,
"pricingSpecialistName"
,
"staffPhone"
]);
},
fetchOptions
()
{
const
p1
=
getCarDealerList
({}).
then
((
res
)
=>
{
this
.
baseData
.
storeList
=
res
||
[];
const
storeItem
=
this
.
editFormData
.
find
(
item
=>
item
.
name
===
'storeId'
);
if
(
storeItem
)
{
storeItem
.
optionList
=
this
.
baseData
.
storeList
;
}
});
const
p2
=
getPricingStaffList
({}).
then
((
res
)
=>
{
// 为选项拼接手机号
this
.
baseData
.
staffList
=
(
res
||
[]).
map
(
item
=>
{
return
{
...
item
,
staffNameLabel
:
item
.
staffName
+
(
item
.
staffPhone
?
`(
${
item
.
staffPhone
}
)`
:
''
)
};
});
// 替换 label 为拼接后的字段
const
staffItem
=
this
.
editFormData
.
find
(
item
=>
item
.
name
===
'pricingSpecialistId'
);
if
(
staffItem
)
{
staffItem
.
optionLabel
=
'staffNameLabel'
;
staffItem
.
optionList
=
this
.
baseData
.
staffList
;
}
});
return
Promise
.
all
([
p1
,
p2
]);
},
beforeSearchFn
()
{
return
new
Promise
((
resolve
)
=>
{
this
.
searchFormSearch
=
{
...
this
.
searchForm
};
resolve
();
});
},
handleReset
()
{
this
.
searchForm
=
{
storeName
:
""
,
pricingSpecialistName
:
""
,
};
this
.
searchFormSearch
=
{
...
this
.
searchForm
};
this
.
$refs
.
recordTable
.
refreshTable
(
true
,
true
);
},
handleEditConfig
(
row
)
{
const
isEdit
=
row
?.
id
;
this
.
dialogConfig
.
title
=
isEdit
?
"修改配置"
:
"新增配置"
;
this
.
editData
=
{
...(
isEdit
&&
{
id
:
row
.
id
}),
storeId
:
isEdit
?
String
(
row
.
storeId
||
""
)
:
""
,
storeName
:
row
?.
storeName
||
""
,
pricingSpecialistId
:
row
?.
pricingSpecialistId
||
""
,
pricingSpecialistName
:
row
?.
pricingSpecialistName
||
""
,
staffPhone
:
row
?.
staffPhone
||
""
,
};
this
.
fetchOptions
().
then
(()
=>
{
this
.
validateConfiguredOptions
();
this
.
dialogVisible
=
true
;
});
},
handleDialogClose
()
{
this
.
dialogVisible
=
false
;
},
handleDialogConfirm
()
{
const
params
=
{
...
this
.
editData
};
const
isEdit
=
!!
params
.
id
;
const
apiFunc
=
isEdit
?
updateStoreConfig
:
addStoreConfig
;
apiFunc
(
params
).
then
((
res
)
=>
{
let
{
code
,
msg
}
=
res
.
data
;
code
==
0
?
this
.
$message
.
success
(
"操作成功"
)
:
this
.
$message
.
error
(
msg
||
"操作失败"
);
if
(
code
==
0
)
{
this
.
handleDialogClose
();
this
.
$refs
.
recordTable
.
refreshTable
(
true
,
true
);
}
});
},
handleDelete
(
row
)
{
this
.
$confirm
(
"是否执行此次操作"
,
"删除提示"
,
{
confirmButtonText
:
"确定"
,
cancelButtonText
:
"取消"
,
type
:
"warning"
,
closeOnClickModal
:
false
,
})
.
then
(()
=>
{
deleteStoreConfig
({
id
:
row
.
id
}).
then
((
res
)
=>
{
let
{
code
,
msg
}
=
res
.
data
;
code
==
0
?
this
.
$message
.
success
(
"操作成功"
)
:
this
.
$message
.
error
(
msg
||
"操作失败"
);
if
(
code
==
0
)
{
this
.
$refs
.
recordTable
.
refreshTable
(
true
,
true
);
}
});
})
.
catch
((
err
)
=>
{
console
.
log
(
err
);
});
},
},
};
</
script
>
<
style
lang=
"scss"
scoped
>
.store-config-tab
{
background
:
#fff
;
padding
:
40px
;
border-radius
:
4px
;
.container
{
margin-top
:
88px
;
.title
{
color
:
#333333
;
font-size
:
16px
;
}
}
</
style
>
src/views/usedCarManagement/oneCustomerOneGroup/components/WecomGroupTab.vue
deleted
100644 → 0
View file @
4d5977b
<
template
>
<div
class=
"wecom-group-tab"
>
<el-empty
description=
"企微群管理 - 开发中"
></el-empty>
</div>
</
template
>
<
script
>
export
default
{
name
:
"WecomGroupTab"
,
};
</
script
>
<
style
lang=
"scss"
scoped
>
.wecom-group-tab
{
background
:
#fff
;
padding
:
40px
;
border-radius
:
4px
;
}
</
style
>
src/views/usedCarManagement/oneCustomerOneGroup/createGroupCode.vue
View file @
49ecdfa
...
...
@@ -75,7 +75,7 @@
<el-tag
v-for=
"(group, index) in editData.groupChatIds"
:key=
"index"
closable
:closable=
"!group.disabled"
@
close=
"handleRemoveGroup(index)"
style=
"margin-right: 10px; margin-bottom: 10px"
>
...
...
@@ -111,7 +111,7 @@ import {
getCarDealerList
,
addLiveCode
,
updateLiveCode
,
getLiveCodeDetail
,
getLiveCodeDetail
}
from
"@/api/usedCarManagement"
;
import
GroupChatDialog
from
"./components/GroupChatDialog.vue"
;
...
...
@@ -214,14 +214,27 @@ export default {
},
mounted
()
{
const
{
optType
,
id
}
=
this
.
$route
.
query
;
const
promises
=
[
this
.
getStoreList
()];
if
(
optType
===
"update"
)
{
this
.
getDetail
(
id
);
promises
.
push
(
this
.
getDetail
(
id
)
);
}
this
.
getStoreList
();
Promise
.
all
(
promises
).
then
(()
=>
{
if
(
optType
===
"update"
&&
this
.
editData
.
storeId
)
{
const
storeExists
=
this
.
baseData
.
storeList
.
some
(
(
item
)
=>
item
.
mainMerchantId
==
this
.
editData
.
storeId
);
if
(
!
storeExists
)
{
this
.
editData
.
storeId
=
""
;
this
.
editData
.
storeName
=
""
;
}
}
});
},
methods
:
{
getDetail
(
id
)
{
getLiveCodeDetail
({
id
}).
then
((
res
)
=>
{
return
getLiveCodeDetail
({
id
}).
then
((
res
)
=>
{
const
data
=
res
||
{};
const
groupChatIds
=
deepClone
(
data
.
groupList
||
[]);
const
deteleAttrList
=
[
"groupList"
,
"groupCount"
,
"idleGroupCount"
];
...
...
@@ -284,7 +297,7 @@ export default {
console
.
log
(
this
.
baseFormData
,
"----"
);
},
getStoreList
()
{
getCarDealerList
().
then
((
res
)
=>
{
return
getCarDealerList
().
then
((
res
)
=>
{
this
.
baseData
.
storeList
=
res
||
[];
console
.
log
(
this
.
baseData
.
storeList
);
this
.
getOptionsList
(
"baseFormData"
,
false
,
"storeId"
);
...
...
src/views/usedCarManagement/oneCustomerOneGroup/index.vue
View file @
49ecdfa
<
template
>
<div
class=
"one-customer-one-group"
>
<el-tabs
v-model=
"activeName"
class=
"custom-tabs"
@
tab-click=
"handleClick"
>
<el-tab-pane
v-for=
"(item, index) in tabPaneList"
:key=
"index"
:label=
"item.label"
:name=
"item.name"
>
</el-tab-pane>
</el-tabs>
<TipsBox
:tips=
"tabPaneList[activeIdx].tips"
/>
<div
style=
"margin-right: 5px;"
>
<el-tabs
v-model=
"activeName"
class=
"custom-tabs"
@
tab-click=
"handleClick"
>
<el-tab-pane
v-for=
"(item, index) in tabPaneList"
:key=
"index"
:label=
"item.label"
:name=
"item.name"
>
</el-tab-pane>
</el-tabs>
<TipsBox
:tips=
"tabPaneList[activeIdx].tips"
/>
</div>
<OneCustomerGroupTab
v-if=
"activeName === 'oneCustomerGroup'"
/>
<WecomGroupTab
v-if=
"activeName === 'wecomGroup'"
/>
<StoreConfigTab
v-if=
"activeName === 'storeConfig'"
/>
</div>
</
template
>
<
script
>
import
OneCustomerGroupTab
from
"./components/OneCustomerGroupTab.vue"
;
import
WecomGroupTab
from
"./components/WecomGroupTab.vue"
;
import
StoreConfigTab
from
"./components/StoreConfigTab.vue"
;
import
TipsBox
from
"./components/TipsBox.vue"
;
...
...
@@ -26,7 +26,6 @@ export default {
name
:
"OneCustomerOneGroup"
,
components
:
{
OneCustomerGroupTab
,
WecomGroupTab
,
StoreConfigTab
,
TipsBox
,
},
...
...
@@ -39,16 +38,10 @@ export default {
label
:
"一客一群"
,
name
:
"oneCustomerGroup"
,
tips
:
[
"1、可将多个群二维码组合生成一个活码,当客户扫码进群后即与该群产生绑定,不会在接待新的客户入群。你好!欢迎使用企微魔方功能。"
,
"2、如群码内设置的可用群聊不足时,可使用自动创群功能自动创建群聊并填充至对应活码中。"
,
"可将多个群二维码组合生成一个活码,当客户扫码进群后即与该群产生绑定,不会在接待新的客户入群。"
,
],
},
{
label
:
"企微群管理"
,
name
:
"wecomGroup"
,
tips
:
[
"管理企微已新建群数据,并支持手动释放企微群。"
],
},
{
label
:
"4S店配置"
,
name
:
"storeConfig"
,
tips
:
[
...
...
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