diff --git a/README.md b/README.md index d3fe9fab1..e24feaad7 100644 --- a/README.md +++ b/README.md @@ -174,6 +174,7 @@ lilishop-ui | ✅ 卡密商品 | ✅ 二级分销 | | ✅ 定时任务管理(数据库配置驱动) | ✅ 预约服务商品 | | ✅ 主题色管理 | ✅ 立减优惠券 | +| ✅ 小程序订单管理(简单版) | ✅ 微信订单自动上报开关 | ### 🔜 近期规划中 - 🔜 微信小店对接 diff --git a/manager/src/router/router.js b/manager/src/router/router.js index a9b3563ff..0c173aae7 100644 --- a/manager/src/router/router.js +++ b/manager/src/router/router.js @@ -169,6 +169,12 @@ export const otherRouter = { name: "order-detail", component: () => import("@/views/order/order/orderDetail.vue") }, + { + path: "wechat-order-list", + title: "小程序订单", + name: "wechat-order-list", + component: () => import("@/views/order/wechat/orderList.vue") + }, { path: "appointment/work-orders", title: "预约工单", diff --git a/manager/src/views/order/order/orderList.vue b/manager/src/views/order/order/orderList.vue index c793aa7a0..46950b2cc 100644 --- a/manager/src/views/order/order/orderList.vue +++ b/manager/src/views/order/order/orderList.vue @@ -37,7 +37,7 @@ - + @@ -70,7 +70,7 @@ /> -
+
导出订单
@@ -157,6 +157,13 @@ import { ElMessage, ElMessageBox } from "element-plus"; import { unitPrice, customRouterPush } from "@/utils/filters"; const PAGE_SIZES = [20, 50, 100]; +// 独立渠道页面复用列表,来源限制不从地址栏或可重置表单中读取。 +const props = defineProps({ + fixedClientType: { type: String, default: "" }, + fixedPaymentMethod: { type: String, default: "" }, + allowExport: { type: Boolean, default: true }, +}); + const PROMOTION_OPTIONS = [ { label: "普通订单", value: "NORMAL" }, { label: "拼团订单", value: "PINTUAN" }, @@ -195,7 +202,7 @@ function emptySearchForm(pageSize = 20) { consigneeMobile: "", storeName: "", orderStatus: "", - paymentMethod: "", + paymentMethod: props.fixedPaymentMethod, orderPromotionType: "", }; } @@ -367,7 +374,7 @@ function selectDateRange(v) { } } function countParams() { - const params = { ...searchForm.value }; + const params = listParams(); delete params.orderStatus; delete params.pageNumber; delete params.pageSize; @@ -375,9 +382,15 @@ function countParams() { delete params.order; return params; } +function listParams() { + const params = { ...searchForm.value }; + if (props.fixedClientType) params.clientType = props.fixedClientType; + if (props.fixedPaymentMethod) params.paymentMethod = props.fixedPaymentMethod; + return params; +} function getDataList() { loading.value = true; - API_Order.getOrderList(searchForm.value) + API_Order.getOrderList(listParams()) .then((res) => { if (res.success) { data.value = res.result.records; @@ -395,6 +408,7 @@ function detail(v) { }); } async function exportOrder() { + if (!props.allowExport) return; if (!searchForm.value.startDate || !searchForm.value.endDate) { try { await ElMessageBox.confirm( @@ -407,7 +421,7 @@ async function exportOrder() { } } exporting.value = true; - API_Order.exportOrder(searchForm.value) + API_Order.exportOrder(listParams()) .then((res) => { const blob = new Blob([res], { type: "application/vnd.ms-excel;charset=utf-8", diff --git a/manager/src/views/order/wechat/orderList.vue b/manager/src/views/order/wechat/orderList.vue new file mode 100644 index 000000000..54d200d2e --- /dev/null +++ b/manager/src/views/order/wechat/orderList.vue @@ -0,0 +1,25 @@ + + + + + diff --git a/manager/src/views/sys/setting-manage/setting/ORDER_SETTING.vue b/manager/src/views/sys/setting-manage/setting/ORDER_SETTING.vue index d9b56333b..0dfe0541f 100644 --- a/manager/src/views/sys/setting-manage/setting/ORDER_SETTING.vue +++ b/manager/src/views/sys/setting-manage/setting/ORDER_SETTING.vue @@ -1,6 +1,11 @@