导入工具

This commit is contained in:
杰 朱
2021-05-26 08:50:35 +08:00
parent f953c9576e
commit 1ccaebd4c9
9 changed files with 62 additions and 55 deletions

View File

@@ -1,23 +1,29 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5"/>
</startup>
<appSettings>
<add key="EaiSender" value="003"/>
<add key="EaiPort" value="80"/>
<add key="EaiPath" value="U8EAI/import.asp"/>
<!--<add key="url" value="http://192.168.0.242/U8EAI/import.asp"/>-->
<!--账套数据库配置如果不配置就使用登录后的数据库连接-->
<add key="connStr" value="Server=192.168.168;DataBase=UFDATA_003_2019;Uid=sa;Pwd=!@#qwe123;"/>
<add key="ClientSettingsProvider.ServiceUri" value=""/>
</appSettings>
<runtime>
</runtime>
<system.web>
</system.web>
</configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
</startup>
<appSettings>
<add key="EaiSender" value="wuxitest" />
<add key="EaiPort" value="88" />
<add key="EaiPath" value="EAI/import.asp" />
<!--<add key="url" value="http://192.168.0.242/U8EAI/import.asp"/>-->
<!--账套数据库配置如果不配置就使用登录后的数据库连接-->
<add key="connStr" value="Server=10.0.0.250,49318;DataBase=UFDATA_001_2019;Uid=wxinput;Pwd=Nx123456;" />
<add key="ClientSettingsProvider.ServiceUri" value="" />
</appSettings>
<runtime>
</runtime>
<system.web>
<membership defaultProvider="ClientAuthenticationMembershipProvider">
<providers>
<add name="ClientAuthenticationMembershipProvider" type="System.Web.ClientServices.Providers.ClientFormsAuthenticationMembershipProvider, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" serviceUri="" />
</providers>
</membership>
<roleManager defaultProvider="ClientRoleProvider" enabled="true">
<providers>
<add name="ClientRoleProvider" type="System.Web.ClientServices.Providers.ClientRoleProvider, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" serviceUri="" cacheTimeout="86400" />
</providers>
</roleManager>
</system.web>
</configuration>

View File

