From 172aa3ec5e97d056ee568c6c2b98520f0f69c0eb Mon Sep 17 00:00:00 2001 From: xd <844539747@qq.com> Date: Tue, 21 May 2024 09:52:26 +0800 Subject: [PATCH] '123' --- .../web/controller/customer/CustomerController.java | 13 ++++++++++++- .../ruoyi/web/controller/quot/QuotController.java | 10 ++++++++++ ruoyi-admin/src/main/resources/application.yml | 2 +- ruoyi-ui/src/views/customer/customer/index.vue | 5 ++--- ruoyi-ui/src/views/quot/quot/index.vue | 2 +- 5 files changed, 26 insertions(+), 6 deletions(-) diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/customer/CustomerController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/customer/CustomerController.java index 955bda1..129371d 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/customer/CustomerController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/customer/CustomerController.java @@ -13,6 +13,7 @@ import com.ruoyi.common.utils.uuid.UUID; import com.ruoyi.customer.domain.RfcResult; import com.ruoyi.customer.domain.qcc.FuzzySearch; import com.ruoyi.customer.domain.qcc.QccFuzzySearchJsonResult; +import com.ruoyi.quot.domain.Quot; import com.ruoyi.system.domain.SysNotice; import com.ruoyi.system.service.ISysNoticeService; import com.ruoyi.web.utils.IdUtils; @@ -96,7 +97,7 @@ public class CustomerController extends BaseController /** * 状态修改 */ - @PreAuthorize("@ss.hasPermi('customer:customer:list')") + @PreAuthorize("@ss.hasPermi('customer:customer:changCusStatus')") @Log(title = "客户状态修改", businessType = BusinessType.UPDATE) @PutMapping("/changCusStatus") public AjaxResult changCusStatus(@RequestBody Customer customer) @@ -222,6 +223,16 @@ public class CustomerController extends BaseController @DeleteMapping("/{cusIds}") public AjaxResult remove(@PathVariable String[] cusIds) { + for(String cusId:cusIds){ + Customer customer = customerService.selectCustomerByCusId(cusId); + if("1".equals(customer.getCusApprovalStatus())){ + return error("客户:"+customer.getCusName()+" 已提交数据组,无法删除"); + }else if("2".equals(customer.getCusApprovalStatus())){ + return error("客户:"+customer.getCusName()+" 已完成审批,无法删除"); + }else if("3".equals(customer.getCusApprovalStatus())){ + return error("客户:"+customer.getCusName()+" 已被驳回,无法删除"); + } + } return toAjax(customerService.deleteCustomerByCusIds(cusIds)); } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/quot/QuotController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/quot/QuotController.java index ff14be6..315596a 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/quot/QuotController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/quot/QuotController.java @@ -129,6 +129,16 @@ public class QuotController extends BaseController @DeleteMapping("/{quotIds}") public AjaxResult remove(@PathVariable String[] quotIds) { + for(String quotId:quotIds){ + Quot quot = quotService.selectQuotByQuotId(quotId); + if("1".equals(quot.getQuotApprovalStatus())){ + return error("报价单:"+quot.getQuotCode()+" 已提交报价,无法删除"); + }else if("2".equals(quot.getQuotApprovalStatus())){ + return error("报价单:"+quot.getQuotCode()+" 已完成报价,无法删除"); + }else if("3".equals(quot.getQuotApprovalStatus())){ + return error("报价单:"+quot.getQuotCode()+" 已被驳回,无法删除"); + } + } return toAjax(quotService.deleteQuotByQuotIds(quotIds)); } diff --git a/ruoyi-admin/src/main/resources/application.yml b/ruoyi-admin/src/main/resources/application.yml index 7f97f81..dce93e7 100644 --- a/ruoyi-admin/src/main/resources/application.yml +++ b/ruoyi-admin/src/main/resources/application.yml @@ -92,7 +92,7 @@ spring: lettuce: pool: # 连接池中的最小空闲连接 - min-idle: 0 + min-idle: 10 # 连接池中的最大空闲连接 max-idle: 100 # 连接池的最大数据库连接数 diff --git a/ruoyi-ui/src/views/customer/customer/index.vue b/ruoyi-ui/src/views/customer/customer/index.vue index 7578b81..d7ccee4 100644 --- a/ruoyi-ui/src/views/customer/customer/index.vue +++ b/ruoyi-ui/src/views/customer/customer/index.vue @@ -129,14 +129,13 @@ {{ parseTime(scope.row.createTime) }} - + @@ -938,7 +937,7 @@ export default { /** 删除按钮操作 */ handleDelete(row) { const cusIds = row.cusId || this.ids; - this.$modal.confirm('是否确认删除客户管理编号为"' + cusIds + '"的数据项?').then(function() { + this.$modal.confirm('是否确认删除所选客户?').then(function() { return delCustomer(cusIds); }).then(() => { this.getList(); diff --git a/ruoyi-ui/src/views/quot/quot/index.vue b/ruoyi-ui/src/views/quot/quot/index.vue index 16ede6f..e5f0183 100644 --- a/ruoyi-ui/src/views/quot/quot/index.vue +++ b/ruoyi-ui/src/views/quot/quot/index.vue @@ -1074,7 +1074,7 @@ export default { /** 删除按钮操作 */ handleDelete(row) { const quotIds = row.quotId || this.ids; - this.$modal.confirm('是否确认删除报价编号为"' + quotIds + '"的数据项?').then(function() { + this.$modal.confirm('是否确认删除所选报价单?').then(function() { return delQuot(quotIds); }).then(() => { this.getList();