Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
op-web-service
Project
Project
Details
Activity
Releases
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
bp
op-web-service
Commits
b94c0525
Commit
b94c0525
authored
Aug 09, 2021
by
lihui
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 图片展示 上传
parent
49660a39
Changes
11
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
1057 additions
and
49 deletions
+1057
-49
groupmeal.js
server/controllers/groupmeal.js
+114
-17
router.js
server/router.js
+21
-11
index.vue
src/pages/Activity/ActivityDetail/index.vue
+4
-3
index.vue
src/pages/Activity/Manage/index.vue
+1
-1
infoEditing.vue
src/pages/Activity/releaseProduc/components/infoEditing.vue
+22
-3
index.vue
src/pages/Activity/releaseProduc/index.vue
+4
-5
config.js
src/pages/Groupmeal/components/PageHeader/config.js
+4
-0
index.vue
src/pages/Groupmeal/newOrderManagement/index.vue
+779
-0
index.vue
src/pages/Groupmeal/orderManagement/index.vue
+3
-0
index.js
src/router/Groupmeal/index.js
+6
-0
groupmeal.js
src/service/Groupmeal/groupmeal.js
+99
-9
No files found.
server/controllers/groupmeal.js
View file @
b94c0525
const
GROUPMEAL_URI
=
require
(
"../config.js"
).
GROUPMEAL_URI
;
const
GROUPMEAL_URI
=
require
(
"../config.js"
).
GROUPMEAL_URI
;
const
req
=
require
(
"../utils/request"
).
httpReq
;
const
req
=
require
(
"../utils/request"
).
httpReq
;
// 获取订单管理列表
exports
.
getOrderList
=
async
ctx
=>
{
const
url
=
`
${
GROUPMEAL_URI
}
/order/background/order_list`
;
const
opts
=
{
url
,
method
:
"GET"
};
ctx
.
body
=
await
req
(
ctx
,
opts
);
};
// 获取主页配送列表
// 获取主页配送列表
exports
.
getList
=
async
ctx
=>
{
exports
.
getList
=
async
ctx
=>
{
const
opts
=
{
const
opts
=
{
...
@@ -51,9 +41,22 @@ exports.getSaveDeliverer = async ctx => {
...
@@ -51,9 +41,22 @@ exports.getSaveDeliverer = async ctx => {
};
};
ctx
.
body
=
await
req
(
ctx
,
opts
);
ctx
.
body
=
await
req
(
ctx
,
opts
);
};
};
// 老订单管理
// 获取订单管理列表
exports
.
getOrderList
=
async
ctx
=>
{
const
url
=
`
${
GROUPMEAL_URI
}
/order/oldbackground/order_list`
;
const
opts
=
{
url
,
method
:
"GET"
};
ctx
.
body
=
await
req
(
ctx
,
opts
);
};
// 获取活动名称
// 获取活动名称
exports
.
getMarketingList
=
async
ctx
=>
{
exports
.
getMarketingList
=
async
ctx
=>
{
const
url
=
`
${
GROUPMEAL_URI
}
/order/background/marketing_list`
;
const
url
=
`
${
GROUPMEAL_URI
}
/order/
old
background/marketing_list`
;
const
opts
=
{
const
opts
=
{
url
,
url
,
method
:
"GET"
method
:
"GET"
...
@@ -63,7 +66,7 @@ exports.getMarketingList = async ctx => {
...
@@ -63,7 +66,7 @@ exports.getMarketingList = async ctx => {
// 获取商品名称
// 获取商品名称
exports
.
getGoodsList
=
async
ctx
=>
{
exports
.
getGoodsList
=
async
ctx
=>
{
const
url
=
`
${
GROUPMEAL_URI
}
/order/background/goods_list`
;
const
url
=
`
${
GROUPMEAL_URI
}
/order/
old
background/goods_list`
;
const
opts
=
{
const
opts
=
{
url
,
url
,
method
:
"GET"
method
:
"GET"
...
@@ -73,7 +76,7 @@ exports.getGoodsList = async ctx => {
...
@@ -73,7 +76,7 @@ exports.getGoodsList = async ctx => {
// 获取自提点
// 获取自提点
exports
.
getSubShopList
=
async
ctx
=>
{
exports
.
getSubShopList
=
async
ctx
=>
{
const
url
=
`
${
GROUPMEAL_URI
}
/order/background/sub_shop_list`
;
const
url
=
`
${
GROUPMEAL_URI
}
/order/
old
background/sub_shop_list`
;
const
opts
=
{
const
opts
=
{
url
,
url
,
method
:
"GET"
method
:
"GET"
...
@@ -83,7 +86,7 @@ exports.getSubShopList = async ctx => {
...
@@ -83,7 +86,7 @@ exports.getSubShopList = async ctx => {
// 导出订单
// 导出订单
exports
.
orderExport
=
async
ctx
=>
{
exports
.
orderExport
=
async
ctx
=>
{
const
url
=
`
${
GROUPMEAL_URI
}
/order/background/order_export`
;
const
url
=
`
${
GROUPMEAL_URI
}
/order/
old
background/order_export`
;
const
opts
=
{
const
opts
=
{
url
,
url
,
method
:
"GET"
method
:
"GET"
...
@@ -93,7 +96,7 @@ exports.orderExport = async ctx => {
...
@@ -93,7 +96,7 @@ exports.orderExport = async ctx => {
// 打印订单
// 打印订单
exports
.
orderPrint
=
async
ctx
=>
{
exports
.
orderPrint
=
async
ctx
=>
{
const
url
=
`
${
GROUPMEAL_URI
}
/order/background/order_print`
;
const
url
=
`
${
GROUPMEAL_URI
}
/order/
old
background/order_print`
;
const
opts
=
{
const
opts
=
{
url
,
url
,
method
:
"GET"
method
:
"GET"
...
@@ -103,7 +106,7 @@ exports.orderPrint = async ctx => {
...
@@ -103,7 +106,7 @@ exports.orderPrint = async ctx => {
// 订单退款列表
// 订单退款列表
exports
.
orderItemList
=
async
ctx
=>
{
exports
.
orderItemList
=
async
ctx
=>
{
const
url
=
`
${
GROUPMEAL_URI
}
/order/background/order_item_list`
;
const
url
=
`
${
GROUPMEAL_URI
}
/order/
old
background/order_item_list`
;
const
opts
=
{
const
opts
=
{
url
,
url
,
method
:
"GET"
method
:
"GET"
...
@@ -113,7 +116,7 @@ exports.orderItemList = async ctx => {
...
@@ -113,7 +116,7 @@ exports.orderItemList = async ctx => {
// 订单退款列表
// 订单退款列表
exports
.
orderRefund
=
async
ctx
=>
{
exports
.
orderRefund
=
async
ctx
=>
{
const
url
=
`
${
GROUPMEAL_URI
}
/order/background/order_refund`
;
const
url
=
`
${
GROUPMEAL_URI
}
/order/
old
background/order_refund`
;
const
opts
=
{
const
opts
=
{
url
,
url
,
method
:
"POST"
,
method
:
"POST"
,
...
@@ -125,6 +128,100 @@ exports.orderRefund = async ctx => {
...
@@ -125,6 +128,100 @@ exports.orderRefund = async ctx => {
// 订单驳回
// 订单驳回
exports
.
orderRefundReject
=
async
ctx
=>
{
exports
.
orderRefundReject
=
async
ctx
=>
{
const
url
=
`
${
GROUPMEAL_URI
}
/order/oldbackground/order_refund_reject`
;
const
opts
=
{
url
,
method
:
"GET"
};
ctx
.
body
=
await
req
(
ctx
,
opts
);
};
// 新订单管理
// 获取订单管理列表
exports
.
newGetOrderList
=
async
ctx
=>
{
const
url
=
`
${
GROUPMEAL_URI
}
/order/background/order_list`
;
const
opts
=
{
url
,
method
:
"GET"
};
ctx
.
body
=
await
req
(
ctx
,
opts
);
};
// 获取活动名称
exports
.
newGetMarketingList
=
async
ctx
=>
{
const
url
=
`
${
GROUPMEAL_URI
}
/order/background/marketing_list`
;
const
opts
=
{
url
,
method
:
"GET"
};
ctx
.
body
=
await
req
(
ctx
,
opts
);
};
// 获取商品名称
exports
.
newGetGoodsList
=
async
ctx
=>
{
const
url
=
`
${
GROUPMEAL_URI
}
/order/background/goods_list`
;
const
opts
=
{
url
,
method
:
"GET"
};
ctx
.
body
=
await
req
(
ctx
,
opts
);
};
// 获取自提点
exports
.
newGetSubShopList
=
async
ctx
=>
{
const
url
=
`
${
GROUPMEAL_URI
}
/order/background/sub_shop_list`
;
const
opts
=
{
url
,
method
:
"GET"
};
ctx
.
body
=
await
req
(
ctx
,
opts
);
};
// 导出订单
exports
.
newOrderExport
=
async
ctx
=>
{
const
url
=
`
${
GROUPMEAL_URI
}
/order/background/order_export`
;
const
opts
=
{
url
,
method
:
"GET"
};
ctx
.
body
=
await
req
(
ctx
,
opts
);
};
// 打印订单
exports
.
newOrderPrint
=
async
ctx
=>
{
const
url
=
`
${
GROUPMEAL_URI
}
/order/background/order_print`
;
const
opts
=
{
url
,
method
:
"GET"
};
ctx
.
body
=
await
req
(
ctx
,
opts
);
};
// 订单退款列表
exports
.
newOrderItemList
=
async
ctx
=>
{
const
url
=
`
${
GROUPMEAL_URI
}
/order/background/order_item_list`
;
const
opts
=
{
url
,
method
:
"GET"
};
ctx
.
body
=
await
req
(
ctx
,
opts
);
};
// 订单退款列表
exports
.
newOrderRefund
=
async
ctx
=>
{
const
url
=
`
${
GROUPMEAL_URI
}
/order/background/order_refund`
;
const
opts
=
{
url
,
method
:
"POST"
,
json
:
true
,
body
:
ctx
.
request
.
body
};
ctx
.
body
=
await
req
(
ctx
,
opts
);
};
// 订单驳回
exports
.
newOrderRefundReject
=
async
ctx
=>
{
const
url
=
`
${
GROUPMEAL_URI
}
/order/background/order_refund_reject`
;
const
url
=
`
${
GROUPMEAL_URI
}
/order/background/order_refund_reject`
;
const
opts
=
{
const
opts
=
{
url
,
url
,
...
...
server/router.js
View file @
b94c0525
...
@@ -90,17 +90,27 @@ router.post(`${API_VERSION}/order/deliverer/list_day_deliverer`, groupmeal.getDe
...
@@ -90,17 +90,27 @@ router.post(`${API_VERSION}/order/deliverer/list_day_deliverer`, groupmeal.getDe
router
.
post
(
`
${
API_VERSION
}
/order/deliverer/add_deliverer`
,
groupmeal
.
getAddDeliverer
)
router
.
post
(
`
${
API_VERSION
}
/order/deliverer/add_deliverer`
,
groupmeal
.
getAddDeliverer
)
router
.
post
(
`
${
API_VERSION
}
/order/deliverer/save_day_deliverer`
,
groupmeal
.
getSaveDeliverer
)
router
.
post
(
`
${
API_VERSION
}
/order/deliverer/save_day_deliverer`
,
groupmeal
.
getSaveDeliverer
)
// 订单管理
// 老订单管理
router
.
get
(
`
${
API_VERSION
}
/order/background/order_list`
,
groupmeal
.
getOrderList
);
router
.
get
(
`
${
API_VERSION
}
/order/oldbackground/order_list`
,
groupmeal
.
getOrderList
);
router
.
get
(
`
${
API_VERSION
}
/order/background/marketing_list`
,
groupmeal
.
getMarketingList
);
router
.
get
(
`
${
API_VERSION
}
/order/oldbackground/marketing_list`
,
groupmeal
.
getMarketingList
);
router
.
get
(
`
${
API_VERSION
}
/order/background/goods_list`
,
groupmeal
.
getGoodsList
);
router
.
get
(
`
${
API_VERSION
}
/order/oldbackground/goods_list`
,
groupmeal
.
getGoodsList
);
router
.
get
(
`
${
API_VERSION
}
/order/background/sub_shop_list`
,
groupmeal
.
getSubShopList
);
router
.
get
(
`
${
API_VERSION
}
/order/oldbackground/sub_shop_list`
,
groupmeal
.
getSubShopList
);
router
.
get
(
`
${
API_VERSION
}
/order/background/order_export`
,
groupmeal
.
orderExport
);
router
.
get
(
`
${
API_VERSION
}
/order/oldbackground/order_export`
,
groupmeal
.
orderExport
);
router
.
get
(
`
${
API_VERSION
}
/order/background/order_export`
,
groupmeal
.
orderExport
);
router
.
get
(
`
${
API_VERSION
}
/order/oldbackground/order_print`
,
groupmeal
.
orderPrint
);
router
.
get
(
`
${
API_VERSION
}
/order/background/order_print`
,
groupmeal
.
orderPrint
);
router
.
get
(
`
${
API_VERSION
}
/order/oldbackground/order_item_list`
,
groupmeal
.
orderItemList
);
router
.
get
(
`
${
API_VERSION
}
/order/background/order_item_list`
,
groupmeal
.
orderItemList
);
router
.
get
(
`
${
API_VERSION
}
/order/oldbackground/order_refund_reject`
,
groupmeal
.
orderRefundReject
);
router
.
get
(
`
${
API_VERSION
}
/order/background/order_refund_reject`
,
groupmeal
.
orderRefundReject
);
router
.
post
(
`
${
API_VERSION
}
/order/oldbackground/order_refund`
,
groupmeal
.
orderRefund
);
router
.
post
(
`
${
API_VERSION
}
/order/background/order_refund`
,
groupmeal
.
orderRefund
);
// 新订单管理
router
.
get
(
`
${
API_VERSION
}
/order/background/order_list`
,
groupmeal
.
newGetOrderList
);
router
.
get
(
`
${
API_VERSION
}
/order/background/marketing_list`
,
groupmeal
.
newGetMarketingList
);
router
.
get
(
`
${
API_VERSION
}
/order/background/goods_list`
,
groupmeal
.
newGetGoodsList
);
router
.
get
(
`
${
API_VERSION
}
/order/background/sub_shop_list`
,
groupmeal
.
newGetSubShopList
);
router
.
get
(
`
${
API_VERSION
}
/order/background/order_export`
,
groupmeal
.
newOrderExport
);
router
.
get
(
`
${
API_VERSION
}
/order/background/order_print`
,
groupmeal
.
newOrderPrint
);
router
.
get
(
`
${
API_VERSION
}
/order/background/order_item_list`
,
groupmeal
.
newOrderItemList
);
router
.
get
(
`
${
API_VERSION
}
/order/background/order_refund_reject`
,
groupmeal
.
newOrderRefundReject
);
router
.
post
(
`
${
API_VERSION
}
/order/background/order_refund`
,
groupmeal
.
newOrderRefund
);
// 钱包提现审核 wallet/background/apply_detail
// 钱包提现审核 wallet/background/apply_detail
router
.
get
(
`
${
API_VERSION
}
/get_withdrawal_apply_list`
,
withdrawal
.
getApplyList
)
router
.
get
(
`
${
API_VERSION
}
/get_withdrawal_apply_list`
,
withdrawal
.
getApplyList
)
...
...
src/pages/Activity/ActivityDetail/index.vue
View file @
b94c0525
...
@@ -6,6 +6,7 @@
...
@@ -6,6 +6,7 @@
element-loading-spinner=
"el-icon-loading"
element-loading-spinner=
"el-icon-loading"
element-loading-background=
"rgba(0, 0, 0, 0.8)"
element-loading-background=
"rgba(0, 0, 0, 0.8)"
>
>
<!-- 商品详情信息 -->
<div
class=
"activityInfo-wrapper"
>
<div
class=
"activityInfo-wrapper"
>
<el-card
class=
"activityInfo"
>
<el-card
class=
"activityInfo"
>
<div
class=
"infoItem"
>
<div
class=
"infoItem"
>
...
@@ -34,8 +35,10 @@
...
@@ -34,8 +35,10 @@
</div>
</div>
</el-card>
</el-card>
</div>
</div>
<!-- 商品详情 -->
<div
class=
"activityDetail"
>
<div
class=
"activityDetail"
>
<section
class=
"content"
>
<section
class=
"content"
>
<!-- 商品列表 -->
<el-card
class=
"activityGoods box-card"
>
<el-card
class=
"activityGoods box-card"
>
<div
class=
"my-header"
>
<div
class=
"my-header"
>
<h3>
{{
marketingInfo
.
marketing_name
}}
</h3>
<h3>
{{
marketingInfo
.
marketing_name
}}
</h3>
...
@@ -58,6 +61,7 @@
...
@@ -58,6 +61,7 @@
<
/div
>
<
/div
>
<
/div
>
<
/div
>
<
/el-card
>
<
/el-card
>
<!--
商品描述
-->
<
el
-
card
class
=
"activityIntroduce box-card"
>
<
el
-
card
class
=
"activityIntroduce box-card"
>
<
p
class
=
"introduceText"
>
<
p
class
=
"introduceText"
>
{{
marketingInfo
.
pindan_desc
}}
{{
marketingInfo
.
pindan_desc
}}
...
@@ -225,9 +229,6 @@ export default {
...
@@ -225,9 +229,6 @@ export default {
.
infoItemText
{
.
infoItemText
{
font
-
weight
:
bolder
;
font
-
weight
:
bolder
;
}
}
// display: flex;
// align-items: center;
// justify-content: center;
}
}
}
}
.
activityDetail
{
.
activityDetail
{
...
...
src/pages/Activity/Manage/index.vue
View file @
b94c0525
src/pages/Activity/releaseProduc/components/infoEditing.vue
View file @
b94c0525
...
@@ -43,9 +43,9 @@
...
@@ -43,9 +43,9 @@
import
{
GOODS_URI
}
from
"../../../../../server/config"
;
import
{
GOODS_URI
}
from
"../../../../../server/config"
;
export
default
{
export
default
{
props
:
{
props
:
{
editInfo
:
{
infoEditArr
:
{
type
:
Object
,
type
:
Object
,
required
:
()
=>
{}
defult
:
()
=>
{}
}
}
},
},
data
()
{
data
()
{
...
@@ -63,6 +63,25 @@ export default {
...
@@ -63,6 +63,25 @@ export default {
uploadUrl
:
`
${
GOODS_URI
}
/ksy/ks3apiunencrypt/ks3api_upload`
// 金山云上传地址
uploadUrl
:
`
${
GOODS_URI
}
/ksy/ks3apiunencrypt/ks3api_upload`
// 金山云上传地址
};
};
},
},
watch
:
{
infoEditArr
:
{
// 监听props属性 展示自提点列表
handler
:
async
function
(
newVal
)
{
if
(
this
.
$route
.
query
.
marketing_id
)
{
this
.
propData
=
newVal
;
this
.
infoEditForm
.
title
=
this
.
propData
.
marketing_name
;
this
.
infoEditForm
.
desc
=
this
.
propData
.
pindan_desc
;
for
(
var
i
in
this
.
propData
.
pindan_pic_url
)
{
this
.
infoEditForm
.
picUrlList
.
push
({
url
:
this
.
propData
.
pindan_pic_url
[
i
]
});
}
}
},
deep
:
true
// immediate: true
}
},
methods
:
{
methods
:
{
// 展示商品大图
// 展示商品大图
previewImage
(
file
)
{
previewImage
(
file
)
{
...
@@ -101,7 +120,7 @@ export default {
...
@@ -101,7 +120,7 @@ export default {
}
}
},
},
created
()
{
created
()
{
this
.
marketingInfoMet
();
//
this.marketingInfoMet();
}
}
};
};
</
script
>
</
script
>
...
...
src/pages/Activity/releaseProduc/index.vue
View file @
b94c0525
...
@@ -16,7 +16,7 @@
...
@@ -16,7 +16,7 @@
<infoEditing
<infoEditing
ref=
"infoEdit"
ref=
"infoEdit"
v-show=
"active === 1"
v-show=
"active === 1"
:
editInfo
=
"infoEditArr"
:
infoEditArr
=
"infoEditArr"
/>
/>
<addProduc
<addProduc
ref=
"addProduc"
ref=
"addProduc"
...
@@ -102,10 +102,7 @@ export default {
...
@@ -102,10 +102,7 @@ export default {
}
}
this
.
addProducArr
=
this
.
$refs
.
addProduc
.
comTableData
;
this
.
addProducArr
=
this
.
$refs
.
addProduc
.
comTableData
;
this
.
active
=
3
;
this
.
active
=
3
;
}
else
{
console
.
log
();
}
}
// this.active++;
},
},
// 获取营销活动详情
// 获取营销活动详情
...
@@ -150,7 +147,9 @@ export default {
...
@@ -150,7 +147,9 @@ export default {
op_cur_user
:
store
.
state
.
userInfo
.
email
,
op_cur_user
:
store
.
state
.
userInfo
.
email
,
start_time
:
this
.
startDate
,
start_time
:
this
.
startDate
,
end_time
:
this
.
endDate
,
end_time
:
this
.
endDate
,
pindan_pic
:
this
.
$refs
.
infoEdit
.
infoEditForm
.
picUploadList
.
join
(
","
),
pindan_pic
:
this
.
infoEditArr
.
pindan_pic_url
.
concat
(
this
.
$refs
.
infoEdit
.
infoEditForm
.
picUploadList
)
.
join
(
","
),
pindan_desc
:
this
.
$refs
.
infoEdit
.
infoEditForm
.
desc
,
pindan_desc
:
this
.
$refs
.
infoEdit
.
infoEditForm
.
desc
,
take_place_ids
:
this
.
takePlaceIDArr
take_place_ids
:
this
.
takePlaceIDArr
};
};
...
...
src/pages/Groupmeal/components/PageHeader/config.js
View file @
b94c0525
...
@@ -3,6 +3,10 @@ const headerConfig = [
...
@@ -3,6 +3,10 @@ const headerConfig = [
name
:
"订单管理"
,
name
:
"订单管理"
,
path
:
"/op/groupmeal/orderManagement"
path
:
"/op/groupmeal/orderManagement"
},
},
{
name
:
"新订单管理"
,
path
:
"/op/groupmeal/newOrderManagement"
},
{
{
path
:
'/op/groupmeal/distrib'
,
path
:
'/op/groupmeal/distrib'
,
name
:
'配送员管理'
name
:
'配送员管理'
...
...
src/pages/Groupmeal/newOrderManagement/index.vue
0 → 100644
View file @
b94c0525
<
template
>
<Layout>
<div
class=
"orderManage"
>
<!-- 查询栏 -->
<el-form
:inline=
"true"
:model=
"orderQueryObj"
ref=
"ruleForm"
class=
"demo-form-inline"
>
<el-form-item
label=
"活动名称:"
prop=
"marketing_id"
>
<el-select
v-model=
"orderQueryObj.marketing_id"
placeholder=
"请选择"
@
change=
"activityNameSel"
@
focus=
"activityNameFocus"
filterable
>
<el-option
v-for=
"item in activityNameArr"
:key=
"item.marketing_id"
:label=
"item.marketing_name"
:value=
"item.marketing_id"
></el-option>
</el-select>
</el-form-item>
<el-form-item
label=
"订单状态:"
prop=
"order_status"
>
<el-select
v-model=
"orderQueryObj.order_status"
placeholder=
"请选择"
>
<el-option
v-for=
"item in orderStatusArr"
:key=
"item.value"
:label=
"item.label"
:value=
"item.value"
:disabled=
"item.disabled"
></el-option>
</el-select>
</el-form-item>
<el-form-item
label=
"商品名称:"
prop=
"goods_id"
>
<el-select
v-model=
"orderQueryObj.goods_id"
placeholder=
"请选择"
filterable
>
<el-option
v-for=
"item in tradeNameArr"
:key=
"item.goods_id"
:label=
"item.goods_name"
:value=
"item.goods_id"
></el-option>
</el-select>
</el-form-item>
<el-form-item
label=
"收货人:"
prop=
"cust_user"
>
<el-input
placeholder=
"请输入收货人姓名或手机号"
prefix-icon=
"el-icon-search"
v-model=
"orderQueryObj.cust_user"
></el-input>
</el-form-item>
<el-form-item
label=
"订单编号:"
prop=
"order_id"
>
<el-input
placeholder=
"请输入订单号"
prefix-icon=
"el-icon-search"
v-model=
"orderQueryObj.order_id"
></el-input>
</el-form-item>
<el-form-item
label=
"自提点:"
prop=
"sub_shop_id"
>
<el-select
v-model=
"orderQueryObj.sub_shop_id"
placeholder=
"请选择"
filterable
>
<el-option
v-for=
"item in selLiftPoinArr"
:key=
"item.sub_shop_id"
:label=
"item.sub_shop_name"
:value=
"item.sub_shop_id"
></el-option>
</el-select>
</el-form-item>
<el-form-item>
<el-button
@
click=
"resetOrder('ruleForm')"
>
重置
</el-button>
<el-button
type=
"primary"
@
click=
"searchOrder"
>
搜索
</el-button>
</el-form-item>
</el-form>
<!-- Tabs标签页 -->
<el-tabs
v-model=
"activeName"
@
tab-click=
"handleClick"
>
<el-row
class=
"tabHead"
>
<el-col
:span=
"12"
>
<div>
商品共计:
{{
goodsNum
}}
</div>
</el-col>
<el-col
:span=
"12"
style=
"text-align: right"
>
<el-button
@
click=
"exportOrder"
>
导出
</el-button>
<el-button
@
click=
"printOrder"
>
打印
</el-button>
</el-col>
</el-row>
<el-tab-pane
label=
"全部"
name=
"all"
>
<el-table
:data=
"orderTableData"
border
stripe
style=
"width: 100%"
>
<el-table-column
prop=
"marketing_name"
label=
"活动名称"
>
<template
#
default=
"scope"
>
<div>
{{
scope
.
row
.
marketing_name
}}
(
{{
scope
.
row
.
marketing_id
}}
)
</div>
</
template
>
</el-table-column>
<el-table-column
prop=
"order_id"
label=
"订单号"
width
></el-table-column>
<el-table-column
prop=
"order_status_text"
label=
"订单状态"
></el-table-column>
<el-table-column
prop=
"order_item"
label=
"商品信息"
>
<
template
#
default=
"scope"
>
<div
v-for=
"(item, index) in scope.row.order_item"
:key=
"index"
>
{{
item
.
goods_name
}}
<span
style=
"color: red"
>
*
{{
item
.
goods_num
}}
</span>
</div>
</
template
>
</el-table-column>
<el-table-column
prop=
"user_name"
label=
"收货人"
>
<
template
#
default=
"scope"
>
<div>
<span
>
{{
scope
.
row
.
user_name
}}
(
{{
scope
.
row
.
user_nick
}}
)
</span
>
<p>
{{
scope
.
row
.
user_mobile
}}
</p>
</div>
</
template
>
</el-table-column>
<el-table-column
prop=
"sub_shop_name"
label=
"自提点"
></el-table-column>
<el-table-column
prop=
"comment"
label=
"备注"
></el-table-column>
<el-table-column
prop=
"pay_time"
label=
"支付时间"
></el-table-column>
<el-table-column
prop=
"payment"
label=
"支付金额"
>
<
template
#
default=
"scope"
>
<div>
¥
{{
scope
.
row
.
payment
}}
<span
v-show=
"scope.row.refund_amount"
>
(已退¥
{{
scope
.
row
.
refund_amount
}}
)
</span
>
</div>
</
template
>
</el-table-column>
<el-table-column
prop=
"discount_fee"
label=
"优惠金额"
></el-table-column>
<el-table-column
fixed=
"right"
label=
"操作"
width=
"100"
>
<
template
#
default=
"scope"
>
<el-button
type=
"text"
size=
"small"
@
click=
"refund(scope.row)"
v-show=
"
scope.row.order_status == '2' ||
scope.row.order_status == '6' ||
scope.row.order_status == '8'
"
>
退款
</el-button
>
<el-button-group
v-show=
"scope.row.order_status == '3'"
>
<el-button
type=
"text"
size=
"small"
@
click=
"agree(scope.row)"
>
同意
</el-button
>
<el-button
type=
"text"
size=
"small"
@
click=
"refuse(scope.row)"
>
拒绝
</el-button
>
</el-button-group>
</
template
>
</el-table-column>
</el-table>
<page
@
current-change=
"handleCurrentChange"
:current-page=
"orderQueryObj.page"
:page-size=
"orderQueryObj.page_size"
:total=
"totalNum"
/>
</el-tab-pane>
<el-tab-pane
label=
"售后"
name=
"afterSale"
>
<!-- start -->
<el-table
:data=
"orderTableData"
border
stripe
style=
"width: 100%"
>
<el-table-column
prop=
"marketing_name"
label=
"活动名称"
>
<
template
#
default=
"scope"
>
<div>
{{
scope
.
row
.
marketing_name
}}
(
{{
scope
.
row
.
marketing_id
}}
)
</div>
</
template
>
</el-table-column>
<el-table-column
prop=
"order_id"
label=
"订单号"
width
></el-table-column>
<el-table-column
prop=
"order_status_text"
label=
"订单状态"
></el-table-column>
<el-table-column
prop=
"order_item"
label=
"商品信息"
>
<
template
#
default=
"scope"
>
<div
v-for=
"(item, index) in scope.row.order_item"
:key=
"index"
>
{{
item
.
goods_name
}}
<span
style=
"color: red"
>
*
{{
item
.
goods_num
}}
</span>
</div>
</
template
>
</el-table-column>
<el-table-column
prop=
"user_name"
label=
"收货人"
>
<
template
#
default=
"scope"
>
<div>
<span
>
{{
scope
.
row
.
user_name
}}
(
{{
scope
.
row
.
user_nick
}}
)
</span
>
<p>
{{
scope
.
row
.
user_mobile
}}
</p>
</div>
</
template
>
</el-table-column>
<el-table-column
prop=
"sub_shop_name"
label=
"自提点"
></el-table-column>
<el-table-column
prop=
"comment"
label=
"备注"
></el-table-column>
<el-table-column
prop=
"pay_time"
label=
"支付时间"
></el-table-column>
<el-table-column
prop=
"payment"
label=
"支付金额"
>
<
template
#
default=
"scope"
>
<div>
¥
{{
scope
.
row
.
payment
}}
<span
v-show=
"scope.row.refund_amount"
>
(已退¥
{{
scope
.
row
.
refund_amount
}}
)
</span
>
</div>
</
template
>
</el-table-column>
<el-table-column
prop=
"discount_fee"
label=
"优惠金额"
></el-table-column>
<el-table-column
fixed=
"right"
label=
"操作"
width=
"100"
>
<
template
#
default=
"scope"
>
<el-button
type=
"text"
size=
"small"
@
click=
"refund(scope.row)"
v-show=
"
scope.row.order_status == '2' ||
scope.row.order_status == '6' ||
scope.row.order_status == '8'
"
>
退款
</el-button
>
<el-button-group
v-show=
"scope.row.order_status == '3'"
>
<el-button
type=
"text"
size=
"small"
@
click=
"agree(scope.row)"
>
同意
</el-button
>
<el-button
type=
"text"
size=
"small"
@
click=
"refuse(scope.row)"
>
拒绝
</el-button
>
</el-button-group>
</
template
>
</el-table-column>
</el-table>
<page
@
current-change=
"handleCurrentChange"
:current-page=
"orderQueryObj.page"
:page-size=
"orderQueryObj.page_size"
:total=
"totalNum"
/>
<!-- end -->
</el-tab-pane>
</el-tabs>
<!-- 导出弹窗 -->
<el-dialog
title=
"导出订单"
width=
"25%"
top=
"10%"
v-model=
"exportShow"
>
<el-form-item
class=
"exportForm"
label
>
<div
style=
"margin-bottom: 15px"
>
请选择导出活动{{ exportType }}的表格类型
</div>
<a
:href=
"exportURL1"
style=
"margin-right: 10px"
><el-button
type=
"primary"
@
click=
"exportShow = false"
>
总表
</el-button
></a
>
<a
:href=
"exportURL2"
style=
"margin-right: 10px"
><el-button
type=
"primary"
@
click=
"exportShow = false"
>
商品表
</el-button
></a
>
<a
:href=
"exportURL3"
><el-button
type=
"primary"
@
click=
"exportShow = false"
>
配送表
</el-button
></a
>
<!-- <el-checkbox-group v-model="exportSel">
<el-checkbox
v-for="i in exportSelOpt"
:label="i.type"
:key="i.type"
>{{ i.name }}</el-checkbox
>
</el-checkbox-group> -->
</el-form-item>
<!-- <el-form-item class="exportBtn">
<el-button @click="exportShow = false">取消</el-button>
<a :href="exportURL" style="margin-left: 20px"><el-button type="primary" @click="exportShow = false">确定导出</el-button></a>
</el-form-item> -->
</el-dialog>
<!-- 退款弹窗 -->
<el-dialog
title=
"退款"
width=
"30%"
top=
"10%"
v-model=
"refundShow"
>
<el-checkbox
:indeterminate=
"isIndeterminate"
v-model=
"checkAll"
@
change=
"handleCheckAllChange"
style=
"margin-bottom: 15px"
>
全选
</el-checkbox>
<div
class=
"refundCon"
v-for=
"(item, index) in refundGoods"
:key=
"index"
>
<el-row>
<el-checkbox
class=
"check-wrap"
v-model=
"item.refundedGoodsSel"
:label=
"item.goods_name"
name=
"type"
></el-checkbox>
</el-row>
<el-row>
<el-col
:span=
"6"
>
单价:{{ item.price }}
</el-col>
<el-col
:span=
"6"
>
数量:{{ item.goods_num }}
</el-col>
<el-col
:span=
"6"
>
实付:{{ item.payment }}
</el-col>
</el-row>
<el-row>
可退数量:
<el-input-number
v-model=
"item.refundableQuantity"
@
change=
"handleChange"
:min=
"0"
:max=
"item.goods_num - item.refund_count"
></el-input-number>
</el-row>
<el-row>
退款金额(可退金额{{ item.amountToRefund }}元):
<el-input
v-model=
"item.amountToRefund"
style=
"width: 150px"
></el-input>
</el-row>
</div>
<
template
#
footer
>
<span
class=
"dialog-footer refundBtnGroup"
>
<el-button
@
click=
"refundShow = false"
>
取 消
</el-button>
<el-button
type=
"primary"
@
click=
"handleConfirmRefund"
>
退款
</el-button
>
</span>
</
template
>
</el-dialog>
</div>
</Layout>
</template>
<
script
>
import
Layout
from
"../layout/index.vue"
;
import
{
getOrderList
,
getMarketingList
,
getGoodsList
,
getSubShopList
,
orderPrint
,
orderItemList
,
orderRefundReject
,
refundOrder
,
getOrderExportURL
,
}
from
"@/service/Groupmeal/groupmeal"
;
// import page from "../../components/Pagination.vue";
import
page
from
"../components/Pagination/index.vue"
;
export
default
{
name
:
"orderManagement"
,
components
:
{
Layout
,
page
,
},
data
()
{
return
{
// 查询
orderQueryObj
:
{
page
:
1
,
page_size
:
10
,
marketing_id
:
""
,
// 活动名称
order_status
:
"0"
,
// 订单状态
goods_id
:
""
,
// 商品名称
cust_user
:
""
,
// 收货人
order_id
:
""
,
// 订单编号
sub_shop_id
:
""
,
// 自提点
},
// 下拉框数据
// 活动名称
activityNameArr
:
[],
// 订单状态
orderStatusArr
:
[
{
value
:
"0"
,
label
:
"全部"
,
},
{
value
:
"1"
,
label
:
"未支付"
,
},
{
value
:
"2"
,
label
:
"已支付"
,
},
{
value
:
"3"
,
label
:
"待退款"
,
},
{
value
:
"4"
,
label
:
"已退款"
,
},
{
value
:
"5"
,
label
:
"退款中"
,
},
{
value
:
"6"
,
label
:
"已拒绝"
,
},
{
value
:
"7"
,
label
:
"售后"
,
},
],
// 商品名称
tradeNameArr
:
[],
// 自提点
selLiftPoinArr
:
[],
activeName
:
"all"
,
// Tabs标签页
goodsNum
:
""
,
// 商品总计
// 导出
exportShow
:
false
,
exportType
:
""
,
// exportSel: [],
// exportSelOpt: [
// { type: "1", name: "总表" },
// { type: "2", name: "商品表" },
// { type: "3", name: "配送表" },
// ],
// 表格数据
orderTableData
:
[],
totalNum
:
null
,
//总条数
// 退款
refundShow
:
false
,
// 退款状态
checkAll
:
false
,
// 全选
isIndeterminate
:
false
,
refundGoods
:
[
{
refundedGoodsSel
:
false
,
goods_name
:
""
,
price
:
""
,
// 单价
goods_num
:
""
,
// 数量
payment
:
""
,
// 实付
refundableQuantity
:
""
,
refundAmount
:
""
,
amountToRefund
:
""
,
},
],
};
},
computed
:
{
exportURL1
()
{
return
getOrderExportURL
(
this
.
orderQueryObj
.
marketing_id
,
"1"
);
},
exportURL2
()
{
return
getOrderExportURL
(
this
.
orderQueryObj
.
marketing_id
,
"2"
);
},
exportURL3
()
{
return
getOrderExportURL
(
this
.
orderQueryObj
.
marketing_id
,
"3"
);
},
},
methods
:
{
activityNameFocus
()
{
this
.
getMarketingListMet
();
},
// 获取活动名称
async
getMarketingListMet
()
{
try
{
const
res
=
await
getMarketingList
();
this
.
activityNameArr
=
res
.
result
;
}
catch
(
error
)
{
this
.
$message
.
error
(
"发生未知错误,请稍后再试一下吧~~~"
);
console
.
error
(
error
);
}
},
// 活动名称的change事件 获取商品名称+获取自提点
async
activityNameSel
(
val
)
{
this
.
orderQueryObj
.
goods_id
=
""
;
const
params
=
{
marketing_id
:
val
,
};
const
res
=
await
getGoodsList
(
params
);
// 商品名称
this
.
getSubShopListMet
(
val
)
//自提点
// const res = await getSubShopList(params);
this
.
tradeNameArr
=
res
.
result
;
// this.selLiftPoinArr = res.result;
},
// 获取自提点
async
getSubShopListMet
(
params
)
{
try
{
let
marketing_id
=
''
if
(
params
){
marketing_id
=
params
}
const
res
=
await
getSubShopList
({
'marketing_id'
:
marketing_id
});
this
.
selLiftPoinArr
=
res
.
result
;
}
catch
(
error
)
{
this
.
$message
.
error
(
"发生未知错误,请稍后再试一下吧~~~"
);
console
.
error
(
error
);
}
},
// 重置
resetOrder
(
formName
)
{
this
.
$refs
[
formName
].
resetFields
();
this
.
orderQueryObj
.
page
=
1
;
this
.
orderQueryObj
.
page_size
=
10
;
this
.
getOrderListMet
(
this
.
orderQueryObj
);
},
// 搜索
searchOrder
()
{
this
.
orderQueryObj
.
page
=
1
;
this
.
orderQueryObj
.
page_size
=
10
;
this
.
getOrderListMet
(
this
.
orderQueryObj
);
},
// 标签页切换
handleClick
(
targetName
)
{
if
(
targetName
.
props
.
name
==
"all"
)
{
this
.
orderQueryObj
.
order_status
=
"0"
;
this
.
orderStatusArr
[
1
].
disabled
=
false
;
this
.
orderStatusArr
[
2
].
disabled
=
false
;
}
else
{
this
.
orderQueryObj
.
order_status
=
"7"
;
this
.
orderStatusArr
[
1
].
disabled
=
true
;
this
.
orderStatusArr
[
2
].
disabled
=
true
;
}
this
.
getOrderListMet
(
this
.
orderQueryObj
);
},
// 导出
exportOrder
()
{
if
(
this
.
orderQueryObj
.
marketing_id
===
""
)
{
this
.
$message
.
error
(
"请选择活动名称"
);
return
;
}
this
.
exportShow
=
true
;
this
.
exportType
=
this
.
orderQueryObj
.
marketing_id
;
},
async
printOrderMet
(
forcePrint
)
{
const
params
=
{
marketing_id
:
this
.
orderQueryObj
.
marketing_id
,
// marketing_id: "1NJETU",
force_print
:
forcePrint
?
"1"
:
""
,
};
const
res
=
await
orderPrint
(
params
);
return
res
;
},
// 打印
async
printOrder
()
{
if
(
this
.
orderQueryObj
.
marketing_id
===
""
)
{
this
.
$message
.
error
(
"请选择活动名称"
);
return
;
}
let
res
=
await
this
.
printOrderMet
(
false
);
if
(
res
.
code
===
0
)
{
this
.
$message
({
type
:
"success"
,
message
:
"打印成功"
,
});
return
;
}
if
(
res
.
code
!==
5111040
)
{
if
(
res
.
reason
)
{
this
.
$message
.
error
(
res
.
reason
);
}
else
{
this
.
$message
.
error
(
"打印失败"
);
}
return
;
}
if
(
res
.
reason
)
{
try
{
await
this
.
$confirm
(
res
.
reason
,
"打印"
,
{
cancelButtonText
:
"取消"
,
confirmButtonText
:
"确定"
,
});
}
catch
(
e
)
{
// 取消
return
;
}
}
else
{
this
.
$message
.
error
(
"打印失败"
);
}
res
=
await
this
.
printOrderMet
(
true
);
// if (res.code !== 0) {
// this.$message.error("打印失败");
// }
},
// 获取订单列表
async
getOrderListMet
()
{
if
(
this
.
$route
.
query
.
marketing_type
==
"4"
){
this
.
orderQueryObj
.
marketing_id
=
this
.
$route
.
query
.
marketing_id
;
}
try
{
const
res
=
await
getOrderList
(
this
.
orderQueryObj
);
this
.
goodsNum
=
res
.
goods_num
;
// 商品共计
this
.
totalNum
=
res
.
count
;
// 商品总数
this
.
orderTableData
=
res
.
result
;
}
catch
(
error
)
{
this
.
$message
.
error
(
"发生未知错误,请稍后再试一下吧~~~"
);
console
.
error
(
error
);
}
},
//列表分页
// 页码变化
handleCurrentChange
(
e
)
{
this
.
orderQueryObj
.
page
=
e
;
this
.
getOrderListMet
();
},
// 拒绝
async
refuse
(
val
)
{
try
{
await
this
.
$confirm
(
"确定要拒绝退款么?"
,
"拒绝"
,
{
cancelButtonText
:
"取消"
,
confirmButtonText
:
"确定"
,
});
}
catch
(
e
)
{
// 取消
return
;
}
const
params
=
{
order_id
:
val
.
order_id
,
};
const
res
=
await
orderRefundReject
(
params
);
if
(
res
.
code
===
0
)
{
this
.
$message
({
type
:
"success"
,
message
:
"订单已驳回"
,
});
}
else
{
this
.
$message
.
error
(
res
.
reason
);
}
this
.
getOrderListMet
();
},
// 同意
agree
(
val
)
{
this
.
refund
(
val
);
},
// 全选
handleCheckAllChange
(
val
)
{
for
(
var
i
in
this
.
refundGoods
)
{
this
.
refundGoods
[
i
].
refundedGoodsSel
=
val
;
}
// this.isIndeterminate = false;
},
// 退款
async
refund
(
val
)
{
this
.
refundShow
=
true
;
this
.
checkAll
=
false
;
this
.
refundGoods
=
[];
const
params
=
{
order_id
:
val
.
order_id
,
};
const
res
=
await
orderItemList
(
params
);
this
.
refundGoods
=
res
.
result
;
for
(
var
i
in
res
.
result
)
{
this
.
refundGoods
[
i
].
refundableQuantity
=
Number
(
res
.
result
[
i
].
goods_num
-
res
.
result
[
i
].
refund_count
);
this
.
refundGoods
[
i
].
payment
=
Number
(
res
.
result
[
i
].
payment
//res.result[i].payment - res.result[i].refund_amount
);
// console.log( res.result[i]);
this
.
refundGoods
[
i
].
amountToRefund
=
Number
(
res
.
result
[
i
].
payment
-
res
.
result
[
i
].
refund_amount
);
}
},
// 退款确认
async
handleConfirmRefund
()
{
const
isCheckAllSelected
=
()
=>
this
.
refundGoods
.
refundedGoodsSel
;
const
getAllItems
=
()
=>
this
.
refundGoods
;
const
getSelectedItems
=
()
=>
{
const
isSelected
=
({
refundedGoodsSel
})
=>
refundedGoodsSel
;
return
this
.
refundGoods
.
filter
(
isSelected
);
};
const
convertToNumber
=
(
str
)
=>
{
return
!
Number
.
isNaN
(
parseFloat
(
str
))
?
parseFloat
(
str
)
:
0
;
};
const
processRefundItem
=
(
item
)
=>
{
return
{
order_item_id
:
item
.
order_item_id
,
refund_num
:
item
.
refundableQuantity
||
0
,
refund_amount
:
convertToNumber
(
item
.
amountToRefund
),
};
};
const
orderId
=
this
.
refundGoods
[
0
].
order_id
;
let
itemsToRefund
=
null
;
if
(
isCheckAllSelected
())
{
itemsToRefund
=
getAllItems
();
}
else
{
itemsToRefund
=
getSelectedItems
();
}
itemsToRefund
=
itemsToRefund
.
map
(
processRefundItem
);
// if ((itemsToRefund.length = 0)) {
// this.$message.error("请选择退款商品");
// return;
// }
const
res
=
await
refundOrder
(
orderId
,
itemsToRefund
);
if
(
res
.
code
===
0
)
{
this
.
$message
.
success
(
"退款成功"
);
this
.
refundShow
=
false
;
return
;
}
// this.refundShow = false;
this
.
$message
.
error
(
res
.
reason
);
},
},
created
()
{
this
.
getMarketingListMet
();
// 活动名称
this
.
getSubShopListMet
();
// 自提点
this
.
getOrderListMet
();
// table列表
},
};
</
script
>
<
style
lang=
"less"
src=
"../orderManagement/index.less"
scope
></
style
>
<
style
lang=
"less"
scoped
>
.check-wrap{
/deep/ .el-checkbox__label {
white-space: normal;
word-break: break-all;
}
}
</
style
>
src/pages/Groupmeal/orderManagement/index.vue
View file @
b94c0525
...
@@ -630,6 +630,9 @@ export default {
...
@@ -630,6 +630,9 @@ export default {
// 获取订单列表
// 获取订单列表
async
getOrderListMet
()
{
async
getOrderListMet
()
{
if
(
this
.
$route
.
query
.
marketing_type
==
"4"
){
this
.
orderQueryObj
.
marketing_id
=
this
.
$route
.
query
.
marketing_id
;
}
try
{
try
{
const
res
=
await
getOrderList
(
this
.
orderQueryObj
);
const
res
=
await
getOrderList
(
this
.
orderQueryObj
);
this
.
goodsNum
=
res
.
goods_num
;
// 商品共计
this
.
goodsNum
=
res
.
goods_num
;
// 商品共计
...
...
src/router/Groupmeal/index.js
View file @
b94c0525
...
@@ -8,6 +8,12 @@
...
@@ -8,6 +8,12 @@
// redirect: "/op/groupmeal/orderManagement",
// redirect: "/op/groupmeal/orderManagement",
component
:
()
=>
import
(
/* webpackChunkName: "goods" */
"@/pages/Groupmeal/orderManagement"
)
component
:
()
=>
import
(
/* webpackChunkName: "goods" */
"@/pages/Groupmeal/orderManagement"
)
},
},
{
path
:
"/op/groupmeal/newOrderManagement"
,
name
:
"newOrderManagement"
,
// redirect: "/op/groupmeal/orderManagement",
component
:
()
=>
import
(
/* webpackChunkName: "goods" */
"@/pages/Groupmeal/newOrderManagement"
)
},
{
{
path
:
"/op/groupmeal/distrib"
,
path
:
"/op/groupmeal/distrib"
,
name
:
"Distrib"
,
name
:
"Distrib"
,
...
...
src/service/Groupmeal/groupmeal.js
View file @
b94c0525
...
@@ -27,9 +27,11 @@ export async function getSaveDeliverer(params) {
...
@@ -27,9 +27,11 @@ export async function getSaveDeliverer(params) {
return
res
;
return
res
;
}
}
// 老订单管理
// 获取订单列表
// 获取订单列表
export
async
function
getOrderList
(
params
)
{
export
async
function
getOrderList
(
params
)
{
const
res
=
await
axios
.
get
(
"/api/v1/order/background/order_list"
,
{
const
res
=
await
axios
.
get
(
"/api/v1/order/
old
background/order_list"
,
{
params
params
});
});
return
res
;
return
res
;
...
@@ -37,13 +39,13 @@ export async function getOrderList(params) {
...
@@ -37,13 +39,13 @@ export async function getOrderList(params) {
// 获取活动名称
// 获取活动名称
export
async
function
getMarketingList
()
{
export
async
function
getMarketingList
()
{
const
res
=
await
axios
.
get
(
"/api/v1/order/background/marketing_list"
);
const
res
=
await
axios
.
get
(
"/api/v1/order/
old
background/marketing_list"
);
return
res
;
return
res
;
}
}
// 获取商品名称
// 获取商品名称
export
async
function
getGoodsList
(
params
)
{
export
async
function
getGoodsList
(
params
)
{
const
res
=
await
axios
.
get
(
"/api/v1/order/background/goods_list"
,
{
const
res
=
await
axios
.
get
(
"/api/v1/order/
old
background/goods_list"
,
{
params
params
});
});
return
res
;
return
res
;
...
@@ -51,7 +53,7 @@ export async function getGoodsList(params) {
...
@@ -51,7 +53,7 @@ export async function getGoodsList(params) {
// 获取自提点
// 获取自提点
export
async
function
getSubShopList
(
params
)
{
export
async
function
getSubShopList
(
params
)
{
const
res
=
await
axios
.
get
(
"/api/v1/order/background/sub_shop_list"
,{
const
res
=
await
axios
.
get
(
"/api/v1/order/
old
background/sub_shop_list"
,{
params
params
});
});
return
res
;
return
res
;
...
@@ -59,7 +61,7 @@ export async function getSubShopList(params) {
...
@@ -59,7 +61,7 @@ export async function getSubShopList(params) {
// 导出订单
// 导出订单
export
async
function
orderExport
(
params
)
{
export
async
function
orderExport
(
params
)
{
const
res
=
await
axios
.
get
(
"/api/v1/order/background/order_export"
,
{
const
res
=
await
axios
.
get
(
"/api/v1/order/
old
background/order_export"
,
{
params
params
});
});
return
res
;
return
res
;
...
@@ -67,7 +69,7 @@ export async function orderExport(params) {
...
@@ -67,7 +69,7 @@ export async function orderExport(params) {
// 打印订单
// 打印订单
export
async
function
orderPrint
(
params
)
{
export
async
function
orderPrint
(
params
)
{
const
res
=
await
axios
.
get
(
"/api/v1/order/background/order_print"
,
{
const
res
=
await
axios
.
get
(
"/api/v1/order/
old
background/order_print"
,
{
params
params
});
});
return
res
;
return
res
;
...
@@ -75,7 +77,7 @@ export async function orderPrint(params) {
...
@@ -75,7 +77,7 @@ export async function orderPrint(params) {
// 订单退款列表
// 订单退款列表
export
async
function
orderItemList
(
params
)
{
export
async
function
orderItemList
(
params
)
{
const
res
=
await
axios
.
get
(
"/api/v1/order/background/order_item_list"
,
{
const
res
=
await
axios
.
get
(
"/api/v1/order/
old
background/order_item_list"
,
{
params
params
});
});
return
res
;
return
res
;
...
@@ -87,7 +89,7 @@ export async function refundOrder(orderId, itemsToRefund) {
...
@@ -87,7 +89,7 @@ export async function refundOrder(orderId, itemsToRefund) {
// order_id: orderId,
// order_id: orderId,
// refund_list: itemsToRefund
// refund_list: itemsToRefund
// };
// };
const
res
=
await
axios
.
post
(
"/api/v1/order/background/order_refund"
,
{
const
res
=
await
axios
.
post
(
"/api/v1/order/
old
background/order_refund"
,
{
order_id
:
orderId
,
order_id
:
orderId
,
refund_list
:
itemsToRefund
refund_list
:
itemsToRefund
});
});
...
@@ -96,7 +98,7 @@ export async function refundOrder(orderId, itemsToRefund) {
...
@@ -96,7 +98,7 @@ export async function refundOrder(orderId, itemsToRefund) {
// 订单驳回
// 订单驳回
export
async
function
orderRefundReject
(
params
)
{
export
async
function
orderRefundReject
(
params
)
{
const
res
=
await
axios
.
get
(
"/api/v1/order/background/order_refund_reject"
,
{
const
res
=
await
axios
.
get
(
"/api/v1/order/
old
background/order_refund_reject"
,
{
params
params
});
});
return
res
;
return
res
;
...
@@ -104,6 +106,94 @@ export async function orderRefundReject(params) {
...
@@ -104,6 +106,94 @@ export async function orderRefundReject(params) {
// 导出订单
// 导出订单
export
function
getOrderExportURL
(
eventId
,
type
)
{
export
function
getOrderExportURL
(
eventId
,
type
)
{
var
ENV
;
if
(
process
.
env
.
NODE_ENV
==
"development"
){
ENV
=
"http://bp-dev.ini.yidian-inc.com/"
}
else
{
ENV
=
"http://bp-test.ini.yidian-inc.com/"
}
return
`
${
ENV
}
order/oldbackground/order_export?marketing_id=
${
eventId
}
&type=
${
type
}
`
;
}
// 新订单管理
// 获取订单列表
export
async
function
newGetOrderList
(
params
)
{
const
res
=
await
axios
.
get
(
"/api/v1/order/background/order_list"
,
{
params
});
return
res
;
}
// 获取活动名称
export
async
function
newGetMarketingList
()
{
const
res
=
await
axios
.
get
(
"/api/v1/order/background/marketing_list"
);
return
res
;
}
// 获取商品名称
export
async
function
newGetGoodsList
(
params
)
{
const
res
=
await
axios
.
get
(
"/api/v1/order/background/goods_list"
,
{
params
});
return
res
;
}
// 获取自提点
export
async
function
newGetSubShopList
(
params
)
{
const
res
=
await
axios
.
get
(
"/api/v1/order/background/sub_shop_list"
,{
params
});
return
res
;
}
// 导出订单
export
async
function
newOrderExport
(
params
)
{
const
res
=
await
axios
.
get
(
"/api/v1/order/background/order_export"
,
{
params
});
return
res
;
}
// 打印订单
export
async
function
newOrderPrint
(
params
)
{
const
res
=
await
axios
.
get
(
"/api/v1/order/background/order_print"
,
{
params
});
return
res
;
}
// 订单退款列表
export
async
function
newOrderItemList
(
params
)
{
const
res
=
await
axios
.
get
(
"/api/v1/order/background/order_item_list"
,
{
params
});
return
res
;
}
// 订单退款
export
async
function
newRefundOrder
(
orderId
,
itemsToRefund
)
{
// const params = {
// order_id: orderId,
// refund_list: itemsToRefund
// };
const
res
=
await
axios
.
post
(
"/api/v1/order/background/order_refund"
,
{
order_id
:
orderId
,
refund_list
:
itemsToRefund
});
return
res
;
}
// 订单驳回
export
async
function
newOrderRefundReject
(
params
)
{
const
res
=
await
axios
.
get
(
"/api/v1/order/background/order_refund_reject"
,
{
params
});
return
res
;
}
// 导出订单
export
function
newGetOrderExportURL
(
eventId
,
type
)
{
var
ENV
;
var
ENV
;
if
(
process
.
env
.
NODE_ENV
==
"development"
){
if
(
process
.
env
.
NODE_ENV
==
"development"
){
ENV
=
"http://bp-dev.ini.yidian-inc.com/"
ENV
=
"http://bp-dev.ini.yidian-inc.com/"
...
...
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