change - 计量设备信息修改

master
yinq 1 year ago
parent 3dafd36062
commit c0b58110c0

@ -317,7 +317,7 @@ export default {
monitorName: null, monitorName: null,
monitorAddress: null, monitorAddress: null,
monitorType: 1, monitorType: 1,
monitorStatus: 1, monitorStatus: 0,
pt: null, pt: null,
ct: null, ct: null,
monitorHierarchy: null, monitorHierarchy: null,

@ -121,7 +121,9 @@
<el-table-column type="selection" width="55" align="center"/> <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="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="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="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="monitorType" v-if="columns[4].visible"> <el-table-column label="计量设备类型" align="center" prop="monitorType" v-if="columns[4].visible">
<template slot-scope="scope"> <template slot-scope="scope">
<dict-tag :options="dict.type.monitor_type" :value="scope.row.monitorType"/> <dict-tag :options="dict.type.monitor_type" :value="scope.row.monitorType"/>
@ -346,6 +348,8 @@ export default {
{key: 10, label: `创建时间`, visible: false}, {key: 10, label: `创建时间`, visible: false},
{key: 11, label: `修改人`, visible: false}, {key: 11, label: `修改人`, visible: false},
{key: 12, label: `修改时间`, visible: false}, {key: 12, label: `修改时间`, visible: false},
{key: 13, label: `计量设备名称`, visible: true},
{key: 14, label: `统计单元名称`, visible: true},
] ]
}; };
}, },
@ -358,7 +362,6 @@ export default {
// //
workUnitName(val) { workUnitName(val) {
this.$refs.tree.filter(val); this.$refs.tree.filter(val);
} }
}, },
methods: { methods: {
@ -366,11 +369,7 @@ export default {
getTreeselect() { getTreeselect() {
listMonitorInfo().then(response => { listMonitorInfo().then(response => {
this.monitorInfoOptions = []; this.monitorInfoOptions = [];
// const data = { objId: 0, monitorName: '', children: [] };
this.monitorInfoOptions = this.handleTree(response.data, "objId", "parentId"); this.monitorInfoOptions = this.handleTree(response.data, "objId", "parentId");
// data.children = this.handleTree(response.data, "objId", "parentId");
console.log('data', data)
// this.monitorInfoOptions = data;
}); });
}, },
/** 转换计量设备信息数据结构 */ /** 转换计量设备信息数据结构 */
@ -386,14 +385,12 @@ export default {
}, },
/** 转换统计单元信息数据结构 */ /** 转换统计单元信息数据结构 */
workUnitOptionsNormalizer(node) { workUnitOptionsNormalizer(node) {
console.log('node', node)
if (node.children && !node.children.length) { if (node.children && !node.children.length) {
delete node.children; delete node.children;
} }
return { return {
id2: node.workUnitCode, id2: node.workUnitCode,
label2: node.workUnitName, label2: node.workUnitName,
// workUnitCode:node.workUnitCode,
children2: node.children children2: node.children
}; };
}, },
@ -402,7 +399,6 @@ export default {
getWorkUnitTrees().then(response => { getWorkUnitTrees().then(response => {
this.workUnitOptions = []; this.workUnitOptions = [];
this.workUnitOptions = JSON.parse(JSON.stringify(response.data).replaceAll('id','id2').replaceAll('code','id')); this.workUnitOptions = JSON.parse(JSON.stringify(response.data).replaceAll('id','id2').replaceAll('code','id'));
console.log('this.workUnitOptions',this.workUnitOptions)
}); });
}, },
// //
@ -412,7 +408,7 @@ export default {
}, },
// //
handleNodeClick(data) { handleNodeClick(data) {
this.queryParams.workUnitCode = data.code; this.queryParams.workUnitCode = data.id;
this.handleQuery(); this.handleQuery();
}, },
/** 查询统计计量信息列表 */ /** 查询统计计量信息列表 */

