This commit is contained in:
gongxh
2021-08-16 14:25:14 +08:00
21 changed files with 1831 additions and 127 deletions

View File

@@ -89,6 +89,7 @@
<Compile Include="Response\Pmc\PmcInventorymomRes.cs" /> <Compile Include="Response\Pmc\PmcInventorymomRes.cs" />
<Compile Include="Response\Store\MaterialApp.cs" /> <Compile Include="Response\Store\MaterialApp.cs" />
<Compile Include="Response\Store\BinStock.cs" /> <Compile Include="Response\Store\BinStock.cs" />
<Compile Include="Response\Store\MaterialAppVouchAndPostName.cs" />
<Compile Include="Response\Store\Stock.cs" /> <Compile Include="Response\Store\Stock.cs" />
<Compile Include="TimestampConverter.cs" /> <Compile Include="TimestampConverter.cs" />
<Compile Include="Request\Arrival.cs" /> <Compile Include="Request\Arrival.cs" />

View File

@@ -0,0 +1,76 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace NX.ERP.Model.Response.Store
{
public class MaterialAppVouchAndPostName
{
/// <summary>
/// 领料单号
/// </summary>
public string AppVouchOrderNo { get; set; }
/// <summary>
/// 物料编码
/// </summary>
public string MaterialCode { get; set; }
/// <summary>
/// 物料名称
/// </summary>
public string MaterialName { get; set; }
/// <summary>
/// 物料规格
/// </summary>
public string MaterialSpec { get; set; }
/// <summary>
/// 单位
/// </summary>
public string Unit { get; set; }
public decimal Qty { get; set; }
/// <summary>
/// 需求日期
/// </summary>
public string DemandDate { get; set; }
/// <summary>
/// 仓库名称
/// </summary>
public string WarehouseName { get; set; }
/// <summary>
/// 生产单号
/// </summary>
public string ProductOrderNo { get; set; }
/// <summary>
/// 生产单行号
/// </summary>
public string ProductOrderLineNo { get; set; }
/// <summary>
/// 产品编码
/// </summary>
public string ProductCode { get; set; }
/// <summary>
/// 产品名称
/// </summary>
public string ProductName { get; set; }
/// <summary>
/// 产品规格
/// </summary>
public string ProductSpec { get; set; }
/// <summary>
/// 库位
/// </summary>
public string Position { get; set; }
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -22,8 +22,8 @@ namespace NX.ERP.U8.Finance
public IEnumerable<object> InventorySNDetail(NX.ERP.Model.Request.SnOrderRequest info1) public IEnumerable<object> InventorySNDetail(NX.ERP.Model.Request.SnOrderRequest info1)
{ {
string sql = $@" string sql = $@"
select a.cInvCode,e.cInvName,b.cCode as Cprk, b.dDate as rkrq,c.cWhName, select a.cInvCode,e.cInvName,b.cCode as Cprk, b.dDate as rkrq,c.cWhName,
b.cMPoCode,d.cDepName,a.cInvSN,k.iUnitCost, b.cMPoCode,d.cDepName,a.cInvSN,a.csnmemo,k.iUnitCost,
g.cCode as Clck,g.dDate as ckrq,h.cCusAbbName,f.cInvSN as ckcInvSN g.cCode as Clck,g.dDate as ckrq,h.cCusAbbName,f.cInvSN as ckcInvSN
from ST_SNDetail_PROIN a WITH(NOLOCK) from ST_SNDetail_PROIN a WITH(NOLOCK)
left join rdrecord10 b WITH(NOLOCK) on a.iVouchID=b.id left join rdrecord10 b WITH(NOLOCK) on a.iVouchID=b.id

View File

@@ -168,7 +168,7 @@ SELECT m..mocode,CONVERT(varchar(100), mor.StartDate, 23) as StartDate ,md.Rem
mom_moallocate ma WITH (NOLOCK) ON md.MoDId = ma.MoDId mom_moallocate ma WITH (NOLOCK) ON md.MoDId = ma.MoDId
left JOIN left JOIN
mom_motype motype WITH (NOLOCK) ON motype.MoTypeId = md.MoTypeId mom_motype motype WITH (NOLOCK) ON motype.MoTypeId = md.MoTypeId
INNER JOIN left JOIN
(SELECT ma.invcode, SUM(isnull(ma.qty, 0) - isnull(issqty, 0)) wqty (SELECT ma.invcode, SUM(isnull(ma.qty, 0) - isnull(issqty, 0)) wqty
FROM mom_moallocate ma WITH (NOLOCK) INNER JOIN FROM mom_moallocate ma WITH (NOLOCK) INNER JOIN
mom_orderdetail md WITH (NOLOCK) ON ma.MoDId = md.MoDId mom_orderdetail md WITH (NOLOCK) ON ma.MoDId = md.MoDId
@@ -199,12 +199,14 @@ SELECT m..mocode,CONVERT(varchar(100), mor.StartDate, 23) as StartDate ,md.Rem
WHERE md.Status = 3 WHERE md.Status = 3
GROUP BY ma.InvCode) shwl ON ma.InvCode = shwl.InvCode LEFT JOIN GROUP BY ma.InvCode) shwl ON ma.InvCode = shwl.InvCode LEFT JOIN
(select a.MoCode ,a.InvCode ,a.MoDId ,(a.dtty/b.Qty) as dtty from (
(SELECT mom.MoCode, ma.invcode,round(SUM(isnull(ma.qty, 0))/md.Qty,3) dtty SELECT mom.MoCode, ma.invcode,round(SUM(isnull(ma.qty, 0)),3) dtty, md.MoDId
FROM mom_moallocate ma WITH (NOLOCK) INNER JOIN FROM mom_moallocate ma WITH (NOLOCK) INNER JOIN
mom_orderdetail md WITH (NOLOCK) ON ma.MoDId = md.MoDId left join mom_orderdetail md WITH (NOLOCK) ON ma.MoDId = md.MoDId left join
mom_order mom WITH (NOLOCK) on md.MoId=mom.MoId mom_order mom WITH (NOLOCK) on md.MoId=mom.MoId
GROUP BY ma.InvCode,mom.MoCode,md.Qty ) dtyl ON ma.InvCode = dtyl.InvCode and dtyl.MoCode=m.MoCode LEFT JOIN
GROUP BY ma.InvCode,mom.MoCode, md.MoDId ) a left join mom_orderdetail b WITH (NOLOCK) ON a.MoDId = b.MoDId ) dtyl ON ma.InvCode = dtyl.InvCode and dtyl.MoCode=m.MoCode and md.MoDId= dtyl.MoDId
LEFT JOIN
(SELECT ma.invcode, SUM( isnull(issqty, 0)) issqty (SELECT ma.invcode, SUM( isnull(issqty, 0)) issqty
FROM mom_moallocate ma WITH (NOLOCK) INNER JOIN FROM mom_moallocate ma WITH (NOLOCK) INNER JOIN
@@ -288,7 +290,7 @@ SELECT m..mocode,CONVERT(varchar(100), mor.StartDate, 23) as StartDate,md.Rema
mom_moallocate ma WITH (NOLOCK) ON md.MoDId = ma.MoDId mom_moallocate ma WITH (NOLOCK) ON md.MoDId = ma.MoDId
left JOIN left JOIN
mom_motype motype WITH (NOLOCK) ON motype.MoTypeId = md.MoTypeId mom_motype motype WITH (NOLOCK) ON motype.MoTypeId = md.MoTypeId
INNER JOIN left JOIN
(SELECT ma.invcode, SUM(isnull(ma.qty, 0) - isnull(issqty, 0)) wqty (SELECT ma.invcode, SUM(isnull(ma.qty, 0) - isnull(issqty, 0)) wqty
FROM mom_moallocate ma WITH (NOLOCK) INNER JOIN FROM mom_moallocate ma WITH (NOLOCK) INNER JOIN
mom_orderdetail md WITH (NOLOCK) ON ma.MoDId = md.MoDId mom_orderdetail md WITH (NOLOCK) ON ma.MoDId = md.MoDId
@@ -321,11 +323,14 @@ SELECT m..mocode,CONVERT(varchar(100), mor.StartDate, 23) as StartDate,md.Rema
GROUP BY ma.InvCode) shwl ON ma.InvCode = shwl.InvCode LEFT JOIN GROUP BY ma.InvCode) shwl ON ma.InvCode = shwl.InvCode LEFT JOIN
(SELECT mom.MoCode, ma.invcode,round(SUM(isnull(ma.qty, 0))/md.Qty,3) dtty (select a.MoCode ,a.InvCode ,a.MoDId ,(a.dtty/b.Qty) as dtty from (
SELECT mom.MoCode, ma.invcode,round(SUM(isnull(ma.qty, 0)),3) dtty, md.MoDId
FROM mom_moallocate ma WITH (NOLOCK) INNER JOIN FROM mom_moallocate ma WITH (NOLOCK) INNER JOIN
mom_orderdetail md WITH (NOLOCK) ON ma.MoDId = md.MoDId left join mom_orderdetail md WITH (NOLOCK) ON ma.MoDId = md.MoDId left join
mom_order mom WITH (NOLOCK) on md.MoId=mom.MoId mom_order mom WITH (NOLOCK) on md.MoId=mom.MoId
GROUP BY ma.InvCode,mom.MoCode,md.Qty ) dtyl ON ma.InvCode = dtyl.InvCode and dtyl.MoCode=m.MoCode LEFT JOIN
GROUP BY ma.InvCode,mom.MoCode, md.MoDId ) a left join mom_orderdetail b WITH (NOLOCK) ON a.MoDId = b.MoDId ) dtyl ON ma.InvCode = dtyl.InvCode and dtyl.MoCode=m.MoCode and md.MoDId= dtyl.MoDId
LEFT JOIN
(SELECT ma.invcode, SUM( isnull(issqty, 0)) issqty (SELECT ma.invcode, SUM( isnull(issqty, 0)) issqty
FROM mom_moallocate ma WITH (NOLOCK) INNER JOIN FROM mom_moallocate ma WITH (NOLOCK) INNER JOIN

View File

@@ -211,7 +211,7 @@ namespace NX.ERP.U8.Purchase
public IEnumerable<object> Purchasesum(NX.ERP.Model.Request.PurchasesumRequest info) public IEnumerable<object> Purchasesum(NX.ERP.Model.Request.PurchasesumRequest info)
{ {
string sql = $@" string sql = $@"
DECLARE @RdRecord table( DECLARE @RdRecord table(
cPsn_Num nvarchar(30), cPsn_Num nvarchar(30),
cpersonname nvarchar(30), cpersonname nvarchar(30),
puappnumall int, puappnumall int,
@@ -259,7 +259,7 @@ namespace NX.ERP.U8.Purchase
(SELECT iAppIds, sum(iquantity) AS qty (SELECT iAppIds, sum(iquantity) AS qty
FROM PO_Podetails WITH (nolock) FROM PO_Podetails WITH (nolock)
GROUP BY iAppIds) rds ON isnull(ommds.autoid,'') = isnull(rds.iAppIds,'') GROUP BY iAppIds) rds ON isnull(ommds.autoid,'') = isnull(rds.iAppIds,'')
WHERE ISNULL(OMM.cCloser, N'') = N'' AND ISNULL(ommds.cbCloser, N'') = N'' AND ISNULL(ommds.cbCloser, N'') = N'' AND ISNULL(rds.qty, 0)=0 and ommds.iReceivedQTY=0 and WHERE ISNULL(OMM.cCloser, N'') = N'' AND ISNULL(ommds.cbCloser, N'') = N'' AND ISNULL(omm.cverifier, N'') <> N'' AND ISNULL(rds.qty, 0)=0 and ommds.iReceivedQTY=0 and
ommds.fquantity - ISNULL(rds.qty, 0) > 0) OM ommds.fquantity - ISNULL(rds.qty, 0) > 0) OM
GROUP BY cInvCode GROUP BY cInvCode
) as tbl1 ) as tbl1
@@ -273,9 +273,13 @@ namespace NX.ERP.U8.Purchase
as tbl on tbl1.cinvcode=tbl.cInvCode as tbl on tbl1.cinvcode=tbl.cInvCode
) q group by cPsn_Num ) q group by cPsn_Num
update a set a.puappnumall=b.puappnumall From @RdRecord a left join @RdRecord2 b on a.cpersonname =b.cpersonname update a set a.cpersonname=b.receive From @RdRecord2 a left join CGBB2021_0001_E001 b WITH (NOLOCK) on a.cpersonname =b.quit
where b.quit is not null
update a set a.puappnumall= a.puappnumall +b.puappnumall From @RdRecord a left join ( update a set a.puappnumall=isnull(b.puappnumall,0) From @RdRecord a left join
(select cpersonname,sum(puappnumall) as puappnumall from @RdRecord2 group by cpersonname ) b on a.cpersonname =b.cpersonname
update a set a.puappnumall= isnull(a.puappnumall,0) +isnull(b.puappnumall,0) From @RdRecord a left join (
select '其他' as cpersonname ,sum(puappnumall) as puappnumall from @RdRecord2 where cpersonname not in (select cpersonname From @RdRecord) )b on a.cpersonname =b.cpersonname select '其他' as cpersonname ,sum(puappnumall) as puappnumall from @RdRecord2 where cpersonname not in (select cpersonname From @RdRecord) )b on a.cpersonname =b.cpersonname
where a.cpersonname='其他' where a.cpersonname='其他'
@@ -291,7 +295,7 @@ namespace NX.ERP.U8.Purchase
(SELECT iAppIds, sum(iquantity) AS qty (SELECT iAppIds, sum(iquantity) AS qty
FROM PO_Podetails WITH (nolock) FROM PO_Podetails WITH (nolock)
GROUP BY iAppIds) rds ON isnull(ommds.autoid,'') = isnull(rds.iAppIds,'') GROUP BY iAppIds) rds ON isnull(ommds.autoid,'') = isnull(rds.iAppIds,'')
WHERE ISNULL(OMM.cCloser, N'') = N'' AND ISNULL(ommds.cbCloser, N'') = N'' AND ISNULL(ommds.cbCloser, N'') = N'' AND ISNULL(rds.qty, 0)=0 and ommds.iReceivedQTY=0 and DATEDIFF(day,ddate ,GETDATE()) >=3 and WHERE ISNULL(OMM.cCloser, N'') = N'' AND ISNULL(ommds.cbCloser, N'') = N'' AND ISNULL(omm.cverifier, N'') <> N'' AND ISNULL(rds.qty, 0)=0 and ommds.iReceivedQTY=0 and DATEDIFF(day,ddate ,GETDATE()) >=3 and
ommds.fquantity - ISNULL(rds.qty, 0) > 0) OM ommds.fquantity - ISNULL(rds.qty, 0) > 0) OM
GROUP BY cInvCode GROUP BY cInvCode
) as tbl1 ) as tbl1
@@ -305,9 +309,13 @@ namespace NX.ERP.U8.Purchase
as tbl on tbl1.cinvcode=tbl.cInvCode as tbl on tbl1.cinvcode=tbl.cInvCode
) q group by cPsn_Num ) q group by cPsn_Num
update a set a.puappnum03=b.puappnumall From @RdRecord a left join @RdRecord3 b on a.cpersonname =b.cpersonname update a set a.cpersonname=b.receive From @RdRecord3 a left join CGBB2021_0001_E001 b WITH (NOLOCK) on a.cpersonname =b.quit
where b.quit is not null
update a set a.puappnum03= a.puappnum03 +b.puappnumall From @RdRecord a left join ( update a set a.puappnum03=isnull(b.puappnumall,0) From @RdRecord a left join
(select cpersonname,sum(puappnumall) as puappnumall from @RdRecord3 group by cpersonname) b on a.cpersonname =b.cpersonname
update a set a.puappnum03= isnull(a.puappnum03,0) +isnull(b.puappnumall,0) From @RdRecord a left join (
select '其他' as cpersonname ,sum(puappnumall) as puappnumall from @RdRecord3 where cpersonname not in (select cpersonname From @RdRecord) )b on a.cpersonname =b.cpersonname select '其他' as cpersonname ,sum(puappnumall) as puappnumall from @RdRecord3 where cpersonname not in (select cpersonname From @RdRecord) )b on a.cpersonname =b.cpersonname
where a.cpersonname='其他' where a.cpersonname='其他'
@@ -342,10 +350,14 @@ namespace NX.ERP.U8.Purchase
as tbl on tbl1.cinvcode=tbl.cInvCode ) as tbl on tbl1.cinvcode=tbl.cInvCode )
q group by cPsn_Num q group by cPsn_Num
update a set a.cpersonname=b.receive From @RdRecord4 a left join CGBB2021_0001_E001 b WITH (NOLOCK) on a.cpersonname =b.quit
where b.quit is not null
update a set a.mommouth02=b.puappnumall From @RdRecord a left join @RdRecord4 b on a.cpersonname =b.cpersonname update a set a.mommouth02=isnull(b.puappnumall,0) From @RdRecord a left join
(select cpersonname,sum(puappnumall) as puappnumall from @RdRecord4 group by cpersonname
) b on a.cpersonname =b.cpersonname
update a set a.mommouth02= a.mommouth02 +b.mommouth02 From @RdRecord a left join ( update a set a.mommouth02= isnull(a.mommouth02,0) +isnull(b.mommouth02,0) From @RdRecord a left join (
select '其他' as cpersonname ,sum(puappnumall) as mommouth02 from @RdRecord4 where cpersonname not in (select cpersonname From @RdRecord) )b on a.cpersonname =b.cpersonname select '其他' as cpersonname ,sum(puappnumall) as mommouth02 from @RdRecord4 where cpersonname not in (select cpersonname From @RdRecord) )b on a.cpersonname =b.cpersonname
where a.cpersonname='其他' where a.cpersonname='其他'
@@ -379,21 +391,27 @@ namespace NX.ERP.U8.Purchase
as tbl on tbl1.cinvcode=tbl.cInvCode ) as tbl on tbl1.cinvcode=tbl.cInvCode )
q group by cPsn_Num q group by cPsn_Num
update a set a.cpersonname=b.receive From @RdRecord5 a left join CGBB2021_0001_E001 b WITH (NOLOCK) on a.cpersonname =b.quit
where b.quit is not null
update a set a.mommouth04=isnull(b.puappnumall,0) From @RdRecord a left join (
select cpersonname,sum(puappnumall) as puappnumall from @RdRecord5 group by cpersonname) b on a.cpersonname =b.cpersonname
update a set a.mommouth04=b.puappnumall From @RdRecord a left join @RdRecord5 b on a.cpersonname =b.cpersonname update a set a.mommouth04= isnull(a.mommouth04,0) +isnull(b.mommouth04,0) From @RdRecord a left join (
update a set a.mommouth04= a.mommouth04 +b.mommouth04 From @RdRecord a left join (
select '其他' as cpersonname ,sum(puappnumall) as mommouth04 from @RdRecord5 where cpersonname not in (select cpersonname From @RdRecord) )b on a.cpersonname =b.cpersonname select '其他' as cpersonname ,sum(puappnumall) as mommouth04 from @RdRecord5 where cpersonname not in (select cpersonname From @RdRecord) )b on a.cpersonname =b.cpersonname
where a.cpersonname='其他' where a.cpersonname='其他'
delete from @RdRecord where cpersonname in (select quit from CGBB2021_0001_E001)
select *from @RdRecord select *from @RdRecord
"; ";
@@ -407,8 +425,24 @@ namespace NX.ERP.U8.Purchase
public IEnumerable<object> Purchasesumpuapp(NX.ERP.Model.Request.PurchasesumRequest info) public IEnumerable<object> Purchasesumpuapp(NX.ERP.Model.Request.PurchasesumRequest info)
{ {
string sql = $@" string sql = $@"
select *from ( IF EXISTS (SELECT NAME FROM tempdb..SYSOBJECTS WHERE NAME ='tablepuapp20210625' AND Xtype='U') DROP Table tempdb..tablepuapp20210625
SELECT omm.ccode, CONVERT(varchar(100), omm.ddate, 23) as dDatel, omm.ddate ,ommds.cInvCode,ommds.cinvname, ommds.cinvstd,ommds.fquantity - ISNULL(rds.qty, 0) as RQTY,isnull(f.cMaker,'其他') as cMaker create table tempdb..tablepuapp20210625 (
ccode nvarchar(200),
dDatel nvarchar(200),
ddate datetime,
cInvCode nvarchar(200),
cinvname nvarchar(500),
cinvstd nvarchar(500),
RQTY decimal(28, 6),
cMaker nvarchar(200)
)
CREATE INDEX IX_test ON tempdb..tablepuapp20210625 (cinvcode)
insert into tempdb..tablepuapp20210625
select *from (
SELECT omm.ccode, CONVERT(varchar(100), omm.ddate, 23) as dDatel, omm.ddate ,ommds.cInvCode,ommds.cinvname, ommds.cinvstd,ommds.fquantity - ISNULL(rds.qty, 0) as RQTY,isnull(isnull(k.receive ,f.cMaker),'其他') as cMaker
FROM pu_AppHead omm WITH (nolock) INNER JOIN FROM pu_AppHead omm WITH (nolock) INNER JOIN
pu_appbody ommds WITH (nolock) ON omm.id = ommds.id LEFT JOIN pu_appbody ommds WITH (nolock) ON omm.id = ommds.id LEFT JOIN
(SELECT iAppIds, sum(iquantity) AS qty (SELECT iAppIds, sum(iquantity) AS qty
@@ -417,8 +451,15 @@ namespace NX.ERP.U8.Purchase
left join left join
(select cInvCode,cMaker from ( select cInvCode,ROW_NUMBER() over( partition by b.cInvCode order by a.poid desc) as rownumber ,a.cMaker from PO_Pomain a WITH (nolock), PO_Podetails b WITH (nolock) where a.poid=b.poid) (select cInvCode,cMaker from ( select cInvCode,ROW_NUMBER() over( partition by b.cInvCode order by a.poid desc) as rownumber ,a.cMaker from PO_Pomain a WITH (nolock), PO_Podetails b WITH (nolock) where a.poid=b.poid)
as c where c.rownumber=1) f on ommds.cInvCode =f.cInvCode as c where c.rownumber=1) f on ommds.cInvCode =f.cInvCode
WHERE ISNULL(OMM.cCloser, N'') = N'' AND ISNULL(ommds.cbCloser, N'') = N'' AND ISNULL(ommds.cbCloser, N'') = N'' AND ISNULL(rds.qty, 0)=0 and ommds.iReceivedQTY=0 AND left join CGBB2021_0001_E001 k WITH (NOLOCK) on f.cMaker =k.quit
ommds.fquantity - ISNULL(rds.qty, 0) > 0 ) puu WHERE ISNULL(OMM.cCloser, N'') = N'' AND ISNULL(ommds.cbCloser, N'') = N'' AND ISNULL(omm.cverifier, N'') <> N'' AND ISNULL(rds.qty, 0)=0 and ommds.iReceivedQTY=0 AND
ommds.fquantity - ISNULL(rds.qty, 0) > 0 ) puapp
update tempdb..tablepuapp20210625 set cmaker='其他' where cMaker not in ( select cPsn_Name from hr_v_HR31_show WITH (NOLOCK) where cDepCode ='52' and rEmployState ='在职')
and cMaker not in (select quit from CGBB2021_0001_E001 WITH (NOLOCK))
select *From tempdb..tablepuapp20210625 puu
"; ";
List<string> where = new List<string>(); List<string> where = new List<string>();
@@ -453,8 +494,9 @@ namespace NX.ERP.U8.Purchase
public IEnumerable<object> Purchasesummom(NX.ERP.Model.Request.PurchasesumRequest info) public IEnumerable<object> Purchasesummom(NX.ERP.Model.Request.PurchasesumRequest info)
{ {
string sql = $@" string sql = $@"
DECLARE @RdRecord table( IF EXISTS (SELECT NAME FROM tempdb..SYSOBJECTS WHERE NAME ='tablemom20210625' AND Xtype='U') DROP Table tempdb..tablemom20210625
CINVCODE nvarchar(200), create table tempdb..tablemom20210625 (
CINVCODE nvarchar(200),
RQTY int, RQTY int,
iqty int, iqty int,
iQuantity int, iQuantity int,
@@ -462,10 +504,12 @@ namespace NX.ERP.U8.Purchase
cpersonname nvarchar(200), cpersonname nvarchar(200),
cInvName nvarchar(200), cInvName nvarchar(200),
cInvStd nvarchar(500) cInvStd nvarchar(500)
) )
insert into @RdRecord
insert into tempdb..tablemom20210625
select *from ( select *from (
select a.*,isnull(f.cMaker,'其他') as cpersonname ,inv.cInvName,inv.cInvStd from ( select a.*,isnull(isnull(k.receive ,f.cMaker),'其他') as cpersonname ,inv.cInvName,inv.cInvStd from (
select a.InvCode as CINVCODE ,1 as RQTY , iqty,cur.iQuantity, (cur.iQuantity-iqty) as bull From ( select a.InvCode as CINVCODE ,1 as RQTY , iqty,cur.iQuantity, (cur.iQuantity-iqty) as bull From (
SELECT ma.invcode, SUM(isnull(ma.qty, 0) - isnull(issqty, 0)) iqty SELECT ma.invcode, SUM(isnull(ma.qty, 0) - isnull(issqty, 0)) iqty
FROM mom_moallocate ma WITH (NOLOCK) INNER JOIN FROM mom_moallocate ma WITH (NOLOCK) INNER JOIN
@@ -480,12 +524,14 @@ namespace NX.ERP.U8.Purchase
) a left join ) a left join
(select cInvCode,cMaker from ( select cInvCode,ROW_NUMBER() over( partition by b.cInvCode order by a.poid desc) as rownumber ,a.cMaker from PO_Pomain a WITH (NOLOCK), PO_Podetails b WITH (NOLOCK) where a.poid=b.poid) (select cInvCode,cMaker from ( select cInvCode,ROW_NUMBER() over( partition by b.cInvCode order by a.poid desc) as rownumber ,a.cMaker from PO_Pomain a WITH (NOLOCK), PO_Podetails b WITH (NOLOCK) where a.poid=b.poid)
as c where c.rownumber=1) f on a.CINVCODE=f.cInvCode as c where c.rownumber=1) f on a.CINVCODE=f.cInvCode
left join CGBB2021_0001_E001 k WITH (NOLOCK) on f.cMaker =k.quit
left join Inventory inv WITH (NOLOCK) on a.CINVCODE=inv.cInvCode )pumo left join Inventory inv WITH (NOLOCK) on a.CINVCODE=inv.cInvCode )pumo
update @RdRecord set cpersonname ='其他' where cpersonname not in ( select cPsn_Name from hr_v_HR31_show where cDepCode ='52' and rEmployState ='在职') update tempdb..tablemom20210625 set cpersonname ='其他' where cpersonname not in ( select cPsn_Name from hr_v_HR31_show WITH (NOLOCK) where cDepCode ='52' and rEmployState ='在职')
and cpersonname not in (select quit from CGBB2021_0001_E001 WITH (NOLOCK))
select *From @RdRecord select *From tempdb..tablemom20210625
"; ";
List<string> where = new List<string>(); List<string> where = new List<string>();

View File

@@ -51,7 +51,7 @@ select a.id AS ArrivalId,a.cCode as ArrivalCode,a.cpersoncode,a.cpersonname,A.c
, PO_Podetails C WITH (NOLOCK) , PO_Podetails C WITH (NOLOCK)
Where ( (1>0) AND (1>0) ) AND ( 1>0 ) and (isnull(cbustype,'')<>'委外加工') -- and ( isnull (b.cInvCode,'')=isnull(Pos.cInvCode,'')) Where ( (1>0) AND (1>0) ) AND ( 1>0 ) and (isnull(cbustype,'')<>'委外加工') -- and ( isnull (b.cInvCode,'')=isnull(Pos.cInvCode,''))
And (1=1) and isnull(b.cbcloser,N'')=N'' And isnull(a.cverifier,'')<>'' and a.id=b.id and b.cinvcode=inventory.cinvcode1 and B.iPOsID = C.ID And (1=1) and isnull(b.cbcloser,N'')=N'' and a.id=b.id and b.cinvcode=inventory.cinvcode1 and B.iPOsID = C.ID
And a.iBillType =N'0' and isnull(b.bGsp,N'')=N'0' and (isnull(b.iQuantity,0)-isnull(b.fRefuseQuantity,0)>isnull(b.fValidInQuan,0) or (b.igrouptype=2 And a.iBillType =N'0' and isnull(b.bGsp,N'')=N'0' and (isnull(b.iQuantity,0)-isnull(b.fRefuseQuantity,0)>isnull(b.fValidInQuan,0) or (b.igrouptype=2
and isnull(b.inum,0)-isnull(b.frefusenum,0)>isnull(b.fvalidinnum,0))) and isnull(a.bStorageArrivalOrder,1)=1 and 1=1 and isnull(b.inum,0)-isnull(b.frefusenum,0)>isnull(b.fvalidinnum,0))) and isnull(a.bStorageArrivalOrder,1)=1 and 1=1

View File

@@ -251,5 +251,113 @@ FROM MaterialAppVouch a
} }
/// <summary>
/// 根据领料单号查询 带库位
/// </summary>
/// <param name="Code"></param>
/// <returns></returns>
public IEnumerable<Model.Response.Store.MaterialAppVouchAndPostName> GetModelAndPost(string OrderCode, string invCode)
{
if (!string.IsNullOrEmpty(OrderCode) && !string.IsNullOrEmpty(invCode))
{
return this.GetListAndPost(" MA.cCode=@OrderCode AND MAS.cInvCode = @invCode ", new { OrderCode, invCode });
}
else
if (!string.IsNullOrEmpty(OrderCode))
{
return this.GetListAndPost(" MA.cCode=@OrderCode", new { OrderCode });
}
else if (!string.IsNullOrEmpty(invCode))
{
return this.GetListAndPost(" MAS.cInvCode = @invCode ", new { invCode });
}
else
{
return this.GetListAndPost();
}
}
/// <summary>
/// 查询领料信息 带库位
/// </summary>
/// <param name="strWhere"></param>
/// <param name="Params"></param>
/// <returns></returns>
public IEnumerable<Model.Response.Store.MaterialAppVouchAndPostName> GetListAndPost(string strWhere = null, object Params = null)
{
var strSQL = @"SELECT
MA.cCode AS AppVouchOrderNo,--领料申请单号
MAS.cInvCode MaterialCode,--物料编码
INV.cInvName MaterialName,--物料名称
INV.cInvStd MaterialSpec,--物料规格
UNT.cComUnitName Unit,--单位
MAS.iQuantity Qty,--数量
CONVERT(varchar(100), MA.dDate, 23) DemandDate,--需求日期
wh.cWhName WarehouseName,--仓库名称
MAS.cpesocode ProductOrderNo,--生产单号
MAS.ipesoseq ProductOrderLineNo,--生产单行号
MAS.invcode ProductCode,--产品编码,
PDT.cInvName ProductName,--产品名称
PDT.cInvStd ProductSpec,--产品规格
POST.cPosName [Position]--库位
FROM
MaterialAppVouch MA
LEFT JOIN MaterialAppVouchs MAS ON MA.ID = MAS.ID
LEFT JOIN Inventory INV ON MAS.cInvCode = INV.cInvCode
LEFT JOIN Warehouse wh ON WH.cwhcode = MAS.cwhcode
LEFT JOIN ComputationUnit UNT ON INV.ccomunitcode = UNT.ccomunitcode
LEFT JOIN Inventory PDT ON MAS.invcode = PDT.cInvCode
LEFT JOIN (
SELECT
cinvcode,
STUFF(
(
SELECT
',' + cPosName
FROM
(
SELECT
b.cPosName,
a.cInvCode,
a.iQuantity
FROM
InvPositionSum a WITH ( NOLOCK ),
POSITION b WITH ( NOLOCK )
WHERE
a.iQuantity <> 0
AND a.cPosCode= b.cPosCode
) a
WHERE
b.cinvcode = a.cinvcode
ORDER BY
a.iQuantity DESC FOR XML PATH ( '' )
),
1,
1,
''
) cPosName
FROM
InvPositionSum b
GROUP BY
cinvcode
) AS post ON INV.cinvcode = post.cinvcode
WHERE MAS.iQuantity > ISNULL(MAS.foutquantity,0)
";
if (!string.IsNullOrEmpty(strWhere))
{
strSQL += $" AND {strWhere} ";
}
using (var conn = U8LoginContext.Instance.Connection)
{
var list = conn.Query<Model.Response.Store.MaterialAppVouchAndPostName>(strSQL, Params);
return list;
}
}
} }
} }

View File

@@ -34,7 +34,7 @@ namespace NX.ERP.WebAPi.Controllers.Store
[Obsolete]
[Route("api/MaterialApp/Model")] [Route("api/MaterialApp/Model")]
[HttpGet] [HttpGet]
@@ -45,6 +45,15 @@ namespace NX.ERP.WebAPi.Controllers.Store
} }
[Route("api/MaterialApp/ListAndPost")]
[HttpPost]
public IEnumerable<Model.Response.Store.MaterialAppVouchAndPostName> GetModelAndPost(Model.Response.Store.MaterialAppVouchAndPostName req)
{
var dal = new NX.ERP.U8.Store.MaterialAppDAL();
return dal.GetModelAndPost(req.AppVouchOrderNo, req.MaterialCode);
}
[Obsolete] [Obsolete]
[Route("api/MaterialApp/ListByMoCode")] [Route("api/MaterialApp/ListByMoCode")]
[HttpGet] [HttpGet]

