领料申请单打印和查询条件完善

This commit is contained in:
ehkang
2021-06-19 09:36:00 +08:00
parent d7581d8fe1
commit fe0aec7fef
4 changed files with 45 additions and 39 deletions

View File

@@ -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)
}

View File

@@ -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 {