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 3c55b09..827343d 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 @@ -291,6 +291,7 @@ public class RedBookController extends BaseController @PostMapping("/updateSelectedResultData") public AjaxResult updateSelectedResultData(@RequestBody List params) { + List oaQuotProducts = redBookService.queryRedBPriceByParams(params); logger.info("根据选择的调价日期 匹配数据结果: {}", oaQuotProducts); return success(oaQuotProducts); diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/redBook/excelUtil.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/redBook/excelUtil.java index d91af23..9edc126 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/redBook/excelUtil.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/redBook/excelUtil.java @@ -1,5 +1,6 @@ package com.ruoyi.web.controller.redBook; +import com.ruoyi.common.utils.StringUtils; import com.ruoyi.redBook.domain.OAQuot; import com.ruoyi.redBook.domain.OAQuotProduct; import jxl.HeaderFooter; @@ -80,7 +81,17 @@ public class excelUtil { wff_merge = new WritableCellFormat(wf_merge); wff_merge.setAlignment(Alignment.LEFT); wsheet.setRowView(i,380); - String[] bjs = {"询价单位:"+quot.getQuotCustomer(),"业务联系人:"+quot.getQuotLxr(),"项目名称:"+quot.getQuotProject(),"联 系 电 话:"+quot.getQuotLxrdh(),"询价日期:","编 制:","报价日期:","审 核:"}; + + String QuotCustomer = quot.getQuotCustomer(); + QuotCustomer = StringUtils.isEmpty(QuotCustomer)?"":QuotCustomer; + String QuotProject = quot.getQuotProject(); + QuotProject = StringUtils.isEmpty(QuotProject)?"":QuotProject; + String QuotLxr = quot.getQuotLxr(); + QuotLxr = StringUtils.isEmpty(QuotLxr)?"":QuotLxr; + String QuotLxrdh = quot.getQuotLxrdh(); + QuotLxrdh = StringUtils.isEmpty(QuotLxrdh)?"":QuotLxrdh; + + String[] bjs = {"询价单位:"+QuotCustomer,"业务联系人:"+QuotLxr,"项目名称:"+QuotProject,"联 系 电 话:"+QuotLxrdh,"询价日期:","编 制:","报价日期:","审 核:"}; int k=0; while(k - insert into OAQuotProduct(quot_product_id, name_0, name_1, spec, voltage,stu,price,setPrice,count,allPrice,per,per2,quot_id) values + insert into OAQuotProduct(quot_product_id, name_0, name_1, spec, voltage,stu,price,setPrice,count,allPrice,per,per2,quot_id,number) values - ( #{item.quot_product_id}, #{item.name_0}, #{item.name_1}, #{item.spec}, #{item.voltage}, #{item.stu},cast(#{item.price,jdbcType=DECIMAL} as decimal(18,2)),cast(#{item.setPrice,jdbcType=DECIMAL} as decimal(18,2)), cast(#{item.count,jdbcType=DECIMAL} as decimal(18,3)), cast(#{item.allPrice,jdbcType=DECIMAL} as decimal(18,2)),cast(#{item.per,jdbcType=DECIMAL} as decimal(18,2)),cast(#{item.per2,jdbcType=DECIMAL} as decimal(18,2)), #{item.quot_id}) + ( #{item.quot_product_id}, #{item.name_0}, #{item.name_1}, #{item.spec}, #{item.voltage}, #{item.stu},cast(#{item.price,jdbcType=DECIMAL} as decimal(18,2)),cast(#{item.setPrice,jdbcType=DECIMAL} as decimal(18,2)), cast(#{item.count,jdbcType=DECIMAL} as decimal(18,3)), cast(#{item.allPrice,jdbcType=DECIMAL} as decimal(18,2)),cast(#{item.per,jdbcType=DECIMAL} as decimal(18,2)),cast(#{item.per2,jdbcType=DECIMAL} as decimal(18,2)), #{item.quot_id}, #{item.index}) @@ -223,7 +223,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" b.per,b.per2,b.price,b.setPrice,b.count,b.allPrice,b.quot_id from OAQuot a left join OAQuotProduct b on b.quot_id = a.quot_id - where a.quot_id = #{quotId} + where a.quot_id = #{quotId} order by b.number diff --git a/ruoyi-ui/src/views/redBook/productSelect.vue b/ruoyi-ui/src/views/redBook/productSelect.vue index 04abf6d..45af988 100644 --- a/ruoyi-ui/src/views/redBook/productSelect.vue +++ b/ruoyi-ui/src/views/redBook/productSelect.vue @@ -8,6 +8,7 @@ 搜索 + 刷新 生成报价单 保存 @@ -73,29 +74,29 @@ - + - + - + - + - + @@ -105,9 +106,9 @@ - - - + + + - + + + @@ -187,14 +195,14 @@ overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; - -webkit-line-clamp: 2; + -webkit-line-clamp: 1; /* 控制显示的行数 */ } - /*总价输入框设置*/ .totalPrice-input .el-input__inner { color: red; } +