Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
soss
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
hooloo
web
soss
Commits
52c0826d
Commit
52c0826d
authored
Mar 20, 2023
by
lixiaomin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
店铺和商品列表按钮v-if改成v-show
parent
b9840196
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
76 additions
and
28 deletions
+76
-28
dist.zip
+0
-0
src/api/system/shop.js
+32
-0
src/views/goods/goods/index.vue
+5
-5
src/views/order/order/index.vue
+1
-1
src/views/shop/shop/index.vue
+38
-22
No files found.
dist.zip
0 → 100644
View file @
52c0826d
File added
src/api/system/shop.js
View file @
52c0826d
...
@@ -191,3 +191,35 @@ export function updateSpecState(ids,state,shopId,goodsId) {
...
@@ -191,3 +191,35 @@ export function updateSpecState(ids,state,shopId,goodsId) {
method
:
"get"
,
method
:
"get"
,
});
});
}
}
// 店铺开始营业
export
function
shopOpen
(
id
)
{
return
request
({
url
:
"/system/shop/open/"
+
id
,
method
:
"get"
,
});
}
// 店铺关闭营业
export
function
shopClose
(
id
)
{
return
request
({
url
:
"/system/shop/close/"
+
id
,
method
:
"get"
,
});
}
// 店铺恢复营业
export
function
shopRestore
(
id
)
{
return
request
({
url
:
"/system/shop/restore/"
+
id
,
method
:
"get"
,
});
}
// 店铺设置默认
export
function
shopDefault
(
id
)
{
return
request
({
url
:
"/system/shop/default/"
+
id
,
method
:
"get"
,
});
}
src/views/goods/goods/index.vue
View file @
52c0826d
...
@@ -72,14 +72,14 @@
...
@@ -72,14 +72,14 @@
<el-table-column
label=
"操作"
align=
"center"
class-name=
"small-padding fixed-width"
>
<el-table-column
label=
"操作"
align=
"center"
class-name=
"small-padding fixed-width"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<el-button
size=
"mini"
type=
"text"
@
click=
"handleUpdateState(scope.row)"
<el-button
size=
"mini"
type=
"text"
@
click=
"handleUpdateState(scope.row)"
v-
if
=
"authBtn(['1'], scope.row.state)"
v-hasPermi=
"['system:goods:finish']"
>
已完成编程
</el-button>
v-
show
=
"authBtn(['1'], scope.row.state)"
v-hasPermi=
"['system:goods:finish']"
>
已完成编程
</el-button>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-delete"
@
click=
"handleDelete(scope.row)"
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-delete"
@
click=
"handleDelete(scope.row)"
v-
if
=
"authBtn(['1', '2', '3', '4'], scope.row.state)"
v-hasPermi=
"['system:goods:remove']"
>
删除
</el-button>
v-
show
=
"authBtn(['1', '2', '3', '4'], scope.row.state)"
v-hasPermi=
"['system:goods:remove']"
>
删除
</el-button>
<el-button
size=
"mini"
type=
"text"
v-
if
=
"authBtn(['2', '4'], scope.row.state)"
<el-button
size=
"mini"
type=
"text"
v-
show
=
"authBtn(['2', '4'], scope.row.state)"
@
click=
"putShopOffShop(scope.row.id, true)"
v-hasPermi=
"['system:goods:up']"
>
上架
</el-button>
@
click=
"putShopOffShop(scope.row.id, true)"
v-hasPermi=
"['system:goods:up']"
>
上架
</el-button>
<el-button
size=
"mini"
type=
"text"
v-
if
=
"authBtn(['3'], scope.row.state)"
<el-button
size=
"mini"
type=
"text"
v-
show
=
"authBtn(['3'], scope.row.state)"
@
click=
"putShopOffShop(scope.row.id)"
v-hasPermi=
"['system:goods:down']"
>
下架
</el-button>
@
click=
"putShopOffShop(scope.row.id)"
v-hasPermi=
"['system:goods:down']"
>
下架
</el-button>
<el-button
size=
"mini"
type=
"text"
v-
if
=
"authBtn(['5'], scope.row.state)"
@
click=
"restGoods(scope.row)"
<el-button
size=
"mini"
type=
"text"
v-
show
=
"authBtn(['5'], scope.row.state)"
@
click=
"restGoods(scope.row)"
v-hasPermi=
"['system:goods:recover']"
>
恢复
v-hasPermi=
"['system:goods:recover']"
>
恢复
</el-button>
</el-button>
</
template
>
</
template
>
...
...
src/views/order/order/index.vue
View file @
52c0826d
...
@@ -69,7 +69,7 @@
...
@@ -69,7 +69,7 @@
</el-table-column>
</el-table-column>
<el-table-column
width=
"200"
label=
"操作"
align=
"center"
class-name=
"small-padding fixed-width"
>
<el-table-column
width=
"200"
label=
"操作"
align=
"center"
class-name=
"small-padding fixed-width"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<el-button
size=
"mini"
type=
"text"
v-
if
=
"authBtn(['2','3','4','5','6','7','10','13','14'], scope.row.state)"
<el-button
size=
"mini"
type=
"text"
v-
show
=
"authBtn(['2','3','4','5','6','7','10','13','14'], scope.row.state)"
@
click=
"refundClick(scope.row)"
v-hasPermi=
"['system:order:refund']"
>
退款
</el-button>
@
click=
"refundClick(scope.row)"
v-hasPermi=
"['system:order:refund']"
>
退款
</el-button>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
...
...
src/views/shop/shop/index.vue
View file @
52c0826d
...
@@ -80,17 +80,17 @@
...
@@ -80,17 +80,17 @@
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<el-button
v-show=
"scope.row.state !=3"
size=
"mini"
type=
"text"
icon=
"el-icon-delete"
@
click=
"handleDelete(scope.row)"
<el-button
v-show=
"scope.row.state !=3"
size=
"mini"
type=
"text"
icon=
"el-icon-delete"
@
click=
"handleDelete(scope.row)"
v-hasPermi=
"['system:shop:remove']"
>
删除
</el-button>
v-hasPermi=
"['system:shop:remove']"
>
删除
</el-button>
<el-button
size=
"mini"
type=
"text"
v-
if
=
"authBtn([1], scope.row.state)"
<el-button
size=
"mini"
type=
"text"
v-
show
=
"authBtn([1], scope.row.state)"
@
click=
"s
etShopState(scope.row, 2, 'setState'
)"
v-hasPermi=
"['system:shop:suspended']"
>
@
click=
"s
hopClose(scope.row
)"
v-hasPermi=
"['system:shop:suspended']"
>
暂停营业
</el-button>
暂停营业
</el-button>
<el-button
size=
"mini"
type=
"text"
v-
if
=
"authBtn([2], scope.row.state)"
<el-button
size=
"mini"
type=
"text"
v-
show
=
"authBtn([2], scope.row.state)"
@
click=
"s
etShopState(scope.row, 1, 'setState'
)"
v-hasPermi=
"['system:shop:start']"
>
开始营业
</el-button>
@
click=
"s
hopOpen(scope.row
)"
v-hasPermi=
"['system:shop:start']"
>
开始营业
</el-button>
<el-button
size=
"mini"
type=
"text"
v-
if
=
"authBtn([3], scope.row.state)"
<el-button
size=
"mini"
type=
"text"
v-
show
=
"authBtn([3], scope.row.state)"
@
click=
"s
etShopState(scope.row, 1, 'setState'
)"
v-hasPermi=
"['system:shop:restart']"
>
恢复营业
</el-button>
@
click=
"s
hopRestore(scope.row
)"
v-hasPermi=
"['system:shop:restart']"
>
恢复营业
</el-button>
<el-button
v-show=
"scope.row.isDefault==0"
size=
"mini"
type=
"text"
@
click=
"s
etShopState
(scope.row)"
v-hasPermi=
"['system:shop:default']"
>
设为默认
</el-button>
<el-button
v-show=
"scope.row.isDefault==0"
size=
"mini"
type=
"text"
@
click=
"s
hopDefault
(scope.row)"
v-hasPermi=
"['system:shop:default']"
>
设为默认
</el-button>
<el-button
size=
"mini"
type=
"text"
v-
if
=
"authBtn([0], scope.row.state)"
<el-button
size=
"mini"
type=
"text"
v-
show
=
"authBtn([0], scope.row.state)"
@
click=
"testFinish(scope.row)"
v-hasPermi=
"['system:shop:testFinish']"
>
测试完成
</el-button>
@
click=
"testFinish(scope.row)"
v-hasPermi=
"['system:shop:testFinish']"
>
测试完成
</el-button>
<el-button
size=
"mini"
type=
"text"
v-
if
=
"authBtn([2], scope.row.state)"
<el-button
size=
"mini"
type=
"text"
v-
show
=
"authBtn([2], scope.row.state)"
@
click=
"testStart(scope.row)"
v-hasPermi=
"['system:shop:testStart']"
>
开始测试
</el-button>
@
click=
"testStart(scope.row)"
v-hasPermi=
"['system:shop:testStart']"
>
开始测试
</el-button>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
...
@@ -102,7 +102,7 @@
...
@@ -102,7 +102,7 @@
</template>
</template>
<
script
>
<
script
>
import
{
listShop
,
delShop
,
updateShop
,
getShopCity
,
testFinish
,
testStart
}
from
"@/api/system/shop"
;
import
{
listShop
,
delShop
,
updateShop
,
getShopCity
,
testFinish
,
testStart
,
shopOpen
,
shopClose
,
shopRestore
,
shopDefault
}
from
"@/api/system/shop"
;
import
SetShop
from
'./setShop'
;
import
SetShop
from
'./setShop'
;
import
piovince
from
'@/utils/piovince'
import
piovince
from
'@/utils/piovince'
export
default
{
export
default
{
...
@@ -253,21 +253,37 @@ export default {
...
@@ -253,21 +253,37 @@ export default {
openSet
(
id
)
{
openSet
(
id
)
{
this
.
$refs
.
setShop
.
openModal
(
id
)
this
.
$refs
.
setShop
.
openModal
(
id
)
},
},
setShopState
(
data
,
state
,
type
)
{
shopOpen
(
row
){
let
params
=
{
...
data
}
shopOpen
(
row
.
id
).
then
(
res
=>
{
if
(
type
==
'setState'
)
{
params
.
state
=
state
;
params
.
isDelete
=
'0'
;
}
else
{
params
.
isDefault
=
1
}
updateShop
(
params
).
then
(
res
=>
{
if
(
res
.
code
=
"200"
){
if
(
res
.
code
=
"200"
){
this
.
$modal
.
msgSuccess
(
"操作成功!"
);
this
.
getList
();
this
.
getList
();
}
}
})
},
shopClose
(
row
){
shopClose
(
row
.
id
).
then
(
res
=>
{
if
(
res
.
code
=
"200"
){
this
.
$modal
.
msgSuccess
(
"操作成功!"
);
this
.
getList
();
}
})
},
shopRestore
(
row
){
shopRestore
(
row
.
id
).
then
(
res
=>
{
if
(
res
.
code
=
"200"
){
this
.
$modal
.
msgSuccess
(
"操作成功!"
);
this
.
getList
();
}
})
},
shopDefault
(
row
){
shopDefault
(
row
.
id
).
then
(
res
=>
{
if
(
res
.
code
=
"200"
){
this
.
$modal
.
msgSuccess
(
"操作成功!"
);
this
.
getList
();
}
})
})
},
},
//测试完成
//测试完成
testFinish
(
row
){
testFinish
(
row
){
...
...
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