增加序列号查询
This commit is contained in:
@@ -64,6 +64,7 @@
|
||||
<Compile Include="BaseModel.cs" />
|
||||
<Compile Include="Request\BinChange.cs" />
|
||||
<Compile Include="Request\Inventoryall.cs" />
|
||||
<Compile Include="Request\SnOrderRequest.cs" />
|
||||
<Compile Include="Request\SaleOrderRequest.cs" />
|
||||
<Compile Include="Response\Pmc\PmcInventoryallRes.cs" />
|
||||
<Compile Include="Response\Store\Stock.cs" />
|
||||
|
||||
29
NX.ERP.Model/Request/SnOrderRequest.cs
Normal file
29
NX.ERP.Model/Request/SnOrderRequest.cs
Normal file
@@ -0,0 +1,29 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace NX.ERP.Model.Request
|
||||
{
|
||||
public class SnOrderRequest
|
||||
{
|
||||
public IEnumerable<string> Cprk { get; set; }
|
||||
|
||||
public IEnumerable<string> Clck { get; set; }
|
||||
|
||||
|
||||
public IEnumerable<string> cInvCodes { get; set; }
|
||||
|
||||
public IEnumerable<string> cInvSN { get; set; }
|
||||
|
||||
|
||||
|
||||
public DateTime? BeginDate { get; set; }
|
||||
public DateTime? EndDate { get; set; }
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@@ -43,6 +43,7 @@
|
||||
<Compile Include="FileHelp.cs" />
|
||||
<Compile Include="FormatHelp.cs" />
|
||||
<Compile Include="Mom\MomOrderDAL.cs" />
|
||||
<Compile Include="Pmc\FinanceQuery.cs" />
|
||||
<Compile Include="Pmc\PmcQuery.cs" />
|
||||
<Compile Include="Purchase\ArrivalDAL.cs" />
|
||||
<Compile Include="Sale\DispatchListDAL.cs" />
|
||||
|
||||
80
NX.ERP.U8/Pmc/FinanceQuery.cs
Normal file
80
NX.ERP.U8/Pmc/FinanceQuery.cs
Normal file
@@ -0,0 +1,80 @@
|
||||
using NX.ERP.U8.Purchase;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using Dapper;
|
||||
|
||||
|
||||
namespace NX.ERP.U8.Finance
|
||||
|
||||
{
|
||||
public class FinanceQuery
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="strWhere"></param>
|
||||
/// <param name="param"></param>
|
||||
/// <returns></returns>
|
||||
|
||||
|
||||
public IEnumerable<object> InventorySNDetail(NX.ERP.Model.Request.SnOrderRequest info1)
|
||||
{
|
||||
string sql = $@"
|
||||
select a.cInvCode,e.cInvName,b.cCode as Cprk, b.dDate as rkrq,c.cWhName,b.cMPoCode,d.cDepName,a.cInvSN,g.cCode as Clck,g.dDate as ckrq,h.cCusAbbName,f.cInvSN as ckcInvSN from ST_SNDetail_PROIN a
|
||||
left join rdrecord10 b on a.iVouchID=b.id
|
||||
left join Warehouse c on b.cWhCode =c.cWhCode
|
||||
left join Department d on b.cDepCode =d.cDepCode
|
||||
left join Inventory e on a.cInvCode=e.cInvCode
|
||||
left join ST_SNDetail_SaleOut f on a.cInvSN= f.cInvSN
|
||||
left join rdrecord32 g on f.iVouchID=g.id
|
||||
left join Customer h on g.cCusCode=h.cCusCode
|
||||
|
||||
";
|
||||
|
||||
|
||||
List<string> where = new List<string>();
|
||||
|
||||
if (info1.cInvCodes != null)
|
||||
{
|
||||
where.Add(" a.cInvCode in @cInvCode");
|
||||
}
|
||||
|
||||
if (info1.Cprk != null)
|
||||
{
|
||||
where.Add(" b.cCode in @Cprk ");
|
||||
}
|
||||
if (info1.Clck != null)
|
||||
{
|
||||
where.Add(" g.cCode in @Clck ");
|
||||
}
|
||||
if (info1.cInvSN != null)
|
||||
{
|
||||
where.Add(" a.cInvSN in @cInvSN ");
|
||||
}
|
||||
|
||||
if (info1.BeginDate != null && info1.EndDate != null)
|
||||
{
|
||||
where.Add(" b.dDate between @beginDate and @endDate ");
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
var aa = string.Join(" and ", where.ToArray());
|
||||
|
||||
if (!string.IsNullOrEmpty(aa))
|
||||
{
|
||||
sql += "where " + aa;
|
||||
}
|
||||
|
||||
using (var conn = NX.ERP.U8.U8LoginContext.Instance.Connection)
|
||||
{
|
||||
return conn.Query<object>(sql, new { cInvCode = info1.cInvCodes, Cprk = info1.Cprk, info1.Clck, info1.cInvSN });
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
25
NX.ERP.WebAPi/Controllers/Pmc/FinanceController.cs
Normal file
25
NX.ERP.WebAPi/Controllers/Pmc/FinanceController.cs
Normal file
@@ -0,0 +1,25 @@
|
||||
using NX.ERP.U8.Purchase;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
|
||||
using System.Web.Http;
|
||||
|
||||
namespace NX.ERP.WebAPi.Controllers
|
||||
{
|
||||
public class FinanceController : ApiController
|
||||
{
|
||||
[HttpPost]
|
||||
[Route("api/Finance/InventorySNDetail")]
|
||||
public IEnumerable<object> Inventorysocode(NX.ERP.Model.Request.SnOrderRequest info)
|
||||
{
|
||||
var FinanceQuery = new NX.ERP.U8.Finance.FinanceQuery();
|
||||
return FinanceQuery.InventorySNDetail(info);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@@ -157,6 +157,7 @@
|
||||
<Compile Include="App_Start\SwaggerConfig.cs" />
|
||||
<Compile Include="App_Start\WebApiConfig.cs" />
|
||||
<Compile Include="Controllers\MOM\MomOrderController.cs" />
|
||||
<Compile Include="Controllers\Pmc\FinanceController.cs" />
|
||||
<Compile Include="Controllers\Pmc\PmcController.cs" />
|
||||
<Compile Include="Controllers\Purchase\ArrivalController.cs" />
|
||||
<Compile Include="Controllers\Base\HomeController.cs" />
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
<MenuItem to="/inventoryMom" name="3-3">跟单记录表</MenuItem>
|
||||
<MenuItem to="/InventoryMonth" name="3-4">材料出库数据与品种</MenuItem>
|
||||
<MenuItem to="/InventorySo" name="3-5">销售订单表</MenuItem>
|
||||
<MenuItem to="/inventory-SNDetail" name="3-6">序列号查询</MenuItem>
|
||||
</MenuGroup>
|
||||
</Submenu>
|
||||
</Menu>
|
||||
|
||||
7
NX.ERP.Webapp/src/api/Finance.js
Normal file
7
NX.ERP.Webapp/src/api/Finance.js
Normal file
@@ -0,0 +1,7 @@
|
||||
import axios from 'axios'
|
||||
|
||||
|
||||
export const InventorySNDetail = (info) => {
|
||||
return axios.post('/api/Finance/InventorySNDetail', info)
|
||||
}
|
||||
|
||||
@@ -3,6 +3,7 @@ import Inventory from '@/views/inventory.vue'
|
||||
import InventoryMom from '@/views/inventory-mom.vue'
|
||||
import InventoryMonth from '@/views/inventory-month.vue'
|
||||
import InventorySo from '@/views/inventory-so.vue'
|
||||
import inventorySNDetail from '@/views/inventory-SNDetail.vue'
|
||||
export default [
|
||||
{
|
||||
path: '/',
|
||||
@@ -13,5 +14,6 @@ export default [
|
||||
{ path: '/inventory', component: Inventory },
|
||||
{ path: '/InventoryMom', component: InventoryMom },
|
||||
{ path: '/InventoryMonth', component: InventoryMonth },
|
||||
{ path: '/inventory-SNDetail', component: inventorySNDetail },
|
||||
{ path: '/InventorySo', component: InventorySo }
|
||||
]
|
||||
|
||||
254
NX.ERP.Webapp/src/views/inventory-SNDetail.vue
Normal file
254
NX.ERP.Webapp/src/views/inventory-SNDetail.vue
Normal file
@@ -0,0 +1,254 @@
|
||||
<template>
|
||||
<div>
|
||||
<h4>序列号查询</h4>
|
||||
<div>
|
||||
<Row :gutter="16">
|
||||
<Col span="4">
|
||||
<label>产品入库订单编号</label>
|
||||
<Input v-model="filter.cprk" />
|
||||
</Col>
|
||||
<Col span="4">
|
||||
<label>销售出库订单编号</label>
|
||||
<Input v-model="filter.clck" />
|
||||
</Col>
|
||||
|
||||
<Col span="4">
|
||||
<label>物料编号</label>
|
||||
<Input autosize type="textarea" v-model="filter.c_inv_codes" />
|
||||
</Col>
|
||||
|
||||
<Col span="4">
|
||||
<label>序列号</label>
|
||||
<Input autosize type="textarea" v-model="filter.c_inv_sn" />
|
||||
</Col>
|
||||
|
||||
<Col span="4">
|
||||
<Button
|
||||
size="large"
|
||||
type="primary"
|
||||
icon="ios-search"
|
||||
@click="handleClick"
|
||||
>查询</Button
|
||||
>
|
||||
<Button size="large" type="success" @click="handelExport"
|
||||
>导出</Button
|
||||
>
|
||||
</Col>
|
||||
</Row>
|
||||
</div>
|
||||
|
||||
<Table
|
||||
style="margin-top: 20px"
|
||||
size="small"
|
||||
border
|
||||
:columns="columns"
|
||||
:data="pagedData"
|
||||
>
|
||||
</Table>
|
||||
|
||||
<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"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { InventorySNDetail } from "@/api/Finance";
|
||||
import {
|
||||
pageingData,
|
||||
export_col_to_excel,
|
||||
dateFormatFull,
|
||||
dateFormat,
|
||||
sortByKey,
|
||||
} from "@/libs/tools";
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
PageSizeOpts: [10, 15, 20, 30],
|
||||
pageNo: 1,
|
||||
strfilter: "",
|
||||
multiple: false,
|
||||
pageSize: 15,
|
||||
datas: [],
|
||||
filter: {
|
||||
cprk: "",
|
||||
clck: "",
|
||||
c_inv_codes: "",
|
||||
c_inv_sn: "",
|
||||
dates: [],
|
||||
},
|
||||
columns: [
|
||||
{
|
||||
title: "存货编码",
|
||||
align: "center",
|
||||
key: "cInvCode",
|
||||
},
|
||||
{
|
||||
title: "存货名称",
|
||||
align: "center",
|
||||
key: "cInvName",
|
||||
},
|
||||
{
|
||||
title: "入库单号",
|
||||
align: "center",
|
||||
key: "Cprk",
|
||||
className: "demo-table-info-new",
|
||||
},
|
||||
{
|
||||
title: "入库日期",
|
||||
align: "center",
|
||||
key: "rkrq",
|
||||
render: (h, params) => {
|
||||
return <div> {dateFormat(params.row.rkrq)} </div>;
|
||||
},
|
||||
},
|
||||
{
|
||||
title: "仓库",
|
||||
align: "center",
|
||||
key: "cWhName",
|
||||
},
|
||||
{
|
||||
title: "生产订单号",
|
||||
align: "center",
|
||||
key: "cMPoCode",
|
||||
},
|
||||
{
|
||||
title: "生产部门",
|
||||
align: "center",
|
||||
key: "cDepName",
|
||||
},
|
||||
{
|
||||
title: "入库序列号",
|
||||
align: "center",
|
||||
key: "cInvSN",
|
||||
},
|
||||
{
|
||||
title: "出库库单号",
|
||||
align: "center",
|
||||
key: "Clck",
|
||||
className: "demo-table-info-old",
|
||||
},
|
||||
{
|
||||
title: "出库日期",
|
||||
align: "center",
|
||||
key: "ckrq",
|
||||
render: (h, params) => {
|
||||
return <div> {dateFormat(params.row.ckrq)} </div>;
|
||||
},
|
||||
},
|
||||
{
|
||||
title: "客户",
|
||||
align: "center",
|
||||
key: "cCusAbbName",
|
||||
},
|
||||
|
||||
{
|
||||
title: "出库库序列号",
|
||||
align: "center",
|
||||
key: "ckcInvSN",
|
||||
},
|
||||
],
|
||||
};
|
||||
},
|
||||
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.columns, this.datas);
|
||||
},
|
||||
handleClick() {
|
||||
this.loadData();
|
||||
},
|
||||
async loadData() {
|
||||
let _filert = {
|
||||
cprk:
|
||||
this.filter.cprk !== "" ? this.filter.cprk.split(/[,\s\n,]/) : null,
|
||||
clck:
|
||||
this.filter.clck !== "" ? this.filter.clck.split(/[,\s\n,]/) : null,
|
||||
c_inv_codes:
|
||||
this.filter.c_inv_codes !== ""
|
||||
? this.filter.c_inv_codes.split(/[,\s\n,]/)
|
||||
: null,
|
||||
c_inv_sn:
|
||||
this.filter.c_inv_sn !== ""
|
||||
? this.filter.c_inv_sn.split(/[,\s\n,]/)
|
||||
: null,
|
||||
};
|
||||
let resp = await InventorySNDetail(_filert);
|
||||
this.pageNo = 1;
|
||||
this.datas = resp.data.data;
|
||||
this.datas = sortByKey(resp.data.data, "Cprk");
|
||||
},
|
||||
|
||||
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;
|
||||
}
|
||||
.ivu-table td.demo-table-info-ex {
|
||||
color: #187;
|
||||
font-weight: 600;
|
||||
}
|
||||
body {
|
||||
padding: 10px 1;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user