Merge remote-tracking branch 'origin/master'

master
夜笙歌 8 months ago
commit cd41aed13d

@ -42,3 +42,12 @@ export function delDayDnb(objId) {
method: 'delete'
})
}
// 查询统计能耗报表
export function energyStatisticalReportList(query) {
return request({
url: '/report/DayDnb/energyStatisticalReportList',
method: 'get',
params: query
})
}

@ -0,0 +1,44 @@
import request from '@/utils/request'
// 查询成品下线异常记录列表
export function listRecordException(query) {
return request({
url: '/report/recordException/list',
method: 'get',
params: query
})
}
// 查询成品下线异常记录详细
export function getRecordException(objId) {
return request({
url: '/report/recordException/' + objId,
method: 'get'
})
}
// 新增成品下线异常记录
export function addRecordException(data) {
return request({
url: '/report/recordException',
method: 'post',
data: data
})
}
// 修改成品下线异常记录
export function updateRecordException(data) {
return request({
url: '/report/recordException',
method: 'put',
data: data
})
}
// 删除成品下线异常记录
export function delRecordException(objId) {
return request({
url: '/report/recordException/' + objId,
method: 'delete'
})
}

@ -42,3 +42,11 @@ export function delRepairMeasures(objId) {
method: 'delete'
})
}
// 查询返修措施维护详细
export function findRepairMeasuresList(objId) {
return request({
url: '/report/repairMeasures/getRepairMeasures',
method: 'get'
})
}

