From beef36c5882dd5861e8091268d3df351c75a5c77 Mon Sep 17 00:00:00 2001
From: zhang_li <2235006734@qqq.com>
Date: Wed, 7 Feb 2024 17:30:22 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BF=9D=E5=85=BB=E5=B7=A5=E5=85=9A=E5=92=8C?=
=?UTF-8?q?=E7=82=B9=E6=A3=80=E5=B7=A5=E5=8D=95?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
api/device.js | 9 +
api/index.js | 8 +-
api/spotCheckOrder.js | 36 ++
pages.json | 27 +
pages/deviceReport/index.vue | 3 -
pages/index.vue | 28 +-
pages/overhaulOrder/detail.vue | 1 +
pages/repairOrder/detail.vue | 1 +
pages/spotCheckOrder/addForm.vue | 337 ++++++++++++
pages/spotCheckOrder/addServiceRecord.vue | 629 ++++++++++++++++++++++
pages/spotCheckOrder/detail.vue | 487 +++++++++++++++++
pages/spotCheckOrder/index.vue | 237 ++++++++
pages/spotCheckOrder/myRepairOrder.vue | 223 ++++++++
pages/upkeepOrder/detail.vue | 1 +
14 files changed, 2014 insertions(+), 13 deletions(-)
create mode 100644 api/spotCheckOrder.js
create mode 100644 pages/spotCheckOrder/addForm.vue
create mode 100644 pages/spotCheckOrder/addServiceRecord.vue
create mode 100644 pages/spotCheckOrder/detail.vue
create mode 100644 pages/spotCheckOrder/index.vue
create mode 100644 pages/spotCheckOrder/myRepairOrder.vue
diff --git a/api/device.js b/api/device.js
index b593269..5a616ff 100644
--- a/api/device.js
+++ b/api/device.js
@@ -48,3 +48,12 @@ export function devicePage(params) {
params
})
}
+
+// 根据设备号码获取二级列表
+export function getSubList(params) {
+ return request({
+ url: '/eam/device-mold-items/getListByNumber',
+ 'method': 'GET',
+ params
+ })
+}
diff --git a/api/index.js b/api/index.js
index 2ed8dfa..39ab82d 100644
--- a/api/index.js
+++ b/api/index.js
@@ -6,4 +6,10 @@ export function getCounts() {
'method': 'GET'
})
}
-
+// 获取首页代办信息
+export function getToDoCountsByUser() {
+ return request({
+ url: '/eam/device-accounts/getToDoCountsByUser',
+ 'method': 'GET'
+ })
+}
diff --git a/api/spotCheckOrder.js b/api/spotCheckOrder.js
new file mode 100644
index 0000000..9f36f77
--- /dev/null
+++ b/api/spotCheckOrder.js
@@ -0,0 +1,36 @@
+import request from '@/utils/request'
+
+
+// 添加工单
+export function spotCheckOrderCreate(data) {
+ return request({
+ url: '/eam/device-spot-inspection-record-main/create',
+ 'method': 'POST',
+ data
+ })
+}
+// 编辑工单
+export function spotCheckOrderUpdate(data) {
+ return request({
+ url: '/eam/device-spot-inspection-record-main/update',
+ 'method': 'PUT',
+ data
+ })
+}
+// 报修列表
+export function spotCheckOrderPage(params) {
+ return request({
+ url: '/eam/device-spot-inspection-record-main/getAppPage',
+ 'method': 'GET',
+ params
+ })
+}
+// 操作工单
+export function orderClick(params) {
+ return request({
+ url: '/eam/device-spot-inspection-record-main/onClick',
+ 'method': 'GET',
+ params
+ })
+}
+
diff --git a/pages.json b/pages.json
index d97e886..2c468ee 100644
--- a/pages.json
+++ b/pages.json
@@ -142,6 +142,33 @@
"navigationBarBackgroundColor": "#409eff",
"navigationBarTextStyle": "white"
}
+ },{
+ "path": "pages/spotCheckOrder/index",
+ "style": {
+ "navigationBarTitleText": "点检工单",
+ "navigationStyle": "custom"
+ }
+ },{
+ "path": "pages/spotCheckOrder/addForm",
+ "style": {
+ "navigationBarTitleText": "添加点检工单",
+ "navigationBarBackgroundColor": "#409eff",
+ "navigationBarTextStyle": "white"
+ }
+ },{
+ "path": "pages/spotCheckOrder/detail",
+ "style": {
+ "navigationBarTitleText": "点检工单详情",
+ "navigationBarBackgroundColor": "#409eff",
+ "navigationBarTextStyle": "white"
+ }
+ },{
+ "path": "pages/spotCheckOrder/addServiceRecord",
+ "style": {
+ "navigationBarTitleText": "添加点检内容",
+ "navigationBarBackgroundColor": "#409eff",
+ "navigationBarTextStyle": "white"
+ }
},{
"path": "pages/mine/changePassword",
"style": {
diff --git a/pages/deviceReport/index.vue b/pages/deviceReport/index.vue
index d0c9323..2cd45d7 100644
--- a/pages/deviceReport/index.vue
+++ b/pages/deviceReport/index.vue
@@ -71,9 +71,6 @@
screen() {
this.$tab.navigateTo(`/pages/deviceReport/screen?type=${this.type}`)
},
- itemClick(item, index) {
- this.$tab.navigateTo(`/pages/workOrderList/detail?type=${this.type}`)
- },
addForm() {
this.$tab.navigateTo(`/pages/deviceReport/addForm?type=${this.params.type}`)
},
diff --git a/pages/index.vue b/pages/index.vue
index 5a69341..2b4ae3d 100644
--- a/pages/index.vue
+++ b/pages/index.vue
@@ -13,29 +13,29 @@
- {{counts.allCount}}
+ {{counts.allCount || 0}}
设备总数
- {{counts.breakDownCount}}
+ {{counts.breakDownCount || 0}}
故障中设备
- {{counts.repairCount}}
+ {{counts.repairCount || 0}}
已报修设备
- 32
+ {{counts1.gongdan || 0}}
待接单
- 32
+ {{counts1.yanzheng || 0}}
待验证
- 32
+ {{counts1.shenpi || 0}}
待审核
@@ -63,7 +63,7 @@
-
+
点检工单
@@ -127,7 +127,8 @@
getInfo
} from '@/api/login'
import {
- getCounts
+ getCounts,
+ getToDoCountsByUser
} from '@/api/index'
import { getAccessToken } from '@/utils/auth'
@@ -135,7 +136,8 @@
data() {
return {
bgOpacity: 0,
- counts:''
+ counts:'',
+ counts1:''
}
},
@@ -146,6 +148,7 @@
getInfo() {
getInfo().then(res => {
console.log((res))
+ uni.setStorageSync('user', res.data)
})
},
getPermissionInfo() {
@@ -159,12 +162,19 @@
this.counts = res.data
})
},
+ getToDoCountsByUser() {
+ getToDoCountsByUser().then(res => {
+ console.log((res))
+ this.counts1 = res.data
+ })
+ },
},
onLoad: function() {
if (getAccessToken()) {
this.getInfo()
this.getPermissionInfo()
this.getCounts()
+ this.getToDoCountsByUser()
}
},
diff --git a/pages/overhaulOrder/detail.vue b/pages/overhaulOrder/detail.vue
index acfb3da..2528f84 100644
--- a/pages/overhaulOrder/detail.vue
+++ b/pages/overhaulOrder/detail.vue
@@ -276,6 +276,7 @@
}
this.changeItem = this.list[this.current]
+ this.data.maintenance = uni.getStorageSync('user').nickname
},
diff --git a/pages/repairOrder/detail.vue b/pages/repairOrder/detail.vue
index ebb776e..35604bd 100644
--- a/pages/repairOrder/detail.vue
+++ b/pages/repairOrder/detail.vue
@@ -313,6 +313,7 @@
}
this.changeItem = this.list[this.current]
this.orderCompleteResult = await dictApi.getDict('order_complete_result')
+ this.data.maintenance = uni.getStorageSync('user').nickname
},
diff --git a/pages/spotCheckOrder/addForm.vue b/pages/spotCheckOrder/addForm.vue
new file mode 100644
index 0000000..2e2dfd5
--- /dev/null
+++ b/pages/spotCheckOrder/addForm.vue
@@ -0,0 +1,337 @@
+
+
+
+
+
+
+
+
+
+
+ 扫描
+
+
+
+
+
+
+
+
+
+
+
+ {{selectFormat(form.classes,maintenanceShift)}}
+
+
+ {{`请选择班次`}}
+
+
+
+
+
+
+
+
+
+
+
+ {{item.name}}
+
+
+
+
+
+
+ 设备部位名称:
+
+ {{item.equipmentParts}}
+
+
+ 是否符合:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/pages/spotCheckOrder/addServiceRecord.vue b/pages/spotCheckOrder/addServiceRecord.vue
new file mode 100644
index 0000000..5494dd0
--- /dev/null
+++ b/pages/spotCheckOrder/addServiceRecord.vue
@@ -0,0 +1,629 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{selectFormatCheck(form.chargePeoples,selecUserList)}}
+
+
+ 请选择维修人员
+
+
+
+
+
+
+
+ {{selectFormat(form.status,jxDetailsStatus)}}
+
+
+ {{`请选择完成情况`}}
+
+
+
+
+
+
+
+ {{formatDate}}
+
+
+ {{`请选择完成时间`}}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ *备件
+
+
+
+
+
+ {{item.name}}
+
+
+
+
+
+
+ 数量:{{item.qty}}
+
+
+
+
+
+
+
+
+ 添加备件
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/pages/spotCheckOrder/detail.vue b/pages/spotCheckOrder/detail.vue
new file mode 100644
index 0000000..acfb3da
--- /dev/null
+++ b/pages/spotCheckOrder/detail.vue
@@ -0,0 +1,487 @@
+
+
+
+
+
+ 检修工单
+
+
+
+ 工单单号:
+ {{data.number}}
+
+
+ 维修工单:
+ {{data.maintenanceNumber}}
+
+
+ 故障类型:
+ {{data.faultTypeName}}
+
+
+ 维修工:
+ {{data.maintenance}}
+
+
+
+
+
+
+
+
+
+
+
+ {{changeItem.name}}
+
+
+
+ 设备编号:
+ {{deviceInfo.number}}
+
+
+ 设备名称:
+ {{deviceInfo.name}}
+
+
+ 所属厂区:
+ {{deviceInfo.factoryAreaName}}
+
+
+ 设备类型:
+ {{deviceInfo.typeName}}
+
+
+
+
+
+
+
+ {{item.name}}
+
+
+
+
+ 预估人数:
+ {{item.peoples}}人
+
+
+ 预估分钟:
+ {{item.estimatedMinutes}}分钟
+
+
+ 实际分钟:
+ {{item.actualMinutes}}分钟
+
+
+ 责任人:
+ {{item.chargePeoplesName}}
+
+
+ 完成情况:
+ {{item.status==0?'完成':'未完成'}}
+
+
+ 完成时间:
+ {{$time.formatDate(item.completionTime)}}
+
+
+ 工程师确认:
+ {{item.engineer}}
+
+
+ 未完成原因:
+ {{item.uncompleted}}
+
+
+ 备件:
+
+
+
+ {{cur.name}}
+
+
+ 备件编号:{{cur.number}}
+
+
+ 数量:{{cur.qty}}
+
+
+
+
+
+
+ 添加检修内容
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/pages/spotCheckOrder/index.vue b/pages/spotCheckOrder/index.vue
new file mode 100644
index 0000000..a653279
--- /dev/null
+++ b/pages/spotCheckOrder/index.vue
@@ -0,0 +1,237 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{item.describes}}
+
+
+
+
+
+
+
+
+
+ 检修单号:{{item.number}}
+
+
+ 维修工单:{{item.maintenanceNumber}}
+
+
+ {{`${params.type=='DEVICE'?'设备' : '模具'}`}}编号:{{item.deviceNumber}}
+
+
+ {{`${params.type=='DEVICE'?'设备' : '模具'}`}}名称:{{item.name}}
+
+
+ 所属厂区:{{item.factoryAreaName}}
+
+
+ 故障类型:{{item.faultTypeName}}
+
+
+
+
+ {{`${$time.formatDate(item.createTime)}`}}
+
+
+ 编辑
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/pages/spotCheckOrder/myRepairOrder.vue b/pages/spotCheckOrder/myRepairOrder.vue
new file mode 100644
index 0000000..13abc12
--- /dev/null
+++ b/pages/spotCheckOrder/myRepairOrder.vue
@@ -0,0 +1,223 @@
+
+
+
+
+
+
+
+
+
+
+ {{item.describes}}
+
+
+ 2023-12-12 08:00:00
+
+
+
+ 报修单号:{{item.number}}
+
+
+ 设备编号:{{item.deviceNumber}}
+
+
+ 设备名称:{{item.name}}
+
+
+ 所属厂区:{{item.factoryAreaName}}
+
+
+
+
+
+
+ 撤销
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/pages/upkeepOrder/detail.vue b/pages/upkeepOrder/detail.vue
index cd2f79d..a1c1daf 100644
--- a/pages/upkeepOrder/detail.vue
+++ b/pages/upkeepOrder/detail.vue
@@ -291,6 +291,7 @@
}
this.changeItem = this.list[this.current]
+ this.data.maintenance = uni.getStorageSync('user').nickname
},