Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
glsx-web
/
glsx-oss-merchant-data
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 aa3345c8
authored
Mar 28, 2019
by
胡悦
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
aaa
1 parent
6217c85e
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
34 additions
and
25 deletions
src/views/customer/businessGroupDetail/addBusiness.vue
src/views/customer/businessGroupDetail/index.vue
src/views/customer/businessGroupDetail/addBusiness.vue
View file @
aa3345c
...
@@ -10,13 +10,13 @@
...
@@ -10,13 +10,13 @@
ref=
"addForm"
:model=
"addForm"
ref=
"addForm"
:model=
"addForm"
label-width=
"100px"
label-width=
"100px"
:rules=
"rules"
>
:rules=
"rules"
>
<gl-form-item
label=
"商户:"
prop=
"merchant"
>
<gl-form-item
label=
"商户:"
prop=
"merchant
Id
"
>
<gl-select
<gl-select
v-model=
"addForm.merchant"
v-model=
"addForm.merchant
Id
"
filterable
filterable
remote
remote
clearable
clearable
name=
"merchant"
name=
"merchant
Id
"
placeholder=
"请输入商户名称/商户号"
placeholder=
"请输入商户名称/商户号"
data-vv-as=
"商户名称/商户号"
data-vv-as=
"商户名称/商户号"
v-validate=
"'required'"
v-validate=
"'required'"
...
@@ -29,7 +29,7 @@
...
@@ -29,7 +29,7 @@
:value=
"item.merchantId"
>
:value=
"item.merchantId"
>
</gl-option>
</gl-option>
</gl-select>
</gl-select>
<span
v-show=
"errorBags.has('merchant
')"
class=
"error"
>
{{
errorBags
.
first
(
'merchant
'
)
}}
</span>
<span
v-show=
"errorBags.has('merchant
Id')"
class=
"error"
>
{{
errorBags
.
first
(
'merchantId
'
)
}}
</span>
</gl-form-item>
</gl-form-item>
<gl-form-item
label=
"商户类型:"
prop=
"merchantType"
>
<gl-form-item
label=
"商户类型:"
prop=
"merchantType"
>
<gl-select
v-model=
"addForm.merchantType"
<gl-select
v-model=
"addForm.merchantType"
...
@@ -49,11 +49,11 @@
...
@@ -49,11 +49,11 @@
<div
v-for=
"(item, idx) in addList"
:key=
"idx"
>
<div
v-for=
"(item, idx) in addList"
:key=
"idx"
>
<gl-form-item
:label=
"item.label + ':'"
>
<gl-form-item
:label=
"item.label + ':'"
>
<gl-select
<gl-select
v-model=
"item.merchant"
v-model=
"item.merchant
Id
"
filterable
filterable
remote
remote
:name=
"`item.merchant$
{idx+1}`"
:name=
"`item.merchant
Id
$
{idx+1}`"
v-validate="item.merchant || item.merchantType ? 'required' : ''"
v-validate="item.merchant
Id
|| item.merchantType ? 'required' : ''"
:data-vv-as="`子商户`"
:data-vv-as="`子商户`"
clearable
clearable
placeholder="请输入商户名称/商户号"
placeholder="请输入商户名称/商户号"
...
@@ -67,13 +67,13 @@
...
@@ -67,13 +67,13 @@
</gl-option>
</gl-option>
</gl-select>
</gl-select>
<i
v-show=
"item.show"
class=
"el-icon-delete delete"
@
click=
"deleteBusiness(idx)"
></i>
<i
v-show=
"item.show"
class=
"el-icon-delete delete"
@
click=
"deleteBusiness(idx)"
></i>
<span
v-show=
"errorBags.has(`item.merchant
$
{idx+1}`)" class="error">
{{
errorBags
.
first
(
`item.merchant
${idx+1
}
`
)
}}
<
/span
>
<span
v-show=
"errorBags.has(`item.merchant
Id$
{idx+1}`)" class="error">
{{
errorBags
.
first
(
`item.merchantId
${idx+1
}
`
)
}}
<
/span
>
<!--
<
span
v
-
show
=
"item.merchant? !item.merchant : !!item.merchantType"
class
=
"error"
>
{{
`请填写子商户${idx+1
}
的商户名称/商户号`
}}
<
/span> --
>
<!--
<
span
v
-
show
=
"item.merchant? !item.merchant : !!item.merchantType"
class
=
"error"
>
{{
`请填写子商户${idx+1
}
的商户名称/商户号`
}}
<
/span> --
>
<
/gl-form-item
>
<
/gl-form-item
>
<
gl
-
form
-
item
label
=
"商户类型:"
>
<
gl
-
form
-
item
label
=
"商户类型:"
>
<
gl
-
select
v
-
model
=
"item.merchantType"
<
gl
-
select
v
-
model
=
"item.merchantType"
:
name
=
"
`item.merchantType${idx+1
}
`"
:
name
=
"
`item.merchantType${idx+1
}
`"
v-validate="
item
.
merchant
||
item
.
merchantType
?
'required'
:
''
"
v-validate="
item
.
merchant
Id
||
item
.
merchantType
?
'required'
:
''
"
:data-vv-as="`子商户类型`"
:data-vv-as="`子商户类型`"
clearable
clearable
placeholder="
请选择
">
placeholder="
请选择
">
...
@@ -115,12 +115,12 @@ export default {
...
@@ -115,12 +115,12 @@ export default {
tip
:
false
,
// 添加下一个子商户的提示
tip
:
false
,
// 添加下一个子商户的提示
isAdd
:
false
,
// 添加子商户,需填写商户提示
isAdd
:
false
,
// 添加子商户,需填写商户提示
addForm
:
{
addForm
:
{
merchant
:
''
,
merchant
Id
:
''
,
merchantType
:
''
merchantType
:
''
}
,
}
,
merchantTypeList
:
[],
merchantTypeList
:
[],
rules
:
{
rules
:
{
merchant
:
[{
required
:
true
}
],
merchant
Id
:
[{
required
:
true
}
],
merchantType
:
[{
required
:
true
}
]
merchantType
:
[{
required
:
true
}
]
}
,
}
,
// 远程搜索
// 远程搜索
...
@@ -135,11 +135,11 @@ export default {
...
@@ -135,11 +135,11 @@ export default {
addDialogVisible
(
val
)
{
addDialogVisible
(
val
)
{
this
.
$validator
.
errors
.
clear
()
this
.
$validator
.
errors
.
clear
()
}
,
}
,
'addForm.merchant'
(
val
)
{
'addForm.merchant
Id
'
(
val
)
{
if
(
this
.
addList
.
length
!==
0
)
{
if
(
this
.
addList
.
length
!==
0
)
{
this
.
addList
.
forEach
(
item
=>
{
this
.
addList
.
forEach
(
item
=>
{
for
(
var
j
in
item
)
{
for
(
var
j
in
item
)
{
if
(
j
==
'merchant'
||
j
==
'merchantType'
)
{
if
(
j
==
'merchant
Id
'
||
j
==
'merchantType'
)
{
item
[
j
]
=
''
item
[
j
]
=
''
}
}
}
}
...
@@ -157,17 +157,23 @@ export default {
...
@@ -157,17 +157,23 @@ export default {
this
.
isAdd
=
false
this
.
isAdd
=
false
this
.
$validator
.
validateAll
().
then
((
result
)
=>
{
this
.
$validator
.
validateAll
().
then
((
result
)
=>
{
if
(
result
)
{
if
(
result
)
{
if
(
this
.
addList
.
length
!==
0
)
{
console
.
log
(
this
.
addList
)
if
(
this
.
addList
[
0
].
merchantId
)
{
this
.
addList
.
forEach
(
item
=>
{
this
.
addList
.
forEach
(
item
=>
{
delete
item
.
label
delete
item
.
label
delete
item
.
show
}
)
}
)
if
(
this
.
addList
[
0
].
merchantId
)
{
this
.
addForm
.
merchantRelationAdds
=
this
.
addList
this
.
addForm
.
merchantRelationAdds
=
this
.
addList
}
}
}
const
params
=
this
.
$deep_clone
(
this
.
addForm
)
const
params
=
this
.
$deep_clone
(
this
.
addForm
)
params
.
groupId
=
this
.
groupId
console
.
log
(
params
)
params
.
method
=
groupDetailMethods
.
Create
params
.
method
=
groupDetailMethods
.
Create
request
.
req
(
params
).
then
(
res
=>
{
request
.
req
(
params
).
then
(
res
=>
{
notice
.
okTips
()
notice
.
okTips
()
this
.
showAddDialog
()
this
.
showAddDialog
(
true
)
}
).
catch
(
err
=>
{
}
).
catch
(
err
=>
{
notice
.
errorTips
(
err
)
notice
.
errorTips
(
err
)
}
)
}
)
...
@@ -175,34 +181,34 @@ export default {
...
@@ -175,34 +181,34 @@ export default {
}
)
}
)
}
,
}
,
// 显示隐藏添加商户按钮
// 显示隐藏添加商户按钮
showAddDialog
()
{
showAddDialog
(
t
)
{
this
.
$emit
(
'addData'
)
this
.
$emit
(
'addData'
,
t
)
setTimeout
(()
=>
{
setTimeout
(()
=>
{
this
.
addList
=
[]
this
.
addList
=
[]
this
.
addForm
=
{
merchant
:
''
,
merchantType
:
''
}
this
.
addForm
=
{
merchant
Id
:
''
,
merchantType
:
''
}
}
,
400
)
}
,
400
)
}
,
}
,
// 添加更多按钮
// 添加更多按钮
addMore
()
{
addMore
()
{
console
.
log
(
this
.
addForm
.
merchant
)
console
.
log
(
this
.
addForm
.
merchant
Id
)
if
(
this
.
addForm
.
merchant
)
{
if
(
this
.
addForm
.
merchant
Id
)
{
this
.
isAdd
=
false
this
.
isAdd
=
false
if
(
this
.
addList
.
length
===
0
)
{
if
(
this
.
addList
.
length
===
0
)
{
this
.
addList
.
push
({
this
.
addList
.
push
({
label
:
'子商户'
+
(
this
.
addList
.
length
+
1
),
label
:
'子商户'
+
(
this
.
addList
.
length
+
1
),
merchant
:
''
,
merchant
Id
:
''
,
merchantType
:
''
,
merchantType
:
''
,
show
:
true
show
:
true
}
)
}
)
}
else
{
}
else
{
const
len
=
this
.
addList
.
length
-
1
const
len
=
this
.
addList
.
length
-
1
if
(
this
.
addList
[
len
].
merchant
==
''
||
this
.
addList
[
len
].
merchantType
==
''
)
{
if
(
this
.
addList
[
len
].
merchant
Id
==
''
||
this
.
addList
[
len
].
merchantType
==
''
)
{
this
.
tip
=
true
this
.
tip
=
true
}
else
{
}
else
{
this
.
tip
=
false
this
.
tip
=
false
this
.
addList
.
push
({
this
.
addList
.
push
({
label
:
'子商户'
+
(
this
.
addList
.
length
+
1
),
label
:
'子商户'
+
(
this
.
addList
.
length
+
1
),
merchant
:
''
,
merchant
Id
:
''
,
merchantType
:
''
,
merchantType
:
''
,
show
:
true
show
:
true
}
)
}
)
...
@@ -239,7 +245,7 @@ export default {
...
@@ -239,7 +245,7 @@ export default {
this
.
childLoading
=
true
this
.
childLoading
=
true
const
params
=
{
}
const
params
=
{
}
params
.
groupId
=
this
.
groupId
params
.
groupId
=
this
.
groupId
params
.
merchantId
=
this
.
addForm
.
merchant
params
.
merchantId
=
this
.
addForm
.
merchant
Id
params
.
searchWrod
=
query
params
.
searchWrod
=
query
params
.
method
=
groupDetailMethods
.
SearchChildList
params
.
method
=
groupDetailMethods
.
SearchChildList
request
.
req
(
params
).
then
(
res
=>
{
request
.
req
(
params
).
then
(
res
=>
{
...
...
src/views/customer/businessGroupDetail/index.vue
View file @
aa3345c
...
@@ -297,7 +297,10 @@ export default {
...
@@ -297,7 +297,10 @@ export default {
addDialog
()
{
addDialog
()
{
this
.
addDialogVisible
=
!
this
.
addDialogVisible
this
.
addDialogVisible
=
!
this
.
addDialogVisible
},
},
handleAddData
()
{
handleAddData
(
t
)
{
if
(
t
)
{
this
.
loadingGetList
()
}
this
.
addDialogVisible
=
!
this
.
addDialogVisible
this
.
addDialogVisible
=
!
this
.
addDialogVisible
},
},
getCityArea
(
params
)
{
getCityArea
(
params
)
{
...
...
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