From 1f17ef28248ef33c015a602565bc17f1a17815da Mon Sep 17 00:00:00 2001 From: wangfukang <15630117759@163.com> Date: Mon, 15 Jun 2026 11:59:30 +0800 Subject: [PATCH] 1 --- src/api/index.js | 8 ++ .../app/business/logistics/logistics.vue | 84 +++++++++++++++---- vue.config.js | 4 +- 3 files changed, 79 insertions(+), 17 deletions(-) diff --git a/src/api/index.js b/src/api/index.js index dac840d..ceddc26 100644 --- a/src/api/index.js +++ b/src/api/index.js @@ -749,6 +749,14 @@ export const getOrderList = (params) => { export const orderScheduling = (params) => { return postBodyRequest('/mall/delivery/pagebyworker', params) } +// 查询区域配送时长 +export const getDeliveryTimeSetting = (params) => { + return getRequest('/mall/admin/seckillGroup/deliveryTime/get', params) +} +// 保存区域配送时长 +export const saveDeliveryTimeSetting = (params) => { + return postBodyRequest('/mall/admin/seckillGroup/deliveryTime/save', params) +} //取消订单 export const returnOrder = (params) => { return postRequest('/mall/order/cancel', params) diff --git a/src/views/app/business/logistics/logistics.vue b/src/views/app/business/logistics/logistics.vue index 428d89e..dc1d489 100644 --- a/src/views/app/business/logistics/logistics.vue +++ b/src/views/app/business/logistics/logistics.vue @@ -9,18 +9,32 @@ + - - - - - - - - - - - +
+ + + + + + + + + + +
+
+
+ + + 分钟 + + + + +
+
+
- +
@@ -59,14 +73,14 @@
- + 已选择 {{ selectList.length }}清空 -
- + @@ -102,6 +116,8 @@ enableUser, disableUser, deleteOrder, + getDeliveryTimeSetting, + saveDeliveryTimeSetting, } from "@/api/index"; import excel from "@/libs/excel"; import addEdit from "./addEdit.vue"; @@ -127,6 +143,7 @@ loading: true, reading: false, importLoading: false, + settingLoading: false, loadingExport: true, exportModalVisible: false, transferOrder: false, @@ -151,8 +168,14 @@ regionId: JSON.parse(this.getStore("user")).departmentId, status: 0 }, + settingForm: { + regionId: JSON.parse(this.getStore("user")).departmentId, + deliveryTime: 30 + }, selectDate: null, form: {}, + tabName: "1", + tabName1: "0", workerList: [{ type: "index", width: 60, @@ -405,6 +428,7 @@ methods: { init() { this.getLogisticsInfo(); + this.getSetting(); }, //点击页面转单-->点击弹窗转单 goTransferOrder(item) { @@ -430,10 +454,40 @@ this.searchForm.departmentId = v; }, changeOrderTab(v) { + if (v === "4") { + this.getSetting(); + return; + } this.searchForm.pageNum = 1; this.searchForm.deliveryType = v; this.getLogisticsInfo(); }, + getSetting() { + getDeliveryTimeSetting({ + regionId: this.settingForm.regionId + }).then((res) => { + if (res.success) { + this.settingForm.deliveryTime = res.result == null ? 30 : Number(res.result); + } + }); + }, + saveSetting() { + if (this.settingForm.deliveryTime === null || this.settingForm.deliveryTime === undefined || this.settingForm.deliveryTime === "") { + this.$Message.warning("请输入配送时长"); + return; + } + this.settingLoading = true; + saveDeliveryTimeSetting({ + regionId: this.settingForm.regionId, + deliveryTime: Number(this.settingForm.deliveryTime) + }).then((res) => { + if (res.success) { + this.$Message.success("保存成功"); + } + }).finally(() => { + this.settingLoading = false; + }); + }, changeTab(v) { this.searchForm.pageNum = 1; this.searchForm.status = v; diff --git a/vue.config.js b/vue.config.js index 886200f..4fbad80 100644 --- a/vue.config.js +++ b/vue.config.js @@ -7,8 +7,8 @@ module.exports = { port: 8889, proxy: { '/hiver': { - target: 'https://hbkuaishi.com', // 正式1 - // target: 'http://192.168.100.30:8888', // 本地 + //target: 'https://hbkuaishi.com', // 正式1 + target: 'http://192.168.100.30:8888', // 本地 ws: false }, '/foo': {