fix:供应商名称调整,采购列表导出调整
parent
c66bdbcc74
commit
9b90d44e34
|
|
@ -9,17 +9,17 @@
|
|||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="制造商名称" prop="vendorName">
|
||||
<el-form-item label="制造商名称" prop="vendorAddress">
|
||||
<el-input
|
||||
v-model="queryParams.vendorName"
|
||||
v-model="queryParams.vendorAddress"
|
||||
placeholder="请输入制造商名称"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="制造商全称" prop="vendorAddress">
|
||||
<el-form-item label="制造商全称" prop="vendorName">
|
||||
<el-input
|
||||
v-model="queryParams.vendorAddress"
|
||||
v-model="queryParams.vendorName"
|
||||
placeholder="请输入制造商全称"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
|
|
@ -98,8 +98,8 @@
|
|||
<el-table v-loading="loading" :data="vendorList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="制造商编码" align="center" prop="vendorCode" />
|
||||
<el-table-column label="制造商名称" align="center" prop="vendorName" />
|
||||
<el-table-column label="制造商全称" align="center" prop="vendorAddress" />
|
||||
<el-table-column label="制造商名称" align="center" prop="vendorAddress" />
|
||||
<el-table-column label="制造商全称" align="center" prop="vendorName" />
|
||||
<el-table-column label="默认仓库" align="center" prop="warehouseName" />
|
||||
<el-table-column label="联系人" align="center" prop="vendorUser" />
|
||||
<el-table-column label="联系邮箱" align="center" prop="vendorEmail" />
|
||||
|
|
@ -147,13 +147,13 @@
|
|||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="制造商名称" prop="vendorName">
|
||||
<el-input v-model="form.vendorName" placeholder="请输入制造商名称" />
|
||||
<el-form-item label="制造商名称" prop="vendorAddress">
|
||||
<el-input v-model="form.vendorAddress" placeholder="请输入制造商名称" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-form-item label="制造商全称" prop="vendorAddress">
|
||||
<el-input v-model="form.vendorAddress" placeholder="请输入制造商全称" />
|
||||
<el-form-item label="制造商全称" prop="vendorName">
|
||||
<el-input v-model="form.vendorName" placeholder="请输入制造商全称" />
|
||||
</el-form-item>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
|
|
|
|||
|
|
@ -9,9 +9,9 @@
|
|||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="制造商" prop="vendorName">
|
||||
<el-form-item label="制造商" prop="vendorAddress">
|
||||
<el-input
|
||||
v-model="queryParams.vendorName"
|
||||
v-model="queryParams.vendorAddress"
|
||||
placeholder="请输入制造商"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
|
|
@ -107,7 +107,7 @@
|
|||
@sort-change="handleSortChange">
|
||||
<!-- <el-table-column type="selection" width="55" align="center" />-->
|
||||
<el-table-column label="采购编号" align="center" prop="purchaseNo" width="180"/>
|
||||
<el-table-column label="制造商" align="center" prop="vendorName" width="120"/>
|
||||
<el-table-column label="制造商" align="center" prop="vendorAddress" width="120"/>
|
||||
<el-table-column label="产品编码" align="center" width="110">
|
||||
<template slot-scope="scope">
|
||||
<div v-if="scope.row.omsPurchaseOrderItemList && scope.row.omsPurchaseOrderItemList.length > 0">
|
||||
|
|
@ -388,7 +388,7 @@ export default {
|
|||
pageSize: 10,
|
||||
purchaseNo: null,
|
||||
buyerName: null,
|
||||
vendorName: null,
|
||||
vendorAddress: null,
|
||||
ownerName: null,
|
||||
approveStatus: null,
|
||||
confirmStatus: null,
|
||||
|
|
|
|||
|
|
@ -23,6 +23,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
|
@ -146,10 +147,28 @@ public class OmsPurchaseOrderController extends BaseController
|
|||
omsPurchaseOrder.setApproveStatus(ApproveStatusEnum.APPROVE_COMPLETE.getCode());
|
||||
List<OmsPurchaseOrder> list = omsPurchaseOrderService.selectOmsPurchaseOrderList(omsPurchaseOrder);
|
||||
todoService.fillPurchaseOrderApproveNode(list);
|
||||
formatTaxRateForExport(list);
|
||||
ExcelUtil<OmsPurchaseOrder> util = new ExcelUtil<OmsPurchaseOrder>(OmsPurchaseOrder.class);
|
||||
return util.exportExcel( list, "采购单主表数据");
|
||||
}
|
||||
|
||||
private void formatTaxRateForExport(List<OmsPurchaseOrder> list)
|
||||
{
|
||||
for (OmsPurchaseOrder order : list)
|
||||
{
|
||||
BigDecimal taxRate = order.getTaxRate();
|
||||
if (taxRate == null)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
if (taxRate.abs().compareTo(BigDecimal.ONE) <= 0)
|
||||
{
|
||||
taxRate = taxRate.multiply(BigDecimal.valueOf(100));
|
||||
}
|
||||
order.setTaxRate(taxRate.stripTrailingZeros());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取采购单主表详细信息
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -44,14 +44,20 @@ public class OmsPurchaseOrder extends BaseEntity
|
|||
private Long vendorId;
|
||||
private String vendorCode;
|
||||
private List<String> authVendorCodeList;
|
||||
/** 供应商全称 */
|
||||
@Excel(name = "供应商名称")
|
||||
private String vendorName;
|
||||
/** 供应商简称 */
|
||||
private String vendorAddress;
|
||||
@Excel(name = "供应商联系人")
|
||||
private String vendorUser;
|
||||
@Excel(name = "供应商电话")
|
||||
private String vendorPhone;
|
||||
|
||||
@Excel(name = "税率(%)")
|
||||
private BigDecimal taxRate;
|
||||
|
||||
/** 币别(固定人民币) */
|
||||
@Excel(name = "币别")
|
||||
private String currency;
|
||||
|
||||
/** 采购员ID */
|
||||
|
|
@ -97,25 +103,24 @@ public class OmsPurchaseOrder extends BaseEntity
|
|||
private Integer status;
|
||||
|
||||
/** 审批状态(0草稿 1审批中 2已通过 3驳回) */
|
||||
@Excel(name = "审批状态", readConverterExp = "0=草稿,1=审批中,2=已通过,3=驳回")
|
||||
private String approveStatus;
|
||||
|
||||
/** 审批时间 */
|
||||
@Excel(name = "审批时间", dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date approveTime;
|
||||
|
||||
/** 当前审批节点 */
|
||||
@Excel(name = "当前审批节点")
|
||||
private String approveNode;
|
||||
|
||||
/** 确认状态(待审批、已确认、或空) */
|
||||
@Excel(name = "确认状态", readConverterExp = "0=待审批,1=已确认,2=已驳回")
|
||||
private String confirmStatus;
|
||||
|
||||
/** 流程类型(online线上 offline线下) */
|
||||
@Excel(name = "流程类型", readConverterExp = "online=线上,offline=线下")
|
||||
private String flowType;
|
||||
|
||||
@Excel(name = "备注")
|
||||
private String remark;
|
||||
|
||||
/** 删除标志(0正常 1删除) */
|
||||
private Integer delFlag;
|
||||
|
||||
|
|
|
|||
|
|
@ -72,7 +72,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
, t1.purchaser_mobile, t1.purchaser_email, t1.warehouse_id, t1.pay_method, t1.owner_id, t1.owner_name, t1.remark, t1.total_amount,t1.flow_type
|
||||
, t1.status, t1.approve_status, t1.approve_time, t1.approve_node, t1.confirm_status, t1.create_time, t1.update_time, t1.del_flag,t1.version
|
||||
, t1.file_id
|
||||
,t2.vendor_address as vendor_name,t2.vendor_user,t2.vendor_code,t2.vendor_phone,t2.vendor_email,t3.warehouse_name
|
||||
,t2.vendor_address,t2.vendor_name,t2.vendor_user,t2.vendor_code,t2.vendor_phone,t2.vendor_email,t3.warehouse_name,t1.remark,
|
||||
(select max(tax_rate) from oms_purchase_order_item as it where it.purchase_id = t1.id) as tax_rate
|
||||
from oms_purchase_order t1
|
||||
left join oms_vendor_info t2 on t1.vendor_id = t2.vendor_id
|
||||
left join oms_warehouse_info t3 on t1.warehouse_id = t3.id
|
||||
|
|
@ -88,7 +89,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="confirmStatus != null "> and t1.confirm_status = #{confirmStatus}</if>
|
||||
<if test="approveStatus != null "> and t1.approve_status = #{approveStatus}</if>
|
||||
<if test="flowType != null "> and t1.flow_type = #{flowType}</if>
|
||||
<if test="vendorName != null "> and t2.vendor_address like concat('%',#{vendorName},'%')</if>
|
||||
<if test="vendorName != null "> and t2.vendor_name like concat('%',#{vendorName},'%')</if>
|
||||
<if test="vendorAddress != null "> and t2.vendor_address like concat('%',#{vendorAddress},'%')</if>
|
||||
<if test="ownerName != null "> and t1.owner_name = #{ownerName}</if>
|
||||
<if test="productCode != null and productCode!='' "> and t1.id in (select purchase_id from oms_purchase_order_item where product_code =#{productCode})</if>
|
||||
<if test="productModel != null and productModel!=''"> and t1.id in
|
||||
|
|
|
|||
Loading…
Reference in New Issue