修改
This commit is contained in:
@@ -259,11 +259,22 @@ FROM MaterialAppVouch a
|
||||
/// </summary>
|
||||
/// <param name="Code"></param>
|
||||
/// <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 });
|
||||
|
||||
}
|
||||
else if (!string.IsNullOrEmpty(invCode))
|
||||
{
|
||||
return this.GetListAndPost(" MAS.cInvCode = @invCode ", new { invCode });
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -46,11 +46,11 @@ namespace NX.ERP.WebAPi.Controllers.Store
|
||||
|
||||
|
||||
[Route("api/MaterialApp/ListAndPost")]
|
||||
[HttpGet]
|
||||
public IEnumerable<Model.Response.Store.MaterialAppVouchAndPostName> GetModelAndPost(string Code = "")
|
||||
[HttpPost]
|
||||
public IEnumerable<Model.Response.Store.MaterialAppVouchAndPostName> 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);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
@@ -5,13 +5,13 @@
|
||||
<Row :gutter="16">
|
||||
<Col span="4">
|
||||
<label>领料单号</label>
|
||||
<Input autosize type="textarea" v-model="filter.ar_codes" />
|
||||
<Input autosize type="textarea" v-model="filter.app_vouch_order_no" />
|
||||
</Col>
|
||||
<Col span="4">
|
||||
<label>物料编号</label>
|
||||
<Input v-model="filter.inv_codes" />
|
||||
<Input v-model="filter.material_code" />
|
||||
</Col>
|
||||
<Col span="4">
|
||||
<Col span="6">
|
||||
<Button
|
||||
size="large"
|
||||
type="primary"
|
||||
@@ -22,6 +22,9 @@
|
||||
<Button size="large" type="success" @click="handelExport"
|
||||
>导出</Button
|
||||
>
|
||||
<Button size="large" type="info" @click="print"
|
||||
>打印</Button
|
||||
>
|
||||
|
||||
</Col>
|
||||
</Row>
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user