From fe0aec7fefb6f5bf4c1a1a466d3ae93ed1a3b077 Mon Sep 17 00:00:00 2001 From: ehkang Date: Sat, 19 Jun 2021 09:36:00 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A2=86=E6=96=99=E7=94=B3=E8=AF=B7=E5=8D=95?= =?UTF-8?q?=E6=89=93=E5=8D=B0=E5=92=8C=E6=9F=A5=E8=AF=A2=E6=9D=A1=E4=BB=B6?= =?UTF-8?q?=E5=AE=8C=E5=96=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- NX.ERP.U8/Store/MaterialAppDAL.cs | 17 +++++- .../Store/MaterialAppController.cs | 6 +- NX.ERP.Webapp/src/api/materialAppVouch.js | 2 +- .../src/views/inventory-materialAppVouch.vue | 59 +++++++++---------- 4 files changed, 45 insertions(+), 39 deletions(-) diff --git a/NX.ERP.U8/Store/MaterialAppDAL.cs b/NX.ERP.U8/Store/MaterialAppDAL.cs index bd18463..b80b5ee 100644 --- a/NX.ERP.U8/Store/MaterialAppDAL.cs +++ b/NX.ERP.U8/Store/MaterialAppDAL.cs @@ -259,11 +259,22 @@ FROM MaterialAppVouch a /// /// /// - public IEnumerable GetModelAndPost(string OrderCode) + public IEnumerable GetModelAndPost(string OrderCode, string invCode) { - if (!string.IsNullOrEmpty(OrderCode)) + if (!string.IsNullOrEmpty(OrderCode) && !string.IsNullOrEmpty(invCode)) { - return this.GetListAndPost(" a.cCode=@OrderCode", new { OrderCode }); + return this.GetListAndPost(" MA.cCode=@OrderCode AND MAS.cInvCode = @invCode ", new { OrderCode, invCode }); + } + else + if (!string.IsNullOrEmpty(OrderCode)) + { + + return this.GetListAndPost(" MA.cCode=@OrderCode", new { OrderCode }); + + } + else if (!string.IsNullOrEmpty(invCode)) + { + return this.GetListAndPost(" MAS.cInvCode = @invCode ", new { invCode }); } else { diff --git a/NX.ERP.WebAPi/Controllers/Store/MaterialAppController.cs b/NX.ERP.WebAPi/Controllers/Store/MaterialAppController.cs index 0d29b1c..5a36523 100644 --- a/NX.ERP.WebAPi/Controllers/Store/MaterialAppController.cs +++ b/NX.ERP.WebAPi/Controllers/Store/MaterialAppController.cs @@ -46,11 +46,11 @@ namespace NX.ERP.WebAPi.Controllers.Store [Route("api/MaterialApp/ListAndPost")] - [HttpGet] - public IEnumerable GetModelAndPost(string Code = "") + [HttpPost] + public IEnumerable GetModelAndPost(Model.Response.Store.MaterialAppVouchAndPostName req) { var dal = new NX.ERP.U8.Store.MaterialAppDAL(); - return dal.GetModelAndPost(Code); + return dal.GetModelAndPost(req.AppVouchOrderNo, req.MaterialCode); } diff --git a/NX.ERP.Webapp/src/api/materialAppVouch.js b/NX.ERP.Webapp/src/api/materialAppVouch.js index 0fdc5d1..208582c 100644 --- a/NX.ERP.Webapp/src/api/materialAppVouch.js +++ b/NX.ERP.Webapp/src/api/materialAppVouch.js @@ -2,5 +2,5 @@ import axios from 'axios' //查询领料列表带库位 export const getListAndPost = (info) => { - return axios.get('/api/MaterialApp/ListAndPost', info) + return axios.post('/api/MaterialApp/ListAndPost', info) } \ No newline at end of file diff --git a/NX.ERP.Webapp/src/views/inventory-materialAppVouch.vue b/NX.ERP.Webapp/src/views/inventory-materialAppVouch.vue index 91c65e2..5cf0757 100644 --- a/NX.ERP.Webapp/src/views/inventory-materialAppVouch.vue +++ b/NX.ERP.Webapp/src/views/inventory-materialAppVouch.vue @@ -5,13 +5,13 @@ - + - + - + + @@ -113,9 +116,8 @@ cpersonname:"", datas2: [], filter: { - inv_codes: "", - inv_std: "", - ar_codes: "", + app_vouch_order_no: "", + material_code: "", }, dom: "", ranges: [ @@ -133,13 +135,6 @@ // width: 60, // align: "center", // }, - { - title: "领料单号", - align: "center", - key: "app_vouch_order_no", - width: 150, - className: "demo-table-info-new", - }, { title: "存货编码", align: "center", @@ -158,7 +153,7 @@ title: "规格型号", align: "center", key: "material_spec", - width: 135, + width: 150, className: "demo-table-info-nom", }, { @@ -176,6 +171,13 @@ width: 80, className: "demo-table-info-nom", }, + { + title: "现存库位", + key: "position", + width: 160, + align: "left", + className: "demo-table-info-nom", + }, { title: "需求日期", align: "center", @@ -190,6 +192,13 @@ width: 150, className: "demo-table-info-nom", }, + { + title: "领料单号", + align: "center", + key: "app_vouch_order_no", + width: 150, + className: "demo-table-info-new", + }, { title: "生产单号", align: "center", @@ -225,13 +234,6 @@ width: 150, className: "demo-table-info-nom", }, - { - title: "现存库位", - key: "position", - width: 160, - align: "left", - className: "demo-table-info-nom", - }, ], columns: [ { @@ -379,7 +381,7 @@ this.loadData(); }, print() { - this.dom = document.getElementById("tb2"); + this.dom = document.getElementById("tb"); // console.log(this.dom); this.$print(this.dom); @@ -414,18 +416,11 @@ 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); + let resp = await getListAndPost(this.filter); + this.pageNo = 1; - this.datas = sortByKey(resp.data.data, "ArrivalCode"); + this.datas = sortByKey(resp.data.data, "app_vouch_order_no"); // this.datas = resp.data.data; } catch (error) { } finally {