From 864ee3c2d04868e96279d35634bb07a9e8f16889 Mon Sep 17 00:00:00 2001
From: wws <18630710203@163.com>
Date: Mon, 20 Nov 2023 17:57:35 +0800
Subject: [PATCH] 1
---
src/views/device/deviceOrder/index.vue | 24 +++++++++-
src/views/device/inspectionPlan/index.vue | 6 ++-
src/views/device/spotCheckPlan/index.vue | 6 ++-
.../device/spotInspectionOrder/index.vue | 21 ++++++++-
src/views/device/upkeepOrder/index.vue | 44 ++++++++++++++++++-
src/views/device/upkeepPlan/index.vue | 7 ++-
6 files changed, 101 insertions(+), 7 deletions(-)
diff --git a/src/views/device/deviceOrder/index.vue b/src/views/device/deviceOrder/index.vue
index d40f1b20..f3bf73c8 100644
--- a/src/views/device/deviceOrder/index.vue
+++ b/src/views/device/deviceOrder/index.vue
@@ -849,6 +849,9 @@ export default {
const orderCode = row.orderCode || this.ids
getDeviceOrder(orderCode).then(response => {
this.form = response.data;
+ if (response.data.timeArray[0] == null) {
+ response.data.timeArray = [];
+ }
for (let i = 0; i < this.form.detailList.length; i++) {
for (let j = 0; j < this.form.detailList[i].standardList.length; j++) {
this.form.detailList[i].standardList[j].itemName = this.form.detailList[i].itemName;
@@ -882,7 +885,26 @@ export default {
/** 删除按钮操作 */
handleDelete(row) {
const orderIds = row.orderId || this.ids;
- this.$modal.confirm('是否确认删除计划工单编号为"' + orderIds + '"的数据项?').then(function () {
+
+ var orderCodes = '';
+ // 处理信息
+ for (let i = 0; i < this.deviceOrderList.length; i++) {
+ for (let j = 0; j < orderIds.length; j++) {
+ if (orderIds[j] == this.deviceOrderList[i].orderId) {
+ orderCodes = orderCodes + this.deviceOrderList[i].orderCode + ',';
+ }
+ }
+ }
+
+ if (orderCodes == '') {
+ for (let i = 0; i < this.deviceOrderList.length; i++) {
+ if (orderIds == this.deviceOrderList[i].orderId) {
+ orderCodes = this.deviceOrderList[i].orderCode;
+ }
+ }
+ }
+
+ this.$modal.confirm('是否确认删除计划工单编号为"' + orderCodes + '"的数据项?').then(function () {
return delDeviceOrder(orderIds);
}).then(() => {
this.getList();
diff --git a/src/views/device/inspectionPlan/index.vue b/src/views/device/inspectionPlan/index.vue
index 09302fef..feaa87dc 100644
--- a/src/views/device/inspectionPlan/index.vue
+++ b/src/views/device/inspectionPlan/index.vue
@@ -948,7 +948,11 @@ export default {
},
// 删除设备-巡检项
delTheEquItem(e) {
- this.form.equipmentItem.splice(e.equipmentCode, 1)
+ for (let i = 0; i < this.form.equipmentItem.length; i++) {
+ if (this.form.equipmentItem[i].equipmentCode == e.equipmentCode) {
+ this.form.equipmentItem.splice(i, 1);
+ }
+ }
},
// 选择设备确认按钮
confirmSelectEquBtn() {
diff --git a/src/views/device/spotCheckPlan/index.vue b/src/views/device/spotCheckPlan/index.vue
index e96fae84..6e49ee84 100644
--- a/src/views/device/spotCheckPlan/index.vue
+++ b/src/views/device/spotCheckPlan/index.vue
@@ -996,7 +996,11 @@ export default {
},
// 删除设备-点检项
delTheEquItem(e) {
- this.form.equipmentItem.splice(e.equipmentCode, 1)
+ for (let i = 0; i < this.form.equipmentItem.length; i++) {
+ if (this.form.equipmentItem[i].equipmentCode == e.equipmentCode) {
+ this.form.equipmentItem.splice(i, 1);
+ }
+ }
},
// 选择设备确认按钮
confirmSelectEquBtn() {
diff --git a/src/views/device/spotInspectionOrder/index.vue b/src/views/device/spotInspectionOrder/index.vue
index 9188460d..a4c18994 100644
--- a/src/views/device/spotInspectionOrder/index.vue
+++ b/src/views/device/spotInspectionOrder/index.vue
@@ -888,7 +888,26 @@ export default {
/** 删除按钮操作 */
handleDelete(row) {
const orderIds = row.orderId || this.ids;
- this.$modal.confirm('是否确认删除点检工单编号为"' + orderIds + '"的数据项?').then(function() {
+
+ var orderCodes = '';
+ // 处理信息
+ for (let i = 0; i < this.spotInspectionOrderList.length; i++) {
+ for (let j = 0; j < orderIds.length; j++) {
+ if (orderIds[j] == this.spotInspectionOrderList[i].orderId) {
+ orderCodes = orderCodes + this.spotInspectionOrderList[i].orderCode + ',';
+ }
+ }
+ }
+
+ if (orderCodes == '') {
+ for (let i = 0; i < this.spotInspectionOrderList.length; i++) {
+ if (orderIds == this.spotInspectionOrderList[i].orderId) {
+ orderCodes = this.spotInspectionOrderList[i].orderCode;
+ }
+ }
+ }
+
+ this.$modal.confirm('是否确认删除点检工单编号为"' + orderCodes + '"的数据项?').then(function() {
return delSpotInspectionOrder(orderIds);
}).then(() => {
this.getList();
diff --git a/src/views/device/upkeepOrder/index.vue b/src/views/device/upkeepOrder/index.vue
index ec3d02d9..4a6f5fb3 100644
--- a/src/views/device/upkeepOrder/index.vue
+++ b/src/views/device/upkeepOrder/index.vue
@@ -804,6 +804,9 @@
+
+
+
{
this.spareTotal = response.total;
this.spareList = response.rows;
+ // 设置库存:总量-冻结数量
+ for (let i = 0; i < this.spareList.length; i++) {
+ this.spareList[i].amount = Number(this.spareList[i].amount) - Number(this.spareList[i].storageAmount)
+ }
this.spareLoading = false;
})
},
@@ -1686,7 +1707,26 @@ export default {
/** 删除按钮操作 */
handleDelete(row) {
const orderIds = row.orderId || this.ids;
- this.$modal.confirm('是否确认删除保养工单编号为"' + orderIds + '"的数据项?').then(function () {
+
+ var orderCodes = '';
+ // 处理信息
+ for (let i = 0; i < this.upkeepOrderList.length; i++) {
+ for (let j = 0; j < orderIds.length; j++) {
+ if (orderIds[j] == this.upkeepOrderList[i].orderId) {
+ orderCodes = orderCodes + this.upkeepOrderList[i].orderCode + ',';
+ }
+ }
+ }
+
+ if (orderCodes == '') {
+ for (let i = 0; i < this.upkeepOrderList.length; i++) {
+ if (orderIds == this.upkeepOrderList[i].orderId) {
+ orderCodes = this.upkeepOrderList[i].orderCode;
+ }
+ }
+ }
+
+ this.$modal.confirm('是否确认删除保养工单编号为"' + orderCodes + '"的数据项?').then(function () {
return delUpkeepOrder(orderIds);
}).then(() => {
this.getList();
diff --git a/src/views/device/upkeepPlan/index.vue b/src/views/device/upkeepPlan/index.vue
index d27b1463..dbdcde1a 100644
--- a/src/views/device/upkeepPlan/index.vue
+++ b/src/views/device/upkeepPlan/index.vue
@@ -523,6 +523,7 @@
width="300">
@@ -1314,7 +1315,11 @@ export default {
},
// 删除设备-保养项
delTheEquItem(e) {
- this.form.equipmentItem.splice(e.equipmentCode, 1)
+ for (let i = 0; i < this.form.equipmentItem.length; i++) {
+ if (this.form.equipmentItem[i].equipmentCode == e.equipmentCode) {
+ this.form.equipmentItem.splice(i, 1);
+ }
+ }
},
// 选择设备确认按钮
confirmSelectEquBtn() {