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 @@ + + + + + \ 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 @@ + + + + + \ 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 @@ + + + + + \ 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 @@ + + + + + \ 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 @@ + + + + + \ 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 },