From e72c303e8cef70515078ef172aaf31188ac3935d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E6=99=93=E8=BF=AA?= <2596750866@qq.com> Date: Fri, 8 Nov 2024 17:15:17 +0800 Subject: [PATCH] =?UTF-8?q?[fix]=20=E9=94=80=E5=94=AE=E7=AE=A1=E7=90=86=20?= =?UTF-8?q?=E5=AE=A2=E6=88=B7=E6=8A=A5=E4=BB=B7=20=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E9=94=80=E5=94=AE=E5=AE=A2=E6=88=B7=E6=8A=A5=E4=BB=B7=E5=88=97?= =?UTF-8?q?=E8=A1=A8=E5=AF=BC=E5=87=BAcontroller=E6=8E=A5=E5=8F=A3?= =?UTF-8?q?=EF=BC=8C=E5=AE=9E=E7=8E=B0=E5=A4=9A=E9=80=89=E5=92=8C=E5=85=A8?= =?UTF-8?q?=E9=83=A8=E5=AF=BC=E5=87=BA=EF=BC=9B=20=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E9=94=80=E5=94=AE=E5=AE=A2=E6=88=B7=E6=8A=A5=E4=BB=B7=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=E5=AF=BC=E5=87=BA=E6=8C=89=E9=92=AE=E7=BB=91=E5=AE=9A?= =?UTF-8?q?=E6=96=B9=E6=B3=95=EF=BC=9B=20=E4=BF=AE=E6=94=B9=E9=94=80?= =?UTF-8?q?=E5=94=AE=E5=AE=A2=E6=88=B7=E6=8A=A5=E4=BB=B7=E8=8E=B7=E5=8F=96?= =?UTF-8?q?=E6=8A=A5=E4=BB=B7=E5=88=97=E8=A1=A8service=E6=96=B9=E6=B3=95?= =?UTF-8?q?=EF=BC=8C=E8=BF=94=E5=9B=9E=E6=89=80=E6=9C=89=E5=88=97=E8=A1=A8?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../SysCustomerQuoteController.java | 18 ++++-- .../service/ISysCustomerQuoteService.java | 2 +- .../impl/SysCustomerQuoteServiceImpl.java | 4 +- .../system/customerQuote/customerQuote.html | 64 +++++-------------- 4 files changed, 34 insertions(+), 54 deletions(-) diff --git a/ruoyi-admin/src/main/java/com/ruoyi/system/controller/SysCustomerQuoteController.java b/ruoyi-admin/src/main/java/com/ruoyi/system/controller/SysCustomerQuoteController.java index 5c08d0ca..1414bcba 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/system/controller/SysCustomerQuoteController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/system/controller/SysCustomerQuoteController.java @@ -20,6 +20,8 @@ import com.ruoyi.system.domain.exportDto.SysCustomerDto; import com.ruoyi.system.mapper.SysCustomerQuoteChildMapper; import com.ruoyi.system.service.*; import com.ruoyi.system.service.impl.SysCustomerQuoteServiceImpl; +import com.ruoyi.warehouse.domain.WarehouseInventoryReportDamage; +import com.ruoyi.warehouse.domain.WarehouseInventoryReportDamageChild; import org.activiti.engine.RuntimeService; import org.activiti.engine.TaskService; import org.activiti.engine.runtime.ProcessInstance; @@ -29,6 +31,7 @@ import org.apache.shiro.authz.annotation.RequiresPermissions; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.ui.ModelMap; +import org.springframework.util.StringUtils; import org.springframework.web.bind.annotation.*; import javax.servlet.http.HttpServletRequest; @@ -375,11 +378,18 @@ public class SysCustomerQuoteController extends BaseController @Log(title = "客户报价信息", businessType = BusinessType.EXPORT) @PostMapping("/export") @ResponseBody - public AjaxResult export(@RequestBody String[] supplierCodes) + public AjaxResult export(SysCustomerQuoteVo sysCustomerQuoteVo, String ids) { - List list = sysCustomerQuoteService.selectCustomerQuoteOneBySupplierCodes(supplierCodes); - ExcelUtil util = new ExcelUtil(SysCustomerQuote.class); - return util.exportExcel(list, "销售客户报价数据"); + if (StringUtils.isEmpty(ids)){ + List list = sysCustomerQuoteService.exportSysCustomerQuoteList(sysCustomerQuoteVo); + ExcelUtil util = new ExcelUtil(SysCustomerQuoteVo.class); + return util.exportExcel(list, "客户报价数据"); + }else { + String[] supplierCodes = ids.split(","); + List list = sysCustomerQuoteService.selectCustomerQuoteOneBySupplierCodes(supplierCodes);//客户报价编号 + ExcelUtil util = new ExcelUtil(SysCustomerQuote.class); + return util.exportExcel(list, ids); + } } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/system/service/ISysCustomerQuoteService.java b/ruoyi-admin/src/main/java/com/ruoyi/system/service/ISysCustomerQuoteService.java index 0f1c15cf..59566254 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/system/service/ISysCustomerQuoteService.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/system/service/ISysCustomerQuoteService.java @@ -33,7 +33,7 @@ public interface ISysCustomerQuoteService * @param sysCustomerQuote 客户报价信息 * @return 客户报价信息集合 */ - List selectSysCustomerQuoteList(SysCustomerQuote sysCustomerQuote); + List exportSysCustomerQuoteList(SysCustomerQuoteVo sysCustomerQuote); List selectSysCustomerQuoteList(SysCustomerQuoteVo sysCustomerQuoteVo); diff --git a/ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/SysCustomerQuoteServiceImpl.java b/ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/SysCustomerQuoteServiceImpl.java index 5344381d..dfbae80e 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/SysCustomerQuoteServiceImpl.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/SysCustomerQuoteServiceImpl.java @@ -89,8 +89,8 @@ public class SysCustomerQuoteServiceImpl implements ISysCustomerQuoteService { } @Override - public List selectSysCustomerQuoteList(SysCustomerQuote sysCustomerQuote) { - return null; + public List exportSysCustomerQuoteList(SysCustomerQuoteVo sysCustomerQuoteVo) { + return sysCustomerQuoteMapper.selectSysCustomerQuoteList(sysCustomerQuoteVo); } /** diff --git a/ruoyi-admin/src/main/resources/templates/system/customerQuote/customerQuote.html b/ruoyi-admin/src/main/resources/templates/system/customerQuote/customerQuote.html index 22489952..4fc4d434 100644 --- a/ruoyi-admin/src/main/resources/templates/system/customerQuote/customerQuote.html +++ b/ruoyi-admin/src/main/resources/templates/system/customerQuote/customerQuote.html @@ -368,55 +368,25 @@ // 导出 function exportExcel(formId) { - // $.table.set(); - var supplierCodeData = []; - var selections = $("#bootstrap-table").bootstrapTable("getSelections"); - if(selections.length === 0){ - $.modal.confirm("确定导出所有的客户报价吗?", function() { - var currentId = $.common.isEmpty(formId) ? $('form').attr('id') : formId; - var params = $("#bootstrap-table").bootstrapTable('getOptions'); - var dataParam = $("#" + currentId).serializeArray(); - dataParam.push({ "name": "orderByColumn", "value": params.sortName }); - dataParam.push({ "name": "isAsc", "value": params.sortOrder }); - $.modal.loading("正在导出数据,请稍后..."); - $.post(prefix + '/exportAll', dataParam, function(result) { - if (result.code == web_status.SUCCESS) { - window.location.href = ctx + "common/download?fileName=" + encodeURI(result.msg) + "&delete=" + true; - } else if (result.code == web_status.WARNING) { - $.modal.alertWarning(result.msg) - } else { - $.modal.alertError(result.msg); - } - $.modal.closeLoading(); - }); - }); - }else { - $.modal.confirm("确定导出选中的所有客户报价吗?", function () { - //·拼接单号 - for(let i=0;i