From 0ec476ac2e1b212405fa4e2dfef3768407f3269c Mon Sep 17 00:00:00 2001 From: A0010407 Date: Tue, 27 Feb 2024 14:18:02 +0800 Subject: [PATCH] =?UTF-8?q?2024-2-27=20=E8=AE=BE=E5=A4=87=E6=A8=A1?= =?UTF-8?q?=E5=9D=97+=E5=B7=A5=E8=89=BA=E6=A8=A1=E5=9D=97=20=E8=AE=BE?= =?UTF-8?q?=E5=A4=87=E9=80=89=E6=8B=A9=E9=A1=B5=E9=9D=A2=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../faultReport/selectSingleEquipment.vue | 97 +++++++---- .../selectSingleEquipment.vue | 162 +++++++++++++----- .../repairOrder/selectSingleEquipment.vue | 97 +++++++---- .../selectSingleEquipment.vue | 77 +++++---- src/views/device/sparePartsLedger/index.vue | 6 +- src/views/technology/process/single.vue | 4 +- src/views/technology/recipe/single.vue | 4 +- 7 files changed, 307 insertions(+), 140 deletions(-) diff --git a/src/views/device/faultReport/selectSingleEquipment.vue b/src/views/device/faultReport/selectSingleEquipment.vue index bf9dee99..846b8839 100644 --- a/src/views/device/faultReport/selectSingleEquipment.vue +++ b/src/views/device/faultReport/selectSingleEquipment.vue @@ -8,24 +8,32 @@ center :before-close="cancelEquipmentForm" > - - + - - 请选择设备类型: -
+
+ +
+
+ -
- + :data="treeData" + :props = "{id:'equipmentTypeCode',label:'equipmentTypeName'}" + node-key="id" + :expand-on-click-node="false" + :filter-node-method="filterNode" + ref="tree" + default-expand-all + @node-click="handleNodeClick" + /> + +
@@ -43,7 +51,7 @@ v-model="queryParams.itemCode" placeholder="请输入设备编码" clearable - style="width: 160px" + style="width: 170px" @keyup.enter.native="handleQuery" /> @@ -52,7 +60,7 @@ v-model="queryParams.itemName" placeholder="请输入设备名称" clearable - style="width: 160px" + style="width: 170px" @keyup.enter.native="handleQuery" /> @@ -62,7 +70,7 @@ v-model="queryParams.groupLine" filterable placeholder="请选择组线" - style="width: 160px" + style="width: 170px" > 搜索 - 重置 @@ -111,7 +123,6 @@ align="center" key="itemCode" prop="equipmentCode" - v-if="columns[0].visible" > + + + - { + getEquList(this.queryParams).then((response) => { this.itemList = response.rows; this.total = response.total; this.loading = false; @@ -267,9 +303,11 @@ export default { // 筛选节点 filterNode(value, data) { - console.log(value, data); + console.log("value:",value,"data:",data); 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.$emit("onSelected", this.selectedRows); - this.queryParams.equipmentTypeCode = null; - this.getList(); - this.showFlag = false; + this.cancelEquipmentForm(); this.queryParams.itemCodeGet = ""; } }, cancelEquipmentForm() { this.queryParams.equipmentTypeCode = null; + this.typeName = null; this.getList(); this.showFlag = false; }, diff --git a/src/views/device/outsourceWorkOrder/selectSingleEquipment.vue b/src/views/device/outsourceWorkOrder/selectSingleEquipment.vue index 898f78aa..9dc421a9 100644 --- a/src/views/device/outsourceWorkOrder/selectSingleEquipment.vue +++ b/src/views/device/outsourceWorkOrder/selectSingleEquipment.vue @@ -4,28 +4,36 @@ v-if="showFlag" :visible.sync="showFlag" :modal="false" - width="1100px" + width="1200px" center :before-close="cancelEquipmentForm" > - - + - - 请选择设备类型: -
+
+ +
+
+ -
- + :data="treeData" + :props = "{id:'equipmentTypeCode',label:'equipmentTypeName'}" + node-key="id" + :expand-on-click-node="false" + :filter-node-method="filterNode" + ref="tree" + default-expand-all + @node-click="handleNodeClick" + /> + +
@@ -43,7 +51,7 @@ v-model="queryParams.itemCode" placeholder="请输入设备编码" clearable - style="width: 240px" + style="width: 170px" @keyup.enter.native="handleQuery" /> @@ -52,10 +60,28 @@ v-model="queryParams.itemName" placeholder="请输入设备名称" clearable - style="width: 240px" + style="width: 170px" @keyup.enter.native="handleQuery" /> + + + 搜索 - 重置 @@ -93,7 +123,6 @@ align="center" key="itemCode" prop="equipmentCode" - v-if="columns[0].visible" >
+ + + - { + 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.total = response.total; this.loading = false; }); }, + /** 查询分类下拉树结构 */ getEquipmentType() { getEquipmentTypeList().then((response) => { - console.log(response.rows); - this.treeData1 = response.rows; - console.log(this.treeData1); + this.treeData = response.rows; }); }, // 筛选节点 filterNode(value, data) { - console.log(value, data); + console.log("value:",value,"data:",data); if (!value) return true; - return data.label.indexOf(value) !== -1; + if(data.equipmentTypeName != null){ + return data.equipmentTypeName.indexOf(value) !== -1; + } }, // 节点单击事件 handleNodeClick(data) { - console.log("id", data.id); this.queryParams.equipmentTypeCode = data.equipmentTypeCode; - console.log(this.equipmentTypeCode); - this.handleQuery(); + console.log(this.queryParams.equipmentTypeCode); + this.queryParams.pageNum = 1; + this.getList(); }, /** 搜索按钮操作 */ handleQuery() { this.queryParams.pageNum = 1; - this.getList(); + this.getEquList(); }, /** 重置按钮操作 */ resetQuery() { this.queryParams.equipmentTypeCode = null; this.resetForm("queryForm"); - this.handleQuery(); + this.queryParams.pageNum = 1; + this.getList() }, // 多选框选中数据 @@ -266,7 +343,7 @@ export default { submitEquipmentForm() { const data = this.ids; if (data.length > 1) { - Message.warning("只能选择一个报修机器,请勿选择多个!"); + Message.warning("只能选择一个维修机器,请勿选择多个!"); } else { const equipmentCode = data.toString(); if (this.queryParams.itemCodeGet == "") { @@ -277,18 +354,15 @@ export default { } this.selectedRows = this.queryParams.itemCodeGet; this.$emit("onSelected", this.selectedRows); - this.queryParams.equipmentTypeCode = null; - this.getList(); - console.log("111111", this.queryParams.equipmentTypeCode); - this.showFlag = false; + this.cancelEquipmentForm(); this.queryParams.itemCodeGet = ""; } }, cancelEquipmentForm() { this.queryParams.equipmentTypeCode = null; + this.typeName = null; this.getList(); - console.log("111111", this.queryParams.equipmentTypeCode); this.showFlag = false; }, }, diff --git a/src/views/device/repairOrder/selectSingleEquipment.vue b/src/views/device/repairOrder/selectSingleEquipment.vue index 5ba78bfa..9dc421a9 100644 --- a/src/views/device/repairOrder/selectSingleEquipment.vue +++ b/src/views/device/repairOrder/selectSingleEquipment.vue @@ -8,24 +8,32 @@ center :before-close="cancelEquipmentForm" > - - + - - 请选择设备类型: -
+
+ +
+
+ -
- + :data="treeData" + :props = "{id:'equipmentTypeCode',label:'equipmentTypeName'}" + node-key="id" + :expand-on-click-node="false" + :filter-node-method="filterNode" + ref="tree" + default-expand-all + @node-click="handleNodeClick" + /> + +
@@ -43,7 +51,7 @@ v-model="queryParams.itemCode" placeholder="请输入设备编码" clearable - style="width: 160px" + style="width: 170px" @keyup.enter.native="handleQuery" /> @@ -52,7 +60,7 @@ v-model="queryParams.itemName" placeholder="请输入设备名称" clearable - style="width: 160px" + style="width: 170px" @keyup.enter.native="handleQuery" /> @@ -62,7 +70,7 @@ v-model="queryParams.groupLine" filterable placeholder="请选择组线" - style="width: 160px" + style="width: 170px" > 搜索 - 重置 @@ -111,7 +123,6 @@ align="center" key="itemCode" prop="equipmentCode" - v-if="columns[0].visible" >
+ + + - { + getEquList(this.queryParams).then((response) => { this.itemList = response.rows; this.total = response.total; this.loading = false; @@ -267,9 +303,11 @@ export default { // 筛选节点 filterNode(value, data) { - console.log(value, data); + console.log("value:",value,"data:",data); 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.$emit("onSelected", this.selectedRows); - this.queryParams.equipmentTypeCode = null; - this.getList(); - this.showFlag = false; + this.cancelEquipmentForm(); this.queryParams.itemCodeGet = ""; } }, cancelEquipmentForm() { this.queryParams.equipmentTypeCode = null; + this.typeName = null; this.getList(); this.showFlag = false; }, diff --git a/src/views/device/sparePartsApplicationRecord/selectSingleEquipment.vue b/src/views/device/sparePartsApplicationRecord/selectSingleEquipment.vue index cfa27507..b4443525 100644 --- a/src/views/device/sparePartsApplicationRecord/selectSingleEquipment.vue +++ b/src/views/device/sparePartsApplicationRecord/selectSingleEquipment.vue @@ -1,31 +1,38 @@