From 5ef55d45fe7f44b680bd334366cb6da56a3a7cf3 Mon Sep 17 00:00:00 2001
From: gaojs <757918719@qq.com>
Date: Tue, 25 Jun 2024 13:55:06 +0800
Subject: [PATCH] =?UTF-8?q?EAM=20=E2=80=94=E2=80=94>=20=201=E3=80=81?=
=?UTF-8?q?=E4=BF=9D=E5=85=BB/=E7=BB=B4=E4=BF=AE=E4=B8=B4=E6=97=B6?=
=?UTF-8?q?=E5=B7=A5=E5=8D=95=20=20=E6=97=A0=E6=B3=95=E6=B7=BB=E5=8A=A0?=
=?UTF-8?q?=E9=A1=B9=20=20=20=20=20=20=20=20=20=202=E3=80=81=E6=89=80?=
=?UTF-8?q?=E6=9C=89=E6=8E=A5=E5=8D=95=E9=83=BD=E5=85=88=E6=9B=B4=E6=96=B0?=
=?UTF-8?q?=20=20=E6=89=A7=E8=A1=8C=E4=BA=BA=E4=BF=A1=E6=81=AF=20=20=20=20?=
=?UTF-8?q?=20=20=20=20=20=203=E3=80=81PDA=20=20=E5=88=A0=E9=99=A4?=
=?UTF-8?q?=E5=B7=A1=E6=A3=80=E9=A1=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/api/eam/inspection.js | 5 +++++
src/api/eam/spotcheck.js | 5 +++++
src/pages/eam/inspectionOrder/item.vue | 23 +++++++++++++++++++
src/pages/eam/spotcheckOrder/detail.vue | 16 ++++++-------
src/pages/eam/spotcheckOrder/index.vue | 4 ++--
src/pages/eam/spotcheckOrder/item.vue | 30 +++++++++++++++++++++----
6 files changed, 69 insertions(+), 14 deletions(-)
diff --git a/src/api/eam/inspection.js b/src/api/eam/inspection.js
index f6dc1c0..d6459d3 100644
--- a/src/api/eam/inspection.js
+++ b/src/api/eam/inspection.js
@@ -35,6 +35,11 @@ export function inspectionOrderItemCreate(params) {
return http.post('/eam/equipment-inspection-detail/create',params)
}
+//删除巡检项
+export function inspectionOrderDetailDelete(number) {
+ return http.delete('/eam/equipment-inspection-detail/delete?id=' + number)
+}
+
//获取非必选的巡检项
export function inspectionPlanItemList(params) {
return http.post('/eam/relation-inspection-plan-item/getList',params)
diff --git a/src/api/eam/spotcheck.js b/src/api/eam/spotcheck.js
index 6c280cc..835f9a2 100644
--- a/src/api/eam/spotcheck.js
+++ b/src/api/eam/spotcheck.js
@@ -35,6 +35,11 @@ export function spotcheckOrderItemCreate(params) {
return http.post('/eam/equipment-spot-check-detail/create',params)
}
+//删除点检项
+export function spotcheckOrderDetailDelete(number) {
+ return http.delete('/eam/equipment-spot-check-detail/delete?id=' + number)
+}
+
//获取非必选的点检项
export function spotcheckPlanItemList(params) {
return http.post('/eam/relation-spot-check-plan-item/getList',params)
diff --git a/src/pages/eam/inspectionOrder/item.vue b/src/pages/eam/inspectionOrder/item.vue
index e0482eb..4c1d413 100644
--- a/src/pages/eam/inspectionOrder/item.vue
+++ b/src/pages/eam/inspectionOrder/item.vue
@@ -26,6 +26,7 @@
@@ -161,6 +162,28 @@
}
+ //删除巡检项
+ function deleteItem(){
+ proxy.$modal.confirm("是否确认删除").then(()=>{
+ proxy.$modal.loading('加载中')
+ inspectionOrderApi.inspectionOrderDetailDelete(data.value.id).then((res) => {
+ proxy.$modal.closeLoading()
+ if(res.data){
+ proxy.$modal.showToast('成功')
+ setTimeout(() => {
+ proxy.$tab.navigateBack()
+ loading.value = false
+ proxy.$modal.closeLoading()
+ }, 1000)
+ }
+ }).catch(() => {
+ proxy.$modal.closeLoading()
+ loading.value = false
+ })
+ })
+ }
+
+
function submitForm1(){
// 校验
if (form1.value.resultStr.length == 0) {
diff --git a/src/pages/eam/spotcheckOrder/detail.vue b/src/pages/eam/spotcheckOrder/detail.vue
index 3daa650..855d0ca 100644
--- a/src/pages/eam/spotcheckOrder/detail.vue
+++ b/src/pages/eam/spotcheckOrder/detail.vue
@@ -196,7 +196,7 @@
getCurrentInstance
} from 'vue'
- import * as inspectionOrderApi from "@/api/eam/spotcheck"
+ import * as spotcheckOrderApi from "@/api/eam/spotcheck"
const { proxy } = getCurrentInstance()
const subList = ref([])
@@ -294,7 +294,7 @@
proxy.$modal.confirm('是否完成?').then(() => {
proxy.$modal.loading('加载中')
loading.value = true
- inspectionOrderApi.spotcheckExecuteOrder(paramsData).then((res) => {
+ spotcheckOrderApi.spotcheckExecuteOrder(paramsData).then((res) => {
if (res.data) {
proxy.$modal.showToast('操作成功')
setTimeout(() => {
@@ -329,7 +329,7 @@
status: '4'
}
proxy.$modal.confirm("是否确认接单").then(()=>{
- inspectionOrderApi.spotcheckUpdateOrder(datas).then((res) => {
+ spotcheckOrderApi.spotcheckUpdateOrder(datas).then((res) => {
if (res.data) {
proxy.$modal.showToast('接单成功')
setTimeout(() => {
@@ -356,7 +356,7 @@
status: '5'
}
proxy.$modal.confirm("是否确认执行").then(()=>{
- inspectionOrderApi.spotcheckUpdateOrder(datas).then((res) => {
+ spotcheckOrderApi.spotcheckUpdateOrder(datas).then((res) => {
if (res.data) {
proxy.$modal.showToast('执行成功')
setTimeout(() => {
@@ -400,7 +400,7 @@
}
formPopupValidate.value = false
proxy.$modal.confirm("是否确认执行").then(()=>{
- inspectionOrderApi.spotcheckOrderPassed(paramsData).then((res) => {
+ spotcheckOrderApi.spotcheckOrderPassed(paramsData).then((res) => {
console.log(res);
proxy.$modal.showToast('执行成功')
setTimeout(() => {
@@ -417,7 +417,7 @@
}
formPopupValidate.value = false
proxy.$modal.confirm("是否确认执行").then(()=>{
- inspectionOrderApi.spotcheckOrderRejected(paramsData).then((res) => {
+ spotcheckOrderApi.spotcheckOrderRejected(paramsData).then((res) => {
console.log(res);
proxy.$modal.showToast('执行成功')
setTimeout(() => {
@@ -483,7 +483,7 @@
selectListByNumber()
})
function selectDetail() {
- inspectionOrderApi.spotcheckOrder(id.value).then((res) => {
+ spotcheckOrderApi.spotcheckOrder(id.value).then((res) => {
if (res.data) {
data.value = res.data
}
@@ -494,7 +494,7 @@
const data = {
masterId: id.value
}
- inspectionOrderApi.spotcheckOrderDetail(data).then((res) => {
+ spotcheckOrderApi.spotcheckOrderDetail(data).then((res) => {
if (res.data) {
subList.value = res.data
}
diff --git a/src/pages/eam/spotcheckOrder/index.vue b/src/pages/eam/spotcheckOrder/index.vue
index c1521c4..d0cbb15 100644
--- a/src/pages/eam/spotcheckOrder/index.vue
+++ b/src/pages/eam/spotcheckOrder/index.vue
@@ -73,7 +73,7 @@
nextTick
} from 'vue'
- import * as inspectionOrderApi from "@/api/eam/spotcheck"
+ import * as spotcheckOrderApi from "@/api/eam/spotcheck"
const { proxy } = getCurrentInstance()
const params = ref({
@@ -93,7 +93,7 @@
if (status.value == 'nomore') return;
status.value = 'loading';
proxy.$modal.loading('加载中')
- await inspectionOrderApi.spotcheckOrderPage(params.value).then((res) => {
+ await spotcheckOrderApi.spotcheckOrderPage(params.value).then((res) => {
proxy.$modal.closeLoading()
if (res.data.list.length > 0) {
list.value = list.value.concat(res.data.list);
diff --git a/src/pages/eam/spotcheckOrder/item.vue b/src/pages/eam/spotcheckOrder/item.vue
index c713124..20ad9f5 100644
--- a/src/pages/eam/spotcheckOrder/item.vue
+++ b/src/pages/eam/spotcheckOrder/item.vue
@@ -26,6 +26,7 @@
@@ -98,7 +99,7 @@
getCurrentInstance
} from 'vue'
- import * as inspectionOrderApi from "@/api/eam/spotcheck"
+ import * as spotcheckOrderApi from "@/api/eam/spotcheck"
const { proxy } = getCurrentInstance()
const subList = ref([])
@@ -160,6 +161,27 @@
isShowItem.value = false
}
+ //删除点检项
+ function deleteItem(){
+ proxy.$modal.confirm("是否确认删除").then(()=>{
+ proxy.$modal.loading('加载中')
+ spotcheckOrderApi.spotcheckOrderDetailDelete(data.value.id).then((res) => {
+ proxy.$modal.closeLoading()
+ if(res.data){
+ proxy.$modal.showToast('成功')
+ setTimeout(() => {
+ proxy.$tab.navigateBack()
+ loading.value = false
+ proxy.$modal.closeLoading()
+ }, 1000)
+ }
+ }).catch(() => {
+ proxy.$modal.closeLoading()
+ loading.value = false
+ })
+ })
+ }
+
function submitForm1(){
// 校验
@@ -174,7 +196,7 @@
proxy.$modal.confirm("是否确认提交").then(()=>{
proxy.$modal.loading('加载中')
- inspectionOrderApi.spotcheckOrderItemUpdate(form1.value).then((res) => {
+ spotcheckOrderApi.spotcheckOrderItemUpdate(form1.value).then((res) => {
proxy.$modal.closeLoading()
if(res.data){
proxy.$modal.showToast('成功')
@@ -199,7 +221,7 @@
}
proxy.$modal.confirm("是否确认提交").then(()=>{
proxy.$modal.loading('加载中')
- inspectionOrderApi.spotcheckOrderItemCreate(form2.value).then((res) => {
+ spotcheckOrderApi.spotcheckOrderItemCreate(form2.value).then((res) => {
proxy.$modal.closeLoading()
console.log(res)
if(res.code == 0){
@@ -267,7 +289,7 @@
available: 'TRUE',
isSelectd: 'false'
}
- inspectionOrderApi.spotcheckPlanItemList(paras1).then((res) => {
+ spotcheckOrderApi.spotcheckPlanItemList(paras1).then((res) => {
if (res.data) {
itemList.value = res.data
}