This commit is contained in:
杰 朱
2021-12-10 15:23:13 +08:00
parent 7edd4576e2
commit 3e38effdb4
6 changed files with 367 additions and 51 deletions

View File

@@ -21,43 +21,257 @@ namespace NX.ERP.Model
public class wfdetail public class wfdetail
{ {
public string TaskItemID { get; set; } private string taskItemId;
private string centerCode;
private string centerName;
private string workCode;
private string workName;
private string code;
private string name;
private string standard;
private string srcBlockCode;
private string srcBlockName;
private string dstBlockCode;
private string dstBlockName;
private string recQua;
private string supplierName;
private string price;
private string recTime;
public string code { get; set; } /// <summary>
///
/// </summary>
public string TaskItemId
{
get { return this.taskItemId; }
set { this.taskItemId = value; }
}
public string name { get; set; } /// <summary>
///
/// </summary>
public string CenterCode
{
get { return this.centerCode; }
set { this.centerCode = value; }
}
/// <summary>
///
/// </summary>
public string CenterName
{
get { return this.centerName; }
set { this.centerName = value; }
}
public string standard { get; set; } /// <summary>
///
/// </summary>
public string WorkCode
{
get { return this.workCode; }
set { this.workCode = value; }
}
public string Qua { get; set; } /// <summary>
///
/// </summary>
public string WorkName
{
get { return this.workName; }
set { this.workName = value; }
}
public string qty { get; set; } /// <summary>
///
/// </summary>
public string Code
{
get { return this.code; }
set { this.code = value; }
}
public string diff { get; set; } /// <summary>
///
/// </summary>
public string Name
{
get { return this.name; }
set { this.name = value; }
}
} /// <summary>
///
/// </summary>
public string Standard
{
get { return this.standard; }
set { this.standard = value; }
}
/// <summary>
///
/// </summary>
public string SrcBlockCode
{
get { return this.srcBlockCode; }
set { this.srcBlockCode = value; }
}
/// <summary>
///
/// </summary>
public string SrcBlockName
{
get { return this.srcBlockName; }
set { this.srcBlockName = value; }
}
/// <summary>
///
/// </summary>
public string DstBlockCode
{
get { return this.dstBlockCode; }
set { this.dstBlockCode = value; }
}
/// <summary>
///
/// </summary>
public string DstBlockName
{
get { return this.dstBlockName; }
set { this.dstBlockName = value; }
}
/// <summary>
///
/// </summary>
public string RecQua
{
get { return this.recQua; }
set { this.recQua = value; }
}
/// <summary>
///
/// </summary>
public string SupplierName
{
get { return this.supplierName; }
set { this.supplierName = value; }
}
/// <summary>
///
/// </summary>
public string Price
{
get { return this.price; }
set { this.price = value; }
}
/// <summary>
///
/// </summary>
public string RecTime
{
get { return this.recTime; }
set { this.recTime = value; }
}
}
public class wsdetail public class wsdetail
{ {
public string sheetid { get; set; } private DateTime sheetDate;
private string sheetId;
public string code { get; set; } private string code;
private string name;
public string name { get; set; } private string standard;
private double qua;
private double receivedQua;
private double diff;
public string standard { get; set; } public string SupplierName { get; set; }
public string Qua { get; set; } /// <summary>
///
/// </summary>
public DateTime SheetDate
{
get { return this.sheetDate; }
set { this.sheetDate = value; }
}
public string ReceivedQua { get; set; } /// <summary>
///
/// </summary>
public string SheetId
{
get { return this.sheetId; }
set { this.sheetId = value; }
}
/// <summary>
///
/// </summary>
public string Code
{
get { return this.code; }
set { this.code = value; }
}
public string diff { get; set; } /// <summary>
///
/// </summary>
public string Name
{
get { return this.name; }
set { this.name = value; }
}
} /// <summary>
///
/// </summary>
public string Standard
{
get { return this.standard; }
set { this.standard = value; }
}
/// <summary>
///
/// </summary>
public double Qua
{
get { return this.qua; }
set { this.qua = value; }
}
/// <summary>
///
/// </summary>
public double ReceivedQua
{
get { return this.receivedQua; }
set { this.receivedQua = value; }
}
/// <summary>
///
/// </summary>
public double Diff
{
get { return this.diff; }
set { this.diff = value; }
}
}
} }

