Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
H
haoban-3
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
office
haoban-3
Commits
68aa2bc0
Commit
68aa2bc0
authored
Apr 21, 2021
by
陈羽
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update: 商户选择增加校验
parent
f476f24b
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
4 deletions
+22
-4
gic-select-group-auth.vue
src/components/common/gic-select-group-auth.vue
+2
-1
authMerchant-form.vue
src/views/business/authMerchant-form.vue
+20
-2
storeDetail.vue
src/views/salesleads/storeDetail.vue
+0
-1
No files found.
src/components/common/gic-select-group-auth.vue
View file @
68aa2bc0
...
...
@@ -146,7 +146,7 @@ export default {
delDepart
(
index
,
arr
)
{
const
that
=
this
;
arr
.
splice
(
index
,
1
);
const
keys
=
arr
.
map
(
ele
=>
ele
.
storeGroup
Id
);
const
keys
=
arr
.
map
(
ele
=>
ele
.
relation
Id
);
that
.
setCheckedKeys
(
keys
);
},
...
...
@@ -272,6 +272,7 @@ export default {
this
.
groupIds
.
push
(
node
.
data
);
if
(
node
.
isLeaf
)
{
this
.
$refs
.
groupTree
.
setChecked
(
node
,
true
);
this
.
$emit
(
'checkGroupIds'
,
this
.
$refs
.
groupTree
.
getCheckedNodes
());
}
});
});
...
...
src/views/business/authMerchant-form.vue
View file @
68aa2bc0
...
...
@@ -47,7 +47,9 @@
</div>
<div
class=
"select-search-input cursor-pointer"
slot=
"reference"
>
<div>
<el-input
placeholder=
"请搜索选择商户"
maxlength=
"50"
:disabled=
"type === 'edit'"
v-model=
"partForm.searchSelect"
@
keyup
.
native=
"value => querySearchAsync(value, searchSelect)"
>
</el-input>
<el-form-item
prop=
"searchSelect"
>
<el-input
placeholder=
"请搜索选择商户"
maxlength=
"50"
:disabled=
"type === 'edit'"
v-model=
"partForm.searchSelect"
@
keyup
.
native=
"querySearchAsync('search')"
>
</el-input>
</el-form-item>
</div>
</div>
</el-popover>
...
...
@@ -71,7 +73,7 @@
</p>
</el-form-item>
<el-form-item
label=
"企业类型"
>
<el-radio
v-model=
"partForm.wxEnterpriseType"
:label=
"0"
:disabled=
"type === 'edit'"
>
总部
</el-radio>
<el-radio
v-model=
"partForm.wxEnterpriseType"
:label=
"1"
:disabled=
"type === 'edit'"
>
代理
</el-radio>
</el-form-item>
<el-button
type=
"primary"
style=
"display:block;margin:38px 0 0 128px;"
@
click=
"addShow = true"
:disabled=
"!(enterpriseId && partForm.storeGroup.length)"
>
授权校验并
{{
type
===
'edit'
?
'保存'
:
'新建'
}}
</el-button>
<el-button
type=
"primary"
style=
"display:block;margin:38px 0 0 128px;"
@
click=
"addShow = true"
:disabled=
"!(enterpriseId && partForm.storeGroup.length
&& partForm.searchSelect
)"
>
授权校验并
{{
type
===
'edit'
?
'保存'
:
'新建'
}}
</el-button>
</el-form>
</div>
</div>
...
...
@@ -92,6 +94,15 @@ import errMsg from '@/common/js/error';
export
default
{
name
:
'authMerchantAdd'
,
data
()
{
const
checkEnterpriseId
=
(
rule
,
value
,
callback
)
=>
{
if
(
!
value
)
{
callback
(
new
Error
(
'请先搜索商户!'
));
}
else
if
(
!
this
.
enterpriseId
)
{
callback
(
new
Error
(
'请选择商户!'
));
}
else
{
callback
();
}
};
return
{
bgHeight
:
window
.
screen
.
availHeight
-
104
+
'px'
,
// 面包屑参数
...
...
@@ -119,6 +130,9 @@ export default {
searchSelect
:
''
,
storeGroup
:
[]
},
rules
:
{
searchSelect
:
[{
required
:
true
,
validator
:
checkEnterpriseId
,
trigger
:
'blur'
}]
},
checkedList
:
[],
dailogForm
:
{},
searchArray
:
[],
...
...
@@ -139,6 +153,7 @@ export default {
handleSelect
(
item
)
{
this
.
enterpriseId
=
item
.
enterpriseId
;
this
.
dailogForm
=
{
...
item
};
this
.
$refs
.
form
.
validateField
(
'searchSelect'
);
},
async
querySearchAsync
(
type
)
{
const
that
=
this
;
...
...
@@ -146,6 +161,9 @@ export default {
that
.
searchArray
=
[];
return
false
;
}
if
(
type
===
'search'
)
{
that
.
enterpriseId
=
''
;
}
const
res
=
await
that
.
getSearchList
(
that
.
partForm
.
searchSelect
);
that
.
searchArray
=
res
;
if
(
type
===
'edit'
&&
res
[
0
])
{
...
...
src/views/salesleads/storeDetail.vue
View file @
68aa2bc0
...
...
@@ -235,7 +235,6 @@ export default {
});
},
showDetail
(
item
)
{
console
.
log
(
item
);
this
.
confirmDetailShow
=
true
;
}
},
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
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 comment