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
bde824ed
Commit
bde824ed
authored
Jul 28, 2021
by
your yuchenglong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update:打印订单
parent
39197f5b
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
50 additions
and
51 deletions
+50
-51
groupmeal.js
server/controllers/groupmeal.js
+1
-1
router.js
server/router.js
+1
-1
index.vue
src/pages/Groupmeal/orderManagement/index.vue
+47
-48
groupmeal.js
src/service/Groupmeal/groupmeal.js
+1
-1
No files found.
server/controllers/groupmeal.js
View file @
bde824ed
...
...
@@ -93,7 +93,7 @@ exports.orderExport = async ctx => {
// 打印订单
exports
.
orderPrint
=
async
ctx
=>
{
const
url
=
`
${
GROUPMEAL_URI
}
/order/background/print`
;
const
url
=
`
${
GROUPMEAL_URI
}
/order/background/
order_
print`
;
const
opts
=
{
url
,
method
:
"GET"
...
...
server/router.js
View file @
bde824ed
...
...
@@ -75,7 +75,7 @@ router.get(`${API_VERSION}/order/background/goods_list`, groupmeal.getGoodsList)
router
.
get
(
`
${
API_VERSION
}
/order/background/sub_shop_list`
,
groupmeal
.
getSubShopList
);
router
.
get
(
`
${
API_VERSION
}
/order/background/order_export`
,
groupmeal
.
orderExport
);
router
.
get
(
`
${
API_VERSION
}
/order/background/order_export`
,
groupmeal
.
orderExport
);
router
.
get
(
`
${
API_VERSION
}
/order/background/print`
,
groupmeal
.
orderPrint
);
router
.
get
(
`
${
API_VERSION
}
/order/background/
order_
print`
,
groupmeal
.
orderPrint
);
router
.
get
(
`
${
API_VERSION
}
/order/background/order_item_list`
,
groupmeal
.
orderItemList
);
router
.
get
(
`
${
API_VERSION
}
/order/background/order_refund_reject`
,
groupmeal
.
orderRefundReject
);
router
.
post
(
`
${
API_VERSION
}
/order/background/order_refund`
,
groupmeal
.
orderRefund
);
...
...
src/pages/Groupmeal/orderManagement/index.vue
View file @
bde824ed
...
...
@@ -81,7 +81,6 @@
<el-col
:span=
"12"
style=
"text-align: right"
>
<el-button
@
click=
"exportOrder"
>
导出
</el-button>
<el-button
@
click=
"printOrder"
>
打印
</el-button>
<!--
<a
href=
"bp-dev.ini.yidian-inc.com/order/background/order_export?marketing_id=1NJF2J&type=1"
>
导出文件
</a>
-->
</el-col>
</el-row>
<el-tab-pane
label=
"全部"
name=
"all"
>
...
...
@@ -220,8 +219,10 @@
</el-form-item>
<el-form-item
class=
"exportBtn"
>
<el-button
@
click=
"exportShow = false"
>
取消
</el-button>
<a
:href=
"exportURL"
><el-button
type=
"primary"
>
确定导出
</el-button></a
<a
:href=
"exportURL"
style=
"margin-left: 20px"
><el-button
type=
"primary"
@
click=
"exportShow = false"
>
确定导出
</el-button
></a
>
</el-form-item>
</el-dialog>
...
...
@@ -290,7 +291,6 @@ import {
getMarketingList
,
getGoodsList
,
getSubShopList
,
orderExport
,
orderPrint
,
orderItemList
,
orderRefundReject
,
...
...
@@ -397,8 +397,12 @@ export default {
},
computed
:
{
exportURL
()
{},
exportURL
()
{
return
getOrderExportURL
(
this
.
orderQueryObj
.
marketing_id
,
this
.
exportSel
);
},
},
methods
:
{
// 获取活动名称
async
getMarketingListMet
()
{
...
...
@@ -426,7 +430,6 @@ export default {
try
{
const
res
=
await
getSubShopList
();
this
.
selLiftPoinArr
=
res
.
result
;
console
.
log
(
this
);
}
catch
(
error
)
{
this
.
$message
.
error
(
"发生未知错误,请稍后再试一下吧~~~"
);
console
.
error
(
error
);
...
...
@@ -469,41 +472,45 @@ export default {
this
.
exportShow
=
true
;
},
// 确认导出
async
confirmExport
()
{
if
(
this
.
orderQueryObj
.
marketing_id
!=
""
)
{
const
params
=
{
marketing_id
:
this
.
orderQueryObj
.
marketing_id
,
type
:
this
.
exportSel
,
};
const
res
=
await
orderExport
(
params
);
if
(
res
)
{
const
xlsx
=
"application/vnd.ms-excel"
;
const
blob
=
new
Blob
([
res
],
{
type
:
xlsx
});
const
a
=
document
.
createElement
(
"a"
);
a
.
download
=
"fileName.xls"
;
a
.
href
=
window
.
URL
.
createObjectURL
(
blob
);
a
.
click
();
a
.
remove
();
this
.
exportShow
=
false
;
}
else
{
this
.
$message
.
error
(
"导出失败"
);
}
}
else
{
this
.
$message
.
error
(
"请选择活动名称"
);
}
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
!=
""
)
{
const
params
=
{
marketing_id
:
this
.
orderQueryObj
.
marketing_id
,
};
const
res
=
await
orderPrint
(
params
);
console
.
log
(
res
);
}
else
{
if
(
this
.
orderQueryObj
.
marketing_id
===
""
)
{
this
.
$message
.
error
(
"请选择活动名称"
);
return
}
let
res
=
this
.
printOrderMet
(
false
);
if
(
res
.
code
===
0
)
{
this
.
$message
({
type
:
"success"
,
message
:
"打印成功"
,
});
return
}
try
{
await
this
.
$confirm
(
"是否强制打印?"
,
"打印"
,
{
cancelButtonText
:
"取消"
,
confirmButtonText
:
"确定"
,
})
}
catch
(
e
)
{
// 取消
return
}
res
=
this
.
printOrderMet
(
true
)
if
(
res
.
code
!==
0
)
{
this
.
$message
.
error
(
"打印失败"
);
}
},
...
...
@@ -511,7 +518,6 @@ export default {
async
getOrderListMet
()
{
try
{
const
res
=
await
getOrderList
(
this
.
params
);
console
.
log
(
res
);
this
.
goodsNum
=
res
.
count
;
this
.
totalNum
=
res
.
count
;
this
.
orderTableData
=
res
.
result
;
...
...
@@ -529,7 +535,6 @@ export default {
// 拒绝
refuse
(
val
)
{
console
.
log
(
val
);
this
.
$confirm
(
"确定要拒绝退款么?"
,
"拒绝"
,
{
cancelButtonText
:
"取消"
,
confirmButtonText
:
"确定"
,
...
...
@@ -539,18 +544,14 @@ export default {
order_id
:
val
.
order_id
,
};
const
res
=
orderRefundReject
(
params
);
console
.
log
(
res
);
console
.
log
(
res
.
status
);
this
.
$message
({
type
:
"success"
,
message
:
"
已拒绝!
"
,
message
:
"
此订单已驳回
"
,
});
this
.
getOrderListMet
()
})
.
catch
(()
=>
{
// this.$message({
// type: "info",
// message: "已取消",
// });
});
.
catch
(()
=>
{});
},
// 同意
...
...
@@ -560,7 +561,6 @@ export default {
// 全选
handleCheckAllChange
(
val
)
{
console
.
log
(
val
);
this
.
refundGoods
.
refundedGoodsSel
=
val
;
this
.
isIndeterminate
=
false
;
},
...
...
@@ -572,7 +572,6 @@ export default {
order_id
:
val
.
order_id
,
};
const
res
=
await
orderItemList
(
params
);
console
.
log
(
res
.
result
);
this
.
refundGoods
=
res
.
result
;
},
// 退款确认
...
...
src/service/Groupmeal/groupmeal.js
View file @
bde824ed
...
...
@@ -68,7 +68,7 @@ export async function orderExport(params) {
// 打印订单
export
async
function
orderPrint
(
params
)
{
const
res
=
await
axios
.
get
(
"/api/v1/order/background/print"
,
{
const
res
=
await
axios
.
get
(
"/api/v1/order/background/
order_
print"
,
{
params
});
return
res
;
...
...
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