增加采购订单列表查询
This commit is contained in:
@@ -3,12 +3,29 @@
|
||||
<h4>跟单记录表</h4>
|
||||
<div>
|
||||
<Row :gutter="16">
|
||||
<Col span="8">
|
||||
<Col span="4">
|
||||
<label>订单编号</label>
|
||||
<Input autosize type="textarea" v-model="filter.mo_codes" />
|
||||
</Col>
|
||||
<Col span="4">
|
||||
<label>子件编码</label>
|
||||
<Input autosize type="textarea" v-model="filter.inv_codes" />
|
||||
</Col>
|
||||
<Col span="8">
|
||||
<Button
|
||||
|
||||
<Col span="3">
|
||||
<label>状态</label>
|
||||
<div>
|
||||
<Checkbox v-model="filter.by_finish">包含已关闭</Checkbox>
|
||||
</div>
|
||||
</Col>
|
||||
<Col span="3">
|
||||
<label>状态</label>
|
||||
<div>
|
||||
<Checkbox v-model="filter.byiss">仅已领</Checkbox>
|
||||
</div>
|
||||
</Col>
|
||||
<Col span="4">
|
||||
<Button
|
||||
size="large"
|
||||
type="primary"
|
||||
icon="ios-search"
|
||||
@@ -25,7 +42,7 @@
|
||||
<Table
|
||||
style="margin-top: 20px"
|
||||
size="small"
|
||||
:loading="loading"
|
||||
:loading="loading"
|
||||
border
|
||||
:columns="columns"
|
||||
:data="pagedData"
|
||||
@@ -50,7 +67,12 @@
|
||||
|
||||
<script>
|
||||
import { getInventorymom } from "@/api/pmc";
|
||||
import { pageingData, export_col_to_excel,sortByKey,numberFormat } from "@/libs/tools";
|
||||
import {
|
||||
pageingData,
|
||||
export_col_to_excel,
|
||||
sortByKey,
|
||||
numberFormat,
|
||||
} from "@/libs/tools";
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
@@ -63,16 +85,16 @@ export default {
|
||||
datas: [],
|
||||
filter: {
|
||||
inv_codes: "",
|
||||
inv_std: "",
|
||||
so_code: "",
|
||||
mo_codes: "",
|
||||
by_finish: false,
|
||||
byiss: false,
|
||||
},
|
||||
columns: [
|
||||
|
||||
{
|
||||
title: "生产订单号",
|
||||
align: "center",
|
||||
key: "mocode",
|
||||
fixed:"left",
|
||||
fixed: "left",
|
||||
width: 135,
|
||||
className: "demo-table-info-new",
|
||||
},
|
||||
@@ -80,16 +102,15 @@ export default {
|
||||
title: "行号",
|
||||
align: "center",
|
||||
key: "sort_seq",
|
||||
fixed:"left",
|
||||
fixed: "left",
|
||||
width: 80,
|
||||
|
||||
},
|
||||
{
|
||||
title: "产品编码",
|
||||
align: "center",
|
||||
key: "inv_code",
|
||||
width: 100,
|
||||
fixed:"left",
|
||||
fixed: "left",
|
||||
className: "demo-table-info-new",
|
||||
},
|
||||
{
|
||||
@@ -97,7 +118,7 @@ export default {
|
||||
align: "center",
|
||||
key: "c_inv_name",
|
||||
width: 150,
|
||||
fixed:"left",
|
||||
fixed: "left",
|
||||
className: "demo-table-info-new",
|
||||
},
|
||||
{
|
||||
@@ -105,32 +126,42 @@ export default {
|
||||
align: "center",
|
||||
key: "c_inv_std",
|
||||
width: 180,
|
||||
fixed:"left",
|
||||
|
||||
fixed: "left",
|
||||
},
|
||||
{
|
||||
title: "产品单位",
|
||||
align: "center",
|
||||
key: "c_com_unit_name",
|
||||
fixed:"left",
|
||||
fixed: "left",
|
||||
width: 100,
|
||||
|
||||
},
|
||||
{
|
||||
title: "投产量",
|
||||
align: "center",
|
||||
key: "qty",
|
||||
fixed:"left",
|
||||
fixed: "left",
|
||||
width: 80,
|
||||
|
||||
},
|
||||
{
|
||||
title: "未完成",
|
||||
title: "完成量",
|
||||
align: "center",
|
||||
key: "qualified_in_qty",
|
||||
fixed:"left",
|
||||
fixed: "left",
|
||||
width: 80,
|
||||
|
||||
},
|
||||
{
|
||||
title: "未完成量",
|
||||
align: "center",
|
||||
|
||||
fixed: "left",
|
||||
width: 100,
|
||||
render: (h, params) => {
|
||||
return (
|
||||
<span>
|
||||
{numberFormat(params.row.qty - params.row.qualified_in_qty)}
|
||||
</span>
|
||||
);
|
||||
},
|
||||
},
|
||||
{
|
||||
title: "子件编码",
|
||||
@@ -138,7 +169,7 @@ export default {
|
||||
width: 100,
|
||||
key: "invcode1",
|
||||
className: "demo-table-info-old",
|
||||
fixed:"left",
|
||||
fixed: "left",
|
||||
},
|
||||
{
|
||||
title: "子件名称",
|
||||
@@ -146,29 +177,26 @@ export default {
|
||||
width: 150,
|
||||
key: "cinvname1",
|
||||
className: "demo-table-info-old",
|
||||
fixed:"left",
|
||||
fixed: "left",
|
||||
},
|
||||
{
|
||||
title: "子件规格",
|
||||
width: 200,
|
||||
align: "center",
|
||||
key: "cinvstd1",
|
||||
fixed:"left",
|
||||
|
||||
fixed: "left",
|
||||
},
|
||||
{
|
||||
title: "子件单位",
|
||||
width: 100,
|
||||
align: "center",
|
||||
key: "c_com_unit_name1",
|
||||
|
||||
},
|
||||
{
|
||||
title: "子件属性",
|
||||
align: "center",
|
||||
key: "std",
|
||||
width: 100,
|
||||
|
||||
width: 100,
|
||||
},
|
||||
{
|
||||
title: "单行需求",
|
||||
@@ -181,29 +209,24 @@ export default {
|
||||
align: "center",
|
||||
key: "issqty",
|
||||
width: 110,
|
||||
|
||||
},
|
||||
{
|
||||
title: "单行未领",
|
||||
align: "center",
|
||||
|
||||
|
||||
width: 110,
|
||||
render: (h, params) => {
|
||||
return (
|
||||
<span>
|
||||
{numberFormat(
|
||||
params.row.qty1 - params.row.issqty
|
||||
)}
|
||||
</span>
|
||||
);
|
||||
},
|
||||
render: (h, params) => {
|
||||
return (
|
||||
<span>{numberFormat(params.row.qty1 - params.row.issqty)}</span>
|
||||
);
|
||||
},
|
||||
},
|
||||
{
|
||||
title: "条件内未领",
|
||||
align: "center",
|
||||
|
||||
|
||||
width: 110,
|
||||
key: "mdqty",
|
||||
key: "mdqty",
|
||||
},
|
||||
{
|
||||
title: "总未领量",
|
||||
@@ -223,7 +246,7 @@ export default {
|
||||
key: "cqty",
|
||||
width: 100,
|
||||
},
|
||||
|
||||
|
||||
{
|
||||
title: "现存无废品",
|
||||
align: "center",
|
||||
@@ -277,18 +300,22 @@ export default {
|
||||
},
|
||||
async loadData() {
|
||||
try {
|
||||
let _filetr =
|
||||
this.filter.inv_codes !== ""
|
||||
? this.filter.inv_codes.split(/[,\s\n,]/)
|
||||
: [];
|
||||
this.loading=true;
|
||||
let resp = await getInventorymom(_filetr);
|
||||
|
||||
let _filert = {
|
||||
inv_codes: this.filter.inv_codes !== '' ? this.filter.inv_codes.split(/[,\s\n,]/) : null,
|
||||
mo_codes: this.filter.mo_codes !== '' ? this.filter.mo_codes.split(/[,\s\n,]/) : null,
|
||||
by_finish: this.filter.by_finish,
|
||||
byiss: this.filter.byiss,
|
||||
|
||||
}
|
||||
this.loading = true;
|
||||
let resp = await getInventorymom(_filert);
|
||||
this.pageNo = 1;
|
||||
this.datas = resp.data.data;
|
||||
|
||||
|
||||
} catch (error) {}
|
||||
finally{this.loading=false;}
|
||||
} catch (error) {
|
||||
} finally {
|
||||
this.loading = false;
|
||||
}
|
||||
},
|
||||
handlePagechange(page) {
|
||||
this.pageNo = page;
|
||||
|
||||
304
NX.ERP.Webapp/src/views/inventory-po.vue
Normal file
304
NX.ERP.Webapp/src/views/inventory-po.vue
Normal file
@@ -0,0 +1,304 @@
|
||||
<template>
|
||||
<div>
|
||||
<h4>销售订单表</h4>
|
||||
<div>
|
||||
<Row :gutter="16">
|
||||
<Col span="4">
|
||||
<label>采购订单编号</label>
|
||||
<Input autosize type="textarea" v-model="filter.po_codes" />
|
||||
</Col>
|
||||
<Col span="3">
|
||||
<label>采购订单期间</label>
|
||||
<div>
|
||||
<DatePicker v-model="filter.dates" type="daterange"></DatePicker>
|
||||
</div>
|
||||
</Col>
|
||||
|
||||
<Col span="3">
|
||||
<label>物料编号</label>
|
||||
<Input autosize type="textarea" v-model="filter.inv_codes" />
|
||||
</Col>
|
||||
<Col span="3">
|
||||
<label>规格</label>
|
||||
<Input v-model="filter.inv_std" />
|
||||
</Col>
|
||||
|
||||
<Col span="4">
|
||||
<label>请购单号</label>
|
||||
<Input autosize type="textarea" v-model="filter.app_codes" />
|
||||
</Col>
|
||||
<Col span="3">
|
||||
<label>请购订单期间</label>
|
||||
<div>
|
||||
<DatePicker v-model="filter.dates2" type="daterange"></DatePicker>
|
||||
</div>
|
||||
</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>
|
||||
|
||||
<Table
|
||||
style="margin-top: 20px"
|
||||
size="small"
|
||||
border
|
||||
:columns="columns"
|
||||
:data="pagedData"
|
||||
>
|
||||
</Table>
|
||||
|
||||
<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"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getInventorypo } from "@/api/pmc";
|
||||
import {
|
||||
pageingData,
|
||||
export_col_to_excel,
|
||||
dateFormatFull,
|
||||
dateFormat,
|
||||
sortByKey,
|
||||
getMonth
|
||||
} from "@/libs/tools";
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
PageSizeOpts: [10, 15, 20, 30],
|
||||
pageNo: 1,
|
||||
strfilter: "",
|
||||
multiple: false,
|
||||
pageSize: 15,
|
||||
datas: [],
|
||||
filter: {
|
||||
inv_codes: "",
|
||||
inv_std: "",
|
||||
po_codes: "",
|
||||
app_codes: "",
|
||||
dates: [getMonth("s",-1),getMonth("e",0)],
|
||||
dates2: [],
|
||||
},
|
||||
columns: [
|
||||
|
||||
{
|
||||
title: "采购订单号",
|
||||
align: "center",
|
||||
key: "cpoid",
|
||||
|
||||
},
|
||||
|
||||
{
|
||||
title: "订单日期",
|
||||
align: "center",
|
||||
key: "dpodate",
|
||||
|
||||
},
|
||||
{
|
||||
title: "供应商",
|
||||
align: "center",
|
||||
key: "cvenabbname",
|
||||
|
||||
},
|
||||
{
|
||||
title: "存货编码",
|
||||
align: "center",
|
||||
key: "cinvcode",
|
||||
},
|
||||
{
|
||||
title: "存货名称",
|
||||
align: "center",
|
||||
key: "cinvname",
|
||||
className: "demo-table-info-new",
|
||||
},
|
||||
|
||||
{
|
||||
title: "规格型号",
|
||||
align: "center",
|
||||
key: "cinvstd",
|
||||
|
||||
},
|
||||
{
|
||||
title: "单位",
|
||||
align: "center",
|
||||
key: "cinvm_unit",
|
||||
},
|
||||
{
|
||||
title: "累计到货",
|
||||
align: "center",
|
||||
key: "ireceivedqty",
|
||||
},
|
||||
{
|
||||
title: "订单数量",
|
||||
align: "center",
|
||||
key: "iquantity",
|
||||
|
||||
},
|
||||
{
|
||||
title: "合计在途",
|
||||
align: "center",
|
||||
key: "rqty",
|
||||
},
|
||||
{
|
||||
title: "预计到货日期",
|
||||
align: "center",
|
||||
key: "darrivedate",
|
||||
},
|
||||
{
|
||||
title: "请购单号",
|
||||
align: "center",
|
||||
key: "cupsocode",
|
||||
},
|
||||
{
|
||||
title: "请购日期",
|
||||
align: "center",
|
||||
key: "ddate",
|
||||
},
|
||||
{
|
||||
title: "需求日期",
|
||||
align: "center",
|
||||
key: "drequirdate",
|
||||
},
|
||||
|
||||
|
||||
],
|
||||
};
|
||||
},
|
||||
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.columns, this.datas);
|
||||
},
|
||||
handleClick() {
|
||||
this.loadData();
|
||||
},
|
||||
async loadData() {
|
||||
let _beginDate = null;
|
||||
let _endDate = null;
|
||||
let _beginDate2 = null;
|
||||
let _endDate2 = null;
|
||||
if (
|
||||
this.filter.dates.length == 2 &&
|
||||
this.filter.dates[0] !== "" &&
|
||||
this.filter.dates[0] !== ""
|
||||
) {
|
||||
_beginDate = this.filter.dates[0];
|
||||
_endDate = this.filter.dates[1];
|
||||
}
|
||||
if (
|
||||
this.filter.dates2.length == 2 &&
|
||||
this.filter.dates2[0] !== "" &&
|
||||
this.filter.dates2[0] !== ""
|
||||
) {
|
||||
_beginDate2 = this.filter.dates2[0];
|
||||
_endDate2 = this.filter.dates2[1];
|
||||
}
|
||||
let _filert = {
|
||||
inv_codes:
|
||||
this.filter.inv_codes !== ""
|
||||
? this.filter.inv_codes.split(/[,\s\n,]/)
|
||||
: null,
|
||||
inv_std: this.filter.inv_std,
|
||||
po_codes:
|
||||
this.filter.po_codes !== ""
|
||||
? this.filter.po_codes.split(/[,\s\n,]/)
|
||||
: null,
|
||||
app_codes:
|
||||
this.filter.app_codes !== ""
|
||||
? this.filter.app_codes.split(/[,\s\n,]/)
|
||||
: null,
|
||||
begin_date: _beginDate,
|
||||
end_date: _endDate,
|
||||
begin_date2: _beginDate2,
|
||||
end_date2: _endDate2,
|
||||
};
|
||||
let resp = await getInventorypo(_filert);
|
||||
this.pageNo = 1;
|
||||
this.datas = resp.data.data;
|
||||
this.datas = sortByKey(resp.data.data, "cpoid");
|
||||
},
|
||||
|
||||
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;
|
||||
}
|
||||
.ivu-table td.demo-table-info-ex {
|
||||
color: #187;
|
||||
font-weight: 600;
|
||||
}
|
||||
body {
|
||||
padding: 10px 1;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user