View File

@@ -566,23 +566,36 @@ CREATE INDEX IX_test ON tempdb..tablepuapp20210625 (cinvcode)
using (var conn = U8LoginContext.Instance.Connection) using (var conn = U8LoginContext.Instance.Connection)
{ {
var sql = @" select aa.TaskItemID,aa.materialid,dd.code,dd.name,dd.standard, CONVERT(DECIMAL(13,3),aa.Qua) as Qua , CONVERT(DECIMAL(13,3),bb.qty) as qty , CONVERT(DECIMAL(13,3),(isnull(aa.Qua,0)-isnull(bb.qty,0))) as diff from [10.0.0.230].wxnx2021.dbo.t_TaskItem aa left join ( var sql = @" SELECT [TaskItemID]
select TaskItemID, sum(Qua) AS qty ,[CenterCode]
from [10.0.0.230].wxnx2021.dbo.t_OutSourcing_SendItems a left join ,[CenterName]
[10.0.0.230].wxnx2021.dbo.t_OutSourcing_SendSheet b on a.SID_Sheet= b.SID_Sheet ,[WorkCode]
where b.IsChecked =1 and isnull(b.IsDeleted,0)=0 group by TaskItemID ) bb on aa. SID_Item= bb.TaskItemID ,[WorkName]
left join [10.0.0.230].wxnx2021.dbo.t_TaskSheet cc on aa.SID_Sheet = cc.SID_Sheet ,''[code]
left join [10.0.0.230].wxnx2021.dbo.t_Material dd on dd.SysID=aa.materialid ,''[Name]
where cc.IsChecked=1 and (isnull(aa.Qua,0)-isnull(bb.qty,0))>0 and cc.SheetType=3 and isnull(cc.IsDeleted,0)=0 ,''[Standard]
,[SrcBlockCode]
,[SrcBlockName]
,[DstBlockCode]
,[DstBlockName]
,[RecQua]
,[SupplierName]
,[Price]
,[RecTime]
FROM [10.0.0.230].[wxnx2021].[dbo].[WX_WWsend]
"; ";
PmcWwInvlRes.wfdetails=conn.Query< NX.ERP.Model.wfdetail> (sql,"" ); PmcWwInvlRes.wfdetails=conn.Query< NX.ERP.Model.wfdetail> (sql,"" );
var sql2 = @" select b.sheetid,dd.code,dd.name,dd.standard, CONVERT(DECIMAL(13,3),a.Qua) as Qua, CONVERT(DECIMAL(13,3),a.ReceivedQua) as ReceivedQua , CONVERT(DECIMAL(13,3),a.Qua-a.ReceivedQua) as diff var sql2 = @" SELECT [SheetDate]
from [10.0.0.230].wxnx2021.dbo.t_OutSourcing_SendItems a left join ,[SheetID]
[10.0.0.230].wxnx2021.dbo.t_OutSourcing_SendSheet b on a.SID_Sheet= b.SID_Sheet ,[code]
left join [10.0.0.230].wxnx2021.dbo.t_Material dd on dd.SysID=a.materialid ,[Name]
where b.IsChecked =1 and isnull(b.IsDeleted,0)=0 and a.Qua<>a.ReceivedQua ,[Standard]
,[Qua]
,isnull(ReceivedQua,0) as ReceivedQua
, ([Qua]- isnull(ReceivedQua,0)) as diff
FROM [10.0.0.230].[wxnx2021].[dbo].[WX_WWrec]
"; ";

View File

@@ -6,10 +6,10 @@
<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@007" /> <add key="AccId" value="u8@887" />
<add key="UserId" value="wx995" /> <add key="UserId" value="wx999" />
<add key="Password" value="1" /> <add key="Password" value="!@#qwe123" />
<add key="EaiPort" value="80" /> <add key="EaiPort" value="80" />
<add key="EaiPath" value="U8EAI/import.asp" /> <add key="EaiPath" value="U8EAI/import.asp" />
<add key="webpages:Version" value="3.0.0.0" /> <add key="webpages:Version" value="3.0.0.0" />

View File

@@ -0,0 +1,67 @@
<template>
<div id="app">
<Menu mode="horizontal" theme="dark" active-name="1">
<Submenu name="3">
<template slot="title">
<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="/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>
-->
</MenuGroup>
</Submenu>
<!--
<Submenu name="4">
<template slot="title">
<Icon type="ios-stats" />ERP单据
</template>
<MenuGroup title="单据">
<MenuItem to="/inventoryrrival" name="4-2">到货单</MenuItem>
<MenuItem to="/inventoryerror" name="4-3">异常单据查询</MenuItem>
<MenuItem to="/inventoryMaterialAppVouch" name="4-4">领料单查询</MenuItem>
<MenuItem to="/inventorypick" name="4-5">生产领料需求查询</MenuItem>
<MenuItem to="/inventoryQmerror" name="4-5">不良品处理问题单据</MenuItem>
</MenuGroup>
</Submenu>
-->
</Menu>
<div class="contain">
<router-view></router-view>
</div>
</div>
</template>
<script>
export default {
name: "App",
components: {},
methods: {
loadData() {}
}
};
</script>
<style >
#app {
font-family: Avenir, Helvetica, Arial, sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
color: #2c3e50;
}
.contain {
padding: 20px;
}
</style>

