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 88e71b23
authored
Aug 11, 2023
by
chenwq
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
编辑置灰
1 parent
23fba8d9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
7 deletions
src/views/customerManage/editCustomer.vue
src/views/customerManage/editCustomer.vue
View file @
88e71b2
...
@@ -41,6 +41,7 @@ export default {
...
@@ -41,6 +41,7 @@ export default {
},
},
editStatus
:
false
,
editStatus
:
false
,
editForm
:
{
editForm
:
{
shopMerchantId
:
''
,
yqMerchantId
:
''
,
yqMerchantId
:
''
,
merchantName
:
''
,
merchantName
:
''
,
contactName
:
''
,
contactName
:
''
,
...
@@ -49,6 +50,7 @@ export default {
...
@@ -49,6 +50,7 @@ export default {
productCodeList
:
[]
productCodeList
:
[]
},
},
editRule
:
{
editRule
:
{
shopMerchantId
:
[{
required
:
true
,
message
:
'请输入商户号'
,
trigger
:
'change'
}],
yqMerchantId
:
[{
required
:
true
,
message
:
'请选择所属服务中心'
,
trigger
:
'change'
}],
yqMerchantId
:
[{
required
:
true
,
message
:
'请选择所属服务中心'
,
trigger
:
'change'
}],
merchantName
:
[{
required
:
true
,
message
:
'请输入客户名称'
,
trigger
:
'change'
}],
merchantName
:
[{
required
:
true
,
message
:
'请输入客户名称'
,
trigger
:
'change'
}],
contactName
:
[{
required
:
true
,
message
:
'请输入联系人'
,
trigger
:
'change'
}],
contactName
:
[{
required
:
true
,
message
:
'请输入联系人'
,
trigger
:
'change'
}],
...
@@ -68,13 +70,21 @@ export default {
...
@@ -68,13 +70,21 @@ export default {
isWatch
:
false
,
isWatch
:
false
,
editFormData
:
[
editFormData
:
[
{
{
label
:
'商户号'
,
name
:
'shopMerchantId'
,
type
:
'input'
,
maxlength
:
50
,
isDisabled
:
true
},
{
label
:
'所属服务中心'
,
label
:
'所属服务中心'
,
name
:
'yqMerchantId'
,
name
:
'yqMerchantId'
,
type
:
'select'
,
type
:
'select'
,
optionList
:
[],
optionList
:
[],
optionId
:
'yqMerchantId'
,
optionId
:
'yqMerchantId'
,
optionLabel
:
'yqMerchantName'
,
optionLabel
:
'yqMerchantName'
,
optionsName
:
'merchantList'
optionsName
:
'merchantList'
,
isDisabled
:
false
},
},
{
{
label
:
'客户名称'
,
label
:
'客户名称'
,
...
@@ -134,11 +144,24 @@ export default {
...
@@ -134,11 +144,24 @@ export default {
this
.
routeInfo
.
editType
!=
'add'
?
this
.
getInfo
()
:
''
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'
)
{
this
.
changeFormAttr
(
'editFormData'
,
'isDisabled'
,
[
'所属服务中心'
],
true
)
}
else
{
this
.
editRule
.
shopMerchantId
[
0
].
required
=
false
let
id
=
this
.
editFormData
.
findIndex
(
item
=>
item
.
name
==
'shopMerchantId'
)
this
.
editFormData
.
splice
(
id
,
1
)
}
this
.
getServiceCenterList
()
this
.
getServiceCenterList
()
this
.
findProByScene
()
this
.
findProByScene
()
},
},
methods
:
{
methods
:
{
changeFormAttr
(
formName
,
attrName
,
labelList
,
attrValue
)
{
labelList
.
forEach
(
item
=>
{
let
idx
=
this
[
formName
].
findIndex
(
k
=>
k
.
label
==
item
)
this
[
formName
][
idx
][
attrName
]
=
attrValue
})
},
getServiceCenterList
()
{
getServiceCenterList
()
{
const
params
=
{
const
params
=
{
partnerMerchantId
:
this
.
userInfo
.
merchantId
partnerMerchantId
:
this
.
userInfo
.
merchantId
...
@@ -160,7 +183,6 @@ export default {
...
@@ -160,7 +183,6 @@ export default {
getSceneProStatus
()
{
getSceneProStatus
()
{
const
params
=
{
merchant4sId
:
this
.
routeInfo
.
merchantInfo
.
shopMerchantId
}
const
params
=
{
merchant4sId
:
this
.
routeInfo
.
merchantInfo
.
shopMerchantId
}
this
.
$apis
.
customer
.
getSceneProStatus
(
params
).
then
(
res
=>
{
this
.
$apis
.
customer
.
getSceneProStatus
(
params
).
then
(
res
=>
{
console
.
log
(
res
,
'开通状态----'
)
let
productCodeList
=
[]
let
productCodeList
=
[]
res
.
forEach
(
item
=>
{
res
.
forEach
(
item
=>
{
item
.
productList
.
forEach
(
k
=>
{
item
.
productList
.
forEach
(
k
=>
{
...
@@ -170,7 +192,6 @@ export default {
...
@@ -170,7 +192,6 @@ export default {
})
})
})
})
this
.
$set
(
this
.
editForm
,
'productCodeList'
,
productCodeList
)
this
.
$set
(
this
.
editForm
,
'productCodeList'
,
productCodeList
)
console
.
log
(
this
.
editForm
.
productCodeList
)
this
.
$nextTick
(()
=>
{
this
.
$nextTick
(()
=>
{
this
.
editStatus
=
false
this
.
editStatus
=
false
})
})
...
@@ -184,7 +205,6 @@ export default {
...
@@ -184,7 +205,6 @@ export default {
oldMerchantName
:
this
.
routeInfo
.
merchantInfo
.
shopMerchantName
||
''
oldMerchantName
:
this
.
routeInfo
.
merchantInfo
.
shopMerchantName
||
''
}
}
this
.
$apis
.
customer
.
getMerchantInfo
({
merchantId
:
this
.
routeInfo
.
merchantInfo
.
shopMerchantId
}).
then
(
res
=>
{
this
.
$apis
.
customer
.
getMerchantInfo
({
merchantId
:
this
.
routeInfo
.
merchantInfo
.
shopMerchantId
}).
then
(
res
=>
{
console
.
log
(
res
,
'res----'
)
this
.
editForm
.
provinceCode
=
res
.
provinceCode
this
.
editForm
.
provinceCode
=
res
.
provinceCode
this
.
editForm
.
provinceName
=
res
.
provinceName
this
.
editForm
.
provinceName
=
res
.
provinceName
this
.
editForm
.
cityCode
=
res
.
cityCode
this
.
editForm
.
cityCode
=
res
.
cityCode
...
@@ -206,7 +226,6 @@ export default {
...
@@ -206,7 +226,6 @@ export default {
this
.
editForm
.
merchantBrandIds
=
this
.
editForm
.
merchantBrandIds
+
item
.
subList
.
map
(
k
=>
k
.
id
).
join
(
','
)
this
.
editForm
.
merchantBrandIds
=
this
.
editForm
.
merchantBrandIds
+
item
.
subList
.
map
(
k
=>
k
.
id
).
join
(
','
)
})
})
this
.
editForm
.
merchantBrandIds
=
this
.
editForm
.
merchantBrandIds
.
split
(
','
)
this
.
editForm
.
merchantBrandIds
=
this
.
editForm
.
merchantBrandIds
.
split
(
','
)
console
.
log
(
this
.
editForm
,
'--------------'
)
this
.
$refs
.
provinceForm
&&
this
.
$refs
.
provinceForm
.
init
(
this
.
editForm
)
this
.
$refs
.
provinceForm
&&
this
.
$refs
.
provinceForm
.
init
(
this
.
editForm
)
this
.
$nextTick
(()
=>
{
this
.
$nextTick
(()
=>
{
this
.
editStatus
=
false
this
.
editStatus
=
false
...
@@ -224,7 +243,6 @@ export default {
...
@@ -224,7 +243,6 @@ export default {
return
false
return
false
},
},
handleConfirm
()
{
handleConfirm
()
{
console
.
log
(
this
.
editForm
,
'this.editForm-------------'
)
this
.
$refs
.
editFormRef
.
$refs
[
this
.
editChildRef
].
validate
(
valid
=>
{
this
.
$refs
.
editFormRef
.
$refs
[
this
.
editChildRef
].
validate
(
valid
=>
{
if
(
valid
)
{
if
(
valid
)
{
var
params
=
this
.
$common
.
utils
.
deepClone
(
this
.
editForm
)
var
params
=
this
.
$common
.
utils
.
deepClone
(
this
.
editForm
)
...
@@ -249,7 +267,6 @@ export default {
...
@@ -249,7 +267,6 @@ export default {
params
.
sceneList
.
push
(
item
.
sceneCode
)
params
.
sceneList
.
push
(
item
.
sceneCode
)
}
}
})
})
console
.
log
(
params
)
const
apiName
=
this
.
routeInfo
.
editType
==
'edit'
?
'updateMerchant'
:
'createMerchant'
const
apiName
=
this
.
routeInfo
.
editType
==
'edit'
?
'updateMerchant'
:
'createMerchant'
this
.
$apis
.
customer
[
apiName
](
params
).
then
(
res
=>
{
this
.
$apis
.
customer
[
apiName
](
params
).
then
(
res
=>
{
this
.
$message
({
this
.
$message
({
...
...
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