采购关联报表

This commit is contained in:
zzyuan 2025-07-21 14:25:37 +08:00
parent 759805442c
commit 2ab2ab2feb
1 changed files with 230 additions and 36 deletions

View File

@ -16,44 +16,169 @@
</el-date-picker>
</el-form-item>
<el-form-item label="生产计划单号" prop="productPlanCode">
<el-input v-model="queryParams.productPlanCode" placeholder="请输入生产计划单号" maxlength="20" clearable style="width: 100%"/>
<el-input v-model="queryParams.productPlanCode" placeholder="请输入生产计划单号" maxlength="50" clearable style="width: 100%"/>
</el-form-item>
<el-form-item label="采购计划单号" prop="purchasePlanCode">
<el-input v-model="queryParams.purchasePlanCode" placeholder="请输入采购计划单号" maxlength="20" clearable style="width: 100%"/>
<el-input v-model="queryParams.purchasePlanCode" placeholder="请输入采购计划单号" maxlength="50" clearable style="width: 100%"/>
</el-form-item>
<el-form-item label="采购订单编号" prop="orderGoodsCode">
<el-input v-model="queryParams.orderGoodsCode" placeholder="请输入采购订单编号" maxlength="20" clearable style="width: 100%"/>
<el-input v-model="queryParams.orderGoodsCode" placeholder="请输入采购订单编号" maxlength="50" clearable style="width: 100%"/>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
</el-form>
<div>
<el-table v-loading="loading" :data="tableListData1" height="300">
<el-table-column label="序号" align="center" width="80" type="index">
<template slot-scope="scope">
<span>{{(queryParams1.pageNum - 1) * queryParams1.pageSize + scope.$index + 1}}</span>
</template>
</el-table-column>
<el-table-column label="分解状态" align="center" prop="ifBreakDown" :show-overflow-tooltip="true" width="120">
<template slot-scope="scope">
<span v-if="!scope.row.ifBreakDown">待分解</span>
<span v-if="scope.row.ifBreakDown">已分解</span>
</template>
</el-table-column>
<el-table-column label="生产计划单号" align="center" prop="productionPlanCode" :show-overflow-tooltip="true" />
<el-table-column label="生产计划名称" align="center" prop="productionPlanName" :show-overflow-tooltip="true" />
<el-table-column label="生产计划时间" align="center" prop="detailPlanDate" :show-overflow-tooltip="true">
<template slot-scope="scope">
<span v-for="(item,index) in scope.row.detailPlanDate" :key="index">
<span>{{ item }}</span><span v-if="index<scope.row.detailPlanDate.length-1"></span>
</span>
</template>
</el-table-column>
<el-table-column label="所属区域" align="center" prop="areaName" :show-overflow-tooltip="true"/>
<el-table-column label="所属食堂" align="center" prop="canteenName" :show-overflow-tooltip="true"/>
<el-table-column label="所属档口" align="center" prop="stallName" :show-overflow-tooltip="true"/>
<el-table-column label="生产计划方式" align="center" prop="productionPlanType" :show-overflow-tooltip="true">
<template slot-scope="scope">
<span v-if="scope.row.productionPlanType==1">直接生成</span>
<span v-if="scope.row.productionPlanType==2">按菜谱生成</span>
<span v-if="scope.row.productionPlanType==3">按预定单生成</span>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total1>0"
:total="total1"
:page.sync="queryParams1.pageNum"
:limit.sync="queryParams1.pageSize"
@pagination="getList1"
/>
</div>
<div>
<el-table v-loading="loading" :data="tableListData2" height="300">
<el-table-column label="序号" align="center" width="80" type="index">
<template slot-scope="scope">
<span>{{(queryParams2.pageNum - 1) * queryParams2.pageSize + scope.$index + 1}}</span>
</template>
</el-table-column>
<el-table-column label="是否生成采购订单" align="center" prop="ifBreakDown" :show-overflow-tooltip="true" width="100">
<template slot-scope="scope">
<span v-if="!scope.row.ifBreakDown"></span>
<span v-if="scope.row.ifBreakDown"></span>
</template>
</el-table-column>
<el-table-column label="生产计划单号" align="center" prop="productionPlanId" :show-overflow-tooltip="true" />
<el-table-column label="采购计划单号" align="center" prop="planCode" :show-overflow-tooltip="true" />
<el-table-column label="采购计划时间" align="center" prop="purchaseDate" :show-overflow-tooltip="true" />
<el-table-column label="所属区域" align="center" prop="areaName" :show-overflow-tooltip="true" width="120"/>
<el-table-column label="所属食堂" align="center" prop="canteenName" :show-overflow-tooltip="true" width="120"/>
<el-table-column label="所属档口" align="center" prop="stallName" :show-overflow-tooltip="true" width="120"/>
<el-table-column label="计划采购货品总数量" align="center" prop="totalNum" :show-overflow-tooltip="true" />
<el-table-column label="采购预算金额(元)" align="center" prop="purchaseBudgetTotal" :show-overflow-tooltip="true">
<template slot-scope="scope">
<span>{{ (scope.row.purchaseBudgetTotal/100).toFixed(2) }}</span>
</template>
</el-table-column>
<el-table-column label="计划状态" align="center" prop="status" :show-overflow-tooltip="true" width="110">
<template slot-scope="scope">
<span v-if="scope.row.status==1">待发布</span>
<span v-if="scope.row.status==2">已发布</span>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total2>0"
:total="total2"
:page.sync="queryParams2.pageNum"
:limit.sync="queryParams2.pageSize"
@pagination="getList2"
/>
</div>
<div>
<el-table v-loading="loading" :data="tableListData3" height="300">
<el-table-column label="序号" align="center" width="80" type="index">
<template slot-scope="scope">
<span>{{(queryParams3.pageNum - 1) * queryParams3.pageSize + scope.$index + 1}}</span>
</template>
</el-table-column>
<el-table-column label="合同编号" align="center" prop="contractCode" :show-overflow-tooltip="true" width="180"/>
<el-table-column label="生产计划单号" align="center" prop="productPlanCodeList" :show-overflow-tooltip="true" width="180">
<template slot-scope="scope">
<div v-if="scope.row.productPlanCodeList">
<div v-for="(item,index) in scope.row.productPlanCodeList" :key="index">{{ item }}</div>
</div>
</template>
</el-table-column>
<el-table-column label="采购计划单号" align="center" prop="purchasePlanCodeList" :show-overflow-tooltip="true" width="180">
<template slot-scope="scope">
<div v-if="scope.row.purchasePlanCodeList">
<div v-for="(item,index) in scope.row.purchasePlanCodeList" :key="index">{{ item }}</div>
</div>
</template>
</el-table-column>
<el-table-column label="采购订单号" align="center" prop="orderGoodsCode" :show-overflow-tooltip="true" width="180"/>
<el-table-column label="采购订单标题" align="center" prop="orderTitle" :show-overflow-tooltip="true" width="180"/>
<!-- <el-table-column label="提交状态" align="center" prop="orderStatus" :show-overflow-tooltip="true" width="100">
<template slot-scope="scope">
<span v-if="scope.row.orderStatus==1">待提交</span>
<span v-if="scope.row.orderStatus==2">已提交</span>
</template>
</el-table-column> -->
<!-- <el-table-column label="确认状态" align="center" prop="supplierConfirmStatus" :show-overflow-tooltip="true" width="100">
<template slot-scope="scope">
<span v-if="scope.row.supplierConfirmStatus==1">待确认</span>
<span v-if="scope.row.supplierConfirmStatus==2">确认通过</span>
<span v-if="scope.row.supplierConfirmStatus==3">已拒绝</span>
</template>
</el-table-column> -->
<el-table-column label="订单总金额(元)" align="center" prop="orderAmount" :show-overflow-tooltip="true" width="120">
<template slot-scope="scope">
<span>{{ (scope.row.orderAmount/100).toFixed(2) }}</span>
</template>
</el-table-column>
<el-table-column label="货品总数量" align="center" prop="totalNum" :show-overflow-tooltip="true" width="100"/>
<el-table-column label="供应商" align="center" prop="supplierName" :show-overflow-tooltip="true" width="120"/>
<el-table-column label="交货日期" align="center" prop="requestArrivalTime" :show-overflow-tooltip="true" width="150"/>
<el-table-column label="所属区域-食堂-档口" align="center" prop="" :show-overflow-tooltip="true" width="250">
<template slot-scope="scope">
<span>{{ scope.row.areaName }}-{{ scope.row.canteenName }}-{{ scope.row.stallName }}</span>
</template>
</el-table-column>
<!-- <el-table-column label="所属食堂" align="center" prop="canteenName" :show-overflow-tooltip="true" width="150"/>
<el-table-column label="所属档口" align="center" prop="stallName" :show-overflow-tooltip="true" width="150"/> -->
</el-table>
<el-row :gutter="10" class="mb8">
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<pagination
v-show="total3>0"
:total="total3"
:page.sync="queryParams3.pageNum"
:limit.sync="queryParams3.pageSize"
@pagination="getList3"
/>
<el-table v-loading="loading" :data="tableListData" height="800">
<el-table-column label="序号" align="center" width="80" type="index">
<template slot-scope="scope">
<span>{{(queryParams.pageNum - 1) * queryParams.pageSize + scope.$index + 1}}</span>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
</div>
</div>
</template>
<script>
import { productionPlanPageApi } from "@/api/foodManage/purchaseManage";
import { productionPlanPageApi,purchasePlanPageApi,purchaseOrderPageApi } from "@/api/foodManage/purchaseManage";
export default {
name: "",
dicts: [],
@ -76,13 +201,34 @@ export default {
tableListData: [],
//
queryParams: {
productPlanCode:null,
purchasePlanCode:null,
orderGoodsCode:null,
},
queryParams1: {
pageNum: 1,
pageSize: 10,
},
treeAreaOptions:[],//
canteenOptions:[],//
stallOptions:[],//
supplierOptions:[],
//
total1: 0,
//
tableListData1: [],
queryParams2: {
pageNum: 1,
pageSize: 10,
},
//
total2: 0,
//
tableListData2: [],
queryParams3: {
pageNum: 1,
pageSize: 10,
},
//
total3: 0,
//
tableListData3: [],
dateRange:this.defaultDateRange(),//
pickerOptions: {
shortcuts: [{
@ -114,13 +260,17 @@ export default {
};
},
created() {
// this.getList();
this.handleQuery()
},
methods: {
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
this.queryParams1.pageNum = 1;
this.getList1();
this.queryParams2.pageNum = 1;
this.getList2();
this.queryParams3.pageNum = 1;
this.getList3();
},
/** 重置按钮操作 */
resetQuery() {
@ -129,11 +279,55 @@ export default {
this.handleQuery();
},
/** 查询列表 */
getList() {
getList1() {
this.loading = true;
let param = {
"pageNum": this.queryParams.pageNum,
"pageSize": this.queryParams.pageSize,
"pageNum": this.queryParams1.pageNum,
"pageSize": this.queryParams1.pageSize,
"goodsType":1,
"productPlanCode": this.queryParams.productPlanCode
}
if(this.dateRange&&this.dateRange.length>0){
param.startDateTime=this.formatDateTime(this.dateRange[0])
param.endDateTime=this.formatDateTime(this.dateRange[1])
}else{
param.startDateTime=undefined;
param.endDateTime=undefined;
}
productionPlanPageApi(param).then(response => {
this.tableListData1 = response.rows;
this.total1 = Number(response.total);
this.loading = false;
});
},
/** 查询列表 */
getList2() {
this.loading = true;
let param = {
"pageNum": this.queryParams2.pageNum,
"pageSize": this.queryParams2.pageSize,
"productPlanCode": this.queryParams.productPlanCode,
"purchasePlanCode": this.queryParams.purchasePlanCode,
}
if(this.dateRange&&this.dateRange.length>0){
param.startDateTime=this.formatDateTime(this.dateRange[0])
param.endDateTime=this.formatDateTime(this.dateRange[1])
}else{
param.startDateTime=undefined;
param.endDateTime=undefined;
}
purchasePlanPageApi(param).then(response => {
this.tableListData2 = response.rows;
this.total2 = Number(response.total);
this.loading = false;
});
},
/** 查询列表 */
getList3() {
this.loading = true;
let param = {
"pageNum": this.queryParams3.pageNum,
"pageSize": this.queryParams3.pageSize,
"productPlanCode": this.queryParams.productPlanCode,
"purchasePlanCode": this.queryParams.purchasePlanCode,
"orderGoodsCode": this.queryParams.orderGoodsCode,
@ -145,9 +339,9 @@ export default {
param.startDateTime=undefined;
param.endDateTime=undefined;
}
productionPlanPageApi(param).then(response => {
this.tableListData = response.rows;
this.total = Number(response.total);
purchaseOrderPageApi(param).then(response => {
this.tableListData3 = response.rows;
this.total3 = Number(response.total);
this.loading = false;
});
},