View File

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

View File

@@ -48,6 +48,7 @@
<Col span="20"> <Col span="20">
<Modal width="1366" v-model="modal3" title="委外未发详情" @on-cancel="cancel"> <Modal width="1366" v-model="modal3" title="委外未发详情" @on-cancel="cancel">
<Button size="large" type="success" @click="handelExportwf">导出</Button>
<Table <Table
style="margin-top: 20px" style="margin-top: 20px"
height="700" height="700"
@@ -61,6 +62,7 @@
<Col span="20"> <Col span="20">
<Modal width="1366" v-model="modal4" title="委外未收详情" @on-cancel="cancel"> <Modal width="1366" v-model="modal4" title="委外未收详情" @on-cancel="cancel">
<Button size="large" type="success" @click="handelExportws">导出</Button>
<Table <Table
style="margin-top: 20px" style="margin-top: 20px"
height="700" height="700"
@@ -232,11 +234,18 @@ export default {
], ],
columnsDetail3: [ columnsDetail3: [
{
title: "供应商名称",
align: "center",
key: "supplier_name"
}
,
{ {
title: "委外派工单号", title: "委外派工单号",
align: "center", align: "center",
key: "task_item_id" key: "task_item_id"
}, },
{ {
title: "存货编码", title: "存货编码",
align: "center", align: "center",
@@ -253,31 +262,37 @@ export default {
align: "center", align: "center",
key: "standard" key: "standard"
}, },
{
title: "工序名称",
align: "center",
key: "work_name"
},
{ {
title: "计划发料数量", title: "计划发料数量",
align: "center", align: "center",
key: "qua" key: "rec_qua"
} }
, ,
{ {
title: "已发料数量", title: "价格",
align: "center", align: "center",
key: "qty" key: "price"
} }
, // {
{ // title: "未发料数量",
title: "未发料数量", // align: "center",
align: "center", // key: "diff"
key: "diff"
} // }
], ],
columnsDetail4: [ columnsDetail4: [
{ {
title: "委外发料单号", title: "委外发料单号",
align: "center", align: "center",
key: "sheetid" key: "sheet_id"
}, },
{ {
title: "存货编码", title: "存货编码",
@@ -453,6 +468,12 @@ export default {
handelExport() { handelExport() {
export_col_to_excel(this.columns, this.datas); export_col_to_excel(this.columns, this.datas);
}, },
handelExportwf() {
export_col_to_excel(this.columnsDetail3, this.dataDetail3);
},
handelExportws() {
export_col_to_excel(this.columnsDetail4, this.dataDetail4);
},
handleClick() { handleClick() {
this.loadData(); this.loadData();
}, },