From ed0bb999ce584eb8549abf59dec6b67ebf946e97 Mon Sep 17 00:00:00 2001 From: Richie <280645618@qq.com> Date: Fri, 23 May 2025 20:21:07 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E5=96=84=E5=8F=91=E8=B4=A7=E8=AE=BE?= =?UTF-8?q?=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../oms/controller/LogisticsController.java | 63 +++ .../oms/controller/ShopController.java | 28 +- docs/qihang-oms.sql | 2 +- vue/src/api/api/logistics.js | 2 +- vue/src/views/shipping/logistics/company.vue | 63 ++- vue/src/views/shipping/logistics/index.vue | 41 ++ .../logistics/shop_ewaybill_account.vue | 387 ++++++++++++++++++ vue/src/views/tao/ewaybill/index.vue | 5 + 8 files changed, 569 insertions(+), 22 deletions(-) create mode 100644 api/oms-api/src/main/java/cn/qihangerp/oms/controller/LogisticsController.java create mode 100644 vue/src/views/shipping/logistics/index.vue create mode 100644 vue/src/views/shipping/logistics/shop_ewaybill_account.vue diff --git a/api/oms-api/src/main/java/cn/qihangerp/oms/controller/LogisticsController.java b/api/oms-api/src/main/java/cn/qihangerp/oms/controller/LogisticsController.java new file mode 100644 index 00000000..42c3de92 --- /dev/null +++ b/api/oms-api/src/main/java/cn/qihangerp/oms/controller/LogisticsController.java @@ -0,0 +1,63 @@ +package cn.qihangerp.oms.controller; + +import cn.qihangerp.common.AjaxResult; +import cn.qihangerp.common.PageQuery; +import cn.qihangerp.common.PageResult; +import cn.qihangerp.common.TableDataInfo; +import cn.qihangerp.domain.OLogisticsCompany; +import cn.qihangerp.domain.OShop; +import cn.qihangerp.domain.OShopPlatform; +import cn.qihangerp.module.service.OLogisticsCompanyService; +import cn.qihangerp.module.service.OShopPlatformService; +import cn.qihangerp.module.service.OShopService; +import cn.qihangerp.oms.request.ShopBo; +import cn.qihangerp.security.common.BaseController; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import lombok.AllArgsConstructor; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.web.bind.annotation.*; + +import java.util.Arrays; +import java.util.List; + +/** + * 店铺Controller + * + * @author qihang + * @date 2023-12-31 + */ +@AllArgsConstructor +@RestController +@RequestMapping("/shop") +public class LogisticsController extends BaseController { + private final OLogisticsCompanyService logisticsCompanyService; + private final OShopService shopService; + private final OShopPlatformService platformService; + + + + @GetMapping("/logistics_status") + public TableDataInfo logisticsStatusList(Integer status, Integer shopType, Integer shopId) + { + if(status==null) status=1; + if(shopType==null)shopType=0; + return getDataTable(logisticsCompanyService.queryListByStatus(status,shopType, shopId)); + } + /** + * 查询店铺列表logistics + */ + @GetMapping("/logistics") + public TableDataInfo logisticsList(Integer type, Integer shopId, PageQuery pageQuery) + { + if(type==null)type=0; + PageResult result = logisticsCompanyService.queryPageList(type, shopId, pageQuery); + return getDataTable(result); + } + + @PostMapping("/logistics/add") + public AjaxResult add(@RequestBody OLogisticsCompany company) + { + company.setPlatformId(0); + return toAjax(logisticsCompanyService.save(company)); + } +} diff --git a/api/oms-api/src/main/java/cn/qihangerp/oms/controller/ShopController.java b/api/oms-api/src/main/java/cn/qihangerp/oms/controller/ShopController.java index 5274f02c..87886b5f 100644 --- a/api/oms-api/src/main/java/cn/qihangerp/oms/controller/ShopController.java +++ b/api/oms-api/src/main/java/cn/qihangerp/oms/controller/ShopController.java @@ -117,18 +117,18 @@ public class ShopController extends BaseController { return toAjax(shopService.removeBatchByIds(Arrays.stream(ids).toList())); } - @GetMapping("/logistics_status") - public TableDataInfo logisticsStatusList(Integer status, Integer shopType, Integer shopId) - { - return getDataTable(logisticsCompanyService.queryListByStatus(status,shopType, shopId)); - } - /** - * 查询店铺列表logistics - */ - @GetMapping("/logistics") - public TableDataInfo logisticsList(Integer type, Integer shopId, PageQuery pageQuery) - { - PageResult result = logisticsCompanyService.queryPageList(type, shopId, pageQuery); - return getDataTable(result); - } +// @GetMapping("/logistics_status") +// public TableDataInfo logisticsStatusList(Integer status, Integer shopType, Integer shopId) +// { +// return getDataTable(logisticsCompanyService.queryListByStatus(status,shopType, shopId)); +// } +// /** +// * 查询店铺列表logistics +// */ +// @GetMapping("/logistics") +// public TableDataInfo logisticsList(Integer type, Integer shopId, PageQuery pageQuery) +// { +// PageResult result = logisticsCompanyService.queryPageList(type, shopId, pageQuery); +// return getDataTable(result); +// } } diff --git a/docs/qihang-oms.sql b/docs/qihang-oms.sql index 48f3c7db..b9df5d85 100644 --- a/docs/qihang-oms.sql +++ b/docs/qihang-oms.sql @@ -3077,7 +3077,7 @@ INSERT INTO `sys_menu` VALUES (2079, '字典管理', 5, 9, 'dict', 'system/dict/ INSERT INTO `sys_menu` VALUES (2084, '电子面单设置', 3, 22, 'ewaybill_account', 'shop/ewaybillAccount/index', NULL, 1, 0, 'C', '0', '0', '', 'code', 'admin', '2024-03-21 20:05:09', 'admin', '2025-05-19 14:17:30', ''); INSERT INTO `sys_menu` VALUES (2086, '定时任务配置', 3, 80, 'task_list', 'shop/task/index', NULL, 1, 0, 'C', '0', '0', '', 'time-range', 'admin', '2024-03-22 19:29:20', 'admin', '2025-05-19 14:24:21', ''); INSERT INTO `sys_menu` VALUES (2087, '发货管理', 0, 20, 'ship', NULL, NULL, 1, 0, 'M', '0', '0', '', 'guide', 'admin', '2024-03-30 17:36:10', 'admin', '2024-08-25 15:45:48', ''); -INSERT INTO `sys_menu` VALUES (2088, '发货快递管理', 2087, 9, 'ship_logistics', 'shipping/logistics/company', NULL, 1, 0, 'C', '0', '0', '', 'checkbox', 'admin', '2024-03-30 17:37:01', 'admin', '2024-12-08 16:19:02', ''); +INSERT INTO `sys_menu` VALUES (2088, '发货设置', 2087, 9, 'ship_logistics', 'shipping/logistics/index', NULL, 1, 0, 'C', '0', '0', '', 'checkbox', 'admin', '2024-03-30 17:37:01', 'admin', '2024-12-08 16:19:02', ''); INSERT INTO `sys_menu` VALUES (2089, '发货记录', 2087, 3, 'record', 'shipping/index', NULL, 1, 0, 'C', '0', '0', '', 'guide', 'admin', '2024-03-30 17:37:42', 'admin', '2024-07-28 18:56:02', ''); INSERT INTO `sys_menu` VALUES (2090, '角色管理', 5, 2, 'role', 'system/role/index', NULL, 1, 0, 'C', '0', '0', NULL, 'peoples', 'admin', '2024-03-31 12:40:50', '', NULL, ''); INSERT INTO `sys_menu` VALUES (2091, '部门管理', 5, 3, 'dept', 'system/dept/index', NULL, 1, 0, 'C', '0', '0', NULL, 'tree', 'admin', '2024-03-31 12:42:57', '', NULL, ''); diff --git a/vue/src/api/api/logistics.js b/vue/src/api/api/logistics.js index 0a194690..4f379921 100644 --- a/vue/src/api/api/logistics.js +++ b/vue/src/api/api/logistics.js @@ -20,7 +20,7 @@ export function getLogistics(id) { // 新增物流公司 export function addLogistics(data) { return request({ - url: '/api/logistics', + url: '/api/oms-api/shop/logistics/add', method: 'post', data: data }) diff --git a/vue/src/views/shipping/logistics/company.vue b/vue/src/views/shipping/logistics/company.vue index d5f79db0..e957e479 100644 --- a/vue/src/views/shipping/logistics/company.vue +++ b/vue/src/views/shipping/logistics/company.vue @@ -29,13 +29,22 @@ API拉取快递公司数据 + @click="handleAdd" + >添加 + + + + + + + + + @@ -79,7 +88,30 @@ :limit.sync="queryParams.pageSize" @pagination="getList" /> - + + + + + + + + + + + + + + + + + + + + + @@ -88,6 +120,7 @@ import {listLogistics, updateStatus} from "@/api/shop/shop"; import {MessageBox} from "element-ui"; import {isRelogin} from "@/utils/request"; import {pullLogisticsTao,pullLogisticsJd} from "@/api/tao/shop_api"; +import {addLogistics} from "@/api/api/logistics"; export default { name: "Shop", @@ -161,7 +194,9 @@ export default { this.loading = false; }); }, - + handleAdd() { + this.open=true + }, /** 搜索按钮操作 */ handleQuery() { this.queryParams.pageNum = 1; @@ -227,7 +262,23 @@ export default { console.log('更新状态====',response) this.getList() }) - } + }, + cancel(){ + this.open=false + }, + /** 提交按钮 */ + submitForm() { + this.$refs["form"].validate(valid => { + if (valid) { + addLogistics(this.form).then(response => { + this.$modal.msgSuccess("添加成功"); + this.open = false; + this.getList(); + }); + + } + }); + }, } }; diff --git a/vue/src/views/shipping/logistics/index.vue b/vue/src/views/shipping/logistics/index.vue new file mode 100644 index 00000000..f2840792 --- /dev/null +++ b/vue/src/views/shipping/logistics/index.vue @@ -0,0 +1,41 @@ + + + diff --git a/vue/src/views/shipping/logistics/shop_ewaybill_account.vue b/vue/src/views/shipping/logistics/shop_ewaybill_account.vue new file mode 100644 index 00000000..3c98a163 --- /dev/null +++ b/vue/src/views/shipping/logistics/shop_ewaybill_account.vue @@ -0,0 +1,387 @@ + + + diff --git a/vue/src/views/tao/ewaybill/index.vue b/vue/src/views/tao/ewaybill/index.vue index f9893d02..442d7e75 100644 --- a/vue/src/views/tao/ewaybill/index.vue +++ b/vue/src/views/tao/ewaybill/index.vue @@ -420,6 +420,11 @@ export default { // 表单校验 rules: { accountId: [{ required: true, message: '请选择电子面单账户' }], + height: [{ required: true, message: '不能为空' }], + weight: [{ required: true, message: '不能为空' }], + shippingNumber: [{ required: true, message: '不能为空' }], + shippingCompany: [{ required: true, message: '不能为空' }], + shippingCost: [{ required: true, message: '不能为空' }], } }; },