This commit is contained in:
gongxh
2021-05-24 11:13:01 +08:00
5 changed files with 163 additions and 50 deletions

View File

@@ -37,6 +37,16 @@ namespace NX.ERP.Model
private double q; private double q;
private string st; 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>
/// ///
/// </summary> /// </summary>

View File

@@ -128,15 +128,17 @@ namespace NX.ERP.U8.Pmc
string sql = $@" string sql = $@"
select *from ( 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.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 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, std,dtyl.dtty, ma.Qty qty1, ma.IssQty issqty,(ma.Qty-ma.IssQty) as wll,mdsss.mdqty,shwl.shwl,sdwl.sdwl
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) ,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) - ISNULL(MX.MQTY, 0) AS q, motype.description, 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 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 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 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
@@ -155,6 +157,29 @@ SELECT m..mocode, md.SortSeq, md.InvCode, p.cInvName, p.cInvStd,KK.cComUnitNam
WHERE md.Status <> 4 WHERE md.Status <> 4
GROUP BY ma.InvCode) mdsss ON ma.InvCode = mdsss.InvCode LEFT JOIN 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 (SELECT ma.invcode, SUM( isnull(issqty, 0)) issqty
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
@@ -216,15 +241,17 @@ SELECT m..mocode, md.SortSeq, md.InvCode, p.cInvName, p.cInvStd,KK.cComUnitNam
sql = $@" sql = $@"
select *from ( 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.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 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, std,dtyl.dtty, ma.Qty qty1, ma.IssQty issqty,(ma.Qty-ma.IssQty) as wll,mdsss.mdqty,shwl.shwl,sdwl.sdwl
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) ,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) - ISNULL(MX.MQTY, 0) AS q, motype.description, 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 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 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 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
@@ -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 WHERE md.Status <> 4 and mom.mocode in @moCodes
GROUP BY ma.InvCode) mdsss ON ma.InvCode = mdsss.InvCode LEFT JOIN 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 (SELECT ma.invcode, SUM( isnull(issqty, 0)) issqty
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
@@ -551,7 +602,7 @@ SELECT m..mocode, md.SortSeq, md.InvCode, p.cInvName, p.cInvStd,KK.cComUnitNam
{ {
string sql = $@" string sql = $@"
Select cpoid,CONVERT(varchar(100),dpodate, 23) as dpodate,zpurpoheader.cvenabbname,zpurpotail.cinvcode,zpurpotail.cinvname,zpurpotail.cinvstd,zpurpotail.cinvm_unit,zpurpotail.ireceivedqty, 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, 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 zpurpotail.cbcloser,zpurpoheader.ccloser
From zpurpoheader with(nolock) inner join zpurpotail with(nolock) on zpurpoheader.poid=zpurpotail.poid 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 left join pu_appbody c with(nolock) on zpurpotail.iAppIds =c.autoid
@@ -571,6 +622,8 @@ SELECT m..mocode, md.SortSeq, md.InvCode, p.cInvName, p.cInvStd,KK.cComUnitNam
GROUP BY cInvCode) prd ON zpurpotail.cinvcode = prd.CINVCODE GROUP BY cInvCode) prd ON zpurpotail.cinvcode = prd.CINVCODE
"; ";

View File

@@ -1,16 +1,36 @@
<template> <template>
<div> <Row>
首页 <div class="wrapper">
<h4>
<Icon type="heart"></Icon>&nbsp;save
</h4>
</div> </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> </template>
<script> <script>
export default { export default {
name:"Index" 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> </script>
<style>
</style>

View File

@@ -192,16 +192,10 @@ export default {
{ {
title: "未完成量", title: "未完成量",
align: "center", align: "center",
key: "wwc",
fixed: "left", fixed: "left",
width: 95, width: 95,
render: (h, params) => {
return (
<span>
{numberFormat(params.row.qty - params.row.qualified_in_qty)}
</span>
);
},
}, },
{ {
title: "状态", title: "状态",
@@ -245,27 +239,29 @@ export default {
width: 100, width: 100,
}, },
{ {
title: "单行需求", title: "单台用量",
align: "center",
key: "dtty",
width: 110,
},
{
title: "应领量",
align: "center", align: "center",
key: "qty1", key: "qty1",
width: 110, width: 110,
}, },
{ {
title: "单行已领", title: "已领",
align: "center", align: "center",
key: "issqty", key: "issqty",
width: 110, width: 110,
}, },
{ {
title: "单行未领", title: "未领",
align: "center", align: "center",
key: "wll",
width: 110, width: 110,
render: (h, params) => {
return (
<span>{numberFormat(params.row.qty1 - params.row.issqty)}</span>
);
},
}, },
{ {
title: "条件内未领", title: "条件内未领",
@@ -274,6 +270,20 @@ export default {
width: 110, width: 110,
key: "mdqty", key: "mdqty",
}, },
{
title: "锁定",
align: "center",
width: 110,
key: "sdwl",
},
{
title: "审核",
align: "center",
width: 110,
key: "shwl",
},
{ {
title: "总未领量", title: "总未领量",
align: "center", align: "center",
@@ -293,12 +303,7 @@ export default {
width: 100, width: 100,
}, },
{
title: "现存无废品",
align: "center",
key: "dqty",
width: 110,
},
{ {
title: "采购在途", title: "采购在途",
align: "center", align: "center",
@@ -323,6 +328,30 @@ export default {
key: "momqty", key: "momqty",
width: 90, 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,
},
], ],
}; };
}, },

View File

@@ -167,6 +167,7 @@ export default {
key: "rqty", key: "rqty",
width: 100, width: 100,
}, },
{ {
title: "预计到货日期", title: "预计到货日期",
align: "center", align: "center",