diff --git a/apis/apis.js b/apis/apis.js
index c1f0fcd..f8b4779 100644
--- a/apis/apis.js
+++ b/apis/apis.js
@@ -791,6 +791,44 @@ const indexScan = {
},
}
+const preCrashExam = {
+ async fetchPreCrashList(data = {}, header = {}) {
+ return await Http.post(
+ HttpConfig.materialPath,
+ HttpConfig.serviceUrl.preCrashExam.fetchPreCrashList,
+ data,
+ header
+ )
+ },
+ async fetchPreCrashDetail(data = {}, header = {}) {
+ return await Http.get(
+ HttpConfig.materialPath,
+ HttpConfig.serviceUrl.preCrashExam.fetchPreCrashDetail,
+ data,
+ header
+ )
+ },
+ async submitPreExam(data = {}, header = {}) {
+ return await Http.post(
+ HttpConfig.materialPath,
+ HttpConfig.serviceUrl.preCrashExam.submitPreExam,
+ data,
+ header
+ )
+ },
+}
+
+const preCrashList = {
+ async fetchPreSubList(data = {}, header = {}) {
+ return await Http.get(
+ HttpConfig.materialPath,
+ HttpConfig.serviceUrl.preCrashList.fetchPreSubList,
+ data,
+ header
+ )
+ },
+}
+
const url = HttpConfig.systemPath
export default{
@@ -815,5 +853,7 @@ export default{
rfidBinding,
qrcodeBinding,
indexScan,
+ preCrashExam,
+ preCrashList,
url
}
\ No newline at end of file
diff --git a/apis/http.js b/apis/http.js
index 95a7b76..08a6f5a 100644
--- a/apis/http.js
+++ b/apis/http.js
@@ -3,26 +3,26 @@ class HttpConfig {
baseUrl = "/api"
// #endif
// #ifdef APP-PLUS
- baseUrl = "http://112.29.103.165:21624"
+ // baseUrl = "http://112.29.103.165:21624"
// baseUrl = "http://192.168.0.14:21624"
// baseUrl = "http://112.29.103.165:21626"
// baseUrl = "http://172.20.10.3:8080"
// baseUrl = "http://10.40.92.8:8080"
// baseUrl = "http://10.40.92.52:28080"
// baseUrl = "http://10.40.92.78:28080"
- // baseUrl = "http://10.40.92.60:38080"
+ baseUrl = "http://10.40.92.60:38080"
// baseUrl = "https://z.csgmall.com.cn/gl"
// baseUrl = "http://10.40.92.141:28080"
// #endif
// 基地址
- authPath = `${this.baseUrl}/dev-api/auth`
+ /* authPath = `${this.baseUrl}/dev-api/auth`
systemPath = `${this.baseUrl}/dev-api/system`
basePath = `${this.baseUrl}/dev-api/base`
- materialPath = `${this.baseUrl}/dev-api/material`
- /* authPath = `${this.baseUrl}/auth`
+ materialPath = `${this.baseUrl}/dev-api/material` */
+ authPath = `${this.baseUrl}/auth`
systemPath = `${this.baseUrl}/system`
basePath = `${this.baseUrl}/base`
- materialPath = `${this.baseUrl}/material` */
+ materialPath = `${this.baseUrl}/material`
// 短链
serviceUrl = {
login: {
@@ -159,6 +159,14 @@ class HttpConfig {
},
indexScan: {
infoByCode: '/machine/getMachineByQrCode', // 首页根据二维码查询设备信息
+ },
+ preCrashExam: {
+ fetchPreCrashList: '/scrap/getScrapApplyListApp', //获取预报废审核列表
+ fetchPreCrashDetail: '/scrap/getScrapAuditListApp', //获取预报废审核列表详情
+ submitPreExam: '/scrap/forecastWasteAudit', //提交审核
+ },
+ preCrashList: {
+ fetchPreSubList: '/scrap/getScrapTaskListApp', // 获取预报废提交列表
}
}
}
diff --git a/pages.json b/pages.json
index baf16d5..f5747c7 100644
--- a/pages.json
+++ b/pages.json
@@ -467,6 +467,30 @@
}
}
+ ,{
+ "path" : "pages/preCrashExamDetail/preCrashExamDetail",
+ "style" :
+ {
+ "navigationBarTitleText": "审核详情"
+ }
+
+ }
+ ,{
+ "path" : "pages/preCrashList/preCrashList",
+ "style" :
+ {
+ "navigationBarTitleText": "预报废列表"
+ }
+
+ }
+ ,{
+ "path" : "pages/preCrashListDetail/preCrashListDetail",
+ "style" :
+ {
+ "navigationBarTitleText": "列表详情"
+ }
+
+ }
],
"tabBar": {
"color": "#2c2c2c",
diff --git a/pages/preCrashExam/preCrashExam.vue b/pages/preCrashExam/preCrashExam.vue
index 113aa6f..57d5573 100644
--- a/pages/preCrashExam/preCrashExam.vue
+++ b/pages/preCrashExam/preCrashExam.vue
@@ -1,68 +1,101 @@
+
+
+
-
-
-
+
+ -->
- {{ fetch.createBy == null ? '' : fetch.createBy.slice(0, 1) }}
+ {{ pre.createBy == null ? '' : pre.createBy.slice(0, 1) }}
- {{ fetch.createBy }}
- {{ fetch.unitName }}
+ {{ pre.createBy }}
+ {{ pre.unitName }}
预报废单号
- {{ fetch.scrapNum }}
+ {{ pre.scrapNum }}
报废来源
- {{ fetch.projectName }}
+ {{ pre.projectName }}
设备类型
- {{ fetch.itemType }}
+ {{ pre.itemType }}
申请时间
- {{ fetch.createTime }}
+ {{ pre.createTime }}
查看
+
+ 审核
+
+
审核
-
-
-
+
+
+ 待审核
+
+
+ 审核中
+
+
+ 已通过
+
+
+ 已驳回
+
-
+
+
@@ -105,15 +138,168 @@
export default {
data() {
return {
-
+ preCrashList: [],
+ preIpt: '',
+ roles: uni.getStorageSync('roles'),
+ ableRoleArr: ['admin', 'em03', 'dm02'],
+ ifRole: false
}
},
methods: {
-
+ searchKeyword () {
+ this.fetchPreCrashList(this.preIpt)
+ },
+ fetchPreCrashList (keyword) {
+ let that = this
+ that.$api.preCrashExam.fetchPreCrashList({
+ keyword
+ }).then(res => {
+ console.log(res);
+ if (res.data.code == 200) {
+ that.preCrashList = res.data.data
+ }
+ }).catch(err => {
+ console.log(err);
+ })
+ },
+ seePreDetail (taskId) {
+ uni.setStorageSync('preTaskId', taskId)
+ uni.navigateTo({
+ url: `/pages/preCrashExamDetail/preCrashExamDetail`
+ })
+ },
+ examPreDetail (taskId) {
+ uni.setStorageSync('preTaskId', taskId)
+ uni.navigateTo({
+ url: `/pages/preCrashExamDetail/preCrashExamDetail?showBtn=0`
+ })
+ }
+ },
+ onShow() {
+ let that = this
+ that.fetchPreCrashList('')
+ console.log(uni.getStorageSync('roles'));
+ for (let role of that.roles) {
+ if (that.ableRoleArr.includes(role)) {
+ that.ifRole = true;
+ break;
+ }
+ }
+ console.log(that.ifRole);
}
}
-
diff --git a/pages/preCrashExamDetail/preCrashExamDetail.vue b/pages/preCrashExamDetail/preCrashExamDetail.vue
new file mode 100644
index 0000000..6b8c7b1
--- /dev/null
+++ b/pages/preCrashExamDetail/preCrashExamDetail.vue
@@ -0,0 +1,319 @@
+
+
+
+
+ 设备类型
+ {{ list.machineTypeName }}
+
+
+ 规格型号
+ {{ list.specificationType }}
+
+
+ 设备编码
+ {{ list.maCode == null ? '-' : list.maCode }}
+
+
+ 报废数量
+ {{ list.scrapNum }}
+
+
+ 损坏原因
+ {{ list.scrapType == '0' ? '自然' : '人为' }}
+
+
+ 报废图片
+
+
+
+
+
+
+ 通过
+
+
+ 驳回
+
+
+
+
+ 待审核
+
+
+ 已通过
+
+
+ 驳回
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/pages/preCrashList/preCrashList.vue b/pages/preCrashList/preCrashList.vue
new file mode 100644
index 0000000..d4ba78b
--- /dev/null
+++ b/pages/preCrashList/preCrashList.vue
@@ -0,0 +1,241 @@
+
+
+
+
+
+
+
+
+
+ {{ pre.createBy == null ? '' : pre.createBy.slice(0, 1) }}
+
+
+ {{ pre.createBy }}
+ {{ pre.unitName }}
+
+
+
+
+ 预报废单号
+ {{ pre.repairNum }}
+
+
+ 报废单号
+ {{ pre.scrapNum }}
+
+
+ 报废来源
+ {{ pre.scrapSource == '1' ? '退料' : '维修' }}
+
+
+ 设备类型
+ {{ pre.itemType }}
+
+
+
+
+
+ 查看
+
+
+
+ 审核
+
+
+
+
+
+ 待提交
+
+
+ 审核中
+
+
+ 已通过
+
+
+ 已驳回
+
+
+
+
+
+
+
+
+
diff --git a/pages/preCrashListDetail/preCrashListDetail.vue b/pages/preCrashListDetail/preCrashListDetail.vue
new file mode 100644
index 0000000..7abdc8a
--- /dev/null
+++ b/pages/preCrashListDetail/preCrashListDetail.vue
@@ -0,0 +1,25 @@
+
+
+
+
+
+
+
+
+
diff --git a/pages/workSpace/workSpace.vue b/pages/workSpace/workSpace.vue
index 5d6f81e..9371ee9 100644
--- a/pages/workSpace/workSpace.vue
+++ b/pages/workSpace/workSpace.vue
@@ -107,6 +107,11 @@
pic: '/static/preCrashExam.png',
url: 'preCrashExam'
},
+ {
+ name: '预报废列表',
+ pic: '/static/preCrashList.png',
+ url: 'preCrashList'
+ },
{
name: '报废审核',
pic: '/static/crashExam.png',
diff --git a/router.js b/router.js
index 12e373e..1b1bc10 100644
--- a/router.js
+++ b/router.js
@@ -426,6 +426,27 @@ const router = createRouter({
"meta": {
"needAuth": "true"
}
+ },
+ {
+ "path" : "/pages/preCrashExamDetail/preCrashExamDetail",
+ "name": 'preCrashExamDetail',
+ "meta": {
+ "needAuth": "true"
+ }
+ },
+ {
+ "path" : "/pages/preCrashList/preCrashList",
+ "name": 'preCrashList',
+ "meta": {
+ "needAuth": "true"
+ }
+ },
+ {
+ "path" : "/pages/preCrashListDetail/preCrashListDetail",
+ "name": 'preCrashListDetail',
+ "meta": {
+ "needAuth": "true"
+ }
}
]
})
diff --git a/static/preCrashList.png b/static/preCrashList.png
new file mode 100644
index 0000000..28fa434
Binary files /dev/null and b/static/preCrashList.png differ