This commit is contained in:
杰 朱
2021-06-21 10:44:05 +08:00
4 changed files with 44 additions and 38 deletions

View File

@@ -259,11 +259,22 @@ FROM MaterialAppVouch a
/// </summary> /// </summary>
/// <param name="Code"></param> /// <param name="Code"></param>
/// <returns></returns> /// <returns></returns>
public IEnumerable<Model.Response.Store.MaterialAppVouchAndPostName> GetModelAndPost(string OrderCode) public IEnumerable<Model.Response.Store.MaterialAppVouchAndPostName> GetModelAndPost(string OrderCode, string invCode)
{ {
if (!string.IsNullOrEmpty(OrderCode)) if (!string.IsNullOrEmpty(OrderCode) && !string.IsNullOrEmpty(invCode))
{ {
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 }); return this.GetListAndPost(" MA.cCode=@OrderCode", new { OrderCode });
}
else if (!string.IsNullOrEmpty(invCode))
{
return this.GetListAndPost(" MAS.cInvCode = @invCode ", new { invCode });
} }
else else
{ {

View File

@@ -46,11 +46,11 @@ namespace NX.ERP.WebAPi.Controllers.Store
[Route("api/MaterialApp/ListAndPost")] [Route("api/MaterialApp/ListAndPost")]
[HttpGet] [HttpPost]
public IEnumerable<Model.Response.Store.MaterialAppVouchAndPostName> GetModelAndPost(string Code = "") public IEnumerable<Model.Response.Store.MaterialAppVouchAndPostName> GetModelAndPost(Model.Response.Store.MaterialAppVouchAndPostName req)
{ {
var dal = new NX.ERP.U8.Store.MaterialAppDAL(); var dal = new NX.ERP.U8.Store.MaterialAppDAL();
return dal.GetModelAndPost(Code); return dal.GetModelAndPost(req.AppVouchOrderNo, req.MaterialCode);
} }

View File

@@ -2,5 +2,5 @@ import axios from 'axios'
//查询领料列表带库位 //查询领料列表带库位
export const getListAndPost = (info) => { export const getListAndPost = (info) => {
return axios.get('/api/MaterialApp/ListAndPost', info) return axios.post('/api/MaterialApp/ListAndPost', info)
} }

View File

@@ -5,13 +5,13 @@
<Row :gutter="16"> <Row :gutter="16">
<Col span="4"> <Col span="4">
<label>领料单号</label> <label>领料单号</label>
<Input autosize type="textarea" v-model="filter.ar_codes" /> <Input autosize type="textarea" v-model="filter.app_vouch_order_no" />
</Col> </Col>
<Col span="4"> <Col span="4">
<label>物料编号</label> <label>物料编号</label>
<Input v-model="filter.inv_codes" /> <Input v-model="filter.material_code" />
</Col> </Col>
<Col span="4"> <Col span="6">
<Button <Button
size="large" size="large"
type="primary" type="primary"
@@ -22,6 +22,9 @@
<Button size="large" type="success" @click="handelExport" <Button size="large" type="success" @click="handelExport"
>导出</Button >导出</Button
> >
<Button size="large" type="info" @click="print"
>打印</Button
>
</Col> </Col>
</Row> </Row>
@@ -113,9 +116,8 @@
cpersonname:"", cpersonname:"",
datas2: [], datas2: [],
filter: { filter: {
inv_codes: "", app_vouch_order_no: "",
inv_std: "", material_code: "",
ar_codes: "",
}, },
dom: "", dom: "",
ranges: [ ranges: [
@@ -133,13 +135,6 @@
// width: 60, // width: 60,
// align: "center", // align: "center",
// }, // },
{
title: "领料单号",
align: "center",
key: "app_vouch_order_no",
width: 150,
className: "demo-table-info-new",
},
{ {
title: "存货编码", title: "存货编码",
align: "center", align: "center",
@@ -158,7 +153,7 @@
title: "规格型号", title: "规格型号",
align: "center", align: "center",
key: "material_spec", key: "material_spec",
width: 135, width: 150,
className: "demo-table-info-nom", className: "demo-table-info-nom",
}, },
{ {
@@ -176,6 +171,13 @@
width: 80, width: 80,
className: "demo-table-info-nom", className: "demo-table-info-nom",
}, },
{
title: "现存库位",
key: "position",
width: 160,
align: "left",
className: "demo-table-info-nom",
},
{ {
title: "需求日期", title: "需求日期",
align: "center", align: "center",
@@ -190,6 +192,13 @@
width: 150, width: 150,
className: "demo-table-info-nom", className: "demo-table-info-nom",
}, },
{
title: "领料单号",
align: "center",
key: "app_vouch_order_no",
width: 150,
className: "demo-table-info-new",
},
{ {
title: "生产单号", title: "生产单号",
align: "center", align: "center",
@@ -225,13 +234,6 @@
width: 150, width: 150,
className: "demo-table-info-nom", className: "demo-table-info-nom",
}, },
{
title: "现存库位",
key: "position",
width: 160,
align: "left",
className: "demo-table-info-nom",
},
], ],
columns: [ columns: [
{ {
@@ -379,7 +381,7 @@
this.loadData(); this.loadData();
}, },
print() { print() {
this.dom = document.getElementById("tb2"); this.dom = document.getElementById("tb");
// console.log(this.dom); // console.log(this.dom);
this.$print(this.dom); this.$print(this.dom);
@@ -414,18 +416,11 @@
async loadData() { async loadData() {
try { 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; this.loading = true;
let resp = await getListAndPost(_filert); let resp = await getListAndPost(this.filter);
this.pageNo = 1; 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; // this.datas = resp.data.data;
} catch (error) { } catch (error) {
} finally { } finally {