From 9a1b28cce52122a7f49c41af0480f015a16984d8 Mon Sep 17 00:00:00 2001
From: FrancisHu <2756004617@qq.com>
Date: Thu, 20 Jun 2024 16:40:29 +0800
Subject: [PATCH] =?UTF-8?q?6.20=E5=AE=81=E5=A4=8F=E6=96=B0=E5=A2=9E?=
=?UTF-8?q?=E9=A2=84=E6=8A=A5=E5=BA=9F=E5=AE=A1=E6=A0=B8=E5=92=8C=E5=88=97?=
=?UTF-8?q?=E8=A1=A8=E6=A8=A1=E5=9D=97?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
apis/apis.js | 40 +++
apis/http.js | 20 +-
pages.json | 24 ++
pages/preCrashExam/preCrashExam.vue | 240 +++++++++++--
.../preCrashExamDetail/preCrashExamDetail.vue | 319 ++++++++++++++++++
pages/preCrashList/preCrashList.vue | 241 +++++++++++++
.../preCrashListDetail/preCrashListDetail.vue | 25 ++
pages/workSpace/workSpace.vue | 5 +
router.js | 21 ++
static/preCrashList.png | Bin 0 -> 2277 bytes
10 files changed, 902 insertions(+), 33 deletions(-)
create mode 100644 pages/preCrashExamDetail/preCrashExamDetail.vue
create mode 100644 pages/preCrashList/preCrashList.vue
create mode 100644 pages/preCrashListDetail/preCrashListDetail.vue
create mode 100644 static/preCrashList.png
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 0000000000000000000000000000000000000000..28fa434d93ea5c85266b88b5a66926d6a848f28a
GIT binary patch
literal 2277
zcmVuO->
zYATXP9}(ySFFoGK3Pt^f5c0Xbg7%CMc}SU)rg`nk=ui$mV+&01EdIDh_i02K|zmjuN%_5b!dcVq|5|N^Oj|iJ<^i}Os;OuN{I6~
z#0Z!(m(xSj&f7bLgkK=xU%=5|VLlx@=cJ({1x&7$Z%HY~aD<@3YU%Pw?CEapy2b#j
z=Z~213>9Ew6RV}yy0z=5fXUU;^bs=qR*X|%e5F%^wl2_!sG{S^M+bRfJ{_NJb)=;N
z8hM^m-GB-l|0(K<@^q^@L2K38lydPf3m>5fmkn#yhxtcEM{cX$>6BzZ8XOPK?me*2
z0w$hpj#CKj8axKUPQiKGra}?#Vxi*T3j1AQmjc-Ix%VmRXK;vUC%8@7WCfI|-@0b?
zqN>zR&8AXCd&e#pFim5MqJ9R4gl>Y{+}G=r_M{U9BEuU
z0aVBB=|AwO(Ncg_3Gy7?paS35LK-e6!gw|ka3wsmZ1mi5NtT&6EDNCCKk#yw1!tj0
z6mPR~_iJ@1qUUK1@T4vMZ5@yG_C?MU!-V2WiSjxA
z*0!U627RX29xsz$|KUjy&%~n`4QOrK-60DQ?p!DH{enEH)eU`2^bkOL#f_+b*BJ|
z9b+1q&lr46e_n#yAIaqZxmm$aPaMY=gId@2Tmo;&HX}MG&{CZyATxf5??rI-_k~9V
zyk9r)i!XczX@@<^B`{?$xP?={=5^TXHJ!1)|Lp!Fgd<`6?x1GL;n7&2dfwzisMJehI_u&9ku}B-U5h>YxnUgJp23g^)fPv
zVfh(8DReULxbS*sNq6FTDYYX^&VFQcB4SYQ{
zgs()y9g7tk_V*d`_pMMEC#mPp54*Rb54i+ZJej`*WdY>f#DT=n5Q?=Lez&%P>cdr>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