领料申请数据查询
This commit is contained in:
@@ -89,6 +89,7 @@
|
||||
<Compile Include="Response\Pmc\PmcInventorymomRes.cs" />
|
||||
<Compile Include="Response\Store\MaterialApp.cs" />
|
||||
<Compile Include="Response\Store\BinStock.cs" />
|
||||
<Compile Include="Response\Store\MaterialAppVouchAndPostName.cs" />
|
||||
<Compile Include="Response\Store\Stock.cs" />
|
||||
<Compile Include="TimestampConverter.cs" />
|
||||
<Compile Include="Request\Arrival.cs" />
|
||||
|
||||
76
NX.ERP.Model/Response/Store/MaterialAppVouchAndPostName.cs
Normal file
76
NX.ERP.Model/Response/Store/MaterialAppVouchAndPostName.cs
Normal file
@@ -0,0 +1,76 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace NX.ERP.Model.Response.Store
|
||||
{
|
||||
public class MaterialAppVouchAndPostName
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// 领料单号
|
||||
/// </summary>
|
||||
public string AppVouchOrderNo { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 物料编码
|
||||
/// </summary>
|
||||
public string MaterialCode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 物料名称
|
||||
/// </summary>
|
||||
public string MaterialName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 物料规格
|
||||
/// </summary>
|
||||
public string MaterialSpec { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 单位
|
||||
/// </summary>
|
||||
public string Unit { get; set; }
|
||||
|
||||
public decimal Quantit { get; set; }
|
||||
/// <summary>
|
||||
/// 需求日期
|
||||
/// </summary>
|
||||
public string DemandDate { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 仓库名称
|
||||
/// </summary>
|
||||
public string WarehouseName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 生产单号
|
||||
/// </summary>
|
||||
public string ProductOrderNo { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 生产单行号
|
||||
/// </summary>
|
||||
public string ProductOrderLineNo { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 产品编码
|
||||
/// </summary>
|
||||
public string ProductCode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 产品名称
|
||||
/// </summary>
|
||||
public string ProductName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 产品规格
|
||||
/// </summary>
|
||||
public string ProductSpec { get; set; }
|
||||
/// <summary>
|
||||
/// 库位
|
||||
/// </summary>
|
||||
public string Position { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -45,7 +45,7 @@ namespace NX.ERP.U8.Store
|
||||
headXml.setAttribute("cDepCode", param.DepCode);
|
||||
headXml.setAttribute("cMaker", param.Maker);
|
||||
headXml.setAttribute("cPersonCode", param.PersonCode);
|
||||
Model.MOM.MomOrder Order = null;
|
||||
Model.MOM.MomOrder Order = null;
|
||||
if (param.source == "生产订单")
|
||||
{
|
||||
Order = new Mom.MomOrderDAL().GetModel(param.SourceCode);
|
||||
@@ -251,5 +251,102 @@ FROM MaterialAppVouch a
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 根据领料单号查询 带库位
|
||||
/// </summary>
|
||||
/// <param name="Code"></param>
|
||||
/// <returns></returns>
|
||||
public IEnumerable<Model.Response.Store.MaterialAppVouchAndPostName> GetModelAndPost(string OrderCode)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(OrderCode))
|
||||
{
|
||||
return this.GetListAndPost(" a.cCode=@OrderCode", new { OrderCode });
|
||||
}
|
||||
else
|
||||
{
|
||||
return this.GetListAndPost();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查询领料信息 带库位
|
||||
/// </summary>
|
||||
/// <param name="strWhere"></param>
|
||||
/// <param name="Params"></param>
|
||||
/// <returns></returns>
|
||||
public IEnumerable<Model.Response.Store.MaterialAppVouchAndPostName> GetListAndPost(string strWhere = null, object Params = null)
|
||||
{
|
||||
var strSQL = @"SELECT
|
||||
MA.cCode AS AppVouchOrderNo,--领料申请单号
|
||||
MAS.cInvCode MaterialCode,--物料编码
|
||||
INV.cInvName MaterialName,--物料名称
|
||||
INV.cInvStd MaterialSpec,--物料规格
|
||||
UNT.cComUnitName Unit,--单位
|
||||
MAS.iQuantity Qty,--数量
|
||||
CONVERT(varchar(100), MA.dDate, 23) DemandDate,--需求日期
|
||||
wh.cWhName WarehouseName,--仓库名称
|
||||
MAS.cpesocode ProductOrderNo,--生产单号
|
||||
MAS.ipesoseq ProductOrderLineNo,--生产单行号
|
||||
MAS.invcode ProductCode,--产品编码,
|
||||
PDT.cInvName ProductName,--产品名称
|
||||
PDT.cInvStd ProductSpec,--产品规格
|
||||
POST.cPosName [Position]--库位
|
||||
|
||||
FROM
|
||||
MaterialAppVouch MA
|
||||
LEFT JOIN MaterialAppVouchs MAS ON MA.ID = MAS.ID
|
||||
LEFT JOIN Inventory INV ON MAS.cInvCode = INV.cInvCode
|
||||
LEFT JOIN Warehouse wh ON WH.cwhcode = MAS.cwhcode
|
||||
LEFT JOIN ComputationUnit UNT ON INV.ccomunitcode = UNT.ccomunitcode
|
||||
LEFT JOIN Inventory PDT ON MAS.invcode = PDT.cInvCode
|
||||
LEFT JOIN (
|
||||
SELECT
|
||||
cinvcode,
|
||||
STUFF(
|
||||
(
|
||||
SELECT
|
||||
',' + cPosName
|
||||
FROM
|
||||
(
|
||||
SELECT
|
||||
b.cPosName,
|
||||
a.cInvCode,
|
||||
a.iQuantity
|
||||
FROM
|
||||
InvPositionSum a WITH ( NOLOCK ),
|
||||
POSITION b WITH ( NOLOCK )
|
||||
WHERE
|
||||
a.iQuantity <> 0
|
||||
AND a.cPosCode= b.cPosCode
|
||||
) a
|
||||
WHERE
|
||||
b.cinvcode = a.cinvcode
|
||||
ORDER BY
|
||||
a.iQuantity DESC FOR XML PATH ( '' )
|
||||
),
|
||||
1,
|
||||
1,
|
||||
''
|
||||
) cPosName
|
||||
FROM
|
||||
InvPositionSum b
|
||||
GROUP BY
|
||||
cinvcode
|
||||
) AS post ON INV.cinvcode = post.cinvcode
|
||||
WHERE MAS.iQuantity > ISNULL(MAS.foutquantity,0)
|
||||
";
|
||||
if (!string.IsNullOrEmpty(strWhere))
|
||||
{
|
||||
strSQL += $" AND {strWhere} ";
|
||||
}
|
||||
using (var conn = U8LoginContext.Instance.Connection)
|
||||
{
|
||||
var list = conn.Query<Model.Response.Store.MaterialAppVouchAndPostName>(strSQL, Params);
|
||||
return list;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -45,6 +45,15 @@ namespace NX.ERP.WebAPi.Controllers.Store
|
||||
}
|
||||
|
||||
|
||||
[Route("api/MaterialApp/ListAndPost")]
|
||||
[HttpGet]
|
||||
public IEnumerable<Model.Response.Store.MaterialAppVouchAndPostName> GetModelAndPost(string Code = "")
|
||||
{
|
||||
var dal = new NX.ERP.U8.Store.MaterialAppDAL();
|
||||
return dal.GetModelAndPost(Code);
|
||||
}
|
||||
|
||||
|
||||
[Obsolete]
|
||||
[Route("api/MaterialApp/ListByMoCode")]
|
||||
[HttpGet]
|
||||
|
||||
160
NX.ERP.Webapp/package-lock.json
generated
160
NX.ERP.Webapp/package-lock.json
generated
@@ -2194,6 +2194,63 @@
|
||||
"integrity": "sha1-/q7SVZc9LndVW4PbwIhRpsY1IPo=",
|
||||
"dev": true
|
||||
},
|
||||
"ansi-styles": {
|
||||
"version": "4.3.0",
|
||||
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
|
||||
"integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"color-convert": "^2.0.1"
|
||||
}
|
||||
},
|
||||
"chalk": {
|
||||
"version": "4.1.1",
|
||||
"resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.1.tgz",
|
||||
"integrity": "sha512-diHzdDKxcU+bAsUboHLPEDQiw0qEe0qd7SYUn3HgcFlWgbDcfLGswOHYeGrHKzG9z6UYf01d9VFMfZxPM1xZSg==",
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"ansi-styles": "^4.1.0",
|
||||
"supports-color": "^7.1.0"
|
||||
}
|
||||
},
|
||||
"color-convert": {
|
||||
"version": "2.0.1",
|
||||
"resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
|
||||
"integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"color-name": "~1.1.4"
|
||||
}
|
||||
},
|
||||
"color-name": {
|
||||
"version": "1.1.4",
|
||||
"resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
|
||||
"integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
|
||||
"dev": true,
|
||||
"optional": true
|
||||
},
|
||||
"has-flag": {
|
||||
"version": "4.0.0",
|
||||
"resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
|
||||
"integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
|
||||
"dev": true,
|
||||
"optional": true
|
||||
},
|
||||
"loader-utils": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.0.tgz",
|
||||
"integrity": "sha512-rP4F0h2RaWSvPEkD7BLDFQnvSf+nK+wr3ESUjNTyAGobqrijmW92zc+SO6d4p4B1wh7+B/Jg1mkQe5NYUEHtHQ==",
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"big.js": "^5.2.2",
|
||||
"emojis-list": "^3.0.0",
|
||||
"json5": "^2.1.2"
|
||||
}
|
||||
},
|
||||
"ssri": {
|
||||
"version": "8.0.1",
|
||||
"resolved": "https://registry.nlark.com/ssri/download/ssri-8.0.1.tgz?cache=0&sync_timestamp=1621364647836&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fssri%2Fdownload%2Fssri-8.0.1.tgz",
|
||||
@@ -2202,6 +2259,28 @@
|
||||
"requires": {
|
||||
"minipass": "^3.1.1"
|
||||
}
|
||||
},
|
||||
"supports-color": {
|
||||
"version": "7.2.0",
|
||||
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
|
||||
"integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"has-flag": "^4.0.0"
|
||||
}
|
||||
},
|
||||
"vue-loader-v16": {
|
||||
"version": "npm:vue-loader@16.2.0",
|
||||
"resolved": "https://registry.npmjs.org/vue-loader/-/vue-loader-16.2.0.tgz",
|
||||
"integrity": "sha512-TitGhqSQ61RJljMmhIGvfWzJ2zk9m1Qug049Ugml6QP3t0e95o0XJjk29roNEiPKJQBEi8Ord5hFuSuELzSp8Q==",
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"chalk": "^4.1.0",
|
||||
"hash-sum": "^2.0.0",
|
||||
"loader-utils": "^2.0.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -11709,87 +11788,6 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"vue-loader-v16": {
|
||||
"version": "npm:vue-loader@16.2.0",
|
||||
"resolved": "https://registry.nlark.com/vue-loader/download/vue-loader-16.2.0.tgz",
|
||||
"integrity": "sha1-BGpTMI3Ufljv4g3ewe3sAnzjtG4=",
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"chalk": "^4.1.0",
|
||||
"hash-sum": "^2.0.0",
|
||||
"loader-utils": "^2.0.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"ansi-styles": {
|
||||
"version": "4.3.0",
|
||||
"resolved": "https://registry.nlark.com/ansi-styles/download/ansi-styles-4.3.0.tgz?cache=0&sync_timestamp=1618995625950&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fansi-styles%2Fdownload%2Fansi-styles-4.3.0.tgz",
|
||||
"integrity": "sha1-7dgDYornHATIWuegkG7a00tkiTc=",
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"color-convert": "^2.0.1"
|
||||
}
|
||||
},
|
||||
"chalk": {
|
||||
"version": "4.1.1",
|
||||
"resolved": "https://registry.nlark.com/chalk/download/chalk-4.1.1.tgz?cache=0&sync_timestamp=1618995297666&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fchalk%2Fdownload%2Fchalk-4.1.1.tgz",
|
||||
"integrity": "sha1-yAs/qyi/Y3HmhjMl7uZ+YYt35q0=",
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"ansi-styles": "^4.1.0",
|
||||
"supports-color": "^7.1.0"
|
||||
}
|
||||
},
|
||||
"color-convert": {
|
||||
"version": "2.0.1",
|
||||
"resolved": "https://registry.npm.taobao.org/color-convert/download/color-convert-2.0.1.tgz",
|
||||
"integrity": "sha1-ctOmjVmMm9s68q0ehPIdiWq9TeM=",
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"color-name": "~1.1.4"
|
||||
}
|
||||
},
|
||||
"color-name": {
|
||||
"version": "1.1.4",
|
||||
"resolved": "https://registry.npm.taobao.org/color-name/download/color-name-1.1.4.tgz",
|
||||
"integrity": "sha1-wqCah6y95pVD3m9j+jmVyCbFNqI=",
|
||||
"dev": true,
|
||||
"optional": true
|
||||
},
|
||||
"has-flag": {
|
||||
"version": "4.0.0",
|
||||
"resolved": "https://registry.nlark.com/has-flag/download/has-flag-4.0.0.tgz?cache=0&sync_timestamp=1618847009337&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fhas-flag%2Fdownload%2Fhas-flag-4.0.0.tgz",
|
||||
"integrity": "sha1-lEdx/ZyByBJlxNaUGGDaBrtZR5s=",
|
||||
"dev": true,
|
||||
"optional": true
|
||||
},
|
||||
"loader-utils": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npm.taobao.org/loader-utils/download/loader-utils-2.0.0.tgz",
|
||||
"integrity": "sha1-5MrOW4FtQloWa18JfhDNErNgZLA=",
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"big.js": "^5.2.2",
|
||||
"emojis-list": "^3.0.0",
|
||||
"json5": "^2.1.2"
|
||||
}
|
||||
},
|
||||
"supports-color": {
|
||||
"version": "7.2.0",
|
||||
"resolved": "https://registry.npm.taobao.org/supports-color/download/supports-color-7.2.0.tgz?cache=0&sync_timestamp=1618560998281&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fsupports-color%2Fdownload%2Fsupports-color-7.2.0.tgz",
|
||||
"integrity": "sha1-G33NyzK4E4gBs+R4umpRyqiWSNo=",
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"has-flag": "^4.0.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"vue-router": {
|
||||
"version": "3.5.1",
|
||||
"resolved": "https://registry.npmjs.org/vue-router/-/vue-router-3.5.1.tgz",
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
<MenuGroup title="单据">
|
||||
<MenuItem to="/inventoryrrival" name="4-2">到货单</MenuItem>
|
||||
<MenuItem to="/inventoryerror" name="4-3">异常单据查询</MenuItem>
|
||||
|
||||
<MenuItem to="/inventoryMaterialAppVouch" name="4-2">领料单查询</MenuItem>
|
||||
</MenuGroup>
|
||||
</Submenu>
|
||||
</Menu>
|
||||
|
||||
6
NX.ERP.Webapp/src/api/materialAppVouch.js
Normal file
6
NX.ERP.Webapp/src/api/materialAppVouch.js
Normal file
@@ -0,0 +1,6 @@
|
||||
import axios from 'axios'
|
||||
|
||||
//查询领料列表带库位
|
||||
export const getListAndPost = (info) => {
|
||||
return axios.get('/api/MaterialApp/ListAndPost', info)
|
||||
}
|
||||
@@ -10,6 +10,7 @@ import inventorypoc from '@/views/inventory-poc.vue'
|
||||
import Purchasesum from '@/views/Purchasesum.vue'
|
||||
import inventoryrrival from '@/bill/inventory-arrival.vue'
|
||||
import inventoryerror from '@/bill/inventory-error.vue'
|
||||
import inventoryMaterialAppVouch from '@/views/inventory-materialAppVouch.vue'
|
||||
|
||||
export default [
|
||||
{
|
||||
@@ -29,4 +30,5 @@ export default [
|
||||
{ path: '/Purchasesum', component: Purchasesum },
|
||||
{ path: '/inventoryrrival', component: inventoryrrival },
|
||||
{ path: '/inventoryerror', component: inventoryerror },
|
||||
{ path: '/inventoryMaterialAppVouch', component: inventoryMaterialAppVouch },
|
||||
]
|
||||
|
||||
490
NX.ERP.Webapp/src/views/inventory-materialAppVouch.vue
Normal file
490
NX.ERP.Webapp/src/views/inventory-materialAppVouch.vue
Normal file
@@ -0,0 +1,490 @@
|
||||
<template>
|
||||
<div>
|
||||
<h4>领料单</h4>
|
||||
<div>
|
||||
<Row :gutter="16">
|
||||
<Col span="4">
|
||||
<label>领料单号</label>
|
||||
<Input autosize type="textarea" v-model="filter.ar_codes" />
|
||||
</Col>
|
||||
<Col span="4">
|
||||
<label>物料编号</label>
|
||||
<Input v-model="filter.inv_codes" />
|
||||
</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>
|
||||
<div id="tb">
|
||||
<Table
|
||||
style="margin-top: 20px"
|
||||
:loading="loading"
|
||||
size="small"
|
||||
border
|
||||
:columns="columnsMaterialAppVouch"
|
||||
:data="pagedData"
|
||||
>
|
||||
</Table>
|
||||
</div>
|
||||
<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"
|
||||
/>
|
||||
|
||||
<Modal width="1366" v-model="modal1" title="单据详情" @on-cancel="cancel">
|
||||
<Button size="large" type="primary" @click="print">打印</Button>
|
||||
<div id="tb2">
|
||||
<div>
|
||||
<Row :gutter="16">
|
||||
<Col span="7">
|
||||
<label></label>
|
||||
</Col>
|
||||
<Col span="6">
|
||||
<h1>采购到货单</h1>
|
||||
</Col>
|
||||
</Row>
|
||||
</div>
|
||||
<div>
|
||||
<Row :gutter="16">
|
||||
<Col span="8">
|
||||
{{"领料单号:"+this.ccode}}
|
||||
</Col>
|
||||
<Col span="6">
|
||||
{{"领料时间:"+this.ArrivalDate}}
|
||||
</Col>
|
||||
<Col span="4">
|
||||
{{"业务员:"+this.cpersonname}}
|
||||
</Col>
|
||||
</Row>
|
||||
</div>
|
||||
<Table
|
||||
style="margin-top: 20px"
|
||||
height="700"
|
||||
size="small"
|
||||
border
|
||||
:columns="columns2"
|
||||
:data="datas2"
|
||||
>
|
||||
</Table>
|
||||
</div>
|
||||
</Modal>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
//import vUpLoad from "@/bill/PrintView";
|
||||
import { pageingData, export_col_to_excel, sortByKey } from "@/libs/tools";
|
||||
import {getListAndPost} from "../api/materialAppVouch";
|
||||
export default {
|
||||
//components:{vUpLoad},
|
||||
data() {
|
||||
return {
|
||||
loading: false,
|
||||
PageSizeOpts: [10, 15, 20, 30],
|
||||
pageNo: 1,
|
||||
modal1: false,
|
||||
printing: false,
|
||||
strfilter: "",
|
||||
multiple: false,
|
||||
pageSize: 15,
|
||||
datas: [],
|
||||
ccode:"",
|
||||
ArrivalDate:"",
|
||||
cpersonname:"",
|
||||
datas2: [],
|
||||
filter: {
|
||||
inv_codes: "",
|
||||
inv_std: "",
|
||||
ar_codes: "",
|
||||
},
|
||||
dom: "",
|
||||
ranges: [
|
||||
{
|
||||
type: "price",
|
||||
ccode: "",
|
||||
// low: "", //区间的最小值
|
||||
// height: "", //区间的最大值
|
||||
},
|
||||
],
|
||||
columnsMaterialAppVouch: [
|
||||
// {
|
||||
// type: "index",
|
||||
// title: "序号",
|
||||
// width: 60,
|
||||
// align: "center",
|
||||
// },
|
||||
{
|
||||
title: "领料单号",
|
||||
align: "center",
|
||||
key: "app_vouch_order_no",
|
||||
width: 150,
|
||||
className: "demo-table-info-new",
|
||||
},
|
||||
{
|
||||
title: "存货编码",
|
||||
align: "center",
|
||||
key: "material_code",
|
||||
width: 110,
|
||||
className: "demo-table-info-new",
|
||||
},
|
||||
{
|
||||
title: "存货名称",
|
||||
align: "center",
|
||||
key: "material_name",
|
||||
width: 130,
|
||||
className: "demo-table-info-nom",
|
||||
},
|
||||
{
|
||||
title: "规格型号",
|
||||
align: "center",
|
||||
key: "material_spec",
|
||||
width: 135,
|
||||
className: "demo-table-info-nom",
|
||||
},
|
||||
{
|
||||
title: "单位",
|
||||
align: "center",
|
||||
key: "unit",
|
||||
width: 80,
|
||||
className: "demo-table-info-nom",
|
||||
},
|
||||
|
||||
{
|
||||
title: "数量",
|
||||
align: "center",
|
||||
key: "quantit",
|
||||
width: 80,
|
||||
className: "demo-table-info-nom",
|
||||
},
|
||||
{
|
||||
title: "需求日期",
|
||||
align: "center",
|
||||
key: "demand_date",
|
||||
width: 150,
|
||||
className: "demo-table-info-nom",
|
||||
},
|
||||
{
|
||||
title: "仓库",
|
||||
align: "center",
|
||||
key: "warehouse_name",
|
||||
width: 150,
|
||||
className: "demo-table-info-nom",
|
||||
},
|
||||
{
|
||||
title: "生产单号",
|
||||
align: "center",
|
||||
key: "product_order_no",
|
||||
width: 150,
|
||||
className: "demo-table-info-nom",
|
||||
},
|
||||
{
|
||||
title: "行号",
|
||||
align: "center",
|
||||
key: "product_order_line_no",
|
||||
width: 70,
|
||||
className: "demo-table-info-nom",
|
||||
},
|
||||
{
|
||||
title: "产品编码",
|
||||
align: "center",
|
||||
key: "product_code",
|
||||
width: 150,
|
||||
className: "demo-table-info-nom",
|
||||
},
|
||||
{
|
||||
title: "产品名称",
|
||||
align: "center",
|
||||
key: "product_name",
|
||||
width: 150,
|
||||
className: "demo-table-info-nom",
|
||||
},
|
||||
{
|
||||
title: "产品规格",
|
||||
align: "product_spec",
|
||||
key: "Quantity",
|
||||
width: 150,
|
||||
className: "demo-table-info-nom",
|
||||
},
|
||||
{
|
||||
title: "现存库位",
|
||||
key: "position",
|
||||
width: 160,
|
||||
align: "left",
|
||||
className: "demo-table-info-nom",
|
||||
},
|
||||
],
|
||||
columns: [
|
||||
{
|
||||
title: "到货单号",
|
||||
align: "center",
|
||||
key: "ArrivalCode",
|
||||
|
||||
className: "demo-table-info-old",
|
||||
render: (h, params) => {
|
||||
return h("div", [
|
||||
h(
|
||||
"a",
|
||||
{
|
||||
props: {
|
||||
type: "primary",
|
||||
size: "small",
|
||||
},
|
||||
style: { color: "#2db7f5" },
|
||||
domProps: {
|
||||
title: params.row.ArrivalCode, //添加title属性
|
||||
},
|
||||
on: {
|
||||
click: () => {
|
||||
this.handleShow(params.row.ArrivalCode); //点击事件
|
||||
},
|
||||
},
|
||||
},
|
||||
params.row.ArrivalCode
|
||||
),
|
||||
]);
|
||||
},
|
||||
},
|
||||
{
|
||||
title: "到货日期",
|
||||
align: "center",
|
||||
key: "ArrivalDate",
|
||||
},
|
||||
|
||||
{
|
||||
title: "业务员",
|
||||
align: "center",
|
||||
key: "cpersonname",
|
||||
},
|
||||
|
||||
{
|
||||
title: "存货编码",
|
||||
align: "center",
|
||||
key: "MaterialCode",
|
||||
},
|
||||
|
||||
{
|
||||
title: "存货名称",
|
||||
align: "center",
|
||||
key: "cinvname",
|
||||
},
|
||||
{
|
||||
title: "规格型号",
|
||||
align: "center",
|
||||
key: "cinvstd",
|
||||
},
|
||||
{
|
||||
title: "单位",
|
||||
align: "center",
|
||||
key: "cinvm_unit",
|
||||
},
|
||||
|
||||
{
|
||||
title: "到货数量",
|
||||
align: "center",
|
||||
key: "Quantity",
|
||||
},
|
||||
|
||||
{
|
||||
title: "现存库位",
|
||||
align: "center",
|
||||
key: "cPosName",
|
||||
width: 200,
|
||||
},
|
||||
],
|
||||
columns2: [
|
||||
{
|
||||
title: "存货编码",
|
||||
align: "center",
|
||||
key: "MaterialCode",
|
||||
width: 110,
|
||||
className: "demo-table-info-new",
|
||||
},
|
||||
|
||||
{
|
||||
title: "存货名称",
|
||||
align: "center",
|
||||
key: "cinvname",
|
||||
width: 130,
|
||||
className: "demo-table-info-nom",
|
||||
},
|
||||
{
|
||||
title: "规格型号",
|
||||
align: "center",
|
||||
key: "cinvstd",
|
||||
width: 135,
|
||||
className: "demo-table-info-nom",
|
||||
},
|
||||
{
|
||||
title: "单位",
|
||||
align: "center",
|
||||
key: "cinvm_unit",
|
||||
width: 80,
|
||||
className: "demo-table-info-nom",
|
||||
},
|
||||
|
||||
{
|
||||
title: "数量",
|
||||
align: "center",
|
||||
key: "Quantity",
|
||||
width: 80,
|
||||
className: "demo-table-info-nom",
|
||||
},
|
||||
|
||||
{
|
||||
title: "现存库位",
|
||||
key: "cPosName",
|
||||
width: 160,
|
||||
align: "left",
|
||||
className: "demo-table-info-nom",
|
||||
},
|
||||
],
|
||||
};
|
||||
},
|
||||
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.columnsMaterialAppVouch, this.datas);
|
||||
},
|
||||
handleClick() {
|
||||
this.loadData();
|
||||
},
|
||||
print() {
|
||||
this.dom = document.getElementById("tb2");
|
||||
|
||||
// console.log(this.dom);
|
||||
this.$print(this.dom);
|
||||
},
|
||||
inventory(ranges) {
|
||||
const skus = new Array();
|
||||
//筛选条件
|
||||
this.datas.map((Item, index) => {
|
||||
if (Item.ArrivalCode == this.ranges[0].ccode) {
|
||||
skus.push({
|
||||
...Item,
|
||||
});
|
||||
}
|
||||
});
|
||||
return skus;
|
||||
},
|
||||
cancel() {
|
||||
this.datas2 = [];
|
||||
this.modal1 = false;
|
||||
},
|
||||
|
||||
async handleShow(h) {
|
||||
this.ranges[0].ccode = h;
|
||||
this.datas2 = this.inventory(this.ranges);
|
||||
this.ccode=h;
|
||||
this.ArrivalDate=this.datas2[0].ArrivalDate;
|
||||
this.cpersonname=this.datas2[0].cpersonname;
|
||||
|
||||
|
||||
this.modal1 = true;
|
||||
},
|
||||
|
||||
async loadData() {
|
||||
try {
|
||||
let _filert = {
|
||||
c_inv_code: this.filter.inv_codes,
|
||||
inv_std: this.filter.inv_std,
|
||||
arrival_nolist:
|
||||
this.filter.ar_codes !== ""
|
||||
? this.filter.ar_codes.split(/[,\s\n,]/)
|
||||
: null,
|
||||
};
|
||||
this.loading = true;
|
||||
let resp = await getListAndPost(_filert);
|
||||
this.pageNo = 1;
|
||||
this.datas = sortByKey(resp.data.data, "ArrivalCode");
|
||||
// this.datas = resp.data.data;
|
||||
} catch (error) {
|
||||
} finally {
|
||||
this.loading = false;
|
||||
}
|
||||
},
|
||||
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;
|
||||
font-size: 12px;
|
||||
}
|
||||
.ivu-table td.demo-table-info-nom {
|
||||
font-size: 11px;
|
||||
}
|
||||
.ivu-table td.demo-table-info-ex {
|
||||
color: #187;
|
||||
font-weight: 600;
|
||||
}
|
||||
body {
|
||||
padding: 10px 1;
|
||||
}
|
||||
</style>
|
||||
@@ -5,10 +5,17 @@
|
||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5"/>
|
||||
</startup>
|
||||
<appSettings>
|
||||
<add key="ApiDbName" value="MES_SUBMIT" />
|
||||
<add key="server" value="10.0.0.12" />
|
||||
<add key="AccId" value="u8-2@001" />
|
||||
<add key="UserId" value="wxapi" />
|
||||
<add key="AccId" value="u8-2@002" />
|
||||
<add key="UserId" value="wx997" />
|
||||
<add key="Password" value="1" />
|
||||
<add key="EaiPort" value="80" />
|
||||
<add key="EaiPath" value="U8EAI/import.asp" />
|
||||
<add key="webpages:Version" value="3.0.0.0" />
|
||||
<add key="webpages:Enabled" value="false" />
|
||||
<add key="ClientValidationEnabled" value="true" />
|
||||
<add key="UnobtrusiveJavaScriptEnabled" value="true" />
|
||||
</appSettings>
|
||||
<runtime>
|
||||
|
||||
|
||||
22
U8Test/Store/APVouchTest.cs
Normal file
22
U8Test/Store/APVouchTest.cs
Normal file
@@ -0,0 +1,22 @@
|
||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||
using NX.ERP.U8.Store;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace NX.ERP.U8.Store.Tests
|
||||
{
|
||||
[TestClass()]
|
||||
public class APVouchTest
|
||||
{
|
||||
[TestMethod()]
|
||||
public void GetListAndPostNameTest()
|
||||
{
|
||||
var ap = new NX.ERP.U8.Store.MaterialAppDAL();
|
||||
ap.GetListAndPost();
|
||||
//Assert.Fail();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -57,8 +57,10 @@
|
||||
<ItemGroup>
|
||||
<Compile Include="APVouchTest.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="Store\APVouchTest.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="App.config" />
|
||||
<None Include="packages.config" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
|
||||
Reference in New Issue
Block a user