Browse Source

EAM ——> 1、保养/维修临时工单 无法添加项

2、所有接单都先更新  执行人信息
         3、PDA  删除巡检项
master
gaojs 3 months ago
parent
commit
5ef55d45fe
  1. 5
      src/api/eam/inspection.js
  2. 5
      src/api/eam/spotcheck.js
  3. 23
      src/pages/eam/inspectionOrder/item.vue
  4. 16
      src/pages/eam/spotcheckOrder/detail.vue
  5. 4
      src/pages/eam/spotcheckOrder/index.vue
  6. 30
      src/pages/eam/spotcheckOrder/item.vue

5
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)

5
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)

23
src/pages/eam/inspectionOrder/item.vue

@ -26,6 +26,7 @@
<view class="footer">
<view class="btns" >
<u-button type="primary" @click="submitForm1()" :loading='loading' :disabled='loading'>提交</u-button>
<u-button type="primary" @click="deleteItem()" :loading='loading' :disabled='loading'>提交</u-button>
</view>
<view style="height: constant(safe-area-inset-bottom); height: env(safe-area-inset-bottom);"></view>
</view>
@ -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) {

16
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
}

4
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);

30
src/pages/eam/spotcheckOrder/item.vue

@ -26,6 +26,7 @@
<view class="footer">
<view class="btns" >
<u-button type="primary" @click="submitForm1()" :loading='loading' :disabled='loading'>提交</u-button>
<u-button type="primary" @click="deleteItem()" :loading='loading' :disabled='loading'>删除</u-button>
</view>
<view style="height: constant(safe-area-inset-bottom); height: env(safe-area-inset-bottom);"></view>
</view>
@ -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
}

Loading…
Cancel
Save