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
1972f16f
Commit
1972f16f
authored
Sep 24, 2022
by
lixiaomin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改店铺商品限制
parent
029a3a72
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
3 deletions
+20
-3
src/api/system/shop.js
+7
-0
src/views/shop/shop/components/commodity.vue
+13
-3
No files found.
src/api/system/shop.js
View file @
1972f16f
...
...
@@ -167,3 +167,10 @@ export function testStart(shopId){
});
}
// 店铺是否绑定机器
export
function
checkMachine
(
id
)
{
return
request
({
url
:
"/system/machine/bind/check/"
+
id
,
method
:
"get"
,
});
}
src/views/shop/shop/components/commodity.vue
View file @
1972f16f
...
...
@@ -11,7 +11,7 @@
</el-button>
</el-col>
<el-col
:span=
"6"
>
<el-button
type=
"primary"
@
click=
"openSelectGoos"
plain
icon=
"el-icon-plus"
size=
"small"
>
添加商品
<el-button
type=
"primary"
@
click=
"openSelectGoos"
plain
icon=
"el-icon-plus"
size=
"small"
:disabled=
"showButton"
>
添加商品
</el-button>
<el-button
type=
"danger"
@
click=
"soldOutGoos"
plain
icon=
"el-icon-minus"
size=
"small"
>
下架商品
</el-button>
</el-col>
...
...
@@ -88,7 +88,7 @@
</template>
<
script
>
import
{
getCategoryGoods
,
addGoods
,
offGoods
,
turnList
}
from
"@/api/system/shop"
;
import
{
getCategoryGoods
,
addGoods
,
offGoods
,
turnList
,
checkMachine
}
from
"@/api/system/shop"
;
import
SelectGoods
from
'@/components/SelectGoods'
;
import
AddRecommend
from
'./addRecommend.vue'
import
Preferential
from
'./preferential.vue'
;
...
...
@@ -115,7 +115,8 @@ export default {
btnId
:
''
,
outIds
:
''
,
total
:
null
,
goodsList
:[]
goodsList
:[],
showButton
:
true
}
},
mounted
()
{
...
...
@@ -154,6 +155,9 @@ export default {
},
getList
()
{
if
(
!
this
.
shopId
)
return
;
checkMachine
(
this
.
shopId
).
then
(({
data
})
=>
{
if
(
data
){
this
.
showButton
=
false
;
this
.
list
=
[];
getCategoryGoods
(
this
.
shopId
).
then
(({
data
})
=>
{
if
(
data
&&
data
.
length
>
0
)
{
...
...
@@ -175,6 +179,12 @@ export default {
this
.
options
=
[];
}
})
}
else
{
this
.
$message
.
error
(
'请先绑定店铺机器!'
);
this
.
showButton
=
true
;
}
})
},
// 多选框选中数据
handleSelectionChange
(
selection
)
{
...
...
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