Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas
/
scrm-micro-shop
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 d1f55f8c
authored
Apr 26, 2024
by
前端
Browse Files
Options
Browse Files
Tag
Download
Plain Diff
Merge branch 'v4.38.1-0422' into 'master'
上线合并 See merge request
!10
2 parents
ffaa29d3
e3c7ac11
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
72 additions
and
9 deletions
src/api/modules/customer.js
src/views/customerManage/editCustomer.vue
src/api/modules/customer.js
View file @
d1f55f8
...
@@ -118,4 +118,16 @@ const getInviteCode = params => {
...
@@ -118,4 +118,16 @@ const getInviteCode = params => {
sign
:
true
sign
:
true
})
})
}
}
export
default
{
getList
,
getServiceCenterList
,
getReviewList
,
getMerchantInfo
,
createMerchant
,
updateMerchant
,
findProByScene
,
getSceneProStatus
,
getStaffList
,
getInviteCode
}
// 根据4s店或者园区店查询员工信息
const
getResidentStaffList
=
params
=>
{
params
.
method
=
`scrm.api.boutiquecoupon.rop.router.twoCityTale`
params
.
routerMethod
=
'dj.api.smartcarlife.merchant.staff.list'
return
http
({
url
:
'rop-scrm-boutiquecoupon/router'
,
method
:
'POST'
,
data
:
params
,
sign
:
true
})
}
export
default
{
getList
,
getServiceCenterList
,
getReviewList
,
getMerchantInfo
,
createMerchant
,
updateMerchant
,
findProByScene
,
getSceneProStatus
,
getStaffList
,
getInviteCode
,
getResidentStaffList
}
src/views/customerManage/editCustomer.vue
View file @
d1f55f8
...
@@ -16,6 +16,11 @@
...
@@ -16,6 +16,11 @@
</el-option-group>
</el-option-group>
</el-select>
</el-select>
</div>
</div>
<div
slot=
"staffUuid"
>
<el-select
v-model=
"editForm['staffUuid']"
@
change=
"handleResidentManageChange"
>
<el-option
v-for=
"(item, index) in baseData.residentManagerList"
:key=
"index"
:label=
"item.staffName"
:value=
"item.staffUuid"
></el-option>
</el-select>
</div>
</glsx-combi-form>
</glsx-combi-form>
</div>
</div>
</div>
</div>
...
@@ -50,7 +55,8 @@ export default {
...
@@ -50,7 +55,8 @@ export default {
contactName
:
''
,
contactName
:
''
,
phone
:
''
,
phone
:
''
,
merchantBrandList
:
[],
merchantBrandList
:
[],
productCodeList
:
[]
productCodeList
:
[],
staffUuid
:
''
},
},
editRule
:
{
editRule
:
{
shopMerchantId
:
[{
required
:
true
,
message
:
'请输入商户号'
,
trigger
:
'change'
}],
shopMerchantId
:
[{
required
:
true
,
message
:
'请输入商户号'
,
trigger
:
'change'
}],
...
@@ -87,7 +93,10 @@ export default {
...
@@ -87,7 +93,10 @@ export default {
optionId
:
'yqMerchantId'
,
optionId
:
'yqMerchantId'
,
optionLabel
:
'yqMerchantName'
,
optionLabel
:
'yqMerchantName'
,
optionsName
:
'merchantList'
,
optionsName
:
'merchantList'
,
isDisabled
:
false
isDisabled
:
false
,
changeAttr
:
(
value
)
=>
{
this
.
handleServiceChange
(
value
)
}
},
},
{
{
label
:
'客户名称'
,
label
:
'客户名称'
,
...
@@ -108,6 +117,11 @@ export default {
...
@@ -108,6 +117,11 @@ export default {
maxlength
:
11
maxlength
:
11
},
},
{
{
label
:
'驻店负责人'
,
name
:
'staffUuid'
,
addHtml
:
'staffUuid'
},
{
// label: '',
// label: '',
labelName
:
'地址:'
,
labelName
:
'地址:'
,
name
:
''
,
name
:
''
,
...
@@ -128,7 +142,8 @@ export default {
...
@@ -128,7 +142,8 @@ export default {
],
],
// 基本数据
// 基本数据
baseData
:
{
baseData
:
{
merchantList
:
[]
merchantList
:
[],
residentManagerList
:
[]
},
},
}
}
},
},
...
@@ -142,9 +157,8 @@ export default {
...
@@ -142,9 +157,8 @@ export default {
}
}
},
},
mounted
()
{
async
mounted
()
{
this
.
routeInfo
=
this
.
$route
.
query
this
.
routeInfo
=
this
.
$route
.
query
this
.
routeInfo
.
editType
!=
'add'
?
this
.
getInfo
()
:
''
this
.
userInfo
=
this
.
$globalState
.
session
this
.
userInfo
=
this
.
$globalState
.
session
this
.
isWatch
=
this
.
routeInfo
.
editType
!=
'add'
this
.
isWatch
=
this
.
routeInfo
.
editType
!=
'add'
if
(
this
.
routeInfo
.
editType
==
'edit'
)
{
if
(
this
.
routeInfo
.
editType
==
'edit'
)
{
...
@@ -154,7 +168,8 @@ export default {
...
@@ -154,7 +168,8 @@ export default {
let
id
=
this
.
editFormData
.
findIndex
(
item
=>
item
.
name
==
'shopMerchantId'
)
let
id
=
this
.
editFormData
.
findIndex
(
item
=>
item
.
name
==
'shopMerchantId'
)
this
.
editFormData
.
splice
(
id
,
1
)
this
.
editFormData
.
splice
(
id
,
1
)
}
}
this
.
getServiceCenterList
()
await
this
.
getServiceCenterList
()
this
.
routeInfo
.
editType
!=
'add'
?
await
this
.
getInfo
()
:
''
this
.
findProByScene
()
this
.
findProByScene
()
},
},
...
@@ -168,15 +183,34 @@ export default {
...
@@ -168,15 +183,34 @@ export default {
this
[
formName
][
idx
][
attrName
]
=
attrValue
this
[
formName
][
idx
][
attrName
]
=
attrValue
})
})
},
},
getServiceCenterList
()
{
async
getServiceCenterList
()
{
return
new
Promise
((
resolve
,
reject
)
=>
{
const
params
=
{
const
params
=
{
partnerMerchantId
:
this
.
userInfo
.
merchantId
partnerMerchantId
:
this
.
userInfo
.
merchantId
}
}
this
.
$apis
.
customer
.
getServiceCenterList
(
params
).
then
(
res
=>
{
this
.
$apis
.
customer
.
getServiceCenterList
(
params
).
then
(
res
=>
{
this
.
baseData
.
merchantList
=
res
this
.
baseData
.
merchantList
=
res
this
.
$utils
.
getOptionsList
(
this
,
'editFormData'
,
false
)
this
.
$utils
.
getOptionsList
(
this
,
'editFormData'
,
false
)
resolve
()
})
})
})
},
},
// 切换所属服务中心
handleServiceChange
(
value
)
{
// 清除驻店负责人
this
.
editForm
.
staffUuid
=
''
// 获取所属服务中心下的所有员工
this
.
getAllStaffList
(
value
)
},
getAllStaffList
(
yqMerchantId
)
{
this
.
$apis
.
customer
.
getResidentStaffList
({
merchantId
:
this
.
routeInfo
?.
merchantInfo
?.
shopMerchantId
,
yqMerchantId
}).
then
(
res
=>
{
this
.
baseData
.
residentManagerList
=
res
||
[]
})
},
handleResidentManageChange
(
value
)
{
this
.
$set
(
this
.
editForm
,
'staffUuid'
,
value
)
this
.
$forceUpdate
()
},
findProByScene
()
{
findProByScene
()
{
this
.
$apis
.
customer
.
findProByScene
({}).
then
(
res
=>
{
this
.
$apis
.
customer
.
findProByScene
({}).
then
(
res
=>
{
this
.
baseData
.
sceneList
=
res
this
.
baseData
.
sceneList
=
res
...
@@ -203,7 +237,8 @@ export default {
...
@@ -203,7 +237,8 @@ export default {
})
})
})
})
},
},
getInfo
()
{
async
getInfo
()
{
return
new
Promise
((
resolve
,
reject
)
=>
{
this
.
editForm
=
{
this
.
editForm
=
{
...
this
.
$common
.
utils
.
deepClone
(
this
.
routeInfo
.
merchantInfo
),
...
this
.
$common
.
utils
.
deepClone
(
this
.
routeInfo
.
merchantInfo
),
merchantName
:
this
.
routeInfo
.
merchantInfo
.
shopMerchantName
||
''
,
merchantName
:
this
.
routeInfo
.
merchantInfo
.
shopMerchantName
||
''
,
...
@@ -221,6 +256,7 @@ export default {
...
@@ -221,6 +256,7 @@ export default {
this
.
editForm
.
latitude
=
res
.
lat
this
.
editForm
.
latitude
=
res
.
lat
this
.
editForm
.
longitude
=
res
.
lng
this
.
editForm
.
longitude
=
res
.
lng
this
.
editForm
.
merchantAddress
=
res
.
merchantAddress
this
.
editForm
.
merchantAddress
=
res
.
merchantAddress
this
.
editForm
.
staffUuid
=
res
.
residentManager
?.
userId
const
merchantBrandList
=
res
.
brandTreeList
||
[]
const
merchantBrandList
=
res
.
brandTreeList
||
[]
this
.
editForm
.
merchantBrandList
=
[]
this
.
editForm
.
merchantBrandList
=
[]
this
.
editForm
.
merchantBrandIds
=
''
this
.
editForm
.
merchantBrandIds
=
''
...
@@ -237,13 +273,17 @@ export default {
...
@@ -237,13 +273,17 @@ export default {
this
.
editForm
.
merchantBrandIds
=
this
.
editForm
.
merchantBrandIds
.
split
(
','
)
this
.
editForm
.
merchantBrandIds
=
this
.
editForm
.
merchantBrandIds
.
split
(
','
)
this
.
$refs
.
editFormRef
.
brandList
()
this
.
$refs
.
editFormRef
.
brandList
()
this
.
$refs
.
provinceForm
&&
this
.
$refs
.
provinceForm
.
init
(
this
.
editForm
)
this
.
$refs
.
provinceForm
&&
this
.
$refs
.
provinceForm
.
init
(
this
.
editForm
)
// 有所属服务中心获取所有员工
if
(
res
?.
merchantNo
)
this
.
getAllStaffList
(
res
?.
merchantNo
)
this
.
$nextTick
(()
=>
{
this
.
$nextTick
(()
=>
{
this
.
editStatus
=
false
this
.
editStatus
=
false
})
})
resolve
()
})
})
.
finally
(()
=>
{
.
finally
(()
=>
{
this
.
loading
=
false
this
.
loading
=
false
})
})
})
},
},
hasDuplicate
(
arr1
,
arr2
)
{
hasDuplicate
(
arr1
,
arr2
)
{
const
set1
=
new
Set
(
arr1
)
const
set1
=
new
Set
(
arr1
)
...
@@ -290,6 +330,17 @@ export default {
...
@@ -290,6 +330,17 @@ export default {
params
.
sceneList
.
push
(
item
.
sceneCode
)
params
.
sceneList
.
push
(
item
.
sceneCode
)
}
}
})
})
// 驻店负责人参数
if
(
params
?.
staffUuid
)
{
let
obj
=
this
.
baseData
?.
residentManagerList
?.
find
(
val
=>
val
.
staffUuid
==
params
.
staffUuid
)
params
.
residentManager
=
{
userId
:
params
.
staffUuid
,
userType
:
2
,
userName
:
obj
?.
staffName
,
userNum
:
obj
?.
staffPhone
}
delete
params
.
staffUuid
}
this
.
$confirm
(
'<strong>是否确认提交?</strong> <div>提交客户开通申请,进入开店审核,审核通过后将为您自动'
+
(
this
.
routeInfo
.
editType
==
'add'
?
'创建'
:
'编辑'
)
+
'客户</div> '
,
'提示'
,
{
this
.
$confirm
(
'<strong>是否确认提交?</strong> <div>提交客户开通申请,进入开店审核,审核通过后将为您自动'
+
(
this
.
routeInfo
.
editType
==
'add'
?
'创建'
:
'编辑'
)
+
'客户</div> '
,
'提示'
,
{
dangerouslyUseHTMLString
:
true
,
dangerouslyUseHTMLString
:
true
,
confirmButtonText
:
'确定'
,
confirmButtonText
:
'确定'
,
...
...
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