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
62cb9e7d
Commit
62cb9e7d
authored
May 25, 2022
by
lixiaomin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改商铺
parent
0c2339ca
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
119 additions
and
17 deletions
+119
-17
src/api/system/shop.js
+18
-0
src/components/order/orderDetial.vue
+0
-0
src/views/order/order/index.vue
+4
-0
src/views/shop/shop/components/TodaySpecial.vue
+21
-2
src/views/shop/shop/components/addRecommend.vue
+16
-6
src/views/shop/shop/components/commodity.vue
+38
-7
src/views/shop/shop/components/recommend.vue
+21
-2
src/views/shop/shop/setShop.vue
+1
-0
No files found.
src/api/system/shop.js
View file @
62cb9e7d
...
...
@@ -121,3 +121,21 @@ export function offGoods(data) {
data
:
data
});
}
// 查询商品排序列表
export
function
turnList
(
query
)
{
return
request
({
url
:
"/system/shop/turn"
,
method
:
"get"
,
params
:
query
,
});
}
// 查询推荐、特惠排序列表
export
function
turnRecommendList
(
query
)
{
return
request
({
url
:
"/system/recommend/turn"
,
method
:
"get"
,
params
:
query
,
});
}
src/components/order/orderDetial.vue
0 → 100644
View file @
62cb9e7d
This diff is collapsed.
Click to expand it.
src/views/order/order/index.vue
View file @
62cb9e7d
...
...
@@ -73,6 +73,7 @@
<pagination
v-show=
"total > 0"
:total=
"total"
:page
.
sync=
"queryParams.pageNum"
:limit
.
sync=
"queryParams.pageSize"
@
pagination=
"getList"
/>
<!-- <OrderDetial ref="orderDetial"></OrderDetial> -->
<!-- 详情对话框 -->
<el-dialog
:title=
"title"
:visible
.
sync=
"open"
width=
"1000px"
append-to-body
>
<el-tabs
v-model=
"activeName"
@
tab-click=
"handleClick"
>
...
...
@@ -197,9 +198,11 @@
<
script
>
import
{
listOrder
,
getOrder
,
getLogList
,
refund
}
from
"@/api/system/order"
;
import
{
listShop
}
from
"@/api/system/shop"
;
import
OrderDetial
from
'@/components/order/orderDetial.vue'
;
import
piovince
from
'@/utils/piovince'
;
export
default
{
name
:
"Order"
,
components
:
{
OrderDetial
},
data
()
{
var
validateRefundAmount
=
(
rule
,
value
,
callback
)
=>
{
var
regular
=
/
(
^
[
+
]{0,1}([
0-9
]
+
)
$
)
|
(
^
[
+
]{0,1}([
0-9
]
+
)[\.]{1}[
0-9
]{1,2}
$
)
/
;
//正数 ,小数可有可无,最多2位
...
...
@@ -443,6 +446,7 @@ export default {
},
/** 详情按钮操作 */
handleUpdate
(
row
)
{
//this.$refs.orderDetial.handleUpdate(row);
this
.
refundTag
=
false
;
this
.
goodsList
=
[];
this
.
orderId
=
row
.
id
;
...
...
src/views/shop/shop/components/TodaySpecial.vue
View file @
62cb9e7d
...
...
@@ -14,8 +14,20 @@
<el-table-column
label=
"商品分类"
align=
"center"
prop=
"categoryName"
width=
"100"
/>
<el-table-column
label=
"折扣价"
align=
"center"
prop=
"discount"
/>
<el-table-column
label=
"原价"
align=
"center"
prop=
"price"
/>
<el-table-column
label=
"
销售总
量"
align=
"center"
prop=
"salesVolume"
/>
<el-table-column
label=
"
总销
量"
align=
"center"
prop=
"salesVolume"
/>
<el-table-column
label=
"推荐时间"
align=
"center"
prop=
"recDate"
/>
<el-table-column
label=
"推荐排序"
>
<
template
slot-scope=
"scope"
>
<div
style=
"display: flex;"
>
<div>
<el-button
v-show=
"scope.$index!=0"
size=
"mini"
round
icon=
"el-icon-arrow-up"
@
click=
"turnClick(scope.row,'1')"
></el-button>
</div>
<div>
<el-button
v-show=
"scope.$index+1!=total"
size=
"mini"
round
icon=
"el-icon-arrow-down"
@
click=
"turnClick(scope.row,'2')"
></el-button>
</div>
</div>
</
template
>
</el-table-column>
<el-table-column
label=
"操作"
align=
"center"
class-name=
"small-padding fixed-width"
>
<
template
slot-scope=
"scope"
>
<el-popconfirm
title=
"确定要移除吗?"
@
confirm=
"removeRecommend(scope.row)"
>
...
...
@@ -32,7 +44,7 @@
</template>
<
script
>
import
{
recommendList
,
removeRecommend
}
from
'@/api/system/shop'
import
{
recommendList
,
removeRecommend
,
turnRecommendList
}
from
'@/api/system/shop'
export
default
{
props
:
[
'shopId'
],
data
()
{
...
...
@@ -56,6 +68,13 @@ export default {
//this.getList()
},
methods
:
{
turnClick
(
row
,
tag
){
turnRecommendList
({
"shopId"
:
this
.
shopId
,
"goodsId"
:
row
.
id
,
"pointer"
:
tag
,
"type"
:
2
}).
then
((
response
)
=>
{
if
(
response
.
code
==
"200"
){
this
.
getList
();
}
});
},
getList
()
{
this
.
loading
=
true
;
recommendList
({
...
this
.
queryParams
,
shopId
:
this
.
shopId
,
type
:
2
}).
then
(
response
=>
{
...
...
src/views/shop/shop/components/addRecommend.vue
View file @
62cb9e7d
...
...
@@ -17,7 +17,7 @@
<el-form-item
label=
"简述"
prop=
"desc"
>
<el-input
v-model=
"form.desc"
placeholder=
"请输入店铺地址"
/>
</el-form-item>
<el-form-item
label=
"推荐图"
prop=
"
remarks
"
>
<el-form-item
label=
"推荐图"
prop=
"
pic
"
>
<ImageUpload
:value=
"form.pic"
v-model=
"form.pic"
:limit=
"1"
/>
</el-form-item>
</el-form>
...
...
@@ -34,17 +34,21 @@ export default {
props
:
[
'shopId'
],
data
()
{
return
{
form
:
{},
form
:
{
name
:
""
,
desc
:
""
,
pic
:
""
},
open
:
false
,
rules
:
{
name
:
[
{
required
:
true
,
message
:
"不能为空"
,
trigger
:
"
change
"
},
{
required
:
true
,
message
:
"不能为空"
,
trigger
:
"
blur
"
},
],
desc
:
[
{
required
:
true
,
message
:
"不能为空"
,
trigger
:
"
change
"
},
{
required
:
true
,
message
:
"不能为空"
,
trigger
:
"
blur
"
},
],
pic
:
[
{
required
:
true
,
message
:
"不能为空"
,
trigger
:
"
change
"
},
{
required
:
true
,
message
:
"不能为空"
,
trigger
:
"
blur
"
},
],
},
...
...
@@ -56,8 +60,12 @@ export default {
this
.
$refs
[
"form"
].
validate
((
valid
)
=>
{
if
(
valid
)
{
addRecommend
(
this
.
form
).
then
((
res
)
=>
{
if
(
res
.
code
==
"200"
){
this
.
$emit
(
"getList"
);
this
.
$modal
.
msgSuccess
(
"推荐成功"
);
this
.
open
=
false
;
}
});
}
});
...
...
@@ -73,13 +81,15 @@ export default {
this
.
resetForm
(
"form"
);
},
openModal
(
data
)
{
this
.
form
.
name
=
null
;
this
.
form
.
desc
=
null
;
this
.
form
.
pic
=
null
;
this
.
form
.
goodsName
=
data
.
name
this
.
form
.
price
=
data
.
price
this
.
form
.
discount
=
data
.
discount
this
.
form
.
shopId
=
this
.
shopId
this
.
form
.
goodsId
=
data
.
id
this
.
form
.
type
=
1
this
.
open
=
true
}
...
...
src/views/shop/shop/components/commodity.vue
View file @
62cb9e7d
<
template
>
<div>
<SelectGoods
ref=
"selectGoods"
@
callback=
"selectGoos"
/>
<AddRecommend
:shopId=
"shopId"
ref=
"addRecommend"
/>
<AddRecommend
:shopId=
"shopId"
ref=
"addRecommend"
@
getList=
"getList"
/>
<Preferential
:shopId=
"shopId"
ref=
"preferential"
/>
<el-row
:gutter=
"10"
class=
"mb8"
>
...
...
@@ -51,7 +51,17 @@
<span
v-if=
"scope.row.state == 2"
>
告罄
</span>
</
template
>
</el-table-column>
<el-table-column
label=
"排序"
align=
"center"
>
<el-table-column
label=
"排序"
>
<
template
slot-scope=
"scope"
>
<div
style=
"display: flex;"
>
<div>
<el-button
v-show=
"scope.$index!=0"
size=
"mini"
round
icon=
"el-icon-arrow-up"
@
click=
"turnClick(scope.row,'1')"
></el-button>
</div>
<div>
<el-button
v-show=
"scope.$index+1!=total"
size=
"mini"
round
icon=
"el-icon-arrow-down"
@
click=
"turnClick(scope.row,'2')"
></el-button>
</div>
</div>
</
template
>
</el-table-column>
<el-table-column
label=
"操作"
align=
"center"
class-name=
"small-padding fixed-width"
>
<
template
slot-scope=
"scope"
>
...
...
@@ -68,7 +78,7 @@
</template>
<
script
>
import
{
getCategoryGoods
,
addGoods
,
offGoods
}
from
"@/api/system/shop"
;
import
{
getCategoryGoods
,
addGoods
,
offGoods
,
turnList
}
from
"@/api/system/shop"
;
import
SelectGoods
from
'@/components/SelectGoods'
;
import
AddRecommend
from
'./addRecommend.vue'
import
Preferential
from
'./preferential.vue'
;
...
...
@@ -90,13 +100,21 @@ export default {
list
:
[],
options
:
[],
btnId
:
''
,
outIds
:
''
outIds
:
''
,
total
:
null
}
},
mounted
()
{
//this.getList()
},
methods
:
{
turnClick
(
row
,
tag
){
turnList
({
"shopId"
:
this
.
shopId
,
"goodsId"
:
row
.
id
,
"pointer"
:
tag
}).
then
((
response
)
=>
{
if
(
response
.
code
==
"200"
){
this
.
getList
();
}
});
},
getPicsList
(
str
){
let
picObj
=
JSON
.
parse
(
str
);
return
picObj
.
thumbnail
...
...
@@ -115,7 +133,8 @@ export default {
},
setData
(
data
)
{
this
.
list
=
data
.
goodsList
;
this
.
btnId
=
data
.
id
this
.
btnId
=
data
.
id
;
this
.
total
=
this
.
list
.
length
;
},
getList
()
{
if
(
!
this
.
shopId
)
return
;
...
...
@@ -123,8 +142,19 @@ export default {
getCategoryGoods
(
this
.
shopId
).
then
(({
data
})
=>
{
if
(
data
&&
data
.
length
>
0
)
{
this
.
options
=
data
;
if
(
this
.
btnId
==
''
){
this
.
list
=
data
[
0
].
goodsList
;
this
.
btnId
=
data
[
0
].
id
this
.
btnId
=
data
[
0
].
id
;
}
else
{
for
(
let
i
=
0
;
i
<
data
.
length
;
i
++
){
if
(
this
.
btnId
==
data
[
i
].
id
){
this
.
list
=
data
[
i
].
goodsList
;
}
}
}
this
.
total
=
this
.
list
.
length
;
}
else
{
this
.
options
=
[];
}
})
},
...
...
@@ -133,7 +163,8 @@ export default {
this
.
outIds
=
selection
.
map
((
item
)
=>
item
.
id
);
},
soldOutGoos
(){
if
(
!
this
.
outIds
){
console
.
log
(
"this.outIds"
,
this
.
outIds
)
if
(
this
.
outIds
.
length
==
0
){
this
.
$message
.
error
(
'请选择所需下架的商品!'
);
return
;
}
...
...
src/views/shop/shop/components/recommend.vue
View file @
62cb9e7d
...
...
@@ -14,8 +14,20 @@
<el-table-column
label=
"商品分类"
align=
"center"
prop=
"categoryName"
width=
"100"
/>
<el-table-column
label=
"折扣价"
align=
"center"
prop=
"discount"
/>
<el-table-column
label=
"原价"
align=
"center"
prop=
"price"
/>
<el-table-column
label=
"
销售总量
"
align=
"center"
prop=
"salesVolume"
/>
<el-table-column
label=
"
总销售
"
align=
"center"
prop=
"salesVolume"
/>
<el-table-column
label=
"推荐时间"
align=
"center"
prop=
"recDate"
/>
<el-table-column
label=
"推荐排序"
>
<
template
slot-scope=
"scope"
>
<div
style=
"display: flex;"
>
<div>
<el-button
v-show=
"scope.$index!=0"
size=
"mini"
round
icon=
"el-icon-arrow-up"
@
click=
"turnClick(scope.row,'1')"
></el-button>
</div>
<div>
<el-button
v-show=
"scope.$index+1!=total"
size=
"mini"
round
icon=
"el-icon-arrow-down"
@
click=
"turnClick(scope.row,'2')"
></el-button>
</div>
</div>
</
template
>
</el-table-column>
<el-table-column
label=
"操作"
align=
"center"
class-name=
"small-padding fixed-width"
>
<
template
slot-scope=
"scope"
>
<el-popconfirm
title=
"确定要移除吗?"
@
confirm=
"removeRecommend(scope.row)"
>
...
...
@@ -32,7 +44,7 @@
</template>
<
script
>
import
{
recommendList
,
removeRecommend
}
from
'@/api/system/shop'
import
{
recommendList
,
removeRecommend
,
turnRecommendList
}
from
'@/api/system/shop'
export
default
{
props
:
[
'shopId'
],
data
()
{
...
...
@@ -56,6 +68,13 @@ export default {
//this.getList()
},
methods
:
{
turnClick
(
row
,
tag
){
turnRecommendList
({
"shopId"
:
this
.
shopId
,
"goodsId"
:
row
.
id
,
"pointer"
:
tag
,
"type"
:
1
}).
then
((
response
)
=>
{
if
(
response
.
code
==
"200"
){
this
.
getList
();
}
});
},
getPicsList
(
str
){
let
picObj
=
JSON
.
parse
(
str
);
return
picObj
.
thumbnail
...
...
src/views/shop/shop/setShop.vue
View file @
62cb9e7d
...
...
@@ -43,6 +43,7 @@ export default {
this
.
$refs
.
Machine
.
getList
()
}
if
(
value
==
'third'
)
{
this
.
$refs
.
Commodity
.
btnId
=
''
;
this
.
$refs
.
Commodity
.
getList
()
}
if
(
value
==
'fourth'
)
{
...
...
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