@ -36,6 +36,15 @@ export function WIPInquiryReportList(query) {
})
}
// 查询在制品明细报表
export function WIPInquiryDetailReportList(query) {
return request({
url: '/report/productionReport/WIPInquiryDetailReportList',
method: 'get',
params: query
})
}
// 扫描下线记录报表
export function ScanOfflineRecordReportList(query) {
return request({
@ -143,3 +152,21 @@ export function repairRateReportList(query) {
params: query
})
}
// 箱体流转追溯报表
export function boxTurnoverTraceabilityReportList(query) {
return request({
url: '/report/productionReport/boxTurnoverTraceabilityReportList',
method: 'get',
params: query
})
}
// 箱体流转追溯报表明细
export function boxTurnoverTraceabilityDetailReportList(query) {
return request({
url: '/report/productionReport/boxTurnoverTraceabilityDetailReportList',
method: 'get',
params: query
})
}

@ -28,14 +28,14 @@
</el-col>
<el-col :span="20" :xs="24">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="100px">
<el-form-item label="计量设备编号" prop="monitorId">
<el-input
v-model="queryParams.monitorId"
placeholder="请输入计量设备编号"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<!-- <el-form-item label="计量设备编号" prop="monitorId">-->
<!-- <el-input-->
<!-- v-model="queryParams.monitorId"-->
<!-- placeholder="请输入计量设备编号"-->
<!-- clearable-->
<!-- @keyup.enter.native="handleQuery"-->
<!-- />-->
<!-- </el-form-item>-->
<el-form-item label="采集时间">
<el-date-picker
v-model="daterangeCollectTime"
@ -43,8 +43,8 @@
value-format="yyyy-MM-dd HH:mm:ss"
type="datetimerange"
range-separator="-"
start-placeholder="开始日期"
end-placeholder="结束日期"
start-placeholder="开始时间"
end-placeholder="结束时间"
></el-date-picker>
</el-form-item>
<el-form-item label="采集方式" prop="collectType">
@ -112,8 +112,8 @@
<el-table v-loading="loading" :data="dnbInstantList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="主键标识" align="center" prop="objId" v-if="columns[0].visible"/>
<el-table-column label="计量设备编号" align="center" prop="monitorId" v-if="columns[1].visible"/>
<el-table-column label="计量设备名称" align="center" prop="monitorName" v-if="columns[21].visible"/>
<el-table-column label="计量设备编号" align="center" prop="monitorId" v-if="columns[1].visible" width="120"/>
<el-table-column label="计量设备名称" align="center" prop="monitorName" v-if="columns[21].visible" width="150"/>
<el-table-column label="采集时间" align="center" prop="collectTime" width="180" v-if="columns[2].visible">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.collectTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
@ -157,24 +157,24 @@
</template>
</el-table-column>
<el-table-column label="工厂编号" align="center" prop="factoryCode" v-if="columns[20].visible"/>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
v-hasPermi="['base:dnbInstant:edit']"
>修改</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['base:dnbInstant:remove']"
>删除</el-button>
</template>
</el-table-column>
<!-- <el-table-column label="操作" align="center" class-name="small-padding fixed-width">-->
<!-- <template slot-scope="scope">-->
<!-- <el-button-->
<!-- size="mini"-->
<!-- type="text"-->
<!-- icon="el-icon-edit"-->
<!-- @click="handleUpdate(scope.row)"-->
<!-- v-hasPermi="['base:dnbInstant:edit']"-->
<!-- >修改</el-button>-->
<!-- <el-button-->
<!-- size="mini"-->
<!-- type="text"-->
<!-- icon="el-icon-delete"-->
<!-- @click="handleDelete(scope.row)"-->
<!-- v-hasPermi="['base:dnbInstant:remove']"-->
<!-- >删除</el-button>-->
<!-- </template>-->
<!-- </el-table-column>-->
</el-table>
<pagination
@ -271,6 +271,7 @@
<script>
import { listDnbInstant, getDnbInstant, delDnbInstant, addDnbInstant, updateDnbInstant } from "@/api/base/dnbInstant";
import { getMonitorInfoTree } from '@/api/report/pointDnb'
import { parseTime } from '@//utils/ruoyi'
export default {
name: "DnbInstant",
@ -345,7 +346,7 @@ export default {
{ key: 7, label: `B项电流`, visible: true },
{ key: 8, label: `C项电流`, visible: true },
{ key: 9, label: `记录时间`, visible: false },
{ key: 10, label: `功率因数`, visible: true },
{ key: 10, label: `功率因数`, visible: false },
{ key: 11, label: `正向有功`, visible: true },
{ key: 12, label: `有功功率`, visible: false },
{ key: 13, label: `无功功率`, visible: false },
@ -367,6 +368,9 @@ export default {
}
},
created() {
const nowDate = parseTime(new Date(), '{y}-{m}-{d}')
this.daterangeCollectTime[0] = nowDate + ' 00:00:00'
this.daterangeCollectTime[1] = nowDate + ' 23:59:59'
this.getList();
this.getDeptTrees();
},

@ -49,7 +49,7 @@
:tree-props="{children: 'children', hasChildren: 'hasChildren'}"
>
<el-table-column label="父级编号" prop="parentId" v-if="columns[0].visible"/>
<el-table-column label="计量设备编号" align="center" prop="monitorCode" v-if="columns[15].visible"/>
<el-table-column label="计量设备编号" align="center" prop="monitorCode" v-if="columns[15].visible" width="160"/>
<el-table-column label="计量设备名称" align="center" prop="monitorName" v-if="columns[1].visible"/>
<el-table-column label="计量设备位置" align="center" prop="monitorAddress" v-if="columns[2].visible"/>
<el-table-column label="计量设备类型" align="center" prop="monitorType" v-if="columns[3].visible">
@ -92,7 +92,7 @@
<span>{{ parseTime(scope.row.updatedTime, '{y}-{m}-{d}') }}</span>
</template>
</el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="160">
<template slot-scope="scope">
<el-button
size="mini"

@ -120,10 +120,10 @@
<el-table v-loading="loading" :data="monitorWorkUnitList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center"/>
<el-table-column label="主键标识" align="center" prop="objId" v-if="columns[0].visible"/>
<el-table-column label="计量设备编号" align="center" prop="monitorCode" v-if="columns[1].visible"/>
<el-table-column label="计量设备名称" align="center" prop="monitorName" v-if="columns[13].visible"/>
<el-table-column label="统计单元编号" align="center" prop="workUnitCode" v-if="columns[2].visible"/>
<el-table-column label="统计单元名称" align="center" prop="workUnitName" v-if="columns[14].visible"/>
<el-table-column label="统计单元编号" align="center" prop="workUnitCode" v-if="columns[2].visible" width="130"/>
<el-table-column label="统计单元名称" align="center" prop="workUnitName" v-if="columns[14].visible" width="130"/>
<el-table-column label="计量设备编号" align="center" prop="monitorCode" v-if="columns[1].visible" width="130"/>
<el-table-column label="计量设备名称" align="center" prop="monitorName" v-if="columns[13].visible" width="130"/>
<el-table-column label="计量设备类型" align="center" prop="monitorType" v-if="columns[4].visible">
<template slot-scope="scope">
<dict-tag :options="dict.type.monitor_type" :value="scope.row.monitorType"/>
@ -191,15 +191,15 @@
</el-row>
<!-- 添加或修改统计计量信息对话框 -->
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
<el-form-item label="统计单元" prop="workUnitCode">
<treeselect v-model="form.workUnitCode" :options="workUnitOptions" :normalizer="workUnitOptionsNormalizer"
placeholder="请选择统计单元"/>
</el-form-item>
<el-form-item label="计量设备名称" prop="monitorCode">
<treeselect v-model="form.monitorCode" :options="monitorInfoOptions" :normalizer="normalizer"
placeholder="请选择计量设备"/>
</el-form-item>
<el-form-item label="统计单元编号" prop="workUnitCode">
<treeselect v-model="form.workUnitCode" :options="workUnitOptions" :normalizer="workUnitOptionsNormalizer"
placeholder="请选择父级编号"/>
</el-form-item>
<!-- <el-form-item label="计量设备编号" prop="monitorCode">-->
<!-- <el-input v-model="form.monitorCode" placeholder="请输入计量设备编号" />-->
<!-- </el-form-item>-->
@ -342,7 +342,7 @@ export default {
{key: 4, label: `计量设备类型`, visible: true},
{key: 5, label: `计算方式`, visible: true},
{key: 6, label: `比率`, visible: true},
{key: 7, label: `备注`, visible: true},
{key: 7, label: `备注`, visible: false},
{key: 8, label: `启用标识`, visible: false},
{key: 9, label: `创建人`, visible: false},
{key: 10, label: `创建时间`, visible: false},
@ -436,7 +436,7 @@ export default {
monitorStatus: 0,
monitorType: 1,
formulaMode: 0,
proportion: null,
proportion: 1,
remark: null,
isFlag: 0,
createdBy: null,

@ -2,7 +2,7 @@
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="100px">
<el-form-item label="工作中心" prop="workCenterCode">
<el-select v-model="queryParams.workCenterCode" placeholder="请选择工作中心" clearable>
<el-select v-model="queryParams.workCenterCode" placeholder="请选择工作中心" clearable style="width: 150px;">
<el-option
v-for="item in productLineList"
:key="item.workCenterCode"
@ -14,9 +14,10 @@
<el-form-item label="SAP计划编号" prop="orderCode">
<el-input
v-model="queryParams.orderCode"
placeholder="请输入SAP计划编号"
placeholder="请输入计划编号"
clearable
@keyup.enter.native="handleQuery"
style="width: 150px;"
/>
</el-form-item>
<el-form-item label="物料编号" prop="materialCode">
@ -25,6 +26,7 @@
placeholder="请输入物料编号"
clearable
@keyup.enter.native="handleQuery"
style="width: 150px;"
/>
</el-form-item>
<el-form-item label="物料名称" prop="materialName">
@ -33,10 +35,11 @@
placeholder="请输入物料名称"
clearable
@keyup.enter.native="handleQuery"
style="width: 150px;"
/>
</el-form-item>
<el-form-item label="工单类型" prop="orderType">
<el-select v-model="queryParams.orderType" placeholder="请选择工单类型" clearable>
<el-select v-model="queryParams.orderType" placeholder="选择工单类型" clearable style="width: 140px;">
<el-option
v-for="dict in dict.type.order_type"
:key="dict.value"
@ -45,6 +48,27 @@
/>
</el-select>
</el-form-item>
<el-form-item label="是否已下达" prop="isRelease">
<el-select v-model="queryParams.isRelease" placeholder="是否已下达到生产计划" clearable style="width: 150px;">
<el-option
v-for="dict in dict.type.is_release"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
<el-form-item label="工单状态" prop="orderStatus">
<el-select v-model="queryParams.orderStatus" placeholder="请选择工单状态" clearable style="width: 150px;">
<el-option
v-for="dict in dict.type.order_status"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
<el-form-item label="计划开始日期">
<el-date-picker
v-model="daterangeEndTime"
@ -56,26 +80,8 @@
end-placeholder="结束日期"
></el-date-picker>
</el-form-item>
<!-- <el-form-item label="工单状态" prop="orderStatus">-->
<!-- <el-select v-model="queryParams.orderStatus" placeholder="请选择工单状态" clearable>-->
<!-- <el-option-->
<!-- v-for="dict in dict.type.order_status"-->
<!-- :key="dict.value"-->
<!-- :label="dict.label"-->
<!-- :value="dict.value"-->
<!-- />-->
<!-- </el-select>-->
<!-- </el-form-item>-->
<el-form-item label="是否已下达" prop="isRelease">
<el-select v-model="queryParams.isRelease" placeholder="是否已下达到生产计划" clearable>
<el-option
v-for="dict in dict.type.is_release"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</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>
@ -248,6 +254,16 @@
<el-form-item label="SAP计划编号" prop="orderCode">
<el-input v-model="form.orderCode" placeholder="请输入SAP计划编号"/>
</el-form-item>
<el-form-item label="工作中心" prop="workCenterCode">
<el-select v-model="form.workCenterCode" placeholder="请选择工作中心">
<el-option
v-for="item in productLineList"
:key="item.workCenterCode"
:label="item.workCenterName"
:value="item.workCenterCode"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="销售订单编号" prop="saleOrderCode">
<el-input v-model="form.saleOrderCode" placeholder="请输入销售订单编号"/>
</el-form-item>
@ -260,15 +276,15 @@
<el-form-item label="物料名称" prop="materialName">
<el-input v-model="form.materialName" placeholder="请输入物料名称"/>
</el-form-item>
<el-form-item label="物料组" prop="matkl">
<el-input v-model="form.matkl" placeholder="请输入物料组"/>
</el-form-item>
<!-- <el-form-item label="物料组" prop="matkl">-->
<!-- <el-input v-model="form.matkl" placeholder="请输入物料组"/>-->
<!-- </el-form-item>-->
<el-form-item label="订单计划数量" prop="orderAmount">
<el-input v-model="form.orderAmount" placeholder="请输入订单计划数量"/>
</el-form-item>
<el-form-item label="完成数量" prop="completeAmount">
<el-input v-model="form.completeAmount" placeholder="请输入完成数量"/>
</el-form-item>
<!-- <el-form-item label="完成数量" prop="completeAmount">-->
<!-- <el-input v-model="form.completeAmount" placeholder="请输入完成数量"/>-->
<!-- </el-form-item>-->
<el-form-item label="工单类型" prop="orderType">
<el-select v-model="form.orderType" placeholder="请选择工单类型">
<el-option
@ -301,7 +317,7 @@
</el-date-picker>
</el-form-item>
<el-form-item label="工厂编码" prop="factoryCode">
<el-input v-model="form.factoryCode" placeholder="请输入工厂编码"/>
<el-input v-model="form.factoryCode" placeholder="请输入工厂编码" :disabled="true"/>
</el-form-item>
<el-form-item label="完成日期" prop="completeDate">
<el-date-picker clearable
@ -497,7 +513,7 @@ export default {
orderStatus: null,
beginDate: null,
endDate: null,
factoryCode: null,
factoryCode: '1301',
isFlag: 0,
isRelease: null,
createdBy: null,

@ -67,13 +67,13 @@
v-if="refreshTable"
v-loading="loading"
:data="workUnitList"
row-key="workUnitCode"
row-key="objId"
:default-expand-all="isExpandAll"
:tree-props="{children: 'children', hasChildren: 'hasChildren'}"
>
<el-table-column width="90px" label="统计单元编号" prop="workUnitCode" />
<el-table-column label="父级编号" align="center" prop="parentId" />
<el-table-column label="统计单元编号" prop="workUnitCode" width="180" />
<el-table-column label="父级编号" align="center" prop="parentId" v-if="false"/>
<el-table-column label="统计单元名称" align="center" prop="workUnitName" />
<el-table-column label="统计区域" align="center" prop="workUnitAddress" />
<el-table-column label="产线/工位" align="center" prop="productLineName"/>
@ -259,7 +259,7 @@ export default {
delete node.children;
}
return {
id: node.workUnitCode,
id: node.objId,
label: node.workUnitName,
children: node.children
};
@ -269,7 +269,7 @@ export default {
listWorkUnit().then(response => {
this.workUnitOptions = [];
const data = { workUnitCode: 0, workUnitName: '顶级节点', children: [] };
data.children = this.handleTree(response.data, "workUnitCode", "parentId");
data.children = this.handleTree(response.data, "objId", "parentId");
this.workUnitOptions.push(data);
});
},
@ -311,8 +311,8 @@ export default {
handleAdd(row) {
this.reset();
this.getTreeselect();
if (row != null && row.workUnitCode) {
this.form.parentId = row.workUnitCode;
if (row != null && row.objId) {
this.form.parentId = row.objId;
} else {
this.form.parentId = 0;
}

@ -27,166 +27,170 @@
</div>
</el-col>
<el-col :span="20" :xs="24">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch"
label-width="68px"
>
<el-form-item label="采集日期">
<el-date-picker
v-model="daterangeCollectTime"
style="width: 240px"
value-format="yyyy-MM-dd"
type="daterange"
range-separator="-"
start-placeholder="开始日期"
end-placeholder="结束日期"
></el-date-picker>
</el-form-item>
<!-- <el-form-item label="是否标识" prop="isFlag">-->
<!-- <el-select v-model="queryParams.isFlag" placeholder="请选择是否标识" clearable>-->
<!-- <el-option-->
<!-- v-for="dict in dict.type.is_flag"-->
<!-- :key="dict.value"-->
<!-- :label="dict.label"-->
<!-- :value="dict.value"-->
<!-- />-->
<!-- </el-select>-->
<!-- </el-form-item>-->
<!-- <el-form-item label="创建人" prop="createdBy">-->
<!-- <el-input-->
<!-- v-model="queryParams.createdBy"-->
<!-- placeholder="请输入创建人"-->
<!-- clearable-->
<!-- @keyup.enter.native="handleQuery"-->
<!-- />-->
<!-- </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-row :gutter="10" class="mb8">
<!-- <el-col :span="1.5">-->
<!-- <el-button-->
<!-- type="primary"-->
<!-- plain-->
<!-- icon="el-icon-plus"-->
<!-- size="mini"-->
<!-- @click="handleAdd"-->
<!-- v-hasPermi="['report:DayDnb:add']"-->
<!-- >新增</el-button>-->
<!-- </el-col>-->
<!-- <el-col :span="1.5">-->
<!-- <el-button-->
<!-- type="success"-->
<!-- plain-->
<!-- icon="el-icon-edit"-->
<!-- size="mini"-->
<!-- :disabled="single"-->
<!-- @click="handleUpdate"-->
<!-- v-hasPermi="['report:DayDnb:edit']"-->
<!-- >修改</el-button>-->
<!-- </el-col>-->
<!-- <el-col :span="1.5">-->
<!-- <el-button-->
<!-- type="danger"-->
<!-- plain-->
<!-- icon="el-icon-delete"-->
<!-- size="mini"-->
<!-- :disabled="multiple"-->
<!-- @click="handleDelete"-->
<!-- v-hasPermi="['report:DayDnb:remove']"-->
<!-- >删除-->
<!-- </el-button>-->
<!-- </el-col>-->
<el-col :span="1.5">
<el-button
type="warning"
plain
icon="el-icon-download"
size="mini"
@click="handleExport"
v-hasPermi="['report:DayDnb:export']"
>导出
</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList" :columns="columns"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="DayDnbList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center"/>
<el-table-column label="主键标识" align="center" prop="objId" v-if="columns[0].visible"/>
<el-table-column label="计量设备编号" align="center" prop="monitorCode" v-if="columns[1].visible" width="140"/>
<el-table-column label="计量设备名称" align="center" prop="monitorName" v-if="columns[12].visible" width="320"/>
<el-table-column label="耗量" align="center" prop="expend" v-if="columns[3].visible" width="100"/>
<el-table-column label="报表日期" align="center" prop="reportDate" v-if="columns[4].visible" width="250"/>
<el-table-column label="仪表值(kW·h)" align="center" prop="instrumentValue" v-if="columns[2].visible" width="180"/>
<el-table-column label="开始日期" align="center" prop="beginTime" v-if="columns[5].visible"/>
<el-table-column label="结束日期" align="center" prop="endTime" v-if="columns[6].visible"/>
<el-table-column label="是否标识" align="center" prop="isFlag" v-if="columns[7].visible">
<template slot-scope="scope">
<dict-tag :options="dict.type.is_flag" :value="scope.row.isFlag"/>
</template>
</el-table-column>
<el-table-column label="创建人" align="center" prop="createdBy" v-if="columns[8].visible"/>
<el-table-column label="创建时间" align="center" prop="createdTime" width="180" v-if="columns[9].visible">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.createdTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
</template>
</el-table-column>
<el-table-column label="更新人" align="center" prop="updatedBy" v-if="columns[10].visible"/>
<el-table-column label="更新时间" align="center" prop="updatedTime" width="180" v-if="columns[11].visible">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.updatedTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
</template>
</el-table-column>
<!-- <el-table-column label="操作" align="center" class-name="small-padding fixed-width">-->
<!-- <template slot-scope="scope">-->
<!-- <el-button-->
<!-- size="mini"-->
<!-- type="text"-->
<!-- icon="el-icon-edit"-->
<!-- @click="handleUpdate(scope.row)"-->
<!-- v-hasPermi="['report:DayDnb:edit']"-->
<!-- >修改-->
<!-- </el-button>-->
<!-- <el-button-->
<!-- size="mini"-->
<!-- type="text"-->
<!-- icon="el-icon-delete"-->
<!-- @click="handleDelete(scope.row)"-->
<!-- v-hasPermi="['report:DayDnb:remove']"-->
<!-- >删除-->
<!-- </el-button>-->
<!-- </template>-->
<!-- </el-table-column>-->
</el-table>
<el-form-item label="报表日期" prop="reportDate">
<el-input
v-model="queryParams.reportDate"
placeholder="请输入报表日期"
clearable
@keyup.enter.native="handleQuery"
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
</el-form-item>
<el-form-item label="是否标识" prop="isFlag">
<el-select v-model="queryParams.isFlag" placeholder="请选择是否标识" clearable>
<el-option
v-for="dict in dict.type.is_flag"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
<el-form-item label="创建人" prop="createdBy">
<el-input
v-model="queryParams.createdBy"
placeholder="请输入创建人"
clearable
@keyup.enter.native="handleQuery"
/>
</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-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button
type="primary"
plain
icon="el-icon-plus"
size="mini"
@click="handleAdd"
v-hasPermi="['report:DayDnb:add']"
>新增</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="success"
plain
icon="el-icon-edit"
size="mini"
:disabled="single"
@click="handleUpdate"
v-hasPermi="['report:DayDnb:edit']"
>修改</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="danger"
plain
icon="el-icon-delete"
size="mini"
:disabled="multiple"
@click="handleDelete"
v-hasPermi="['report:DayDnb:remove']"
>删除</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="warning"
plain
icon="el-icon-download"
size="mini"
@click="handleExport"
v-hasPermi="['report:DayDnb:export']"
>导出</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList" :columns="columns"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="DayDnbList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="主键标识" align="center" prop="objId" v-if="columns[0].visible"/>
<el-table-column label="计量设备编号" align="center" prop="monitorCode" v-if="columns[1].visible"/>
<el-table-column label="仪表值" align="center" prop="instrumentValue" v-if="columns[2].visible"/>
<el-table-column label="耗量" align="center" prop="expend" v-if="columns[3].visible"/>
<el-table-column label="报表日期" align="center" prop="reportDate" v-if="columns[4].visible"/>
<el-table-column label="开始时间" align="center" prop="beginTime" v-if="columns[5].visible"/>
<el-table-column label="结束时间" align="center" prop="endTime" v-if="columns[6].visible"/>
<el-table-column label="是否标识" align="center" prop="isFlag" v-if="columns[7].visible">
<template slot-scope="scope">
<dict-tag :options="dict.type.is_flag" :value="scope.row.isFlag"/>
</template>
</el-table-column>
<el-table-column label="创建人" align="center" prop="createdBy" v-if="columns[8].visible"/>
<el-table-column label="创建时间" align="center" prop="createdTime" width="180" v-if="columns[9].visible">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.createdTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
</template>
</el-table-column>
<el-table-column label="更新人" align="center" prop="updatedBy" v-if="columns[10].visible"/>
<el-table-column label="更新时间" align="center" prop="updatedTime" width="180" v-if="columns[11].visible">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.updatedTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
</template>
</el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
v-hasPermi="['report:DayDnb:edit']"
>修改</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['report:DayDnb:remove']"
>删除</el-button>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
</el-col>
</el-row>
<!-- 添加或修改电日耗报对话框 -->
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-form-item label="计量设备编号" prop="monitorCode">
<el-input v-model="form.monitorCode" placeholder="请输入计量设备编号" />
<el-input v-model="form.monitorCode" placeholder="请输入计量设备编号"/>
</el-form-item>
<el-form-item label="仪表值" prop="instrumentValue">
<el-input v-model="form.instrumentValue" placeholder="请输入仪表值" />
<el-form-item label="仪表值(kW·h)" prop="instrumentValue">
<el-input v-model="form.instrumentValue" placeholder="请输入仪表值(kW·h)"/>
</el-form-item>
<el-form-item label="耗量" prop="expend">
<el-input v-model="form.expend" placeholder="请输入耗量" />
<el-input v-model="form.expend" placeholder="请输入耗量"/>
</el-form-item>
<el-form-item label="报表日期" prop="reportDate">
<el-input v-model="form.reportDate" placeholder="请输入报表日期" />
<el-input v-model="form.reportDate" placeholder="请输入报表日期"/>
</el-form-item>
<el-form-item label="开始时间" prop="beginTime">
<el-input v-model="form.beginTime" placeholder="请输入开始时间" />
<el-form-item label="开始日期" prop="beginTime">
<el-input v-model="form.beginTime" placeholder="请输入开始日期"/>
</el-form-item>
<el-form-item label="结束时间" prop="endTime">
<el-input v-model="form.endTime" placeholder="请输入结束时间" />
<el-form-item label="结束日期" prop="endTime">
<el-input v-model="form.endTime" placeholder="请输入结束日期"/>
</el-form-item>
<el-form-item label="是否标识" prop="isFlag">
<el-radio-group v-model="form.isFlag">
@ -194,29 +198,32 @@
v-for="dict in dict.type.is_flag"
:key="dict.value"
:label="parseInt(dict.value)"
>{{dict.label}}</el-radio>
>{{ dict.label }}
</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="创建人" prop="createdBy">
<el-input v-model="form.createdBy" placeholder="请输入创建人" />
<el-input v-model="form.createdBy" placeholder="请输入创建人"/>
</el-form-item>
<el-form-item label="创建时间" prop="createdTime">
<el-date-picker clearable
v-model="form.createdTime"
type="date"
value-format="yyyy-MM-dd"
placeholder="请选择创建时间">
v-model="form.createdTime"
type="date"
value-format="yyyy-MM-dd"
placeholder="请选择创建时间"
>
</el-date-picker>
</el-form-item>
<el-form-item label="更新人" prop="updatedBy">
<el-input v-model="form.updatedBy" placeholder="请输入更新人" />
<el-input v-model="form.updatedBy" placeholder="请输入更新人"/>
</el-form-item>
<el-form-item label="更新时间" prop="updatedTime">
<el-date-picker clearable
v-model="form.updatedTime"
type="date"
value-format="yyyy-MM-dd"
placeholder="请选择更新时间">
v-model="form.updatedTime"
type="date"
value-format="yyyy-MM-dd"
placeholder="请选择更新时间"
>
</el-date-picker>
</el-form-item>
</el-form>
@ -229,17 +236,18 @@
</template>
<script>
import { listDayDnb, getDayDnb, delDayDnb, addDayDnb, updateDayDnb } from "@/api/report/DayDnb";
import { listDayDnb, getDayDnb, delDayDnb, addDayDnb, updateDayDnb } from '@/api/report/DayDnb'
import { getMonitorInfoTree } from '@/api/report/pointDnb'
import { parseTime } from '@//utils/ruoyi'
export default {
name: "DayDnb",
name: 'DayDnb',
dicts: ['is_flag'],
data() {
return {
//
deptOptions: undefined,
monitorName:undefined,
monitorName: undefined,
//
loading: true,
//
@ -254,8 +262,9 @@ export default {
total: 0,
//
DayDnbList: [],
daterangeCollectTime: [],
//
title: "",
title: '',
//
open: false,
//
@ -277,68 +286,76 @@ export default {
//
form: {},
defaultProps: {
children: "children",
label: "label"
children: 'children',
label: 'label'
},
//
rules: {
},
rules: {},
columns: [
{ key: 0, label: `主键标识`, visible: true },
{ key: 1, label: `计量设备编号`, visible: true },
{ key: 2, label: `仪表值`, visible: true },
{ key: 3, label: `耗量`, visible: true },
{ key: 4, label: `报表日期`, visible: true },
{ key: 5, label: `开始时间`, visible: true },
{ key: 6, label: `结束时间`, visible: true },
{ key: 7, label: `是否标识`, visible: true },
{ key: 8, label: `创建人`, visible: true },
{ key: 9, label: `创建时间`, visible: true },
{ key: 10, label: `更新人`, visible: true },
{ key: 11, label: `更新时间`, visible: true },
]
};
{ key: 0, label: `主键标识`, visible: false },
{ key: 1, label: `计量设备编号`, visible: true },
{ key: 2, label: `仪表值(kW·h)`, visible: true },
{ key: 3, label: `耗量`, visible: true },
{ key: 4, label: `报表日期`, visible: true },
{ key: 5, label: `开始日期`, visible: false },
{ key: 6, label: `结束日期`, visible: false },
{ key: 7, label: `是否标识`, visible: false },
{ key: 8, label: `创建人`, visible: false },
{ key: 9, label: `创建时间`, visible: false },
{ key: 10, label: `更新人`, visible: false },
{ key: 11, label: `更新时间`, visible: false },
{ key: 12, label: `计量设备名称`, visible: true }
]
}
},
watch: {
//
monitorName(val) {
this.$refs.tree.filter(val);
this.$refs.tree.filter(val)
}
},
created() {
this.getList();
this.getDeptTrees();
const nowDate = parseTime(new Date(), '{y}-{m}-{d}')
this.daterangeCollectTime[0] = nowDate
this.daterangeCollectTime[1] = nowDate
this.getList()
this.getDeptTrees()
},
methods: {
/** 查询计量设备下拉树结构 */
getDeptTrees() {
getMonitorInfoTree().then(response => {
this.deptOptions = response.data;
});
this.deptOptions = response.data
})
},
//
filterNode(value, data) {
if (!value) return true;
return data.label.indexOf(value) !== -1;
if (!value) return true
return data.label.indexOf(value) !== -1
},
//
handleNodeClick(data) {
this.queryParams.monitorCode = data.code;
this.handleQuery();
this.queryParams.monitorCode = data.code
this.handleQuery()
},
/** 查询电日耗报列表 */
getList() {
this.loading = true;
this.loading = true
this.queryParams.params = {};
if (null != this.daterangeCollectTime && '' != this.daterangeCollectTime) {
this.queryParams.params["beginCollectTime"] = this.daterangeCollectTime[0];
this.queryParams.params["endCollectTime"] = this.daterangeCollectTime[1];
}
listDayDnb(this.queryParams).then(response => {
this.DayDnbList = response.rows;
this.total = response.total;
this.loading = false;
});
this.DayDnbList = response.rows
this.total = response.total
this.loading = false
})
},
//
cancel() {
this.open = false;
this.reset();
this.open = false
this.reset()
},
//
reset() {
@ -355,71 +372,72 @@ export default {
createdTime: null,
updatedBy: null,
updatedTime: null
};
this.resetForm("form");
}
this.resetForm('form')
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
this.queryParams.pageNum = 1
this.getList()
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.queryParams.monitorCode = null;
this.handleQuery();
this.resetForm('queryForm')
this.queryParams.monitorCode = null
this.handleQuery()
},
//
handleSelectionChange(selection) {
this.ids = selection.map(item => item.objId)
this.single = selection.length!==1
this.single = selection.length !== 1
this.multiple = !selection.length
},
/** 新增按钮操作 */
handleAdd() {
this.reset();
this.open = true;
this.title = "添加电日耗报";
this.reset()
this.open = true
this.title = '添加电日耗报'
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
this.reset()
const objId = row.objId || this.ids
getDayDnb(objId).then(response => {
this.form = response.data;
this.open = true;
this.title = "修改电日耗报";
});
this.form = response.data
this.open = true
this.title = '修改电日耗报'
})
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate(valid => {
this.$refs['form'].validate(valid => {
if (valid) {
if (this.form.objId != null) {
updateDayDnb(this.form).then(response => {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
});
this.$modal.msgSuccess('修改成功')
this.open = false
this.getList()
})
} else {
addDayDnb(this.form).then(response => {
this.$modal.msgSuccess("新增成功");
this.open = false;
this.getList();
});
this.$modal.msgSuccess('新增成功')
this.open = false
this.getList()
})
}
}
});
})
},
/** 删除按钮操作 */
handleDelete(row) {
const objIds = row.objId || this.ids;
const objIds = row.objId || this.ids
this.$modal.confirm('是否确认删除电日耗报编号为"' + objIds + '"的数据项?').then(function() {
return delDayDnb(objIds);
return delDayDnb(objIds)
}).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => {});
this.getList()
this.$modal.msgSuccess('删除成功')
}).catch(() => {
})
},
/** 导出按钮操作 */
handleExport() {
@ -428,5 +446,5 @@ export default {
}, `DayDnb_${new Date().getTime()}.xlsx`)
}
}
};
}
</script>

