diff --git a/api/location.js b/api/location.js
new file mode 100644
index 0000000..9057a7b
--- /dev/null
+++ b/api/location.js
@@ -0,0 +1,8 @@
+import request from '@/utils/request'
+// 获取库位
+export function getLocation(number) {
+ return request({
+ url: '/eam/location/scanCodeByNumber?number='+number,
+ 'method': 'GET',
+ })
+}
diff --git a/api/repairOrder.js b/api/repairOrder.js
index 5c16629..a4f9b8b 100644
--- a/api/repairOrder.js
+++ b/api/repairOrder.js
@@ -17,7 +17,7 @@ export function repairOrderUpdate(data) {
data
})
}
-// 报修列表
+// 工单列表
export function repairOrderPage(params) {
return request({
url: '/eam/device-maintenance-main/getAppPage',
diff --git a/api/sparePartsApplicationApprove.js b/api/sparePartsApplicationApprove.js
new file mode 100644
index 0000000..4f4a9df
--- /dev/null
+++ b/api/sparePartsApplicationApprove.js
@@ -0,0 +1,24 @@
+import request from '@/utils/request'
+
+// 备件领用审批列表
+export function sparePartsApplicationApprovePage(params) {
+ return request({
+ url: '/eam/item-apply-main/getAppApprovePage',
+ 'method': 'GET',
+ params
+ })
+}
+// 通过申请
+export function sparePartsApplicationAgree(id) {
+ return request({
+ url: '/eam/item-apply-main/agree?id='+id,
+ 'method': 'GET'
+ })
+}
+// 驳回申请
+export function sparePartsApplicationReject(id) {
+ return request({
+ url: '/eam/item-apply-main/disAgree?id='+id,
+ 'method': 'GET'
+ })
+}
diff --git a/api/sparePartsServiceWorkOrderList.js b/api/sparePartsServiceWorkOrderList.js
index 84578ad..9a5951a 100644
--- a/api/sparePartsServiceWorkOrderList.js
+++ b/api/sparePartsServiceWorkOrderList.js
@@ -8,3 +8,11 @@ export function sparePartsServiceWorkOrderListCreate(data) {
data
})
}
+// 备件维修列表
+export function sparePartsServiceWorkOrderListPage(params) {
+ return request({
+ url: '/eam/item-maintenance/getAppPage',
+ 'method': 'GET',
+ params
+ })
+}
\ No newline at end of file
diff --git a/pages.json b/pages.json
index 69edb03..c04471e 100644
--- a/pages.json
+++ b/pages.json
@@ -189,6 +189,13 @@
"navigationBarBackgroundColor": "#409eff",
"navigationBarTextStyle": "white"
}
+ },{
+ "path": "pages/sparePartsApplication/mySparePartsApplication",
+ "style": {
+ "navigationBarTitleText": "我的领用",
+ "navigationBarBackgroundColor": "#409eff",
+ "navigationBarTextStyle": "white"
+ }
},{
"path": "pages/sparePartsServiceWorkOrderList/addForm",
"style": {
@@ -196,6 +203,20 @@
"navigationBarBackgroundColor": "#409eff",
"navigationBarTextStyle": "white"
}
+ },{
+ "path": "pages/sparePartsServiceWorkOrderList/mySparePartsService",
+ "style": {
+ "navigationBarTitleText": "我的备件维修",
+ "navigationBarBackgroundColor": "#409eff",
+ "navigationBarTextStyle": "white"
+ }
+ },{
+ "path": "pages/sparePartsApplicationApprove/index",
+ "style": {
+ "navigationBarTitleText": "领用申请审批",
+ "navigationStyle": "custom",
+ "navigationBarTextStyle": "white"
+ }
}],
"tabBar": {
"color": "#8f9bb3",
diff --git a/pages/deviceReport/myDeviceReport.vue b/pages/deviceReport/myDeviceReport.vue
index e1b0892..66d4f2f 100644
--- a/pages/deviceReport/myDeviceReport.vue
+++ b/pages/deviceReport/myDeviceReport.vue
@@ -4,15 +4,13 @@
-
-
+
{{item.describes}}
-
{{`${$time.formatDate(item.createTime)}`}}
@@ -33,10 +31,10 @@
-
+
diff --git a/pages/index.vue b/pages/index.vue
index 63d0d3e..b775629 100644
--- a/pages/index.vue
+++ b/pages/index.vue
@@ -42,69 +42,81 @@
- 设备维护
-
-
-
-
- 设备报修
-
-
-
-
-
- 维修工单
-
-
-
-
-
- 检修工单
-
-
-
-
-
- 点检工单
-
-
-
-
-
- 保养工单
-
-
-
- 模具维护
+
+ 设备维护
+
+
+
+
+ 设备报修
+
+
+
+
+
+ 维修工单
+
+
+
+
+
+ 检修工单
+
+
+
+
+
+ 点检工单
+
+
+
+
+
+ 保养工单
+
+
+
+
+
+
+
+ 模具维护
+
+
+
+
+ 设备报修
+
+
+
+
+
+ 维修工单
+
+
+
+
+
+ 检修工单
+
+
+
+
+
+ 保养工单
+
+
+
+
+ 备件管理
-
-
-
- 设备报修
-
-
-
-
-
- 维修工单
-
-
-
-
-
- 检修工单
-
-
-
-
-
- 保养工单
+
+
+
+ 领用申请审批
-
- 备件管理
-
-
+
领用申请
@@ -130,14 +142,16 @@
getCounts,
getToDoCountsByUser
} from '@/api/index'
- import { getAccessToken } from '@/utils/auth'
+ import {
+ getAccessToken
+ } from '@/utils/auth'
export default {
data() {
return {
bgOpacity: 0,
- counts:'',
- counts1:''
+ counts: '',
+ counts1: '',
}
},
@@ -145,38 +159,23 @@
open(url) {
this.$tab.navigateTo(url)
},
- getInfo() {
- getInfo().then(res => {
- console.log((res))
- uni.setStorageSync('user', res.data)
- })
- },
- getPermissionInfo() {
- this.$store.dispatch('GetPermissionInfo').then(res => {
-
- })
- },
getCounts() {
getCounts().then(res => {
- console.log((res))
this.counts = res.data
})
},
getToDoCountsByUser() {
getToDoCountsByUser().then(res => {
- console.log((res))
this.counts1 = res.data
})
},
},
- onLoad: function() {
+ onLoad: async function() {
if (getAccessToken()) {
- this.getInfo()
- this.getPermissionInfo()
- this.getCounts()
- this.getToDoCountsByUser()
+ this.getCounts()
+ this.getToDoCountsByUser()
}
-
+console.log( this.$store.state)
},
onPageScroll(e) {
if (e.scrollTop > 0) {
diff --git a/pages/login.vue b/pages/login.vue
index 2889360..fc3cfb2 100644
--- a/pages/login.vue
+++ b/pages/login.vue
@@ -90,15 +90,19 @@
async pwdLogin(captchaParams) {
this.$modal.loading("登录中,请耐心等待...")
// 执行登录
- this.$store.dispatch('Login', this.loginForm).then(() => {
+ this.$store.dispatch('Login', this.loginForm).then(async () => {
this.$modal.closeLoading()
- this.$tab.reLaunch('/pages/index')
+ await this.loginSuccess()
+ // this.$tab.reLaunch('/pages/index')
})
},
// 登录成功后,处理函数
- loginSuccess(result) {
+ async loginSuccess(result) {
// 设置用户信息
- this.$store.dispatch('GetInfo').then(res => {
+ await this.$store.dispatch('GetPermissionInfo').then(res => {
+ // this.$tab.reLaunch('/pages/index')
+ })
+ await this.$store.dispatch('GetInfo').then(res => {
this.$tab.reLaunch('/pages/index')
})
}
diff --git a/pages/mine/index.vue b/pages/mine/index.vue
index f9667ee..d70e963 100644
--- a/pages/mine/index.vue
+++ b/pages/mine/index.vue
@@ -45,11 +45,15 @@
巡检点检
-
+
+
+ 领用审批
+
+
我的领用
-
+
备件维修
@@ -68,12 +72,12 @@
版本更新
-->
-
+
退出登录
@@ -125,6 +129,15 @@
handleSpotCheckOrder() {
this.$tab.navigateTo('/pages/spotCheckOrder/myOrder')
},
+ handleSparePartsApplication(){
+ this.$tab.navigateTo('/pages/sparePartsApplication/mySparePartsApplication?flag=1')
+ },
+ handleSparePartsApplicationApprove(){
+ this.$tab.navigateTo('/pages/sparePartsApplication/mySparePartsApplication?flag=2')
+ },
+ handleSparePartsService(){
+ this.$tab.navigateTo('/pages/sparePartsServiceWorkOrderList/mySparePartsService')
+ },
handleLogout() {
this.$modal.confirm('确定注销并退出系统吗?').then(() => {
this.$store.dispatch('LogOut').then(() => {
diff --git a/pages/repairOrder/detail.vue b/pages/repairOrder/detail.vue
index 861d927..ee19489 100644
--- a/pages/repairOrder/detail.vue
+++ b/pages/repairOrder/detail.vue
@@ -112,7 +112,7 @@
-
+
添加维修内容
@@ -121,11 +121,11 @@