View File

@@ -6,9 +6,9 @@
<configuration> <configuration>
<appSettings> <appSettings>
<add key="ApiDbName" value="MES_SUBMIT" /> <add key="ApiDbName" value="MES_SUBMIT" />
<add key="server" value="10.0.0.12" /> <add key="server" value="10.0.0.250" />
<add key="AccId" value="u8-2@001" /> <add key="AccId" value="u8@001" />
<add key="UserId" value="wx994" /> <add key="UserId" value="wx997" />
<add key="Password" value="1" /> <add key="Password" value="1" />
<add key="EaiPort" value="80" /> <add key="EaiPort" value="80" />
<add key="EaiPath" value="U8EAI/import.asp" /> <add key="EaiPath" value="U8EAI/import.asp" />

View File

@@ -11710,9 +11710,9 @@
} }
}, },
"vue-loader-v16": { "vue-loader-v16": {
"version": "npm:vue-loader@16.2.0", "version": "npm:vue-loader@16.4.0",
"resolved": "https://registry.nlark.com/vue-loader/download/vue-loader-16.2.0.tgz", "resolved": "https://registry.npmjs.org/vue-loader/-/vue-loader-16.4.0.tgz",
"integrity": "sha1-BGpTMI3Ufljv4g3ewe3sAnzjtG4=", "integrity": "sha512-oySoEgEedGw0jz2czEOdb6sycQ2PPyzUmF8Yclj1NTpoTVHGCYCQaGf+jsvxhdDVfhOnDLjkRzT2fLpGOrVPjg==",
"dev": true, "dev": true,
"optional": true, "optional": true,
"requires": { "requires": {
@@ -11723,8 +11723,8 @@
"dependencies": { "dependencies": {
"ansi-styles": { "ansi-styles": {
"version": "4.3.0", "version": "4.3.0",
"resolved": "https://registry.nlark.com/ansi-styles/download/ansi-styles-4.3.0.tgz?cache=0&sync_timestamp=1618995625950&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fansi-styles%2Fdownload%2Fansi-styles-4.3.0.tgz", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
"integrity": "sha1-7dgDYornHATIWuegkG7a00tkiTc=", "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
"dev": true, "dev": true,
"optional": true, "optional": true,
"requires": { "requires": {
@@ -11732,9 +11732,9 @@
} }
}, },
"chalk": { "chalk": {
"version": "4.1.1", "version": "4.1.2",
"resolved": "https://registry.nlark.com/chalk/download/chalk-4.1.1.tgz?cache=0&sync_timestamp=1618995297666&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fchalk%2Fdownload%2Fchalk-4.1.1.tgz", "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
"integrity": "sha1-yAs/qyi/Y3HmhjMl7uZ+YYt35q0=", "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
"dev": true, "dev": true,
"optional": true, "optional": true,
"requires": { "requires": {
@@ -11744,8 +11744,8 @@
}, },
"color-convert": { "color-convert": {
"version": "2.0.1", "version": "2.0.1",
"resolved": "https://registry.npm.taobao.org/color-convert/download/color-convert-2.0.1.tgz", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
"integrity": "sha1-ctOmjVmMm9s68q0ehPIdiWq9TeM=", "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
"dev": true, "dev": true,
"optional": true, "optional": true,
"requires": { "requires": {
@@ -11754,22 +11754,22 @@
}, },
"color-name": { "color-name": {
"version": "1.1.4", "version": "1.1.4",
"resolved": "https://registry.npm.taobao.org/color-name/download/color-name-1.1.4.tgz", "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
"integrity": "sha1-wqCah6y95pVD3m9j+jmVyCbFNqI=", "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
"dev": true, "dev": true,
"optional": true "optional": true
}, },
"has-flag": { "has-flag": {
"version": "4.0.0", "version": "4.0.0",
"resolved": "https://registry.nlark.com/has-flag/download/has-flag-4.0.0.tgz?cache=0&sync_timestamp=1618847009337&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fhas-flag%2Fdownload%2Fhas-flag-4.0.0.tgz", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
"integrity": "sha1-lEdx/ZyByBJlxNaUGGDaBrtZR5s=", "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
"dev": true, "dev": true,
"optional": true "optional": true
}, },
"loader-utils": { "loader-utils": {
"version": "2.0.0", "version": "2.0.0",
"resolved": "https://registry.npm.taobao.org/loader-utils/download/loader-utils-2.0.0.tgz", "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.0.tgz",
"integrity": "sha1-5MrOW4FtQloWa18JfhDNErNgZLA=", "integrity": "sha512-rP4F0h2RaWSvPEkD7BLDFQnvSf+nK+wr3ESUjNTyAGobqrijmW92zc+SO6d4p4B1wh7+B/Jg1mkQe5NYUEHtHQ==",
"dev": true, "dev": true,
"optional": true, "optional": true,
"requires": { "requires": {
@@ -11780,8 +11780,8 @@
}, },
"supports-color": { "supports-color": {
"version": "7.2.0", "version": "7.2.0",
"resolved": "https://registry.npm.taobao.org/supports-color/download/supports-color-7.2.0.tgz?cache=0&sync_timestamp=1618560998281&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fsupports-color%2Fdownload%2Fsupports-color-7.2.0.tgz", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
"integrity": "sha1-G33NyzK4E4gBs+R4umpRyqiWSNo=", "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
"dev": true, "dev": true,
"optional": true, "optional": true,
"requires": { "requires": {

View File

@@ -26,7 +26,7 @@
<MenuGroup title="单据"> <MenuGroup title="单据">
<MenuItem to="/inventoryrrival" name="4-2">到货单</MenuItem> <MenuItem to="/inventoryrrival" name="4-2">到货单</MenuItem>
<MenuItem to="/inventoryerror" name="4-3">异常单据查询</MenuItem> <MenuItem to="/inventoryerror" name="4-3">异常单据查询</MenuItem>
<MenuItem to="/inventoryMaterialAppVouch" name="4-4">领料单查询</MenuItem>
</MenuGroup> </MenuGroup>
</Submenu> </Submenu>
</Menu> </Menu>

View File

@@ -0,0 +1,6 @@
import axios from 'axios'
//查询领料列表带库位
export const getListAndPost = (info) => {
return axios.post('/api/MaterialApp/ListAndPost', info)
}

View File

@@ -10,6 +10,7 @@ import inventorypoc from '@/views/inventory-poc.vue'
import Purchasesum from '@/views/Purchasesum.vue' import Purchasesum from '@/views/Purchasesum.vue'
import inventoryrrival from '@/bill/inventory-arrival.vue' import inventoryrrival from '@/bill/inventory-arrival.vue'
import inventoryerror from '@/bill/inventory-error.vue' import inventoryerror from '@/bill/inventory-error.vue'
import inventoryMaterialAppVouch from '@/views/inventory-materialAppVouch.vue'
export default [ export default [
{ {
@@ -29,4 +30,5 @@ export default [
{ path: '/Purchasesum', component: Purchasesum }, { path: '/Purchasesum', component: Purchasesum },
{ path: '/inventoryrrival', component: inventoryrrival }, { path: '/inventoryrrival', component: inventoryrrival },
{ path: '/inventoryerror', component: inventoryerror }, { path: '/inventoryerror', component: inventoryerror },
{ path: '/inventoryMaterialAppVouch', component: inventoryMaterialAppVouch },
] ]

View File

@@ -170,6 +170,11 @@ export default {
align: "center", align: "center",
key: "iUnitCost", key: "iUnitCost",
}, },
{
title: "备注",
align: "center",
key: "csnmemo",
},
{ {
title: "出库库单号", title: "出库库单号",
align: "center", align: "center",

View File

@@ -0,0 +1,485 @@
<template>
<div>
<h4>领料单</h4>
<div>
<Row :gutter="16">
<Col span="4">
<label>领料单号</label>
<Input autosize type="textarea" v-model="filter.app_vouch_order_no" />
</Col>
<Col span="4">
<label>物料编号</label>
<Input v-model="filter.material_code" />
</Col>
<Col span="6">
<Button
size="large"
type="primary"
icon="ios-search"
@click="handleClick"
>查询</Button
>
<Button size="large" type="success" @click="handelExport"
>导出</Button
>
<Button size="large" type="info" @click="print"
>打印</Button
>
</Col>
</Row>
</div>
<div id="tb">
<Table
style="margin-top: 20px"
:loading="loading"
size="small"
border
:columns="columnsMaterialAppVouch"
:data="pagedData"
>
</Table>
</div>
<Page
style="margin-top: 20px"
:current="pageNo"
:page-size="pageSize"
:total="total"
:page-size-opts="PageSizeOpts"
@on-change="handlePagechange"
@on-page-size-change="handlePageSize"
show-elevator
show-sizer
show-total
size="small"
/>
<Modal width="1366" v-model="modal1" title="单据详情" @on-cancel="cancel">
<Button size="large" type="primary" @click="print">打印</Button>
<div id="tb2">
<div>
<Row :gutter="16">
<Col span="7">
<label></label>
</Col>
<Col span="6">
<h1>采购到货单</h1>
</Col>
</Row>
</div>
<div>
<Row :gutter="16">
<Col span="8">
{{"领料单号:"+this.ccode}}
</Col>
<Col span="6">
{{"领料时间:"+this.ArrivalDate}}
</Col>
<Col span="4">
{{"业务员:"+this.cpersonname}}
</Col>
</Row>
</div>
<Table
style="margin-top: 20px"
height="700"
size="small"
border
:columns="columns2"
:data="datas2"
>
</Table>
</div>
</Modal>
</div>
</template>
<script>
//import vUpLoad from "@/bill/PrintView";
import { pageingData, export_col_to_excel, sortByKey } from "@/libs/tools";
import {getListAndPost} from "../api/materialAppVouch";
export default {
//components:{vUpLoad},
data() {
return {
loading: false,
PageSizeOpts: [10, 15, 20, 30],
pageNo: 1,
modal1: false,
printing: false,
strfilter: "",
multiple: false,
pageSize: 15,
datas: [],
ccode:"",
ArrivalDate:"",
cpersonname:"",
datas2: [],
filter: {
app_vouch_order_no: "",
material_code: "",
},
dom: "",
ranges: [
{
type: "price",
ccode: "",
// low: "", //区间的最小值
// height: "", //区间的最大值
},
],
columnsMaterialAppVouch: [
// {
// type: "index",
// title: "序号",
// width: 60,
// align: "center",
// },
{
title: "存货编码",
align: "center",
key: "material_code",
width: 110,
className: "demo-table-info-new",
},
{
title: "存货名称",
align: "center",
key: "material_name",
width: 130,
className: "demo-table-info-nom",
},
{
title: "规格型号",
align: "center",
key: "material_spec",
width: 150,
className: "demo-table-info-nom",
},
{
title: "单位",
align: "center",
key: "unit",
width: 80,
className: "demo-table-info-nom",
},
{
title: "数量",
align: "center",
key: "qty",
width: 80,
className: "demo-table-info-nom",
},
{
title: "现存库位",
key: "position",
width: 160,
align: "left",
className: "demo-table-info-nom",
},
{
title: "需求日期",
align: "center",
key: "demand_date",
width: 150,
className: "demo-table-info-nom",
},
{
title: "仓库",
align: "center",
key: "warehouse_name",
width: 150,
className: "demo-table-info-nom",
},
{
title: "领料单号",
align: "center",
key: "app_vouch_order_no",
width: 150,
className: "demo-table-info-new",
},
{
title: "生产单号",
align: "center",
key: "product_order_no",
width: 150,
className: "demo-table-info-nom",
},
{
title: "行号",
align: "center",
key: "product_order_line_no",
width: 70,
className: "demo-table-info-nom",
},
{
title: "产品编码",
align: "center",
key: "product_code",
width: 150,
className: "demo-table-info-nom",
},
{
title: "产品名称",
align: "center",
key: "product_name",
width: 150,
className: "demo-table-info-nom",
},
{
title: "产品规格",
align: "product_spec",
key: "Quantity",
width: 150,
className: "demo-table-info-nom",
},
],
columns: [
{
title: "到货单号",
align: "center",
key: "ArrivalCode",
className: "demo-table-info-old",
render: (h, params) => {
return h("div", [
h(
"a",
{
props: {
type: "primary",
size: "small",
},
style: { color: "#2db7f5" },
domProps: {
title: params.row.ArrivalCode, //添加title属性
},
on: {
click: () => {
this.handleShow(params.row.ArrivalCode); //点击事件
},
},
},
params.row.ArrivalCode
),
]);
},
},
{
title: "到货日期",
align: "center",
key: "ArrivalDate",
},
{
title: "业务员",
align: "center",
key: "cpersonname",
},
{
title: "存货编码",
align: "center",
key: "MaterialCode",
},
{
title: "存货名称",
align: "center",
key: "cinvname",
},
{
title: "规格型号",
align: "center",
key: "cinvstd",
},
{
title: "单位",
align: "center",
key: "cinvm_unit",
},
{
title: "到货数量",
align: "center",
key: "Quantity",
},
{
title: "现存库位",
align: "center",
key: "cPosName",
width: 200,
},
],
columns2: [
{
title: "存货编码",
align: "center",
key: "MaterialCode",
width: 110,
className: "demo-table-info-new",
},
{
title: "存货名称",
align: "center",
key: "cinvname",
width: 130,
className: "demo-table-info-nom",
},
{
title: "规格型号",
align: "center",
key: "cinvstd",
width: 135,
className: "demo-table-info-nom",
},
{
title: "单位",
align: "center",
key: "cinvm_unit",
width: 80,
className: "demo-table-info-nom",
},
{
title: "数量",
align: "center",
key: "Quantity",
width: 80,
className: "demo-table-info-nom",
},
{
title: "现存库位",
key: "cPosName",
width: 160,
align: "left",
className: "demo-table-info-nom",
},
],
};
},
computed: {
total() {
return this.datas.length;
},
pagedData() {
return pageingData(this.datas, this.pageSize, this.pageNo);
},
},
mounted() {
this.loadData();
},
methods: {
handelExport() {
export_col_to_excel(this.columnsMaterialAppVouch, this.datas);
},
handleClick() {
this.loadData();
},
print() {
this.dom = document.getElementById("tb");
// console.log(this.dom);
this.$print(this.dom);
},
inventory(ranges) {
const skus = new Array();
//筛选条件
this.datas.map((Item, index) => {
if (Item.ArrivalCode == this.ranges[0].ccode) {
skus.push({
...Item,
});
}
});
return skus;
},
cancel() {
this.datas2 = [];
this.modal1 = false;
},
async handleShow(h) {
this.ranges[0].ccode = h;
this.datas2 = this.inventory(this.ranges);
this.ccode=h;
this.ArrivalDate=this.datas2[0].ArrivalDate;
this.cpersonname=this.datas2[0].cpersonname;
this.modal1 = true;
},
async loadData() {
try {
this.loading = true;
let resp = await getListAndPost(this.filter);
this.pageNo = 1;
this.datas = sortByKey(resp.data.data, "app_vouch_order_no");
// this.datas = resp.data.data;
} catch (error) {
} finally {
this.loading = false;
}
},
handlePagechange(page) {
this.pageNo = page;
},
handlePageSize(pageSize) {
this.pageSize = pageSize;
},
},
};
</script>
<!-- Add "scoped" attribute to limit CSS to this component only -->
<style >
h3 {
margin: 40px 0 0;
}
ul {
list-style-type: none;
padding: 0;
}
li {
display: inline-block;
margin: 0 10px;
}
a {
color: #42b983;
}
.ivu-table .demo-table-info-row td {
background-color: #2db7f5;
color: #fff;
}
.ivu-table .demo-table-error-row td {
background-color: #ff6600;
color: #fff;
}
.ivu-table td.demo-table-info-old {
color: #2db7f5;
}
.ivu-table td.demo-table-info-new {
color: #ff6600;
font-size: 12px;
}
.ivu-table td.demo-table-info-nom {
font-size: 11px;
}
.ivu-table td.demo-table-info-ex {
color: #187;
font-weight: 600;
}
body {
padding: 10px 1;
}
</style>

View File

@@ -50,6 +50,18 @@
</Col> </Col>
</Row> </Row>
</div> </div>
<div>
<Row :gutter="16">
<Col span="15">
<label></label>
</Col>
<Col span="4">
<label>默认不勾选查应领大于已领量,勾选则已领>0</label>
</Col>
</Row>
</div>
<Table <Table
style="margin-top: 20px" style="margin-top: 20px"

View File

@@ -58,7 +58,7 @@ module.exports = {
disableHostCheck: true, disableHostCheck: true,
proxy: { proxy: {
'/api': { '/api': {
target: 'http://localhost:61448', // 接口域名 target: 'http://10.0.0.250:8081', // 接口域名
changeOrigin: true, // 是否跨域 changeOrigin: true, // 是否跨域
pathRewrite: {} pathRewrite: {}
}, },

View File

@@ -5,10 +5,17 @@
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5"/> <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5"/>
</startup> </startup>
<appSettings> <appSettings>
<add key="ApiDbName" value="MES_SUBMIT" />
<add key="server" value="10.0.0.12" /> <add key="server" value="10.0.0.12" />
<add key="AccId" value="u8-2@001" /> <add key="AccId" value="u8-2@002" />
<add key="UserId" value="wxapi" /> <add key="UserId" value="wx997" />
<add key="Password" value="1" /> <add key="Password" value="1" />
<add key="EaiPort" value="80" />
<add key="EaiPath" value="U8EAI/import.asp" />
<add key="webpages:Version" value="3.0.0.0" />
<add key="webpages:Enabled" value="false" />
<add key="ClientValidationEnabled" value="true" />
<add key="UnobtrusiveJavaScriptEnabled" value="true" />
</appSettings> </appSettings>
<runtime> <runtime>

View File

@@ -0,0 +1,22 @@
using Microsoft.VisualStudio.TestTools.UnitTesting;
using NX.ERP.U8.Store;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace NX.ERP.U8.Store.Tests
{
[TestClass()]
public class APVouchTest
{
[TestMethod()]
public void GetListAndPostNameTest()
{
var ap = new NX.ERP.U8.Store.MaterialAppDAL();
ap.GetListAndPost();
//Assert.Fail();
}
}
}

View File

@@ -57,8 +57,10 @@
<ItemGroup> <ItemGroup>
<Compile Include="APVouchTest.cs" /> <Compile Include="APVouchTest.cs" />
<Compile Include="Properties\AssemblyInfo.cs" /> <Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Store\APVouchTest.cs" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<None Include="App.config" />
<None Include="packages.config" /> <None Include="packages.config" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>