采购报表
This commit is contained in:
@@ -13,7 +13,9 @@
|
||||
<MenuItem to="/InventorySo" name="3-5">销售订单表</MenuItem>
|
||||
<MenuItem to="/inventory-SNDetail" name="3-6">序列号查询</MenuItem>
|
||||
<MenuItem to="/inventorybu" name="3-7">补料量查询</MenuItem>
|
||||
<MenuItem to="/inventorypo" name="3-8">采购订单列表</MenuItem>
|
||||
<MenuItem to="/inventorypo" name="3-8">采购订单列表(PMC)</MenuItem>
|
||||
<MenuItem to="/inventorypoc" name="3-9">采购跟进表(采购部)</MenuItem>
|
||||
<MenuItem to="/Purchasesum" name="3-99">采购查询汇总</MenuItem>
|
||||
</MenuGroup>
|
||||
</Submenu>
|
||||
</Menu>
|
||||
|
||||
19
NX.ERP.Webapp/src/api/Purchase.js
Normal file
19
NX.ERP.Webapp/src/api/Purchase.js
Normal file
@@ -0,0 +1,19 @@
|
||||
import axios from 'axios'
|
||||
|
||||
|
||||
export const InventoryPoc = (info) => {
|
||||
return axios.post('/api/Purchase/InventoryPoc', info)
|
||||
}
|
||||
|
||||
export const Userrole = (info) => {
|
||||
return axios.post('/api/System/Userrole', info)
|
||||
}
|
||||
|
||||
export const Purchasesum = (info) => {
|
||||
return axios.post('/api/Purchase/Purchasesum', info)
|
||||
}
|
||||
|
||||
export const Purchasesumpuapp = (info) => {
|
||||
return axios.post('/api/Purchase/Purchasesumpuapp', info)
|
||||
}
|
||||
|
||||
@@ -6,6 +6,9 @@ import InventorySo from '@/views/inventory-so.vue'
|
||||
import inventorySNDetail from '@/views/inventory-SNDetail.vue'
|
||||
import inventorybu from '@/views/inventory-bu.vue'
|
||||
import inventorypo from '@/views/inventory-po.vue'
|
||||
import inventorypoc from '@/views/inventory-poc.vue'
|
||||
import Purchasesum from '@/views/Purchasesum.vue'
|
||||
|
||||
export default [
|
||||
{
|
||||
path: '/',
|
||||
@@ -19,5 +22,7 @@ export default [
|
||||
{ path: '/inventory-SNDetail', component: inventorySNDetail },
|
||||
{ path: '/InventorySo', component: InventorySo },
|
||||
{ path: '/inventorybu', component: inventorybu },
|
||||
{ path: '/inventorypo', component: inventorypo }
|
||||
{ path: '/inventorypo', component: inventorypo },
|
||||
{ path: '/inventorypoc', component: inventorypoc },
|
||||
{ path: '/Purchasesum', component: Purchasesum }
|
||||
]
|
||||
|
||||
312
NX.ERP.Webapp/src/views/Purchasesum.vue
Normal file
312
NX.ERP.Webapp/src/views/Purchasesum.vue
Normal file
@@ -0,0 +1,312 @@
|
||||
<template>
|
||||
<div>
|
||||
<h4>采购查询汇总</h4>
|
||||
<div>
|
||||
<Row :gutter="16">
|
||||
<Col span="20">
|
||||
<Modal width="1366" v-model="modal1" title="详情" @on-cancel="cancel">
|
||||
<Table
|
||||
style="margin-top: 20px"
|
||||
height="768"
|
||||
size="small"
|
||||
border
|
||||
:columns="columnsDetail"
|
||||
:data="dataDetail"
|
||||
>
|
||||
</Table>
|
||||
</Modal>
|
||||
</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
|
||||
:loading="loading"
|
||||
: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 { Purchasesum,Purchasesumpuapp } from "@/api/Purchase";
|
||||
import {
|
||||
pageingData,
|
||||
export_col_to_excel,
|
||||
dateFormatFull,
|
||||
dateFormat,
|
||||
sortByKey,
|
||||
getMonth,
|
||||
} from "@/libs/tools";
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
PageSizeOpts: [10, 15, 20, 30],
|
||||
pageNo: 1,
|
||||
modal1: false,
|
||||
loading: false,
|
||||
strfilter: "",
|
||||
multiple: false,
|
||||
pageSize: 15,
|
||||
dataDetail : [],
|
||||
datas: [],
|
||||
filter: {
|
||||
inv_codes: "",
|
||||
inv_std: "",
|
||||
po_codes: "",
|
||||
app_codes: "",
|
||||
dates: [getMonth("s", -6), getMonth("e", 0)],
|
||||
dates2: [getMonth("s", -6), getMonth("e", 2)],
|
||||
by_finish: false,
|
||||
},
|
||||
columnsDetail: [
|
||||
{
|
||||
title: "业务员",
|
||||
align: "center",
|
||||
key: "cMaker",
|
||||
},
|
||||
{
|
||||
title: "请购单号",
|
||||
align: "center",
|
||||
key: "ccode",
|
||||
},
|
||||
{
|
||||
title: "请购日期",
|
||||
align: "center",
|
||||
key: "dDatel",
|
||||
},
|
||||
{
|
||||
title: "存货编码",
|
||||
align: "center",
|
||||
key: "cInvCode",
|
||||
},
|
||||
{
|
||||
title: "存货名称",
|
||||
align: "center",
|
||||
key: "cinvname",
|
||||
},
|
||||
{
|
||||
title: "规格型号",
|
||||
align: "center",
|
||||
key: "cinvstd",
|
||||
},
|
||||
{
|
||||
title: "数量",
|
||||
align: "center",
|
||||
key: "RQTY",
|
||||
},
|
||||
],
|
||||
columns: [
|
||||
{
|
||||
title: "业务员",
|
||||
align: "center",
|
||||
key: "cpersonname",
|
||||
},
|
||||
{
|
||||
title: "未下单记录",
|
||||
align: "center",
|
||||
key: "puappnumall",
|
||||
|
||||
render: (h, params) => {
|
||||
return h("div", [
|
||||
h(
|
||||
"a",
|
||||
{
|
||||
props: {
|
||||
type: "primary",
|
||||
size: "small",
|
||||
},
|
||||
style: { color: "#2db7f5" },
|
||||
domProps: {
|
||||
title: params.row.puappnumall, //添加title属性
|
||||
},
|
||||
on: {
|
||||
click: () => {
|
||||
this.handleShow(params.row.cpersonname); //点击事件
|
||||
},
|
||||
},
|
||||
},
|
||||
params.row.puappnumall
|
||||
),
|
||||
]);
|
||||
},
|
||||
},
|
||||
|
||||
{
|
||||
title: "请购三天后未下单记录",
|
||||
align: "center",
|
||||
key: "puappnum03",
|
||||
render: (h, params) => {
|
||||
return h("div", [
|
||||
h(
|
||||
"a",
|
||||
{
|
||||
props: {
|
||||
type: "primary",
|
||||
size: "small",
|
||||
},
|
||||
style: { color: "#2db7f5" },
|
||||
domProps: {
|
||||
title: params.row.puappnum03, //添加title属性
|
||||
},
|
||||
on: {
|
||||
click: () => {
|
||||
this.handleShow2(params.row.cpersonname); //点击事件
|
||||
},
|
||||
},
|
||||
},
|
||||
params.row.puappnum03
|
||||
),
|
||||
]);
|
||||
},
|
||||
},
|
||||
{
|
||||
title: "两个月内计划工单缺品种数",
|
||||
align: "center",
|
||||
key: "mommouth02",
|
||||
},
|
||||
{
|
||||
title: "四个月内计划工单缺品种数",
|
||||
align: "center",
|
||||
key: "mommouth04",
|
||||
},
|
||||
],
|
||||
};
|
||||
},
|
||||
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 handleShow(h) {
|
||||
let _filert2 = {
|
||||
cpersonname: h,
|
||||
cInvCode: null,
|
||||
cday:0
|
||||
};
|
||||
let respd = await Purchasesumpuapp(_filert2);
|
||||
this.dataDetail = sortByKey(respd.data.data, "ccode");
|
||||
this.modal1 = true;
|
||||
},
|
||||
async handleShow2(h) {
|
||||
let _filert2 = {
|
||||
cpersonname: h,
|
||||
cInvCode: null,
|
||||
cday:3
|
||||
};
|
||||
let respd = await Purchasesumpuapp(_filert2);
|
||||
this.dataDetail = sortByKey(respd.data.data, "ccode");
|
||||
this.modal1 = true;
|
||||
},
|
||||
cancel() {
|
||||
this.dataDetail = [];
|
||||
this.modal1 = false;
|
||||
},
|
||||
async loadData() {
|
||||
try {
|
||||
this.loading = true;
|
||||
let resp = await Purchasesum();
|
||||
this.pageNo = 1;
|
||||
this.datas = resp.data.data;
|
||||
// this.datas = sortByKey(resp.data.data, "cordercode");
|
||||
} catch (error) {
|
||||
} finally {
|
||||
this.loading = false;
|
||||
}
|
||||
},
|
||||
|
||||
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>
|
||||
@@ -105,16 +105,16 @@ export default {
|
||||
inv_std: "",
|
||||
po_codes: "",
|
||||
app_codes: "",
|
||||
dates: [getMonth("s", -1), getMonth("e", 0)],
|
||||
dates: [getMonth("s", -6), getMonth("e", 0)],
|
||||
dates2: [],
|
||||
by_finish: false
|
||||
},
|
||||
},
|
||||
columns: [
|
||||
{
|
||||
title: "采购订单号",
|
||||
align: "center",
|
||||
key: "cpoid",
|
||||
width: 110,
|
||||
|
||||
},
|
||||
|
||||
{
|
||||
|
||||
335
NX.ERP.Webapp/src/views/inventory-poc.vue
Normal file
335
NX.ERP.Webapp/src/views/inventory-poc.vue
Normal file
@@ -0,0 +1,335 @@
|
||||
<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="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
|
||||
:loading="loading"
|
||||
: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 { InventoryPoc } from "@/api/Purchase";
|
||||
import {
|
||||
pageingData,
|
||||
export_col_to_excel,
|
||||
dateFormatFull,
|
||||
dateFormat,
|
||||
sortByKey,
|
||||
getMonth,
|
||||
} from "@/libs/tools";
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
PageSizeOpts: [10, 15, 20, 30],
|
||||
pageNo: 1,
|
||||
loading: false,
|
||||
strfilter: "",
|
||||
multiple: false,
|
||||
pageSize: 15,
|
||||
datas: [],
|
||||
filter: {
|
||||
inv_codes: "",
|
||||
inv_std: "",
|
||||
po_codes: "",
|
||||
app_codes: "",
|
||||
dates: [getMonth("s", -6), getMonth("e", 0)],
|
||||
dates2: [getMonth("s", -6), getMonth("e", 2)],
|
||||
by_finish: false
|
||||
},
|
||||
columns: [
|
||||
{
|
||||
title: "业务员",
|
||||
align: "center",
|
||||
key: "cpersonname",
|
||||
|
||||
},
|
||||
{
|
||||
title: "订单号",
|
||||
align: "center",
|
||||
key: "cordercode",
|
||||
|
||||
},
|
||||
|
||||
{
|
||||
title: "订单日期",
|
||||
align: "center",
|
||||
key: "dpodate",
|
||||
},
|
||||
{
|
||||
title: "预计到货日期",
|
||||
align: "center",
|
||||
key: "dArriveDate",
|
||||
},
|
||||
{
|
||||
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: "iquantity",
|
||||
width: 100,
|
||||
},
|
||||
{
|
||||
title: "未交量",
|
||||
align: "center",
|
||||
key: "wjh",
|
||||
width: 100,
|
||||
},
|
||||
{
|
||||
title: "未入库",
|
||||
align: "center",
|
||||
key: "wrk",
|
||||
width: 100,
|
||||
},
|
||||
{
|
||||
title: "现存量",
|
||||
align: "center",
|
||||
key: "xcl",
|
||||
width: 100,
|
||||
},
|
||||
{
|
||||
title: "缺料量",
|
||||
align: "center",
|
||||
key: "qll",
|
||||
width: 100,
|
||||
},
|
||||
{
|
||||
title: "补料量",
|
||||
align: "center",
|
||||
key: "bull",
|
||||
width: 100,
|
||||
},
|
||||
{
|
||||
title: "本月出库",
|
||||
align: "center",
|
||||
key: "iQuantity00",
|
||||
width: 100,
|
||||
},
|
||||
{
|
||||
title: "上月出库",
|
||||
align: "center",
|
||||
key: "iQuantity01",
|
||||
width: 100,
|
||||
},
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
],
|
||||
};
|
||||
},
|
||||
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() {
|
||||
try {
|
||||
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,
|
||||
by_finish: this.filter.by_finish
|
||||
};
|
||||
this.loading = true;
|
||||
let resp = await InventoryPoc(_filert);
|
||||
this.pageNo = 1;
|
||||
this.datas = resp.data.data;
|
||||
this.datas = sortByKey(resp.data.data, "cordercode");
|
||||
} catch (error) {
|
||||
} finally {
|
||||
this.loading = false;
|
||||
}
|
||||
},
|
||||
|
||||
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