feat(quotation): 更新报价产品信息精度和列表排序功能
- 将QuotationProductInfo实体类中的数值字段从Double改为BigDecimal以提高精度 - 在多个页面组件中添加默认排序配置(isAsc和orderByColumn字段) - 更新报价导出功能的表头和数据格式,添加折扣百分比显示 - 修复供应商和客户页面的时间戳字段名称(createAt改为createTime) - 添加产品编码和型号查询条件到订单页面 - 优化数值计算逻辑,使用BigDecimal进行精确计算dev_1.0.1^2
parent
e2f9e0e393
commit
7ff9552621
|
|
@ -295,6 +295,8 @@ export default {
|
||||||
quotationStatus: null,
|
quotationStatus: null,
|
||||||
createTimeStart: null,
|
createTimeStart: null,
|
||||||
createTimeEnd: null,
|
createTimeEnd: null,
|
||||||
|
isAsc : 'desc',
|
||||||
|
orderByColumn : 'createTime',
|
||||||
},
|
},
|
||||||
// 表单参数
|
// 表单参数
|
||||||
form: {
|
form: {
|
||||||
|
|
|
||||||
|
|
@ -76,7 +76,7 @@ export default {
|
||||||
queryParams: {
|
queryParams: {
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
createBy: this.createBy,
|
// createBy: this.createBy,
|
||||||
quotationCode: null,
|
quotationCode: null,
|
||||||
quotationName: null,
|
quotationName: null,
|
||||||
orderByColumn: 'createTime',
|
orderByColumn: 'createTime',
|
||||||
|
|
@ -87,7 +87,7 @@ export default {
|
||||||
watch: {
|
watch: {
|
||||||
visible(val) {
|
visible(val) {
|
||||||
if (val) {
|
if (val) {
|
||||||
this.queryParams.createBy = this.createBy||"-1";
|
// this.queryParams.createBy = this.createBy||"-1";
|
||||||
this.getList();
|
this.getList();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -330,6 +330,8 @@ export default {
|
||||||
vendorAddress: null,
|
vendorAddress: null,
|
||||||
vendorUser: null,
|
vendorUser: null,
|
||||||
vendorStatus: null,
|
vendorStatus: null,
|
||||||
|
isAsc : 'desc',
|
||||||
|
orderByColumn : 'createTime',
|
||||||
},
|
},
|
||||||
// 表单参数
|
// 表单参数
|
||||||
form: {
|
form: {
|
||||||
|
|
|
||||||
|
|
@ -169,6 +169,8 @@ export default {
|
||||||
orderCode: null,
|
orderCode: null,
|
||||||
projectName: null,
|
projectName: null,
|
||||||
deliveryType: null,
|
deliveryType: null,
|
||||||
|
isAsc : 'desc',
|
||||||
|
orderByColumn : 'createTime',
|
||||||
},
|
},
|
||||||
// 表单参数
|
// 表单参数
|
||||||
form: {},
|
form: {},
|
||||||
|
|
|
||||||
|
|
@ -102,6 +102,8 @@ export default {
|
||||||
orderCode: undefined,
|
orderCode: undefined,
|
||||||
projectName: undefined,
|
projectName: undefined,
|
||||||
deliveryStatus: undefined,
|
deliveryStatus: undefined,
|
||||||
|
isAsc : 'desc',
|
||||||
|
orderByColumn : 'createTime',
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -344,6 +344,8 @@ export default {
|
||||||
estimatedOrderTimeEnd: null,
|
estimatedOrderTimeEnd: null,
|
||||||
lastWorkUpdateTimeStart: null,
|
lastWorkUpdateTimeStart: null,
|
||||||
lastWorkUpdateTimeEnd: null,
|
lastWorkUpdateTimeEnd: null,
|
||||||
|
isAsc : 'desc',
|
||||||
|
orderByColumn : 'createTime',
|
||||||
},
|
},
|
||||||
dateRange: [],
|
dateRange: [],
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -27,6 +27,12 @@
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="进货商" prop="partnerName">
|
<el-form-item label="进货商" prop="partnerName">
|
||||||
<el-input v-model="queryParams.partnerName" placeholder="请输入进货商" clearable size="small" @keyup.enter.native="handleQuery"/>
|
<el-input v-model="queryParams.partnerName" placeholder="请输入进货商" clearable size="small" @keyup.enter.native="handleQuery"/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="产品编码" prop="productCode">
|
||||||
|
<el-input v-model="queryParams.productCode" placeholder="请输入产品编码" clearable size="small" @keyup.enter.native="handleQuery"/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="产品型号" prop="productModel">
|
||||||
|
<el-input v-model="queryParams.productModel" placeholder="请输入产品型号" clearable size="small" @keyup.enter.native="handleQuery"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="时间选择">
|
<el-form-item label="时间选择">
|
||||||
<el-select v-model="queryParams.timeType" size="small" style="width: 140px">
|
<el-select v-model="queryParams.timeType" size="small" style="width: 140px">
|
||||||
|
|
@ -195,6 +201,8 @@ export default {
|
||||||
agentName: null,
|
agentName: null,
|
||||||
dutyName: null,
|
dutyName: null,
|
||||||
partnerName: null,
|
partnerName: null,
|
||||||
|
productCode: null,
|
||||||
|
productModel: null,
|
||||||
timeType: 'deliveryTime',
|
timeType: 'deliveryTime',
|
||||||
params: {},
|
params: {},
|
||||||
orderByColumn:'createTime',
|
orderByColumn:'createTime',
|
||||||
|
|
|
||||||
|
|
@ -221,7 +221,9 @@ export default {
|
||||||
agentCode: null,
|
agentCode: null,
|
||||||
agentName: null,
|
agentName: null,
|
||||||
province: null,
|
province: null,
|
||||||
city: null
|
city: null,
|
||||||
|
isAsc : 'desc',
|
||||||
|
orderByColumn : 'createAt',
|
||||||
},
|
},
|
||||||
// 省份选项
|
// 省份选项
|
||||||
provinceOptions: [],
|
provinceOptions: [],
|
||||||
|
|
|
||||||
|
|
@ -287,7 +287,9 @@ export default {
|
||||||
province: null,
|
province: null,
|
||||||
city: null,
|
city: null,
|
||||||
bgProperty: null,
|
bgProperty: null,
|
||||||
industryType: null
|
industryType: null,
|
||||||
|
isAsc : 'desc',
|
||||||
|
orderByColumn : 'createAt',
|
||||||
},
|
},
|
||||||
// 省份选项
|
// 省份选项
|
||||||
provinceOptions: [],
|
provinceOptions: [],
|
||||||
|
|
|
||||||
|
|
@ -305,6 +305,8 @@ export default {
|
||||||
level: null,
|
level: null,
|
||||||
province: null,
|
province: null,
|
||||||
city: null,
|
city: null,
|
||||||
|
isAsc : 'desc',
|
||||||
|
orderByColumn : 'createTime',
|
||||||
},
|
},
|
||||||
// 省份选项
|
// 省份选项
|
||||||
provinceOptions: [],
|
provinceOptions: [],
|
||||||
|
|
|
||||||
|
|
@ -236,6 +236,8 @@ export default {
|
||||||
productName: null,
|
productName: null,
|
||||||
model: null,
|
model: null,
|
||||||
vendorName: null,
|
vendorName: null,
|
||||||
|
isAsc : 'desc',
|
||||||
|
orderByColumn : 'createTime',
|
||||||
},
|
},
|
||||||
// 表单参数
|
// 表单参数
|
||||||
form: {},
|
form: {},
|
||||||
|
|
|
||||||
|
|
@ -237,6 +237,8 @@ export default {
|
||||||
managerName: null,
|
managerName: null,
|
||||||
managerPhone: null,
|
managerPhone: null,
|
||||||
managerEmail: null,
|
managerEmail: null,
|
||||||
|
isAsc : 'desc',
|
||||||
|
orderByColumn : 'createTime',
|
||||||
},
|
},
|
||||||
// 表单参数
|
// 表单参数
|
||||||
form: {},
|
form: {},
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,8 @@ package com.ruoyi.sip.domain;
|
||||||
import com.ruoyi.common.core.domain.BaseEntity;
|
import com.ruoyi.common.core.domain.BaseEntity;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 项目产品信息(QuotationProductInfo)实体类
|
* 项目产品信息(QuotationProductInfo)实体类
|
||||||
|
|
@ -34,31 +36,31 @@ public class QuotationProductInfo extends BaseEntity {
|
||||||
/**
|
/**
|
||||||
* 产品数量
|
* 产品数量
|
||||||
*/
|
*/
|
||||||
private Double quantity;
|
private BigDecimal quantity;
|
||||||
/**
|
/**
|
||||||
* 目录单价
|
* 目录单价
|
||||||
*/
|
*/
|
||||||
private Double cataloguePrice;
|
private BigDecimal cataloguePrice;
|
||||||
/**
|
/**
|
||||||
* 目录总价
|
* 目录总价
|
||||||
*/
|
*/
|
||||||
private Double catalogueAllPrice;
|
private BigDecimal catalogueAllPrice;
|
||||||
/**
|
/**
|
||||||
* 单价
|
* 单价
|
||||||
*/
|
*/
|
||||||
private Double price;
|
private BigDecimal price;
|
||||||
/**
|
/**
|
||||||
* 总价
|
* 总价
|
||||||
*/
|
*/
|
||||||
private Double allPrice;
|
private BigDecimal allPrice;
|
||||||
/**
|
/**
|
||||||
* 指导折扣
|
* 指导折扣
|
||||||
*/
|
*/
|
||||||
private Double guidanceDiscount;
|
private BigDecimal guidanceDiscount;
|
||||||
/**
|
/**
|
||||||
* 折扣
|
* 折扣
|
||||||
*/
|
*/
|
||||||
private Double discount;
|
private BigDecimal discount;
|
||||||
/**
|
/**
|
||||||
* 备注
|
* 备注
|
||||||
*/
|
*/
|
||||||
|
|
@ -66,7 +68,7 @@ public class QuotationProductInfo extends BaseEntity {
|
||||||
/**
|
/**
|
||||||
* 税率
|
* 税率
|
||||||
*/
|
*/
|
||||||
private Double taxRate;
|
private BigDecimal taxRate;
|
||||||
/**
|
/**
|
||||||
* 配置器id
|
* 配置器id
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -32,6 +32,7 @@ import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
|
import java.math.BigDecimal;
|
||||||
import java.time.LocalDate;
|
import java.time.LocalDate;
|
||||||
import java.time.format.DateTimeFormatter;
|
import java.time.format.DateTimeFormatter;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
|
@ -238,7 +239,7 @@ public class QuotationServiceImpl implements IQuotationService {
|
||||||
// 2. 第二部分:列标题
|
// 2. 第二部分:列标题
|
||||||
List<String> headers = Arrays.asList(
|
List<String> headers = Arrays.asList(
|
||||||
"序号", "产品编码", "产品型号", "产品代码描述", "数量",
|
"序号", "产品编码", "产品型号", "产品代码描述", "数量",
|
||||||
"目录单价(RMB)", "推荐折扣", "折扣单价(RMB)", "总价(RMB)",
|
"目录单价(RMB)", "推荐折扣(%)","折扣(%)", "单价(RMB)", "总价(RMB)",
|
||||||
"目录总价(RMB)", "CID信息", "备注"
|
"目录总价(RMB)", "CID信息", "备注"
|
||||||
);
|
);
|
||||||
// 记录列标题行索引
|
// 记录列标题行索引
|
||||||
|
|
@ -452,8 +453,8 @@ public class QuotationServiceImpl implements IQuotationService {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
double sumAllPrice = 0.0;
|
BigDecimal sumAllPrice = BigDecimal.ZERO;
|
||||||
double sumCatalogueAllPrice = 0.0;
|
BigDecimal sumCatalogueAllPrice = BigDecimal.ZERO;
|
||||||
|
|
||||||
// 添加数据行
|
// 添加数据行
|
||||||
int index = 1;
|
int index = 1;
|
||||||
|
|
@ -465,7 +466,8 @@ public class QuotationServiceImpl implements IQuotationService {
|
||||||
row.add(item.getProductDesc());
|
row.add(item.getProductDesc());
|
||||||
row.add(item.getQuantity());
|
row.add(item.getQuantity());
|
||||||
row.add(item.getCataloguePrice());
|
row.add(item.getCataloguePrice());
|
||||||
row.add(item.getGuidanceDiscount());
|
row.add(item.getGuidanceDiscount()==null?"":item.getGuidanceDiscount().multiply(new BigDecimal("100")));
|
||||||
|
row.add(item.getDiscount()==null?"":item.getDiscount().multiply(new BigDecimal("100")));
|
||||||
row.add(item.getPrice());
|
row.add(item.getPrice());
|
||||||
row.add(item.getAllPrice());
|
row.add(item.getAllPrice());
|
||||||
row.add(item.getCatalogueAllPrice());
|
row.add(item.getCatalogueAllPrice());
|
||||||
|
|
@ -474,10 +476,10 @@ public class QuotationServiceImpl implements IQuotationService {
|
||||||
rows.add(row);
|
rows.add(row);
|
||||||
|
|
||||||
if (item.getAllPrice() != null) {
|
if (item.getAllPrice() != null) {
|
||||||
sumAllPrice += item.getAllPrice();
|
sumAllPrice = sumAllPrice.add(item.getAllPrice());
|
||||||
}
|
}
|
||||||
if (item.getCatalogueAllPrice() != null) {
|
if (item.getCatalogueAllPrice() != null) {
|
||||||
sumCatalogueAllPrice += item.getCatalogueAllPrice();
|
sumCatalogueAllPrice =sumCatalogueAllPrice.add(item.getCatalogueAllPrice());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue