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
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
447 additions
and
17 deletions
+447
-17
src/api/system/shop.js
+18
-0
src/components/order/orderDetial.vue
+328
-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
<
template
>
<div
class=
"app-container"
>
<!-- 详情对话框 -->
<el-dialog
:title=
"title"
:visible
.
sync=
"open"
width=
"1000px"
append-to-body
>
<el-tabs
v-model=
"activeName"
@
tab-click=
"handleClick"
>
<el-tab-pane
label=
"订单信息"
name=
"first"
>
<el-form
ref=
"form"
:model=
"form"
label-width=
"80px"
>
<el-row>
<el-col
:span=
"8"
>
<el-form-item
label=
"订单编号"
>
<el-input
v-model=
"form.orderNo"
disabled
/>
</el-form-item>
</el-col>
<el-col
:span=
"8"
>
<el-form-item
label=
"顺序号"
>
<el-input
v-model=
"form.orderNum"
disabled
/>
</el-form-item>
</el-col>
<el-col
:span=
"8"
>
<el-form-item
label=
"订单状态"
>
<el-input
v-model=
"form.state"
disabled
/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col
:span=
"8"
>
<el-form-item
label=
"城市"
>
<el-input
v-model=
"form.city"
disabled
/>
</el-form-item>
</el-col>
<el-col
:span=
"8"
>
<el-form-item
label=
"店铺"
>
<el-input
v-model=
"form.shopName"
disabled
/>
</el-form-item>
</el-col>
<el-col
:span=
"8"
>
<el-form-item
label=
"创建时间"
>
<el-input
v-model=
"form.createdAt"
disabled
/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col
:span=
"8"
>
<el-form-item
label=
"商品数量"
>
<el-input
v-model=
"form.goodsNum"
disabled
/>
</el-form-item>
</el-col>
<el-col
:span=
"8"
>
<el-form-item
label=
"金额"
>
<el-input
v-model=
"form.amount"
disabled
/>
</el-form-item>
</el-col>
<el-col
:span=
"8"
>
<el-form-item
label=
"付款时间"
>
<el-input
v-model=
"form.payTime"
disabled
/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col
:span=
"8"
>
<el-form-item
label=
"用户昵称"
>
<el-input
v-model=
"form.userName"
disabled
/>
</el-form-item>
</el-col>
<el-col
:span=
"8"
>
<el-form-item
label=
"用户电话"
>
<el-input
disabled
/>
</el-form-item>
</el-col>
<el-col
:span=
"8"
>
<el-form-item
label=
"完成时间"
>
<el-input
v-model=
"form.finishTime"
disabled
/>
</el-form-item>
</el-col>
</el-row>
<el-table
:data=
"goodsList"
>
<el-table-column
label=
"商品名称"
align=
"center"
prop=
"goodsName"
/>
<el-table-column
label=
"缩略图"
align=
"center"
>
<template
slot-scope=
"scope"
>
<div
class=
"image-tmp"
>
<el-image
style=
"width: 100px; height: 100px"
:src=
"getPicsList(scope.row.pics)"
:preview-src-list=
"getPicsBigList(scope.row.pics)"
>
<div
slot=
"error"
class=
"image-slot"
></div>
</el-image>
</div>
</
template
>
</el-table-column>
<el-table-column
label=
"商品分类"
align=
"center"
prop=
"categoryName"
/>
<el-table-column
label=
"原售价"
align=
"center"
prop=
"price"
/>
<el-table-column
label=
"折扣价"
align=
"center"
prop=
"discount"
/>
<el-table-column
label=
"实付"
align=
"center"
prop=
"realAmount"
/>
<el-table-column
label=
"数量"
align=
"center"
prop=
"num"
/>
</el-table>
</el-form>
<div
v-show=
"refundTag"
style=
"margin-top: 20px;"
>
<el-form
ref=
"refundForm"
:rules=
"rules"
:model=
"refundForm"
label-width=
"80px"
>
<el-form-item
label=
"退款金额"
prop=
"refundAmount"
>
<el-input
v-model=
"refundForm.refundAmount"
style=
"width:200px;"
placeholder=
"请输入退款金额"
/>
</el-form-item>
<el-form-item
label=
"处理备注"
prop=
"desc"
>
<el-input
v-model=
"refundForm.desc"
type=
"textarea"
placeholder=
"请输入处理备注"
/>
</el-form-item>
</el-form>
</div>
</el-tab-pane>
<el-tab-pane
label=
"订单日志"
name=
"second"
>
<el-table
:data=
"logList"
>
<el-table-column
label=
"状态"
align=
"center"
prop=
"status"
/>
<el-table-column
label=
"操作"
align=
"center"
prop=
"operation"
/>
<el-table-column
label=
"时间"
align=
"center"
prop=
"createAt"
/>
<el-table-column
label=
"操作人"
align=
"center"
prop=
"operationUser"
/>
<el-table-column
label=
"内容"
align=
"center"
prop=
"content"
/>
</el-table>
</el-tab-pane>
</el-tabs>
<div
slot=
"footer"
class=
"dialog-footer"
style=
"text-align: center;"
>
<el-button
v-show=
"!refundTag"
type=
"primary"
@
click=
"submitForm"
>
确定
</el-button>
<el-button
v-show=
"refundTag"
type=
"danger"
@
click=
"refundSubmit"
>
退款
</el-button>
<el-button
@
click=
"cancel"
>
取 消
</el-button>
</div>
</el-dialog>
</div>
</template>
<
script
>
import
{
getOrder
,
getLogList
,
refund
}
from
"@/api/system/order"
;
import
{
listShop
}
from
"@/api/system/shop"
;
import
piovince
from
'@/utils/piovince'
;
export
default
{
name
:
"OrderDetial"
,
data
()
{
var
validateRefundAmount
=
(
rule
,
value
,
callback
)
=>
{
var
regular
=
/
(
^
[
+
]{0,1}([
0-9
]
+
)
$
)
|
(
^
[
+
]{0,1}([
0-9
]
+
)[\.]{1}[
0-9
]{1,2}
$
)
/
;
//正数 ,小数可有可无,最多2位
if
(
value
==
undefined
||
value
===
''
)
{
callback
(
new
Error
(
'不能为空'
));
}
else
if
(
!
regular
.
test
(
value
)){
callback
(
new
Error
(
'请输入大于0的正数,最多保留2位小数'
));
}
else
if
(
this
.
amount
){
if
(
value
>
this
.
amount
){
callback
(
new
Error
(
'退款金额不能大于实付金额'
));
}
else
{
callback
();
}
}
else
{
callback
();
}
};
return
{
refundTag
:
false
,
piovince
,
// 总条数
total
:
0
,
// 订单表格数据
refundList
:
[],
// 弹出层标题
title
:
""
,
// 是否显示弹出层
open
:
false
,
shopName
:
null
,
goodsList
:[],
// 表单参数
form
:
{},
//退款表单
refundForm
:
{
refundAmount
:
""
,
desc
:
""
,
orderId
:
""
},
rules
:
{
refundAmount
:
[
{
required
:
true
,
validator
:
validateRefundAmount
,
trigger
:
'blur'
}
],
desc
:
[
{
required
:
true
,
message
:
'请输入退款处理'
,
trigger
:
'blur'
}
]
},
activeName
:
"first"
,
logList
:
[]
};
},
created
()
{
},
methods
:
{
getProvince
(
province
){
let
list
=
this
.
piovince
;
for
(
let
i
=
0
;
i
<
list
.
length
;
i
++
){
if
(
list
[
i
].
value
==
province
){
return
list
[
i
].
name
;
}
}
},
// 取消按钮
cancel
()
{
this
.
activeName
=
"first"
;
this
.
open
=
false
;
},
/** 提交按钮 */
submitForm
()
{
this
.
open
=
false
;
this
.
activeName
=
"first"
},
formatterState
(
state
){
if
(
state
==
0
){
return
"创建未校验"
;
}
else
if
(
state
==
1
){
return
"未支付"
;
}
else
if
(
state
==
2
){
return
"已支付"
;
}
else
if
(
state
==
3
){
return
"支付制作中"
;
}
else
if
(
state
==
4
){
return
"制作完成未取"
;
}
else
if
(
state
==
5
){
return
"取餐中"
;
}
else
if
(
state
==
6
){
return
"正常完成"
;
}
else
if
(
state
==
7
){
return
"未支付取消"
;
}
else
if
(
state
==
8
){
return
"支付后制作前取消"
;
}
else
if
(
state
==
9
){
return
"制作中取消"
;
}
else
if
(
state
==
10
){
return
"制作完成取消"
;
}
else
if
(
state
==
11
){
return
"已退款"
;
}
else
if
(
state
==
12
){
return
"部分退款"
;
}
else
if
(
state
==
13
){
return
"待取超时"
;
}
else
if
(
state
==
50
){
return
"其他人工干预状态"
;
}
},
handleClick
(
tab
)
{
if
(
tab
.
name
==
"first"
){
this
.
getOrderDetail
(
this
.
orderId
);
}
else
if
(
tab
.
name
==
"second"
){
this
.
getLogList
();
}
},
/** 查询订单日志列表 */
getLogList
()
{
//this.loading = true;
getLogList
({
orderId
:
this
.
orderId
}).
then
(
response
=>
{
if
(
response
.
code
==
"200"
){
this
.
logList
=
response
.
data
;
}
});
},
//退款
refundClick
(
row
){
this
.
refundForm
.
refundAmount
=
""
;
this
.
refundForm
.
desc
=
""
;
this
.
refundTag
=
true
;
this
.
title
=
"退款处理"
;
this
.
open
=
true
;
this
.
goodsList
=
[];
this
.
orderId
=
row
.
id
;
this
.
amount
=
row
.
amount
;
this
.
getOrderDetail
(
this
.
orderId
);
},
//提交退款
refundSubmit
(){
this
.
refundForm
.
orderId
=
this
.
orderId
;
this
.
$refs
[
"refundForm"
].
validate
((
valid
)
=>
{
if
(
valid
)
{
refund
(
this
.
refundForm
).
then
(
response
=>
{
if
(
response
.
code
=
"200"
){
this
.
open
=
false
;
this
.
getList
();
}
});
}
});
},
/** 详情按钮操作 */
handleUpdate
(
row
)
{
this
.
refundTag
=
false
;
this
.
goodsList
=
[];
this
.
orderId
=
row
.
id
;
this
.
title
=
"订单信息"
;
this
.
open
=
true
;
this
.
getOrderDetail
(
this
.
orderId
);
},
getOrderDetail
(
id
){
getOrder
(
id
).
then
(
response
=>
{
if
(
response
.
code
==
"200"
){
this
.
form
=
response
.
data
;
this
.
form
.
shopName
=
response
.
data
.
shop
.
name
;
this
.
form
.
state
=
this
.
formatterState
(
response
.
data
.
state
);
this
.
form
.
city
=
this
.
getProvince
(
response
.
data
.
shop
.
city
);
if
(
response
.
data
.
orderDetails
.
length
>
0
){
let
list
=
response
.
data
.
orderDetails
;
for
(
let
i
=
0
;
i
<
list
.
length
;
i
++
){
this
.
goodsList
.
push
({
"goodsName"
:
list
[
i
].
goods
.
name
,
"pics"
:
list
[
i
].
goods
.
pics
,
"categoryName"
:
list
[
i
].
goods
.
categoryName
,
"price"
:
list
[
i
].
goods
.
price
,
"discount"
:
list
[
i
].
goods
.
discount
,
"realAmount"
:
list
[
i
].
realAmount
,
"num"
:
list
[
i
].
num
})
}
}
}
});
},
/** 店铺列表 */
getShopList
()
{
listShop
({
pageNum
:
1
,
pageSize
:
10000
}).
then
(
response
=>
{
if
(
response
.
code
==
"200"
){
if
(
response
.
rows
.
length
>
0
){
for
(
let
i
=
0
;
i
<
response
.
rows
.
length
;
i
++
){
this
.
shopList
.
push
({
value
:
response
.
rows
[
i
].
id
,
label
:
response
.
rows
[
i
].
name
},)
}
}
}
});
},
getPicsList
(
str
){
let
picObj
=
JSON
.
parse
(
str
);
return
picObj
.
thumbnail
},
getPicsBigList
(
str
){
let
list
=
[];
let
picObj
=
JSON
.
parse
(
str
);
list
.
push
(
picObj
.
thumbnail
)
return
list
;
},
}
};
</
script
>
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