@ -74,6 +74,14 @@
@click="handleExport"
>导出
</el-button>
<el-button
type="warning"
plain
icon="el-icon-download"
size="mini"
@click="handleDetailExport"
>明细导出
</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList" :columns="columns"></right-toolbar>
</el-row>
@ -84,43 +92,81 @@
<el-table-column label="产线" align="center" prop="PRODUCT_LINE_NAME" width="80" v-if="columns[1].visible"/>
<el-table-column label="订单编号" align="center" prop="ORDER_CODE" width="100" v-if="columns[3].visible"/>
<el-table-column label="物料编号" align="center" prop="MATERIAL_CODE" width="130" v-if="columns[4].visible"/>
<el-table-column label="物料名称" align="center" prop="MATERIAL_NAME" width="430" v-if="columns[5].visible"/>
<el-table-column label="物料名称" align="center" prop="MATERIAL_NAME" width="230" v-if="columns[5].visible"/>
<el-table-column label="产品编号" align="center" prop="PRODUCT_CODE" width="130" v-if="columns[6].visible"/>
<el-table-column label="产品名称" align="center" prop="PRODUCT_NAME" width="230" v-if="columns[7].visible"/>
<el-table-column label="数量" align="center" prop="COMP_AMOUNT" width="120" v-if="columns[8].visible"/>
<!-- <el-table-column label="操作" align="center" class-name="small-padding fixed-width">-->
<!-- <template slot-scope="scope">-->
<!-- <el-button-->
<!-- size="mini"-->
<!-- type="text"-->
<!-- icon="el-icon-edit"-->
<!-- @click="handleOrderDetails(scope.row)"-->
<!-- v-hasPermi="['report:pointDnb:edit']"-->
<!-- >查看订单明细-->
<!-- </el-button>-->
<!-- </template>-->
<!-- </el-table-column>-->
<el-table-column label="订单数量" align="center" prop="ORDER_AMOUNT" v-if="columns[9].visible"/>
<el-table-column label="完成数量" align="center" prop="COMPLETE_AMOUNT" v-if="columns[10].visible"/>
<el-table-column label="在制数量" align="center" prop="COMP_AMOUNT" v-if="columns[8].visible">
<template slot-scope="scope">
<el-button type="text" @click="openDifference(scope.row)">{{ scope.row.COMP_AMOUNT }}</el-button>
</template>
</el-table-column>
<!-- <el-table-column label="操作" align="center" class-name="small-padding fixed-width">-->
<!-- <template slot-scope="scope">-->
<!-- <el-button-->
<!-- size="mini"-->
<!-- type="text"-->
<!-- icon="el-icon-edit"-->
<!-- @click="handleOrderDetails(scope.row)"-->
<!-- v-hasPermi="['report:pointDnb:edit']"-->
<!-- >查看订单明细-->
<!-- </el-button>-->
<!-- </template>-->
<!-- </el-table-column>-->
</el-table>
<!-- <pagination-->
<!-- v-show="total>0"-->
<!-- :total="total"-->
<!-- :page.sync="queryParams.pageNum"-->
<!-- :limit.sync="queryParams.pageSize"-->
<!-- @pagination="getList"-->
<!-- />-->
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
<!-- 详情信息对话框 -->
<el-dialog :title="title" :visible.sync="open" width="1000px" append-to-body>
<el-table :data="reportDetailList" :row-class-name="rowDetailIndex"
ref="reportDetailRef"
>
<el-table-column label="序号" align="center" prop="index">
</el-table-column>
<el-table-column label="箱体码" align="center" prop="MATERIAL_BARCODE" width="190">
</el-table-column>
<el-table-column label="物料编号" align="center" prop="MATERIAL_CODE" width="110">
</el-table-column>
<el-table-column label="物料名称" align="center" prop="MATERIAL_NAME" width="280">
</el-table-column>
<el-table-column label="最后扫描工位" align="center" prop="STATION_NAME" width="150">
</el-table-column>
<el-table-column label="最后扫描时间" align="center" prop="COMPLETE_DATE" width="150">
</el-table-column>
</el-table>
<pagination
v-show="detailTotal>0"
:total="detailTotal"
:page.sync="queryDetailParams.pageNum"
:limit.sync="queryDetailParams.pageSize"
@pagination="getDetailList"
/>
<!-- </el-form>-->
<div slot="footer" class="dialog-footer">
<el-button @click="cancel"> </el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import {
WIPInquiryDetailReportList,
WIPInquiryReportList
} from '@/api/report/reportAPI'
import { findProductLineList } from '@//api/base/productLine'
import { parseTime } from '@//utils/ruoyi'
export default {
name: 'ReportInfo',
name: 'WIPInquiryReport',
dicts: ['is_flag'],
data() {
return {
@ -136,6 +182,8 @@ export default {
showSearch: true,
//
total: 0,
//
detailTotal: 0,
//
totalSum: 0,
//
@ -146,15 +194,19 @@ export default {
open: false,
//
daterangeBeginTime: [],
//
reportDetailList: [],
//
queryDetailParams: {},
//
queryParams: {
// pageNum: 1,
// pageSize: 10,
pageNum: 1,
pageSize: 10,
beginBeginTime: null,
endBeginTime: null,
productLineCode: 'CX_02',
beginStationCode: '109',
endStationCode: '280',
endStationCode: '270',
ORDER_CODE: null,
MATERIAL_CODE: null,
MATERIAL_NAME: null,
@ -175,7 +227,9 @@ export default {
{ key: 5, label: `物料名称`, visible: true },
{ key: 6, label: `产品编号`, visible: true },
{ key: 7, label: `产品名称`, visible: true },
{ key: 8, label: `数量`, visible: true }
{ key: 8, label: `在制数量`, visible: true },
{ key: 9, label: `订单数量`, visible: true },
{ key: 10, label: `完成数量`, visible: true },
],
// 线
productLineList: [],
@ -193,9 +247,9 @@ export default {
findProductLineList({ productLineType: 1 }).then(response => {
this.productLineList = response.data
}).then(() => {
return findProductLineList({ productLineType: 2, parentId: this.queryParams.productLineCode, executionSort: '1'})
return findProductLineList({ productLineType: 2, parentId: this.queryParams.productLineCode, executionSort: '1' })
}).then(response => {
this.findStationList = response.data
this.findStationList = response.data.filter(station => station.executionSort != null)
})
const nowDate = parseTime(new Date(), '{y}-{m}-{d}')
this.daterangeBeginTime[0] = nowDate
@ -207,12 +261,12 @@ export default {
getList() {
this.loading = true
WIPInquiryReportList(this.queryParams).then(response => {
this.reportList = response.data
this.reportList = response.rows
this.total = response.total
this.totalSum = 0
this.reportList.forEach(e => {
this.totalSum += e.COMP_AMOUNT
})
// this.total = response.total;
this.loading = false
})
},
@ -248,17 +302,45 @@ export default {
},
/** 查看明细 */
handleOrderDetails(row) {
this.$tab.openPage('生产计划', '/product/planInfo', { orderCode: row.ORDER_CODE })
// handleOrderDetails(row) {
// this.$tab.openPage('', '/product/planInfo', { orderCode: row.ORDER_CODE })
// },
/** 查看明细 */
openDifference(row) {
if (row.ORDER_CODE == null) {
this.$modal.msgError('订单号不为空!')
return
}
this.queryDetailParams = { ...this.queryParams };
this.queryDetailParams.ORDER_CODE = row.ORDER_CODE
WIPInquiryDetailReportList(this.queryDetailParams).then(response => {
this.reportDetailList = response.rows
this.detailTotal = response.total
this.open = true
this.title = '在制品明细表'
})
},
getDetailList() {
WIPInquiryDetailReportList(this.queryDetailParams).then(response => {
this.reportDetailList = response.rows
this.detailTotal = response.total
this.loading = false
})
},
/** 数据明细序号 */
rowDetailIndex({ row, rowIndex }) {
row.index = rowIndex + 1 + (this.queryDetailParams.pageNum - 1) * this.queryDetailParams.pageSize
},
/** 获取工位方法 */
getStationList() {
this.queryParams.beginStationCode = null
this.queryParams.endStationCode = null
findProductLineList({ productLineType: 2, parentId: this.queryParams.productLineCode, executionSort: '1'})
findProductLineList({ productLineType: 2, parentId: this.queryParams.productLineCode, executionSort: '1' })
.then(response => {
this.findStationList = response.data
this.findStationList = response.data.filter(station => station.executionSort != null)
})
},
@ -274,6 +356,13 @@ export default {
this.download('/report/productionReport/WIPInquiryReportList/export', {
...this.queryParams
}, `在制品查询报表_${new Date().getTime()}.xlsx`)
},
/** 导出按钮操作 */
handleDetailExport() {
this.download('/report/productionReport/WIPInquiryDetailReportList/export', {
...this.queryParams
}, `在制品查询明细报表_${new Date().getTime()}.xlsx`)
}
}

@ -0,0 +1,363 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="100px">
<el-form-item label="产线" prop="PRODUCT_LINE_NAME">
<el-select v-model="queryParams.PRODUCT_LINE_CODE" placeholder="请选择产线">
<el-option
v-for="item in productLineList"
:key="item.productLineCode"
:label="item.productLineName"
:value="item.productLineCode"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="产品编码" prop="MATERIAL_CODE">
<el-input
v-model="queryParams.MATERIAL_CODE"
placeholder="请输入产品编码"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="产品名称" prop="MATERIAL_NAME">
<el-input
v-model="queryParams.MATERIAL_NAME"
placeholder="请输入产品名称"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="SAP订单编号" prop="ORDER_CODE">
<el-input
v-model="queryParams.ORDER_CODE"
placeholder="请输入SAP计划编号"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="MES条码" prop="BOX_CODE">
<el-input
v-model="queryParams.BOX_CODE"
placeholder="请输入MES条码"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="成品条码" prop="PRODUCT_SNCODE">
<el-input
v-model="queryParams.PRODUCT_SNCODE"
placeholder="请输入SAP成品条码"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="打印时间">
<el-date-picker
v-model="daterangeBeginTime"
style="width: 340px"
value-format="yyyy-MM-dd HH:mm:ss"
type="datetimerange"
range-separator="-"
start-placeholder="开始时间"
end-placeholder="结束时间"
></el-date-picker>
</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-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button
type="info"
plain
size="mini"
>打印数{{ totalSum }}
</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="warning"
plain
icon="el-icon-download"
size="mini"
@click="handleExport"
>导出
</el-button>
<el-button
type="warning"
plain
icon="el-icon-download"
size="mini"
@click="handleDetailExport"
>流转详情导出
</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList" :columns="columns"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="reportList" @selection-change="handleSelectionChange">
<!-- <el-table-column type="selection" width="55" align="center"/>-->
<el-table-column label="主键标识" align="center" prop="objId" v-if="columns[0].visible"/>
<!-- <el-table-column label="工厂" align="center" prop="PRODUCT_STATION" v-if="columns[1].visible"/>-->
<el-table-column label="产线" align="center" prop="PRODUCT_LINE_NAME" v-if="columns[2].visible" width="70"/>
<el-table-column label="SAP订单编号" align="center" prop="ORDER_CODE" v-if="columns[3].visible"/>
<el-table-column label="销售订单号" align="center" prop="SALEORDER_CODE" v-if="columns[4].visible"/>
<el-table-column label="销售订单行号" align="center" prop="SALEORDER_LINENUMBER" v-if="columns[5].visible"/>
<el-table-column label="产品编码" align="center" prop="MATERIAL_CODE" v-if="columns[6].visible"/>
<el-table-column label="产品名称" align="center" prop="MATERIAL_NAME" v-if="columns[7].visible" width="280"/>
<el-table-column label="MES条码" align="center" prop="BOX_CODE" v-if="columns[8].visible" width="200"/>
<el-table-column label="成品条码" align="center" prop="PRODUCT_SNCODE" v-if="columns[9].visible" width="200"/>
<el-table-column label="MES码打印时间" align="center" prop="PRINT_TIME" v-if="columns[10].visible" width="180"/>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button
size="mini"
type="text"
icon="el-icon-search"
@click="handleOrderDetails(scope.row)"
>流转详情
</el-button>
<!-- <el-button-->
<!-- size="mini"-->
<!-- type="text"-->
<!-- icon="el-icon-d-arrow-right"-->
<!-- @click="findInspectInfo(scope.row)"-->
<!-- >质检材料-->
<!-- </el-button>-->
</template>
</el-table-column>
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
<!-- 详情信息对话框 -->
<el-dialog :title="title" :visible.sync="open" width="1100px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
<el-row gutter="15">
<el-col :span="11">
<el-form-item label="SAP订单编号" prop="ORDER_CODE">
<el-input v-model="form.ORDER_CODE" placeholder="请输入SAP订单编号" :disabled="true"/>
</el-form-item>
</el-col>
<el-col :span="11">
<el-form-item label="MES条码" prop="BOX_CODE">
<el-input v-model="form.BOX_CODE" placeholder="请输入MES条码" :disabled="true"/>
</el-form-item>
</el-col>
</el-row>
<el-divider content-position="center">箱体流转追溯详情</el-divider>
<el-table :data="reportDetailList" :row-class-name="rowDetailIndex"
ref="reportDetailRef"
>
<!-- <el-table-column type="selection" width="50" align="center"/>-->
<el-table-column label="序号" align="center" prop="index">
</el-table-column>
<el-table-column label="物料编号" align="center" prop="MATERIAL_CODE" width="100">
</el-table-column>
<el-table-column label="物料名称" align="center" prop="MATERIAL_NAME" width="390">
</el-table-column>
<el-table-column label="过点工位编号" align="center" prop="STATION_CODE" width="100">
</el-table-column>
<el-table-column label="过点工位名称" align="center" prop="STATION_NAME" width="150">
</el-table-column>
<el-table-column label="过点时间" align="center" prop="COMPLETE_DATE" width="150">
</el-table-column>
</el-table>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="cancel"> </el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import {
boxTurnoverTraceabilityDetailReportList,
boxTurnoverTraceabilityReportList
} from '@/api/report/reportAPI'
import { findProductLineList } from '@//api/base/productLine'
import { parseTime } from '@//utils/ruoyi'
export default {
name: 'BoxTurnoverTraceabilityReport',
dicts: ['is_flag', 'treatment_measures'],
data() {
return {
//
loading: true,
//
ids: [],
//
single: true,
//
multiple: true,
//
showSearch: true,
//
total: 0,
totalSum: 0,
//
reportList: [],
//
title: '',
//
open: false,
//
daterangeBeginTime: [],
//
queryParams: {
// pageNum: 1,
// pageSize: 10,
beginBeginTime: null,
endBeginTime: null,
BOX_CODE: null,
PRODUCT_LINE_CODE: 'CX_02',
ORDER_CODE: null,
MATERIAL_CODE: null,
MATERIAL_NAME: null,
PRODUCT_SNCODE: null
},
//
form: {},
//
rules: {},
reportDetailList: [],
columns: [
{ key: 0, label: `主键标识`, visible: false },
{ key: 1, label: `工位`, visible: true },
{ key: 2, label: `产线`, visible: true },
{ key: 3, label: `SAP订单编号`, visible: true },
{ key: 4, label: `销售订单号`, visible: false },
{ key: 5, label: `销售订单行号`, visible: false },
{ key: 6, label: `产品编码`, visible: true },
{ key: 7, label: `产品名称`, visible: true },
{ key: 8, label: `MES条码`, visible: true },
{ key: 9, label: `成品条码`, visible: true },
{ key: 10, label: `MES码打印时间`, visible: true },
],
// 线
productLineList: [],
//
findStationList: []
}
},
created() {
findProductLineList({ productLineType: 1 }).then(response => {
this.productLineList = response.data
})
// findProductLineList({productLineType: 2}).then(response => {
// this.findStationList = response.data;
// });
// const nowDate = parseTime(new Date(), '{y}-{m}-{d}')
// this.daterangeBeginTime[0] = nowDate + ' 00:00:00'
// this.daterangeBeginTime[1] = nowDate + ' 23:59:59'
this.getList()
},
methods: {
/** 查询工单信息列表 */
getList() {
this.loading = true
if (null != this.daterangeBeginTime && '' != this.daterangeBeginTime) {
this.queryParams.beginBeginTime = this.daterangeBeginTime[0]
this.queryParams.endBeginTime = this.daterangeBeginTime[1]
} else {
this.queryParams.beginBeginTime = null
this.queryParams.endBeginTime = null
}
boxTurnoverTraceabilityReportList(this.queryParams).then(response => {
this.reportList = response.rows
this.total = response.total
this.totalSum = response.total
this.loading = false
})
},
//
cancel() {
this.open = false
this.reset()
},
/** 数据明细序号 */
rowDetailIndex({ row, rowIndex }) {
row.index = rowIndex + 1
},
//
reset() {
this.daterangeBeginTime = []
this.form = {
WORK_CENTER_CODE: null,
PRODUCT_LINE_NAME: null,
ORDER_CODE: null,
BOX_CODE: null,
MATERIAL_CODE: null,
MATERIAL_NAME: null,
BEGIN_DATE: null
}
this.resetForm('form')
},
/** 搜索按钮操作 */
handleQuery() {
// this.queryParams.pageNum = 1;
this.getList()
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm('queryForm')
this.handleQuery()
},
/** 查看明细 */
handleOrderDetails(row) {
// this.$tab.openPage("SAP","/order/orderInfo" , {ORDER_CODE: row.ORDER_CODE})
if (row.BOX_CODE == null) {
this.$modal.msgError('该产品无MES条码')
return
}
this.form.BOX_CODE = row.BOX_CODE
this.form.ORDER_CODE = row.ORDER_CODE
boxTurnoverTraceabilityDetailReportList({ BOX_CODE: row.BOX_CODE }).then(response => {
this.reportDetailList = response.data
this.open = true
this.title = '箱体流转追溯详情'
})
},
/** 查看质检材料 */
findInspectInfo: function(row) {
const orderCode = row.ORDER_CODE;
this.$router.push("/report/quality-material/index/" + orderCode);
},
//
handleSelectionChange(selection) {
this.ids = selection.map(item => item.objId)
this.single = selection.length !== 1
this.multiple = !selection.length
},
/** 导出按钮操作 */
handleExport() {
this.download('/report/productionReport/boxTurnoverTraceabilityReportList/export', {
...this.queryParams
}, `箱体流转追溯报表_${new Date().getTime()}.xlsx`)
},
/** 导出按钮操作 */
handleDetailExport() {
this.download('/report/productionReport/boxTurnoverTraceabilityDetailReportList/export', {
...this.queryParams
}, `箱体流转追溯详情报表_${new Date().getTime()}.xlsx`)
}
}
}
</script>

@ -0,0 +1,335 @@
<template>
<div class="app-container">
<el-row :gutter="20">
<el-col :span="5" :xs="24">
<div class="head-container">
<el-input
v-model="workUnitName"
placeholder="请输入统计单元名称"
clearable
size="small"
prefix-icon="el-icon-search"
style="margin-bottom: 20px"
/>
</div>
<div class="head-container">
<el-tree
:data="workUnitOptions"
:props="workUnitProps"
:expand-on-click-node="false"
:filter-node-method="filterNode"
ref="tree"
node-key="id"
default-expand-all
highlight-current
@node-click="handleNodeClick"
/>
</div>
</el-col>
<el-col :span="19" :xs="24">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch"
label-width="100px">
<el-form-item label="日期类型" prop="dateType">
<el-select v-model="queryParams.dateType" placeholder="请选择日期类型">
<el-option
v-for="item in dateTypeList"
:key="item.dateTypeCode"
:label="item.dateTypeName"
:value="item.dateTypeCode"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="采集日期">
<el-date-picker
v-model="daterangeCollectTime"
style="width: 240px"
value-format="yyyy-MM-dd"
type="daterange"
range-separator="-"
start-placeholder="开始日期"
end-placeholder="结束日期"
></el-date-picker>
</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-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button
type="warning"
plain
icon="el-icon-download"
size="mini"
@click="handleExport"
>导出
</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList" :columns="columns"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="monitorWorkUnitList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center"/>
<el-table-column label="主键标识" align="center" prop="objId" v-if="columns[0].visible" />
<el-table-column label="统计单元编号" align="center" prop="workUnitCode" v-if="columns[1].visible" />
<el-table-column label="统计单元名称" align="center" prop="workUnitName" v-if="columns[2].visible" />
<el-table-column label="耗量(kwh)" align="center" prop="expend" v-if="columns[3].visible" />
<el-table-column label="开始日期" align="center" prop="beginTime" v-if="columns[4].visible" />
<el-table-column label="结束日期" align="center" prop="endTime" v-if="columns[5].visible" />
<el-table-column label="仪表值(kwh)" align="center" prop="instrumentValue" v-if="columns[6].visible" />
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
</el-col>
</el-row>
</div>
</template>
<script>
import {getWorkUnitTrees} from '@//api/base/workUnit'
import {listMonitorInfo} from '@//api/base/monitorInfo'
import Treeselect from "@riophae/vue-treeselect";
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
import { energyStatisticalReportList } from '@//api/report/DayDnb'
import { parseTime } from '@//utils/ruoyi'
export default {
name: "EnergyStatisticalReport",
components: {
Treeselect
}, data() {
return {
monitorInfoOptions: [],
workUnitOptions: [],
workUnitName: undefined,
//
loading: true,
//
ids: [],
//
single: true,
//
multiple: true,
//
showSearch: true,
//
total: 0,
//
monitorWorkUnitList: [],
daterangeCollectTime: [],
//
title: "",
//
open: false,
//
queryParams: {
pageNum: 1,
pageSize: 10,
monitorCode: null,
workUnitCode: null,
monitorStatus: null,
monitorType: null,
dateType: 10,
},
//
form: {},
workUnitProps: {
children: "children",
label: "label"
},
dateTypeList: [
{dateTypeCode: 19, dateTypeName: '时'},
{dateTypeCode: 10, dateTypeName: '日'},
{dateTypeCode: 7, dateTypeName: '月'},
{dateTypeCode: 4, dateTypeName: '年'},
],
columns: [
{key: 0, label: `主键标识`, visible: false},
{key: 1, label: `统计单元编号`, visible: true},
{key: 2, label: `统计单元名称`, visible: true},
{key: 3, label: `耗量(kwh)`, visible: true},
{key: 4, label: `开始日期`, visible: true},
{key: 5, label: `结束日期`, visible: true},
{key: 6, label: `仪表值(kwh)`, visible: true}
]
};
},
created() {
const nowDate = parseTime(new Date(), '{y}-{m}-{d}')
this.daterangeCollectTime[0] = nowDate
this.daterangeCollectTime[1] = nowDate
this.getList();
this.getTreeselect();
this.getDeptTrees();
},
watch: {
//
workUnitName(val) {
this.$refs.tree.filter(val);
}
},
methods: {
/** 查询计量设备信息下拉树结构 */
getTreeselect() {
listMonitorInfo().then(response => {
this.monitorInfoOptions = [];
this.monitorInfoOptions = this.handleTree(response.data, "objId", "parentId");
});
},
/** 转换计量设备信息数据结构 */
normalizer(node) {
if (node.children && !node.children.length) {
delete node.children;
}
return {
id: node.monitorCode,
label: node.monitorName,
children: node.children
};
},
/** 转换统计单元信息数据结构 */
workUnitOptionsNormalizer(node) {
if (node.children && !node.children.length) {
delete node.children;
}
return {
id2: node.workUnitCode,
label2: node.workUnitName,
children2: node.children
};
},
/** 查询计量设备下拉树结构 */
getDeptTrees() {
getWorkUnitTrees().then(response => {
this.workUnitOptions = [];
this.workUnitOptions = JSON.parse(JSON.stringify(response.data).replaceAll('id','id2').replaceAll('code','id'));
});
},
//
filterNode(value, data) {
if (!value) return true;
return data.label.indexOf(value) !== -1;
},
//
handleNodeClick(data) {
this.queryParams.workUnitCode = data.id;
this.handleQuery();
},
/** 查询统计计量信息列表 */
getList() {
this.loading = true;
// this.queryParams = {};
if (null != this.daterangeCollectTime && '' != this.daterangeCollectTime) {
this.queryParams.beginCollectTime = this.daterangeCollectTime[0];
this.queryParams.endCollectTime = this.daterangeCollectTime[1];
}
energyStatisticalReportList(this.queryParams).then(response => {
this.monitorWorkUnitList = response.rows;
this.total = response.total;
this.loading = false;
});
},
//
cancel() {
this.open = false;
this.reset();
},
//
reset() {
this.form = {
parentIds: null,
parentId: null,
objId: null,
monitorCode: null,
workUnitCode: null,
monitorStatus: 0,
monitorType: 1,
};
this.resetForm("form");
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.queryParams.workUnitCode = null;
this.handleQuery();
},
//
handleSelectionChange(selection) {
this.ids = selection.map(item => item.objId)
this.single = selection.length !== 1
this.multiple = !selection.length
},
/** 新增按钮操作 */
handleAdd() {
this.reset();
this.getTreeselect();
this.open = true;
this.title = "添加统计计量信息";
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
const objId = row.objId || this.ids
getMonitorWorkUnit(objId).then(response => {
this.form = response.data;
this.open = true;
this.title = "修改统计计量信息";
});
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate(valid => {
if (valid) {
if (this.form.objId != null) {
updateMonitorWorkUnit(this.form).then(response => {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
});
} else {
addMonitorWorkUnit(this.form).then(response => {
this.$modal.msgSuccess("新增成功");
this.open = false;
this.getList();
});
}
}
});
},
/** 删除按钮操作 */
handleDelete(row) {
const objIds = row.objId || this.ids;
this.$modal.confirm('是否确认删除统计计量信息编号为"' + objIds + '"的数据项?').then(function () {
return delMonitorWorkUnit(objIds);
}).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => {
});
},
/** 导出按钮操作 */
handleExport() {
this.download('report/DayDnb/energyStatisticalReportList/export', {
...this.queryParams
}, `统计能耗报表_${new Date().getTime()}.xlsx`)
}
}
};
</script>

@ -28,31 +28,34 @@
</el-col>
<el-col :span="19" :xs="24">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="是否标识" prop="isFlag">
<el-select v-model="queryParams.isFlag" placeholder="请选择是否标识" clearable>
<el-option
v-for="dict in dict.type.is_flag"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
<el-form-item label="创建人" prop="createdBy">
<el-input
v-model="queryParams.createdBy"
placeholder="请输入创建人"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="创建时间" prop="createdTime">
<el-date-picker clearable
v-model="queryParams.createdTime"
type="date"
value-format="yyyy-MM-dd"
placeholder="请选择创建时间">
</el-date-picker>
<!-- <el-form-item label="是否标识" prop="isFlag">-->
<!-- <el-select v-model="queryParams.isFlag" placeholder="请选择是否标识" clearable>-->
<!-- <el-option-->
<!-- v-for="dict in dict.type.is_flag"-->
<!-- :key="dict.value"-->
<!-- :label="dict.label"-->
<!-- :value="dict.value"-->
<!-- />-->
<!-- </el-select>-->
<!-- </el-form-item>-->
<!-- <el-form-item label="创建人" prop="createdBy">-->
<!-- <el-input-->
<!-- v-model="queryParams.createdBy"-->
<!-- placeholder="请输入创建人"-->
<!-- clearable-->
<!-- @keyup.enter.native="handleQuery"-->
<!-- />-->
<!-- </el-form-item>-->
<el-form-item label="采集时间">
<el-date-picker
v-model="daterangeCollectTime"
style="width: 340px"
value-format="yyyy-MM-dd HH:mm:ss"
type="datetimerange"
range-separator="-"
start-placeholder="开始时间"
end-placeholder="结束时间"
></el-date-picker>
</el-form-item>
<el-form-item>
@ -62,27 +65,27 @@
</el-form>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button
type="primary"
plain
icon="el-icon-plus"
size="mini"
@click="handleAdd"
v-hasPermi="['report:pointDnb:add']"
>新增</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="success"
plain
icon="el-icon-edit"
size="mini"
:disabled="single"
@click="handleUpdate"
v-hasPermi="['report:pointDnb:edit']"
>修改</el-button>
</el-col>
<!-- <el-col :span="1.5">-->
<!-- <el-button-->
<!-- type="primary"-->
<!-- plain-->
<!-- icon="el-icon-plus"-->
<!-- size="mini"-->
<!-- @click="handleAdd"-->
<!-- v-hasPermi="['report:pointDnb:add']"-->
<!-- >新增</el-button>-->
<!-- </el-col>-->
<!-- <el-col :span="1.5">-->
<!-- <el-button-->
<!-- type="success"-->
<!-- plain-->
<!-- icon="el-icon-edit"-->
<!-- size="mini"-->
<!-- :disabled="single"-->
<!-- @click="handleUpdate"-->
<!-- v-hasPermi="['report:pointDnb:edit']"-->
<!-- >修改</el-button>-->
<!-- </el-col>-->
<el-col :span="1.5">
<el-button
type="danger"
@ -110,12 +113,13 @@
<el-table v-loading="loading" :data="pointDnbList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="主键标识" align="center" prop="objId" v-if="columns[0].visible"/>
<el-table-column label="计量设备编号" align="center" prop="monitorCode" v-if="columns[1].visible"/>
<el-table-column label="仪表值" align="center" prop="instrumentValue" v-if="columns[2].visible"/>
<el-table-column label="计量设备编号" align="center" prop="monitorCode" v-if="columns[1].visible" width="120"/>
<el-table-column label="计量设备名称" align="center" prop="monitorName" v-if="columns[12].visible" width="150"/>
<el-table-column label="耗量" align="center" prop="expend" v-if="columns[3].visible"/>
<el-table-column label="记录时间" align="center" prop="recordTime" v-if="columns[4].visible"/>
<el-table-column label="开始时间" align="center" prop="beginTime" v-if="columns[5].visible"/>
<el-table-column label="结束时间" align="center" prop="endTime" v-if="columns[6].visible"/>
<el-table-column label="开始时间" align="center" prop="beginTime" v-if="columns[5].visible" width="170"/>
<el-table-column label="结束时间" align="center" prop="endTime" v-if="columns[6].visible" width="170"/>
<el-table-column label="记录时间" align="center" prop="recordTime" v-if="columns[4].visible" width="170"/>
<el-table-column label="仪表值(kW·h)" align="center" prop="instrumentValue" v-if="columns[2].visible" width="100"/>
<el-table-column label="是否标识" align="center" prop="isFlag" v-if="columns[7].visible">
<template slot-scope="scope">
<dict-tag :options="dict.type.is_flag" :value="scope.row.isFlag"/>
@ -133,24 +137,24 @@
<span>{{ parseTime(scope.row.updatedTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
</template>
</el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
v-hasPermi="['report:pointDnb:edit']"
>修改</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['report:pointDnb:remove']"
>删除</el-button>
</template>
</el-table-column>
<!-- <el-table-column label="操作" align="center" class-name="small-padding fixed-width">-->
<!-- <template slot-scope="scope">-->
<!-- <el-button-->
<!-- size="mini"-->
<!-- type="text"-->
<!-- icon="el-icon-edit"-->
<!-- @click="handleUpdate(scope.row)"-->
<!-- v-hasPermi="['report:pointDnb:edit']"-->
<!-- >修改</el-button>-->
<!-- <el-button-->
<!-- size="mini"-->
<!-- type="text"-->
<!-- icon="el-icon-delete"-->
<!-- @click="handleDelete(scope.row)"-->
<!-- v-hasPermi="['report:pointDnb:remove']"-->
<!-- >删除</el-button>-->
<!-- </template>-->
<!-- </el-table-column>-->
</el-table>
<pagination
@ -168,8 +172,8 @@
<el-form-item label="计量设备编号" prop="monitorCode">
<el-input v-model="form.monitorCode" placeholder="请输入计量设备编号" />
</el-form-item>
<el-form-item label="仪表值" prop="instrumentValue">
<el-input v-model="form.instrumentValue" placeholder="请输入仪表值" />
<el-form-item label="仪表值(kW·h)" prop="instrumentValue">
<el-input v-model="form.instrumentValue" placeholder="请输入仪表值(kW·h)" />
</el-form-item>
<el-form-item label="耗量" prop="expend">
<el-input v-model="form.expend" placeholder="请输入耗量" />
@ -211,6 +215,7 @@ import {
getMonitorInfoTree
} from '@/api/report/pointDnb'
import { listMonitorInfo,getMointorListLike} from "@/api/base/monitorInfo";
import { parseTime } from '@//utils/ruoyi'
@ -265,6 +270,7 @@ export default {
},
//
form: {},
daterangeCollectTime: [],
defaultProps: {
children: "children",
label: "label"
@ -276,21 +282,20 @@ export default {
],
},
columns: [
{ key: 0, label: `主键标识`, visible: true },
{ key: 0, label: `主键标识`, visible: false },
{ key: 1, label: `计量设备编号`, visible: true },
{ key: 2, label: `仪表值`, visible: true },
{ key: 2, label: `仪表值(kW·h)`, visible: true },
{ key: 3, label: `耗量`, visible: true },
{ key: 4, label: `记录时间`, visible: true },
{ key: 5, label: `开始时间`, visible: true },
{ key: 6, label: `结束时间`, visible: true },
{ key: 7, label: `是否标识`, visible: true },
{ key: 8, label: `创建人`, visible: true },
{ key: 9, label: `创建时间`, visible: true },
{ key: 10, label: `更新人`, visible: true },
{ key: 11, label: `更新时间`, visible: true },
{ key: 7, label: `是否标识`, visible: false },
{ key: 8, label: `创建人`, visible: false },
{ key: 9, label: `创建时间`, visible: false },
{ key: 10, label: `更新人`, visible: false },
{ key: 11, label: `更新时间`, visible: false },
{ key: 12, label: `计量设备名称`, visible: true },
],
};
},
watch: {
@ -301,6 +306,9 @@ export default {
}
},
created() {
const nowDate = parseTime(new Date(), '{y}-{m}-{d}')
this.daterangeCollectTime[0] = nowDate + ' 00:00:00'
this.daterangeCollectTime[1] = nowDate + ' 23:59:59'
this.getList();
this.getDeptTrees();
},
@ -315,6 +323,11 @@ export default {
/** 查询电整点耗量报表列表 */
getList() {
this.loading = true;
this.queryParams.params = {};
if (null != this.daterangeCollectTime && '' != this.daterangeCollectTime) {
this.queryParams.params["beginCollectTime"] = this.daterangeCollectTime[0];
this.queryParams.params["endCollectTime"] = this.daterangeCollectTime[1];
}
listPointDnb(this.queryParams).then(response => {
this.pointDnbList = response.rows;
this.total = response.total;
@ -374,6 +387,7 @@ export default {
/** 重置按钮操作 */
resetQuery() {
this.daterangeCollectTime = [];
this.resetForm("queryForm");
this.queryParams.monitorCode = null;
this.handleQuery();

@ -113,13 +113,13 @@
</template>
</el-table-column>
</el-table>
<!-- <pagination-->
<!-- v-show="total>0"-->
<!-- :total="total"-->
<!-- :page.sync="queryParams.pageNum"-->
<!-- :limit.sync="queryParams.pageSize"-->
<!-- @pagination="getList"-->
<!-- />-->
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
</div>
</template>
@ -162,8 +162,8 @@ export default {
daterangeBeginTime: [],
//
queryParams: {
// pageNum: 1,
// pageSize: 10,
pageNum: 1,
pageSize: 10,
beginBeginTime: null,
endBeginTime: null,
productLineCode: 'CX_02',
@ -201,10 +201,12 @@ export default {
watch: {
'queryParams.productLineCode': function(newVal, oldVal) {
//
this.selectedType = null;
this.getStationList()
},
selectedType(newType) {
//
this.queryParams.stationCode = null;
this.findStationList = this.stationList.filter(item => item.stationType == newType);
//
// this.selectedStation = '';
@ -236,12 +238,12 @@ export default {
this.queryParams.endBeginTime = null
}
productionExecutionReportList(this.queryParams).then(response => {
this.reportList = response.data
this.reportList = response.rows
this.total = response.total
this.totalSum = 0;
this.reportList.forEach(e => {
this.totalSum += e.COMP_AMOUNT
})
// this.total = response.total
this.loading = false
})
},

@ -1,6 +1,6 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="100px">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="80px">
<el-form-item label="箱体码" prop="barCode">
<el-input
v-model="queryParams.barCode"
@ -25,16 +25,16 @@
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="质量缺陷名称" prop="qualityDefectName">
<el-form-item label="缺陷名称" prop="qualityDefectName">
<el-input
v-model="queryParams.qualityDefectName"
placeholder="请输入质量缺陷名称"
placeholder="请输入缺陷名称"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="处理措施" prop="treatmentMeasure">
<el-select v-model="queryParams.treatmentMeasure" placeholder="请选择处理措施" clearable>
<el-select v-model="queryParams.treatmentMeasure" placeholder="请选择处理措施" clearable style="width: 140px;">
<el-option
v-for="dict in dict.type.treatment_measures"
:key="dict.value"
@ -43,8 +43,18 @@
/>
</el-select>
</el-form-item>
<el-form-item label="处理结果" prop="processResult">
<el-select v-model="queryParams.processResult" placeholder="请选择处理结果" clearable style="width: 140px;">
<el-option
v-for="item in repairMeasuresList"
:key="item.repairName"
:label="item.repairName"
:value="item.repairName"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="质检工位" prop="stationCode">
<el-select v-model="queryParams.stationCode" placeholder="请选择质检工位">
<el-select v-model="queryParams.stationCode" placeholder="请选择质检工位" clearable style="width: 140px;">
<el-option
v-for="item in productLineList"
:key="item.productLineCode"
@ -296,6 +306,7 @@ import {
} from '@/api/report/qualityInspection'
import { parseTime } from '@//utils/ruoyi'
import { findProductLineList } from '@//api/base/productLine'
import { findRepairMeasuresList } from '@//api/report/repairMeasures'
export default {
name: 'QualityInspection',
@ -372,13 +383,17 @@ export default {
{ key: 20, label: `检测人员名称`, visible: true },
{ key: 21, label: `工位名称`, visible: true }
],
productLineList: []
productLineList: [],
repairMeasuresList: [],
}
},
created() {
findProductLineList({ productLineType: 2, stationType: 2 }).then(response => {
this.productLineList = response.data
})
findRepairMeasuresList().then(response => {
this.repairMeasuresList = response.data
})
const nowDate = parseTime(new Date(), '{y}-{m}-{d}')
this.daterangeBeginTime[0] = nowDate + ' 00:00:00'
this.daterangeBeginTime[1] = nowDate + ' 23:59:59'

@ -393,6 +393,7 @@ export default {
/** 新增按钮操作 */
handleAdd() {
// this.reset();
this.form.objId = null;
this.open = true;
this.title = "添加质检材料信息";
},

@ -0,0 +1,333 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="80px">
<el-form-item label="产线" prop="productLineCode">
<el-select v-model="queryParams.productLineCode" placeholder="请选择产线">
<el-option
v-for="item in productLineList"
:key="item.productLineCode"
:label="item.productLineName"
:value="item.productLineCode"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="异常类型" prop="exceptionType">
<el-select v-model="queryParams.exceptionType" placeholder="请选择异常类型" clearable>
<el-option
v-for="dict in dict.type.exception_type"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
<el-form-item label="MES条码" prop="boxCode">
<el-input
v-model="queryParams.boxCode"
placeholder="请输入MES条码"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="产品条码" prop="productSncode">
<el-input
v-model="queryParams.productSncode"
placeholder="请输入产品条码"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="扫描时间">
<el-date-picker
v-model="daterangeProductScantime"
style="width: 340px"
value-format="yyyy-MM-dd HH:mm:ss"
type="datetimerange"
range-separator="-"
start-placeholder="开始时间"
end-placeholder="结束时间"
></el-date-picker>
</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-row :gutter="10" class="mb8">
<!-- <el-col :span="1.5">-->
<!-- <el-button-->
<!-- type="primary"-->
<!-- plain-->
<!-- icon="el-icon-plus"-->
<!-- size="mini"-->
<!-- @click="handleAdd"-->
<!-- v-hasPermi="['report:recordException:add']"-->
<!-- >新增-->
<!-- </el-button>-->
<!-- </el-col>-->
<!-- <el-col :span="1.5">-->
<!-- <el-button-->
<!-- type="success"-->
<!-- plain-->
<!-- icon="el-icon-edit"-->
<!-- size="mini"-->
<!-- :disabled="single"-->
<!-- @click="handleUpdate"-->
<!-- v-hasPermi="['report:recordException:edit']"-->
<!-- >修改-->
<!-- </el-button>-->
<!-- </el-col>-->
<!-- <el-col :span="1.5">-->
<!-- <el-button-->
<!-- type="danger"-->
<!-- plain-->
<!-- icon="el-icon-delete"-->
<!-- size="mini"-->
<!-- :disabled="multiple"-->
<!-- @click="handleDelete"-->
<!-- v-hasPermi="['report:recordException:remove']"-->
<!-- >删除-->
<!-- </el-button>-->
<!-- </el-col>-->
<el-col :span="1.5">
<el-button
type="warning"
plain
icon="el-icon-download"
size="mini"
@click="handleExport"
v-hasPermi="['report:recordException:export']"
>导出
</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList" :columns="columns"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="recordExceptionList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center"/>
<el-table-column label="主键标识" align="center" prop="objId" v-if="columns[0].visible"/>
<el-table-column label="MES条码" align="center" prop="boxCode" v-if="columns[6].visible" width="190"/>
<el-table-column label="产品条码" align="center" prop="productSncode" v-if="columns[1].visible" width="190"/>
<el-table-column label="异常类型" align="center" prop="exceptionType" v-if="columns[5].visible" width="100">
<template slot-scope="scope">
<dict-tag :options="dict.type.exception_type" :value="scope.row.exceptionType"/>
</template>
</el-table-column>
<el-table-column label="异常信息" align="center" prop="exceptionMsg" v-if="columns[2].visible"/>
<el-table-column label="扫描时间" align="center" prop="productScantime" width="180" v-if="columns[3].visible">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.productScantime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
</template>
</el-table-column>
<el-table-column label="产线编号" align="center" prop="productLineCode" v-if="columns[4].visible"/>
<!-- <el-table-column label="操作" align="center" class-name="small-padding fixed-width">-->
<!-- <template slot-scope="scope">-->
<!-- <el-button-->
<!-- size="mini"-->
<!-- type="text"-->
<!-- icon="el-icon-edit"-->
<!-- @click="handleUpdate(scope.row)"-->
<!-- v-hasPermi="['report:recordException:edit']"-->
<!-- >修改-->
<!-- </el-button>-->
<!-- <el-button-->
<!-- size="mini"-->
<!-- type="text"-->
<!-- icon="el-icon-delete"-->
<!-- @click="handleDelete(scope.row)"-->
<!-- v-hasPermi="['report:recordException:remove']"-->
<!-- >删除-->
<!-- </el-button>-->
<!-- </template>-->
<!-- </el-table-column>-->
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
</div>
</template>
<script>
import {
listRecordException,
getRecordException,
delRecordException,
addRecordException,
updateRecordException
} from '@/api/report/recordException'
import { findProductLineList } from '@//api/base/productLine'
export default {
name: 'RecordException',
dicts: ['exception_type'],
data() {
return {
//
loading: true,
//
ids: [],
//
single: true,
//
multiple: true,
//
showSearch: true,
//
total: 0,
// 线
recordExceptionList: [],
//
title: '',
//
open: false,
// MES
daterangeProductScantime: [],
//
queryParams: {
pageNum: 1,
pageSize: 10,
productSncode: null,
exceptionMsg: null,
productScantime: null,
productLineCode: 'CX_02',
exceptionType: '1',
boxCode: null
},
//
form: {},
//
rules: {},
columns: [
{ key: 0, label: `主键标识`, visible: false },
{ key: 1, label: `产品条码`, visible: true },
{ key: 2, label: `异常信息`, visible: true },
{ key: 3, label: `扫描时间`, visible: true },
{ key: 4, label: `产线编号`, visible: false },
{ key: 5, label: `异常类型`, visible: true },
{ key: 6, label: `MES条码`, visible: true }
],
// 线
productLineList: []
}
},
created() {
findProductLineList({ productLineType: 1 }).then(response => {
this.productLineList = response.data
})
this.getList()
},
methods: {
/** 查询成品下线异常记录列表 */
getList() {
this.loading = true
this.queryParams.params = {}
if (null != this.daterangeProductScantime && '' != this.daterangeProductScantime) {
this.queryParams.params['beginProductScantime'] = this.daterangeProductScantime[0]
this.queryParams.params['endProductScantime'] = this.daterangeProductScantime[1]
}
listRecordException(this.queryParams).then(response => {
this.recordExceptionList = response.rows
this.total = response.total
this.loading = false
})
},
//
cancel() {
this.open = false
this.reset()
},
//
reset() {
this.form = {
objId: null,
productSncode: null,
exceptionMsg: null,
productScantime: null,
productLineCode: null,
exceptionType: null,
boxCode: null
}
this.resetForm('form')
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1
this.getList()
},
/** 重置按钮操作 */
resetQuery() {
this.daterangeProductScantime = []
this.resetForm('queryForm')
this.handleQuery()
},
//
handleSelectionChange(selection) {
this.ids = selection.map(item => item.objId)
this.single = selection.length !== 1
this.multiple = !selection.length
},
/** 新增按钮操作 */
handleAdd() {
this.reset()
this.open = true
this.title = '添加成品下线异常记录'
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset()
const objId = row.objId || this.ids
getRecordException(objId).then(response => {
this.form = response.data
this.open = true
this.title = '修改成品下线异常记录'
})
},
/** 提交按钮 */
submitForm() {
this.$refs['form'].validate(valid => {
if (valid) {
if (this.form.objId != null) {
updateRecordException(this.form).then(response => {
this.$modal.msgSuccess('修改成功')
this.open = false
this.getList()
})
} else {
addRecordException(this.form).then(response => {
this.$modal.msgSuccess('新增成功')
this.open = false
this.getList()
})
}
}
})
},
/** 删除按钮操作 */
handleDelete(row) {
const objIds = row.objId || this.ids
this.$modal.confirm('是否确认删除成品下线异常记录编号为"' + objIds + '"的数据项?').then(function() {
return delRecordException(objIds)
}).then(() => {
this.getList()
this.$modal.msgSuccess('删除成功')
}).catch(() => {
})
},
/** 导出按钮操作 */
handleExport() {
this.download('report/recordException/export', {
...this.queryParams
}, `recordException_${new Date().getTime()}.xlsx`)
}
}
}
</script>

@ -186,6 +186,8 @@ export default {
const nowDate = parseTime(new Date(), '{y}-{m}-{d}')
this.daterangeBeginTime[0] = weekDate
this.daterangeBeginTime[1] = nowDate
this.queryParams.beginBeginTime = this.daterangeBeginTime[0]
this.queryParams.endBeginTime = this.daterangeBeginTime[1]
// this.getList()
this.getChart()
@ -224,6 +226,15 @@ export default {
},
},
},
label: {
show: true,
position: "top",
textStyle: {
color: "#fff",
fontSize: 16
},
formatter: '{c}%'
},
legend: {
itemWidth: 3 * vw,
data: ['检漏返修率(%)'],
@ -305,6 +316,15 @@ export default {
},
},
},
label: {
show: true,
position: "top",
textStyle: {
color: "#fff",
fontSize: 16
},
formatter: '{c}%'
},
legend: {
itemWidth: 3 * vw,
data: ['发泡返修率(%)'],
@ -386,6 +406,15 @@ export default {
},
},
},
label: {
show: true,
position: "top",
textStyle: {
color: "#fff",
fontSize: 16
},
formatter: '{c}%'
},
legend: {
itemWidth: 3 * vw,
data: ['电检返修率(%)'],
@ -467,6 +496,15 @@ export default {
},
},
},
label: {
show: true,
position: "top",
textStyle: {
color: "#fff",
fontSize: 16
},
formatter: '{c}%'
},
legend: {
itemWidth: 3 * vw,
data: ['总装返修率(%)'],
@ -527,7 +565,6 @@ export default {
},
/** 查询工单信息列表 */
getList() {
this.isChart = false
this.loading = true
if (null != this.daterangeBeginTime && '' != this.daterangeBeginTime) {
this.queryParams.beginBeginTime = this.daterangeBeginTime[0]
@ -537,7 +574,12 @@ export default {
this.queryParams.endBeginTime = null
}
if (this.queryParams.STATION_CODE.length > 0) {
this.isChart = false
this.queryParams.stationCodeList = this.queryParams.STATION_CODE.join(',')
}else {
this.isChart = true
this.reportList = [];
this.getChart()
}
repairRateReportList(this.queryParams).then(response => {
this.reportList = response.data

@ -61,6 +61,14 @@
</el-form>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button
type="info"
plain
size="mini"
>下线数{{ totalSum }}
</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="warning"
@ -140,6 +148,7 @@ export default {
title: "",
//
open: false,
totalSum: 0,
//
queryParams: {
pageNum: 1,
@ -224,6 +233,7 @@ export default {
listProductOffLine(this.queryParams).then(response => {
this.productOffLineList = response.rows;
this.total = response.total;
this.totalSum = response.total;
this.loading = false;
});
},

Loading…
Cancel
Save