From 0f52340a3d5c6df1473a67deca926fb40345a884 Mon Sep 17 00:00:00 2001
From: xd <844539747@qq.com>
Date: Tue, 14 May 2024 15:19:02 +0800
Subject: [PATCH] '123'
---
.../controller/redBook/RedBookController.java | 14 +-
.../ruoyi/redBook/mapper/OARedBookMapper.java | 7 +
.../redBook/service/IRedBookService.java | 7 +
.../service/impl/RedBookServiceImpl.java | 12 +
.../mapper/redBook/OARedBookMapper.xml | 22 +-
ruoyi-ui/src/utils/request.js | 2 +-
ruoyi-ui/src/views/redBook/productSelect.vue | 44 ++--
ruoyi-ui/src/views/redBook/quots.vue | 207 ++++++++++++++++--
8 files changed, 262 insertions(+), 53 deletions(-)
diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/redBook/RedBookController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/redBook/RedBookController.java
index fc2918b..3c55b09 100644
--- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/redBook/RedBookController.java
+++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/redBook/RedBookController.java
@@ -212,11 +212,15 @@ public class RedBookController extends BaseController
@PostMapping("/saveQuot")
public AjaxResult saveQuot(HttpServletResponse response, @RequestBody OAQuot quot)
{
- quot.setQuot_id(UUID.fastUUID().toString());
- quot.setQuotCode(IdUtils.createNo("BJD_",2));
- quot.setCreateBy(getUsername());
- redBookService.insertOAQuot(quot);
-
+ if(StringUtils.isEmpty(quot.getQuot_id())){
+ quot.setQuot_id(UUID.fastUUID().toString());
+ quot.setQuotCode(IdUtils.createNo("BJD_",2));
+ quot.setCreateBy(getUsername());
+ redBookService.insertOAQuot(quot);
+ }else{
+ quot.setUpdateBy(getUsername());
+ redBookService.updateOAQuot(quot);
+ }
return success(quot);
}
diff --git a/ruoyi-system/src/main/java/com/ruoyi/redBook/mapper/OARedBookMapper.java b/ruoyi-system/src/main/java/com/ruoyi/redBook/mapper/OARedBookMapper.java
index 2376520..31560ff 100644
--- a/ruoyi-system/src/main/java/com/ruoyi/redBook/mapper/OARedBookMapper.java
+++ b/ruoyi-system/src/main/java/com/ruoyi/redBook/mapper/OARedBookMapper.java
@@ -83,6 +83,12 @@ public interface OARedBookMapper
*/
void insertOAQuot(OAQuot quot);
+ /**
+ * 修改报价单
+ * @param quot
+ */
+ void updateOAQuot(OAQuot quot);
+
/**
* 新增报价单产品信息
* @param list
@@ -129,4 +135,5 @@ public interface OARedBookMapper
* @return
*/
String rb_price_version();
+
}
diff --git a/ruoyi-system/src/main/java/com/ruoyi/redBook/service/IRedBookService.java b/ruoyi-system/src/main/java/com/ruoyi/redBook/service/IRedBookService.java
index ca83359..c970ee9 100644
--- a/ruoyi-system/src/main/java/com/ruoyi/redBook/service/IRedBookService.java
+++ b/ruoyi-system/src/main/java/com/ruoyi/redBook/service/IRedBookService.java
@@ -82,6 +82,12 @@ public interface IRedBookService
*/
void insertOAQuot(OAQuot quot);
+ /**
+ * 修改报价单
+ * @param quot
+ */
+ void updateOAQuot(OAQuot quot);
+
/**
* 获取调价日期
* @return
@@ -121,4 +127,5 @@ public interface IRedBookService
* @return
*/
String rb_price_version();
+
}
diff --git a/ruoyi-system/src/main/java/com/ruoyi/redBook/service/impl/RedBookServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/redBook/service/impl/RedBookServiceImpl.java
index 637f6ee..92e4207 100644
--- a/ruoyi-system/src/main/java/com/ruoyi/redBook/service/impl/RedBookServiceImpl.java
+++ b/ruoyi-system/src/main/java/com/ruoyi/redBook/service/impl/RedBookServiceImpl.java
@@ -125,6 +125,18 @@ public class RedBookServiceImpl implements IRedBookService
insertOAQuotProduct(quot);
}
+ /**
+ * 修改报价单
+ * @param quot
+ */
+ @Override
+ public void updateOAQuot(OAQuot quot) {
+ quot.setUpdateTime(DateUtils.getNowDate());
+ oaRedBookMapper.updateOAQuot(quot);
+ oaRedBookMapper.deleteQuotProductsByCusId(quot.getQuot_id());
+ insertOAQuotProduct(quot);
+ }
+
/**
* 新增报价单产品信息
* @param quot
diff --git a/ruoyi-system/src/main/resources/mapper/redBook/OARedBookMapper.xml b/ruoyi-system/src/main/resources/mapper/redBook/OARedBookMapper.xml
index 6b2746f..c96242b 100644
--- a/ruoyi-system/src/main/resources/mapper/redBook/OARedBookMapper.xml
+++ b/ruoyi-system/src/main/resources/mapper/redBook/OARedBookMapper.xml
@@ -62,7 +62,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
from [rb_product_price] A
left join rb_productVersion B on A.version_uid_0=B.uid_0
where B.sta_0=1 and A.type_uid_0 = #{uid_0}
- and A.截面 = #{section} and A.型号 = #{name_0} order by A.order_0
+
+ and A.截面 = #{section}
+
+ and A.型号 = #{name_0} order by A.order_0
diff --git a/ruoyi-ui/src/utils/request.js b/ruoyi-ui/src/utils/request.js
index a94a448..dd715cb 100644
--- a/ruoyi-ui/src/utils/request.js
+++ b/ruoyi-ui/src/utils/request.js
@@ -18,7 +18,7 @@ const service = axios.create({
// axios中请求配置有baseURL选项,表示请求URL公共部分
baseURL: process.env.VUE_APP_BASE_API,
// 超时
- timeout: 10000
+ timeout: 60000
})
// request拦截器
diff --git a/ruoyi-ui/src/views/redBook/productSelect.vue b/ruoyi-ui/src/views/redBook/productSelect.vue
index 31c838b..631e364 100644
--- a/ruoyi-ui/src/views/redBook/productSelect.vue
+++ b/ruoyi-ui/src/views/redBook/productSelect.vue
@@ -84,16 +84,21 @@
-
+
-
+
-
+
+
+
+
+
+
@@ -103,8 +108,8 @@
- 总价:{{sumSelectedResultData}} 元
-
+
+