Merge remote-tracking branch 'origin/master'

master
zhaoxiaolin 9 months ago
commit e5b8733b22

@ -9,11 +9,19 @@
:before-close="cancelEquipmentForm" :before-close="cancelEquipmentForm"
> >
<el-row :gutter="20"> <el-row :gutter="20">
<!--分类数据-->
<el-col :span="5" :xs="24"> <el-col :span="5" :xs="24">
<el-card> <div class="head-container">
<span>请选择设备类型</span> <el-input
v-model="typeName"
placeholder="请输入设备类型名称"
clearable
size="small"
prefix-icon="el-icon-search"
style="margin-bottom: 20px"
/>
</div>
<div class="head-container" style="text-align: center"> <div class="head-container" style="text-align: center">
<el-scrollbar style="height:500px">
<el-tree <el-tree
:data="treeData" :data="treeData"
:props = "{id:'equipmentTypeCode',label:'equipmentTypeName'}" :props = "{id:'equipmentTypeCode',label:'equipmentTypeName'}"
@ -24,8 +32,8 @@
default-expand-all default-expand-all
@node-click="handleNodeClick" @node-click="handleNodeClick"
/> />
</el-scrollbar>
</div> </div>
</el-card>
</el-col> </el-col>
<!--设备数据--> <!--设备数据-->
@ -43,7 +51,7 @@
v-model="queryParams.itemCode" v-model="queryParams.itemCode"
placeholder="请输入设备编码" placeholder="请输入设备编码"
clearable clearable
style="width: 160px" style="width: 170px"
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item>
@ -52,7 +60,7 @@
v-model="queryParams.itemName" v-model="queryParams.itemName"
placeholder="请输入设备名称" placeholder="请输入设备名称"
clearable clearable
style="width: 160px" style="width: 170px"
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item>
@ -62,7 +70,7 @@
v-model="queryParams.groupLine" v-model="queryParams.groupLine"
filterable filterable
placeholder="请选择组线" placeholder="请选择组线"
style="width: 160px" style="width: 170px"
> >
<el-option <el-option
v-for="item in options" v-for="item in options"
@ -82,7 +90,11 @@
@click="handleQuery" @click="handleQuery"
>搜索</el-button >搜索</el-button
> >
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery" <el-button
icon="el-icon-refresh"
size="mini"
@click="resetQuery"
style="padding-right:10px"
>重置</el-button >重置</el-button
> >
</el-form-item> </el-form-item>
@ -111,7 +123,6 @@
align="center" align="center"
key="itemCode" key="itemCode"
prop="equipmentCode" prop="equipmentCode"
v-if="columns[0].visible"
> >
</el-table-column> </el-table-column>
<el-table-column <el-table-column
@ -119,7 +130,6 @@
align="center" align="center"
key="itemTypeCode" key="itemTypeCode"
prop="equipmentTypeCode" prop="equipmentTypeCode"
v-if="columns[2].visible"
> >
</el-table-column> </el-table-column>
<el-table-column <el-table-column
@ -127,11 +137,22 @@
align="left" align="left"
key="itemName" key="itemName"
prop="equipmentName" prop="equipmentName"
v-if="columns[1].visible"
:show-overflow-tooltip="true" :show-overflow-tooltip="true"
/> />
<el-table-column
label="设备类别"
align="left"
prop="equipmentCategory"
:show-overflow-tooltip="true"
>
<template slot-scope="scope">
<dict-tag
:options="dict.type.equipment_category"
:value="scope.row.equipmentCategory"
/>
</template>
</el-table-column>
</el-table> </el-table>
<pagination <pagination
v-show="total > 0" v-show="total > 0"
:total="total" :total="total"
@ -161,8 +182,13 @@ import { Message } from "element-ui";
export default { export default {
name: "MdItemSingle", name: "MdItemSingle",
dicts: [
"equipment_category",
],
data() { data() {
return { return {
//
typeName: undefined,
treeData: [], treeData: [],
showFlag: false, showFlag: false,
// //
@ -200,6 +226,7 @@ export default {
{ key: 0, label: `设备编码`, visible: true }, { key: 0, label: `设备编码`, visible: true },
{ key: 1, label: `设备名称`, visible: true }, { key: 1, label: `设备名称`, visible: true },
{ key: 2, label: `设备类型`, visible: true }, { key: 2, label: `设备类型`, visible: true },
{ key: 3, label: `设备类别`, visible: true },
], ],
}; };
}, },
@ -208,6 +235,15 @@ export default {
this.getEquipmentType(); this.getEquipmentType();
}, },
watch: {
//
typeName(val) {
console.log(val);
this.$refs.tree.filter(val);
},
},
methods: { methods: {
// //
reset() { reset() {
@ -234,7 +270,7 @@ export default {
this.loading = true; this.loading = true;
this.queryParams.equipmentCode = this.queryParams.itemCode; this.queryParams.equipmentCode = this.queryParams.itemCode;
this.queryParams.equipmentName = this.queryParams.itemName; this.queryParams.equipmentName = this.queryParams.itemName;
getEquipmentList(this.queryParams).then((response) => { getEquList(this.queryParams).then((response) => {
this.itemList = response.rows; this.itemList = response.rows;
this.total = response.total; this.total = response.total;
this.loading = false; this.loading = false;
@ -267,9 +303,11 @@ export default {
// //
filterNode(value, data) { filterNode(value, data) {
console.log(value, data); console.log("value:",value,"data:",data);
if (!value) return true; if (!value) return true;
return data.label.indexOf(value) !== -1; if(data.equipmentTypeName != null){
return data.equipmentTypeName.indexOf(value) !== -1;
}
}, },
// //
@ -316,15 +354,14 @@ export default {
} }
this.selectedRows = this.queryParams.itemCodeGet; this.selectedRows = this.queryParams.itemCodeGet;
this.$emit("onSelected", this.selectedRows); this.$emit("onSelected", this.selectedRows);
this.queryParams.equipmentTypeCode = null; this.cancelEquipmentForm();
this.getList();
this.showFlag = false;
this.queryParams.itemCodeGet = ""; this.queryParams.itemCodeGet = "";
} }
}, },
cancelEquipmentForm() { cancelEquipmentForm() {
this.queryParams.equipmentTypeCode = null; this.queryParams.equipmentTypeCode = null;
this.typeName = null;
this.getList(); this.getList();
this.showFlag = false; this.showFlag = false;
}, },

@ -4,18 +4,26 @@
v-if="showFlag" v-if="showFlag"
:visible.sync="showFlag" :visible.sync="showFlag"
:modal="false" :modal="false"
width="1100px" width="1200px"
center center
:before-close="cancelEquipmentForm" :before-close="cancelEquipmentForm"
> >
<el-row :gutter="20"> <el-row :gutter="20">
<!--分类数据-->
<el-col :span="5" :xs="24"> <el-col :span="5" :xs="24">
<el-card> <div class="head-container">
<span>请选择设备类型</span> <el-input
v-model="typeName"
placeholder="请输入设备类型名称"
clearable
size="small"
prefix-icon="el-icon-search"
style="margin-bottom: 20px"
/>
</div>
<div class="head-container" style="text-align: center"> <div class="head-container" style="text-align: center">
<el-scrollbar style="height:500px">
<el-tree <el-tree
:data="treeData1" :data="treeData"
:props = "{id:'equipmentTypeCode',label:'equipmentTypeName'}" :props = "{id:'equipmentTypeCode',label:'equipmentTypeName'}"
node-key="id" node-key="id"
:expand-on-click-node="false" :expand-on-click-node="false"
@ -24,8 +32,8 @@
default-expand-all default-expand-all
@node-click="handleNodeClick" @node-click="handleNodeClick"
/> />
</el-scrollbar>
</div> </div>
</el-card>
</el-col> </el-col>
<!--设备数据--> <!--设备数据-->
@ -43,7 +51,7 @@
v-model="queryParams.itemCode" v-model="queryParams.itemCode"
placeholder="请输入设备编码" placeholder="请输入设备编码"
clearable clearable
style="width: 240px" style="width: 170px"
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item>
@ -52,10 +60,28 @@
v-model="queryParams.itemName" v-model="queryParams.itemName"
placeholder="请输入设备名称" placeholder="请输入设备名称"
clearable clearable
style="width: 240px" style="width: 170px"
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item>
<el-form-item label="组线" prop="groupLine">
<template>
<el-select
v-model="queryParams.groupLine"
filterable
placeholder="请选择组线"
style="width: 170px"
>
<el-option
v-for="item in options"
:key="item.equipmentCode"
:label="item.equipmentName"
:value="item.equipmentCode"
>
</el-option>
</el-select>
</template>
</el-form-item>
<el-form-item> <el-form-item>
<el-button <el-button
type="primary" type="primary"
@ -64,7 +90,11 @@
@click="handleQuery" @click="handleQuery"
>搜索</el-button >搜索</el-button
> >
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery" <el-button
icon="el-icon-refresh"
size="mini"
@click="resetQuery"
style="padding-right:10px"
>重置</el-button >重置</el-button
> >
</el-form-item> </el-form-item>
@ -93,7 +123,6 @@
align="center" align="center"
key="itemCode" key="itemCode"
prop="equipmentCode" prop="equipmentCode"
v-if="columns[0].visible"
> >
</el-table-column> </el-table-column>
<el-table-column <el-table-column
@ -101,7 +130,6 @@
align="center" align="center"
key="itemTypeCode" key="itemTypeCode"
prop="equipmentTypeCode" prop="equipmentTypeCode"
v-if="columns[2].visible"
> >
</el-table-column> </el-table-column>
<el-table-column <el-table-column
@ -109,11 +137,22 @@
align="left" align="left"
key="itemName" key="itemName"
prop="equipmentName" prop="equipmentName"
v-if="columns[1].visible"
:show-overflow-tooltip="true" :show-overflow-tooltip="true"
/> />
<el-table-column
label="设备类别"
align="left"
prop="equipmentCategory"
:show-overflow-tooltip="true"
>
<template slot-scope="scope">
<dict-tag
:options="dict.type.equipment_category"
:value="scope.row.equipmentCategory"
/>
</template>
</el-table-column>
</el-table> </el-table>
<pagination <pagination
v-show="total > 0" v-show="total > 0"
:total="total" :total="total"
@ -134,15 +173,23 @@
import { import {
getEquipmentList, getEquipmentList,
getEquipmentTypeList, getEquipmentTypeList,
getGroupLineList,
} from "@/api/device/faultReport"; } from "@/api/device/faultReport";
import {getEquList} from "@/api/device/plan";
import { treeselect } from "@/api/wms/equipment";
import { Message } from "element-ui"; import { Message } from "element-ui";
export default { export default {
name: "MdItemSingle", name: "MdItemSingle",
// components: { Treeselect }, dicts: [
"equipment_category",
],
data() { data() {
return { return {
treeData1: [], //
typeName: undefined,
treeData: [],
showFlag: false, showFlag: false,
// //
selectedItemId: undefined, selectedItemId: undefined,
@ -172,12 +219,14 @@ export default {
itemCode: undefined, itemCode: undefined,
equipmentCode: null, equipmentCode: null,
equipmentName: null, equipmentName: null,
groupLine: null,
}, },
// //
columns: [ columns: [
{ key: 0, label: `设备编码`, visible: true }, { key: 0, label: `设备编码`, visible: true },
{ key: 1, label: `设备名称`, visible: true }, { key: 1, label: `设备名称`, visible: true },
{ key: 2, label: `设备类型`, visible: true }, { key: 2, label: `设备类型`, visible: true },
{ key: 3, label: `设备类别`, visible: true },
], ],
}; };
}, },
@ -186,13 +235,23 @@ export default {
this.getEquipmentType(); this.getEquipmentType();
}, },
watch: {
//
typeName(val) {
console.log(val);
this.$refs.tree.filter(val);
},
},
methods: { methods: {
// //
reset() { reset() {
this.form = { this.form = {
itemId: null, itemId: null,
itemCode: this.processId, itemCode: null,
itemType: null, itemType: null,
groupLine :null,
}; };
this.resetForm("form"); this.resetForm("form");
}, },
@ -211,48 +270,66 @@ export default {
this.loading = true; this.loading = true;
this.queryParams.equipmentCode = this.queryParams.itemCode; this.queryParams.equipmentCode = this.queryParams.itemCode;
this.queryParams.equipmentName = this.queryParams.itemName; this.queryParams.equipmentName = this.queryParams.itemName;
getEquipmentList(this.queryParams).then((response) => { getEquList(this.queryParams).then((response) => {
this.itemList = response.rows;
this.total = response.total;
this.loading = false;
});
//线
getGroupLineList().then((response) => {
this.options = response.rows;
});
},
//
getEquList() {
this.loading = true;
this.queryParams.equipmentCode = this.queryParams.itemCode;
this.queryParams.equipmentName = this.queryParams.itemName;
getEquList(this.queryParams).then((response) => {
this.itemList = response.rows; this.itemList = response.rows;
this.total = response.total; this.total = response.total;
this.loading = false; this.loading = false;
}); });
}, },
/** 查询分类下拉树结构 */ /** 查询分类下拉树结构 */
getEquipmentType() { getEquipmentType() {
getEquipmentTypeList().then((response) => { getEquipmentTypeList().then((response) => {
console.log(response.rows); this.treeData = response.rows;
this.treeData1 = response.rows;
console.log(this.treeData1);
}); });
}, },
// //
filterNode(value, data) { filterNode(value, data) {
console.log(value, data); console.log("value:",value,"data:",data);
if (!value) return true; if (!value) return true;
return data.label.indexOf(value) !== -1; if(data.equipmentTypeName != null){
return data.equipmentTypeName.indexOf(value) !== -1;
}
}, },
// //
handleNodeClick(data) { handleNodeClick(data) {
console.log("id", data.id);
this.queryParams.equipmentTypeCode = data.equipmentTypeCode; this.queryParams.equipmentTypeCode = data.equipmentTypeCode;
console.log(this.equipmentTypeCode); console.log(this.queryParams.equipmentTypeCode);
this.handleQuery(); this.queryParams.pageNum = 1;
this.getList();
}, },
/** 搜索按钮操作 */ /** 搜索按钮操作 */
handleQuery() { handleQuery() {
this.queryParams.pageNum = 1; this.queryParams.pageNum = 1;
this.getList(); this.getEquList();
}, },
/** 重置按钮操作 */ /** 重置按钮操作 */
resetQuery() { resetQuery() {
this.queryParams.equipmentTypeCode = null; this.queryParams.equipmentTypeCode = null;
this.resetForm("queryForm"); this.resetForm("queryForm");
this.handleQuery(); this.queryParams.pageNum = 1;
this.getList()
}, },
// //
@ -266,7 +343,7 @@ export default {
submitEquipmentForm() { submitEquipmentForm() {
const data = this.ids; const data = this.ids;
if (data.length > 1) { if (data.length > 1) {
Message.warning("只能选择一个修机器,请勿选择多个!"); Message.warning("只能选择一个修机器,请勿选择多个!");
} else { } else {
const equipmentCode = data.toString(); const equipmentCode = data.toString();
if (this.queryParams.itemCodeGet == "") { if (this.queryParams.itemCodeGet == "") {
@ -277,18 +354,15 @@ export default {
} }
this.selectedRows = this.queryParams.itemCodeGet; this.selectedRows = this.queryParams.itemCodeGet;
this.$emit("onSelected", this.selectedRows); this.$emit("onSelected", this.selectedRows);
this.queryParams.equipmentTypeCode = null; this.cancelEquipmentForm();
this.getList();
console.log("111111", this.queryParams.equipmentTypeCode);
this.showFlag = false;
this.queryParams.itemCodeGet = ""; this.queryParams.itemCodeGet = "";
} }
}, },
cancelEquipmentForm() { cancelEquipmentForm() {
this.queryParams.equipmentTypeCode = null; this.queryParams.equipmentTypeCode = null;
this.typeName = null;
this.getList(); this.getList();
console.log("111111", this.queryParams.equipmentTypeCode);
this.showFlag = false; this.showFlag = false;
}, },
}, },

@ -9,11 +9,19 @@
:before-close="cancelEquipmentForm" :before-close="cancelEquipmentForm"
> >
<el-row :gutter="20"> <el-row :gutter="20">
<!--分类数据-->
<el-col :span="5" :xs="24"> <el-col :span="5" :xs="24">
<el-card> <div class="head-container">
<span>请选择设备类型</span> <el-input
v-model="typeName"
placeholder="请输入设备类型名称"
clearable
size="small"
prefix-icon="el-icon-search"
style="margin-bottom: 20px"
/>
</div>
<div class="head-container" style="text-align: center"> <div class="head-container" style="text-align: center">
<el-scrollbar style="height:500px">
<el-tree <el-tree
:data="treeData" :data="treeData"
:props = "{id:'equipmentTypeCode',label:'equipmentTypeName'}" :props = "{id:'equipmentTypeCode',label:'equipmentTypeName'}"
@ -24,8 +32,8 @@
default-expand-all default-expand-all
@node-click="handleNodeClick" @node-click="handleNodeClick"
/> />
</el-scrollbar>
</div> </div>
</el-card>
</el-col> </el-col>
<!--设备数据--> <!--设备数据-->
@ -43,7 +51,7 @@
v-model="queryParams.itemCode" v-model="queryParams.itemCode"
placeholder="请输入设备编码" placeholder="请输入设备编码"
clearable clearable
style="width: 160px" style="width: 170px"
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item>
@ -52,7 +60,7 @@
v-model="queryParams.itemName" v-model="queryParams.itemName"
placeholder="请输入设备名称" placeholder="请输入设备名称"
clearable clearable
style="width: 160px" style="width: 170px"
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item>
@ -62,7 +70,7 @@
v-model="queryParams.groupLine" v-model="queryParams.groupLine"
filterable filterable
placeholder="请选择组线" placeholder="请选择组线"
style="width: 160px" style="width: 170px"
> >
<el-option <el-option
v-for="item in options" v-for="item in options"
@ -82,7 +90,11 @@
@click="handleQuery" @click="handleQuery"
>搜索</el-button >搜索</el-button
> >
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery" <el-button
icon="el-icon-refresh"
size="mini"
@click="resetQuery"
style="padding-right:10px"
>重置</el-button >重置</el-button
> >
</el-form-item> </el-form-item>
@ -111,7 +123,6 @@
align="center" align="center"
key="itemCode" key="itemCode"
prop="equipmentCode" prop="equipmentCode"
v-if="columns[0].visible"
> >
</el-table-column> </el-table-column>
<el-table-column <el-table-column
@ -119,7 +130,6 @@
align="center" align="center"
key="itemTypeCode" key="itemTypeCode"
prop="equipmentTypeCode" prop="equipmentTypeCode"
v-if="columns[2].visible"
> >
</el-table-column> </el-table-column>
<el-table-column <el-table-column
@ -127,11 +137,22 @@
align="left" align="left"
key="itemName" key="itemName"
prop="equipmentName" prop="equipmentName"
v-if="columns[1].visible"
:show-overflow-tooltip="true" :show-overflow-tooltip="true"
/> />
<el-table-column
label="设备类别"
align="left"
prop="equipmentCategory"
:show-overflow-tooltip="true"
>
<template slot-scope="scope">
<dict-tag
:options="dict.type.equipment_category"
:value="scope.row.equipmentCategory"
/>
</template>
</el-table-column>
</el-table> </el-table>
<pagination <pagination
v-show="total > 0" v-show="total > 0"
:total="total" :total="total"
@ -161,8 +182,13 @@ import { Message } from "element-ui";
export default { export default {
name: "MdItemSingle", name: "MdItemSingle",
dicts: [
"equipment_category",
],
data() { data() {
return { return {
//
typeName: undefined,
treeData: [], treeData: [],
showFlag: false, showFlag: false,
// //
@ -200,6 +226,7 @@ export default {
{ key: 0, label: `设备编码`, visible: true }, { key: 0, label: `设备编码`, visible: true },
{ key: 1, label: `设备名称`, visible: true }, { key: 1, label: `设备名称`, visible: true },
{ key: 2, label: `设备类型`, visible: true }, { key: 2, label: `设备类型`, visible: true },
{ key: 3, label: `设备类别`, visible: true },
], ],
}; };
}, },
@ -208,6 +235,15 @@ export default {
this.getEquipmentType(); this.getEquipmentType();
}, },
watch: {
//
typeName(val) {
console.log(val);
this.$refs.tree.filter(val);
},
},
methods: { methods: {
// //
reset() { reset() {
@ -234,7 +270,7 @@ export default {
this.loading = true; this.loading = true;
this.queryParams.equipmentCode = this.queryParams.itemCode; this.queryParams.equipmentCode = this.queryParams.itemCode;
this.queryParams.equipmentName = this.queryParams.itemName; this.queryParams.equipmentName = this.queryParams.itemName;
getEquipmentList(this.queryParams).then((response) => { getEquList(this.queryParams).then((response) => {
this.itemList = response.rows; this.itemList = response.rows;
this.total = response.total; this.total = response.total;
this.loading = false; this.loading = false;
@ -267,9 +303,11 @@ export default {
// //
filterNode(value, data) { filterNode(value, data) {
console.log(value, data); console.log("value:",value,"data:",data);
if (!value) return true; if (!value) return true;
return data.label.indexOf(value) !== -1; if(data.equipmentTypeName != null){
return data.equipmentTypeName.indexOf(value) !== -1;
}
}, },
// //
@ -316,15 +354,14 @@ export default {
} }
this.selectedRows = this.queryParams.itemCodeGet; this.selectedRows = this.queryParams.itemCodeGet;
this.$emit("onSelected", this.selectedRows); this.$emit("onSelected", this.selectedRows);
this.queryParams.equipmentTypeCode = null; this.cancelEquipmentForm();
this.getList();
this.showFlag = false;
this.queryParams.itemCodeGet = ""; this.queryParams.itemCodeGet = "";
} }
}, },
cancelEquipmentForm() { cancelEquipmentForm() {
this.queryParams.equipmentTypeCode = null; this.queryParams.equipmentTypeCode = null;
this.typeName = null;
this.getList(); this.getList();
this.showFlag = false; this.showFlag = false;
}, },

@ -1,21 +1,28 @@
<template> <template>
<el-dialog <el-dialog title="设备选择"
title="设备选择"
v-if="showFlag" v-if="showFlag"
:visible.sync="showFlag" :visible.sync="showFlag"
:modal="false" :modal= false
width="1100px" width="1100px"
center center
:before-close="cancelEquipmentForm" :before-close="cancelEquipmentForm"
> >
<el-row :gutter="20"> <el-row :gutter="20">
<!--分类数据-->
<el-col :span="5" :xs="24"> <el-col :span="5" :xs="24">
<el-card> <div class="head-container">
<span>请选择设备类型</span> <el-input
v-model="typeName"
placeholder="请输入设备类型名称"
clearable
size="small"
prefix-icon="el-icon-search"
style="margin-bottom: 20px"
/>
</div>
<div class="head-container" style="text-align: center"> <div class="head-container" style="text-align: center">
<el-scrollbar style="height:500px">
<el-tree <el-tree
:data="treeData1" :data="treeData"
:props = "{id:'equipmentTypeCode',label:'equipmentTypeName'}" :props = "{id:'equipmentTypeCode',label:'equipmentTypeName'}"
node-key="id" node-key="id"
:expand-on-click-node="false" :expand-on-click-node="false"
@ -24,8 +31,8 @@
default-expand-all default-expand-all
@node-click="handleNodeClick" @node-click="handleNodeClick"
/> />
</el-scrollbar>
</div> </div>
</el-card>
</el-col> </el-col>
<!--设备数据--> <!--设备数据-->
@ -143,7 +150,9 @@ export default {
// components: { Treeselect }, // components: { Treeselect },
data() { data() {
return { return {
treeData1: [], //
typeName: undefined,
treeData: [],
showFlag: false, showFlag: false,
// //
selectedItemId: undefined, selectedItemId: undefined,
@ -185,6 +194,14 @@ export default {
this.getEquipmentType(); this.getEquipmentType();
}, },
watch: {
//
typeName(val) {
console.log(val);
this.$refs.tree.filter(val);
},
},
methods: { methods: {
// //
reset() { reset() {
@ -219,21 +236,22 @@ export default {
getEquipmentType() { getEquipmentType() {
getEquipmentTypeList().then((response) => { getEquipmentTypeList().then((response) => {
console.log(response.rows); console.log(response.rows);
this.treeData1 = response.rows; this.treeData = response.rows;
console.log(this.treeData1); console.log(this.treeData);
}); });
}, },
// //
filterNode(value, data) { filterNode(value, data) {
console.log(value, data); console.log("value:",value,"data:",data);
if (!value) return true; if (!value) return true;
return data.label.indexOf(value) !== -1; if(data.equipmentTypeName != null){
return data.equipmentTypeName.indexOf(value) !== -1;
}
}, },
// //
handleNodeClick(data) { handleNodeClick(data) {
console.log("id", data.id);
this.queryParams.equipmentTypeCode = data.equipmentTypeCode; this.queryParams.equipmentTypeCode = data.equipmentTypeCode;
console.log(this.equipmentTypeCode); console.log(this.equipmentTypeCode);
this.handleQuery(); this.handleQuery();
@ -274,20 +292,17 @@ export default {
} }
this.selectedRows = this.queryParams.itemCodeGet; this.selectedRows = this.queryParams.itemCodeGet;
this.$emit("onSelected", this.selectedRows); this.$emit("onSelected", this.selectedRows);
this.queryParams.equipmentTypeCode = null; this.cancelEquipmentForm();
this.getList();
console.log("111111", this.queryParams.equipmentTypeCode);
this.showFlag = false;
this.queryParams.itemCodeGet = ""; this.queryParams.itemCodeGet = "";
} }
}, },
cancelEquipmentForm(){ cancelEquipmentForm(){
this.queryParams.equipmentTypeCode = null; this.queryParams.equipmentTypeCode = null;
this.typeName = null;
this.getList(); this.getList();
console.log("111111", this.queryParams.equipmentTypeCode);
this.showFlag = false; this.showFlag = false;
}, }
}, },
}; };
</script> </script>

@ -17,10 +17,10 @@
style="width: 150px" style="width: 150px"
/> />
</el-form-item> </el-form-item>
<el-form-item label="规格型号" prop="spareMode"> <el-form-item label="备品备件名称" prop="materialDesc">
<el-input <el-input
v-model="queryParams.spareMode" v-model="queryParams.materialDesc"
placeholder="请输入规格型号" placeholder="请输入备品备件名称"
clearable clearable
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
style="width: 150px" style="width: 150px"

@ -34,9 +34,9 @@
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item>
<el-form-item label="产线名称" prop="lineName"> <el-form-item label="产线名称" prop="equipmentName">
<el-input <el-input
v-model="queryParams.lineName" v-model="queryParams.equipmentName"
placeholder="请输入产线名称" placeholder="请输入产线名称"
clearable clearable
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
@ -49,7 +49,19 @@
</el-form-item> </el-form-item>
</el-form> </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"
v-hasPermi="['unitPriceReport:report:export']"
>导出</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="unitPriceList" @selection-change="handleSelectionChange"> <el-table v-loading="loading" :data="unitPriceList" @selection-change="handleSelectionChange">
<!-- <el-table-column type="selection" width="55" align="center" />--> <!-- <el-table-column type="selection" width="55" align="center" />-->
<el-table-column fixed="left" label="工单号" align="center" width="180" prop="workorderCode" /> <el-table-column fixed="left" label="工单号" align="center" width="180" prop="workorderCode" />
@ -83,7 +95,7 @@
type="text" type="text"
icon="el-icon-edit" icon="el-icon-edit"
@click="handleUpdate(scope.row)" @click="handleUpdate(scope.row)"
v-hasPermi="['system:unitPrice:edit']" v-hasPermi="['unitPriceReport:report:edit']"
>工资修改</el-button> >工资修改</el-button>
<!-- <el-button--> <!-- <el-button-->
<!-- size="mini"--> <!-- size="mini"-->
@ -305,7 +317,7 @@ export default {
}, },
/** 导出按钮操作 */ /** 导出按钮操作 */
handleExport() { handleExport() {
this.download('mes/unitPrice/export', { this.download('mes/unitPriceReport/export', {
...this.queryParams ...this.queryParams
}, `unitPrice_${new Date().getTime()}.xlsx`) }, `unitPrice_${new Date().getTime()}.xlsx`)
}, },

@ -20,6 +20,7 @@
/> />
</div> </div>
<div class="head-container" style="text-align: center"> <div class="head-container" style="text-align: center">
<el-scrollbar style="height:500px">
<el-tree <el-tree
:data="treeData" :data="treeData"
:props = "{id:'equipmentTypeCode',label:'equipmentTypeName'}" :props = "{id:'equipmentTypeCode',label:'equipmentTypeName'}"
@ -30,6 +31,7 @@
default-expand-all default-expand-all
@node-click="handleNodeClick" @node-click="handleNodeClick"
/> />
</el-scrollbar>
</div> </div>
</el-col> </el-col>

@ -20,6 +20,7 @@
/> />
</div> </div>
<div class="head-container" style="text-align: center"> <div class="head-container" style="text-align: center">
<el-scrollbar style="height:500px">
<el-tree <el-tree
:data="treeData" :data="treeData"
:props = "{id:'equipmentTypeCode',label:'equipmentTypeName'}" :props = "{id:'equipmentTypeCode',label:'equipmentTypeName'}"
@ -30,6 +31,7 @@
default-expand-all default-expand-all
@node-click="handleNodeClick" @node-click="handleNodeClick"
/> />
</el-scrollbar>
</div> </div>
</el-col> </el-col>

Loading…
Cancel
Save