1
This commit is contained in:
@@ -37,6 +37,16 @@ namespace NX.ERP.Model
|
||||
private double q;
|
||||
private string st;
|
||||
|
||||
public double wwc { get; set; }
|
||||
public string StartDate { get; set; }
|
||||
public string DueDate { get; set; }
|
||||
public string jandete { get; set; }
|
||||
public double dtty { get; set; }
|
||||
public double wll { get; set; }
|
||||
|
||||
public double shwl { get; set; }
|
||||
public double sdwl { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
|
||||
@@ -128,15 +128,17 @@ namespace NX.ERP.U8.Pmc
|
||||
string sql = $@"
|
||||
select *from (
|
||||
|
||||
SELECT m..mocode, md.SortSeq, md.InvCode, p.cInvName, p.cInvStd,KK.cComUnitName, md.Qty, md.QualifiedInQty, ma.InvCode invcode1,
|
||||
SELECT m..mocode,CONVERT(varchar(100), mor.StartDate, 23) as StartDate ,CONVERT(varchar(100), mor.DueDate, 23) as DueDate ,DATEDIFF(day,GETDATE(),mor.DueDate) AS jandete , md.SortSeq, md.InvCode, p.cInvName, p.cInvStd,KK.cComUnitName, md.Qty, md.QualifiedInQty,(md.Qty-md.QualifiedInQty) as wwc, ma.InvCode invcode1,
|
||||
c.cInvName cinvname1, c.cInvStd cinvstd1,LL.cComUnitName as cComUnitName1, CASE WHEN c.bPurchase = 1 AND
|
||||
c.bProxyForeign = 1 THEN '委外' WHEN c.bPurchase = 1 THEN '外购' WHEN c.bself = 1 THEN '自制' ELSE '其它' END AS
|
||||
std, ma.Qty qty1, ma.IssQty issqty,mdsss.mdqty, 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, mas.wqty - isnull(cs.qty, 0) - ISNULL(prd.Rqty, 0)
|
||||
- ISNULL(omm.RQTY1, 0) - ISNULL(MX.MQTY, 0) AS q, motype.description,
|
||||
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, 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
|
||||
mom_orderdetail md WITH (NOLOCK) ON m.MoId = md.MoId INNER JOIN
|
||||
mom_orderdetail md WITH (NOLOCK) ON m.MoId = md.MoId INNER JOIN
|
||||
mom_morder mor WITH (NOLOCK) ON md.MoDId = mor.MoDId INNER JOIN
|
||||
mom_moallocate ma WITH (NOLOCK) ON md.MoDId = ma.MoDId
|
||||
left JOIN
|
||||
mom_motype motype WITH (NOLOCK) ON motype.MoTypeId = md.MoTypeId
|
||||
@@ -155,6 +157,29 @@ SELECT m..mocode, md.SortSeq, md.InvCode, p.cInvName, p.cInvStd,KK.cComUnitNam
|
||||
WHERE md.Status <> 4
|
||||
GROUP BY ma.InvCode) mdsss ON ma.InvCode = mdsss.InvCode LEFT JOIN
|
||||
|
||||
(SELECT ma.invcode,SUM(isnull(ma.qty, 0) - isnull(issqty, 0)) sdwl
|
||||
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
|
||||
|
||||
WHERE md.Status = 2
|
||||
GROUP BY ma.InvCode) sdwl ON ma.InvCode = sdwl.InvCode LEFT JOIN
|
||||
|
||||
(SELECT ma.invcode,SUM(isnull(ma.qty, 0) - isnull(issqty, 0)) shwl
|
||||
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
|
||||
|
||||
WHERE md.Status = 3
|
||||
GROUP BY ma.InvCode) shwl ON ma.InvCode = shwl.InvCode LEFT JOIN
|
||||
|
||||
|
||||
(SELECT mom.MoCode, ma.invcode,SUM(isnull(ma.qty, 0)) 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
|
||||
|
||||
(SELECT ma.invcode, SUM( isnull(issqty, 0)) issqty
|
||||
FROM mom_moallocate ma WITH (NOLOCK) INNER JOIN
|
||||
mom_orderdetail md WITH (NOLOCK) ON ma.MoDId = md.MoDId
|
||||
@@ -216,18 +241,20 @@ SELECT m..mocode, md.SortSeq, md.InvCode, p.cInvName, p.cInvStd,KK.cComUnitNam
|
||||
sql = $@"
|
||||
select *from (
|
||||
|
||||
SELECT m..mocode, md.SortSeq, md.InvCode, p.cInvName, p.cInvStd,KK.cComUnitName, md.Qty, md.QualifiedInQty, ma.InvCode invcode1,
|
||||
SELECT m..mocode,CONVERT(varchar(100), mor.StartDate, 23) as StartDate ,CONVERT(varchar(100), mor.DueDate, 23) as DueDate ,DATEDIFF(day,GETDATE(),mor.DueDate) AS jandete , md.SortSeq, md.InvCode, p.cInvName, p.cInvStd,KK.cComUnitName, md.Qty, md.QualifiedInQty,(md.Qty-md.QualifiedInQty) as wwc, ma.InvCode invcode1,
|
||||
c.cInvName cinvname1, c.cInvStd cinvstd1,LL.cComUnitName as cComUnitName1, CASE WHEN c.bPurchase = 1 AND
|
||||
c.bProxyForeign = 1 THEN '委外' WHEN c.bPurchase = 1 THEN '外购' WHEN c.bself = 1 THEN '自制' ELSE '其它' END AS
|
||||
std, ma.Qty qty1, ma.IssQty issqty,mdsss.mdqty, 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, mas.wqty - isnull(cs.qty, 0) - ISNULL(prd.Rqty, 0)
|
||||
- ISNULL(omm.RQTY1, 0) - ISNULL(MX.MQTY, 0) AS q, motype.description,
|
||||
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, 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
|
||||
mom_orderdetail md WITH (NOLOCK) ON m.MoId = md.MoId INNER JOIN
|
||||
mom_orderdetail md WITH (NOLOCK) ON m.MoId = md.MoId INNER JOIN
|
||||
mom_morder mor WITH (NOLOCK) ON md.MoDId = mor.MoDId INNER JOIN
|
||||
mom_moallocate ma WITH (NOLOCK) ON md.MoDId = ma.MoDId
|
||||
left JOIN
|
||||
mom_motype motype WITH (NOLOCK) ON motype.MoTypeId = md.MoTypeId
|
||||
mom_motype motype WITH (NOLOCK) ON motype.MoTypeId = md.MoTypeId
|
||||
INNER JOIN
|
||||
(SELECT ma.invcode, SUM(isnull(ma.qty, 0) - isnull(issqty, 0)) wqty
|
||||
FROM mom_moallocate ma WITH (NOLOCK) INNER JOIN
|
||||
@@ -243,6 +270,30 @@ SELECT m..mocode, md.SortSeq, md.InvCode, p.cInvName, p.cInvStd,KK.cComUnitNam
|
||||
WHERE md.Status <> 4 and mom.mocode in @moCodes
|
||||
GROUP BY ma.InvCode) mdsss ON ma.InvCode = mdsss.InvCode LEFT JOIN
|
||||
|
||||
|
||||
(SELECT ma.invcode,SUM(isnull(ma.qty, 0) - isnull(issqty, 0)) sdwl
|
||||
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
|
||||
|
||||
WHERE md.Status = 2
|
||||
GROUP BY ma.InvCode) sdwl ON ma.InvCode = sdwl.InvCode LEFT JOIN
|
||||
|
||||
(SELECT ma.invcode,SUM(isnull(ma.qty, 0) - isnull(issqty, 0)) shwl
|
||||
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
|
||||
|
||||
WHERE md.Status = 3
|
||||
GROUP BY ma.InvCode) shwl ON ma.InvCode = shwl.InvCode LEFT JOIN
|
||||
|
||||
|
||||
(SELECT mom.MoCode, ma.invcode,SUM(isnull(ma.qty, 0)) 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
|
||||
|
||||
(SELECT ma.invcode, SUM( isnull(issqty, 0)) issqty
|
||||
FROM mom_moallocate ma WITH (NOLOCK) INNER JOIN
|
||||
mom_orderdetail md WITH (NOLOCK) ON ma.MoDId = md.MoDId
|
||||
@@ -335,7 +386,7 @@ SELECT m..mocode, md.SortSeq, md.InvCode, p.cInvName, p.cInvStd,KK.cComUnitNam
|
||||
|
||||
|
||||
|
||||
using (var conn = NX.ERP.U8.U8LoginContext.Instance.Connection)
|
||||
using (var conn = NX.ERP.U8.U8LoginContext.Instance.Connection )
|
||||
{
|
||||
return conn.Query<NX.ERP.Model.PmcInventorymomRes>(sql, new { moCodes = info.moCodes, invcode = info.InvCodes, invcode1=info.InvCodes1, info.byFinish });
|
||||
}
|
||||
@@ -550,8 +601,8 @@ SELECT m..mocode, md.SortSeq, md.InvCode, p.cInvName, p.cInvStd,KK.cComUnitNam
|
||||
public IEnumerable<object> InventoryPo(NX.ERP.Model.Request.PoOrderRequest info1)
|
||||
{
|
||||
string sql = $@"
|
||||
Select cpoid,CONVERT(varchar(100),dpodate, 23) as dpodate,zpurpoheader.cvenabbname,zpurpotail.cinvcode,zpurpotail.cinvname,zpurpotail.cinvstd,zpurpotail.cinvm_unit,zpurpotail.ireceivedqty,
|
||||
iquantity,prd.rqty,CONVERT(varchar(100), zpurpotail.darrivedate, 23) as darrivedate,cupsocode, CONVERT(varchar(100), d.ddate, 23) as ddate, CONVERT(varchar(100), c.drequirdate, 23) as drequirdate,
|
||||
Select cpoid,CONVERT(varchar(100),dpodate, 23) as dpodate,zpurpoheader.cvenabbname,zpurpotail.cinvcode,zpurpotail.cinvname,zpurpotail.cinvstd,zpurpotail.cinvm_unit,zpurpotail.ireceivedqty,
|
||||
zpurpotail.iquantity,prd.rqty,CONVERT(varchar(100), zpurpotail.darrivedate, 23) as darrivedate,cupsocode, CONVERT(varchar(100), d.ddate, 23) as ddate, CONVERT(varchar(100), c.drequirdate, 23) as drequirdate,
|
||||
zpurpotail.cbcloser,zpurpoheader.ccloser
|
||||
From zpurpoheader with(nolock) inner join zpurpotail with(nolock) on zpurpoheader.poid=zpurpotail.poid
|
||||
left join pu_appbody c with(nolock) on zpurpotail.iAppIds =c.autoid
|
||||
@@ -570,6 +621,8 @@ SELECT m..mocode, md.SortSeq, md.InvCode, p.cInvName, p.cInvStd,KK.cComUnitNam
|
||||
pds.iQuantity - ISNULL(rds.qty, 0) > 0) x
|
||||
GROUP BY cInvCode) prd ON zpurpotail.cinvcode = prd.CINVCODE
|
||||
|
||||
|
||||
|
||||
|
||||
";
|
||||
|
||||
|
||||
@@ -1,16 +1,36 @@
|
||||
<template>
|
||||
<div>
|
||||
首页
|
||||
</div>
|
||||
<Row>
|
||||
<div class="wrapper">
|
||||
<h4>
|
||||
<Icon type="heart"></Icon> save
|
||||
</h4>
|
||||
</div>
|
||||
<div class="wrapper">
|
||||
<Input v-model="value1" @on-change="value1Change"></Input>
|
||||
</div>
|
||||
<div class="wrapper">
|
||||
<Input v-model="value2" @on-change="value2Change"></Input>
|
||||
</div>
|
||||
</Row>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name:"Index"
|
||||
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
|
||||
</style>
|
||||
export default {
|
||||
name: 'add',
|
||||
data() {
|
||||
return {
|
||||
value1:'',
|
||||
value2:''
|
||||
}
|
||||
},
|
||||
methods:{
|
||||
value1Change:function() {
|
||||
var obj = this
|
||||
this.$emit('value1', obj.value1)
|
||||
},
|
||||
value2Change:function() {
|
||||
var obj = this
|
||||
this.$emit('value2', obj.value2)
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -192,16 +192,10 @@ export default {
|
||||
{
|
||||
title: "未完成量",
|
||||
align: "center",
|
||||
|
||||
key: "wwc",
|
||||
fixed: "left",
|
||||
width: 95,
|
||||
render: (h, params) => {
|
||||
return (
|
||||
<span>
|
||||
{numberFormat(params.row.qty - params.row.qualified_in_qty)}
|
||||
</span>
|
||||
);
|
||||
},
|
||||
|
||||
},
|
||||
{
|
||||
title: "状态",
|
||||
@@ -245,27 +239,29 @@ export default {
|
||||
width: 100,
|
||||
},
|
||||
{
|
||||
title: "单行需求",
|
||||
title: "单台用量",
|
||||
align: "center",
|
||||
key: "dtty",
|
||||
width: 110,
|
||||
},
|
||||
{
|
||||
title: "应领量",
|
||||
align: "center",
|
||||
key: "qty1",
|
||||
width: 110,
|
||||
},
|
||||
{
|
||||
title: "单行已领",
|
||||
title: "已领",
|
||||
align: "center",
|
||||
key: "issqty",
|
||||
width: 110,
|
||||
},
|
||||
{
|
||||
title: "单行未领",
|
||||
title: "未领",
|
||||
align: "center",
|
||||
|
||||
key: "wll",
|
||||
width: 110,
|
||||
render: (h, params) => {
|
||||
return (
|
||||
<span>{numberFormat(params.row.qty1 - params.row.issqty)}</span>
|
||||
);
|
||||
},
|
||||
|
||||
},
|
||||
{
|
||||
title: "条件内未领",
|
||||
@@ -274,6 +270,20 @@ export default {
|
||||
width: 110,
|
||||
key: "mdqty",
|
||||
},
|
||||
{
|
||||
title: "锁定",
|
||||
align: "center",
|
||||
|
||||
width: 110,
|
||||
key: "sdwl",
|
||||
},
|
||||
{
|
||||
title: "审核",
|
||||
align: "center",
|
||||
|
||||
width: 110,
|
||||
key: "shwl",
|
||||
},
|
||||
{
|
||||
title: "总未领量",
|
||||
align: "center",
|
||||
@@ -293,12 +303,7 @@ export default {
|
||||
width: 100,
|
||||
},
|
||||
|
||||
{
|
||||
title: "现存无废品",
|
||||
align: "center",
|
||||
key: "dqty",
|
||||
width: 110,
|
||||
},
|
||||
|
||||
{
|
||||
title: "采购在途",
|
||||
align: "center",
|
||||
@@ -323,6 +328,30 @@ export default {
|
||||
key: "momqty",
|
||||
width: 90,
|
||||
},
|
||||
{
|
||||
title: "净存",
|
||||
align: "center",
|
||||
key: "q",
|
||||
width: 90,
|
||||
},
|
||||
{
|
||||
title: "计划开工",
|
||||
align: "center",
|
||||
key: "start_date",
|
||||
width: 100,
|
||||
},
|
||||
{
|
||||
title: "计划开工",
|
||||
align: "center",
|
||||
key: "due_date",
|
||||
width: 100,
|
||||
},
|
||||
{
|
||||
title: "结案天数",
|
||||
align: "center",
|
||||
key: "jandete",
|
||||
width: 90,
|
||||
},
|
||||
],
|
||||
};
|
||||
},
|
||||
|
||||
@@ -167,6 +167,7 @@ export default {
|
||||
key: "rqty",
|
||||
width: 100,
|
||||
},
|
||||
|
||||
{
|
||||
title: "预计到货日期",
|
||||
align: "center",
|
||||
|
||||
Reference in New Issue
Block a user