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
f33ef8ab
Commit
f33ef8ab
authored
May 18, 2022
by
caoyanzhi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update: 切换默认商户
parent
f7386d05
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
6 deletions
+16
-6
change-store.vue
src/components/layout/components/change-store.vue
+16
-6
No files found.
src/components/layout/components/change-store.vue
View file @
f33ef8ab
...
...
@@ -10,7 +10,7 @@
<el-dropdown-item
v-for=
"el in storeList"
:key=
"el.enterpriseId"
:class=
"['store-item',
{ actived: el.enterpriseId == activedStoreId }]" :command="el.enterpriseId">
<div>
<div
class=
"store-name"
>
{{
el
.
brandName
}}
</div>
<div
class=
"default-store-tag"
v-if=
"el.
enterpriseId == defaultStoreId
"
>
默认商户
</div>
<div
class=
"default-store-tag"
v-if=
"el.
defaultFlag == 1
"
>
默认商户
</div>
</div>
<i
class=
"el-icon-check checked"
v-if=
"el.enterpriseId == activedStoreId"
></i>
</el-dropdown-item>
...
...
@@ -35,7 +35,6 @@
</
template
>
<
script
>
// 更改默认商户 接口联调
import
{
getRequest
}
from
'@/api/api.js'
;
import
errorMsg
from
'@/common/js/error.js'
;
import
expiredDialog
from
'@/components/company/expired-dialog.vue'
;
...
...
@@ -51,7 +50,6 @@ export default {
},
storeList
:
[],
activedStoreId
:
''
,
defaultStoreId
:
''
,
isExpired
:
false
};
},
...
...
@@ -85,10 +83,9 @@ export default {
this
.
$emit
(
'changeStore'
,
true
);
getRequest
(
'/haoban-manage3-web/enterprise-is-over'
,
{
enterpriseId
})
.
then
(
res
=>
{
let
resData
=
res
.
data
;
const
{
errorCode
,
result
}
=
res
.
data
||
{};
if
(
errorCode
!=
1
)
{
errorMsg
.
errorMsg
(
res
D
ata
);
errorMsg
.
errorMsg
(
res
.
d
ata
);
return
;
}
this
.
isExpired
=
result
;
...
...
@@ -104,9 +101,22 @@ export default {
// onClosed() {},
onSave
()
{
this
.
changeStore
.
loading
=
true
;
getRequest
(
'/haoban-manage3-web/set-default-gicenterprise'
,
{
enterpriseId
:
this
.
changeStore
.
storeId
})
.
then
(
res
=>
{
const
{
errorCode
}
=
res
.
data
||
{};
if
(
errorCode
!=
1
)
{
errorMsg
.
errorMsg
(
res
.
data
);
return
;
}
this
.
getStoreList
();
this
.
changeStore
.
show
=
false
;
this
.
$message
.
succes
(
'设置成功'
);
})
.
finally
(()
=>
{
setTimeout
(()
=>
{
this
.
changeStore
.
loading
=
false
;
},
1000
);
},
100
);
});
}
}
};
...
...
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