update - 电设备报表修改

master
yinq 8 months ago
parent 09418c99b8
commit 2737ae0abc

@ -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>

@ -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;
}

@ -28,24 +28,24 @@
</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="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"
@ -110,12 +110,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="instrumentValue" v-if="columns[2].visible"/>
<el-table-column label="开始时间" align="center" prop="beginTime" v-if="columns[5].visible" width="180"/>
<el-table-column label="结束时间" align="center" prop="endTime" v-if="columns[6].visible" width="180"/>
<el-table-column label="记录时间" align="center" prop="recordTime" v-if="columns[4].visible" width="180"/>
<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 +134,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
@ -276,18 +277,19 @@ export default {
],
},
columns: [
{ key: 0, label: `主键标识`, visible: true },
{ key: 0, label: `主键标识`, visible: false },
{ 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: 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 },
],

Loading…
Cancel
Save