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
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
38 additions
and
29 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 @@
ref=
"addForm"
:model=
"addForm"
label-width=
"100px"
:rules=
"rules"
>
<gl-form-item
label=
"商户:"
prop=
"merchant"
>
<gl-form-item
label=
"商户:"
prop=
"merchant
Id
"
>
<gl-select
v-model=
"addForm.merchant"
v-model=
"addForm.merchant
Id
"
filterable
remote
clearable
name=
"merchant"
name=
"merchant
Id
"
placeholder=
"请输入商户名称/商户号"
data-vv-as=
"商户名称/商户号"
v-validate=
"'required'"
...
...
@@ -29,7 +29,7 @@
:value=
"item.merchantId"
>
</gl-option>
</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
label=
"商户类型:"
prop=
"merchantType"
>
<gl-select
v-model=
"addForm.merchantType"
...
...
@@ -49,11 +49,11 @@
<div
v-for=
"(item, idx) in addList"
:key=
"idx"
>
<gl-form-item
:label=
"item.label + ':'"
>
<gl-select
v-model=
"item.merchant"
v-model=
"item.merchant
Id
"
filterable
remote
:name=
"`item.merchant$
{idx+1}`"
v-validate="item.merchant || item.merchantType ? 'required' : ''"
:name=
"`item.merchant
Id
$
{idx+1}`"
v-validate="item.merchant
Id
|| item.merchantType ? 'required' : ''"
:data-vv-as="`子商户`"
clearable
placeholder="请输入商户名称/商户号"
...
...
@@ -67,13 +67,13 @@
</gl-option>
</gl-select>
<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> --
>
<
/gl-form-item
>
<
gl
-
form
-
item
label
=
"商户类型:"
>
<
gl
-
select
v
-
model
=
"item.merchantType"
:
name
=
"
`item.merchantType${idx+1
}
`"
v-validate="
item
.
merchant
||
item
.
merchantType
?
'required'
:
''
"
v-validate="
item
.
merchant
Id
||
item
.
merchantType
?
'required'
:
''
"
:data-vv-as="`子商户类型`"
clearable
placeholder="
请选择
">
...
...
@@ -115,12 +115,12 @@ export default {
tip
:
false
,
// 添加下一个子商户的提示
isAdd
:
false
,
// 添加子商户,需填写商户提示
addForm
:
{
merchant
:
''
,
merchant
Id
:
''
,
merchantType
:
''
}
,
merchantTypeList
:
[],
rules
:
{
merchant
:
[{
required
:
true
}
],
merchant
Id
:
[{
required
:
true
}
],
merchantType
:
[{
required
:
true
}
]
}
,
// 远程搜索
...
...
@@ -135,11 +135,11 @@ export default {
addDialogVisible
(
val
)
{
this
.
$validator
.
errors
.
clear
()
}
,
'addForm.merchant'
(
val
)
{
'addForm.merchant
Id
'
(
val
)
{
if
(
this
.
addList
.
length
!==
0
)
{
this
.
addList
.
forEach
(
item
=>
{
for
(
var
j
in
item
)
{
if
(
j
==
'merchant'
||
j
==
'merchantType'
)
{
if
(
j
==
'merchant
Id
'
||
j
==
'merchantType'
)
{
item
[
j
]
=
''
}
}
...
...
@@ -157,17 +157,23 @@ export default {
this
.
isAdd
=
false
this
.
$validator
.
validateAll
().
then
((
result
)
=>
{
if
(
result
)
{
this
.
addList
.
forEach
(
item
=>
{
delete
item
.
label
}
)
if
(
this
.
addList
[
0
].
merchantId
)
{
this
.
addForm
.
merchantRelationAdds
=
this
.
addList
if
(
this
.
addList
.
length
!==
0
)
{
console
.
log
(
this
.
addList
)
if
(
this
.
addList
[
0
].
merchantId
)
{
this
.
addList
.
forEach
(
item
=>
{
delete
item
.
label
delete
item
.
show
}
)
this
.
addForm
.
merchantRelationAdds
=
this
.
addList
}
}
const
params
=
this
.
$deep_clone
(
this
.
addForm
)
params
.
groupId
=
this
.
groupId
console
.
log
(
params
)
params
.
method
=
groupDetailMethods
.
Create
request
.
req
(
params
).
then
(
res
=>
{
notice
.
okTips
()
this
.
showAddDialog
()
this
.
showAddDialog
(
true
)
}
).
catch
(
err
=>
{
notice
.
errorTips
(
err
)
}
)
...
...
@@ -175,34 +181,34 @@ export default {
}
)
}
,
// 显示隐藏添加商户按钮
showAddDialog
()
{
this
.
$emit
(
'addData'
)
showAddDialog
(
t
)
{
this
.
$emit
(
'addData'
,
t
)
setTimeout
(()
=>
{
this
.
addList
=
[]
this
.
addForm
=
{
merchant
:
''
,
merchantType
:
''
}
this
.
addForm
=
{
merchant
Id
:
''
,
merchantType
:
''
}
}
,
400
)
}
,
// 添加更多按钮
addMore
()
{
console
.
log
(
this
.
addForm
.
merchant
)
if
(
this
.
addForm
.
merchant
)
{
console
.
log
(
this
.
addForm
.
merchant
Id
)
if
(
this
.
addForm
.
merchant
Id
)
{
this
.
isAdd
=
false
if
(
this
.
addList
.
length
===
0
)
{
this
.
addList
.
push
({
label
:
'子商户'
+
(
this
.
addList
.
length
+
1
),
merchant
:
''
,
merchant
Id
:
''
,
merchantType
:
''
,
show
:
true
}
)
}
else
{
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
}
else
{
this
.
tip
=
false
this
.
addList
.
push
({
label
:
'子商户'
+
(
this
.
addList
.
length
+
1
),
merchant
:
''
,
merchant
Id
:
''
,
merchantType
:
''
,
show
:
true
}
)
...
...
@@ -239,7 +245,7 @@ export default {
this
.
childLoading
=
true
const
params
=
{
}
params
.
groupId
=
this
.
groupId
params
.
merchantId
=
this
.
addForm
.
merchant
params
.
merchantId
=
this
.
addForm
.
merchant
Id
params
.
searchWrod
=
query
params
.
method
=
groupDetailMethods
.
SearchChildList
request
.
req
(
params
).
then
(
res
=>
{
...
...
src/views/customer/businessGroupDetail/index.vue
View file @
aa3345c
...
...
@@ -297,7 +297,10 @@ export default {
addDialog
()
{
this
.
addDialogVisible
=
!
this
.
addDialogVisible
},
handleAddData
()
{
handleAddData
(
t
)
{
if
(
t
)
{
this
.
loadingGetList
()
}
this
.
addDialogVisible
=
!
this
.
addDialogVisible
},
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