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
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
128 additions
and
26 deletions
+128
-26
src/api/system/shop.js
+18
-0
src/components/order/orderDetial.vue
+0
-0
src/views/order/order/index.vue
+5
-1
src/views/shop/shop/components/TodaySpecial.vue
+21
-2
src/views/shop/shop/components/addRecommend.vue
+19
-9
src/views/shop/shop/components/commodity.vue
+43
-12
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) {
...
@@ -121,3 +121,21 @@ export function offGoods(data) {
data
:
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 @@
...
@@ -73,6 +73,7 @@
<pagination
v-show=
"total > 0"
:total=
"total"
:page
.
sync=
"queryParams.pageNum"
:limit
.
sync=
"queryParams.pageSize"
<pagination
v-show=
"total > 0"
:total=
"total"
:page
.
sync=
"queryParams.pageNum"
:limit
.
sync=
"queryParams.pageSize"
@
pagination=
"getList"
/>
@
pagination=
"getList"
/>
<!-- <OrderDetial ref="orderDetial"></OrderDetial> -->
<!-- 详情对话框 -->
<!-- 详情对话框 -->
<el-dialog
:title=
"title"
:visible
.
sync=
"open"
width=
"1000px"
append-to-body
>
<el-dialog
:title=
"title"
:visible
.
sync=
"open"
width=
"1000px"
append-to-body
>
<el-tabs
v-model=
"activeName"
@
tab-click=
"handleClick"
>
<el-tabs
v-model=
"activeName"
@
tab-click=
"handleClick"
>
...
@@ -190,16 +191,18 @@
...
@@ -190,16 +191,18 @@
<el-button
v-show=
"refundTag"
type=
"danger"
@
click=
"refundSubmit"
>
退款
</el-button>
<el-button
v-show=
"refundTag"
type=
"danger"
@
click=
"refundSubmit"
>
退款
</el-button>
<el-button
@
click=
"cancel"
>
取 消
</el-button>
<el-button
@
click=
"cancel"
>
取 消
</el-button>
</div>
</div>
</el-dialog>
</el-dialog>
</div>
</div>
</template>
</template>
<
script
>
<
script
>
import
{
listOrder
,
getOrder
,
getLogList
,
refund
}
from
"@/api/system/order"
;
import
{
listOrder
,
getOrder
,
getLogList
,
refund
}
from
"@/api/system/order"
;
import
{
listShop
}
from
"@/api/system/shop"
;
import
{
listShop
}
from
"@/api/system/shop"
;
import
OrderDetial
from
'@/components/order/orderDetial.vue'
;
import
piovince
from
'@/utils/piovince'
;
import
piovince
from
'@/utils/piovince'
;
export
default
{
export
default
{
name
:
"Order"
,
name
:
"Order"
,
components
:
{
OrderDetial
},
data
()
{
data
()
{
var
validateRefundAmount
=
(
rule
,
value
,
callback
)
=>
{
var
validateRefundAmount
=
(
rule
,
value
,
callback
)
=>
{
var
regular
=
/
(
^
[
+
]{0,1}([
0-9
]
+
)
$
)
|
(
^
[
+
]{0,1}([
0-9
]
+
)[\.]{1}[
0-9
]{1,2}
$
)
/
;
//正数 ,小数可有可无,最多2位
var
regular
=
/
(
^
[
+
]{0,1}([
0-9
]
+
)
$
)
|
(
^
[
+
]{0,1}([
0-9
]
+
)[\.]{1}[
0-9
]{1,2}
$
)
/
;
//正数 ,小数可有可无,最多2位
...
@@ -443,6 +446,7 @@ export default {
...
@@ -443,6 +446,7 @@ export default {
},
},
/** 详情按钮操作 */
/** 详情按钮操作 */
handleUpdate
(
row
)
{
handleUpdate
(
row
)
{
//this.$refs.orderDetial.handleUpdate(row);
this
.
refundTag
=
false
;
this
.
refundTag
=
false
;
this
.
goodsList
=
[];
this
.
goodsList
=
[];
this
.
orderId
=
row
.
id
;
this
.
orderId
=
row
.
id
;
...
...
src/views/shop/shop/components/TodaySpecial.vue
View file @
62cb9e7d
...
@@ -14,8 +14,20 @@
...
@@ -14,8 +14,20 @@
<el-table-column
label=
"商品分类"
align=
"center"
prop=
"categoryName"
width=
"100"
/>
<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=
"discount"
/>
<el-table-column
label=
"原价"
align=
"center"
prop=
"price"
/>
<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=
"推荐时间"
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"
>
<el-table-column
label=
"操作"
align=
"center"
class-name=
"small-padding fixed-width"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<el-popconfirm
title=
"确定要移除吗?"
@
confirm=
"removeRecommend(scope.row)"
>
<el-popconfirm
title=
"确定要移除吗?"
@
confirm=
"removeRecommend(scope.row)"
>
...
@@ -32,7 +44,7 @@
...
@@ -32,7 +44,7 @@
</template>
</template>
<
script
>
<
script
>
import
{
recommendList
,
removeRecommend
}
from
'@/api/system/shop'
import
{
recommendList
,
removeRecommend
,
turnRecommendList
}
from
'@/api/system/shop'
export
default
{
export
default
{
props
:
[
'shopId'
],
props
:
[
'shopId'
],
data
()
{
data
()
{
...
@@ -56,6 +68,13 @@ export default {
...
@@ -56,6 +68,13 @@ export default {
//this.getList()
//this.getList()
},
},
methods
:
{
methods
:
{
turnClick
(
row
,
tag
){
turnRecommendList
({
"shopId"
:
this
.
shopId
,
"goodsId"
:
row
.
id
,
"pointer"
:
tag
,
"type"
:
2
}).
then
((
response
)
=>
{
if
(
response
.
code
==
"200"
){
this
.
getList
();
}
});
},
getList
()
{
getList
()
{
this
.
loading
=
true
;
this
.
loading
=
true
;
recommendList
({
...
this
.
queryParams
,
shopId
:
this
.
shopId
,
type
:
2
}).
then
(
response
=>
{
recommendList
({
...
this
.
queryParams
,
shopId
:
this
.
shopId
,
type
:
2
}).
then
(
response
=>
{
...
...
src/views/shop/shop/components/addRecommend.vue
View file @
62cb9e7d
...
@@ -17,7 +17,7 @@
...
@@ -17,7 +17,7 @@
<el-form-item
label=
"简述"
prop=
"desc"
>
<el-form-item
label=
"简述"
prop=
"desc"
>
<el-input
v-model=
"form.desc"
placeholder=
"请输入店铺地址"
/>
<el-input
v-model=
"form.desc"
placeholder=
"请输入店铺地址"
/>
</el-form-item>
</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"
/>
<ImageUpload
:value=
"form.pic"
v-model=
"form.pic"
:limit=
"1"
/>
</el-form-item>
</el-form-item>
</el-form>
</el-form>
...
@@ -34,17 +34,21 @@ export default {
...
@@ -34,17 +34,21 @@ export default {
props
:
[
'shopId'
],
props
:
[
'shopId'
],
data
()
{
data
()
{
return
{
return
{
form
:
{},
form
:
{
name
:
""
,
desc
:
""
,
pic
:
""
},
open
:
false
,
open
:
false
,
rules
:
{
rules
:
{
name
:
[
name
:
[
{
required
:
true
,
message
:
"不能为空"
,
trigger
:
"
change
"
},
{
required
:
true
,
message
:
"不能为空"
,
trigger
:
"
blur
"
},
],
],
desc
:
[
desc
:
[
{
required
:
true
,
message
:
"不能为空"
,
trigger
:
"
change
"
},
{
required
:
true
,
message
:
"不能为空"
,
trigger
:
"
blur
"
},
],
],
pic
:
[
pic
:
[
{
required
:
true
,
message
:
"不能为空"
,
trigger
:
"
change
"
},
{
required
:
true
,
message
:
"不能为空"
,
trigger
:
"
blur
"
},
],
],
},
},
...
@@ -56,8 +60,12 @@ export default {
...
@@ -56,8 +60,12 @@ export default {
this
.
$refs
[
"form"
].
validate
((
valid
)
=>
{
this
.
$refs
[
"form"
].
validate
((
valid
)
=>
{
if
(
valid
)
{
if
(
valid
)
{
addRecommend
(
this
.
form
).
then
((
res
)
=>
{
addRecommend
(
this
.
form
).
then
((
res
)
=>
{
this
.
$modal
.
msgSuccess
(
"推荐成功"
);
if
(
res
.
code
==
"200"
){
this
.
open
=
false
;
this
.
$emit
(
"getList"
);
this
.
$modal
.
msgSuccess
(
"推荐成功"
);
this
.
open
=
false
;
}
});
});
}
}
});
});
...
@@ -73,14 +81,16 @@ export default {
...
@@ -73,14 +81,16 @@ export default {
this
.
resetForm
(
"form"
);
this
.
resetForm
(
"form"
);
},
},
openModal
(
data
)
{
openModal
(
data
)
{
this
.
form
.
name
=
null
;
this
.
form
.
desc
=
null
;
this
.
form
.
pic
=
null
;
this
.
form
.
goodsName
=
data
.
name
this
.
form
.
goodsName
=
data
.
name
this
.
form
.
price
=
data
.
price
this
.
form
.
price
=
data
.
price
this
.
form
.
discount
=
data
.
discount
this
.
form
.
discount
=
data
.
discount
this
.
form
.
shopId
=
this
.
shopId
this
.
form
.
shopId
=
this
.
shopId
this
.
form
.
goodsId
=
data
.
id
this
.
form
.
goodsId
=
data
.
id
this
.
form
.
type
=
1
this
.
form
.
type
=
1
this
.
open
=
true
this
.
open
=
true
}
}
}
}
...
...
src/views/shop/shop/components/commodity.vue
View file @
62cb9e7d
<
template
>
<
template
>
<div>
<div>
<SelectGoods
ref=
"selectGoods"
@
callback=
"selectGoos"
/>
<SelectGoods
ref=
"selectGoods"
@
callback=
"selectGoos"
/>
<AddRecommend
:shopId=
"shopId"
ref=
"addRecommend"
/>
<AddRecommend
:shopId=
"shopId"
ref=
"addRecommend"
@
getList=
"getList"
/>
<Preferential
:shopId=
"shopId"
ref=
"preferential"
/>
<Preferential
:shopId=
"shopId"
ref=
"preferential"
/>
<el-row
:gutter=
"10"
class=
"mb8"
>
<el-row
:gutter=
"10"
class=
"mb8"
>
...
@@ -51,8 +51,18 @@
...
@@ -51,8 +51,18 @@
<span
v-if=
"scope.row.state == 2"
>
告罄
</span>
<span
v-if=
"scope.row.state == 2"
>
告罄
</span>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
label=
"排序"
align=
"center"
>
<el-table-column
label=
"排序"
>
</el-table-column>
<
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"
>
<el-table-column
label=
"操作"
align=
"center"
class-name=
"small-padding fixed-width"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<el-button
size=
"mini"
@
click=
"addRecommend(scope.row)"
type=
"text"
>
<el-button
size=
"mini"
@
click=
"addRecommend(scope.row)"
type=
"text"
>
...
@@ -68,7 +78,7 @@
...
@@ -68,7 +78,7 @@
</template>
</template>
<
script
>
<
script
>
import
{
getCategoryGoods
,
addGoods
,
offGoods
}
from
"@/api/system/shop"
;
import
{
getCategoryGoods
,
addGoods
,
offGoods
,
turnList
}
from
"@/api/system/shop"
;
import
SelectGoods
from
'@/components/SelectGoods'
;
import
SelectGoods
from
'@/components/SelectGoods'
;
import
AddRecommend
from
'./addRecommend.vue'
import
AddRecommend
from
'./addRecommend.vue'
import
Preferential
from
'./preferential.vue'
;
import
Preferential
from
'./preferential.vue'
;
...
@@ -90,13 +100,21 @@ export default {
...
@@ -90,13 +100,21 @@ export default {
list
:
[],
list
:
[],
options
:
[],
options
:
[],
btnId
:
''
,
btnId
:
''
,
outIds
:
''
outIds
:
''
,
total
:
null
}
}
},
},
mounted
()
{
mounted
()
{
//this.getList()
//this.getList()
},
},
methods
:
{
methods
:
{
turnClick
(
row
,
tag
){
turnList
({
"shopId"
:
this
.
shopId
,
"goodsId"
:
row
.
id
,
"pointer"
:
tag
}).
then
((
response
)
=>
{
if
(
response
.
code
==
"200"
){
this
.
getList
();
}
});
},
getPicsList
(
str
){
getPicsList
(
str
){
let
picObj
=
JSON
.
parse
(
str
);
let
picObj
=
JSON
.
parse
(
str
);
return
picObj
.
thumbnail
return
picObj
.
thumbnail
...
@@ -115,17 +133,29 @@ export default {
...
@@ -115,17 +133,29 @@ export default {
},
},
setData
(
data
)
{
setData
(
data
)
{
this
.
list
=
data
.
goodsList
;
this
.
list
=
data
.
goodsList
;
this
.
btnId
=
data
.
id
this
.
btnId
=
data
.
id
;
this
.
total
=
this
.
list
.
length
;
},
},
getList
()
{
getList
()
{
if
(
!
this
.
shopId
)
return
;
if
(
!
this
.
shopId
)
return
;
this
.
list
=
[];
this
.
list
=
[];
getCategoryGoods
(
this
.
shopId
).
then
(({
data
})
=>
{
getCategoryGoods
(
this
.
shopId
).
then
(({
data
})
=>
{
if
(
data
&&
data
.
length
>
0
)
{
if
(
data
&&
data
.
length
>
0
)
{
this
.
options
=
data
;
this
.
options
=
data
;
this
.
list
=
data
[
0
].
goodsList
;
if
(
this
.
btnId
==
''
){
this
.
btnId
=
data
[
0
].
id
this
.
list
=
data
[
0
].
goodsList
;
}
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 {
...
@@ -133,7 +163,8 @@ export default {
this
.
outIds
=
selection
.
map
((
item
)
=>
item
.
id
);
this
.
outIds
=
selection
.
map
((
item
)
=>
item
.
id
);
},
},
soldOutGoos
(){
soldOutGoos
(){
if
(
!
this
.
outIds
){
console
.
log
(
"this.outIds"
,
this
.
outIds
)
if
(
this
.
outIds
.
length
==
0
){
this
.
$message
.
error
(
'请选择所需下架的商品!'
);
this
.
$message
.
error
(
'请选择所需下架的商品!'
);
return
;
return
;
}
}
...
...
src/views/shop/shop/components/recommend.vue
View file @
62cb9e7d
...
@@ -14,8 +14,20 @@
...
@@ -14,8 +14,20 @@
<el-table-column
label=
"商品分类"
align=
"center"
prop=
"categoryName"
width=
"100"
/>
<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=
"discount"
/>
<el-table-column
label=
"原价"
align=
"center"
prop=
"price"
/>
<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=
"推荐时间"
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"
>
<el-table-column
label=
"操作"
align=
"center"
class-name=
"small-padding fixed-width"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<el-popconfirm
title=
"确定要移除吗?"
@
confirm=
"removeRecommend(scope.row)"
>
<el-popconfirm
title=
"确定要移除吗?"
@
confirm=
"removeRecommend(scope.row)"
>
...
@@ -32,7 +44,7 @@
...
@@ -32,7 +44,7 @@
</template>
</template>
<
script
>
<
script
>
import
{
recommendList
,
removeRecommend
}
from
'@/api/system/shop'
import
{
recommendList
,
removeRecommend
,
turnRecommendList
}
from
'@/api/system/shop'
export
default
{
export
default
{
props
:
[
'shopId'
],
props
:
[
'shopId'
],
data
()
{
data
()
{
...
@@ -56,6 +68,13 @@ export default {
...
@@ -56,6 +68,13 @@ export default {
//this.getList()
//this.getList()
},
},
methods
:
{
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
){
getPicsList
(
str
){
let
picObj
=
JSON
.
parse
(
str
);
let
picObj
=
JSON
.
parse
(
str
);
return
picObj
.
thumbnail
return
picObj
.
thumbnail
...
...
src/views/shop/shop/setShop.vue
View file @
62cb9e7d
...
@@ -43,6 +43,7 @@ export default {
...
@@ -43,6 +43,7 @@ export default {
this
.
$refs
.
Machine
.
getList
()
this
.
$refs
.
Machine
.
getList
()
}
}
if
(
value
==
'third'
)
{
if
(
value
==
'third'
)
{
this
.
$refs
.
Commodity
.
btnId
=
''
;
this
.
$refs
.
Commodity
.
getList
()
this
.
$refs
.
Commodity
.
getList
()
}
}
if
(
value
==
'fourth'
)
{
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