给根据仓库和商品查询单据列表接口增加单价和金额字段

This commit is contained in:
jishenghua
2024-05-21 00:43:54 +08:00
parent fb217eddbe
commit 45176c40fa
4 changed files with 30 additions and 4 deletions

View File

@@ -121,6 +121,8 @@ public class DepotItemController {
}
item.put("depotName", d.getDepotName()); //仓库名称
item.put("basicNumber", d.getBnum()); //数量
item.put("unitPrice", d.getUnitPrice()); //单价
item.put("allPrice", d.getAllPrice()); //金额
item.put("operTime", Tools.getCenternTime(d.getOtime())); //时间
dataArray.add(item);
}

View File

@@ -17,6 +17,10 @@ public class DepotItemVo4DetailByTypeAndMId {
private BigDecimal bnum;
private BigDecimal unitPrice;
private BigDecimal allPrice;
private String depotName;
private Date otime;
@@ -69,6 +73,22 @@ public class DepotItemVo4DetailByTypeAndMId {
this.bnum = bnum;
}
public BigDecimal getUnitPrice() {
return unitPrice;
}
public void setUnitPrice(BigDecimal unitPrice) {
this.unitPrice = unitPrice;
}
public BigDecimal getAllPrice() {
return allPrice;
}
public void setAllPrice(BigDecimal allPrice) {
this.allPrice = allPrice;
}
public String getDepotName() {
return depotName;
}

View File

@@ -8,7 +8,9 @@
<result column="material_name" jdbcType="VARCHAR" property="materialName" />
<result column="type" jdbcType="VARCHAR" property="type" />
<result column="sub_type" jdbcType="VARCHAR" property="subType" />
<result column="b_num" jdbcType="BIGINT" property="bnum" />
<result column="b_num" jdbcType="DECIMAL" property="bnum" />
<result column="unit_price" jdbcType="DECIMAL" property="unitPrice" />
<result column="all_price" jdbcType="DECIMAL" property="allPrice" />
<result column="depotName" jdbcType="VARCHAR" property="depotName" />
<result column="oTime" jdbcType="TIMESTAMP" property="otime" />
</resultMap>
@@ -155,7 +157,7 @@
when dh.sub_type='盘点复盘' then ifnull(di.basic_number,0)
else 0
end
as b_num,
as b_num, di.unit_price, di.all_price,
(select name from jsh_depot d where d.id=di.depot_id and ifnull(d.delete_flag,'0') !='1') as depotName,
date_format(dh.oper_time,'%Y-%m-%d %H:%i:%S') as oTime
from jsh_depot_head dh
@@ -198,7 +200,7 @@
union all
--单独构造记录:调拨入库
select dh.number,me.bar_code,m.name material_name,dh.type,dh.sub_type,
ifnull(di.basic_number,0) as b_num,
ifnull(di.basic_number,0) as b_num, di.unit_price, di.all_price,
(select concat(name,'[调入]') from jsh_depot d where d.id=di.another_depot_id and ifnull(d.delete_flag,'0') !='1') as depotName,
date_format(dh.oper_time,'%Y-%m-%d %H:%i:%S') as oTime
from jsh_depot_head dh

View File

@@ -2,7 +2,7 @@
<div ref="container">
<a-modal
:title="title"
:width="1200"
:width="1400"
:visible="visible"
:getContainer="() => $refs.container"
:maskStyle="{'top':'93px','left':'154px'}"
@@ -121,6 +121,8 @@
{ title: '名称', dataIndex: 'materialName', width: 200},
{ title: '仓库名称', dataIndex: 'depotName', width: 80},
{ title: '数量', dataIndex: 'basicNumber', width: 70},
{ title: '单价', dataIndex: 'unitPrice', width: 70},
{ title: '金额', dataIndex: 'allPrice', width: 70},
{ title: '日期', dataIndex: 'operTime', width: 110}
],
labelCol: {