@ -1,6 +1,6 @@
<template> <template>
<div class="app-container"> <div class="app-container">
<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="100px">
<el-form-item label="质量缺陷描述" prop="qualityDefectName"> <el-form-item label="质量缺陷描述" prop="qualityDefectName">
<el-input <el-input
v-model="queryParams.qualityDefectName" v-model="queryParams.qualityDefectName"
@ -9,45 +9,6 @@
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item>
<el-form-item label="物料大类" prop="materialCategories">
<el-input
v-model="queryParams.materialCategories"
placeholder="请输入物料大类"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="物料小类" prop="materialSubclass">
<el-input
v-model="queryParams.materialSubclass"
placeholder="请输入物料小类"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="工厂编号" prop="plantCode">
<el-input
v-model="queryParams.plantCode"
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> <el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery"></el-button> <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-button icon="el-icon-refresh" size="mini" @click="resetQuery"></el-button>
@ -87,15 +48,24 @@
v-hasPermi="['base:qualityInspectionItem:remove']" v-hasPermi="['base:qualityInspectionItem:remove']"
>删除</el-button> >删除</el-button>
</el-col> </el-col>
<!-- <el-col :span="1.5">-->
<!-- <el-button-->
<!-- type="warning"-->
<!-- plain-->
<!-- icon="el-icon-download"-->
<!-- size="mini"-->
<!-- @click="handleExport"-->
<!-- v-hasPermi="['base:qualityInspectionItem:export']"-->
<!-- >导出</el-button>-->
<!-- </el-col>-->
<el-col :span="1.5"> <el-col :span="1.5">
<el-button <el-button
type="warning" type="warning"
plain plain
icon="el-icon-download" icon="el-icon-close"
size="mini" size="mini"
@click="handleExport" @click="handleClose"
v-hasPermi="['base:qualityInspectionItem:export']" >关闭</el-button>
>导出</el-button>
</el-col> </el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList" :columns="columns"></right-toolbar> <right-toolbar :showSearch.sync="showSearch" @queryTable="getList" :columns="columns"></right-toolbar>
</el-row> </el-row>
@ -194,7 +164,7 @@ export default {
dicts: ['is_flag'], dicts: ['is_flag'],
data() { data() {
return { return {
Parents:"", Parents: [],
// //
loading: true, loading: true,
// //
@ -261,7 +231,6 @@ export default {
/** 查询所有的父级 */ /** 查询所有的父级 */
getParent(){ getParent(){
getQualityInspectionItemParent(this.queryParams).then(response =>{ getQualityInspectionItemParent(this.queryParams).then(response =>{
// console.log(response.data)
this.Parents = response.data; this.Parents = response.data;
}) })
}, },
@ -350,6 +319,13 @@ export default {
} }
}); });
}, },
/** 返回按钮操作 */
handleClose() {
const obj = { path: "/quality/qualityInspectionItem" };
this.$tab.closeOpenPage(obj);
},
/** 删除按钮操作 */ /** 删除按钮操作 */
handleDelete(row) { handleDelete(row) {
const objIds = row.objId || this.ids; const objIds = row.objId || this.ids;

@ -1,6 +1,6 @@
<template> <template>
<div class="app-container"> <div class="app-container">
<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="90px">
<el-form-item label="质检项编码" prop="qualityDefectCode"> <el-form-item label="质检项编码" prop="qualityDefectCode">
<el-input <el-input
v-model="queryParams.qualityDefectCode" v-model="queryParams.qualityDefectCode"
@ -9,16 +9,16 @@
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item>
<el-form-item label="物料大类" prop="materialCategories"> <!-- <el-form-item label="物料大类" prop="materialCategories">-->
<el-select v-model="queryParams.materialCategories" placeholder="请选择物料大类" clearable> <!-- <el-select v-model="queryParams.materialCategories" placeholder="请选择物料大类" clearable>-->
<el-option <!-- <el-option-->
v-for="dict in dict.type.material_categories" <!-- v-for="dict in dict.type.material_categories"-->
:key="dict.value" <!-- :key="dict.value"-->
:label="dict.label" <!-- :label="dict.label"-->
:value="dict.value" <!-- :value="dict.value"-->
/> <!-- />-->
</el-select> <!-- </el-select>-->
</el-form-item> <!-- </el-form-item>-->
<el-form-item label="物料小类" prop="materialSubclass"> <el-form-item label="物料小类" prop="materialSubclass">
<el-select v-model="queryParams.materialSubclass" placeholder="请选择物料大类" clearable> <el-select v-model="queryParams.materialSubclass" placeholder="请选择物料大类" clearable>
<el-option <el-option
@ -29,24 +29,24 @@
/> />
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="工厂编号" prop="plantCode"> <!-- <el-form-item label="工厂编号" prop="plantCode">-->
<el-input <!-- <el-input-->
v-model="queryParams.plantCode" <!-- v-model="queryParams.plantCode"-->
placeholder="请输入工厂编号" <!-- placeholder="请输入工厂编号"-->
clearable <!-- clearable-->
@keyup.enter.native="handleQuery" <!-- @keyup.enter.native="handleQuery"-->
/> <!-- />-->
</el-form-item> <!-- </el-form-item>-->
<el-form-item label="启用标识" prop="isFlag"> <!-- <el-form-item label="启用标识" prop="isFlag">-->
<el-select v-model="queryParams.isFlag" placeholder="请选择启用标识" clearable> <!-- <el-select v-model="queryParams.isFlag" placeholder="请选择启用标识" clearable>-->
<el-option <!-- <el-option-->
v-for="dict in dict.type.is_flag" <!-- v-for="dict in dict.type.is_flag"-->
:key="dict.value" <!-- :key="dict.value"-->
:label="dict.label" <!-- :label="dict.label"-->
:value="dict.value" <!-- :value="dict.value"-->
/> <!-- />-->
</el-select> <!-- </el-select>-->
</el-form-item> <!-- </el-form-item>-->
<el-form-item> <el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery"></el-button> <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery"></el-button>
@ -121,7 +121,7 @@
<dict-tag :options="dict.type.material_subclass" :value="scope.row.materialSubclass"/> <dict-tag :options="dict.type.material_subclass" :value="scope.row.materialSubclass"/>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="工厂编号" align="center" prop="plantCode" v-if="columns[6].visible"/> <!-- <el-table-column label="工厂编号" align="center" prop="plantCode" v-if="columns[6].visible"/>-->
<el-table-column label="启用标识" align="center" prop="isFlag" v-if="columns[8].visible"> <el-table-column label="启用标识" align="center" prop="isFlag" v-if="columns[8].visible">
<template slot-scope="scope"> <template slot-scope="scope">
<dict-tag :options="dict.type.is_flag" :value="scope.row.isFlag"/> <dict-tag :options="dict.type.is_flag" :value="scope.row.isFlag"/>
@ -181,7 +181,7 @@
<el-radio <el-radio
v-for="dict in dict.type.material_categories" v-for="dict in dict.type.material_categories"
:key="dict.value" :key="dict.value"
:label="parseInt(dict.value)" :label="dict.value"
>{{dict.label}}</el-radio> >{{dict.label}}</el-radio>
</el-radio-group> </el-radio-group>
</el-form-item> </el-form-item>
@ -190,13 +190,13 @@
<el-radio <el-radio
v-for="dict in dict.type.material_subclass" v-for="dict in dict.type.material_subclass"
:key="dict.value" :key="dict.value"
:label="parseInt(dict.value)" :label="dict.value"
>{{dict.label}}</el-radio> >{{dict.label}}</el-radio>
</el-radio-group> </el-radio-group>
</el-form-item> </el-form-item>
<el-form-item label="工厂编号" prop="plantCode"> <!-- <el-form-item label="工厂编号" prop="plantCode">-->
<el-input v-model="form.plantCode" placeholder="请输入工厂编号" /> <!-- <el-input v-model="form.plantCode" placeholder="请输入工厂编号" />-->
</el-form-item> <!-- </el-form-item>-->
<el-form-item label="启用标识" prop="isFlag"> <el-form-item label="启用标识" prop="isFlag">
<el-radio-group v-model="form.isFlag"> <el-radio-group v-model="form.isFlag">
@ -271,7 +271,7 @@ export default {
{ key: 3, label: `父级编号`, visible: true }, { key: 3, label: `父级编号`, visible: true },
{ key: 4, label: `物料大类`, visible: true }, { key: 4, label: `物料大类`, visible: true },
{ key: 5, label: `物料小类`, visible: true }, { key: 5, label: `物料小类`, visible: true },
{ key: 6, label: `工厂编号`, visible: true }, // { key: 6, label: ``, visible: true },
{ key: 7, label: `备注`, visible: true }, { key: 7, label: `备注`, visible: true },
{ key: 8, label: `启用标识`, visible: true }, { key: 8, label: `启用标识`, visible: true },
{ key: 9, label: `创建人`, visible: true }, { key: 9, label: `创建人`, visible: true },

@ -241,20 +241,16 @@ export default {
created() { created() {
this.getList(); this.getList();
listProductLine(this.queryParams).then(response =>{ listProductLine(this.queryParams).then(response =>{
// console.log(response)
this.ProductLineCode = response.rows; this.ProductLineCode = response.rows;
}) })
}, },
methods: { methods: {
/** 查询统计单元信息列表 */ /** 查询统计单元信息列表 */
getList() { getList() {
this.loading = true; this.loading = true;
listWorkUnit(this.queryParams).then(response => { listWorkUnit(this.queryParams).then(response => {
this.workUnitList = this.handleTree(response.data, "workUnitCode", "parentId"); this.workUnitList = this.handleTree(response.data, "objId", "parentId");
this.loading = false; this.loading = false;
console.log(response.data)
}); });
}, },
/** 转换统计单元信息数据结构 */ /** 转换统计单元信息数据结构 */
@ -294,7 +290,7 @@ export default {
workUnitSort: null, workUnitSort: null,
productLineCode: null, productLineCode: null,
workUnitType: null, workUnitType: null,
isFlag: null, isFlag: 0,
createdBy: null, createdBy: null,
createdTime: null, createdTime: null,
updatedBy: null, updatedBy: null,

Loading…
Cancel
Save