未发货查询 修订

This commit is contained in:
杰 朱
2021-12-06 11:25:43 +08:00
parent e6ab4d5c0c
commit 17e26be475
3 changed files with 33 additions and 8 deletions

View File

@@ -860,7 +860,7 @@ select *from tempdb..tablepzck20210526
,
isnull(cs.qty,0) as xcl,
b.cVerifier
,
,case when (
isnull(
(SELECT isnull(SUM(iquantity),0) qty
FROM currentstock WITH (nolock) where cInvCode=a.cInvCode
@@ -872,7 +872,19 @@ select *from tempdb..tablepzck20210526
GROUP BY ipesodid) dd on isnull(dd.ipesodid,'')=isnull(aa.iSOsID ,'')
where aa.cInvCode=a.cInvCode and bb.cVerifier is not null and isnull(CONVERT(varchar(100),aa.dPreDate, 23),'1900-01-01')<=isnull(CONVERT(varchar(100),a.dPreDate, 23),'1900-01-01') and (aa.iQuantity - isnull(dd.cqty,0))>0
group by aa.cInvCode
) as kcyl
) )>0 then 0 else (
isnull(
(SELECT isnull(SUM(iquantity),0) qty
FROM currentstock WITH (nolock) where cInvCode=a.cInvCode
GROUP BY cInvCode
),0)-( select sum(aa.iQuantity - isnull(dd.cqty,0)) as swfiQuantity from SO_SODetails aa WITH (nolock) LEFT JOIN
SO_SOMain bb WITH (nolock) on aa.ID=bb.id left join
(SELECT ipesodid, sum(iQuantity) AS cqty
FROM rdrecords32 WITH (nolock)
GROUP BY ipesodid) dd on isnull(dd.ipesodid,'')=isnull(aa.iSOsID ,'')
where aa.cInvCode=a.cInvCode and bb.cVerifier is not null and isnull(CONVERT(varchar(100),aa.dPreDate, 23),'1900-01-01')<=isnull(CONVERT(varchar(100),a.dPreDate, 23),'1900-01-01') and (aa.iQuantity - isnull(dd.cqty,0))>0
group by aa.cInvCode
) ) end as kcyl
,
CONVERT(varchar(100),a.dPreDate, 23) as dPreDate , a.cMemo,
CASE
@@ -889,11 +901,13 @@ select *from tempdb..tablepzck20210526
GROUP BY ipesodid) d on d.ipesodid=a.iSOsID
left join
(SELECT cinvcode, SUM(iquantity) qty
FROM currentstock WITH (nolock)
FROM currentstock WITH (nolock) where cWhCode not in (4,5)
GROUP BY cInvCode) cs ON a.cInvCode = cs.cInvCode
left join Customer f WITH (nolock) on b.cCusCode=f.cCusCode
left join Inventory g WITH (nolock) on g.cInvCode=a.cInvCode ) mm

View File

@@ -6,21 +6,22 @@
<Icon type="ios-stats" />ERP查询
</template>
<MenuGroup title="报表">
<MenuItem to="/inventorysale" name="3-5">销售未发明细表</MenuItem>
<!-- <MenuItem to="/inventory" name="3-2">物料在途在制查询表</MenuItem>
<MenuItem to="/inventoryMom" name="3-3">跟单记录表</MenuItem>
<MenuItem to="/InventoryMonth" name="3-4">材料出库数据与品种</MenuItem>
<MenuItem to="/inventorypo" name="3-8">采购订单列表(PMC)</MenuItem>
<MenuItem to="/inventorysale" name="3-5">销售未发明细表</MenuItem>
<MenuItem to="/InventorySo" name="3-5">销售订单表</MenuItem>-->
<MenuItem to="/InventorySo" name="3-5">销售订单表</MenuItem>
<MenuItem to="/inventory-SNDetail" name="3-6">序列号查询</MenuItem>
<MenuItem to="/inventorybu" name="3-7">补料量查询</MenuItem>
<MenuItem to="/inventorypoc" name="3-9">采购跟进表(采购部)</MenuItem>
<MenuItem to="/Purchasesum" name="3-99">采购查询汇总</MenuItem>
<MenuItem to="/Purchasesum" name="3-99">采购查询汇总</MenuItem>-->
</MenuGroup>
</Submenu>
<!--
<Submenu name="4">
<template slot="title">
<Icon type="ios-stats" />ERP单据
@@ -33,6 +34,7 @@
<MenuItem to="/inventoryQmerror" name="4-5">不良品处理问题单据</MenuItem>
</MenuGroup>
</Submenu>
-->
</Menu>
<div class="contain">
<router-view></router-view>

View File

@@ -212,7 +212,7 @@ export default {
}
},
{
title: "库存余量",
title: "欠货量",
align: "center",
width: "120",
key: "kcyl",
@@ -220,6 +220,15 @@ export default {
type: "Input"
}
},
{
title: "现存量",
align: "center",
width: "120",
key: "xcl",
filter: {
type: "Input"
}
},
{
title: "预计发货日期",
align: "center",