From 283f4d6afa72a1585b319be368e17cd1082a9ed9 Mon Sep 17 00:00:00 2001 From: paulGao Date: Thu, 11 Aug 2022 20:57:30 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E8=AE=A2=E5=8D=95=E5=88=97?= =?UTF-8?q?=E8=A1=A8=E6=9F=A5=E8=AF=A2=E8=AE=A2=E5=8D=95=E7=B1=BB=E5=9E=8B?= =?UTF-8?q?=E6=9F=A5=E8=AF=A2=E6=97=A0=E6=95=88=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 4 +- manager/src/views/order/order/orderList.vue | 192 ++++++++++++----- seller/src/views/order/order/orderDetail.vue | 4 +- seller/src/views/order/order/orderList.vue | 216 ++++++++++++++----- 4 files changed, 312 insertions(+), 104 deletions(-) diff --git a/.gitignore b/.gitignore index f1f7c351..f41b7802 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,6 @@ -/.vscode/ +*/.vscode/ /.idea/ -/dist/ +*/dist/ .DS_Store node_modules/ yarn.lock diff --git a/manager/src/views/order/order/orderList.vue b/manager/src/views/order/order/orderList.vue index 0039378c..38caab90 100644 --- a/manager/src/views/order/order/orderList.vue +++ b/manager/src/views/order/order/orderList.vue @@ -1,27 +1,65 @@ @@ -139,17 +203,29 @@ export default { }, { title: "订单类型", - key: "orderType", + key: "orderPromotionType", width: 120, render: (h, params) => { - if (params.row.orderType == "NORMAL") { - return h("div", [h("tag", {props: {color: "blue"}}, "普通订单")]); - } else if (params.row.orderType == "PINTUAN") { - return h("div", [h("tag", {props: {color: "volcano"}}, "拼团订单")]); - } else if (params.row.orderType == "GIFT") { - return h("div", [h("tag", {props: {color: "green"}}, "赠品订单")]); - } else if (params.row.orderType == "VIRTUAL") { - return h("div", [h("tag", {props: {color: "geekblue"}}, "核验订单")]); + if (params.row.orderPromotionType == "NORMAL") { + return h("div", [ + h("tag", { props: { color: "blue" } }, "普通订单"), + ]); + } else if (params.row.orderPromotionType == "PINTUAN") { + return h("div", [ + h("tag", { props: { color: "volcano" } }, "拼团订单"), + ]); + } else if (params.row.orderPromotionType == "GIFT") { + return h("div", [ + h("tag", { props: { color: "green" } }, "赠品订单"), + ]); + } else if (params.row.orderPromotionType == "POINTS") { + return h("div", [ + h("tag", { props: { color: "geekblue" } }, "积分订单"), + ]); + } else if (params.row.orderPromotionType == "KANJIA") { + return h("div", [ + h("tag", { props: { color: "pink" } }, "砍价订单"), + ]); } }, }, @@ -179,19 +255,33 @@ export default { minWidth: 100, render: (h, params) => { if (params.row.orderStatus == "UNPAID") { - return h("div", [h("tag", {props: {color: "magenta"}}, "未付款")]); + return h("div", [ + h("tag", { props: { color: "magenta" } }, "未付款"), + ]); } else if (params.row.orderStatus == "PAID") { - return h("div", [h("tag", {props: {color: "blue"}}, "已付款")]); + return h("div", [ + h("tag", { props: { color: "blue" } }, "已付款"), + ]); } else if (params.row.orderStatus == "UNDELIVERED") { - return h("div", [h("tag", {props: {color: "geekblue"}}, "待发货")]); + return h("div", [ + h("tag", { props: { color: "geekblue" } }, "待发货"), + ]); } else if (params.row.orderStatus == "DELIVERED") { - return h("div", [h("tag", {props: {color: "cyan"}}, "已发货")]); + return h("div", [ + h("tag", { props: { color: "cyan" } }, "已发货"), + ]); } else if (params.row.orderStatus == "COMPLETED") { - return h("div", [h("tag", {props: {color: "green"}}, "已完成")]); + return h("div", [ + h("tag", { props: { color: "green" } }, "已完成"), + ]); } else if (params.row.orderStatus == "TAKE") { - return h("div", [h("tag", {props: {color: "volcano"}}, "待核验")]); + return h("div", [ + h("tag", { props: { color: "volcano" } }, "待核验"), + ]); } else if (params.row.orderStatus == "CANCELLED") { - return h("div", [h("tag", {props: {color: "red"}}, "已取消")]); + return h("div", [ + h("tag", { props: { color: "red" } }, "已取消"), + ]); } }, }, @@ -206,11 +296,19 @@ export default { align: "center", width: 100, render: (h, params) => { - return h("Button", {props: {type: "info", size: "small",}, - style: {marginRight: "5px",}, - on: {click: () => {this.detail(params.row);},}, - }, "查看" - ) + return h( + "Button", + { + props: { type: "info", size: "small" }, + style: { marginRight: "5px" }, + on: { + click: () => { + this.detail(params.row); + }, + }, + }, + "查看" + ); }, }, ], @@ -269,23 +367,22 @@ export default { }); }, // 导出订单 - async exportOrder () { - const params = JSON.parse(JSON.stringify(this.searchForm)) + async exportOrder() { + const params = JSON.parse(JSON.stringify(this.searchForm)); params.pageNumber = 1; - params.pageSize = 10000 - const result = await API_Order.getOrderList(params) + params.pageSize = 10000; + const result = await API_Order.getOrderList(params); if (result.success) { if (result.result.records.length === 0) { - this.$Message.warning('暂无待发货订单') - return [] + this.$Message.warning("暂无待发货订单"); + return []; } else { - return result.result.records + return result.result.records; } } else { - this.$Message.warning('导出订单失败,请重试') + this.$Message.warning("导出订单失败,请重试"); } - - } + }, }, mounted() { this.init(); @@ -299,5 +396,4 @@ export default { .export-excel-wrapper { display: inline; } - diff --git a/seller/src/views/order/order/orderDetail.vue b/seller/src/views/order/order/orderDetail.vue index 721b0019..897cfad5 100644 --- a/seller/src/views/order/order/orderDetail.vue +++ b/seller/src/views/order/order/orderDetail.vue @@ -409,14 +409,14 @@
物流公司:
-
{{ logisticsInfo.shipper }}
+
{{ logisticsInfo.shipper || orderInfo.order.logisticsName }}
快递单号:
- {{ logisticsInfo.logisticCode }} + {{ logisticsInfo.logisticCode || orderInfo.order.logisticsNo }}
diff --git a/seller/src/views/order/order/orderList.vue b/seller/src/views/order/order/orderList.vue index 04c9c4e1..5db5354a 100644 --- a/seller/src/views/order/order/orderList.vue +++ b/seller/src/views/order/order/orderList.vue @@ -1,15 +1,38 @@