增加采购汇总 查询的 明细
This commit is contained in:
@@ -17,3 +17,7 @@ export const Purchasesumpuapp = (info) => {
|
||||
return axios.post('/api/Purchase/Purchasesumpuapp', info)
|
||||
}
|
||||
|
||||
export const Purchasesummom = (info) => {
|
||||
return axios.post('/api/Purchase/Purchasesummom', info)
|
||||
}
|
||||
|
||||
|
||||
@@ -3,18 +3,17 @@
|
||||
<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 span="3">
|
||||
<label>生产订单期间1</label>
|
||||
<div>
|
||||
<DatePicker v-model="filter.dates" type="daterange"></DatePicker>
|
||||
</div>
|
||||
</Col>
|
||||
<Col span="3">
|
||||
<label>生产订单期间2</label>
|
||||
<div>
|
||||
<DatePicker v-model="filter.dates2" type="daterange"></DatePicker>
|
||||
</div>
|
||||
</Col>
|
||||
<Col span="4">
|
||||
<Button
|
||||
@@ -28,12 +27,51 @@
|
||||
>导出</Button
|
||||
>
|
||||
</Col>
|
||||
|
||||
<Col span="10">
|
||||
<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="20">
|
||||
<Modal
|
||||
width="1366"
|
||||
v-model="modal2"
|
||||
title="缺件详情"
|
||||
@on-cancel="cancel"
|
||||
>
|
||||
<Table
|
||||
style="margin-top: 20px"
|
||||
height="768"
|
||||
size="small"
|
||||
border
|
||||
:columns="columnsDetail2"
|
||||
:data="dataDetail2"
|
||||
>
|
||||
</Table>
|
||||
</Modal>
|
||||
</Col>
|
||||
</Row>
|
||||
</div>
|
||||
|
||||
<Table
|
||||
style="margin-top: 20px"
|
||||
size="small"
|
||||
show-summary
|
||||
border
|
||||
:loading="loading"
|
||||
:columns="columns"
|
||||
@@ -58,7 +96,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { Purchasesum,Purchasesumpuapp } from "@/api/Purchase";
|
||||
import { Purchasesum, Purchasesumpuapp, Purchasesummom } from "@/api/Purchase";
|
||||
import {
|
||||
pageingData,
|
||||
export_col_to_excel,
|
||||
@@ -73,19 +111,21 @@ export default {
|
||||
PageSizeOpts: [10, 15, 20, 30],
|
||||
pageNo: 1,
|
||||
modal1: false,
|
||||
modal2: false,
|
||||
loading: false,
|
||||
strfilter: "",
|
||||
multiple: false,
|
||||
pageSize: 15,
|
||||
dataDetail : [],
|
||||
dataDetail: [],
|
||||
dataDetail2: [],
|
||||
datas: [],
|
||||
filter: {
|
||||
inv_codes: "",
|
||||
inv_std: "",
|
||||
po_codes: "",
|
||||
app_codes: "",
|
||||
dates: [getMonth("s", -6), getMonth("e", 0)],
|
||||
dates2: [getMonth("s", -6), getMonth("e", 2)],
|
||||
dates: [getMonth("s", -1), getMonth("e", 0)],
|
||||
dates2: [getMonth("s", -1), getMonth("e", 1)],
|
||||
by_finish: false,
|
||||
},
|
||||
columnsDetail: [
|
||||
@@ -99,7 +139,7 @@ export default {
|
||||
align: "center",
|
||||
key: "ccode",
|
||||
},
|
||||
{
|
||||
{
|
||||
title: "请购日期",
|
||||
align: "center",
|
||||
key: "dDatel",
|
||||
@@ -125,6 +165,43 @@ export default {
|
||||
key: "RQTY",
|
||||
},
|
||||
],
|
||||
columnsDetail2: [
|
||||
{
|
||||
title: "业务员",
|
||||
align: "center",
|
||||
key: "cpersonname",
|
||||
},
|
||||
{
|
||||
title: "存货编码",
|
||||
align: "center",
|
||||
key: "CINVCODE",
|
||||
},
|
||||
{
|
||||
title: "存货名称",
|
||||
align: "center",
|
||||
key: "cInvName",
|
||||
},
|
||||
{
|
||||
title: "规格型号",
|
||||
align: "center",
|
||||
key: "cInvStd",
|
||||
},
|
||||
{
|
||||
title: "需求数量",
|
||||
align: "center",
|
||||
key: "iqty",
|
||||
},
|
||||
{
|
||||
title: "现存量",
|
||||
align: "center",
|
||||
key: "iQuantity",
|
||||
},
|
||||
{
|
||||
title: "补料量",
|
||||
align: "center",
|
||||
key: "bull",
|
||||
},
|
||||
],
|
||||
columns: [
|
||||
{
|
||||
title: "业务员",
|
||||
@@ -132,7 +209,7 @@ export default {
|
||||
key: "cpersonname",
|
||||
},
|
||||
{
|
||||
title: "未下单记录",
|
||||
title: "请购未下单记录",
|
||||
align: "center",
|
||||
key: "puappnumall",
|
||||
|
||||
@@ -165,7 +242,7 @@ export default {
|
||||
title: "请购三天后未下单记录",
|
||||
align: "center",
|
||||
key: "puappnum03",
|
||||
render: (h, params) => {
|
||||
render: (h, params) => {
|
||||
return h("div", [
|
||||
h(
|
||||
"a",
|
||||
@@ -193,11 +270,57 @@ export default {
|
||||
title: "两个月内计划工单缺品种数",
|
||||
align: "center",
|
||||
key: "mommouth02",
|
||||
render: (h, params) => {
|
||||
return h("div", [
|
||||
h(
|
||||
"a",
|
||||
{
|
||||
props: {
|
||||
type: "primary",
|
||||
size: "small",
|
||||
},
|
||||
style: { color: "#2db7f5" },
|
||||
domProps: {
|
||||
title: params.row.mommouth02, //添加title属性
|
||||
},
|
||||
on: {
|
||||
click: () => {
|
||||
this.handleShow3(params.row.cpersonname); //点击事件
|
||||
},
|
||||
},
|
||||
},
|
||||
params.row.mommouth02
|
||||
),
|
||||
]);
|
||||
},
|
||||
},
|
||||
{
|
||||
title: "四个月内计划工单缺品种数",
|
||||
align: "center",
|
||||
key: "mommouth04",
|
||||
render: (h, params) => {
|
||||
return h("div", [
|
||||
h(
|
||||
"a",
|
||||
{
|
||||
props: {
|
||||
type: "primary",
|
||||
size: "small",
|
||||
},
|
||||
style: { color: "#2db7f5" },
|
||||
domProps: {
|
||||
title: params.row.mommouth04, //添加title属性
|
||||
},
|
||||
on: {
|
||||
click: () => {
|
||||
this.handleShow4(params.row.cpersonname); //点击事件
|
||||
},
|
||||
},
|
||||
},
|
||||
params.row.mommouth04
|
||||
),
|
||||
]);
|
||||
},
|
||||
},
|
||||
],
|
||||
};
|
||||
@@ -222,33 +345,131 @@ export default {
|
||||
this.loadData();
|
||||
},
|
||||
async handleShow(h) {
|
||||
let _filert2 = {
|
||||
let _filert2 = {
|
||||
cpersonname: h,
|
||||
cInvCode: null,
|
||||
cday:0
|
||||
cday: 0,
|
||||
};
|
||||
let respd = await Purchasesumpuapp(_filert2);
|
||||
this.dataDetail = sortByKey(respd.data.data, "ccode");
|
||||
this.dataDetail = sortByKey(respd.data.data, "ccode");
|
||||
this.modal1 = true;
|
||||
},
|
||||
async handleShow2(h) {
|
||||
let _filert2 = {
|
||||
let _filert2 = {
|
||||
cpersonname: h,
|
||||
cInvCode: null,
|
||||
cday:3
|
||||
cday: 3,
|
||||
};
|
||||
let respd = await Purchasesumpuapp(_filert2);
|
||||
this.dataDetail = sortByKey(respd.data.data, "ccode");
|
||||
this.dataDetail = sortByKey(respd.data.data, "ccode");
|
||||
this.modal1 = true;
|
||||
},
|
||||
async handleShow3(h) {
|
||||
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 = {
|
||||
cpersonname: h,
|
||||
cInvCode: null,
|
||||
|
||||
begin_date: _beginDate,
|
||||
end_date: _endDate,
|
||||
|
||||
};
|
||||
|
||||
let respd = await Purchasesummom(_filert);
|
||||
this.dataDetail2 = sortByKey(respd.data.data, "CINVCODE");
|
||||
this.modal2 = true;
|
||||
},
|
||||
async handleShow4(h) {
|
||||
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 = {
|
||||
cpersonname: h,
|
||||
cInvCode: null,
|
||||
|
||||
begin_date: _beginDate2,
|
||||
end_date: _endDate2,
|
||||
|
||||
};
|
||||
let respd = await Purchasesummom(_filert);
|
||||
this.dataDetail2 = sortByKey(respd.data.data, "CINVCODE");
|
||||
this.modal2 = true;
|
||||
},
|
||||
cancel() {
|
||||
this.dataDetail = [];
|
||||
this.dataDetail2 = [];
|
||||
this.modal1 = false;
|
||||
this.modal2 = false;
|
||||
},
|
||||
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 = {
|
||||
|
||||
begin_date: _beginDate,
|
||||
end_date: _endDate,
|
||||
begin_date2: _beginDate2,
|
||||
end_date2: _endDate2,
|
||||
|
||||
};
|
||||
|
||||
try {
|
||||
this.loading = true;
|
||||
let resp = await Purchasesum();
|
||||
let resp = await Purchasesum(_filert);
|
||||
this.pageNo = 1;
|
||||
this.datas = resp.data.data;
|
||||
// this.datas = sortByKey(resp.data.data, "cordercode");
|
||||
|
||||
Reference in New Issue
Block a user