@@ -205,8 +205,10 @@ namespace U8AppMain
bomLookup.Add(strKey, purchase);
}
body.inventorycode = row["存货编码"].ToString().Trim();
body.taxrate = InvInfo[body.inventorycode].TaxRate;
body.requiredate = purchase.purchaseapp.header.date;
body.define25 = row["用料工位"].ToString().Trim();
body.quantity = decimal.Parse(row["数量"].ToString());
purchase.purchaseapp.body.Add(body);
}
@@ -440,7 +442,7 @@ namespace U8AppMain
{
//var ap = new NX.ERP.U8.AP.APVouch();
//ap.AddVocher();
////ap.AddVocher();
//var dal = new NX.ERP.U8.Store.ProductInDAL();
//dal.AddVoucher(new NX.ERP.Model.Request.ProductStoreIn()
//{

View File

@@ -14,6 +14,7 @@
<TargetFrameworkProfile />
<NuGetPackageImportStamp>
</NuGetPackageImportStamp>
<IsWebBootstrapper>false</IsWebBootstrapper>
<PublishUrl>publish\</PublishUrl>
<Install>true</Install>
<InstallFrom>Disk</InstallFrom>
@@ -26,12 +27,11 @@
<MapFileExtensions>true</MapFileExtensions>
<ApplicationRevision>0</ApplicationRevision>
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
<IsWebBootstrapper>false</IsWebBootstrapper>
<UseApplicationTrust>false</UseApplicationTrust>
<BootstrapperEnabled>true</BootstrapperEnabled>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<PlatformTarget>x86</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>

View File

@@ -54,7 +54,7 @@ namespace U8AppMain.Purchase
//public string originaltax { get; set; }
//public string originalsum { get; set; }
public string define25 { get; set; }
public int ivouchrowno { get; set; }
// <vendorcode />

View File

@@ -74,7 +74,7 @@ namespace NX.ERP.U8.Finance
if (!string.IsNullOrEmpty(aa))
{
sql += "where " + aa;
sql += " where " + aa;
}
using (var conn = NX.ERP.U8.U8LoginContext.Instance.Connection)

View File

@@ -143,7 +143,7 @@ SELECT m..mocode,CONVERT(varchar(100), mor.StartDate, 23) as StartDate ,CONVER
ELSE '其它'
END AS std,dtyl.dtty, ma.Qty qty1, ma.IssQty issqty,(ma.Qty-ma.IssQty) as wll,mdsss.mdqty,shwl.shwl,sdwl.sdwl
,mas.wqty wqty, ISNULL(cs.qty, 0) cqty, ISNULL(misss.issqty, 0) issqtyxc,ISNULL(ds.qty, 0) dqty,isnull(prd.Rqty, 0) rqty,
ISNULL(OMM.RQTY1, 0) AS rqty1, ISNULL(pu_App.RQTY3, 0) AS rqty3,ISNULL(momq.momqty, 0) AS momqty, ISNULL(MX.MQTY, 0) MQTY, 0-(mas.wqty - isnull(ds.qty, 0) - ISNULL(prd.Rqty, 0)
ISNULL(OMM.RQTY1, 0) AS rqty1, ISNULL(pu_App.RQTY3, 0) AS rqty3,ISNULL(MX.MQTY, 0) momqty, 0-(mas.wqty - isnull(ds.qty, 0) - ISNULL(prd.Rqty, 0)
- ISNULL(omm.RQTY1, 0) - ISNULL(MX.MQTY, 0)- ISNULL(pu_App.RQTY3, 0)) AS q, motype.description,
CASE WHEN md.Status = 2 THEN '锁定' WHEN md.Status = 4 THEN '关闭' WHEN md.Status = 3 THEN '审核' ELSE '新建' END AS st, md.Status
FROM mom_order m WITH (NOLOCK) INNER JOIN
@@ -184,11 +184,11 @@ SELECT m..mocode,CONVERT(varchar(100), mor.StartDate, 23) as StartDate ,CONVER
GROUP BY ma.InvCode) shwl ON ma.InvCode = shwl.InvCode LEFT JOIN
(SELECT mom.MoCode, ma.invcode,SUM(isnull(ma.qty, 0)) dtty
(SELECT mom.MoCode, ma.invcode,round(SUM(isnull(ma.qty, 0))/md.Qty,3) dtty
FROM mom_moallocate ma WITH (NOLOCK) INNER JOIN
mom_orderdetail md WITH (NOLOCK) ON ma.MoDId = md.MoDId left join
mom_order mom WITH (NOLOCK) on md.MoId=mom.MoId
GROUP BY ma.InvCode,mom.MoCode ) dtyl ON ma.InvCode = dtyl.InvCode and dtyl.MoCode=m.MoCode LEFT JOIN
GROUP BY ma.InvCode,mom.MoCode,md.Qty ) dtyl ON ma.InvCode = dtyl.InvCode and dtyl.MoCode=m.MoCode LEFT JOIN
(SELECT ma.invcode, SUM( isnull(issqty, 0)) issqty
FROM mom_moallocate ma WITH (NOLOCK) INNER JOIN
@@ -261,7 +261,7 @@ SELECT m..mocode,CONVERT(varchar(100), mor.StartDate, 23) as StartDate ,CONVER
ELSE '其它'
END AS std,dtyl.dtty, ma.Qty qty1, ma.IssQty issqty,(ma.Qty-ma.IssQty) as wll,mdsss.mdqty,shwl.shwl,sdwl.sdwl
,mas.wqty wqty, ISNULL(cs.qty, 0) cqty, ISNULL(misss.issqty, 0) issqtyxc,ISNULL(ds.qty, 0) dqty,isnull(prd.Rqty, 0) rqty,
ISNULL(OMM.RQTY1, 0) AS rqty1, ISNULL(pu_App.RQTY3, 0) AS rqty3,ISNULL(momq.momqty, 0) AS momqty, ISNULL(MX.MQTY, 0) MQTY, 0-(mas.wqty - isnull(ds.qty, 0) - ISNULL(prd.Rqty, 0)
ISNULL(OMM.RQTY1, 0) AS rqty1, ISNULL(pu_App.RQTY3, 0) AS rqty3,ISNULL(MX.MQTY, 0) momqty, 0-(mas.wqty - isnull(ds.qty, 0) - ISNULL(prd.Rqty, 0)
- ISNULL(omm.RQTY1, 0) - ISNULL(MX.MQTY, 0)- ISNULL(pu_App.RQTY3, 0)) AS q, motype.description,
CASE WHEN md.Status = 2 THEN '锁定' WHEN md.Status = 4 THEN '关闭' WHEN md.Status = 3 THEN '审核' ELSE '新建' END AS st, md.Status
FROM mom_order m WITH (NOLOCK) INNER JOIN
@@ -303,11 +303,11 @@ SELECT m..mocode,CONVERT(varchar(100), mor.StartDate, 23) as StartDate ,CONVER
GROUP BY ma.InvCode) shwl ON ma.InvCode = shwl.InvCode LEFT JOIN
(SELECT mom.MoCode, ma.invcode,SUM(isnull(ma.qty, 0)) dtty
(SELECT mom.MoCode, ma.invcode,round(SUM(isnull(ma.qty, 0))/md.Qty,3) dtty
FROM mom_moallocate ma WITH (NOLOCK) INNER JOIN
mom_orderdetail md WITH (NOLOCK) ON ma.MoDId = md.MoDId left join
mom_order mom WITH (NOLOCK) on md.MoId=mom.MoId
GROUP BY ma.InvCode,mom.MoCode ) dtyl ON ma.InvCode = dtyl.InvCode and dtyl.MoCode=m.MoCode LEFT JOIN
GROUP BY ma.InvCode,mom.MoCode,md.Qty ) dtyl ON ma.InvCode = dtyl.InvCode and dtyl.MoCode=m.MoCode LEFT JOIN
(SELECT ma.invcode, SUM( isnull(issqty, 0)) issqty
FROM mom_moallocate ma WITH (NOLOCK) INNER JOIN

View File

@@ -203,7 +203,7 @@ namespace NX.ERP.U8.Purchase
public IEnumerable<object> Purchasesum(NX.ERP.Model.Request.PurchasesumRequest info)
{
string sql = $@"
DECLARE @RdRecord table(
DECLARE @RdRecord table(
cPsn_Num nvarchar(30),
cpersonname nvarchar(30),
puappnumall int,
@@ -250,8 +250,8 @@ namespace NX.ERP.U8.Purchase
pu_appbody ommds WITH (nolock) ON omm.id = ommds.id LEFT JOIN
(SELECT iAppIds, sum(iquantity) AS qty
FROM PO_Podetails WITH (nolock)
GROUP BY iAppIds) rds ON ommds.autoid = rds.iAppIds
WHERE ISNULL(OMM.cCloser, N'') = N'' AND ISNULL(ommds.cbCloser, N'') = N'' AND
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(rds.qty, 0)=0 and ommds.iReceivedQTY=0 and
ommds.fquantity - ISNULL(rds.qty, 0) > 0) OM
GROUP BY cInvCode
) as tbl1
@@ -282,8 +282,8 @@ namespace NX.ERP.U8.Purchase
pu_appbody ommds WITH (nolock) ON omm.id = ommds.id LEFT JOIN
(SELECT iAppIds, sum(iquantity) AS qty
FROM PO_Podetails WITH (nolock)
GROUP BY iAppIds) rds ON ommds.autoid = rds.iAppIds
WHERE ISNULL(OMM.cCloser, N'') = N'' AND ISNULL(ommds.cbCloser, N'') = N'' AND DATEDIFF(day,ddate ,GETDATE()) >=3 and
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(rds.qty, 0)=0 and ommds.iReceivedQTY=0 and DATEDIFF(day,ddate ,GETDATE()) >=3 and
ommds.fquantity - ISNULL(rds.qty, 0) > 0) OM
GROUP BY cInvCode
) as tbl1
@@ -385,6 +385,7 @@ namespace NX.ERP.U8.Purchase
";
@@ -404,11 +405,11 @@ namespace NX.ERP.U8.Purchase
pu_appbody ommds WITH (nolock) ON omm.id = ommds.id LEFT JOIN
(SELECT iAppIds, sum(iquantity) AS qty
FROM PO_Podetails WITH (nolock)
GROUP BY iAppIds) rds ON ommds.autoid = rds.iAppIds
GROUP BY iAppIds) rds ON isnull(ommds.autoid,'') = isnull(rds.iAppIds,'')
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, PO_Podetails b where a.poid=b.poid)
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
WHERE ISNULL(OMM.cCloser, N'') = N'' AND ISNULL(ommds.cbCloser, N'') = N'' AND ISNULL(rds.qty, 0)=0 and ommds.iReceivedQTY=0 AND
ommds.fquantity - ISNULL(rds.qty, 0) > 0 ) puu
";

