This commit is contained in:
xd 2024-05-21 09:52:26 +08:00
parent 1037f93b32
commit 172aa3ec5e
5 changed files with 26 additions and 6 deletions

View File

@ -13,6 +13,7 @@ import com.ruoyi.common.utils.uuid.UUID;
import com.ruoyi.customer.domain.RfcResult; import com.ruoyi.customer.domain.RfcResult;
import com.ruoyi.customer.domain.qcc.FuzzySearch; import com.ruoyi.customer.domain.qcc.FuzzySearch;
import com.ruoyi.customer.domain.qcc.QccFuzzySearchJsonResult; import com.ruoyi.customer.domain.qcc.QccFuzzySearchJsonResult;
import com.ruoyi.quot.domain.Quot;
import com.ruoyi.system.domain.SysNotice; import com.ruoyi.system.domain.SysNotice;
import com.ruoyi.system.service.ISysNoticeService; import com.ruoyi.system.service.ISysNoticeService;
import com.ruoyi.web.utils.IdUtils; 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) @Log(title = "客户状态修改", businessType = BusinessType.UPDATE)
@PutMapping("/changCusStatus") @PutMapping("/changCusStatus")
public AjaxResult changCusStatus(@RequestBody Customer customer) public AjaxResult changCusStatus(@RequestBody Customer customer)
@ -222,6 +223,16 @@ public class CustomerController extends BaseController
@DeleteMapping("/{cusIds}") @DeleteMapping("/{cusIds}")
public AjaxResult remove(@PathVariable String[] 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)); return toAjax(customerService.deleteCustomerByCusIds(cusIds));
} }

View File

@ -129,6 +129,16 @@ public class QuotController extends BaseController
@DeleteMapping("/{quotIds}") @DeleteMapping("/{quotIds}")
public AjaxResult remove(@PathVariable String[] 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)); return toAjax(quotService.deleteQuotByQuotIds(quotIds));
} }

View File

@ -92,7 +92,7 @@ spring:
lettuce: lettuce:
pool: pool:
# 连接池中的最小空闲连接 # 连接池中的最小空闲连接
min-idle: 0 min-idle: 10
# 连接池中的最大空闲连接 # 连接池中的最大空闲连接
max-idle: 100 max-idle: 100
# 连接池的最大数据库连接数 # 连接池的最大数据库连接数

View File

@ -129,14 +129,13 @@
<span>{{ parseTime(scope.row.createTime) }}</span> <span>{{ parseTime(scope.row.createTime) }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="状态" align="center" prop="cusState"> <el-table-column label="状态" align="center" prop="cusState" v-if="$auth.hasPermi('customer:customer:changCusStatus')">
<template slot-scope="scope"> <template slot-scope="scope">
<el-switch <el-switch
v-model="scope.row.cusState" v-model="scope.row.cusState"
active-value="0" active-value="0"
inactive-value="1" inactive-value="1"
@change="handleStatusChange(scope.row)" @change="handleStatusChange(scope.row)"
:disabled="!checkRole(['ITZX'])"
></el-switch> ></el-switch>
</template> </template>
</el-table-column> </el-table-column>
@ -938,7 +937,7 @@ export default {
/** 删除按钮操作 */ /** 删除按钮操作 */
handleDelete(row) { handleDelete(row) {
const cusIds = row.cusId || this.ids; const cusIds = row.cusId || this.ids;
this.$modal.confirm('是否确认删除客户管理编号为"' + cusIds + '"的数据项').then(function() { this.$modal.confirm('是否确认删除所选客户?').then(function() {
return delCustomer(cusIds); return delCustomer(cusIds);
}).then(() => { }).then(() => {
this.getList(); this.getList();

View File

@ -1074,7 +1074,7 @@ export default {
/** 删除按钮操作 */ /** 删除按钮操作 */
handleDelete(row) { handleDelete(row) {
const quotIds = row.quotId || this.ids; const quotIds = row.quotId || this.ids;
this.$modal.confirm('是否确认删除报价编号为"' + quotIds + '"的数据项').then(function() { this.$modal.confirm('是否确认删除所选报价单').then(function() {
return delQuot(quotIds); return delQuot(quotIds);
}).then(() => { }).then(() => {
this.getList(); this.getList();