From b38c2bf2b585074ce70981e69b6ad87a64314e34 Mon Sep 17 00:00:00 2001 From: JIAL <2287346125@qq.com> Date: Wed, 6 Mar 2024 15:50:49 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AE=A1=E7=AE=97=E7=BA=A2=E6=9C=AC=E4=BB=B7?= =?UTF-8?q?=E6=A0=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../web/controller/quote/QuoteController.java | 18 ++- .../quote/domain/CalculateRBParamDto.java | 40 +++++++ .../com/ruoyi/quote/domain/MaterialDto.java | 80 ++++++++------ ruoyi-ui/src/api/quote/quote.js | 8 ++ ruoyi-ui/src/views/quotePage/quote/index.vue | 104 +++++++++++++----- 5 files changed, 186 insertions(+), 64 deletions(-) create mode 100644 ruoyi-system/src/main/java/com/ruoyi/quote/domain/CalculateRBParamDto.java diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/quote/QuoteController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/quote/QuoteController.java index 6287f22..331c51d 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/quote/QuoteController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/quote/QuoteController.java @@ -5,13 +5,12 @@ import com.ruoyi.common.core.controller.BaseController; import com.ruoyi.common.core.domain.AjaxResult; import com.ruoyi.common.core.page.TableDataInfo; import com.ruoyi.common.enums.DataSourceType; +import com.ruoyi.framework.web.domain.server.Sys; +import com.ruoyi.quote.domain.CalculateRBParamDto; import com.ruoyi.quote.domain.MaterialDto; import com.ruoyi.quote.service.QuoteService; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RequestParam; -import org.springframework.web.bind.annotation.RestController; +import org.springframework.web.bind.annotation.*; import java.util.List; @@ -44,4 +43,15 @@ public class QuoteController extends BaseController { System.out.println("打通接口"); return getDataTable(materialDtos); } + + @PostMapping("/redBPrice") + public void queryRedBookPriceByParam(@RequestBody List params) { + + System.out.println(params.get(0).getModel()); + System.out.println(params.get(0).getSpecification()); + System.out.println(params.get(0).getVoltLevel()); + + } + + } diff --git a/ruoyi-system/src/main/java/com/ruoyi/quote/domain/CalculateRBParamDto.java b/ruoyi-system/src/main/java/com/ruoyi/quote/domain/CalculateRBParamDto.java new file mode 100644 index 0000000..6b0f860 --- /dev/null +++ b/ruoyi-system/src/main/java/com/ruoyi/quote/domain/CalculateRBParamDto.java @@ -0,0 +1,40 @@ +package com.ruoyi.quote.domain; + +/** + * @title CalculateRBParamDto + * @description 用于接受前端传过来的型号规格参数 + * @author JIAL + * @updateTime 2024/3/6 15:18 + */ +public class CalculateRBParamDto { + private String model; + private String specification; + + private String voltLevel; + + public String getVoltLevel() { + return voltLevel; + } + + public void setVoltLevel(String voltLevel) { + this.voltLevel = voltLevel; + } + + public String getModel() { + return model; + } + + public void setModel(String model) { + this.model = model; + } + + public String getSpecification() { + return specification; + } + + public void setSpecification(String specification) { + this.specification = specification; + } + + // 省略构造函数、getter和setter +} \ No newline at end of file diff --git a/ruoyi-system/src/main/java/com/ruoyi/quote/domain/MaterialDto.java b/ruoyi-system/src/main/java/com/ruoyi/quote/domain/MaterialDto.java index bf00adc..afa49b4 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/quote/domain/MaterialDto.java +++ b/ruoyi-system/src/main/java/com/ruoyi/quote/domain/MaterialDto.java @@ -19,18 +19,60 @@ public class MaterialDto extends BaseEntity { private String measureUnit; //单位 - private String matCostPrice; //材料成本价格 + private double matCostPrice = 0; //材料成本价格 - private String redBookPrice; //红本价格 + private double redBookPrice = 0; //红本价格 - private String redBookCost; //红本成本 + private double redBookCost = 0; //红本成本 - private String rbFacPrice; //红本厂价 + public double getMatCostPrice() { + return matCostPrice; + } + + public void setMatCostPrice(double matCostPrice) { + this.matCostPrice = matCostPrice; + } + + public double getRedBookPrice() { + return redBookPrice; + } + + public void setRedBookPrice(double redBookPrice) { + this.redBookPrice = redBookPrice; + } + + public double getRedBookCost() { + return redBookCost; + } + + public void setRedBookCost(double redBookCost) { + this.redBookCost = redBookCost; + } + + public double getRbFacPrice() { + return rbFacPrice; + } + + public void setRbFacPrice(double rbFacPrice) { + this.rbFacPrice = rbFacPrice; + } + + private double rbFacPrice = 0; //红本厂价 private String manuCost; //制造成本 private String wdFSurcharge; //盘具点数 + private Integer number = 1; + + public Integer getNumber() { + return number; + } + + public void setNumber(Integer number) { + this.number = number; + } + public String getUid() { return uid; } @@ -87,37 +129,7 @@ public class MaterialDto extends BaseEntity { this.measureUnit = measureUnit; } - public String getMatCostPrice() { - return matCostPrice; - } - public void setMatCostPrice(String matCostPrice) { - this.matCostPrice = matCostPrice; - } - - public String getRedBookPrice() { - return redBookPrice; - } - - public void setRedBookPrice(String redBookPrice) { - this.redBookPrice = redBookPrice; - } - - public String getRedBookCost() { - return redBookCost; - } - - public void setRedBookCost(String redBookCost) { - this.redBookCost = redBookCost; - } - - public String getRbFacPrice() { - return rbFacPrice; - } - - public void setRbFacPrice(String rbFacPrice) { - this.rbFacPrice = rbFacPrice; - } public String getManuCost() { return manuCost; diff --git a/ruoyi-ui/src/api/quote/quote.js b/ruoyi-ui/src/api/quote/quote.js index 9013d17..f40e9b2 100644 --- a/ruoyi-ui/src/api/quote/quote.js +++ b/ruoyi-ui/src/api/quote/quote.js @@ -7,3 +7,11 @@ export function queryMaterialListByParam(query) { params: query }) } + +export function queryRedBookPriceByParam (query) { + return request({ + url: '/quote/redBPrice', + method: 'post', + data: query + }) +} diff --git a/ruoyi-ui/src/views/quotePage/quote/index.vue b/ruoyi-ui/src/views/quotePage/quote/index.vue index 64020ca..79e450e 100644 --- a/ruoyi-ui/src/views/quotePage/quote/index.vue +++ b/ruoyi-ui/src/views/quotePage/quote/index.vue @@ -274,6 +274,7 @@
添加物料 + 计算红本价格 计算数据
@@ -350,8 +351,8 @@ width="180" prop="number" label="数量"> - @@ -749,13 +762,52 @@ export default { } .changed-field { - background-color: #ffe6e6; /* 更改后的背景颜色 */ + background-color: #add8e6; /* 更改后的背景颜色 */ } -.materialDialogTable .el-dialog__header{ - padding: 20px 20px 0px !important; +::v-deep .materialDialogTable .el-dialog__header { + padding-bottom: 0px; } -.materialDialogTable .el-dialog__body{ - padding: 0px 20px !important; + +::v-deep .materialDialogTable .el-dialog__body { + padding-top: 0px; +} + +.selected-item { + background-color: #f0f0f0; + border: 1px solid #ccc; + border-radius: 5px; + padding: 5px; + margin-bottom: 5px; + display: flex; + justify-content: space-between; +} + +.remove-btn { + padding: 0px; + color: red; +} + +.table-box { + width: 98%; + margin: auto; +} + +::v-deep .el-input__inner { + + height: 30px; + /*font-family: Roboto, serif;*/ + font-size: 12px; + line-height: 14px; +} + +::v-deep .el-input-group { + margin-top: 3px; +} + +::v-deep .total-box input { + background: #f0f0f0 !important; + font-weight: bold !important; + color: black !important; }