View File

@@ -37,7 +37,7 @@
>
<Table
style="margin-top: 20px"
height="768"
height="700"
size="small"
border
:columns="columnsDetail"
@@ -56,7 +56,7 @@
>
<Table
style="margin-top: 20px"
height="768"
height="700"
size="small"
border
:columns="columnsDetail2"

View File

@@ -19,8 +19,7 @@
<Col span="3">
<label>状态</label>
<div>
<Select v-model="filter.by_finish" multiple
>
<Select v-model="filter.by_finish" multiple>
<Option
v-for="item in stateList"
:value="item.value"
@@ -97,10 +96,6 @@ export default {
pageSize: 15,
datas: [],
stateList: [
{
value: "1",
label: "未审核",
},
{
value: "2",
label: "锁定",
@@ -118,7 +113,7 @@ export default {
inv_codes: "",
inv_codes1: "",
mo_codes: "",
by_finish: ["2","3"],
by_finish: ["2", "3"],
byiss: false,
},
columns: [
@@ -195,7 +190,6 @@ export default {
key: "wwc",
fixed: "left",
width: 95,
},
{
title: "状态",
@@ -261,7 +255,6 @@ export default {
align: "center",
key: "wll",
width: 110,
},
{
title: "条件内未领",
@@ -302,8 +295,13 @@ export default {
key: "cqty",
width: 100,
},
{
title: "现存无废品",
align: "center",
key: "dqty",
width: 100,
},
{
title: "采购在途",
align: "center",
@@ -328,7 +326,7 @@ export default {
key: "momqty",
width: 90,
},
{
{
title: "净存",
align: "center",
key: "q",
@@ -338,16 +336,16 @@ export default {
title: "计划开工",
align: "center",
key: "start_date",
width: 100,
width: 100,
},
{
title: "计划开工",
align: "center",
key: "due_date",
width: 100,
width: 100,
},
{
title: "结案天数",
title: "超期天数",
align: "center",
key: "jandete",
width: 90,