change - 计量设备信息修改

master
yinq 1 year ago
parent 3dafd36062
commit c0b58110c0

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

@ -121,7 +121,9 @@
<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="monitorType" v-if="columns[4].visible">
<template slot-scope="scope">
<dict-tag :options="dict.type.monitor_type" :value="scope.row.monitorType"/>
@ -346,6 +348,8 @@ export default {
{key: 10, label: `创建时间`, visible: false},
{key: 11, 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) {
this.$refs.tree.filter(val);
}
},
methods: {
@ -366,11 +369,7 @@ export default {
getTreeselect() {
listMonitorInfo().then(response => {
this.monitorInfoOptions = [];
// const data = { objId: 0, monitorName: '', children: [] };
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) {
console.log('node', node)
if (node.children && !node.children.length) {
delete node.children;
}
return {
id2: node.workUnitCode,
label2: node.workUnitName,
// workUnitCode:node.workUnitCode,
children2: node.children
};
},
@ -402,7 +399,6 @@ export default {
getWorkUnitTrees().then(response => {
this.workUnitOptions = [];
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) {
this.queryParams.workUnitCode = data.code;
this.queryParams.workUnitCode = data.id;
this.handleQuery();
},
/** 查询统计计量信息列表 */

@ -1,6 +1,6 @@
<template>
<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-input
v-model="queryParams.qualityDefectName"
@ -9,45 +9,6 @@
@keyup.enter.native="handleQuery"
/>
</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-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>
@ -87,15 +48,24 @@
v-hasPermi="['base:qualityInspectionItem: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="['base:qualityInspectionItem:export']"-->
<!-- >导出</el-button>-->
<!-- </el-col>-->
<el-col :span="1.5">
<el-button
type="warning"
plain
icon="el-icon-download"
icon="el-icon-close"
size="mini"
@click="handleExport"
v-hasPermi="['base:qualityInspectionItem:export']"
>导出</el-button>
@click="handleClose"
>关闭</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList" :columns="columns"></right-toolbar>
</el-row>
@ -194,7 +164,7 @@ export default {
dicts: ['is_flag'],
data() {
return {
Parents:"",
Parents: [],
//
loading: true,
//
@ -261,7 +231,6 @@ export default {
/** 查询所有的父级 */
getParent(){
getQualityInspectionItemParent(this.queryParams).then(response =>{
// console.log(response.data)
this.Parents = response.data;
})
},
@ -350,6 +319,13 @@ export default {
}
});
},
/** 返回按钮操作 */
handleClose() {
const obj = { path: "/quality/qualityInspectionItem" };
this.$tab.closeOpenPage(obj);
},
/** 删除按钮操作 */
handleDelete(row) {
const objIds = row.objId || this.ids;

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

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

Loading…
Cancel
Save